diff --git a/.changes/beta.md b/.changes/beta.md new file mode 100644 index 000000000..3761074e6 --- /dev/null +++ b/.changes/beta.md @@ -0,0 +1,57 @@ +--- +"authenticator": patch +"autostart": patch +"barcode-scanner": patch +"biometric": patch +"cli": patch +"clipboard-manager": patch +"deep-link": patch +"dialog": patch +"fs": patch +"global-shortcut": patch +"http": patch +"localhost": patch +"log-plugin": patch +"nfc": patch +"notification": patch +"os": patch +"persisted-scope": patch +"positioner": patch +"process": patch +"shell": patch +"single-instance": patch +"sql": patch +"store": patch +"stronghold": patch +"updater": patch +"upload": patch +"websocket": patch +"window-state": patch +"authenticator-js": patch +"autostart-js": patch +"barcode-scanner-js": patch +"biometric-js": patch +"cli-js": patch +"clipboard-manager-js": patch +"deep-link-js": patch +"dialog-js": patch +"fs-js": patch +"global-shortcut-js": patch +"http-js": patch +"log-js": patch +"nfc-js": patch +"notification-js": patch +"os-js": patch +"positioner-js": patch +"process-js": patch +"shell-js": patch +"sql-js": patch +"store-js": patch +"stronghold-js": patch +"updater-js": patch +"upload-js": patch +"websocket-js": patch +"window-state-js": patch +--- + +Update to tauri beta. diff --git a/.changes/permissions.md b/.changes/permissions.md new file mode 100644 index 000000000..390ef1c7a --- /dev/null +++ b/.changes/permissions.md @@ -0,0 +1,36 @@ +--- +"authenticator": patch +"autostart": patch +"barcode-scanner": patch +"barcode-scanner-js": patch +"biometric": patch +"cli": patch +"clipboard-manager": patch +"clipboard-manager-js": patch +"deep-link": patch +"dialog": patch +"fs": patch +"global-shortcut": patch +"global-shortcut-js": patch +"http": patch +"localhost": patch +"log-plugin": patch +"nfc": patch +"nfc-js": patch +"notification": patch +"os": patch +"persisted-scope": patch +"positioner": patch +"process": patch +"shell": patch +"single-instance": patch +"sql": patch +"store": patch +"stronghold": patch +"updater": patch +"upload": patch +"websocket": patch +"window-state": patch +--- + +Add permissions. diff --git a/.changes/pre.json b/.changes/pre.json index 1fa83e923..b2768b02b 100644 --- a/.changes/pre.json +++ b/.changes/pre.json @@ -9,32 +9,40 @@ ".changes/api-alpha.12.md", ".changes/api-alpha.13.md", ".changes/api-alpha.9.md", + ".changes/beta.md", ".changes/biometric-initial-release.md", ".changes/deep-link-initial-release.md", ".changes/dialog-async-message-dialog.md", ".changes/dialog-default-path-windows-slash.md", ".changes/dialog-export-fileresponse.md", + ".changes/dialog-message-android.md", ".changes/dialog-pin-rfd.md", ".changes/dialog-return-result.md", + ".changes/fix-cmd-spawn-deadlock.md", ".changes/fix-debounced-event-type.md", ".changes/fix-deep-link-alpha-20.md", ".changes/fix-docs-build.md", ".changes/fix-emit-all-usage.md", + ".changes/fix-fs-write-default-option.md", ".changes/fix-invoke-usage.md", + ".changes/fix-notification-schedule-export.md", ".changes/fix-number-query-params.md", ".changes/fix-permission-notification.md", + ".changes/fix-scheduled-notification.md", ".changes/fix-updater-macos.md", ".changes/fix-window-state-api.md", ".changes/fs-create-new.md", ".changes/fs-exists-2nd-arg.md", ".changes/fs-improve-error-message.md", ".changes/fs-improved-apis.md", + ".changes/fs-replace-notify-debouncer.md", ".changes/fs-scope-tauri.md", ".changes/fs-trunacte-non-append.md", ".changes/fs-unwtach-rid.md", ".changes/fs-wiret-binary-file.md", ".changes/fs-write-panic.md", ".changes/global-shortcut-app-handle.md", + ".changes/http-init-fetch-option-connectTimeout.md", ".changes/http-multipart-refactor.md", ".changes/http-plugin-refactor.md", ".changes/http-proxy-config.md", @@ -48,6 +56,7 @@ ".changes/os-OsType.md", ".changes/os-plugin-refactor.md", ".changes/os-reading-undefined.md", + ".changes/permissions.md", ".changes/persisted-scope-asset.md", ".changes/persisted-scope-glob.md", ".changes/positioner-tray-flag.md", @@ -61,15 +70,20 @@ ".changes/tauri-alpha-15.md", ".changes/tauri-alpha.11.md", ".changes/tauri-alpha.12.md", + ".changes/tauri-http-plugin-errror-invalid-rid.md", ".changes/tray-position.md", ".changes/updater-appimage.md", ".changes/updater-escaped-path.md", + ".changes/updater-js-started-event.md", ".changes/updater-nsis-admin.md", ".changes/updater-nsis-basicui.md", ".changes/updater-nsis.md", + ".changes/updater-on-chunk-fn-mut.md", ".changes/updater-plugin-refactor.md", + ".changes/updater-proxy.md", ".changes/updater-string-replace-round2.md", ".changes/updater-string-replace.md", + ".changes/updater.md", ".changes/upload-bufwriter.md", ".changes/v2-alpha.md", ".changes/websocket-fix-arg-name.md", diff --git a/.prettierignore b/.prettierignore index c2d3ae570..c5d0524a8 100644 --- a/.prettierignore +++ b/.prettierignore @@ -8,4 +8,5 @@ Cargo.lock build api-iife.js init-iife.js -intermediates/ \ No newline at end of file +intermediates/ +*schema.json \ No newline at end of file diff --git a/.scripts/ci/check-license-header.js b/.scripts/ci/check-license-header.js index 225e90ba9..d21d168d5 100644 --- a/.scripts/ci/check-license-header.js +++ b/.scripts/ci/check-license-header.js @@ -9,7 +9,10 @@ import readline from "readline"; const header = `Copyright 2019-2023 Tauri Programme within The Commons Conservancy SPDX-License-Identifier: Apache-2.0 SPDX-License-Identifier: MIT`; -const ignoredLicense = "// Copyright 2021 Jonas Kruckenberg"; +const ignoredLicenses = [ + "// Copyright 2021 Jonas Kruckenberg", + "// Copyright 2018-2023 the Deno authors.", +]; const extensions = [".rs", ".js", ".ts", ".yml", ".swift", ".kt"]; const ignore = [ @@ -44,7 +47,7 @@ async function checkFile(file) { line.length === 0 || line.startsWith("#!") || line.startsWith("// swift-tools-version:") || - line === ignoredLicense + ignoredLicenses.includes(line) ) { continue; } diff --git a/Cargo.lock b/Cargo.lock index e8e6dcc59..5421c95a6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -284,8 +284,8 @@ dependencies = [ "objc_id", "parking_lot", "thiserror", - "winapi", - "x11rb", + "winapi 0.3.9", + "x11rb 0.12.0", ] [[package]] @@ -300,6 +300,12 @@ version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +[[package]] +name = "as-raw-xcb-connection" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "175571dd1d178ced59193a6fc02dde1b972eb0bc56c892cde9beeceac5bf0f6b" + [[package]] name = "ascii" version = "1.1.0" @@ -564,7 +570,7 @@ dependencies = [ "log", "rand 0.7.3", "runloop", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -749,6 +755,20 @@ name = "bytemuck" version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6" +dependencies = [ + "bytemuck_derive", +] + +[[package]] +name = "bytemuck_derive" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "965ab7eb5f8f97d2a083c799f3a1b994fc397b2fe2da5d1da1626ce15a39f2b1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.39", +] [[package]] name = "byteorder" @@ -821,6 +841,38 @@ dependencies = [ "system-deps", ] +[[package]] +name = "camino" +version = "1.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo-platform" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ceed8ef69d8518a5dda55c07425450b58a4e1946f4951eab6d7191ee86c2443d" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo_metadata" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" +dependencies = [ + "camino", + "cargo-platform", + "semver", + "serde", + "serde_json", + "thiserror", +] + [[package]] name = "cargo_toml" version = "0.17.0" @@ -880,6 +932,12 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" +[[package]] +name = "cfg_aliases" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77e53693616d3075149f4ead59bdeecd204ac6b8192d8969757601b74bddf00f" + [[package]] name = "chacha20" version = "0.8.2" @@ -981,7 +1039,7 @@ checksum = "7191c27c2357d9b7ef96baac1773290d4ca63b24205b82a3fd8a0637afcf0362" dependencies = [ "error-code", "str-buf", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -1050,7 +1108,7 @@ checksum = "5a5f741c91823341bebf717d4c71bda820630ce065443b58bd1b7451af008355" dependencies = [ "is-terminal", "lazy_static", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -1490,7 +1548,7 @@ checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" dependencies = [ "libc", "redox_users", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -1501,7 +1559,7 @@ checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" dependencies = [ "libc", "redox_users", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -1510,12 +1568,66 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" +[[package]] +name = "dlib" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412" +dependencies = [ + "libloading 0.8.1", +] + [[package]] name = "dotenvy" version = "0.15.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" +[[package]] +name = "downcast-rs" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" + +[[package]] +name = "drm" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0f8a69e60d75ae7dab4ef26a59ca99f2a89d4c142089b537775ae0c198bdcde" +dependencies = [ + "bitflags 2.4.1", + "bytemuck", + "drm-ffi", + "drm-fourcc", + "rustix 0.38.25", +] + +[[package]] +name = "drm-ffi" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41334f8405792483e32ad05fbb9c5680ff4e84491883d2947a4757dc54cb2ac6" +dependencies = [ + "drm-sys", + "rustix 0.38.25", +] + +[[package]] +name = "drm-fourcc" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0aafbcdb8afc29c1a7ee5fbe53b5d62f4565b35a042a662ca9fecd0b54dae6f4" + +[[package]] +name = "drm-sys" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d09ff881f92f118b11105ba5e34ff8f4adf27b30dae8f12e28c193af1c83176" +dependencies = [ + "libc", + "linux-raw-sys 0.6.4", +] + [[package]] name = "dtoa" version = "1.0.9" @@ -1537,6 +1649,12 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" +[[package]] +name = "dyn-clone" +version = "1.0.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "545b22097d44f8a9581187cdf93de7a71e4722bf51200cfaba810865b49a495d" + [[package]] name = "ed25519-zebra" version = "3.1.0" @@ -2130,7 +2248,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb65d4ba3173c56a500b555b532f72c42e8d1fe64962b518897f8959fae2c177" dependencies = [ "libc", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -2222,7 +2340,7 @@ dependencies = [ "gobject-sys 0.16.3", "libc", "system-deps", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -2235,7 +2353,7 @@ dependencies = [ "gobject-sys 0.18.0", "libc", "system-deps", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -2557,7 +2675,7 @@ checksum = "3c731c3e10504cc8ed35cfe2f1db4c9274c3d35fa486e3b31df46f068ef3e867" dependencies = [ "libc", "match_cfg", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -2996,7 +3114,7 @@ dependencies = [ "jni-sys", "log", "thiserror", - "walkdir", + "walkdir 2.4.0", "windows-sys 0.45.0", ] @@ -3042,6 +3160,16 @@ dependencies = [ "treediff", ] +[[package]] +name = "kernel32-sys" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" +dependencies = [ + "winapi 0.2.8", + "winapi-build", +] + [[package]] name = "keyboard-types" version = "0.6.2" @@ -3126,7 +3254,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e9ec52138abedcc58dc17a7c6c0c00a2bdb4f3427c7f63fa97fd0d859155caf" dependencies = [ "gtk-sys", - "libloading", + "libloading 0.7.4", "once_cell", ] @@ -3143,7 +3271,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" dependencies = [ "cfg-if", - "winapi", + "winapi 0.3.9", +] + +[[package]] +name = "libloading" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c571b676ddfc9a8c12f1f3d3085a7b163966a8fd8098a90640953ce5f6170161" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", ] [[package]] @@ -3172,7 +3310,7 @@ dependencies = [ "cc", "libc", "pkg-config", - "walkdir", + "walkdir 2.4.0", ] [[package]] @@ -3233,6 +3371,12 @@ version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "969488b55f8ac402214f3f5fd243ebb7206cf82de60d3172994707a4bcc2b829" +[[package]] +name = "linux-raw-sys" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0b5399f6804fbab912acbd8878ed3532d506b7c951b8f9f164ef90fef39e3f4" + [[package]] name = "lock_api" version = "0.4.11" @@ -3355,6 +3499,15 @@ version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" +[[package]] +name = "memmap2" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45fd3a57831bf88bc63f8cebc0cf956116276e97fef3966103e96416209f7c92" +dependencies = [ + "libc", +] + [[package]] name = "memoffset" version = "0.6.5" @@ -3496,7 +3649,7 @@ dependencies = [ "jni-sys", "ndk-sys", "num_enum", - "raw-window-handle", + "raw-window-handle 0.5.2", "thiserror", ] @@ -3578,7 +3731,7 @@ dependencies = [ "log", "mio", "serde", - "walkdir", + "walkdir 2.4.0", "windows-sys 0.48.0", ] @@ -3593,7 +3746,7 @@ dependencies = [ "log", "notify", "parking_lot", - "walkdir", + "walkdir 2.4.0", ] [[package]] @@ -3616,7 +3769,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" dependencies = [ "overload", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -3861,7 +4014,7 @@ checksum = "006e42d5b888366f1880eda20371fedde764ed2213dc8496f49622fa0c99cd5e" dependencies = [ "log", "serde", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -4519,6 +4672,12 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2ff9a1f06a88b01621b7ae906ef0211290d1c8a168a15542486a8f61c0833b9" +[[package]] +name = "raw-window-handle" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42a9830a0e1b9fb145ebb365b8bc4ccd75f290f98c0247deafbbe2c75cefb544" + [[package]] name = "read-progress-stream" version = "1.0.0" @@ -4685,7 +4844,7 @@ dependencies = [ "objc", "objc-foundation", "objc_id", - "raw-window-handle", + "raw-window-handle 0.5.2", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", @@ -4704,7 +4863,7 @@ dependencies = [ "spin 0.5.2", "untrusted 0.7.1", "web-sys", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -4880,6 +5039,16 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072" +[[package]] +name = "same-file" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d931a44fdaa43b8637009e7632a02adc4f2b2e0733c08caa4cf00e8da4a117a7" +dependencies = [ + "kernel32-sys", + "winapi 0.2.8", +] + [[package]] name = "same-file" version = "1.0.6" @@ -4898,6 +5067,32 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "schemars" +version = "0.8.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45a28f4c49489add4ce10783f7911893516f15afe45d015608d41faca6bc4d29" +dependencies = [ + "dyn-clone", + "indexmap 1.9.3", + "schemars_derive", + "serde", + "serde_json", + "url", +] + +[[package]] +name = "schemars_derive" +version = "0.8.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c767fd6fa65d9ccf9cf026122c1b555f2ef9a4f0cea69da4d7dbc3e258d30967" +dependencies = [ + "proc-macro2", + "quote", + "serde_derive_internals", + "syn 1.0.109", +] + [[package]] name = "scoped-tls" version = "1.0.1" @@ -4992,6 +5187,17 @@ dependencies = [ "syn 2.0.39", ] +[[package]] +name = "serde_derive_internals" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85bf8229e7920a9f636479437026331ce11aa132b4dde37d121944a44d6e5f3c" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "serde_json" version = "1.0.108" @@ -5147,7 +5353,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b0d94659ad3c2137fef23ae75b03d5241d633f8acded53d672decfa0e6e0caef" dependencies = [ "libc", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -5220,7 +5426,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" dependencies = [ "libc", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -5233,6 +5439,37 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "softbuffer" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071916a85d1db274b4ed57af3a14afb66bd836ae7f82ebb6f1fd3455107830d9" +dependencies = [ + "as-raw-xcb-connection", + "bytemuck", + "cfg_aliases 0.2.0", + "cocoa 0.25.0", + "core-graphics 0.23.1", + "drm", + "fastrand 2.0.1", + "foreign-types 0.5.0", + "js-sys", + "log", + "memmap2", + "objc", + "raw-window-handle 0.6.0", + "redox_syscall 0.4.1", + "rustix 0.38.25", + "tiny-xlib", + "wasm-bindgen", + "wayland-backend", + "wayland-client", + "wayland-sys", + "web-sys", + "windows-sys 0.52.0", + "x11rb 0.13.0", +] + [[package]] name = "soup3" version = "0.5.0" @@ -5711,9 +5948,9 @@ dependencies = [ [[package]] name = "tao" -version = "0.24.0" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c0dff18fed076d29cb5779e918ef4b8a5dbb756204e4a027794f0bce233d949" +checksum = "9fa7ba6ee5b8908ba3a62e6a4f3683490ed732fca614cdd3f4c989bba548f9a9" dependencies = [ "bitflags 1.3.2", "cc", @@ -5738,7 +5975,8 @@ dependencies = [ "once_cell", "parking_lot", "png", - "raw-window-handle", + "raw-window-handle 0.5.2", + "raw-window-handle 0.6.0", "scopeguard", "tao-macros", "unicode-segmentation", @@ -5780,9 +6018,9 @@ checksum = "14c39fd04924ca3a864207c66fc2cd7d22d7c016007f9ce846cbb9326331930a" [[package]] name = "tauri" -version = "2.0.0-alpha.20" +version = "2.0.0-beta.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05fb63873c39d3fd5ddad995d395e7b7394ece0b69aeacb31e91d24af48f3de1" +checksum = "4ab20e6305a618700ba238b21afb938559fc86c217c4b025ec6626fe5e826007" dependencies = [ "anyhow", "bytes 1.5.0", @@ -5806,13 +6044,14 @@ dependencies = [ "objc", "percent-encoding", "png", - "raw-window-handle", + "raw-window-handle 0.5.2", "reqwest", "serde", "serde_json", "serde_repr", "serialize-to-javascript", "state", + "static_assertions", "swift-rs", "tauri-build", "tauri-macros", @@ -5832,32 +6071,33 @@ dependencies = [ [[package]] name = "tauri-build" -version = "2.0.0-alpha.13" +version = "2.0.0-beta.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a2582ffb43e5c28932c43ffc40c295a9196a9a33ffb1163269c6baed84834a" +checksum = "e2e2e6f743278a9b6db360c382dcaf1069b842b600174f0b82e89d03795ef28f" dependencies = [ "anyhow", "cargo_toml", "dirs-next", + "glob", "heck", "json-patch", - "plist", "quote", + "schemars", "semver", "serde", "serde_json", - "swift-rs", "tauri-codegen", "tauri-utils", "tauri-winres", - "walkdir", + "toml 0.8.8", + "walkdir 2.4.0", ] [[package]] name = "tauri-codegen" -version = "2.0.0-alpha.12" +version = "2.0.0-beta.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b06976ec7b704d6b842169ffd4ce596e9ce45917a0ab462cb96a119fa2829be9" +checksum = "def6fe2f80c5f49ce255e4e74a7cf19861ddbbb1da0b201183fed13842a018bd" dependencies = [ "base64 0.21.5", "brotli", @@ -5876,14 +6116,14 @@ dependencies = [ "time 0.3.30", "url", "uuid", - "walkdir", + "walkdir 2.4.0", ] [[package]] name = "tauri-macros" -version = "2.0.0-alpha.12" +version = "2.0.0-beta.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff509be5a5ac34ec2e60d9029af1032c0a33e421f3e823bc92695192e2871c17" +checksum = "3dadbcda0ad142907f7fcb287f7213e2657bd3346232355cd9ffaabbed786e5b" dependencies = [ "heck", "proc-macro2", @@ -5893,6 +6133,23 @@ dependencies = [ "tauri-utils", ] +[[package]] +name = "tauri-plugin" +version = "2.0.0-beta.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f3bad1d89a3dd41a55fcafa29bbc4e926340f7bb9af8f5c1d2cda3a16196ce8" +dependencies = [ + "anyhow", + "glob", + "plist", + "schemars", + "serde", + "serde_json", + "tauri-utils", + "toml 0.8.8", + "walkdir 1.0.7", +] + [[package]] name = "tauri-plugin-authenticator" version = "2.0.0-alpha.6" @@ -5908,6 +6165,7 @@ dependencies = [ "serde_json", "sha2 0.10.8", "tauri", + "tauri-plugin", "thiserror", "u2f", ] @@ -5921,6 +6179,7 @@ dependencies = [ "serde", "serde_json", "tauri", + "tauri-plugin", "thiserror", ] @@ -5932,7 +6191,7 @@ dependencies = [ "serde", "serde_json", "tauri", - "tauri-build", + "tauri-plugin", "thiserror", ] @@ -5945,7 +6204,7 @@ dependencies = [ "serde_json", "serde_repr", "tauri", - "tauri-build", + "tauri-plugin", "thiserror", ] @@ -5958,6 +6217,7 @@ dependencies = [ "serde", "serde_json", "tauri", + "tauri-plugin", "thiserror", ] @@ -5970,7 +6230,7 @@ dependencies = [ "serde", "serde_json", "tauri", - "tauri-build", + "tauri-plugin", "thiserror", ] @@ -5982,7 +6242,7 @@ dependencies = [ "serde", "serde_json", "tauri", - "tauri-build", + "tauri-plugin", "thiserror", "url", ] @@ -5993,12 +6253,12 @@ version = "2.0.0-alpha.7" dependencies = [ "glib 0.16.9", "log", - "raw-window-handle", + "raw-window-handle 0.5.2", "rfd", "serde", "serde_json", "tauri", - "tauri-build", + "tauri-plugin", "tauri-plugin-fs", "thiserror", ] @@ -6011,9 +6271,12 @@ dependencies = [ "glob", "notify", "notify-debouncer-full", + "schemars", "serde", + "serde_json", "serde_repr", "tauri", + "tauri-plugin", "thiserror", "url", "uuid", @@ -6028,6 +6291,7 @@ dependencies = [ "serde", "serde_json", "tauri", + "tauri-plugin", "thiserror", ] @@ -6039,9 +6303,11 @@ dependencies = [ "glob", "http", "reqwest", + "schemars", "serde", "serde_json", "tauri", + "tauri-plugin", "tauri-plugin-fs", "thiserror", "url", @@ -6075,7 +6341,7 @@ dependencies = [ "serde_repr", "swift-rs", "tauri", - "tauri-build", + "tauri-plugin", "time 0.3.30", ] @@ -6088,7 +6354,7 @@ dependencies = [ "serde_json", "serde_repr", "tauri", - "tauri-build", + "tauri-plugin", "thiserror", ] @@ -6103,7 +6369,7 @@ dependencies = [ "serde_json", "serde_repr", "tauri", - "tauri-build", + "tauri-plugin", "thiserror", "time 0.3.30", "url", @@ -6123,6 +6389,7 @@ dependencies = [ "serialize-to-javascript", "sys-locale", "tauri", + "tauri-plugin", "thiserror", ] @@ -6149,6 +6416,7 @@ dependencies = [ "serde_json", "serde_repr", "tauri", + "tauri-plugin", "thiserror", ] @@ -6157,6 +6425,7 @@ name = "tauri-plugin-process" version = "2.0.0-alpha.6" dependencies = [ "tauri", + "tauri-plugin", ] [[package]] @@ -6168,10 +6437,12 @@ dependencies = [ "open", "os_pipe", "regex", + "schemars", "serde", "serde_json", "shared_child", "tauri", + "tauri-plugin", "thiserror", ] @@ -6198,6 +6469,7 @@ dependencies = [ "serde_json", "sqlx", "tauri", + "tauri-plugin", "thiserror", "time 0.3.30", "tokio", @@ -6211,6 +6483,7 @@ dependencies = [ "serde", "serde_json", "tauri", + "tauri-plugin", "thiserror", ] @@ -6230,6 +6503,7 @@ dependencies = [ "serde", "serde_json", "tauri", + "tauri-plugin", "thiserror", "zeroize", ] @@ -6252,6 +6526,7 @@ dependencies = [ "serde_json", "tar", "tauri", + "tauri-plugin", "tempfile", "thiserror", "time 0.3.30", @@ -6271,6 +6546,7 @@ dependencies = [ "serde", "serde_json", "tauri", + "tauri-plugin", "thiserror", "tokio", "tokio-util", @@ -6286,6 +6562,7 @@ dependencies = [ "serde", "serde_json", "tauri", + "tauri-plugin", "thiserror", "tokio", "tokio-tungstenite", @@ -6301,19 +6578,20 @@ dependencies = [ "serde", "serde_json", "tauri", + "tauri-plugin", "thiserror", ] [[package]] name = "tauri-runtime" -version = "1.0.0-alpha.7" +version = "2.0.0-beta.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64a989e58af6e554dbac798a0a8d112faafc1509bcfab626466181e0724f09c5" +checksum = "7d567f244e28e04e025646eb63c8552bfbc7d1c414753e5b22b7daf16510c2b5" dependencies = [ "gtk", "http", "jni", - "raw-window-handle", + "raw-window-handle 0.5.2", "serde", "serde_json", "tauri-utils", @@ -6324,16 +6602,17 @@ dependencies = [ [[package]] name = "tauri-runtime-wry" -version = "1.0.0-alpha.8" +version = "2.0.0-beta.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a9f181a6f5f982204ae293c19f37ba90116b8ec0bfd0a08c7a7ba67200cd9e3" +checksum = "18e7f9ba6cf789cd2aa347e08961c43e2e64ba7a3f896b79b8a61af7983a0322" dependencies = [ "cocoa 0.25.0", "gtk", "http", "jni", "percent-encoding", - "raw-window-handle", + "raw-window-handle 0.5.2", + "softbuffer", "tao", "tauri-runtime", "tauri-utils", @@ -6345,12 +6624,13 @@ dependencies = [ [[package]] name = "tauri-utils" -version = "2.0.0-alpha.12" +version = "2.0.0-beta.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4858f99fc9f28b72008ef51d04d18b7e3646845c2bc18ee340045fed6ed5095" +checksum = "3355fb8c96c36e5796add0c0b429fe849340f24ccb757a7a00953ef0333d99e7" dependencies = [ "aes-gcm 0.10.3", "brotli", + "cargo_metadata", "ctor", "dunce", "getrandom 0.2.11", @@ -6365,14 +6645,17 @@ dependencies = [ "phf 0.11.2", "proc-macro2", "quote", + "schemars", "semver", "serde", "serde_json", "serde_with", "serialize-to-javascript", + "swift-rs", "thiserror", + "toml 0.8.8", "url", - "walkdir", + "walkdir 2.4.0", ] [[package]] @@ -6474,7 +6757,7 @@ checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" dependencies = [ "libc", "wasi 0.10.0+wasi-snapshot-preview1", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -6508,6 +6791,18 @@ dependencies = [ "time-core", ] +[[package]] +name = "tiny-xlib" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4098d49269baa034a8d1eae9bd63e9fa532148d772121dace3bcd6a6c98eb6d" +dependencies = [ + "as-raw-xcb-connection", + "ctor", + "libloading 0.8.1", + "tracing", +] + [[package]] name = "tiny_http" version = "0.11.0" @@ -6908,7 +7203,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce65604324d3cce9b966701489fbd0cf318cb1f7bd9dd07ac9a4ee6fb791930d" dependencies = [ "tempfile", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -7095,13 +7390,24 @@ version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3c4517f54858c779bbcbf228f4fca63d121bf85fbecb2dc578cdf4a39395690" +[[package]] +name = "walkdir" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb08f9e670fab86099470b97cd2b252d6527f0b3cc1401acdb595ffc9dd288ff" +dependencies = [ + "kernel32-sys", + "same-file 0.1.3", + "winapi 0.2.8", +] + [[package]] name = "walkdir" version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" dependencies = [ - "same-file", + "same-file 1.0.6", "winapi-util", ] @@ -7211,6 +7517,55 @@ dependencies = [ "web-sys", ] +[[package]] +name = "wayland-backend" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19152ddd73f45f024ed4534d9ca2594e0ef252c1847695255dae47f34df9fbe4" +dependencies = [ + "cc", + "downcast-rs", + "nix 0.26.4", + "scoped-tls", + "smallvec", + "wayland-sys", +] + +[[package]] +name = "wayland-client" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ca7d52347346f5473bf2f56705f360e8440873052e575e55890c4fa57843ed3" +dependencies = [ + "bitflags 2.4.1", + "nix 0.26.4", + "wayland-backend", + "wayland-scanner", +] + +[[package]] +name = "wayland-scanner" +version = "0.31.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb8e28403665c9f9513202b7e1ed71ec56fde5c107816843fb14057910b2c09c" +dependencies = [ + "proc-macro2", + "quick-xml 0.30.0", + "quote", +] + +[[package]] +name = "wayland-sys" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15a0c8eaff5216d07f226cb7a549159267f3467b289d9a2e52fd3ef5aae2b7af" +dependencies = [ + "dlib", + "log", + "once_cell", + "pkg-config", +] + [[package]] name = "web-sys" version = "0.3.65" @@ -7349,6 +7704,12 @@ dependencies = [ "windows-sys 0.36.1", ] +[[package]] +name = "winapi" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" + [[package]] name = "winapi" version = "0.3.9" @@ -7359,6 +7720,12 @@ dependencies = [ "winapi-x86_64-pc-windows-gnu", ] +[[package]] +name = "winapi-build" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" + [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" @@ -7371,7 +7738,7 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" dependencies = [ - "winapi", + "winapi 0.3.9", ] [[package]] @@ -7380,7 +7747,7 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44c17110f57155602a80dca10be03852116403c9ff3cd25b079d666f2aa3df6e" dependencies = [ - "winapi", + "winapi 0.3.9", ] [[package]] @@ -7397,7 +7764,7 @@ checksum = "67ff424735b1ac21293b0492b069394b0a189c8a463fb015a16dea7c2e221c08" dependencies = [ "cocoa 0.25.0", "objc", - "raw-window-handle", + "raw-window-handle 0.5.2", "windows-sys 0.48.0", ] @@ -7409,7 +7776,7 @@ checksum = "af6abc2b9c56bd95887825a1ce56cde49a2a97c07e28db465d541f5098a2656c" dependencies = [ "cocoa 0.25.0", "objc", - "raw-window-handle", + "raw-window-handle 0.5.2", "windows-sys 0.52.0", "windows-version", ] @@ -7763,7 +8130,7 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" dependencies = [ - "winapi", + "winapi 0.3.9", ] [[package]] @@ -7788,13 +8155,13 @@ dependencies = [ [[package]] name = "wry" -version = "0.35.1" +version = "0.35.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2ad1bc1d6925e0cde1bd01830b0073cd0448e21357e843b9ede33b6d81c7423" +checksum = "d3016c47c9b6f7029a9da7cd48af8352327226bba0e955f3c92e2966651365a9" dependencies = [ "base64 0.21.5", "block", - "cfg_aliases", + "cfg_aliases 0.1.1", "cocoa 0.25.0", "core-graphics 0.23.1", "crossbeam-channel", @@ -7814,7 +8181,7 @@ dependencies = [ "objc", "objc_id", "once_cell", - "raw-window-handle", + "raw-window-handle 0.5.2", "serde", "serde_json", "sha2 0.10.8", @@ -7860,9 +8227,24 @@ checksum = "b1641b26d4dec61337c35a1b1aaf9e3cba8f46f0b43636c609ab0291a648040a" dependencies = [ "gethostname 0.3.0", "nix 0.26.4", - "winapi", + "winapi 0.3.9", "winapi-wsapoll", - "x11rb-protocol", + "x11rb-protocol 0.12.0", +] + +[[package]] +name = "x11rb" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8f25ead8c7e4cba123243a6367da5d3990e0d3affa708ea19dce96356bd9f1a" +dependencies = [ + "as-raw-xcb-connection", + "gethostname 0.4.3", + "libc", + "libloading 0.8.1", + "once_cell", + "rustix 0.38.25", + "x11rb-protocol 0.13.0", ] [[package]] @@ -7874,6 +8256,12 @@ dependencies = [ "nix 0.26.4", ] +[[package]] +name = "x11rb-protocol" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e63e71c4b8bd9ffec2c963173a4dc4cbde9ee96961d4fcb4429db9929b606c34" + [[package]] name = "x25519-dalek" version = "1.1.1" @@ -7901,7 +8289,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2769203cd13a0c6015d515be729c526d041e9cf2c0cc478d57faee85f40c6dcd" dependencies = [ "nix 0.26.4", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -7938,7 +8326,7 @@ dependencies = [ "static_assertions", "tracing", "uds_windows", - "winapi", + "winapi 0.3.9", "xdg-home", "zbus_macros", "zbus_names", diff --git a/Cargo.toml b/Cargo.toml index eb8a71801..dec1c253a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,11 +10,13 @@ resolver = "2" [workspace.dependencies] serde = { version = "1", features = ["derive"] } log = "0.4" -tauri = "2.0.0-alpha.20" -tauri-build = "2.0.0-alpha.13" +tauri = "2.0.0-beta.0" +tauri-build = "2.0.0-beta.0" +tauri-plugin = "2.0.0-beta.0" serde_json = "1" thiserror = "1" url = "2" +schemars = "0.8" [workspace.package] edition = "2021" diff --git a/examples/api/package.json b/examples/api/package.json index c426d81be..cdb6e832a 100644 --- a/examples/api/package.json +++ b/examples/api/package.json @@ -9,7 +9,7 @@ "serve": "vite preview" }, "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.13", + "@tauri-apps/api": "2.0.0-beta.0", "@tauri-apps/plugin-barcode-scanner": "2.0.0-alpha.4", "@tauri-apps/plugin-biometric": "2.0.0-alpha.0", "@tauri-apps/plugin-cli": "2.0.0-alpha.5", @@ -30,11 +30,11 @@ "@iconify-json/codicon": "^1.1.37", "@iconify-json/ph": "^1.1.8", "@sveltejs/vite-plugin-svelte": "^3.0.1", - "@tauri-apps/cli": "2.0.0-alpha.20", + "@tauri-apps/cli": "2.0.0-beta.0", "@unocss/extractor-svelte": "^0.58.0", "internal-ip": "^8.0.0", "svelte": "^4.2.8", "unocss": "^0.58.0", - "vite": "^5.0.6" + "vite": "^5.0.12" } } diff --git a/examples/api/src-tauri/build.rs b/examples/api/src-tauri/build.rs index e9f99b296..322bc7bf3 100644 --- a/examples/api/src-tauri/build.rs +++ b/examples/api/src-tauri/build.rs @@ -7,6 +7,7 @@ fn main() { if !cfg!(feature = "custom-protocol") { codegen = codegen.dev(); } - codegen.build(); - tauri_build::build(); + + tauri_build::try_build(tauri_build::Attributes::new().codegen(codegen)) + .expect("failed to run tauri_build::try_build"); } diff --git a/examples/api/src-tauri/capabilities/base.json b/examples/api/src-tauri/capabilities/base.json new file mode 100644 index 000000000..82ca54cd2 --- /dev/null +++ b/examples/api/src-tauri/capabilities/base.json @@ -0,0 +1,78 @@ +{ + "$schema": "schemas/desktop-schema.json", + "identifier": "run-app-base", + "description": "Base permissions to run the app", + "windows": ["main"], + "permissions": [ + "log:default", + { + "identifier": "http:default", + "allow": [ + { + "url": "http://localhost:3003" + } + ] + }, + "app:default", + "resources:default", + "fs:default", + "menu:default", + "path:default", + "tray:default", + "event:default", + "window:default", + "notification:default", + "os:allow-platform", + "dialog:allow-open", + "dialog:allow-save", + "dialog:allow-confirm", + { + "identifier": "shell:allow-execute", + "allow": [ + { + "name": "sh", + "cmd": "sh", + "args": [ + "-c", + { + "validator": "\\S+" + } + ] + }, + { + "name": "cmd", + "cmd": "cmd", + "args": [ + "/C", + { + "validator": "\\S+" + } + ] + } + ] + }, + "shell:allow-kill", + "shell:allow-stdin-write", + "clipboard-manager:allow-read", + "clipboard-manager:allow-write", + "fs:allow-rename", + "fs:allow-mkdir", + "fs:allow-remove", + "fs:allow-write-text-file", + "fs:scope-download-recursive", + "fs:scope-resource-recursive", + { + "identifier": "fs:scope-appdata-recursive", + "allow": [ + { + "path": "$APPDATA/db/**" + } + ], + "deny": [ + { + "path": "$APPDATA/db/*.stronghold" + } + ] + } + ] +} diff --git a/examples/api/src-tauri/capabilities/desktop.json b/examples/api/src-tauri/capabilities/desktop.json new file mode 100644 index 000000000..343e78344 --- /dev/null +++ b/examples/api/src-tauri/capabilities/desktop.json @@ -0,0 +1,14 @@ +{ + "$schema": "./schemas/desktop-schema.json", + "identifier": "run-app-desktop", + "description": "Permissions to run the app (desktop only)", + "windows": ["main"], + "platforms": ["linux", "macOS", "windows"], + "permissions": [ + "cli:default", + "updater:default", + "global-shortcut:allow-unregister", + "global-shortcut:allow-register", + "global-shortcut:allow-unregister-all" + ] +} diff --git a/examples/api/src-tauri/capabilities/mobile.json b/examples/api/src-tauri/capabilities/mobile.json new file mode 100644 index 000000000..a9cbfa87c --- /dev/null +++ b/examples/api/src-tauri/capabilities/mobile.json @@ -0,0 +1,16 @@ +{ + "$schema": "./schemas/mobile-schema.json", + "identifier": "run-app-mobile", + "description": "Permissions to run the app (mobile only)", + "windows": ["main"], + "platforms": ["android", "iOS"], + "permissions": [ + "nfc:allow-write", + "nfc:allow-scan", + "biometric:allow-authenticate", + "barcode-scanner:allow-scan", + "barcode-scanner:allow-cancel", + "barcode-scanner:allow-request-permissions", + "barcode-scanner:allow-check-permissions" + ] +} diff --git a/examples/api/src-tauri/capabilities/schemas/.gitignore b/examples/api/src-tauri/capabilities/schemas/.gitignore new file mode 100644 index 000000000..5a0d26385 --- /dev/null +++ b/examples/api/src-tauri/capabilities/schemas/.gitignore @@ -0,0 +1,3 @@ +*.json +!desktop-schema.json +!mobile-schema.json diff --git a/examples/api/src-tauri/capabilities/schemas/desktop-schema.json b/examples/api/src-tauri/capabilities/schemas/desktop-schema.json new file mode 100644 index 000000000..4f6efb0e6 --- /dev/null +++ b/examples/api/src-tauri/capabilities/schemas/desktop-schema.json @@ -0,0 +1,6897 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "CapabilityFile", + "description": "Capability formats accepted in a capability file.", + "anyOf": [ + { + "description": "A single capability.", + "allOf": [ + { + "$ref": "#/definitions/Capability" + } + ] + }, + { + "description": "A list of capabilities.", + "type": "object", + "required": [ + "capabilities" + ], + "properties": { + "capabilities": { + "description": "The list of capabilities.", + "type": "array", + "items": { + "$ref": "#/definitions/Capability" + } + } + } + } + ], + "definitions": { + "Capability": { + "description": "a grouping and boundary mechanism developers can use to separate windows or plugins functionality from each other at runtime.\n\nIf a window is not matching any capability then it has no access to the IPC layer at all.\n\nThis can be done to create trust groups and reduce impact of vulnerabilities in certain plugins or windows. Windows can be added to a capability by exact name or glob patterns like *, admin-* or main-window.", + "type": "object", + "required": [ + "identifier", + "permissions", + "windows" + ], + "properties": { + "identifier": { + "description": "Identifier of the capability.", + "type": "string" + }, + "description": { + "description": "Description of the capability.", + "default": "", + "type": "string" + }, + "context": { + "description": "Execution context of the capability.\n\nAt runtime, Tauri filters the IPC command together with the context to determine wheter it is allowed or not and its scope.", + "default": "local", + "allOf": [ + { + "$ref": "#/definitions/CapabilityContext" + } + ] + }, + "windows": { + "description": "List of windows that uses this capability. Can be a glob pattern.", + "type": "array", + "items": { + "type": "string" + } + }, + "permissions": { + "description": "List of permissions attached to this capability. Must include the plugin name as prefix in the form of `${plugin-name}:${permission-name}`.", + "type": "array", + "items": { + "$ref": "#/definitions/PermissionEntry" + } + }, + "platforms": { + "description": "Target platforms this capability applies. By default all platforms applies.", + "default": [ + "linux", + "macOS", + "windows", + "android", + "iOS" + ], + "type": "array", + "items": { + "$ref": "#/definitions/Target" + } + } + } + }, + "CapabilityContext": { + "description": "Context of the capability.", + "oneOf": [ + { + "description": "Capability refers to local URL usage.", + "type": "string", + "enum": [ + "local" + ] + }, + { + "description": "Capability refers to remote usage.", + "type": "object", + "required": [ + "remote" + ], + "properties": { + "remote": { + "type": "object", + "required": [ + "domains" + ], + "properties": { + "domains": { + "description": "Remote domains this capability refers to. Can use glob patterns.", + "type": "array", + "items": { + "type": "string" + } + } + } + } + }, + "additionalProperties": false + } + ] + }, + "PermissionEntry": { + "description": "An entry for a permission value in a [`Capability`] can be either a raw permission [`Identifier`] or an object that references a permission and extends its scope.", + "anyOf": [ + { + "description": "Reference a permission or permission set by identifier.", + "allOf": [ + { + "$ref": "#/definitions/Identifier" + } + ] + }, + { + "description": "Reference a permission or permission set by identifier and extends its scope.", + "type": "object", + "oneOf": [ + { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "oneOf": [ + { + "description": "fs:default -> # Tauri `fs` default permissions\n\nThis configuration file defines the default permissions granted\nto the filesystem.\n\n### Granted Permissions\n\nThis default permission set enables all read-related commands and\nallows access to the `$APP` folder and sub directories created in it.\nThe location of the `$APP` folder depends on the operating system,\nwhere the application is run.\n\nIn general the `$APP` folder needs to be manually created\nby the application at runtime, before accessing files or folders\nin it is possible.\n\n### Denied Permissions\n\nThis default permission set prevents access to critical components\nof the Tauri application by default.\nOn Windows the webview data folder access is denied.\n\n", + "type": "string", + "enum": [ + "fs:default" + ] + }, + { + "description": "fs:allow-app-meta -> This allows read access to metadata of the `$APP` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-app-meta" + ] + }, + { + "description": "fs:allow-app-meta-recursive -> This allows read access to metadata of the `$APP` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-app-meta-recursive" + ] + }, + { + "description": "fs:allow-app-read -> This allows non-recursive read access to the `$APP` folder.", + "type": "string", + "enum": [ + "fs:allow-app-read" + ] + }, + { + "description": "fs:allow-app-read-recursive -> This allows full recursive read access to the complete `$APP` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-app-read-recursive" + ] + }, + { + "description": "fs:allow-app-write -> This allows non-recursive write access to the `$APP` folder.", + "type": "string", + "enum": [ + "fs:allow-app-write" + ] + }, + { + "description": "fs:allow-app-write-recursive -> This allows full recusrive write access to the complete `$APP` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-app-write-recursive" + ] + }, + { + "description": "fs:allow-appcache-meta -> This allows read access to metadata of the `$APPCACHE` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-appcache-meta" + ] + }, + { + "description": "fs:allow-appcache-meta-recursive -> This allows read access to metadata of the `$APPCACHE` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-appcache-meta-recursive" + ] + }, + { + "description": "fs:allow-appcache-read -> This allows non-recursive read access to the `$APPCACHE` folder.", + "type": "string", + "enum": [ + "fs:allow-appcache-read" + ] + }, + { + "description": "fs:allow-appcache-read-recursive -> This allows full recursive read access to the complete `$APPCACHE` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-appcache-read-recursive" + ] + }, + { + "description": "fs:allow-appcache-write -> This allows non-recursive write access to the `$APPCACHE` folder.", + "type": "string", + "enum": [ + "fs:allow-appcache-write" + ] + }, + { + "description": "fs:allow-appcache-write-recursive -> This allows full recusrive write access to the complete `$APPCACHE` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-appcache-write-recursive" + ] + }, + { + "description": "fs:allow-appconfig-meta -> This allows read access to metadata of the `$APPCONFIG` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-appconfig-meta" + ] + }, + { + "description": "fs:allow-appconfig-meta-recursive -> This allows read access to metadata of the `$APPCONFIG` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-appconfig-meta-recursive" + ] + }, + { + "description": "fs:allow-appconfig-read -> This allows non-recursive read access to the `$APPCONFIG` folder.", + "type": "string", + "enum": [ + "fs:allow-appconfig-read" + ] + }, + { + "description": "fs:allow-appconfig-read-recursive -> This allows full recursive read access to the complete `$APPCONFIG` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-appconfig-read-recursive" + ] + }, + { + "description": "fs:allow-appconfig-write -> This allows non-recursive write access to the `$APPCONFIG` folder.", + "type": "string", + "enum": [ + "fs:allow-appconfig-write" + ] + }, + { + "description": "fs:allow-appconfig-write-recursive -> This allows full recusrive write access to the complete `$APPCONFIG` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-appconfig-write-recursive" + ] + }, + { + "description": "fs:allow-appdata-meta -> This allows read access to metadata of the `$APPDATA` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-appdata-meta" + ] + }, + { + "description": "fs:allow-appdata-meta-recursive -> This allows read access to metadata of the `$APPDATA` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-appdata-meta-recursive" + ] + }, + { + "description": "fs:allow-appdata-read -> This allows non-recursive read access to the `$APPDATA` folder.", + "type": "string", + "enum": [ + "fs:allow-appdata-read" + ] + }, + { + "description": "fs:allow-appdata-read-recursive -> This allows full recursive read access to the complete `$APPDATA` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-appdata-read-recursive" + ] + }, + { + "description": "fs:allow-appdata-write -> This allows non-recursive write access to the `$APPDATA` folder.", + "type": "string", + "enum": [ + "fs:allow-appdata-write" + ] + }, + { + "description": "fs:allow-appdata-write-recursive -> This allows full recusrive write access to the complete `$APPDATA` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-appdata-write-recursive" + ] + }, + { + "description": "fs:allow-applocaldata-meta -> This allows read access to metadata of the `$APPLOCALDATA` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-applocaldata-meta" + ] + }, + { + "description": "fs:allow-applocaldata-meta-recursive -> This allows read access to metadata of the `$APPLOCALDATA` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-applocaldata-meta-recursive" + ] + }, + { + "description": "fs:allow-applocaldata-read -> This allows non-recursive read access to the `$APPLOCALDATA` folder.", + "type": "string", + "enum": [ + "fs:allow-applocaldata-read" + ] + }, + { + "description": "fs:allow-applocaldata-read-recursive -> This allows full recursive read access to the complete `$APPLOCALDATA` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-applocaldata-read-recursive" + ] + }, + { + "description": "fs:allow-applocaldata-write -> This allows non-recursive write access to the `$APPLOCALDATA` folder.", + "type": "string", + "enum": [ + "fs:allow-applocaldata-write" + ] + }, + { + "description": "fs:allow-applocaldata-write-recursive -> This allows full recusrive write access to the complete `$APPLOCALDATA` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-applocaldata-write-recursive" + ] + }, + { + "description": "fs:allow-applog-meta -> This allows read access to metadata of the `$APPLOG` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-applog-meta" + ] + }, + { + "description": "fs:allow-applog-meta-recursive -> This allows read access to metadata of the `$APPLOG` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-applog-meta-recursive" + ] + }, + { + "description": "fs:allow-applog-read -> This allows non-recursive read access to the `$APPLOG` folder.", + "type": "string", + "enum": [ + "fs:allow-applog-read" + ] + }, + { + "description": "fs:allow-applog-read-recursive -> This allows full recursive read access to the complete `$APPLOG` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-applog-read-recursive" + ] + }, + { + "description": "fs:allow-applog-write -> This allows non-recursive write access to the `$APPLOG` folder.", + "type": "string", + "enum": [ + "fs:allow-applog-write" + ] + }, + { + "description": "fs:allow-applog-write-recursive -> This allows full recusrive write access to the complete `$APPLOG` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-applog-write-recursive" + ] + }, + { + "description": "fs:allow-audio-meta -> This allows read access to metadata of the `$AUDIO` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-audio-meta" + ] + }, + { + "description": "fs:allow-audio-meta-recursive -> This allows read access to metadata of the `$AUDIO` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-audio-meta-recursive" + ] + }, + { + "description": "fs:allow-audio-read -> This allows non-recursive read access to the `$AUDIO` folder.", + "type": "string", + "enum": [ + "fs:allow-audio-read" + ] + }, + { + "description": "fs:allow-audio-read-recursive -> This allows full recursive read access to the complete `$AUDIO` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-audio-read-recursive" + ] + }, + { + "description": "fs:allow-audio-write -> This allows non-recursive write access to the `$AUDIO` folder.", + "type": "string", + "enum": [ + "fs:allow-audio-write" + ] + }, + { + "description": "fs:allow-audio-write-recursive -> This allows full recusrive write access to the complete `$AUDIO` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-audio-write-recursive" + ] + }, + { + "description": "fs:allow-cache-meta -> This allows read access to metadata of the `$CACHE` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-cache-meta" + ] + }, + { + "description": "fs:allow-cache-meta-recursive -> This allows read access to metadata of the `$CACHE` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-cache-meta-recursive" + ] + }, + { + "description": "fs:allow-cache-read -> This allows non-recursive read access to the `$CACHE` folder.", + "type": "string", + "enum": [ + "fs:allow-cache-read" + ] + }, + { + "description": "fs:allow-cache-read-recursive -> This allows full recursive read access to the complete `$CACHE` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-cache-read-recursive" + ] + }, + { + "description": "fs:allow-cache-write -> This allows non-recursive write access to the `$CACHE` folder.", + "type": "string", + "enum": [ + "fs:allow-cache-write" + ] + }, + { + "description": "fs:allow-cache-write-recursive -> This allows full recusrive write access to the complete `$CACHE` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-cache-write-recursive" + ] + }, + { + "description": "fs:allow-config-meta -> This allows read access to metadata of the `$CONFIG` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-config-meta" + ] + }, + { + "description": "fs:allow-config-meta-recursive -> This allows read access to metadata of the `$CONFIG` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-config-meta-recursive" + ] + }, + { + "description": "fs:allow-config-read -> This allows non-recursive read access to the `$CONFIG` folder.", + "type": "string", + "enum": [ + "fs:allow-config-read" + ] + }, + { + "description": "fs:allow-config-read-recursive -> This allows full recursive read access to the complete `$CONFIG` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-config-read-recursive" + ] + }, + { + "description": "fs:allow-config-write -> This allows non-recursive write access to the `$CONFIG` folder.", + "type": "string", + "enum": [ + "fs:allow-config-write" + ] + }, + { + "description": "fs:allow-config-write-recursive -> This allows full recusrive write access to the complete `$CONFIG` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-config-write-recursive" + ] + }, + { + "description": "fs:allow-data-meta -> This allows read access to metadata of the `$DATA` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-data-meta" + ] + }, + { + "description": "fs:allow-data-meta-recursive -> This allows read access to metadata of the `$DATA` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-data-meta-recursive" + ] + }, + { + "description": "fs:allow-data-read -> This allows non-recursive read access to the `$DATA` folder.", + "type": "string", + "enum": [ + "fs:allow-data-read" + ] + }, + { + "description": "fs:allow-data-read-recursive -> This allows full recursive read access to the complete `$DATA` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-data-read-recursive" + ] + }, + { + "description": "fs:allow-data-write -> This allows non-recursive write access to the `$DATA` folder.", + "type": "string", + "enum": [ + "fs:allow-data-write" + ] + }, + { + "description": "fs:allow-data-write-recursive -> This allows full recusrive write access to the complete `$DATA` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-data-write-recursive" + ] + }, + { + "description": "fs:allow-desktop-meta -> This allows read access to metadata of the `$DESKTOP` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-desktop-meta" + ] + }, + { + "description": "fs:allow-desktop-meta-recursive -> This allows read access to metadata of the `$DESKTOP` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-desktop-meta-recursive" + ] + }, + { + "description": "fs:allow-desktop-read -> This allows non-recursive read access to the `$DESKTOP` folder.", + "type": "string", + "enum": [ + "fs:allow-desktop-read" + ] + }, + { + "description": "fs:allow-desktop-read-recursive -> This allows full recursive read access to the complete `$DESKTOP` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-desktop-read-recursive" + ] + }, + { + "description": "fs:allow-desktop-write -> This allows non-recursive write access to the `$DESKTOP` folder.", + "type": "string", + "enum": [ + "fs:allow-desktop-write" + ] + }, + { + "description": "fs:allow-desktop-write-recursive -> This allows full recusrive write access to the complete `$DESKTOP` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-desktop-write-recursive" + ] + }, + { + "description": "fs:allow-document-meta -> This allows read access to metadata of the `$DOCUMENT` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-document-meta" + ] + }, + { + "description": "fs:allow-document-meta-recursive -> This allows read access to metadata of the `$DOCUMENT` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-document-meta-recursive" + ] + }, + { + "description": "fs:allow-document-read -> This allows non-recursive read access to the `$DOCUMENT` folder.", + "type": "string", + "enum": [ + "fs:allow-document-read" + ] + }, + { + "description": "fs:allow-document-read-recursive -> This allows full recursive read access to the complete `$DOCUMENT` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-document-read-recursive" + ] + }, + { + "description": "fs:allow-document-write -> This allows non-recursive write access to the `$DOCUMENT` folder.", + "type": "string", + "enum": [ + "fs:allow-document-write" + ] + }, + { + "description": "fs:allow-document-write-recursive -> This allows full recusrive write access to the complete `$DOCUMENT` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-document-write-recursive" + ] + }, + { + "description": "fs:allow-download-meta -> This allows read access to metadata of the `$DOWNLOAD` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-download-meta" + ] + }, + { + "description": "fs:allow-download-meta-recursive -> This allows read access to metadata of the `$DOWNLOAD` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-download-meta-recursive" + ] + }, + { + "description": "fs:allow-download-read -> This allows non-recursive read access to the `$DOWNLOAD` folder.", + "type": "string", + "enum": [ + "fs:allow-download-read" + ] + }, + { + "description": "fs:allow-download-read-recursive -> This allows full recursive read access to the complete `$DOWNLOAD` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-download-read-recursive" + ] + }, + { + "description": "fs:allow-download-write -> This allows non-recursive write access to the `$DOWNLOAD` folder.", + "type": "string", + "enum": [ + "fs:allow-download-write" + ] + }, + { + "description": "fs:allow-download-write-recursive -> This allows full recusrive write access to the complete `$DOWNLOAD` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-download-write-recursive" + ] + }, + { + "description": "fs:allow-exe-meta -> This allows read access to metadata of the `$EXE` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-exe-meta" + ] + }, + { + "description": "fs:allow-exe-meta-recursive -> This allows read access to metadata of the `$EXE` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-exe-meta-recursive" + ] + }, + { + "description": "fs:allow-exe-read -> This allows non-recursive read access to the `$EXE` folder.", + "type": "string", + "enum": [ + "fs:allow-exe-read" + ] + }, + { + "description": "fs:allow-exe-read-recursive -> This allows full recursive read access to the complete `$EXE` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-exe-read-recursive" + ] + }, + { + "description": "fs:allow-exe-write -> This allows non-recursive write access to the `$EXE` folder.", + "type": "string", + "enum": [ + "fs:allow-exe-write" + ] + }, + { + "description": "fs:allow-exe-write-recursive -> This allows full recusrive write access to the complete `$EXE` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-exe-write-recursive" + ] + }, + { + "description": "fs:allow-font-meta -> This allows read access to metadata of the `$FONT` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-font-meta" + ] + }, + { + "description": "fs:allow-font-meta-recursive -> This allows read access to metadata of the `$FONT` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-font-meta-recursive" + ] + }, + { + "description": "fs:allow-font-read -> This allows non-recursive read access to the `$FONT` folder.", + "type": "string", + "enum": [ + "fs:allow-font-read" + ] + }, + { + "description": "fs:allow-font-read-recursive -> This allows full recursive read access to the complete `$FONT` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-font-read-recursive" + ] + }, + { + "description": "fs:allow-font-write -> This allows non-recursive write access to the `$FONT` folder.", + "type": "string", + "enum": [ + "fs:allow-font-write" + ] + }, + { + "description": "fs:allow-font-write-recursive -> This allows full recusrive write access to the complete `$FONT` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-font-write-recursive" + ] + }, + { + "description": "fs:allow-home-meta -> This allows read access to metadata of the `$HOME` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-home-meta" + ] + }, + { + "description": "fs:allow-home-meta-recursive -> This allows read access to metadata of the `$HOME` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-home-meta-recursive" + ] + }, + { + "description": "fs:allow-home-read -> This allows non-recursive read access to the `$HOME` folder.", + "type": "string", + "enum": [ + "fs:allow-home-read" + ] + }, + { + "description": "fs:allow-home-read-recursive -> This allows full recursive read access to the complete `$HOME` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-home-read-recursive" + ] + }, + { + "description": "fs:allow-home-write -> This allows non-recursive write access to the `$HOME` folder.", + "type": "string", + "enum": [ + "fs:allow-home-write" + ] + }, + { + "description": "fs:allow-home-write-recursive -> This allows full recusrive write access to the complete `$HOME` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-home-write-recursive" + ] + }, + { + "description": "fs:allow-localdata-meta -> This allows read access to metadata of the `$LOCALDATA` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-localdata-meta" + ] + }, + { + "description": "fs:allow-localdata-meta-recursive -> This allows read access to metadata of the `$LOCALDATA` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-localdata-meta-recursive" + ] + }, + { + "description": "fs:allow-localdata-read -> This allows non-recursive read access to the `$LOCALDATA` folder.", + "type": "string", + "enum": [ + "fs:allow-localdata-read" + ] + }, + { + "description": "fs:allow-localdata-read-recursive -> This allows full recursive read access to the complete `$LOCALDATA` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-localdata-read-recursive" + ] + }, + { + "description": "fs:allow-localdata-write -> This allows non-recursive write access to the `$LOCALDATA` folder.", + "type": "string", + "enum": [ + "fs:allow-localdata-write" + ] + }, + { + "description": "fs:allow-localdata-write-recursive -> This allows full recusrive write access to the complete `$LOCALDATA` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-localdata-write-recursive" + ] + }, + { + "description": "fs:allow-log-meta -> This allows read access to metadata of the `$LOG` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-log-meta" + ] + }, + { + "description": "fs:allow-log-meta-recursive -> This allows read access to metadata of the `$LOG` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-log-meta-recursive" + ] + }, + { + "description": "fs:allow-log-read -> This allows non-recursive read access to the `$LOG` folder.", + "type": "string", + "enum": [ + "fs:allow-log-read" + ] + }, + { + "description": "fs:allow-log-read-recursive -> This allows full recursive read access to the complete `$LOG` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-log-read-recursive" + ] + }, + { + "description": "fs:allow-log-write -> This allows non-recursive write access to the `$LOG` folder.", + "type": "string", + "enum": [ + "fs:allow-log-write" + ] + }, + { + "description": "fs:allow-log-write-recursive -> This allows full recusrive write access to the complete `$LOG` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-log-write-recursive" + ] + }, + { + "description": "fs:allow-picture-meta -> This allows read access to metadata of the `$PICTURE` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-picture-meta" + ] + }, + { + "description": "fs:allow-picture-meta-recursive -> This allows read access to metadata of the `$PICTURE` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-picture-meta-recursive" + ] + }, + { + "description": "fs:allow-picture-read -> This allows non-recursive read access to the `$PICTURE` folder.", + "type": "string", + "enum": [ + "fs:allow-picture-read" + ] + }, + { + "description": "fs:allow-picture-read-recursive -> This allows full recursive read access to the complete `$PICTURE` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-picture-read-recursive" + ] + }, + { + "description": "fs:allow-picture-write -> This allows non-recursive write access to the `$PICTURE` folder.", + "type": "string", + "enum": [ + "fs:allow-picture-write" + ] + }, + { + "description": "fs:allow-picture-write-recursive -> This allows full recusrive write access to the complete `$PICTURE` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-picture-write-recursive" + ] + }, + { + "description": "fs:allow-public-meta -> This allows read access to metadata of the `$PUBLIC` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-public-meta" + ] + }, + { + "description": "fs:allow-public-meta-recursive -> This allows read access to metadata of the `$PUBLIC` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-public-meta-recursive" + ] + }, + { + "description": "fs:allow-public-read -> This allows non-recursive read access to the `$PUBLIC` folder.", + "type": "string", + "enum": [ + "fs:allow-public-read" + ] + }, + { + "description": "fs:allow-public-read-recursive -> This allows full recursive read access to the complete `$PUBLIC` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-public-read-recursive" + ] + }, + { + "description": "fs:allow-public-write -> This allows non-recursive write access to the `$PUBLIC` folder.", + "type": "string", + "enum": [ + "fs:allow-public-write" + ] + }, + { + "description": "fs:allow-public-write-recursive -> This allows full recusrive write access to the complete `$PUBLIC` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-public-write-recursive" + ] + }, + { + "description": "fs:allow-resource-meta -> This allows read access to metadata of the `$RESOURCE` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-resource-meta" + ] + }, + { + "description": "fs:allow-resource-meta-recursive -> This allows read access to metadata of the `$RESOURCE` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-resource-meta-recursive" + ] + }, + { + "description": "fs:allow-resource-read -> This allows non-recursive read access to the `$RESOURCE` folder.", + "type": "string", + "enum": [ + "fs:allow-resource-read" + ] + }, + { + "description": "fs:allow-resource-read-recursive -> This allows full recursive read access to the complete `$RESOURCE` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-resource-read-recursive" + ] + }, + { + "description": "fs:allow-resource-write -> This allows non-recursive write access to the `$RESOURCE` folder.", + "type": "string", + "enum": [ + "fs:allow-resource-write" + ] + }, + { + "description": "fs:allow-resource-write-recursive -> This allows full recusrive write access to the complete `$RESOURCE` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-resource-write-recursive" + ] + }, + { + "description": "fs:allow-runtime-meta -> This allows read access to metadata of the `$RUNTIME` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-runtime-meta" + ] + }, + { + "description": "fs:allow-runtime-meta-recursive -> This allows read access to metadata of the `$RUNTIME` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-runtime-meta-recursive" + ] + }, + { + "description": "fs:allow-runtime-read -> This allows non-recursive read access to the `$RUNTIME` folder.", + "type": "string", + "enum": [ + "fs:allow-runtime-read" + ] + }, + { + "description": "fs:allow-runtime-read-recursive -> This allows full recursive read access to the complete `$RUNTIME` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-runtime-read-recursive" + ] + }, + { + "description": "fs:allow-runtime-write -> This allows non-recursive write access to the `$RUNTIME` folder.", + "type": "string", + "enum": [ + "fs:allow-runtime-write" + ] + }, + { + "description": "fs:allow-runtime-write-recursive -> This allows full recusrive write access to the complete `$RUNTIME` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-runtime-write-recursive" + ] + }, + { + "description": "fs:allow-temp-meta -> This allows read access to metadata of the `$TEMP` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-temp-meta" + ] + }, + { + "description": "fs:allow-temp-meta-recursive -> This allows read access to metadata of the `$TEMP` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-temp-meta-recursive" + ] + }, + { + "description": "fs:allow-temp-read -> This allows non-recursive read access to the `$TEMP` folder.", + "type": "string", + "enum": [ + "fs:allow-temp-read" + ] + }, + { + "description": "fs:allow-temp-read-recursive -> This allows full recursive read access to the complete `$TEMP` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-temp-read-recursive" + ] + }, + { + "description": "fs:allow-temp-write -> This allows non-recursive write access to the `$TEMP` folder.", + "type": "string", + "enum": [ + "fs:allow-temp-write" + ] + }, + { + "description": "fs:allow-temp-write-recursive -> This allows full recusrive write access to the complete `$TEMP` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-temp-write-recursive" + ] + }, + { + "description": "fs:allow-template-meta -> This allows read access to metadata of the `$TEMPLATE` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-template-meta" + ] + }, + { + "description": "fs:allow-template-meta-recursive -> This allows read access to metadata of the `$TEMPLATE` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-template-meta-recursive" + ] + }, + { + "description": "fs:allow-template-read -> This allows non-recursive read access to the `$TEMPLATE` folder.", + "type": "string", + "enum": [ + "fs:allow-template-read" + ] + }, + { + "description": "fs:allow-template-read-recursive -> This allows full recursive read access to the complete `$TEMPLATE` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-template-read-recursive" + ] + }, + { + "description": "fs:allow-template-write -> This allows non-recursive write access to the `$TEMPLATE` folder.", + "type": "string", + "enum": [ + "fs:allow-template-write" + ] + }, + { + "description": "fs:allow-template-write-recursive -> This allows full recusrive write access to the complete `$TEMPLATE` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-template-write-recursive" + ] + }, + { + "description": "fs:allow-video-meta -> This allows read access to metadata of the `$VIDEO` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-video-meta" + ] + }, + { + "description": "fs:allow-video-meta-recursive -> This allows read access to metadata of the `$VIDEO` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-video-meta-recursive" + ] + }, + { + "description": "fs:allow-video-read -> This allows non-recursive read access to the `$VIDEO` folder.", + "type": "string", + "enum": [ + "fs:allow-video-read" + ] + }, + { + "description": "fs:allow-video-read-recursive -> This allows full recursive read access to the complete `$VIDEO` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-video-read-recursive" + ] + }, + { + "description": "fs:allow-video-write -> This allows non-recursive write access to the `$VIDEO` folder.", + "type": "string", + "enum": [ + "fs:allow-video-write" + ] + }, + { + "description": "fs:allow-video-write-recursive -> This allows full recusrive write access to the complete `$VIDEO` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-video-write-recursive" + ] + }, + { + "description": "fs:deny-default -> This denies access to dangerous Tauri relevant files and folders by default.", + "type": "string", + "enum": [ + "fs:deny-default" + ] + }, + { + "description": "fs:allow-copy-file -> Enables the copy_file command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-copy-file" + ] + }, + { + "description": "fs:allow-create -> Enables the create command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-create" + ] + }, + { + "description": "fs:allow-exists -> Enables the exists command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-exists" + ] + }, + { + "description": "fs:allow-fstat -> Enables the fstat command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-fstat" + ] + }, + { + "description": "fs:allow-ftruncate -> Enables the ftruncate command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-ftruncate" + ] + }, + { + "description": "fs:allow-lstat -> Enables the lstat command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-lstat" + ] + }, + { + "description": "fs:allow-mkdir -> Enables the mkdir command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-mkdir" + ] + }, + { + "description": "fs:allow-open -> Enables the open command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-open" + ] + }, + { + "description": "fs:allow-read -> Enables the read command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-read" + ] + }, + { + "description": "fs:allow-read-dir -> Enables the read_dir command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-read-dir" + ] + }, + { + "description": "fs:allow-read-file -> Enables the read_file command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-read-file" + ] + }, + { + "description": "fs:allow-read-text-file -> Enables the read_text_file command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-read-text-file" + ] + }, + { + "description": "fs:allow-read-text-file-lines -> Enables the read_text_file_lines command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-read-text-file-lines" + ] + }, + { + "description": "fs:allow-read-text-file-lines-next -> Enables the read_text_file_lines_next command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-read-text-file-lines-next" + ] + }, + { + "description": "fs:allow-remove -> Enables the remove command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-remove" + ] + }, + { + "description": "fs:allow-rename -> Enables the rename command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-rename" + ] + }, + { + "description": "fs:allow-seek -> Enables the seek command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-seek" + ] + }, + { + "description": "fs:allow-stat -> Enables the stat command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-stat" + ] + }, + { + "description": "fs:allow-truncate -> Enables the truncate command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-truncate" + ] + }, + { + "description": "fs:allow-unwatch -> Enables the unwatch command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-unwatch" + ] + }, + { + "description": "fs:allow-watch -> Enables the watch command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-watch" + ] + }, + { + "description": "fs:allow-write -> Enables the write command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-write" + ] + }, + { + "description": "fs:allow-write-file -> Enables the write_file command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-write-file" + ] + }, + { + "description": "fs:allow-write-text-file -> Enables the write_text_file command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-write-text-file" + ] + }, + { + "description": "fs:deny-copy-file -> Denies the copy_file command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-copy-file" + ] + }, + { + "description": "fs:deny-create -> Denies the create command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-create" + ] + }, + { + "description": "fs:deny-exists -> Denies the exists command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-exists" + ] + }, + { + "description": "fs:deny-fstat -> Denies the fstat command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-fstat" + ] + }, + { + "description": "fs:deny-ftruncate -> Denies the ftruncate command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-ftruncate" + ] + }, + { + "description": "fs:deny-lstat -> Denies the lstat command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-lstat" + ] + }, + { + "description": "fs:deny-mkdir -> Denies the mkdir command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-mkdir" + ] + }, + { + "description": "fs:deny-open -> Denies the open command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-open" + ] + }, + { + "description": "fs:deny-read -> Denies the read command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-read" + ] + }, + { + "description": "fs:deny-read-dir -> Denies the read_dir command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-read-dir" + ] + }, + { + "description": "fs:deny-read-file -> Denies the read_file command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-read-file" + ] + }, + { + "description": "fs:deny-read-text-file -> Denies the read_text_file command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-read-text-file" + ] + }, + { + "description": "fs:deny-read-text-file-lines -> Denies the read_text_file_lines command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-read-text-file-lines" + ] + }, + { + "description": "fs:deny-read-text-file-lines-next -> Denies the read_text_file_lines_next command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-read-text-file-lines-next" + ] + }, + { + "description": "fs:deny-remove -> Denies the remove command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-remove" + ] + }, + { + "description": "fs:deny-rename -> Denies the rename command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-rename" + ] + }, + { + "description": "fs:deny-seek -> Denies the seek command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-seek" + ] + }, + { + "description": "fs:deny-stat -> Denies the stat command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-stat" + ] + }, + { + "description": "fs:deny-truncate -> Denies the truncate command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-truncate" + ] + }, + { + "description": "fs:deny-unwatch -> Denies the unwatch command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-unwatch" + ] + }, + { + "description": "fs:deny-watch -> Denies the watch command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-watch" + ] + }, + { + "description": "fs:deny-webview-data-linux -> This denies read access to the\n`$APPLOCALDATA` folder on linux as the webview data and configuration values are stored here.\nAllowing access can lead to sensitive information disclosure and should be well considered.", + "type": "string", + "enum": [ + "fs:deny-webview-data-linux" + ] + }, + { + "description": "fs:deny-webview-data-windows -> This denies read access to the\n`$APPLOCALDATA/EBWebView` folder on windows as the webview data and configuration values are stored here.\nAllowing access can lead to sensitive information disclosure and should be well considered.", + "type": "string", + "enum": [ + "fs:deny-webview-data-windows" + ] + }, + { + "description": "fs:deny-write -> Denies the write command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-write" + ] + }, + { + "description": "fs:deny-write-file -> Denies the write_file command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-write-file" + ] + }, + { + "description": "fs:deny-write-text-file -> Denies the write_text_file command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-write-text-file" + ] + }, + { + "description": "fs:read-all -> This enables all read related commands without any pre-configured accessible paths.", + "type": "string", + "enum": [ + "fs:read-all" + ] + }, + { + "description": "fs:read-dirs -> This enables directory read and file metadata related commands without any pre-configured accessible paths.", + "type": "string", + "enum": [ + "fs:read-dirs" + ] + }, + { + "description": "fs:read-files -> This enables file read related commands without any pre-configured accessible paths.", + "type": "string", + "enum": [ + "fs:read-files" + ] + }, + { + "description": "fs:read-meta -> This enables all index or metadata related commands without any pre-configured accessible paths.", + "type": "string", + "enum": [ + "fs:read-meta" + ] + }, + { + "description": "fs:scope -> An empty permission you can use to modify the global scope.", + "type": "string", + "enum": [ + "fs:scope" + ] + }, + { + "description": "fs:scope-app -> This scope permits access to all files and list content of top level directories in the `$APP`folder.", + "type": "string", + "enum": [ + "fs:scope-app" + ] + }, + { + "description": "fs:scope-app-index -> This scope permits to list all files and folders in the `$APP`folder.", + "type": "string", + "enum": [ + "fs:scope-app-index" + ] + }, + { + "description": "fs:scope-app-recursive -> This scope recursive access to the complete `$APP` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-app-recursive" + ] + }, + { + "description": "fs:scope-appcache -> This scope permits access to all files and list content of top level directories in the `$APPCACHE`folder.", + "type": "string", + "enum": [ + "fs:scope-appcache" + ] + }, + { + "description": "fs:scope-appcache-index -> This scope permits to list all files and folders in the `$APPCACHE`folder.", + "type": "string", + "enum": [ + "fs:scope-appcache-index" + ] + }, + { + "description": "fs:scope-appcache-recursive -> This scope recursive access to the complete `$APPCACHE` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-appcache-recursive" + ] + }, + { + "description": "fs:scope-appconfig -> This scope permits access to all files and list content of top level directories in the `$APPCONFIG`folder.", + "type": "string", + "enum": [ + "fs:scope-appconfig" + ] + }, + { + "description": "fs:scope-appconfig-index -> This scope permits to list all files and folders in the `$APPCONFIG`folder.", + "type": "string", + "enum": [ + "fs:scope-appconfig-index" + ] + }, + { + "description": "fs:scope-appconfig-recursive -> This scope recursive access to the complete `$APPCONFIG` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-appconfig-recursive" + ] + }, + { + "description": "fs:scope-appdata -> This scope permits access to all files and list content of top level directories in the `$APPDATA`folder.", + "type": "string", + "enum": [ + "fs:scope-appdata" + ] + }, + { + "description": "fs:scope-appdata-index -> This scope permits to list all files and folders in the `$APPDATA`folder.", + "type": "string", + "enum": [ + "fs:scope-appdata-index" + ] + }, + { + "description": "fs:scope-appdata-recursive -> This scope recursive access to the complete `$APPDATA` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-appdata-recursive" + ] + }, + { + "description": "fs:scope-applocaldata -> This scope permits access to all files and list content of top level directories in the `$APPLOCALDATA`folder.", + "type": "string", + "enum": [ + "fs:scope-applocaldata" + ] + }, + { + "description": "fs:scope-applocaldata-index -> This scope permits to list all files and folders in the `$APPLOCALDATA`folder.", + "type": "string", + "enum": [ + "fs:scope-applocaldata-index" + ] + }, + { + "description": "fs:scope-applocaldata-recursive -> This scope recursive access to the complete `$APPLOCALDATA` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-applocaldata-recursive" + ] + }, + { + "description": "fs:scope-applog -> This scope permits access to all files and list content of top level directories in the `$APPLOG`folder.", + "type": "string", + "enum": [ + "fs:scope-applog" + ] + }, + { + "description": "fs:scope-applog-index -> This scope permits to list all files and folders in the `$APPLOG`folder.", + "type": "string", + "enum": [ + "fs:scope-applog-index" + ] + }, + { + "description": "fs:scope-applog-recursive -> This scope recursive access to the complete `$APPLOG` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-applog-recursive" + ] + }, + { + "description": "fs:scope-audio -> This scope permits access to all files and list content of top level directories in the `$AUDIO`folder.", + "type": "string", + "enum": [ + "fs:scope-audio" + ] + }, + { + "description": "fs:scope-audio-index -> This scope permits to list all files and folders in the `$AUDIO`folder.", + "type": "string", + "enum": [ + "fs:scope-audio-index" + ] + }, + { + "description": "fs:scope-audio-recursive -> This scope recursive access to the complete `$AUDIO` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-audio-recursive" + ] + }, + { + "description": "fs:scope-cache -> This scope permits access to all files and list content of top level directories in the `$CACHE`folder.", + "type": "string", + "enum": [ + "fs:scope-cache" + ] + }, + { + "description": "fs:scope-cache-index -> This scope permits to list all files and folders in the `$CACHE`folder.", + "type": "string", + "enum": [ + "fs:scope-cache-index" + ] + }, + { + "description": "fs:scope-cache-recursive -> This scope recursive access to the complete `$CACHE` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-cache-recursive" + ] + }, + { + "description": "fs:scope-config -> This scope permits access to all files and list content of top level directories in the `$CONFIG`folder.", + "type": "string", + "enum": [ + "fs:scope-config" + ] + }, + { + "description": "fs:scope-config-index -> This scope permits to list all files and folders in the `$CONFIG`folder.", + "type": "string", + "enum": [ + "fs:scope-config-index" + ] + }, + { + "description": "fs:scope-config-recursive -> This scope recursive access to the complete `$CONFIG` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-config-recursive" + ] + }, + { + "description": "fs:scope-data -> This scope permits access to all files and list content of top level directories in the `$DATA`folder.", + "type": "string", + "enum": [ + "fs:scope-data" + ] + }, + { + "description": "fs:scope-data-index -> This scope permits to list all files and folders in the `$DATA`folder.", + "type": "string", + "enum": [ + "fs:scope-data-index" + ] + }, + { + "description": "fs:scope-data-recursive -> This scope recursive access to the complete `$DATA` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-data-recursive" + ] + }, + { + "description": "fs:scope-desktop -> This scope permits access to all files and list content of top level directories in the `$DESKTOP`folder.", + "type": "string", + "enum": [ + "fs:scope-desktop" + ] + }, + { + "description": "fs:scope-desktop-index -> This scope permits to list all files and folders in the `$DESKTOP`folder.", + "type": "string", + "enum": [ + "fs:scope-desktop-index" + ] + }, + { + "description": "fs:scope-desktop-recursive -> This scope recursive access to the complete `$DESKTOP` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-desktop-recursive" + ] + }, + { + "description": "fs:scope-document -> This scope permits access to all files and list content of top level directories in the `$DOCUMENT`folder.", + "type": "string", + "enum": [ + "fs:scope-document" + ] + }, + { + "description": "fs:scope-document-index -> This scope permits to list all files and folders in the `$DOCUMENT`folder.", + "type": "string", + "enum": [ + "fs:scope-document-index" + ] + }, + { + "description": "fs:scope-document-recursive -> This scope recursive access to the complete `$DOCUMENT` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-document-recursive" + ] + }, + { + "description": "fs:scope-download -> This scope permits access to all files and list content of top level directories in the `$DOWNLOAD`folder.", + "type": "string", + "enum": [ + "fs:scope-download" + ] + }, + { + "description": "fs:scope-download-index -> This scope permits to list all files and folders in the `$DOWNLOAD`folder.", + "type": "string", + "enum": [ + "fs:scope-download-index" + ] + }, + { + "description": "fs:scope-download-recursive -> This scope recursive access to the complete `$DOWNLOAD` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-download-recursive" + ] + }, + { + "description": "fs:scope-exe -> This scope permits access to all files and list content of top level directories in the `$EXE`folder.", + "type": "string", + "enum": [ + "fs:scope-exe" + ] + }, + { + "description": "fs:scope-exe-index -> This scope permits to list all files and folders in the `$EXE`folder.", + "type": "string", + "enum": [ + "fs:scope-exe-index" + ] + }, + { + "description": "fs:scope-exe-recursive -> This scope recursive access to the complete `$EXE` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-exe-recursive" + ] + }, + { + "description": "fs:scope-font -> This scope permits access to all files and list content of top level directories in the `$FONT`folder.", + "type": "string", + "enum": [ + "fs:scope-font" + ] + }, + { + "description": "fs:scope-font-index -> This scope permits to list all files and folders in the `$FONT`folder.", + "type": "string", + "enum": [ + "fs:scope-font-index" + ] + }, + { + "description": "fs:scope-font-recursive -> This scope recursive access to the complete `$FONT` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-font-recursive" + ] + }, + { + "description": "fs:scope-home -> This scope permits access to all files and list content of top level directories in the `$HOME`folder.", + "type": "string", + "enum": [ + "fs:scope-home" + ] + }, + { + "description": "fs:scope-home-index -> This scope permits to list all files and folders in the `$HOME`folder.", + "type": "string", + "enum": [ + "fs:scope-home-index" + ] + }, + { + "description": "fs:scope-home-recursive -> This scope recursive access to the complete `$HOME` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-home-recursive" + ] + }, + { + "description": "fs:scope-localdata -> This scope permits access to all files and list content of top level directories in the `$LOCALDATA`folder.", + "type": "string", + "enum": [ + "fs:scope-localdata" + ] + }, + { + "description": "fs:scope-localdata-index -> This scope permits to list all files and folders in the `$LOCALDATA`folder.", + "type": "string", + "enum": [ + "fs:scope-localdata-index" + ] + }, + { + "description": "fs:scope-localdata-recursive -> This scope recursive access to the complete `$LOCALDATA` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-localdata-recursive" + ] + }, + { + "description": "fs:scope-log -> This scope permits access to all files and list content of top level directories in the `$LOG`folder.", + "type": "string", + "enum": [ + "fs:scope-log" + ] + }, + { + "description": "fs:scope-log-index -> This scope permits to list all files and folders in the `$LOG`folder.", + "type": "string", + "enum": [ + "fs:scope-log-index" + ] + }, + { + "description": "fs:scope-log-recursive -> This scope recursive access to the complete `$LOG` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-log-recursive" + ] + }, + { + "description": "fs:scope-picture -> This scope permits access to all files and list content of top level directories in the `$PICTURE`folder.", + "type": "string", + "enum": [ + "fs:scope-picture" + ] + }, + { + "description": "fs:scope-picture-index -> This scope permits to list all files and folders in the `$PICTURE`folder.", + "type": "string", + "enum": [ + "fs:scope-picture-index" + ] + }, + { + "description": "fs:scope-picture-recursive -> This scope recursive access to the complete `$PICTURE` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-picture-recursive" + ] + }, + { + "description": "fs:scope-public -> This scope permits access to all files and list content of top level directories in the `$PUBLIC`folder.", + "type": "string", + "enum": [ + "fs:scope-public" + ] + }, + { + "description": "fs:scope-public-index -> This scope permits to list all files and folders in the `$PUBLIC`folder.", + "type": "string", + "enum": [ + "fs:scope-public-index" + ] + }, + { + "description": "fs:scope-public-recursive -> This scope recursive access to the complete `$PUBLIC` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-public-recursive" + ] + }, + { + "description": "fs:scope-resource -> This scope permits access to all files and list content of top level directories in the `$RESOURCE`folder.", + "type": "string", + "enum": [ + "fs:scope-resource" + ] + }, + { + "description": "fs:scope-resource-index -> This scope permits to list all files and folders in the `$RESOURCE`folder.", + "type": "string", + "enum": [ + "fs:scope-resource-index" + ] + }, + { + "description": "fs:scope-resource-recursive -> This scope recursive access to the complete `$RESOURCE` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-resource-recursive" + ] + }, + { + "description": "fs:scope-runtime -> This scope permits access to all files and list content of top level directories in the `$RUNTIME`folder.", + "type": "string", + "enum": [ + "fs:scope-runtime" + ] + }, + { + "description": "fs:scope-runtime-index -> This scope permits to list all files and folders in the `$RUNTIME`folder.", + "type": "string", + "enum": [ + "fs:scope-runtime-index" + ] + }, + { + "description": "fs:scope-runtime-recursive -> This scope recursive access to the complete `$RUNTIME` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-runtime-recursive" + ] + }, + { + "description": "fs:scope-temp -> This scope permits access to all files and list content of top level directories in the `$TEMP`folder.", + "type": "string", + "enum": [ + "fs:scope-temp" + ] + }, + { + "description": "fs:scope-temp-index -> This scope permits to list all files and folders in the `$TEMP`folder.", + "type": "string", + "enum": [ + "fs:scope-temp-index" + ] + }, + { + "description": "fs:scope-temp-recursive -> This scope recursive access to the complete `$TEMP` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-temp-recursive" + ] + }, + { + "description": "fs:scope-template -> This scope permits access to all files and list content of top level directories in the `$TEMPLATE`folder.", + "type": "string", + "enum": [ + "fs:scope-template" + ] + }, + { + "description": "fs:scope-template-index -> This scope permits to list all files and folders in the `$TEMPLATE`folder.", + "type": "string", + "enum": [ + "fs:scope-template-index" + ] + }, + { + "description": "fs:scope-template-recursive -> This scope recursive access to the complete `$TEMPLATE` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-template-recursive" + ] + }, + { + "description": "fs:scope-video -> This scope permits access to all files and list content of top level directories in the `$VIDEO`folder.", + "type": "string", + "enum": [ + "fs:scope-video" + ] + }, + { + "description": "fs:scope-video-index -> This scope permits to list all files and folders in the `$VIDEO`folder.", + "type": "string", + "enum": [ + "fs:scope-video-index" + ] + }, + { + "description": "fs:scope-video-recursive -> This scope recursive access to the complete `$VIDEO` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-video-recursive" + ] + }, + { + "description": "fs:write-all -> This enables all write related commands without any pre-configured accessible paths.", + "type": "string", + "enum": [ + "fs:write-all" + ] + }, + { + "description": "fs:write-files -> This enables all file write related commands without any pre-configured accessible paths.", + "type": "string", + "enum": [ + "fs:write-files" + ] + } + ] + }, + "allow": { + "items": { + "title": "Entry", + "type": "object", + "required": [ + "path" + ], + "properties": { + "path": { + "type": "string" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#" + } + }, + "deny": { + "items": { + "title": "Entry", + "type": "object", + "required": [ + "path" + ], + "properties": { + "path": { + "type": "string" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#" + } + } + } + }, + { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "oneOf": [ + { + "description": "http:default -> Allows all fetch operations", + "type": "string", + "enum": [ + "http:default" + ] + }, + { + "description": "http:allow-fetch -> Enables the fetch command without any pre-configured scope.", + "type": "string", + "enum": [ + "http:allow-fetch" + ] + }, + { + "description": "http:allow-fetch-cancel -> Enables the fetch_cancel command without any pre-configured scope.", + "type": "string", + "enum": [ + "http:allow-fetch-cancel" + ] + }, + { + "description": "http:allow-fetch-read-body -> Enables the fetch_read_body command without any pre-configured scope.", + "type": "string", + "enum": [ + "http:allow-fetch-read-body" + ] + }, + { + "description": "http:allow-fetch-send -> Enables the fetch_send command without any pre-configured scope.", + "type": "string", + "enum": [ + "http:allow-fetch-send" + ] + }, + { + "description": "http:deny-fetch -> Denies the fetch command without any pre-configured scope.", + "type": "string", + "enum": [ + "http:deny-fetch" + ] + }, + { + "description": "http:deny-fetch-cancel -> Denies the fetch_cancel command without any pre-configured scope.", + "type": "string", + "enum": [ + "http:deny-fetch-cancel" + ] + }, + { + "description": "http:deny-fetch-read-body -> Denies the fetch_read_body command without any pre-configured scope.", + "type": "string", + "enum": [ + "http:deny-fetch-read-body" + ] + }, + { + "description": "http:deny-fetch-send -> Denies the fetch_send command without any pre-configured scope.", + "type": "string", + "enum": [ + "http:deny-fetch-send" + ] + } + ] + }, + "allow": { + "items": { + "title": "ScopeEntry", + "description": "HTTP scope entry object definition.", + "type": "object", + "required": [ + "url" + ], + "properties": { + "url": { + "description": "A URL that can be accessed by the webview when using the HTTP APIs. The scoped URL is matched against the request URL using a glob pattern.\n\nExamples:\n\n- \"https://*\" or \"https://**\" : allows all HTTPS urls\n\n- \"https://*.github.com/tauri-apps/tauri\": allows any subdomain of \"github.com\" with the \"tauri-apps/api\" path\n\n- \"https://myapi.service.com/users/*\": allows access to any URLs that begins with \"https://myapi.service.com/users/\"", + "type": "string" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#" + } + }, + "deny": { + "items": { + "title": "ScopeEntry", + "description": "HTTP scope entry object definition.", + "type": "object", + "required": [ + "url" + ], + "properties": { + "url": { + "description": "A URL that can be accessed by the webview when using the HTTP APIs. The scoped URL is matched against the request URL using a glob pattern.\n\nExamples:\n\n- \"https://*\" or \"https://**\" : allows all HTTPS urls\n\n- \"https://*.github.com/tauri-apps/tauri\": allows any subdomain of \"github.com\" with the \"tauri-apps/api\" path\n\n- \"https://myapi.service.com/users/*\": allows access to any URLs that begins with \"https://myapi.service.com/users/\"", + "type": "string" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#" + } + } + } + }, + { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "oneOf": [ + { + "description": "shell:allow-execute -> Enables the execute command without any pre-configured scope.", + "type": "string", + "enum": [ + "shell:allow-execute" + ] + }, + { + "description": "shell:allow-kill -> Enables the kill command without any pre-configured scope.", + "type": "string", + "enum": [ + "shell:allow-kill" + ] + }, + { + "description": "shell:allow-open -> Enables the open command without any pre-configured scope.", + "type": "string", + "enum": [ + "shell:allow-open" + ] + }, + { + "description": "shell:allow-stdin-write -> Enables the stdin_write command without any pre-configured scope.", + "type": "string", + "enum": [ + "shell:allow-stdin-write" + ] + }, + { + "description": "shell:deny-execute -> Denies the execute command without any pre-configured scope.", + "type": "string", + "enum": [ + "shell:deny-execute" + ] + }, + { + "description": "shell:deny-kill -> Denies the kill command without any pre-configured scope.", + "type": "string", + "enum": [ + "shell:deny-kill" + ] + }, + { + "description": "shell:deny-open -> Denies the open command without any pre-configured scope.", + "type": "string", + "enum": [ + "shell:deny-open" + ] + }, + { + "description": "shell:deny-stdin-write -> Denies the stdin_write command without any pre-configured scope.", + "type": "string", + "enum": [ + "shell:deny-stdin-write" + ] + } + ] + }, + "allow": { + "items": { + "title": "Entry", + "description": "A command allowed to be executed by the webview API.", + "type": "object", + "required": [ + "args", + "command", + "name", + "sidecar" + ], + "properties": { + "args": { + "description": "The allowed arguments for the command execution.", + "allOf": [ + { + "$ref": "#/definitions/ShellAllowedArgs" + } + ] + }, + "command": { + "description": "The command name. It can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.", + "type": "string" + }, + "name": { + "description": "The name for this allowed shell command configuration.\n\nThis name will be used inside of the webview API to call this command along with any specified arguments.", + "type": "string" + }, + "sidecar": { + "description": "If this command is a sidecar command.", + "type": "boolean" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "definitions": { + "ShellAllowedArg": { + "anyOf": [ + { + "description": "A non-configurable argument that is passed to the command in the order it was specified.", + "type": "string" + }, + { + "additionalProperties": false, + "description": "A variable that is set while calling the command from the webview API.", + "properties": { + "validator": { + "description": "[regex] validator to require passed values to conform to an expected input.\n\nThis will require the argument value passed to this variable to match the `validator` regex before it will be executed.\n\n[regex]: https://docs.rs/regex/latest/regex/#syntax", + "type": "string" + } + }, + "required": [ + "validator" + ], + "type": "object" + } + ], + "description": "A command argument allowed to be executed by the webview API." + }, + "ShellAllowedArgs": { + "anyOf": [ + { + "description": "Use a simple boolean to allow all or disable all arguments to this command configuration.", + "type": "boolean" + }, + { + "description": "A specific set of [`ShellAllowedArg`] that are valid to call for the command configuration.", + "items": { + "$ref": "#/definitions/ShellAllowedArg" + }, + "type": "array" + } + ], + "description": "A set of command arguments allowed to be executed by the webview API.\n\nA value of `true` will allow any arguments to be passed to the command. `false` will disable all arguments. A list of [`ShellAllowedArg`] will set those arguments as the only valid arguments to be passed to the attached command configuration." + } + } + } + }, + "deny": { + "items": { + "title": "Entry", + "description": "A command allowed to be executed by the webview API.", + "type": "object", + "required": [ + "args", + "command", + "name", + "sidecar" + ], + "properties": { + "args": { + "description": "The allowed arguments for the command execution.", + "allOf": [ + { + "$ref": "#/definitions/ShellAllowedArgs" + } + ] + }, + "command": { + "description": "The command name. It can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.", + "type": "string" + }, + "name": { + "description": "The name for this allowed shell command configuration.\n\nThis name will be used inside of the webview API to call this command along with any specified arguments.", + "type": "string" + }, + "sidecar": { + "description": "If this command is a sidecar command.", + "type": "boolean" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "definitions": { + "ShellAllowedArg": { + "anyOf": [ + { + "description": "A non-configurable argument that is passed to the command in the order it was specified.", + "type": "string" + }, + { + "additionalProperties": false, + "description": "A variable that is set while calling the command from the webview API.", + "properties": { + "validator": { + "description": "[regex] validator to require passed values to conform to an expected input.\n\nThis will require the argument value passed to this variable to match the `validator` regex before it will be executed.\n\n[regex]: https://docs.rs/regex/latest/regex/#syntax", + "type": "string" + } + }, + "required": [ + "validator" + ], + "type": "object" + } + ], + "description": "A command argument allowed to be executed by the webview API." + }, + "ShellAllowedArgs": { + "anyOf": [ + { + "description": "Use a simple boolean to allow all or disable all arguments to this command configuration.", + "type": "boolean" + }, + { + "description": "A specific set of [`ShellAllowedArg`] that are valid to call for the command configuration.", + "items": { + "$ref": "#/definitions/ShellAllowedArg" + }, + "type": "array" + } + ], + "description": "A set of command arguments allowed to be executed by the webview API.\n\nA value of `true` will allow any arguments to be passed to the command. `false` will disable all arguments. A list of [`ShellAllowedArg`] will set those arguments as the only valid arguments to be passed to the attached command configuration." + } + } + } + } + } + } + ] + } + ] + }, + "Identifier": { + "description": "Permission identifier", + "oneOf": [ + { + "description": "app:default -> Default permissions for the plugin.", + "type": "string", + "enum": [ + "app:default" + ] + }, + { + "description": "app:allow-app-hide -> Enables the app_hide command without any pre-configured scope.", + "type": "string", + "enum": [ + "app:allow-app-hide" + ] + }, + { + "description": "app:allow-app-show -> Enables the app_show command without any pre-configured scope.", + "type": "string", + "enum": [ + "app:allow-app-show" + ] + }, + { + "description": "app:allow-name -> Enables the name command without any pre-configured scope.", + "type": "string", + "enum": [ + "app:allow-name" + ] + }, + { + "description": "app:allow-tauri-version -> Enables the tauri_version command without any pre-configured scope.", + "type": "string", + "enum": [ + "app:allow-tauri-version" + ] + }, + { + "description": "app:allow-version -> Enables the version command without any pre-configured scope.", + "type": "string", + "enum": [ + "app:allow-version" + ] + }, + { + "description": "app:deny-app-hide -> Denies the app_hide command without any pre-configured scope.", + "type": "string", + "enum": [ + "app:deny-app-hide" + ] + }, + { + "description": "app:deny-app-show -> Denies the app_show command without any pre-configured scope.", + "type": "string", + "enum": [ + "app:deny-app-show" + ] + }, + { + "description": "app:deny-name -> Denies the name command without any pre-configured scope.", + "type": "string", + "enum": [ + "app:deny-name" + ] + }, + { + "description": "app:deny-tauri-version -> Denies the tauri_version command without any pre-configured scope.", + "type": "string", + "enum": [ + "app:deny-tauri-version" + ] + }, + { + "description": "app:deny-version -> Denies the version command without any pre-configured scope.", + "type": "string", + "enum": [ + "app:deny-version" + ] + }, + { + "description": "cli:default -> Allows reading the CLI matches", + "type": "string", + "enum": [ + "cli:default" + ] + }, + { + "description": "cli:allow-cli-matches -> Enables the cli_matches command without any pre-configured scope.", + "type": "string", + "enum": [ + "cli:allow-cli-matches" + ] + }, + { + "description": "cli:deny-cli-matches -> Denies the cli_matches command without any pre-configured scope.", + "type": "string", + "enum": [ + "cli:deny-cli-matches" + ] + }, + { + "description": "clipboard-manager:allow-read -> Enables the read command without any pre-configured scope.", + "type": "string", + "enum": [ + "clipboard-manager:allow-read" + ] + }, + { + "description": "clipboard-manager:allow-write -> Enables the write command without any pre-configured scope.", + "type": "string", + "enum": [ + "clipboard-manager:allow-write" + ] + }, + { + "description": "clipboard-manager:deny-read -> Denies the read command without any pre-configured scope.", + "type": "string", + "enum": [ + "clipboard-manager:deny-read" + ] + }, + { + "description": "clipboard-manager:deny-write -> Denies the write command without any pre-configured scope.", + "type": "string", + "enum": [ + "clipboard-manager:deny-write" + ] + }, + { + "description": "dialog:allow-ask -> Enables the ask command without any pre-configured scope.", + "type": "string", + "enum": [ + "dialog:allow-ask" + ] + }, + { + "description": "dialog:allow-confirm -> Enables the confirm command without any pre-configured scope.", + "type": "string", + "enum": [ + "dialog:allow-confirm" + ] + }, + { + "description": "dialog:allow-message -> Enables the message command without any pre-configured scope.", + "type": "string", + "enum": [ + "dialog:allow-message" + ] + }, + { + "description": "dialog:allow-open -> Enables the open command without any pre-configured scope.", + "type": "string", + "enum": [ + "dialog:allow-open" + ] + }, + { + "description": "dialog:allow-save -> Enables the save command without any pre-configured scope.", + "type": "string", + "enum": [ + "dialog:allow-save" + ] + }, + { + "description": "dialog:deny-ask -> Denies the ask command without any pre-configured scope.", + "type": "string", + "enum": [ + "dialog:deny-ask" + ] + }, + { + "description": "dialog:deny-confirm -> Denies the confirm command without any pre-configured scope.", + "type": "string", + "enum": [ + "dialog:deny-confirm" + ] + }, + { + "description": "dialog:deny-message -> Denies the message command without any pre-configured scope.", + "type": "string", + "enum": [ + "dialog:deny-message" + ] + }, + { + "description": "dialog:deny-open -> Denies the open command without any pre-configured scope.", + "type": "string", + "enum": [ + "dialog:deny-open" + ] + }, + { + "description": "dialog:deny-save -> Denies the save command without any pre-configured scope.", + "type": "string", + "enum": [ + "dialog:deny-save" + ] + }, + { + "description": "event:default -> Default permissions for the plugin.", + "type": "string", + "enum": [ + "event:default" + ] + }, + { + "description": "event:allow-emit -> Enables the emit command without any pre-configured scope.", + "type": "string", + "enum": [ + "event:allow-emit" + ] + }, + { + "description": "event:allow-emit-to -> Enables the emit_to command without any pre-configured scope.", + "type": "string", + "enum": [ + "event:allow-emit-to" + ] + }, + { + "description": "event:allow-listen -> Enables the listen command without any pre-configured scope.", + "type": "string", + "enum": [ + "event:allow-listen" + ] + }, + { + "description": "event:allow-unlisten -> Enables the unlisten command without any pre-configured scope.", + "type": "string", + "enum": [ + "event:allow-unlisten" + ] + }, + { + "description": "event:deny-emit -> Denies the emit command without any pre-configured scope.", + "type": "string", + "enum": [ + "event:deny-emit" + ] + }, + { + "description": "event:deny-emit-to -> Denies the emit_to command without any pre-configured scope.", + "type": "string", + "enum": [ + "event:deny-emit-to" + ] + }, + { + "description": "event:deny-listen -> Denies the listen command without any pre-configured scope.", + "type": "string", + "enum": [ + "event:deny-listen" + ] + }, + { + "description": "event:deny-unlisten -> Denies the unlisten command without any pre-configured scope.", + "type": "string", + "enum": [ + "event:deny-unlisten" + ] + }, + { + "description": "fs:allow-app-meta -> This allows read access to metadata of the `$APP` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-app-meta" + ] + }, + { + "description": "fs:allow-app-meta-recursive -> This allows read access to metadata of the `$APP` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-app-meta-recursive" + ] + }, + { + "description": "fs:allow-app-read -> This allows non-recursive read access to the `$APP` folder.", + "type": "string", + "enum": [ + "fs:allow-app-read" + ] + }, + { + "description": "fs:allow-app-read-recursive -> This allows full recursive read access to the complete `$APP` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-app-read-recursive" + ] + }, + { + "description": "fs:allow-app-write -> This allows non-recursive write access to the `$APP` folder.", + "type": "string", + "enum": [ + "fs:allow-app-write" + ] + }, + { + "description": "fs:allow-app-write-recursive -> This allows full recusrive write access to the complete `$APP` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-app-write-recursive" + ] + }, + { + "description": "fs:allow-appcache-meta -> This allows read access to metadata of the `$APPCACHE` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-appcache-meta" + ] + }, + { + "description": "fs:allow-appcache-meta-recursive -> This allows read access to metadata of the `$APPCACHE` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-appcache-meta-recursive" + ] + }, + { + "description": "fs:allow-appcache-read -> This allows non-recursive read access to the `$APPCACHE` folder.", + "type": "string", + "enum": [ + "fs:allow-appcache-read" + ] + }, + { + "description": "fs:allow-appcache-read-recursive -> This allows full recursive read access to the complete `$APPCACHE` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-appcache-read-recursive" + ] + }, + { + "description": "fs:allow-appcache-write -> This allows non-recursive write access to the `$APPCACHE` folder.", + "type": "string", + "enum": [ + "fs:allow-appcache-write" + ] + }, + { + "description": "fs:allow-appcache-write-recursive -> This allows full recusrive write access to the complete `$APPCACHE` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-appcache-write-recursive" + ] + }, + { + "description": "fs:allow-appconfig-meta -> This allows read access to metadata of the `$APPCONFIG` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-appconfig-meta" + ] + }, + { + "description": "fs:allow-appconfig-meta-recursive -> This allows read access to metadata of the `$APPCONFIG` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-appconfig-meta-recursive" + ] + }, + { + "description": "fs:allow-appconfig-read -> This allows non-recursive read access to the `$APPCONFIG` folder.", + "type": "string", + "enum": [ + "fs:allow-appconfig-read" + ] + }, + { + "description": "fs:allow-appconfig-read-recursive -> This allows full recursive read access to the complete `$APPCONFIG` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-appconfig-read-recursive" + ] + }, + { + "description": "fs:allow-appconfig-write -> This allows non-recursive write access to the `$APPCONFIG` folder.", + "type": "string", + "enum": [ + "fs:allow-appconfig-write" + ] + }, + { + "description": "fs:allow-appconfig-write-recursive -> This allows full recusrive write access to the complete `$APPCONFIG` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-appconfig-write-recursive" + ] + }, + { + "description": "fs:allow-appdata-meta -> This allows read access to metadata of the `$APPDATA` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-appdata-meta" + ] + }, + { + "description": "fs:allow-appdata-meta-recursive -> This allows read access to metadata of the `$APPDATA` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-appdata-meta-recursive" + ] + }, + { + "description": "fs:allow-appdata-read -> This allows non-recursive read access to the `$APPDATA` folder.", + "type": "string", + "enum": [ + "fs:allow-appdata-read" + ] + }, + { + "description": "fs:allow-appdata-read-recursive -> This allows full recursive read access to the complete `$APPDATA` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-appdata-read-recursive" + ] + }, + { + "description": "fs:allow-appdata-write -> This allows non-recursive write access to the `$APPDATA` folder.", + "type": "string", + "enum": [ + "fs:allow-appdata-write" + ] + }, + { + "description": "fs:allow-appdata-write-recursive -> This allows full recusrive write access to the complete `$APPDATA` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-appdata-write-recursive" + ] + }, + { + "description": "fs:allow-applocaldata-meta -> This allows read access to metadata of the `$APPLOCALDATA` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-applocaldata-meta" + ] + }, + { + "description": "fs:allow-applocaldata-meta-recursive -> This allows read access to metadata of the `$APPLOCALDATA` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-applocaldata-meta-recursive" + ] + }, + { + "description": "fs:allow-applocaldata-read -> This allows non-recursive read access to the `$APPLOCALDATA` folder.", + "type": "string", + "enum": [ + "fs:allow-applocaldata-read" + ] + }, + { + "description": "fs:allow-applocaldata-read-recursive -> This allows full recursive read access to the complete `$APPLOCALDATA` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-applocaldata-read-recursive" + ] + }, + { + "description": "fs:allow-applocaldata-write -> This allows non-recursive write access to the `$APPLOCALDATA` folder.", + "type": "string", + "enum": [ + "fs:allow-applocaldata-write" + ] + }, + { + "description": "fs:allow-applocaldata-write-recursive -> This allows full recusrive write access to the complete `$APPLOCALDATA` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-applocaldata-write-recursive" + ] + }, + { + "description": "fs:allow-applog-meta -> This allows read access to metadata of the `$APPLOG` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-applog-meta" + ] + }, + { + "description": "fs:allow-applog-meta-recursive -> This allows read access to metadata of the `$APPLOG` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-applog-meta-recursive" + ] + }, + { + "description": "fs:allow-applog-read -> This allows non-recursive read access to the `$APPLOG` folder.", + "type": "string", + "enum": [ + "fs:allow-applog-read" + ] + }, + { + "description": "fs:allow-applog-read-recursive -> This allows full recursive read access to the complete `$APPLOG` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-applog-read-recursive" + ] + }, + { + "description": "fs:allow-applog-write -> This allows non-recursive write access to the `$APPLOG` folder.", + "type": "string", + "enum": [ + "fs:allow-applog-write" + ] + }, + { + "description": "fs:allow-applog-write-recursive -> This allows full recusrive write access to the complete `$APPLOG` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-applog-write-recursive" + ] + }, + { + "description": "fs:allow-audio-meta -> This allows read access to metadata of the `$AUDIO` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-audio-meta" + ] + }, + { + "description": "fs:allow-audio-meta-recursive -> This allows read access to metadata of the `$AUDIO` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-audio-meta-recursive" + ] + }, + { + "description": "fs:allow-audio-read -> This allows non-recursive read access to the `$AUDIO` folder.", + "type": "string", + "enum": [ + "fs:allow-audio-read" + ] + }, + { + "description": "fs:allow-audio-read-recursive -> This allows full recursive read access to the complete `$AUDIO` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-audio-read-recursive" + ] + }, + { + "description": "fs:allow-audio-write -> This allows non-recursive write access to the `$AUDIO` folder.", + "type": "string", + "enum": [ + "fs:allow-audio-write" + ] + }, + { + "description": "fs:allow-audio-write-recursive -> This allows full recusrive write access to the complete `$AUDIO` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-audio-write-recursive" + ] + }, + { + "description": "fs:allow-cache-meta -> This allows read access to metadata of the `$CACHE` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-cache-meta" + ] + }, + { + "description": "fs:allow-cache-meta-recursive -> This allows read access to metadata of the `$CACHE` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-cache-meta-recursive" + ] + }, + { + "description": "fs:allow-cache-read -> This allows non-recursive read access to the `$CACHE` folder.", + "type": "string", + "enum": [ + "fs:allow-cache-read" + ] + }, + { + "description": "fs:allow-cache-read-recursive -> This allows full recursive read access to the complete `$CACHE` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-cache-read-recursive" + ] + }, + { + "description": "fs:allow-cache-write -> This allows non-recursive write access to the `$CACHE` folder.", + "type": "string", + "enum": [ + "fs:allow-cache-write" + ] + }, + { + "description": "fs:allow-cache-write-recursive -> This allows full recusrive write access to the complete `$CACHE` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-cache-write-recursive" + ] + }, + { + "description": "fs:allow-config-meta -> This allows read access to metadata of the `$CONFIG` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-config-meta" + ] + }, + { + "description": "fs:allow-config-meta-recursive -> This allows read access to metadata of the `$CONFIG` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-config-meta-recursive" + ] + }, + { + "description": "fs:allow-config-read -> This allows non-recursive read access to the `$CONFIG` folder.", + "type": "string", + "enum": [ + "fs:allow-config-read" + ] + }, + { + "description": "fs:allow-config-read-recursive -> This allows full recursive read access to the complete `$CONFIG` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-config-read-recursive" + ] + }, + { + "description": "fs:allow-config-write -> This allows non-recursive write access to the `$CONFIG` folder.", + "type": "string", + "enum": [ + "fs:allow-config-write" + ] + }, + { + "description": "fs:allow-config-write-recursive -> This allows full recusrive write access to the complete `$CONFIG` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-config-write-recursive" + ] + }, + { + "description": "fs:allow-data-meta -> This allows read access to metadata of the `$DATA` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-data-meta" + ] + }, + { + "description": "fs:allow-data-meta-recursive -> This allows read access to metadata of the `$DATA` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-data-meta-recursive" + ] + }, + { + "description": "fs:allow-data-read -> This allows non-recursive read access to the `$DATA` folder.", + "type": "string", + "enum": [ + "fs:allow-data-read" + ] + }, + { + "description": "fs:allow-data-read-recursive -> This allows full recursive read access to the complete `$DATA` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-data-read-recursive" + ] + }, + { + "description": "fs:allow-data-write -> This allows non-recursive write access to the `$DATA` folder.", + "type": "string", + "enum": [ + "fs:allow-data-write" + ] + }, + { + "description": "fs:allow-data-write-recursive -> This allows full recusrive write access to the complete `$DATA` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-data-write-recursive" + ] + }, + { + "description": "fs:allow-desktop-meta -> This allows read access to metadata of the `$DESKTOP` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-desktop-meta" + ] + }, + { + "description": "fs:allow-desktop-meta-recursive -> This allows read access to metadata of the `$DESKTOP` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-desktop-meta-recursive" + ] + }, + { + "description": "fs:allow-desktop-read -> This allows non-recursive read access to the `$DESKTOP` folder.", + "type": "string", + "enum": [ + "fs:allow-desktop-read" + ] + }, + { + "description": "fs:allow-desktop-read-recursive -> This allows full recursive read access to the complete `$DESKTOP` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-desktop-read-recursive" + ] + }, + { + "description": "fs:allow-desktop-write -> This allows non-recursive write access to the `$DESKTOP` folder.", + "type": "string", + "enum": [ + "fs:allow-desktop-write" + ] + }, + { + "description": "fs:allow-desktop-write-recursive -> This allows full recusrive write access to the complete `$DESKTOP` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-desktop-write-recursive" + ] + }, + { + "description": "fs:allow-document-meta -> This allows read access to metadata of the `$DOCUMENT` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-document-meta" + ] + }, + { + "description": "fs:allow-document-meta-recursive -> This allows read access to metadata of the `$DOCUMENT` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-document-meta-recursive" + ] + }, + { + "description": "fs:allow-document-read -> This allows non-recursive read access to the `$DOCUMENT` folder.", + "type": "string", + "enum": [ + "fs:allow-document-read" + ] + }, + { + "description": "fs:allow-document-read-recursive -> This allows full recursive read access to the complete `$DOCUMENT` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-document-read-recursive" + ] + }, + { + "description": "fs:allow-document-write -> This allows non-recursive write access to the `$DOCUMENT` folder.", + "type": "string", + "enum": [ + "fs:allow-document-write" + ] + }, + { + "description": "fs:allow-document-write-recursive -> This allows full recusrive write access to the complete `$DOCUMENT` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-document-write-recursive" + ] + }, + { + "description": "fs:allow-download-meta -> This allows read access to metadata of the `$DOWNLOAD` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-download-meta" + ] + }, + { + "description": "fs:allow-download-meta-recursive -> This allows read access to metadata of the `$DOWNLOAD` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-download-meta-recursive" + ] + }, + { + "description": "fs:allow-download-read -> This allows non-recursive read access to the `$DOWNLOAD` folder.", + "type": "string", + "enum": [ + "fs:allow-download-read" + ] + }, + { + "description": "fs:allow-download-read-recursive -> This allows full recursive read access to the complete `$DOWNLOAD` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-download-read-recursive" + ] + }, + { + "description": "fs:allow-download-write -> This allows non-recursive write access to the `$DOWNLOAD` folder.", + "type": "string", + "enum": [ + "fs:allow-download-write" + ] + }, + { + "description": "fs:allow-download-write-recursive -> This allows full recusrive write access to the complete `$DOWNLOAD` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-download-write-recursive" + ] + }, + { + "description": "fs:allow-exe-meta -> This allows read access to metadata of the `$EXE` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-exe-meta" + ] + }, + { + "description": "fs:allow-exe-meta-recursive -> This allows read access to metadata of the `$EXE` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-exe-meta-recursive" + ] + }, + { + "description": "fs:allow-exe-read -> This allows non-recursive read access to the `$EXE` folder.", + "type": "string", + "enum": [ + "fs:allow-exe-read" + ] + }, + { + "description": "fs:allow-exe-read-recursive -> This allows full recursive read access to the complete `$EXE` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-exe-read-recursive" + ] + }, + { + "description": "fs:allow-exe-write -> This allows non-recursive write access to the `$EXE` folder.", + "type": "string", + "enum": [ + "fs:allow-exe-write" + ] + }, + { + "description": "fs:allow-exe-write-recursive -> This allows full recusrive write access to the complete `$EXE` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-exe-write-recursive" + ] + }, + { + "description": "fs:allow-font-meta -> This allows read access to metadata of the `$FONT` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-font-meta" + ] + }, + { + "description": "fs:allow-font-meta-recursive -> This allows read access to metadata of the `$FONT` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-font-meta-recursive" + ] + }, + { + "description": "fs:allow-font-read -> This allows non-recursive read access to the `$FONT` folder.", + "type": "string", + "enum": [ + "fs:allow-font-read" + ] + }, + { + "description": "fs:allow-font-read-recursive -> This allows full recursive read access to the complete `$FONT` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-font-read-recursive" + ] + }, + { + "description": "fs:allow-font-write -> This allows non-recursive write access to the `$FONT` folder.", + "type": "string", + "enum": [ + "fs:allow-font-write" + ] + }, + { + "description": "fs:allow-font-write-recursive -> This allows full recusrive write access to the complete `$FONT` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-font-write-recursive" + ] + }, + { + "description": "fs:allow-home-meta -> This allows read access to metadata of the `$HOME` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-home-meta" + ] + }, + { + "description": "fs:allow-home-meta-recursive -> This allows read access to metadata of the `$HOME` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-home-meta-recursive" + ] + }, + { + "description": "fs:allow-home-read -> This allows non-recursive read access to the `$HOME` folder.", + "type": "string", + "enum": [ + "fs:allow-home-read" + ] + }, + { + "description": "fs:allow-home-read-recursive -> This allows full recursive read access to the complete `$HOME` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-home-read-recursive" + ] + }, + { + "description": "fs:allow-home-write -> This allows non-recursive write access to the `$HOME` folder.", + "type": "string", + "enum": [ + "fs:allow-home-write" + ] + }, + { + "description": "fs:allow-home-write-recursive -> This allows full recusrive write access to the complete `$HOME` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-home-write-recursive" + ] + }, + { + "description": "fs:allow-localdata-meta -> This allows read access to metadata of the `$LOCALDATA` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-localdata-meta" + ] + }, + { + "description": "fs:allow-localdata-meta-recursive -> This allows read access to metadata of the `$LOCALDATA` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-localdata-meta-recursive" + ] + }, + { + "description": "fs:allow-localdata-read -> This allows non-recursive read access to the `$LOCALDATA` folder.", + "type": "string", + "enum": [ + "fs:allow-localdata-read" + ] + }, + { + "description": "fs:allow-localdata-read-recursive -> This allows full recursive read access to the complete `$LOCALDATA` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-localdata-read-recursive" + ] + }, + { + "description": "fs:allow-localdata-write -> This allows non-recursive write access to the `$LOCALDATA` folder.", + "type": "string", + "enum": [ + "fs:allow-localdata-write" + ] + }, + { + "description": "fs:allow-localdata-write-recursive -> This allows full recusrive write access to the complete `$LOCALDATA` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-localdata-write-recursive" + ] + }, + { + "description": "fs:allow-log-meta -> This allows read access to metadata of the `$LOG` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-log-meta" + ] + }, + { + "description": "fs:allow-log-meta-recursive -> This allows read access to metadata of the `$LOG` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-log-meta-recursive" + ] + }, + { + "description": "fs:allow-log-read -> This allows non-recursive read access to the `$LOG` folder.", + "type": "string", + "enum": [ + "fs:allow-log-read" + ] + }, + { + "description": "fs:allow-log-read-recursive -> This allows full recursive read access to the complete `$LOG` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-log-read-recursive" + ] + }, + { + "description": "fs:allow-log-write -> This allows non-recursive write access to the `$LOG` folder.", + "type": "string", + "enum": [ + "fs:allow-log-write" + ] + }, + { + "description": "fs:allow-log-write-recursive -> This allows full recusrive write access to the complete `$LOG` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-log-write-recursive" + ] + }, + { + "description": "fs:allow-picture-meta -> This allows read access to metadata of the `$PICTURE` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-picture-meta" + ] + }, + { + "description": "fs:allow-picture-meta-recursive -> This allows read access to metadata of the `$PICTURE` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-picture-meta-recursive" + ] + }, + { + "description": "fs:allow-picture-read -> This allows non-recursive read access to the `$PICTURE` folder.", + "type": "string", + "enum": [ + "fs:allow-picture-read" + ] + }, + { + "description": "fs:allow-picture-read-recursive -> This allows full recursive read access to the complete `$PICTURE` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-picture-read-recursive" + ] + }, + { + "description": "fs:allow-picture-write -> This allows non-recursive write access to the `$PICTURE` folder.", + "type": "string", + "enum": [ + "fs:allow-picture-write" + ] + }, + { + "description": "fs:allow-picture-write-recursive -> This allows full recusrive write access to the complete `$PICTURE` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-picture-write-recursive" + ] + }, + { + "description": "fs:allow-public-meta -> This allows read access to metadata of the `$PUBLIC` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-public-meta" + ] + }, + { + "description": "fs:allow-public-meta-recursive -> This allows read access to metadata of the `$PUBLIC` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-public-meta-recursive" + ] + }, + { + "description": "fs:allow-public-read -> This allows non-recursive read access to the `$PUBLIC` folder.", + "type": "string", + "enum": [ + "fs:allow-public-read" + ] + }, + { + "description": "fs:allow-public-read-recursive -> This allows full recursive read access to the complete `$PUBLIC` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-public-read-recursive" + ] + }, + { + "description": "fs:allow-public-write -> This allows non-recursive write access to the `$PUBLIC` folder.", + "type": "string", + "enum": [ + "fs:allow-public-write" + ] + }, + { + "description": "fs:allow-public-write-recursive -> This allows full recusrive write access to the complete `$PUBLIC` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-public-write-recursive" + ] + }, + { + "description": "fs:allow-resource-meta -> This allows read access to metadata of the `$RESOURCE` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-resource-meta" + ] + }, + { + "description": "fs:allow-resource-meta-recursive -> This allows read access to metadata of the `$RESOURCE` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-resource-meta-recursive" + ] + }, + { + "description": "fs:allow-resource-read -> This allows non-recursive read access to the `$RESOURCE` folder.", + "type": "string", + "enum": [ + "fs:allow-resource-read" + ] + }, + { + "description": "fs:allow-resource-read-recursive -> This allows full recursive read access to the complete `$RESOURCE` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-resource-read-recursive" + ] + }, + { + "description": "fs:allow-resource-write -> This allows non-recursive write access to the `$RESOURCE` folder.", + "type": "string", + "enum": [ + "fs:allow-resource-write" + ] + }, + { + "description": "fs:allow-resource-write-recursive -> This allows full recusrive write access to the complete `$RESOURCE` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-resource-write-recursive" + ] + }, + { + "description": "fs:allow-runtime-meta -> This allows read access to metadata of the `$RUNTIME` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-runtime-meta" + ] + }, + { + "description": "fs:allow-runtime-meta-recursive -> This allows read access to metadata of the `$RUNTIME` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-runtime-meta-recursive" + ] + }, + { + "description": "fs:allow-runtime-read -> This allows non-recursive read access to the `$RUNTIME` folder.", + "type": "string", + "enum": [ + "fs:allow-runtime-read" + ] + }, + { + "description": "fs:allow-runtime-read-recursive -> This allows full recursive read access to the complete `$RUNTIME` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-runtime-read-recursive" + ] + }, + { + "description": "fs:allow-runtime-write -> This allows non-recursive write access to the `$RUNTIME` folder.", + "type": "string", + "enum": [ + "fs:allow-runtime-write" + ] + }, + { + "description": "fs:allow-runtime-write-recursive -> This allows full recusrive write access to the complete `$RUNTIME` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-runtime-write-recursive" + ] + }, + { + "description": "fs:allow-temp-meta -> This allows read access to metadata of the `$TEMP` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-temp-meta" + ] + }, + { + "description": "fs:allow-temp-meta-recursive -> This allows read access to metadata of the `$TEMP` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-temp-meta-recursive" + ] + }, + { + "description": "fs:allow-temp-read -> This allows non-recursive read access to the `$TEMP` folder.", + "type": "string", + "enum": [ + "fs:allow-temp-read" + ] + }, + { + "description": "fs:allow-temp-read-recursive -> This allows full recursive read access to the complete `$TEMP` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-temp-read-recursive" + ] + }, + { + "description": "fs:allow-temp-write -> This allows non-recursive write access to the `$TEMP` folder.", + "type": "string", + "enum": [ + "fs:allow-temp-write" + ] + }, + { + "description": "fs:allow-temp-write-recursive -> This allows full recusrive write access to the complete `$TEMP` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-temp-write-recursive" + ] + }, + { + "description": "fs:allow-template-meta -> This allows read access to metadata of the `$TEMPLATE` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-template-meta" + ] + }, + { + "description": "fs:allow-template-meta-recursive -> This allows read access to metadata of the `$TEMPLATE` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-template-meta-recursive" + ] + }, + { + "description": "fs:allow-template-read -> This allows non-recursive read access to the `$TEMPLATE` folder.", + "type": "string", + "enum": [ + "fs:allow-template-read" + ] + }, + { + "description": "fs:allow-template-read-recursive -> This allows full recursive read access to the complete `$TEMPLATE` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-template-read-recursive" + ] + }, + { + "description": "fs:allow-template-write -> This allows non-recursive write access to the `$TEMPLATE` folder.", + "type": "string", + "enum": [ + "fs:allow-template-write" + ] + }, + { + "description": "fs:allow-template-write-recursive -> This allows full recusrive write access to the complete `$TEMPLATE` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-template-write-recursive" + ] + }, + { + "description": "fs:allow-video-meta -> This allows read access to metadata of the `$VIDEO` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-video-meta" + ] + }, + { + "description": "fs:allow-video-meta-recursive -> This allows read access to metadata of the `$VIDEO` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-video-meta-recursive" + ] + }, + { + "description": "fs:allow-video-read -> This allows non-recursive read access to the `$VIDEO` folder.", + "type": "string", + "enum": [ + "fs:allow-video-read" + ] + }, + { + "description": "fs:allow-video-read-recursive -> This allows full recursive read access to the complete `$VIDEO` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-video-read-recursive" + ] + }, + { + "description": "fs:allow-video-write -> This allows non-recursive write access to the `$VIDEO` folder.", + "type": "string", + "enum": [ + "fs:allow-video-write" + ] + }, + { + "description": "fs:allow-video-write-recursive -> This allows full recusrive write access to the complete `$VIDEO` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-video-write-recursive" + ] + }, + { + "description": "fs:deny-default -> This denies access to dangerous Tauri relevant files and folders by default.", + "type": "string", + "enum": [ + "fs:deny-default" + ] + }, + { + "description": "fs:default -> # Tauri `fs` default permissions\n\nThis configuration file defines the default permissions granted\nto the filesystem.\n\n### Granted Permissions\n\nThis default permission set enables all read-related commands and\nallows access to the `$APP` folder and sub directories created in it.\nThe location of the `$APP` folder depends on the operating system,\nwhere the application is run.\n\nIn general the `$APP` folder needs to be manually created\nby the application at runtime, before accessing files or folders\nin it is possible.\n\n### Denied Permissions\n\nThis default permission set prevents access to critical components\nof the Tauri application by default.\nOn Windows the webview data folder access is denied.\n\n", + "type": "string", + "enum": [ + "fs:default" + ] + }, + { + "description": "fs:allow-copy-file -> Enables the copy_file command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-copy-file" + ] + }, + { + "description": "fs:allow-create -> Enables the create command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-create" + ] + }, + { + "description": "fs:allow-exists -> Enables the exists command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-exists" + ] + }, + { + "description": "fs:allow-fstat -> Enables the fstat command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-fstat" + ] + }, + { + "description": "fs:allow-ftruncate -> Enables the ftruncate command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-ftruncate" + ] + }, + { + "description": "fs:allow-lstat -> Enables the lstat command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-lstat" + ] + }, + { + "description": "fs:allow-mkdir -> Enables the mkdir command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-mkdir" + ] + }, + { + "description": "fs:allow-open -> Enables the open command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-open" + ] + }, + { + "description": "fs:allow-read -> Enables the read command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-read" + ] + }, + { + "description": "fs:allow-read-dir -> Enables the read_dir command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-read-dir" + ] + }, + { + "description": "fs:allow-read-file -> Enables the read_file command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-read-file" + ] + }, + { + "description": "fs:allow-read-text-file -> Enables the read_text_file command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-read-text-file" + ] + }, + { + "description": "fs:allow-read-text-file-lines -> Enables the read_text_file_lines command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-read-text-file-lines" + ] + }, + { + "description": "fs:allow-read-text-file-lines-next -> Enables the read_text_file_lines_next command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-read-text-file-lines-next" + ] + }, + { + "description": "fs:allow-remove -> Enables the remove command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-remove" + ] + }, + { + "description": "fs:allow-rename -> Enables the rename command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-rename" + ] + }, + { + "description": "fs:allow-seek -> Enables the seek command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-seek" + ] + }, + { + "description": "fs:allow-stat -> Enables the stat command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-stat" + ] + }, + { + "description": "fs:allow-truncate -> Enables the truncate command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-truncate" + ] + }, + { + "description": "fs:allow-unwatch -> Enables the unwatch command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-unwatch" + ] + }, + { + "description": "fs:allow-watch -> Enables the watch command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-watch" + ] + }, + { + "description": "fs:allow-write -> Enables the write command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-write" + ] + }, + { + "description": "fs:allow-write-file -> Enables the write_file command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-write-file" + ] + }, + { + "description": "fs:allow-write-text-file -> Enables the write_text_file command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-write-text-file" + ] + }, + { + "description": "fs:deny-copy-file -> Denies the copy_file command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-copy-file" + ] + }, + { + "description": "fs:deny-create -> Denies the create command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-create" + ] + }, + { + "description": "fs:deny-exists -> Denies the exists command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-exists" + ] + }, + { + "description": "fs:deny-fstat -> Denies the fstat command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-fstat" + ] + }, + { + "description": "fs:deny-ftruncate -> Denies the ftruncate command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-ftruncate" + ] + }, + { + "description": "fs:deny-lstat -> Denies the lstat command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-lstat" + ] + }, + { + "description": "fs:deny-mkdir -> Denies the mkdir command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-mkdir" + ] + }, + { + "description": "fs:deny-open -> Denies the open command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-open" + ] + }, + { + "description": "fs:deny-read -> Denies the read command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-read" + ] + }, + { + "description": "fs:deny-read-dir -> Denies the read_dir command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-read-dir" + ] + }, + { + "description": "fs:deny-read-file -> Denies the read_file command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-read-file" + ] + }, + { + "description": "fs:deny-read-text-file -> Denies the read_text_file command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-read-text-file" + ] + }, + { + "description": "fs:deny-read-text-file-lines -> Denies the read_text_file_lines command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-read-text-file-lines" + ] + }, + { + "description": "fs:deny-read-text-file-lines-next -> Denies the read_text_file_lines_next command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-read-text-file-lines-next" + ] + }, + { + "description": "fs:deny-remove -> Denies the remove command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-remove" + ] + }, + { + "description": "fs:deny-rename -> Denies the rename command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-rename" + ] + }, + { + "description": "fs:deny-seek -> Denies the seek command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-seek" + ] + }, + { + "description": "fs:deny-stat -> Denies the stat command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-stat" + ] + }, + { + "description": "fs:deny-truncate -> Denies the truncate command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-truncate" + ] + }, + { + "description": "fs:deny-unwatch -> Denies the unwatch command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-unwatch" + ] + }, + { + "description": "fs:deny-watch -> Denies the watch command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-watch" + ] + }, + { + "description": "fs:deny-webview-data-linux -> This denies read access to the\n`$APPLOCALDATA` folder on linux as the webview data and configuration values are stored here.\nAllowing access can lead to sensitive information disclosure and should be well considered.", + "type": "string", + "enum": [ + "fs:deny-webview-data-linux" + ] + }, + { + "description": "fs:deny-webview-data-windows -> This denies read access to the\n`$APPLOCALDATA/EBWebView` folder on windows as the webview data and configuration values are stored here.\nAllowing access can lead to sensitive information disclosure and should be well considered.", + "type": "string", + "enum": [ + "fs:deny-webview-data-windows" + ] + }, + { + "description": "fs:deny-write -> Denies the write command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-write" + ] + }, + { + "description": "fs:deny-write-file -> Denies the write_file command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-write-file" + ] + }, + { + "description": "fs:deny-write-text-file -> Denies the write_text_file command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-write-text-file" + ] + }, + { + "description": "fs:read-all -> This enables all read related commands without any pre-configured accessible paths.", + "type": "string", + "enum": [ + "fs:read-all" + ] + }, + { + "description": "fs:read-dirs -> This enables directory read and file metadata related commands without any pre-configured accessible paths.", + "type": "string", + "enum": [ + "fs:read-dirs" + ] + }, + { + "description": "fs:read-files -> This enables file read related commands without any pre-configured accessible paths.", + "type": "string", + "enum": [ + "fs:read-files" + ] + }, + { + "description": "fs:read-meta -> This enables all index or metadata related commands without any pre-configured accessible paths.", + "type": "string", + "enum": [ + "fs:read-meta" + ] + }, + { + "description": "fs:scope -> An empty permission you can use to modify the global scope.", + "type": "string", + "enum": [ + "fs:scope" + ] + }, + { + "description": "fs:scope-app -> This scope permits access to all files and list content of top level directories in the `$APP`folder.", + "type": "string", + "enum": [ + "fs:scope-app" + ] + }, + { + "description": "fs:scope-app-index -> This scope permits to list all files and folders in the `$APP`folder.", + "type": "string", + "enum": [ + "fs:scope-app-index" + ] + }, + { + "description": "fs:scope-app-recursive -> This scope recursive access to the complete `$APP` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-app-recursive" + ] + }, + { + "description": "fs:scope-appcache -> This scope permits access to all files and list content of top level directories in the `$APPCACHE`folder.", + "type": "string", + "enum": [ + "fs:scope-appcache" + ] + }, + { + "description": "fs:scope-appcache-index -> This scope permits to list all files and folders in the `$APPCACHE`folder.", + "type": "string", + "enum": [ + "fs:scope-appcache-index" + ] + }, + { + "description": "fs:scope-appcache-recursive -> This scope recursive access to the complete `$APPCACHE` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-appcache-recursive" + ] + }, + { + "description": "fs:scope-appconfig -> This scope permits access to all files and list content of top level directories in the `$APPCONFIG`folder.", + "type": "string", + "enum": [ + "fs:scope-appconfig" + ] + }, + { + "description": "fs:scope-appconfig-index -> This scope permits to list all files and folders in the `$APPCONFIG`folder.", + "type": "string", + "enum": [ + "fs:scope-appconfig-index" + ] + }, + { + "description": "fs:scope-appconfig-recursive -> This scope recursive access to the complete `$APPCONFIG` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-appconfig-recursive" + ] + }, + { + "description": "fs:scope-appdata -> This scope permits access to all files and list content of top level directories in the `$APPDATA`folder.", + "type": "string", + "enum": [ + "fs:scope-appdata" + ] + }, + { + "description": "fs:scope-appdata-index -> This scope permits to list all files and folders in the `$APPDATA`folder.", + "type": "string", + "enum": [ + "fs:scope-appdata-index" + ] + }, + { + "description": "fs:scope-appdata-recursive -> This scope recursive access to the complete `$APPDATA` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-appdata-recursive" + ] + }, + { + "description": "fs:scope-applocaldata -> This scope permits access to all files and list content of top level directories in the `$APPLOCALDATA`folder.", + "type": "string", + "enum": [ + "fs:scope-applocaldata" + ] + }, + { + "description": "fs:scope-applocaldata-index -> This scope permits to list all files and folders in the `$APPLOCALDATA`folder.", + "type": "string", + "enum": [ + "fs:scope-applocaldata-index" + ] + }, + { + "description": "fs:scope-applocaldata-recursive -> This scope recursive access to the complete `$APPLOCALDATA` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-applocaldata-recursive" + ] + }, + { + "description": "fs:scope-applog -> This scope permits access to all files and list content of top level directories in the `$APPLOG`folder.", + "type": "string", + "enum": [ + "fs:scope-applog" + ] + }, + { + "description": "fs:scope-applog-index -> This scope permits to list all files and folders in the `$APPLOG`folder.", + "type": "string", + "enum": [ + "fs:scope-applog-index" + ] + }, + { + "description": "fs:scope-applog-recursive -> This scope recursive access to the complete `$APPLOG` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-applog-recursive" + ] + }, + { + "description": "fs:scope-audio -> This scope permits access to all files and list content of top level directories in the `$AUDIO`folder.", + "type": "string", + "enum": [ + "fs:scope-audio" + ] + }, + { + "description": "fs:scope-audio-index -> This scope permits to list all files and folders in the `$AUDIO`folder.", + "type": "string", + "enum": [ + "fs:scope-audio-index" + ] + }, + { + "description": "fs:scope-audio-recursive -> This scope recursive access to the complete `$AUDIO` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-audio-recursive" + ] + }, + { + "description": "fs:scope-cache -> This scope permits access to all files and list content of top level directories in the `$CACHE`folder.", + "type": "string", + "enum": [ + "fs:scope-cache" + ] + }, + { + "description": "fs:scope-cache-index -> This scope permits to list all files and folders in the `$CACHE`folder.", + "type": "string", + "enum": [ + "fs:scope-cache-index" + ] + }, + { + "description": "fs:scope-cache-recursive -> This scope recursive access to the complete `$CACHE` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-cache-recursive" + ] + }, + { + "description": "fs:scope-config -> This scope permits access to all files and list content of top level directories in the `$CONFIG`folder.", + "type": "string", + "enum": [ + "fs:scope-config" + ] + }, + { + "description": "fs:scope-config-index -> This scope permits to list all files and folders in the `$CONFIG`folder.", + "type": "string", + "enum": [ + "fs:scope-config-index" + ] + }, + { + "description": "fs:scope-config-recursive -> This scope recursive access to the complete `$CONFIG` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-config-recursive" + ] + }, + { + "description": "fs:scope-data -> This scope permits access to all files and list content of top level directories in the `$DATA`folder.", + "type": "string", + "enum": [ + "fs:scope-data" + ] + }, + { + "description": "fs:scope-data-index -> This scope permits to list all files and folders in the `$DATA`folder.", + "type": "string", + "enum": [ + "fs:scope-data-index" + ] + }, + { + "description": "fs:scope-data-recursive -> This scope recursive access to the complete `$DATA` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-data-recursive" + ] + }, + { + "description": "fs:scope-desktop -> This scope permits access to all files and list content of top level directories in the `$DESKTOP`folder.", + "type": "string", + "enum": [ + "fs:scope-desktop" + ] + }, + { + "description": "fs:scope-desktop-index -> This scope permits to list all files and folders in the `$DESKTOP`folder.", + "type": "string", + "enum": [ + "fs:scope-desktop-index" + ] + }, + { + "description": "fs:scope-desktop-recursive -> This scope recursive access to the complete `$DESKTOP` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-desktop-recursive" + ] + }, + { + "description": "fs:scope-document -> This scope permits access to all files and list content of top level directories in the `$DOCUMENT`folder.", + "type": "string", + "enum": [ + "fs:scope-document" + ] + }, + { + "description": "fs:scope-document-index -> This scope permits to list all files and folders in the `$DOCUMENT`folder.", + "type": "string", + "enum": [ + "fs:scope-document-index" + ] + }, + { + "description": "fs:scope-document-recursive -> This scope recursive access to the complete `$DOCUMENT` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-document-recursive" + ] + }, + { + "description": "fs:scope-download -> This scope permits access to all files and list content of top level directories in the `$DOWNLOAD`folder.", + "type": "string", + "enum": [ + "fs:scope-download" + ] + }, + { + "description": "fs:scope-download-index -> This scope permits to list all files and folders in the `$DOWNLOAD`folder.", + "type": "string", + "enum": [ + "fs:scope-download-index" + ] + }, + { + "description": "fs:scope-download-recursive -> This scope recursive access to the complete `$DOWNLOAD` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-download-recursive" + ] + }, + { + "description": "fs:scope-exe -> This scope permits access to all files and list content of top level directories in the `$EXE`folder.", + "type": "string", + "enum": [ + "fs:scope-exe" + ] + }, + { + "description": "fs:scope-exe-index -> This scope permits to list all files and folders in the `$EXE`folder.", + "type": "string", + "enum": [ + "fs:scope-exe-index" + ] + }, + { + "description": "fs:scope-exe-recursive -> This scope recursive access to the complete `$EXE` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-exe-recursive" + ] + }, + { + "description": "fs:scope-font -> This scope permits access to all files and list content of top level directories in the `$FONT`folder.", + "type": "string", + "enum": [ + "fs:scope-font" + ] + }, + { + "description": "fs:scope-font-index -> This scope permits to list all files and folders in the `$FONT`folder.", + "type": "string", + "enum": [ + "fs:scope-font-index" + ] + }, + { + "description": "fs:scope-font-recursive -> This scope recursive access to the complete `$FONT` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-font-recursive" + ] + }, + { + "description": "fs:scope-home -> This scope permits access to all files and list content of top level directories in the `$HOME`folder.", + "type": "string", + "enum": [ + "fs:scope-home" + ] + }, + { + "description": "fs:scope-home-index -> This scope permits to list all files and folders in the `$HOME`folder.", + "type": "string", + "enum": [ + "fs:scope-home-index" + ] + }, + { + "description": "fs:scope-home-recursive -> This scope recursive access to the complete `$HOME` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-home-recursive" + ] + }, + { + "description": "fs:scope-localdata -> This scope permits access to all files and list content of top level directories in the `$LOCALDATA`folder.", + "type": "string", + "enum": [ + "fs:scope-localdata" + ] + }, + { + "description": "fs:scope-localdata-index -> This scope permits to list all files and folders in the `$LOCALDATA`folder.", + "type": "string", + "enum": [ + "fs:scope-localdata-index" + ] + }, + { + "description": "fs:scope-localdata-recursive -> This scope recursive access to the complete `$LOCALDATA` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-localdata-recursive" + ] + }, + { + "description": "fs:scope-log -> This scope permits access to all files and list content of top level directories in the `$LOG`folder.", + "type": "string", + "enum": [ + "fs:scope-log" + ] + }, + { + "description": "fs:scope-log-index -> This scope permits to list all files and folders in the `$LOG`folder.", + "type": "string", + "enum": [ + "fs:scope-log-index" + ] + }, + { + "description": "fs:scope-log-recursive -> This scope recursive access to the complete `$LOG` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-log-recursive" + ] + }, + { + "description": "fs:scope-picture -> This scope permits access to all files and list content of top level directories in the `$PICTURE`folder.", + "type": "string", + "enum": [ + "fs:scope-picture" + ] + }, + { + "description": "fs:scope-picture-index -> This scope permits to list all files and folders in the `$PICTURE`folder.", + "type": "string", + "enum": [ + "fs:scope-picture-index" + ] + }, + { + "description": "fs:scope-picture-recursive -> This scope recursive access to the complete `$PICTURE` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-picture-recursive" + ] + }, + { + "description": "fs:scope-public -> This scope permits access to all files and list content of top level directories in the `$PUBLIC`folder.", + "type": "string", + "enum": [ + "fs:scope-public" + ] + }, + { + "description": "fs:scope-public-index -> This scope permits to list all files and folders in the `$PUBLIC`folder.", + "type": "string", + "enum": [ + "fs:scope-public-index" + ] + }, + { + "description": "fs:scope-public-recursive -> This scope recursive access to the complete `$PUBLIC` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-public-recursive" + ] + }, + { + "description": "fs:scope-resource -> This scope permits access to all files and list content of top level directories in the `$RESOURCE`folder.", + "type": "string", + "enum": [ + "fs:scope-resource" + ] + }, + { + "description": "fs:scope-resource-index -> This scope permits to list all files and folders in the `$RESOURCE`folder.", + "type": "string", + "enum": [ + "fs:scope-resource-index" + ] + }, + { + "description": "fs:scope-resource-recursive -> This scope recursive access to the complete `$RESOURCE` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-resource-recursive" + ] + }, + { + "description": "fs:scope-runtime -> This scope permits access to all files and list content of top level directories in the `$RUNTIME`folder.", + "type": "string", + "enum": [ + "fs:scope-runtime" + ] + }, + { + "description": "fs:scope-runtime-index -> This scope permits to list all files and folders in the `$RUNTIME`folder.", + "type": "string", + "enum": [ + "fs:scope-runtime-index" + ] + }, + { + "description": "fs:scope-runtime-recursive -> This scope recursive access to the complete `$RUNTIME` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-runtime-recursive" + ] + }, + { + "description": "fs:scope-temp -> This scope permits access to all files and list content of top level directories in the `$TEMP`folder.", + "type": "string", + "enum": [ + "fs:scope-temp" + ] + }, + { + "description": "fs:scope-temp-index -> This scope permits to list all files and folders in the `$TEMP`folder.", + "type": "string", + "enum": [ + "fs:scope-temp-index" + ] + }, + { + "description": "fs:scope-temp-recursive -> This scope recursive access to the complete `$TEMP` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-temp-recursive" + ] + }, + { + "description": "fs:scope-template -> This scope permits access to all files and list content of top level directories in the `$TEMPLATE`folder.", + "type": "string", + "enum": [ + "fs:scope-template" + ] + }, + { + "description": "fs:scope-template-index -> This scope permits to list all files and folders in the `$TEMPLATE`folder.", + "type": "string", + "enum": [ + "fs:scope-template-index" + ] + }, + { + "description": "fs:scope-template-recursive -> This scope recursive access to the complete `$TEMPLATE` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-template-recursive" + ] + }, + { + "description": "fs:scope-video -> This scope permits access to all files and list content of top level directories in the `$VIDEO`folder.", + "type": "string", + "enum": [ + "fs:scope-video" + ] + }, + { + "description": "fs:scope-video-index -> This scope permits to list all files and folders in the `$VIDEO`folder.", + "type": "string", + "enum": [ + "fs:scope-video-index" + ] + }, + { + "description": "fs:scope-video-recursive -> This scope recursive access to the complete `$VIDEO` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-video-recursive" + ] + }, + { + "description": "fs:write-all -> This enables all write related commands without any pre-configured accessible paths.", + "type": "string", + "enum": [ + "fs:write-all" + ] + }, + { + "description": "fs:write-files -> This enables all file write related commands without any pre-configured accessible paths.", + "type": "string", + "enum": [ + "fs:write-files" + ] + }, + { + "description": "global-shortcut:allow-is-registered -> Enables the is_registered command without any pre-configured scope.", + "type": "string", + "enum": [ + "global-shortcut:allow-is-registered" + ] + }, + { + "description": "global-shortcut:allow-register -> Enables the register command without any pre-configured scope.", + "type": "string", + "enum": [ + "global-shortcut:allow-register" + ] + }, + { + "description": "global-shortcut:allow-register-all -> Enables the register_all command without any pre-configured scope.", + "type": "string", + "enum": [ + "global-shortcut:allow-register-all" + ] + }, + { + "description": "global-shortcut:allow-unregister -> Enables the unregister command without any pre-configured scope.", + "type": "string", + "enum": [ + "global-shortcut:allow-unregister" + ] + }, + { + "description": "global-shortcut:allow-unregister-all -> Enables the unregister_all command without any pre-configured scope.", + "type": "string", + "enum": [ + "global-shortcut:allow-unregister-all" + ] + }, + { + "description": "global-shortcut:deny-is-registered -> Denies the is_registered command without any pre-configured scope.", + "type": "string", + "enum": [ + "global-shortcut:deny-is-registered" + ] + }, + { + "description": "global-shortcut:deny-register -> Denies the register command without any pre-configured scope.", + "type": "string", + "enum": [ + "global-shortcut:deny-register" + ] + }, + { + "description": "global-shortcut:deny-register-all -> Denies the register_all command without any pre-configured scope.", + "type": "string", + "enum": [ + "global-shortcut:deny-register-all" + ] + }, + { + "description": "global-shortcut:deny-unregister -> Denies the unregister command without any pre-configured scope.", + "type": "string", + "enum": [ + "global-shortcut:deny-unregister" + ] + }, + { + "description": "global-shortcut:deny-unregister-all -> Denies the unregister_all command without any pre-configured scope.", + "type": "string", + "enum": [ + "global-shortcut:deny-unregister-all" + ] + }, + { + "description": "http:default -> Allows all fetch operations", + "type": "string", + "enum": [ + "http:default" + ] + }, + { + "description": "http:allow-fetch -> Enables the fetch command without any pre-configured scope.", + "type": "string", + "enum": [ + "http:allow-fetch" + ] + }, + { + "description": "http:allow-fetch-cancel -> Enables the fetch_cancel command without any pre-configured scope.", + "type": "string", + "enum": [ + "http:allow-fetch-cancel" + ] + }, + { + "description": "http:allow-fetch-read-body -> Enables the fetch_read_body command without any pre-configured scope.", + "type": "string", + "enum": [ + "http:allow-fetch-read-body" + ] + }, + { + "description": "http:allow-fetch-send -> Enables the fetch_send command without any pre-configured scope.", + "type": "string", + "enum": [ + "http:allow-fetch-send" + ] + }, + { + "description": "http:deny-fetch -> Denies the fetch command without any pre-configured scope.", + "type": "string", + "enum": [ + "http:deny-fetch" + ] + }, + { + "description": "http:deny-fetch-cancel -> Denies the fetch_cancel command without any pre-configured scope.", + "type": "string", + "enum": [ + "http:deny-fetch-cancel" + ] + }, + { + "description": "http:deny-fetch-read-body -> Denies the fetch_read_body command without any pre-configured scope.", + "type": "string", + "enum": [ + "http:deny-fetch-read-body" + ] + }, + { + "description": "http:deny-fetch-send -> Denies the fetch_send command without any pre-configured scope.", + "type": "string", + "enum": [ + "http:deny-fetch-send" + ] + }, + { + "description": "log:default -> Allows the log command", + "type": "string", + "enum": [ + "log:default" + ] + }, + { + "description": "log:allow-log -> Enables the log command without any pre-configured scope.", + "type": "string", + "enum": [ + "log:allow-log" + ] + }, + { + "description": "log:deny-log -> Denies the log command without any pre-configured scope.", + "type": "string", + "enum": [ + "log:deny-log" + ] + }, + { + "description": "menu:default -> Default permissions for the plugin.", + "type": "string", + "enum": [ + "menu:default" + ] + }, + { + "description": "menu:allow-append -> Enables the append command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:allow-append" + ] + }, + { + "description": "menu:allow-create-default -> Enables the create_default command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:allow-create-default" + ] + }, + { + "description": "menu:allow-get -> Enables the get command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:allow-get" + ] + }, + { + "description": "menu:allow-insert -> Enables the insert command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:allow-insert" + ] + }, + { + "description": "menu:allow-is-checked -> Enables the is_checked command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:allow-is-checked" + ] + }, + { + "description": "menu:allow-is-enabled -> Enables the is_enabled command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:allow-is-enabled" + ] + }, + { + "description": "menu:allow-items -> Enables the items command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:allow-items" + ] + }, + { + "description": "menu:allow-new -> Enables the new command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:allow-new" + ] + }, + { + "description": "menu:allow-popup -> Enables the popup command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:allow-popup" + ] + }, + { + "description": "menu:allow-prepend -> Enables the prepend command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:allow-prepend" + ] + }, + { + "description": "menu:allow-remove -> Enables the remove command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:allow-remove" + ] + }, + { + "description": "menu:allow-remove-at -> Enables the remove_at command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:allow-remove-at" + ] + }, + { + "description": "menu:allow-set-accelerator -> Enables the set_accelerator command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:allow-set-accelerator" + ] + }, + { + "description": "menu:allow-set-as-app-menu -> Enables the set_as_app_menu command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:allow-set-as-app-menu" + ] + }, + { + "description": "menu:allow-set-as-help-menu-for-nsapp -> Enables the set_as_help_menu_for_nsapp command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:allow-set-as-help-menu-for-nsapp" + ] + }, + { + "description": "menu:allow-set-as-window-menu -> Enables the set_as_window_menu command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:allow-set-as-window-menu" + ] + }, + { + "description": "menu:allow-set-as-windows-menu-for-nsapp -> Enables the set_as_windows_menu_for_nsapp command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:allow-set-as-windows-menu-for-nsapp" + ] + }, + { + "description": "menu:allow-set-checked -> Enables the set_checked command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:allow-set-checked" + ] + }, + { + "description": "menu:allow-set-enabled -> Enables the set_enabled command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:allow-set-enabled" + ] + }, + { + "description": "menu:allow-set-icon -> Enables the set_icon command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:allow-set-icon" + ] + }, + { + "description": "menu:allow-set-text -> Enables the set_text command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:allow-set-text" + ] + }, + { + "description": "menu:allow-text -> Enables the text command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:allow-text" + ] + }, + { + "description": "menu:deny-append -> Denies the append command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:deny-append" + ] + }, + { + "description": "menu:deny-create-default -> Denies the create_default command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:deny-create-default" + ] + }, + { + "description": "menu:deny-get -> Denies the get command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:deny-get" + ] + }, + { + "description": "menu:deny-insert -> Denies the insert command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:deny-insert" + ] + }, + { + "description": "menu:deny-is-checked -> Denies the is_checked command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:deny-is-checked" + ] + }, + { + "description": "menu:deny-is-enabled -> Denies the is_enabled command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:deny-is-enabled" + ] + }, + { + "description": "menu:deny-items -> Denies the items command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:deny-items" + ] + }, + { + "description": "menu:deny-new -> Denies the new command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:deny-new" + ] + }, + { + "description": "menu:deny-popup -> Denies the popup command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:deny-popup" + ] + }, + { + "description": "menu:deny-prepend -> Denies the prepend command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:deny-prepend" + ] + }, + { + "description": "menu:deny-remove -> Denies the remove command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:deny-remove" + ] + }, + { + "description": "menu:deny-remove-at -> Denies the remove_at command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:deny-remove-at" + ] + }, + { + "description": "menu:deny-set-accelerator -> Denies the set_accelerator command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:deny-set-accelerator" + ] + }, + { + "description": "menu:deny-set-as-app-menu -> Denies the set_as_app_menu command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:deny-set-as-app-menu" + ] + }, + { + "description": "menu:deny-set-as-help-menu-for-nsapp -> Denies the set_as_help_menu_for_nsapp command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:deny-set-as-help-menu-for-nsapp" + ] + }, + { + "description": "menu:deny-set-as-window-menu -> Denies the set_as_window_menu command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:deny-set-as-window-menu" + ] + }, + { + "description": "menu:deny-set-as-windows-menu-for-nsapp -> Denies the set_as_windows_menu_for_nsapp command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:deny-set-as-windows-menu-for-nsapp" + ] + }, + { + "description": "menu:deny-set-checked -> Denies the set_checked command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:deny-set-checked" + ] + }, + { + "description": "menu:deny-set-enabled -> Denies the set_enabled command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:deny-set-enabled" + ] + }, + { + "description": "menu:deny-set-icon -> Denies the set_icon command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:deny-set-icon" + ] + }, + { + "description": "menu:deny-set-text -> Denies the set_text command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:deny-set-text" + ] + }, + { + "description": "menu:deny-text -> Denies the text command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:deny-text" + ] + }, + { + "description": "notification:default -> Allows requesting permission, checking permission state and sending notifications", + "type": "string", + "enum": [ + "notification:default" + ] + }, + { + "description": "notification:allow-is-permission-granted -> Enables the is_permission_granted command without any pre-configured scope.", + "type": "string", + "enum": [ + "notification:allow-is-permission-granted" + ] + }, + { + "description": "notification:allow-notify -> Enables the notify command without any pre-configured scope.", + "type": "string", + "enum": [ + "notification:allow-notify" + ] + }, + { + "description": "notification:allow-request-permission -> Enables the request_permission command without any pre-configured scope.", + "type": "string", + "enum": [ + "notification:allow-request-permission" + ] + }, + { + "description": "notification:deny-is-permission-granted -> Denies the is_permission_granted command without any pre-configured scope.", + "type": "string", + "enum": [ + "notification:deny-is-permission-granted" + ] + }, + { + "description": "notification:deny-notify -> Denies the notify command without any pre-configured scope.", + "type": "string", + "enum": [ + "notification:deny-notify" + ] + }, + { + "description": "notification:deny-request-permission -> Denies the request_permission command without any pre-configured scope.", + "type": "string", + "enum": [ + "notification:deny-request-permission" + ] + }, + { + "description": "os:allow-arch -> Enables the arch command without any pre-configured scope.", + "type": "string", + "enum": [ + "os:allow-arch" + ] + }, + { + "description": "os:allow-exe-extension -> Enables the exe_extension command without any pre-configured scope.", + "type": "string", + "enum": [ + "os:allow-exe-extension" + ] + }, + { + "description": "os:allow-family -> Enables the family command without any pre-configured scope.", + "type": "string", + "enum": [ + "os:allow-family" + ] + }, + { + "description": "os:allow-hostname -> Enables the hostname command without any pre-configured scope.", + "type": "string", + "enum": [ + "os:allow-hostname" + ] + }, + { + "description": "os:allow-locale -> Enables the locale command without any pre-configured scope.", + "type": "string", + "enum": [ + "os:allow-locale" + ] + }, + { + "description": "os:allow-os-type -> Enables the os_type command without any pre-configured scope.", + "type": "string", + "enum": [ + "os:allow-os-type" + ] + }, + { + "description": "os:allow-platform -> Enables the platform command without any pre-configured scope.", + "type": "string", + "enum": [ + "os:allow-platform" + ] + }, + { + "description": "os:allow-version -> Enables the version command without any pre-configured scope.", + "type": "string", + "enum": [ + "os:allow-version" + ] + }, + { + "description": "os:deny-arch -> Denies the arch command without any pre-configured scope.", + "type": "string", + "enum": [ + "os:deny-arch" + ] + }, + { + "description": "os:deny-exe-extension -> Denies the exe_extension command without any pre-configured scope.", + "type": "string", + "enum": [ + "os:deny-exe-extension" + ] + }, + { + "description": "os:deny-family -> Denies the family command without any pre-configured scope.", + "type": "string", + "enum": [ + "os:deny-family" + ] + }, + { + "description": "os:deny-hostname -> Denies the hostname command without any pre-configured scope.", + "type": "string", + "enum": [ + "os:deny-hostname" + ] + }, + { + "description": "os:deny-locale -> Denies the locale command without any pre-configured scope.", + "type": "string", + "enum": [ + "os:deny-locale" + ] + }, + { + "description": "os:deny-os-type -> Denies the os_type command without any pre-configured scope.", + "type": "string", + "enum": [ + "os:deny-os-type" + ] + }, + { + "description": "os:deny-platform -> Denies the platform command without any pre-configured scope.", + "type": "string", + "enum": [ + "os:deny-platform" + ] + }, + { + "description": "os:deny-version -> Denies the version command without any pre-configured scope.", + "type": "string", + "enum": [ + "os:deny-version" + ] + }, + { + "description": "path:default -> Default permissions for the plugin.", + "type": "string", + "enum": [ + "path:default" + ] + }, + { + "description": "path:allow-basename -> Enables the basename command without any pre-configured scope.", + "type": "string", + "enum": [ + "path:allow-basename" + ] + }, + { + "description": "path:allow-dirname -> Enables the dirname command without any pre-configured scope.", + "type": "string", + "enum": [ + "path:allow-dirname" + ] + }, + { + "description": "path:allow-extname -> Enables the extname command without any pre-configured scope.", + "type": "string", + "enum": [ + "path:allow-extname" + ] + }, + { + "description": "path:allow-is-absolute -> Enables the is_absolute command without any pre-configured scope.", + "type": "string", + "enum": [ + "path:allow-is-absolute" + ] + }, + { + "description": "path:allow-join -> Enables the join command without any pre-configured scope.", + "type": "string", + "enum": [ + "path:allow-join" + ] + }, + { + "description": "path:allow-normalize -> Enables the normalize command without any pre-configured scope.", + "type": "string", + "enum": [ + "path:allow-normalize" + ] + }, + { + "description": "path:allow-resolve -> Enables the resolve command without any pre-configured scope.", + "type": "string", + "enum": [ + "path:allow-resolve" + ] + }, + { + "description": "path:allow-resolve-directory -> Enables the resolve_directory command without any pre-configured scope.", + "type": "string", + "enum": [ + "path:allow-resolve-directory" + ] + }, + { + "description": "path:deny-basename -> Denies the basename command without any pre-configured scope.", + "type": "string", + "enum": [ + "path:deny-basename" + ] + }, + { + "description": "path:deny-dirname -> Denies the dirname command without any pre-configured scope.", + "type": "string", + "enum": [ + "path:deny-dirname" + ] + }, + { + "description": "path:deny-extname -> Denies the extname command without any pre-configured scope.", + "type": "string", + "enum": [ + "path:deny-extname" + ] + }, + { + "description": "path:deny-is-absolute -> Denies the is_absolute command without any pre-configured scope.", + "type": "string", + "enum": [ + "path:deny-is-absolute" + ] + }, + { + "description": "path:deny-join -> Denies the join command without any pre-configured scope.", + "type": "string", + "enum": [ + "path:deny-join" + ] + }, + { + "description": "path:deny-normalize -> Denies the normalize command without any pre-configured scope.", + "type": "string", + "enum": [ + "path:deny-normalize" + ] + }, + { + "description": "path:deny-resolve -> Denies the resolve command without any pre-configured scope.", + "type": "string", + "enum": [ + "path:deny-resolve" + ] + }, + { + "description": "path:deny-resolve-directory -> Denies the resolve_directory command without any pre-configured scope.", + "type": "string", + "enum": [ + "path:deny-resolve-directory" + ] + }, + { + "description": "process:allow-exit -> Enables the exit command without any pre-configured scope.", + "type": "string", + "enum": [ + "process:allow-exit" + ] + }, + { + "description": "process:allow-restart -> Enables the restart command without any pre-configured scope.", + "type": "string", + "enum": [ + "process:allow-restart" + ] + }, + { + "description": "process:deny-exit -> Denies the exit command without any pre-configured scope.", + "type": "string", + "enum": [ + "process:deny-exit" + ] + }, + { + "description": "process:deny-restart -> Denies the restart command without any pre-configured scope.", + "type": "string", + "enum": [ + "process:deny-restart" + ] + }, + { + "description": "resources:default -> Default permissions for the plugin.", + "type": "string", + "enum": [ + "resources:default" + ] + }, + { + "description": "resources:allow-close -> Enables the close command without any pre-configured scope.", + "type": "string", + "enum": [ + "resources:allow-close" + ] + }, + { + "description": "resources:deny-close -> Denies the close command without any pre-configured scope.", + "type": "string", + "enum": [ + "resources:deny-close" + ] + }, + { + "description": "shell:allow-execute -> Enables the execute command without any pre-configured scope.", + "type": "string", + "enum": [ + "shell:allow-execute" + ] + }, + { + "description": "shell:allow-kill -> Enables the kill command without any pre-configured scope.", + "type": "string", + "enum": [ + "shell:allow-kill" + ] + }, + { + "description": "shell:allow-open -> Enables the open command without any pre-configured scope.", + "type": "string", + "enum": [ + "shell:allow-open" + ] + }, + { + "description": "shell:allow-stdin-write -> Enables the stdin_write command without any pre-configured scope.", + "type": "string", + "enum": [ + "shell:allow-stdin-write" + ] + }, + { + "description": "shell:deny-execute -> Denies the execute command without any pre-configured scope.", + "type": "string", + "enum": [ + "shell:deny-execute" + ] + }, + { + "description": "shell:deny-kill -> Denies the kill command without any pre-configured scope.", + "type": "string", + "enum": [ + "shell:deny-kill" + ] + }, + { + "description": "shell:deny-open -> Denies the open command without any pre-configured scope.", + "type": "string", + "enum": [ + "shell:deny-open" + ] + }, + { + "description": "shell:deny-stdin-write -> Denies the stdin_write command without any pre-configured scope.", + "type": "string", + "enum": [ + "shell:deny-stdin-write" + ] + }, + { + "description": "tray:default -> Default permissions for the plugin.", + "type": "string", + "enum": [ + "tray:default" + ] + }, + { + "description": "tray:allow-new -> Enables the new command without any pre-configured scope.", + "type": "string", + "enum": [ + "tray:allow-new" + ] + }, + { + "description": "tray:allow-set-icon -> Enables the set_icon command without any pre-configured scope.", + "type": "string", + "enum": [ + "tray:allow-set-icon" + ] + }, + { + "description": "tray:allow-set-icon-as-template -> Enables the set_icon_as_template command without any pre-configured scope.", + "type": "string", + "enum": [ + "tray:allow-set-icon-as-template" + ] + }, + { + "description": "tray:allow-set-menu -> Enables the set_menu command without any pre-configured scope.", + "type": "string", + "enum": [ + "tray:allow-set-menu" + ] + }, + { + "description": "tray:allow-set-show-menu-on-left-click -> Enables the set_show_menu_on_left_click command without any pre-configured scope.", + "type": "string", + "enum": [ + "tray:allow-set-show-menu-on-left-click" + ] + }, + { + "description": "tray:allow-set-temp-dir-path -> Enables the set_temp_dir_path command without any pre-configured scope.", + "type": "string", + "enum": [ + "tray:allow-set-temp-dir-path" + ] + }, + { + "description": "tray:allow-set-title -> Enables the set_title command without any pre-configured scope.", + "type": "string", + "enum": [ + "tray:allow-set-title" + ] + }, + { + "description": "tray:allow-set-tooltip -> Enables the set_tooltip command without any pre-configured scope.", + "type": "string", + "enum": [ + "tray:allow-set-tooltip" + ] + }, + { + "description": "tray:allow-set-visible -> Enables the set_visible command without any pre-configured scope.", + "type": "string", + "enum": [ + "tray:allow-set-visible" + ] + }, + { + "description": "tray:deny-new -> Denies the new command without any pre-configured scope.", + "type": "string", + "enum": [ + "tray:deny-new" + ] + }, + { + "description": "tray:deny-set-icon -> Denies the set_icon command without any pre-configured scope.", + "type": "string", + "enum": [ + "tray:deny-set-icon" + ] + }, + { + "description": "tray:deny-set-icon-as-template -> Denies the set_icon_as_template command without any pre-configured scope.", + "type": "string", + "enum": [ + "tray:deny-set-icon-as-template" + ] + }, + { + "description": "tray:deny-set-menu -> Denies the set_menu command without any pre-configured scope.", + "type": "string", + "enum": [ + "tray:deny-set-menu" + ] + }, + { + "description": "tray:deny-set-show-menu-on-left-click -> Denies the set_show_menu_on_left_click command without any pre-configured scope.", + "type": "string", + "enum": [ + "tray:deny-set-show-menu-on-left-click" + ] + }, + { + "description": "tray:deny-set-temp-dir-path -> Denies the set_temp_dir_path command without any pre-configured scope.", + "type": "string", + "enum": [ + "tray:deny-set-temp-dir-path" + ] + }, + { + "description": "tray:deny-set-title -> Denies the set_title command without any pre-configured scope.", + "type": "string", + "enum": [ + "tray:deny-set-title" + ] + }, + { + "description": "tray:deny-set-tooltip -> Denies the set_tooltip command without any pre-configured scope.", + "type": "string", + "enum": [ + "tray:deny-set-tooltip" + ] + }, + { + "description": "tray:deny-set-visible -> Denies the set_visible command without any pre-configured scope.", + "type": "string", + "enum": [ + "tray:deny-set-visible" + ] + }, + { + "description": "updater:default -> Allows checking for new updates and installing them", + "type": "string", + "enum": [ + "updater:default" + ] + }, + { + "description": "updater:allow-check -> Enables the check command without any pre-configured scope.", + "type": "string", + "enum": [ + "updater:allow-check" + ] + }, + { + "description": "updater:allow-download-and-install -> Enables the download_and_install command without any pre-configured scope.", + "type": "string", + "enum": [ + "updater:allow-download-and-install" + ] + }, + { + "description": "updater:deny-check -> Denies the check command without any pre-configured scope.", + "type": "string", + "enum": [ + "updater:deny-check" + ] + }, + { + "description": "updater:deny-download-and-install -> Denies the download_and_install command without any pre-configured scope.", + "type": "string", + "enum": [ + "updater:deny-download-and-install" + ] + }, + { + "description": "webview:default -> Default permissions for the plugin.", + "type": "string", + "enum": [ + "webview:default" + ] + }, + { + "description": "webview:allow-create-webview -> Enables the create_webview command without any pre-configured scope.", + "type": "string", + "enum": [ + "webview:allow-create-webview" + ] + }, + { + "description": "webview:allow-create-webview-window -> Enables the create_webview_window command without any pre-configured scope.", + "type": "string", + "enum": [ + "webview:allow-create-webview-window" + ] + }, + { + "description": "webview:allow-internal-toggle-devtools -> Enables the internal_toggle_devtools command without any pre-configured scope.", + "type": "string", + "enum": [ + "webview:allow-internal-toggle-devtools" + ] + }, + { + "description": "webview:allow-print -> Enables the print command without any pre-configured scope.", + "type": "string", + "enum": [ + "webview:allow-print" + ] + }, + { + "description": "webview:allow-set-webview-focus -> Enables the set_webview_focus command without any pre-configured scope.", + "type": "string", + "enum": [ + "webview:allow-set-webview-focus" + ] + }, + { + "description": "webview:allow-set-webview-position -> Enables the set_webview_position command without any pre-configured scope.", + "type": "string", + "enum": [ + "webview:allow-set-webview-position" + ] + }, + { + "description": "webview:allow-set-webview-size -> Enables the set_webview_size command without any pre-configured scope.", + "type": "string", + "enum": [ + "webview:allow-set-webview-size" + ] + }, + { + "description": "webview:allow-webview-close -> Enables the webview_close command without any pre-configured scope.", + "type": "string", + "enum": [ + "webview:allow-webview-close" + ] + }, + { + "description": "webview:allow-webview-position -> Enables the webview_position command without any pre-configured scope.", + "type": "string", + "enum": [ + "webview:allow-webview-position" + ] + }, + { + "description": "webview:allow-webview-size -> Enables the webview_size command without any pre-configured scope.", + "type": "string", + "enum": [ + "webview:allow-webview-size" + ] + }, + { + "description": "webview:deny-create-webview -> Denies the create_webview command without any pre-configured scope.", + "type": "string", + "enum": [ + "webview:deny-create-webview" + ] + }, + { + "description": "webview:deny-create-webview-window -> Denies the create_webview_window command without any pre-configured scope.", + "type": "string", + "enum": [ + "webview:deny-create-webview-window" + ] + }, + { + "description": "webview:deny-internal-toggle-devtools -> Denies the internal_toggle_devtools command without any pre-configured scope.", + "type": "string", + "enum": [ + "webview:deny-internal-toggle-devtools" + ] + }, + { + "description": "webview:deny-print -> Denies the print command without any pre-configured scope.", + "type": "string", + "enum": [ + "webview:deny-print" + ] + }, + { + "description": "webview:deny-set-webview-focus -> Denies the set_webview_focus command without any pre-configured scope.", + "type": "string", + "enum": [ + "webview:deny-set-webview-focus" + ] + }, + { + "description": "webview:deny-set-webview-position -> Denies the set_webview_position command without any pre-configured scope.", + "type": "string", + "enum": [ + "webview:deny-set-webview-position" + ] + }, + { + "description": "webview:deny-set-webview-size -> Denies the set_webview_size command without any pre-configured scope.", + "type": "string", + "enum": [ + "webview:deny-set-webview-size" + ] + }, + { + "description": "webview:deny-webview-close -> Denies the webview_close command without any pre-configured scope.", + "type": "string", + "enum": [ + "webview:deny-webview-close" + ] + }, + { + "description": "webview:deny-webview-position -> Denies the webview_position command without any pre-configured scope.", + "type": "string", + "enum": [ + "webview:deny-webview-position" + ] + }, + { + "description": "webview:deny-webview-size -> Denies the webview_size command without any pre-configured scope.", + "type": "string", + "enum": [ + "webview:deny-webview-size" + ] + }, + { + "description": "window:default -> Default permissions for the plugin.", + "type": "string", + "enum": [ + "window:default" + ] + }, + { + "description": "window:allow-available-monitors -> Enables the available_monitors command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-available-monitors" + ] + }, + { + "description": "window:allow-center -> Enables the center command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-center" + ] + }, + { + "description": "window:allow-close -> Enables the close command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-close" + ] + }, + { + "description": "window:allow-create -> Enables the create command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-create" + ] + }, + { + "description": "window:allow-current-monitor -> Enables the current_monitor command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-current-monitor" + ] + }, + { + "description": "window:allow-destroy -> Enables the destroy command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-destroy" + ] + }, + { + "description": "window:allow-hide -> Enables the hide command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-hide" + ] + }, + { + "description": "window:allow-inner-position -> Enables the inner_position command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-inner-position" + ] + }, + { + "description": "window:allow-inner-size -> Enables the inner_size command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-inner-size" + ] + }, + { + "description": "window:allow-internal-on-mousedown -> Enables the internal_on_mousedown command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-internal-on-mousedown" + ] + }, + { + "description": "window:allow-internal-on-mousemove -> Enables the internal_on_mousemove command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-internal-on-mousemove" + ] + }, + { + "description": "window:allow-internal-toggle-maximize -> Enables the internal_toggle_maximize command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-internal-toggle-maximize" + ] + }, + { + "description": "window:allow-is-closable -> Enables the is_closable command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-is-closable" + ] + }, + { + "description": "window:allow-is-decorated -> Enables the is_decorated command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-is-decorated" + ] + }, + { + "description": "window:allow-is-focused -> Enables the is_focused command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-is-focused" + ] + }, + { + "description": "window:allow-is-fullscreen -> Enables the is_fullscreen command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-is-fullscreen" + ] + }, + { + "description": "window:allow-is-maximizable -> Enables the is_maximizable command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-is-maximizable" + ] + }, + { + "description": "window:allow-is-maximized -> Enables the is_maximized command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-is-maximized" + ] + }, + { + "description": "window:allow-is-minimizable -> Enables the is_minimizable command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-is-minimizable" + ] + }, + { + "description": "window:allow-is-minimized -> Enables the is_minimized command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-is-minimized" + ] + }, + { + "description": "window:allow-is-resizable -> Enables the is_resizable command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-is-resizable" + ] + }, + { + "description": "window:allow-is-visible -> Enables the is_visible command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-is-visible" + ] + }, + { + "description": "window:allow-maximize -> Enables the maximize command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-maximize" + ] + }, + { + "description": "window:allow-minimize -> Enables the minimize command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-minimize" + ] + }, + { + "description": "window:allow-outer-position -> Enables the outer_position command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-outer-position" + ] + }, + { + "description": "window:allow-outer-size -> Enables the outer_size command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-outer-size" + ] + }, + { + "description": "window:allow-primary-monitor -> Enables the primary_monitor command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-primary-monitor" + ] + }, + { + "description": "window:allow-request-user-attention -> Enables the request_user_attention command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-request-user-attention" + ] + }, + { + "description": "window:allow-scale-factor -> Enables the scale_factor command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-scale-factor" + ] + }, + { + "description": "window:allow-set-always-on-bottom -> Enables the set_always_on_bottom command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-set-always-on-bottom" + ] + }, + { + "description": "window:allow-set-always-on-top -> Enables the set_always_on_top command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-set-always-on-top" + ] + }, + { + "description": "window:allow-set-closable -> Enables the set_closable command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-set-closable" + ] + }, + { + "description": "window:allow-set-content-protected -> Enables the set_content_protected command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-set-content-protected" + ] + }, + { + "description": "window:allow-set-cursor-grab -> Enables the set_cursor_grab command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-set-cursor-grab" + ] + }, + { + "description": "window:allow-set-cursor-icon -> Enables the set_cursor_icon command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-set-cursor-icon" + ] + }, + { + "description": "window:allow-set-cursor-position -> Enables the set_cursor_position command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-set-cursor-position" + ] + }, + { + "description": "window:allow-set-cursor-visible -> Enables the set_cursor_visible command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-set-cursor-visible" + ] + }, + { + "description": "window:allow-set-decorations -> Enables the set_decorations command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-set-decorations" + ] + }, + { + "description": "window:allow-set-effects -> Enables the set_effects command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-set-effects" + ] + }, + { + "description": "window:allow-set-focus -> Enables the set_focus command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-set-focus" + ] + }, + { + "description": "window:allow-set-fullscreen -> Enables the set_fullscreen command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-set-fullscreen" + ] + }, + { + "description": "window:allow-set-icon -> Enables the set_icon command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-set-icon" + ] + }, + { + "description": "window:allow-set-ignore-cursor-events -> Enables the set_ignore_cursor_events command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-set-ignore-cursor-events" + ] + }, + { + "description": "window:allow-set-max-size -> Enables the set_max_size command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-set-max-size" + ] + }, + { + "description": "window:allow-set-maximizable -> Enables the set_maximizable command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-set-maximizable" + ] + }, + { + "description": "window:allow-set-min-size -> Enables the set_min_size command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-set-min-size" + ] + }, + { + "description": "window:allow-set-minimizable -> Enables the set_minimizable command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-set-minimizable" + ] + }, + { + "description": "window:allow-set-position -> Enables the set_position command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-set-position" + ] + }, + { + "description": "window:allow-set-progress-bar -> Enables the set_progress_bar command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-set-progress-bar" + ] + }, + { + "description": "window:allow-set-resizable -> Enables the set_resizable command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-set-resizable" + ] + }, + { + "description": "window:allow-set-shadow -> Enables the set_shadow command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-set-shadow" + ] + }, + { + "description": "window:allow-set-size -> Enables the set_size command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-set-size" + ] + }, + { + "description": "window:allow-set-skip-taskbar -> Enables the set_skip_taskbar command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-set-skip-taskbar" + ] + }, + { + "description": "window:allow-set-title -> Enables the set_title command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-set-title" + ] + }, + { + "description": "window:allow-set-visible-on-all-workspaces -> Enables the set_visible_on_all_workspaces command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-set-visible-on-all-workspaces" + ] + }, + { + "description": "window:allow-show -> Enables the show command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-show" + ] + }, + { + "description": "window:allow-start-dragging -> Enables the start_dragging command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-start-dragging" + ] + }, + { + "description": "window:allow-theme -> Enables the theme command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-theme" + ] + }, + { + "description": "window:allow-title -> Enables the title command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-title" + ] + }, + { + "description": "window:allow-toggle-maximize -> Enables the toggle_maximize command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-toggle-maximize" + ] + }, + { + "description": "window:allow-unmaximize -> Enables the unmaximize command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-unmaximize" + ] + }, + { + "description": "window:allow-unminimize -> Enables the unminimize command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-unminimize" + ] + }, + { + "description": "window:deny-available-monitors -> Denies the available_monitors command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-available-monitors" + ] + }, + { + "description": "window:deny-center -> Denies the center command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-center" + ] + }, + { + "description": "window:deny-close -> Denies the close command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-close" + ] + }, + { + "description": "window:deny-create -> Denies the create command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-create" + ] + }, + { + "description": "window:deny-current-monitor -> Denies the current_monitor command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-current-monitor" + ] + }, + { + "description": "window:deny-destroy -> Denies the destroy command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-destroy" + ] + }, + { + "description": "window:deny-hide -> Denies the hide command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-hide" + ] + }, + { + "description": "window:deny-inner-position -> Denies the inner_position command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-inner-position" + ] + }, + { + "description": "window:deny-inner-size -> Denies the inner_size command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-inner-size" + ] + }, + { + "description": "window:deny-internal-on-mousedown -> Denies the internal_on_mousedown command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-internal-on-mousedown" + ] + }, + { + "description": "window:deny-internal-on-mousemove -> Denies the internal_on_mousemove command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-internal-on-mousemove" + ] + }, + { + "description": "window:deny-internal-toggle-maximize -> Denies the internal_toggle_maximize command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-internal-toggle-maximize" + ] + }, + { + "description": "window:deny-is-closable -> Denies the is_closable command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-is-closable" + ] + }, + { + "description": "window:deny-is-decorated -> Denies the is_decorated command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-is-decorated" + ] + }, + { + "description": "window:deny-is-focused -> Denies the is_focused command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-is-focused" + ] + }, + { + "description": "window:deny-is-fullscreen -> Denies the is_fullscreen command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-is-fullscreen" + ] + }, + { + "description": "window:deny-is-maximizable -> Denies the is_maximizable command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-is-maximizable" + ] + }, + { + "description": "window:deny-is-maximized -> Denies the is_maximized command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-is-maximized" + ] + }, + { + "description": "window:deny-is-minimizable -> Denies the is_minimizable command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-is-minimizable" + ] + }, + { + "description": "window:deny-is-minimized -> Denies the is_minimized command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-is-minimized" + ] + }, + { + "description": "window:deny-is-resizable -> Denies the is_resizable command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-is-resizable" + ] + }, + { + "description": "window:deny-is-visible -> Denies the is_visible command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-is-visible" + ] + }, + { + "description": "window:deny-maximize -> Denies the maximize command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-maximize" + ] + }, + { + "description": "window:deny-minimize -> Denies the minimize command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-minimize" + ] + }, + { + "description": "window:deny-outer-position -> Denies the outer_position command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-outer-position" + ] + }, + { + "description": "window:deny-outer-size -> Denies the outer_size command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-outer-size" + ] + }, + { + "description": "window:deny-primary-monitor -> Denies the primary_monitor command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-primary-monitor" + ] + }, + { + "description": "window:deny-request-user-attention -> Denies the request_user_attention command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-request-user-attention" + ] + }, + { + "description": "window:deny-scale-factor -> Denies the scale_factor command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-scale-factor" + ] + }, + { + "description": "window:deny-set-always-on-bottom -> Denies the set_always_on_bottom command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-set-always-on-bottom" + ] + }, + { + "description": "window:deny-set-always-on-top -> Denies the set_always_on_top command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-set-always-on-top" + ] + }, + { + "description": "window:deny-set-closable -> Denies the set_closable command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-set-closable" + ] + }, + { + "description": "window:deny-set-content-protected -> Denies the set_content_protected command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-set-content-protected" + ] + }, + { + "description": "window:deny-set-cursor-grab -> Denies the set_cursor_grab command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-set-cursor-grab" + ] + }, + { + "description": "window:deny-set-cursor-icon -> Denies the set_cursor_icon command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-set-cursor-icon" + ] + }, + { + "description": "window:deny-set-cursor-position -> Denies the set_cursor_position command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-set-cursor-position" + ] + }, + { + "description": "window:deny-set-cursor-visible -> Denies the set_cursor_visible command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-set-cursor-visible" + ] + }, + { + "description": "window:deny-set-decorations -> Denies the set_decorations command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-set-decorations" + ] + }, + { + "description": "window:deny-set-effects -> Denies the set_effects command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-set-effects" + ] + }, + { + "description": "window:deny-set-focus -> Denies the set_focus command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-set-focus" + ] + }, + { + "description": "window:deny-set-fullscreen -> Denies the set_fullscreen command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-set-fullscreen" + ] + }, + { + "description": "window:deny-set-icon -> Denies the set_icon command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-set-icon" + ] + }, + { + "description": "window:deny-set-ignore-cursor-events -> Denies the set_ignore_cursor_events command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-set-ignore-cursor-events" + ] + }, + { + "description": "window:deny-set-max-size -> Denies the set_max_size command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-set-max-size" + ] + }, + { + "description": "window:deny-set-maximizable -> Denies the set_maximizable command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-set-maximizable" + ] + }, + { + "description": "window:deny-set-min-size -> Denies the set_min_size command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-set-min-size" + ] + }, + { + "description": "window:deny-set-minimizable -> Denies the set_minimizable command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-set-minimizable" + ] + }, + { + "description": "window:deny-set-position -> Denies the set_position command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-set-position" + ] + }, + { + "description": "window:deny-set-progress-bar -> Denies the set_progress_bar command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-set-progress-bar" + ] + }, + { + "description": "window:deny-set-resizable -> Denies the set_resizable command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-set-resizable" + ] + }, + { + "description": "window:deny-set-shadow -> Denies the set_shadow command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-set-shadow" + ] + }, + { + "description": "window:deny-set-size -> Denies the set_size command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-set-size" + ] + }, + { + "description": "window:deny-set-skip-taskbar -> Denies the set_skip_taskbar command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-set-skip-taskbar" + ] + }, + { + "description": "window:deny-set-title -> Denies the set_title command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-set-title" + ] + }, + { + "description": "window:deny-set-visible-on-all-workspaces -> Denies the set_visible_on_all_workspaces command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-set-visible-on-all-workspaces" + ] + }, + { + "description": "window:deny-show -> Denies the show command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-show" + ] + }, + { + "description": "window:deny-start-dragging -> Denies the start_dragging command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-start-dragging" + ] + }, + { + "description": "window:deny-theme -> Denies the theme command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-theme" + ] + }, + { + "description": "window:deny-title -> Denies the title command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-title" + ] + }, + { + "description": "window:deny-toggle-maximize -> Denies the toggle_maximize command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-toggle-maximize" + ] + }, + { + "description": "window:deny-unmaximize -> Denies the unmaximize command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-unmaximize" + ] + }, + { + "description": "window:deny-unminimize -> Denies the unminimize command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-unminimize" + ] + } + ] + }, + "Value": { + "description": "All supported ACL values.", + "anyOf": [ + { + "description": "Represents a null JSON value.", + "type": "null" + }, + { + "description": "Represents a [`bool`].", + "type": "boolean" + }, + { + "description": "Represents a valid ACL [`Number`].", + "allOf": [ + { + "$ref": "#/definitions/Number" + } + ] + }, + { + "description": "Represents a [`String`].", + "type": "string" + }, + { + "description": "Represents a list of other [`Value`]s.", + "type": "array", + "items": { + "$ref": "#/definitions/Value" + } + }, + { + "description": "Represents a map of [`String`] keys to [`Value`]s.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/Value" + } + } + ] + }, + "Number": { + "description": "A valid ACL number.", + "anyOf": [ + { + "description": "Represents an [`i64`].", + "type": "integer", + "format": "int64" + }, + { + "description": "Represents a [`f64`].", + "type": "number", + "format": "double" + } + ] + }, + "Target": { + "description": "Platform target.", + "oneOf": [ + { + "description": "MacOS.", + "type": "string", + "enum": [ + "macOS" + ] + }, + { + "description": "Windows.", + "type": "string", + "enum": [ + "windows" + ] + }, + { + "description": "Linux.", + "type": "string", + "enum": [ + "linux" + ] + }, + { + "description": "Android.", + "type": "string", + "enum": [ + "android" + ] + }, + { + "description": "iOS.", + "type": "string", + "enum": [ + "iOS" + ] + } + ] + } + } +} \ No newline at end of file diff --git a/examples/api/src-tauri/capabilities/schemas/mobile-schema.json b/examples/api/src-tauri/capabilities/schemas/mobile-schema.json new file mode 100644 index 000000000..c296543f8 --- /dev/null +++ b/examples/api/src-tauri/capabilities/schemas/mobile-schema.json @@ -0,0 +1,6925 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "CapabilityFile", + "description": "Capability formats accepted in a capability file.", + "anyOf": [ + { + "description": "A single capability.", + "allOf": [ + { + "$ref": "#/definitions/Capability" + } + ] + }, + { + "description": "A list of capabilities.", + "type": "object", + "required": [ + "capabilities" + ], + "properties": { + "capabilities": { + "description": "The list of capabilities.", + "type": "array", + "items": { + "$ref": "#/definitions/Capability" + } + } + } + } + ], + "definitions": { + "Capability": { + "description": "a grouping and boundary mechanism developers can use to separate windows or plugins functionality from each other at runtime.\n\nIf a window is not matching any capability then it has no access to the IPC layer at all.\n\nThis can be done to create trust groups and reduce impact of vulnerabilities in certain plugins or windows. Windows can be added to a capability by exact name or glob patterns like *, admin-* or main-window.", + "type": "object", + "required": [ + "identifier", + "permissions", + "windows" + ], + "properties": { + "identifier": { + "description": "Identifier of the capability.", + "type": "string" + }, + "description": { + "description": "Description of the capability.", + "default": "", + "type": "string" + }, + "context": { + "description": "Execution context of the capability.\n\nAt runtime, Tauri filters the IPC command together with the context to determine wheter it is allowed or not and its scope.", + "default": "local", + "allOf": [ + { + "$ref": "#/definitions/CapabilityContext" + } + ] + }, + "windows": { + "description": "List of windows that uses this capability. Can be a glob pattern.", + "type": "array", + "items": { + "type": "string" + } + }, + "permissions": { + "description": "List of permissions attached to this capability. Must include the plugin name as prefix in the form of `${plugin-name}:${permission-name}`.", + "type": "array", + "items": { + "$ref": "#/definitions/PermissionEntry" + } + }, + "platforms": { + "description": "Target platforms this capability applies. By default all platforms applies.", + "default": [ + "linux", + "macOS", + "windows", + "android", + "iOS" + ], + "type": "array", + "items": { + "$ref": "#/definitions/Target" + } + } + } + }, + "CapabilityContext": { + "description": "Context of the capability.", + "oneOf": [ + { + "description": "Capability refers to local URL usage.", + "type": "string", + "enum": [ + "local" + ] + }, + { + "description": "Capability refers to remote usage.", + "type": "object", + "required": [ + "remote" + ], + "properties": { + "remote": { + "type": "object", + "required": [ + "domains" + ], + "properties": { + "domains": { + "description": "Remote domains this capability refers to. Can use glob patterns.", + "type": "array", + "items": { + "type": "string" + } + } + } + } + }, + "additionalProperties": false + } + ] + }, + "PermissionEntry": { + "description": "An entry for a permission value in a [`Capability`] can be either a raw permission [`Identifier`] or an object that references a permission and extends its scope.", + "anyOf": [ + { + "description": "Reference a permission or permission set by identifier.", + "allOf": [ + { + "$ref": "#/definitions/Identifier" + } + ] + }, + { + "description": "Reference a permission or permission set by identifier and extends its scope.", + "type": "object", + "oneOf": [ + { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "oneOf": [ + { + "description": "fs:default -> # Tauri `fs` default permissions\n\nThis configuration file defines the default permissions granted\nto the filesystem.\n\n### Granted Permissions\n\nThis default permission set enables all read-related commands and\nallows access to the `$APP` folder and sub directories created in it.\nThe location of the `$APP` folder depends on the operating system,\nwhere the application is run.\n\nIn general the `$APP` folder needs to be manually created\nby the application at runtime, before accessing files or folders\nin it is possible.\n\n### Denied Permissions\n\nThis default permission set prevents access to critical components\nof the Tauri application by default.\nOn Windows the webview data folder access is denied.\n\n", + "type": "string", + "enum": [ + "fs:default" + ] + }, + { + "description": "fs:allow-app-meta -> This allows read access to metadata of the `$APP` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-app-meta" + ] + }, + { + "description": "fs:allow-app-meta-recursive -> This allows read access to metadata of the `$APP` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-app-meta-recursive" + ] + }, + { + "description": "fs:allow-app-read -> This allows non-recursive read access to the `$APP` folder.", + "type": "string", + "enum": [ + "fs:allow-app-read" + ] + }, + { + "description": "fs:allow-app-read-recursive -> This allows full recursive read access to the complete `$APP` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-app-read-recursive" + ] + }, + { + "description": "fs:allow-app-write -> This allows non-recursive write access to the `$APP` folder.", + "type": "string", + "enum": [ + "fs:allow-app-write" + ] + }, + { + "description": "fs:allow-app-write-recursive -> This allows full recusrive write access to the complete `$APP` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-app-write-recursive" + ] + }, + { + "description": "fs:allow-appcache-meta -> This allows read access to metadata of the `$APPCACHE` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-appcache-meta" + ] + }, + { + "description": "fs:allow-appcache-meta-recursive -> This allows read access to metadata of the `$APPCACHE` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-appcache-meta-recursive" + ] + }, + { + "description": "fs:allow-appcache-read -> This allows non-recursive read access to the `$APPCACHE` folder.", + "type": "string", + "enum": [ + "fs:allow-appcache-read" + ] + }, + { + "description": "fs:allow-appcache-read-recursive -> This allows full recursive read access to the complete `$APPCACHE` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-appcache-read-recursive" + ] + }, + { + "description": "fs:allow-appcache-write -> This allows non-recursive write access to the `$APPCACHE` folder.", + "type": "string", + "enum": [ + "fs:allow-appcache-write" + ] + }, + { + "description": "fs:allow-appcache-write-recursive -> This allows full recusrive write access to the complete `$APPCACHE` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-appcache-write-recursive" + ] + }, + { + "description": "fs:allow-appconfig-meta -> This allows read access to metadata of the `$APPCONFIG` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-appconfig-meta" + ] + }, + { + "description": "fs:allow-appconfig-meta-recursive -> This allows read access to metadata of the `$APPCONFIG` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-appconfig-meta-recursive" + ] + }, + { + "description": "fs:allow-appconfig-read -> This allows non-recursive read access to the `$APPCONFIG` folder.", + "type": "string", + "enum": [ + "fs:allow-appconfig-read" + ] + }, + { + "description": "fs:allow-appconfig-read-recursive -> This allows full recursive read access to the complete `$APPCONFIG` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-appconfig-read-recursive" + ] + }, + { + "description": "fs:allow-appconfig-write -> This allows non-recursive write access to the `$APPCONFIG` folder.", + "type": "string", + "enum": [ + "fs:allow-appconfig-write" + ] + }, + { + "description": "fs:allow-appconfig-write-recursive -> This allows full recusrive write access to the complete `$APPCONFIG` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-appconfig-write-recursive" + ] + }, + { + "description": "fs:allow-appdata-meta -> This allows read access to metadata of the `$APPDATA` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-appdata-meta" + ] + }, + { + "description": "fs:allow-appdata-meta-recursive -> This allows read access to metadata of the `$APPDATA` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-appdata-meta-recursive" + ] + }, + { + "description": "fs:allow-appdata-read -> This allows non-recursive read access to the `$APPDATA` folder.", + "type": "string", + "enum": [ + "fs:allow-appdata-read" + ] + }, + { + "description": "fs:allow-appdata-read-recursive -> This allows full recursive read access to the complete `$APPDATA` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-appdata-read-recursive" + ] + }, + { + "description": "fs:allow-appdata-write -> This allows non-recursive write access to the `$APPDATA` folder.", + "type": "string", + "enum": [ + "fs:allow-appdata-write" + ] + }, + { + "description": "fs:allow-appdata-write-recursive -> This allows full recusrive write access to the complete `$APPDATA` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-appdata-write-recursive" + ] + }, + { + "description": "fs:allow-applocaldata-meta -> This allows read access to metadata of the `$APPLOCALDATA` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-applocaldata-meta" + ] + }, + { + "description": "fs:allow-applocaldata-meta-recursive -> This allows read access to metadata of the `$APPLOCALDATA` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-applocaldata-meta-recursive" + ] + }, + { + "description": "fs:allow-applocaldata-read -> This allows non-recursive read access to the `$APPLOCALDATA` folder.", + "type": "string", + "enum": [ + "fs:allow-applocaldata-read" + ] + }, + { + "description": "fs:allow-applocaldata-read-recursive -> This allows full recursive read access to the complete `$APPLOCALDATA` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-applocaldata-read-recursive" + ] + }, + { + "description": "fs:allow-applocaldata-write -> This allows non-recursive write access to the `$APPLOCALDATA` folder.", + "type": "string", + "enum": [ + "fs:allow-applocaldata-write" + ] + }, + { + "description": "fs:allow-applocaldata-write-recursive -> This allows full recusrive write access to the complete `$APPLOCALDATA` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-applocaldata-write-recursive" + ] + }, + { + "description": "fs:allow-applog-meta -> This allows read access to metadata of the `$APPLOG` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-applog-meta" + ] + }, + { + "description": "fs:allow-applog-meta-recursive -> This allows read access to metadata of the `$APPLOG` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-applog-meta-recursive" + ] + }, + { + "description": "fs:allow-applog-read -> This allows non-recursive read access to the `$APPLOG` folder.", + "type": "string", + "enum": [ + "fs:allow-applog-read" + ] + }, + { + "description": "fs:allow-applog-read-recursive -> This allows full recursive read access to the complete `$APPLOG` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-applog-read-recursive" + ] + }, + { + "description": "fs:allow-applog-write -> This allows non-recursive write access to the `$APPLOG` folder.", + "type": "string", + "enum": [ + "fs:allow-applog-write" + ] + }, + { + "description": "fs:allow-applog-write-recursive -> This allows full recusrive write access to the complete `$APPLOG` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-applog-write-recursive" + ] + }, + { + "description": "fs:allow-audio-meta -> This allows read access to metadata of the `$AUDIO` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-audio-meta" + ] + }, + { + "description": "fs:allow-audio-meta-recursive -> This allows read access to metadata of the `$AUDIO` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-audio-meta-recursive" + ] + }, + { + "description": "fs:allow-audio-read -> This allows non-recursive read access to the `$AUDIO` folder.", + "type": "string", + "enum": [ + "fs:allow-audio-read" + ] + }, + { + "description": "fs:allow-audio-read-recursive -> This allows full recursive read access to the complete `$AUDIO` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-audio-read-recursive" + ] + }, + { + "description": "fs:allow-audio-write -> This allows non-recursive write access to the `$AUDIO` folder.", + "type": "string", + "enum": [ + "fs:allow-audio-write" + ] + }, + { + "description": "fs:allow-audio-write-recursive -> This allows full recusrive write access to the complete `$AUDIO` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-audio-write-recursive" + ] + }, + { + "description": "fs:allow-cache-meta -> This allows read access to metadata of the `$CACHE` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-cache-meta" + ] + }, + { + "description": "fs:allow-cache-meta-recursive -> This allows read access to metadata of the `$CACHE` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-cache-meta-recursive" + ] + }, + { + "description": "fs:allow-cache-read -> This allows non-recursive read access to the `$CACHE` folder.", + "type": "string", + "enum": [ + "fs:allow-cache-read" + ] + }, + { + "description": "fs:allow-cache-read-recursive -> This allows full recursive read access to the complete `$CACHE` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-cache-read-recursive" + ] + }, + { + "description": "fs:allow-cache-write -> This allows non-recursive write access to the `$CACHE` folder.", + "type": "string", + "enum": [ + "fs:allow-cache-write" + ] + }, + { + "description": "fs:allow-cache-write-recursive -> This allows full recusrive write access to the complete `$CACHE` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-cache-write-recursive" + ] + }, + { + "description": "fs:allow-config-meta -> This allows read access to metadata of the `$CONFIG` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-config-meta" + ] + }, + { + "description": "fs:allow-config-meta-recursive -> This allows read access to metadata of the `$CONFIG` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-config-meta-recursive" + ] + }, + { + "description": "fs:allow-config-read -> This allows non-recursive read access to the `$CONFIG` folder.", + "type": "string", + "enum": [ + "fs:allow-config-read" + ] + }, + { + "description": "fs:allow-config-read-recursive -> This allows full recursive read access to the complete `$CONFIG` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-config-read-recursive" + ] + }, + { + "description": "fs:allow-config-write -> This allows non-recursive write access to the `$CONFIG` folder.", + "type": "string", + "enum": [ + "fs:allow-config-write" + ] + }, + { + "description": "fs:allow-config-write-recursive -> This allows full recusrive write access to the complete `$CONFIG` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-config-write-recursive" + ] + }, + { + "description": "fs:allow-data-meta -> This allows read access to metadata of the `$DATA` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-data-meta" + ] + }, + { + "description": "fs:allow-data-meta-recursive -> This allows read access to metadata of the `$DATA` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-data-meta-recursive" + ] + }, + { + "description": "fs:allow-data-read -> This allows non-recursive read access to the `$DATA` folder.", + "type": "string", + "enum": [ + "fs:allow-data-read" + ] + }, + { + "description": "fs:allow-data-read-recursive -> This allows full recursive read access to the complete `$DATA` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-data-read-recursive" + ] + }, + { + "description": "fs:allow-data-write -> This allows non-recursive write access to the `$DATA` folder.", + "type": "string", + "enum": [ + "fs:allow-data-write" + ] + }, + { + "description": "fs:allow-data-write-recursive -> This allows full recusrive write access to the complete `$DATA` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-data-write-recursive" + ] + }, + { + "description": "fs:allow-desktop-meta -> This allows read access to metadata of the `$DESKTOP` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-desktop-meta" + ] + }, + { + "description": "fs:allow-desktop-meta-recursive -> This allows read access to metadata of the `$DESKTOP` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-desktop-meta-recursive" + ] + }, + { + "description": "fs:allow-desktop-read -> This allows non-recursive read access to the `$DESKTOP` folder.", + "type": "string", + "enum": [ + "fs:allow-desktop-read" + ] + }, + { + "description": "fs:allow-desktop-read-recursive -> This allows full recursive read access to the complete `$DESKTOP` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-desktop-read-recursive" + ] + }, + { + "description": "fs:allow-desktop-write -> This allows non-recursive write access to the `$DESKTOP` folder.", + "type": "string", + "enum": [ + "fs:allow-desktop-write" + ] + }, + { + "description": "fs:allow-desktop-write-recursive -> This allows full recusrive write access to the complete `$DESKTOP` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-desktop-write-recursive" + ] + }, + { + "description": "fs:allow-document-meta -> This allows read access to metadata of the `$DOCUMENT` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-document-meta" + ] + }, + { + "description": "fs:allow-document-meta-recursive -> This allows read access to metadata of the `$DOCUMENT` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-document-meta-recursive" + ] + }, + { + "description": "fs:allow-document-read -> This allows non-recursive read access to the `$DOCUMENT` folder.", + "type": "string", + "enum": [ + "fs:allow-document-read" + ] + }, + { + "description": "fs:allow-document-read-recursive -> This allows full recursive read access to the complete `$DOCUMENT` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-document-read-recursive" + ] + }, + { + "description": "fs:allow-document-write -> This allows non-recursive write access to the `$DOCUMENT` folder.", + "type": "string", + "enum": [ + "fs:allow-document-write" + ] + }, + { + "description": "fs:allow-document-write-recursive -> This allows full recusrive write access to the complete `$DOCUMENT` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-document-write-recursive" + ] + }, + { + "description": "fs:allow-download-meta -> This allows read access to metadata of the `$DOWNLOAD` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-download-meta" + ] + }, + { + "description": "fs:allow-download-meta-recursive -> This allows read access to metadata of the `$DOWNLOAD` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-download-meta-recursive" + ] + }, + { + "description": "fs:allow-download-read -> This allows non-recursive read access to the `$DOWNLOAD` folder.", + "type": "string", + "enum": [ + "fs:allow-download-read" + ] + }, + { + "description": "fs:allow-download-read-recursive -> This allows full recursive read access to the complete `$DOWNLOAD` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-download-read-recursive" + ] + }, + { + "description": "fs:allow-download-write -> This allows non-recursive write access to the `$DOWNLOAD` folder.", + "type": "string", + "enum": [ + "fs:allow-download-write" + ] + }, + { + "description": "fs:allow-download-write-recursive -> This allows full recusrive write access to the complete `$DOWNLOAD` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-download-write-recursive" + ] + }, + { + "description": "fs:allow-exe-meta -> This allows read access to metadata of the `$EXE` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-exe-meta" + ] + }, + { + "description": "fs:allow-exe-meta-recursive -> This allows read access to metadata of the `$EXE` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-exe-meta-recursive" + ] + }, + { + "description": "fs:allow-exe-read -> This allows non-recursive read access to the `$EXE` folder.", + "type": "string", + "enum": [ + "fs:allow-exe-read" + ] + }, + { + "description": "fs:allow-exe-read-recursive -> This allows full recursive read access to the complete `$EXE` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-exe-read-recursive" + ] + }, + { + "description": "fs:allow-exe-write -> This allows non-recursive write access to the `$EXE` folder.", + "type": "string", + "enum": [ + "fs:allow-exe-write" + ] + }, + { + "description": "fs:allow-exe-write-recursive -> This allows full recusrive write access to the complete `$EXE` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-exe-write-recursive" + ] + }, + { + "description": "fs:allow-font-meta -> This allows read access to metadata of the `$FONT` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-font-meta" + ] + }, + { + "description": "fs:allow-font-meta-recursive -> This allows read access to metadata of the `$FONT` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-font-meta-recursive" + ] + }, + { + "description": "fs:allow-font-read -> This allows non-recursive read access to the `$FONT` folder.", + "type": "string", + "enum": [ + "fs:allow-font-read" + ] + }, + { + "description": "fs:allow-font-read-recursive -> This allows full recursive read access to the complete `$FONT` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-font-read-recursive" + ] + }, + { + "description": "fs:allow-font-write -> This allows non-recursive write access to the `$FONT` folder.", + "type": "string", + "enum": [ + "fs:allow-font-write" + ] + }, + { + "description": "fs:allow-font-write-recursive -> This allows full recusrive write access to the complete `$FONT` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-font-write-recursive" + ] + }, + { + "description": "fs:allow-home-meta -> This allows read access to metadata of the `$HOME` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-home-meta" + ] + }, + { + "description": "fs:allow-home-meta-recursive -> This allows read access to metadata of the `$HOME` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-home-meta-recursive" + ] + }, + { + "description": "fs:allow-home-read -> This allows non-recursive read access to the `$HOME` folder.", + "type": "string", + "enum": [ + "fs:allow-home-read" + ] + }, + { + "description": "fs:allow-home-read-recursive -> This allows full recursive read access to the complete `$HOME` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-home-read-recursive" + ] + }, + { + "description": "fs:allow-home-write -> This allows non-recursive write access to the `$HOME` folder.", + "type": "string", + "enum": [ + "fs:allow-home-write" + ] + }, + { + "description": "fs:allow-home-write-recursive -> This allows full recusrive write access to the complete `$HOME` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-home-write-recursive" + ] + }, + { + "description": "fs:allow-localdata-meta -> This allows read access to metadata of the `$LOCALDATA` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-localdata-meta" + ] + }, + { + "description": "fs:allow-localdata-meta-recursive -> This allows read access to metadata of the `$LOCALDATA` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-localdata-meta-recursive" + ] + }, + { + "description": "fs:allow-localdata-read -> This allows non-recursive read access to the `$LOCALDATA` folder.", + "type": "string", + "enum": [ + "fs:allow-localdata-read" + ] + }, + { + "description": "fs:allow-localdata-read-recursive -> This allows full recursive read access to the complete `$LOCALDATA` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-localdata-read-recursive" + ] + }, + { + "description": "fs:allow-localdata-write -> This allows non-recursive write access to the `$LOCALDATA` folder.", + "type": "string", + "enum": [ + "fs:allow-localdata-write" + ] + }, + { + "description": "fs:allow-localdata-write-recursive -> This allows full recusrive write access to the complete `$LOCALDATA` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-localdata-write-recursive" + ] + }, + { + "description": "fs:allow-log-meta -> This allows read access to metadata of the `$LOG` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-log-meta" + ] + }, + { + "description": "fs:allow-log-meta-recursive -> This allows read access to metadata of the `$LOG` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-log-meta-recursive" + ] + }, + { + "description": "fs:allow-log-read -> This allows non-recursive read access to the `$LOG` folder.", + "type": "string", + "enum": [ + "fs:allow-log-read" + ] + }, + { + "description": "fs:allow-log-read-recursive -> This allows full recursive read access to the complete `$LOG` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-log-read-recursive" + ] + }, + { + "description": "fs:allow-log-write -> This allows non-recursive write access to the `$LOG` folder.", + "type": "string", + "enum": [ + "fs:allow-log-write" + ] + }, + { + "description": "fs:allow-log-write-recursive -> This allows full recusrive write access to the complete `$LOG` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-log-write-recursive" + ] + }, + { + "description": "fs:allow-picture-meta -> This allows read access to metadata of the `$PICTURE` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-picture-meta" + ] + }, + { + "description": "fs:allow-picture-meta-recursive -> This allows read access to metadata of the `$PICTURE` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-picture-meta-recursive" + ] + }, + { + "description": "fs:allow-picture-read -> This allows non-recursive read access to the `$PICTURE` folder.", + "type": "string", + "enum": [ + "fs:allow-picture-read" + ] + }, + { + "description": "fs:allow-picture-read-recursive -> This allows full recursive read access to the complete `$PICTURE` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-picture-read-recursive" + ] + }, + { + "description": "fs:allow-picture-write -> This allows non-recursive write access to the `$PICTURE` folder.", + "type": "string", + "enum": [ + "fs:allow-picture-write" + ] + }, + { + "description": "fs:allow-picture-write-recursive -> This allows full recusrive write access to the complete `$PICTURE` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-picture-write-recursive" + ] + }, + { + "description": "fs:allow-public-meta -> This allows read access to metadata of the `$PUBLIC` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-public-meta" + ] + }, + { + "description": "fs:allow-public-meta-recursive -> This allows read access to metadata of the `$PUBLIC` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-public-meta-recursive" + ] + }, + { + "description": "fs:allow-public-read -> This allows non-recursive read access to the `$PUBLIC` folder.", + "type": "string", + "enum": [ + "fs:allow-public-read" + ] + }, + { + "description": "fs:allow-public-read-recursive -> This allows full recursive read access to the complete `$PUBLIC` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-public-read-recursive" + ] + }, + { + "description": "fs:allow-public-write -> This allows non-recursive write access to the `$PUBLIC` folder.", + "type": "string", + "enum": [ + "fs:allow-public-write" + ] + }, + { + "description": "fs:allow-public-write-recursive -> This allows full recusrive write access to the complete `$PUBLIC` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-public-write-recursive" + ] + }, + { + "description": "fs:allow-resource-meta -> This allows read access to metadata of the `$RESOURCE` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-resource-meta" + ] + }, + { + "description": "fs:allow-resource-meta-recursive -> This allows read access to metadata of the `$RESOURCE` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-resource-meta-recursive" + ] + }, + { + "description": "fs:allow-resource-read -> This allows non-recursive read access to the `$RESOURCE` folder.", + "type": "string", + "enum": [ + "fs:allow-resource-read" + ] + }, + { + "description": "fs:allow-resource-read-recursive -> This allows full recursive read access to the complete `$RESOURCE` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-resource-read-recursive" + ] + }, + { + "description": "fs:allow-resource-write -> This allows non-recursive write access to the `$RESOURCE` folder.", + "type": "string", + "enum": [ + "fs:allow-resource-write" + ] + }, + { + "description": "fs:allow-resource-write-recursive -> This allows full recusrive write access to the complete `$RESOURCE` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-resource-write-recursive" + ] + }, + { + "description": "fs:allow-runtime-meta -> This allows read access to metadata of the `$RUNTIME` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-runtime-meta" + ] + }, + { + "description": "fs:allow-runtime-meta-recursive -> This allows read access to metadata of the `$RUNTIME` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-runtime-meta-recursive" + ] + }, + { + "description": "fs:allow-runtime-read -> This allows non-recursive read access to the `$RUNTIME` folder.", + "type": "string", + "enum": [ + "fs:allow-runtime-read" + ] + }, + { + "description": "fs:allow-runtime-read-recursive -> This allows full recursive read access to the complete `$RUNTIME` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-runtime-read-recursive" + ] + }, + { + "description": "fs:allow-runtime-write -> This allows non-recursive write access to the `$RUNTIME` folder.", + "type": "string", + "enum": [ + "fs:allow-runtime-write" + ] + }, + { + "description": "fs:allow-runtime-write-recursive -> This allows full recusrive write access to the complete `$RUNTIME` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-runtime-write-recursive" + ] + }, + { + "description": "fs:allow-temp-meta -> This allows read access to metadata of the `$TEMP` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-temp-meta" + ] + }, + { + "description": "fs:allow-temp-meta-recursive -> This allows read access to metadata of the `$TEMP` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-temp-meta-recursive" + ] + }, + { + "description": "fs:allow-temp-read -> This allows non-recursive read access to the `$TEMP` folder.", + "type": "string", + "enum": [ + "fs:allow-temp-read" + ] + }, + { + "description": "fs:allow-temp-read-recursive -> This allows full recursive read access to the complete `$TEMP` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-temp-read-recursive" + ] + }, + { + "description": "fs:allow-temp-write -> This allows non-recursive write access to the `$TEMP` folder.", + "type": "string", + "enum": [ + "fs:allow-temp-write" + ] + }, + { + "description": "fs:allow-temp-write-recursive -> This allows full recusrive write access to the complete `$TEMP` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-temp-write-recursive" + ] + }, + { + "description": "fs:allow-template-meta -> This allows read access to metadata of the `$TEMPLATE` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-template-meta" + ] + }, + { + "description": "fs:allow-template-meta-recursive -> This allows read access to metadata of the `$TEMPLATE` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-template-meta-recursive" + ] + }, + { + "description": "fs:allow-template-read -> This allows non-recursive read access to the `$TEMPLATE` folder.", + "type": "string", + "enum": [ + "fs:allow-template-read" + ] + }, + { + "description": "fs:allow-template-read-recursive -> This allows full recursive read access to the complete `$TEMPLATE` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-template-read-recursive" + ] + }, + { + "description": "fs:allow-template-write -> This allows non-recursive write access to the `$TEMPLATE` folder.", + "type": "string", + "enum": [ + "fs:allow-template-write" + ] + }, + { + "description": "fs:allow-template-write-recursive -> This allows full recusrive write access to the complete `$TEMPLATE` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-template-write-recursive" + ] + }, + { + "description": "fs:allow-video-meta -> This allows read access to metadata of the `$VIDEO` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-video-meta" + ] + }, + { + "description": "fs:allow-video-meta-recursive -> This allows read access to metadata of the `$VIDEO` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-video-meta-recursive" + ] + }, + { + "description": "fs:allow-video-read -> This allows non-recursive read access to the `$VIDEO` folder.", + "type": "string", + "enum": [ + "fs:allow-video-read" + ] + }, + { + "description": "fs:allow-video-read-recursive -> This allows full recursive read access to the complete `$VIDEO` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-video-read-recursive" + ] + }, + { + "description": "fs:allow-video-write -> This allows non-recursive write access to the `$VIDEO` folder.", + "type": "string", + "enum": [ + "fs:allow-video-write" + ] + }, + { + "description": "fs:allow-video-write-recursive -> This allows full recusrive write access to the complete `$VIDEO` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-video-write-recursive" + ] + }, + { + "description": "fs:deny-default -> This denies access to dangerous Tauri relevant files and folders by default.", + "type": "string", + "enum": [ + "fs:deny-default" + ] + }, + { + "description": "fs:allow-copy-file -> Enables the copy_file command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-copy-file" + ] + }, + { + "description": "fs:allow-create -> Enables the create command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-create" + ] + }, + { + "description": "fs:allow-exists -> Enables the exists command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-exists" + ] + }, + { + "description": "fs:allow-fstat -> Enables the fstat command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-fstat" + ] + }, + { + "description": "fs:allow-ftruncate -> Enables the ftruncate command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-ftruncate" + ] + }, + { + "description": "fs:allow-lstat -> Enables the lstat command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-lstat" + ] + }, + { + "description": "fs:allow-mkdir -> Enables the mkdir command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-mkdir" + ] + }, + { + "description": "fs:allow-open -> Enables the open command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-open" + ] + }, + { + "description": "fs:allow-read -> Enables the read command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-read" + ] + }, + { + "description": "fs:allow-read-dir -> Enables the read_dir command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-read-dir" + ] + }, + { + "description": "fs:allow-read-file -> Enables the read_file command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-read-file" + ] + }, + { + "description": "fs:allow-read-text-file -> Enables the read_text_file command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-read-text-file" + ] + }, + { + "description": "fs:allow-read-text-file-lines -> Enables the read_text_file_lines command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-read-text-file-lines" + ] + }, + { + "description": "fs:allow-read-text-file-lines-next -> Enables the read_text_file_lines_next command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-read-text-file-lines-next" + ] + }, + { + "description": "fs:allow-remove -> Enables the remove command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-remove" + ] + }, + { + "description": "fs:allow-rename -> Enables the rename command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-rename" + ] + }, + { + "description": "fs:allow-seek -> Enables the seek command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-seek" + ] + }, + { + "description": "fs:allow-stat -> Enables the stat command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-stat" + ] + }, + { + "description": "fs:allow-truncate -> Enables the truncate command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-truncate" + ] + }, + { + "description": "fs:allow-unwatch -> Enables the unwatch command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-unwatch" + ] + }, + { + "description": "fs:allow-watch -> Enables the watch command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-watch" + ] + }, + { + "description": "fs:allow-write -> Enables the write command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-write" + ] + }, + { + "description": "fs:allow-write-file -> Enables the write_file command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-write-file" + ] + }, + { + "description": "fs:allow-write-text-file -> Enables the write_text_file command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-write-text-file" + ] + }, + { + "description": "fs:deny-copy-file -> Denies the copy_file command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-copy-file" + ] + }, + { + "description": "fs:deny-create -> Denies the create command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-create" + ] + }, + { + "description": "fs:deny-exists -> Denies the exists command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-exists" + ] + }, + { + "description": "fs:deny-fstat -> Denies the fstat command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-fstat" + ] + }, + { + "description": "fs:deny-ftruncate -> Denies the ftruncate command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-ftruncate" + ] + }, + { + "description": "fs:deny-lstat -> Denies the lstat command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-lstat" + ] + }, + { + "description": "fs:deny-mkdir -> Denies the mkdir command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-mkdir" + ] + }, + { + "description": "fs:deny-open -> Denies the open command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-open" + ] + }, + { + "description": "fs:deny-read -> Denies the read command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-read" + ] + }, + { + "description": "fs:deny-read-dir -> Denies the read_dir command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-read-dir" + ] + }, + { + "description": "fs:deny-read-file -> Denies the read_file command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-read-file" + ] + }, + { + "description": "fs:deny-read-text-file -> Denies the read_text_file command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-read-text-file" + ] + }, + { + "description": "fs:deny-read-text-file-lines -> Denies the read_text_file_lines command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-read-text-file-lines" + ] + }, + { + "description": "fs:deny-read-text-file-lines-next -> Denies the read_text_file_lines_next command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-read-text-file-lines-next" + ] + }, + { + "description": "fs:deny-remove -> Denies the remove command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-remove" + ] + }, + { + "description": "fs:deny-rename -> Denies the rename command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-rename" + ] + }, + { + "description": "fs:deny-seek -> Denies the seek command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-seek" + ] + }, + { + "description": "fs:deny-stat -> Denies the stat command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-stat" + ] + }, + { + "description": "fs:deny-truncate -> Denies the truncate command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-truncate" + ] + }, + { + "description": "fs:deny-unwatch -> Denies the unwatch command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-unwatch" + ] + }, + { + "description": "fs:deny-watch -> Denies the watch command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-watch" + ] + }, + { + "description": "fs:deny-webview-data-linux -> This denies read access to the\n`$APPLOCALDATA` folder on linux as the webview data and configuration values are stored here.\nAllowing access can lead to sensitive information disclosure and should be well considered.", + "type": "string", + "enum": [ + "fs:deny-webview-data-linux" + ] + }, + { + "description": "fs:deny-webview-data-windows -> This denies read access to the\n`$APPLOCALDATA/EBWebView` folder on windows as the webview data and configuration values are stored here.\nAllowing access can lead to sensitive information disclosure and should be well considered.", + "type": "string", + "enum": [ + "fs:deny-webview-data-windows" + ] + }, + { + "description": "fs:deny-write -> Denies the write command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-write" + ] + }, + { + "description": "fs:deny-write-file -> Denies the write_file command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-write-file" + ] + }, + { + "description": "fs:deny-write-text-file -> Denies the write_text_file command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-write-text-file" + ] + }, + { + "description": "fs:read-all -> This enables all read related commands without any pre-configured accessible paths.", + "type": "string", + "enum": [ + "fs:read-all" + ] + }, + { + "description": "fs:read-dirs -> This enables directory read and file metadata related commands without any pre-configured accessible paths.", + "type": "string", + "enum": [ + "fs:read-dirs" + ] + }, + { + "description": "fs:read-files -> This enables file read related commands without any pre-configured accessible paths.", + "type": "string", + "enum": [ + "fs:read-files" + ] + }, + { + "description": "fs:read-meta -> This enables all index or metadata related commands without any pre-configured accessible paths.", + "type": "string", + "enum": [ + "fs:read-meta" + ] + }, + { + "description": "fs:scope -> An empty permission you can use to modify the global scope.", + "type": "string", + "enum": [ + "fs:scope" + ] + }, + { + "description": "fs:scope-app -> This scope permits access to all files and list content of top level directories in the `$APP`folder.", + "type": "string", + "enum": [ + "fs:scope-app" + ] + }, + { + "description": "fs:scope-app-index -> This scope permits to list all files and folders in the `$APP`folder.", + "type": "string", + "enum": [ + "fs:scope-app-index" + ] + }, + { + "description": "fs:scope-app-recursive -> This scope recursive access to the complete `$APP` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-app-recursive" + ] + }, + { + "description": "fs:scope-appcache -> This scope permits access to all files and list content of top level directories in the `$APPCACHE`folder.", + "type": "string", + "enum": [ + "fs:scope-appcache" + ] + }, + { + "description": "fs:scope-appcache-index -> This scope permits to list all files and folders in the `$APPCACHE`folder.", + "type": "string", + "enum": [ + "fs:scope-appcache-index" + ] + }, + { + "description": "fs:scope-appcache-recursive -> This scope recursive access to the complete `$APPCACHE` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-appcache-recursive" + ] + }, + { + "description": "fs:scope-appconfig -> This scope permits access to all files and list content of top level directories in the `$APPCONFIG`folder.", + "type": "string", + "enum": [ + "fs:scope-appconfig" + ] + }, + { + "description": "fs:scope-appconfig-index -> This scope permits to list all files and folders in the `$APPCONFIG`folder.", + "type": "string", + "enum": [ + "fs:scope-appconfig-index" + ] + }, + { + "description": "fs:scope-appconfig-recursive -> This scope recursive access to the complete `$APPCONFIG` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-appconfig-recursive" + ] + }, + { + "description": "fs:scope-appdata -> This scope permits access to all files and list content of top level directories in the `$APPDATA`folder.", + "type": "string", + "enum": [ + "fs:scope-appdata" + ] + }, + { + "description": "fs:scope-appdata-index -> This scope permits to list all files and folders in the `$APPDATA`folder.", + "type": "string", + "enum": [ + "fs:scope-appdata-index" + ] + }, + { + "description": "fs:scope-appdata-recursive -> This scope recursive access to the complete `$APPDATA` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-appdata-recursive" + ] + }, + { + "description": "fs:scope-applocaldata -> This scope permits access to all files and list content of top level directories in the `$APPLOCALDATA`folder.", + "type": "string", + "enum": [ + "fs:scope-applocaldata" + ] + }, + { + "description": "fs:scope-applocaldata-index -> This scope permits to list all files and folders in the `$APPLOCALDATA`folder.", + "type": "string", + "enum": [ + "fs:scope-applocaldata-index" + ] + }, + { + "description": "fs:scope-applocaldata-recursive -> This scope recursive access to the complete `$APPLOCALDATA` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-applocaldata-recursive" + ] + }, + { + "description": "fs:scope-applog -> This scope permits access to all files and list content of top level directories in the `$APPLOG`folder.", + "type": "string", + "enum": [ + "fs:scope-applog" + ] + }, + { + "description": "fs:scope-applog-index -> This scope permits to list all files and folders in the `$APPLOG`folder.", + "type": "string", + "enum": [ + "fs:scope-applog-index" + ] + }, + { + "description": "fs:scope-applog-recursive -> This scope recursive access to the complete `$APPLOG` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-applog-recursive" + ] + }, + { + "description": "fs:scope-audio -> This scope permits access to all files and list content of top level directories in the `$AUDIO`folder.", + "type": "string", + "enum": [ + "fs:scope-audio" + ] + }, + { + "description": "fs:scope-audio-index -> This scope permits to list all files and folders in the `$AUDIO`folder.", + "type": "string", + "enum": [ + "fs:scope-audio-index" + ] + }, + { + "description": "fs:scope-audio-recursive -> This scope recursive access to the complete `$AUDIO` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-audio-recursive" + ] + }, + { + "description": "fs:scope-cache -> This scope permits access to all files and list content of top level directories in the `$CACHE`folder.", + "type": "string", + "enum": [ + "fs:scope-cache" + ] + }, + { + "description": "fs:scope-cache-index -> This scope permits to list all files and folders in the `$CACHE`folder.", + "type": "string", + "enum": [ + "fs:scope-cache-index" + ] + }, + { + "description": "fs:scope-cache-recursive -> This scope recursive access to the complete `$CACHE` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-cache-recursive" + ] + }, + { + "description": "fs:scope-config -> This scope permits access to all files and list content of top level directories in the `$CONFIG`folder.", + "type": "string", + "enum": [ + "fs:scope-config" + ] + }, + { + "description": "fs:scope-config-index -> This scope permits to list all files and folders in the `$CONFIG`folder.", + "type": "string", + "enum": [ + "fs:scope-config-index" + ] + }, + { + "description": "fs:scope-config-recursive -> This scope recursive access to the complete `$CONFIG` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-config-recursive" + ] + }, + { + "description": "fs:scope-data -> This scope permits access to all files and list content of top level directories in the `$DATA`folder.", + "type": "string", + "enum": [ + "fs:scope-data" + ] + }, + { + "description": "fs:scope-data-index -> This scope permits to list all files and folders in the `$DATA`folder.", + "type": "string", + "enum": [ + "fs:scope-data-index" + ] + }, + { + "description": "fs:scope-data-recursive -> This scope recursive access to the complete `$DATA` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-data-recursive" + ] + }, + { + "description": "fs:scope-desktop -> This scope permits access to all files and list content of top level directories in the `$DESKTOP`folder.", + "type": "string", + "enum": [ + "fs:scope-desktop" + ] + }, + { + "description": "fs:scope-desktop-index -> This scope permits to list all files and folders in the `$DESKTOP`folder.", + "type": "string", + "enum": [ + "fs:scope-desktop-index" + ] + }, + { + "description": "fs:scope-desktop-recursive -> This scope recursive access to the complete `$DESKTOP` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-desktop-recursive" + ] + }, + { + "description": "fs:scope-document -> This scope permits access to all files and list content of top level directories in the `$DOCUMENT`folder.", + "type": "string", + "enum": [ + "fs:scope-document" + ] + }, + { + "description": "fs:scope-document-index -> This scope permits to list all files and folders in the `$DOCUMENT`folder.", + "type": "string", + "enum": [ + "fs:scope-document-index" + ] + }, + { + "description": "fs:scope-document-recursive -> This scope recursive access to the complete `$DOCUMENT` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-document-recursive" + ] + }, + { + "description": "fs:scope-download -> This scope permits access to all files and list content of top level directories in the `$DOWNLOAD`folder.", + "type": "string", + "enum": [ + "fs:scope-download" + ] + }, + { + "description": "fs:scope-download-index -> This scope permits to list all files and folders in the `$DOWNLOAD`folder.", + "type": "string", + "enum": [ + "fs:scope-download-index" + ] + }, + { + "description": "fs:scope-download-recursive -> This scope recursive access to the complete `$DOWNLOAD` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-download-recursive" + ] + }, + { + "description": "fs:scope-exe -> This scope permits access to all files and list content of top level directories in the `$EXE`folder.", + "type": "string", + "enum": [ + "fs:scope-exe" + ] + }, + { + "description": "fs:scope-exe-index -> This scope permits to list all files and folders in the `$EXE`folder.", + "type": "string", + "enum": [ + "fs:scope-exe-index" + ] + }, + { + "description": "fs:scope-exe-recursive -> This scope recursive access to the complete `$EXE` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-exe-recursive" + ] + }, + { + "description": "fs:scope-font -> This scope permits access to all files and list content of top level directories in the `$FONT`folder.", + "type": "string", + "enum": [ + "fs:scope-font" + ] + }, + { + "description": "fs:scope-font-index -> This scope permits to list all files and folders in the `$FONT`folder.", + "type": "string", + "enum": [ + "fs:scope-font-index" + ] + }, + { + "description": "fs:scope-font-recursive -> This scope recursive access to the complete `$FONT` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-font-recursive" + ] + }, + { + "description": "fs:scope-home -> This scope permits access to all files and list content of top level directories in the `$HOME`folder.", + "type": "string", + "enum": [ + "fs:scope-home" + ] + }, + { + "description": "fs:scope-home-index -> This scope permits to list all files and folders in the `$HOME`folder.", + "type": "string", + "enum": [ + "fs:scope-home-index" + ] + }, + { + "description": "fs:scope-home-recursive -> This scope recursive access to the complete `$HOME` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-home-recursive" + ] + }, + { + "description": "fs:scope-localdata -> This scope permits access to all files and list content of top level directories in the `$LOCALDATA`folder.", + "type": "string", + "enum": [ + "fs:scope-localdata" + ] + }, + { + "description": "fs:scope-localdata-index -> This scope permits to list all files and folders in the `$LOCALDATA`folder.", + "type": "string", + "enum": [ + "fs:scope-localdata-index" + ] + }, + { + "description": "fs:scope-localdata-recursive -> This scope recursive access to the complete `$LOCALDATA` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-localdata-recursive" + ] + }, + { + "description": "fs:scope-log -> This scope permits access to all files and list content of top level directories in the `$LOG`folder.", + "type": "string", + "enum": [ + "fs:scope-log" + ] + }, + { + "description": "fs:scope-log-index -> This scope permits to list all files and folders in the `$LOG`folder.", + "type": "string", + "enum": [ + "fs:scope-log-index" + ] + }, + { + "description": "fs:scope-log-recursive -> This scope recursive access to the complete `$LOG` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-log-recursive" + ] + }, + { + "description": "fs:scope-picture -> This scope permits access to all files and list content of top level directories in the `$PICTURE`folder.", + "type": "string", + "enum": [ + "fs:scope-picture" + ] + }, + { + "description": "fs:scope-picture-index -> This scope permits to list all files and folders in the `$PICTURE`folder.", + "type": "string", + "enum": [ + "fs:scope-picture-index" + ] + }, + { + "description": "fs:scope-picture-recursive -> This scope recursive access to the complete `$PICTURE` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-picture-recursive" + ] + }, + { + "description": "fs:scope-public -> This scope permits access to all files and list content of top level directories in the `$PUBLIC`folder.", + "type": "string", + "enum": [ + "fs:scope-public" + ] + }, + { + "description": "fs:scope-public-index -> This scope permits to list all files and folders in the `$PUBLIC`folder.", + "type": "string", + "enum": [ + "fs:scope-public-index" + ] + }, + { + "description": "fs:scope-public-recursive -> This scope recursive access to the complete `$PUBLIC` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-public-recursive" + ] + }, + { + "description": "fs:scope-resource -> This scope permits access to all files and list content of top level directories in the `$RESOURCE`folder.", + "type": "string", + "enum": [ + "fs:scope-resource" + ] + }, + { + "description": "fs:scope-resource-index -> This scope permits to list all files and folders in the `$RESOURCE`folder.", + "type": "string", + "enum": [ + "fs:scope-resource-index" + ] + }, + { + "description": "fs:scope-resource-recursive -> This scope recursive access to the complete `$RESOURCE` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-resource-recursive" + ] + }, + { + "description": "fs:scope-runtime -> This scope permits access to all files and list content of top level directories in the `$RUNTIME`folder.", + "type": "string", + "enum": [ + "fs:scope-runtime" + ] + }, + { + "description": "fs:scope-runtime-index -> This scope permits to list all files and folders in the `$RUNTIME`folder.", + "type": "string", + "enum": [ + "fs:scope-runtime-index" + ] + }, + { + "description": "fs:scope-runtime-recursive -> This scope recursive access to the complete `$RUNTIME` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-runtime-recursive" + ] + }, + { + "description": "fs:scope-temp -> This scope permits access to all files and list content of top level directories in the `$TEMP`folder.", + "type": "string", + "enum": [ + "fs:scope-temp" + ] + }, + { + "description": "fs:scope-temp-index -> This scope permits to list all files and folders in the `$TEMP`folder.", + "type": "string", + "enum": [ + "fs:scope-temp-index" + ] + }, + { + "description": "fs:scope-temp-recursive -> This scope recursive access to the complete `$TEMP` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-temp-recursive" + ] + }, + { + "description": "fs:scope-template -> This scope permits access to all files and list content of top level directories in the `$TEMPLATE`folder.", + "type": "string", + "enum": [ + "fs:scope-template" + ] + }, + { + "description": "fs:scope-template-index -> This scope permits to list all files and folders in the `$TEMPLATE`folder.", + "type": "string", + "enum": [ + "fs:scope-template-index" + ] + }, + { + "description": "fs:scope-template-recursive -> This scope recursive access to the complete `$TEMPLATE` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-template-recursive" + ] + }, + { + "description": "fs:scope-video -> This scope permits access to all files and list content of top level directories in the `$VIDEO`folder.", + "type": "string", + "enum": [ + "fs:scope-video" + ] + }, + { + "description": "fs:scope-video-index -> This scope permits to list all files and folders in the `$VIDEO`folder.", + "type": "string", + "enum": [ + "fs:scope-video-index" + ] + }, + { + "description": "fs:scope-video-recursive -> This scope recursive access to the complete `$VIDEO` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-video-recursive" + ] + }, + { + "description": "fs:write-all -> This enables all write related commands without any pre-configured accessible paths.", + "type": "string", + "enum": [ + "fs:write-all" + ] + }, + { + "description": "fs:write-files -> This enables all file write related commands without any pre-configured accessible paths.", + "type": "string", + "enum": [ + "fs:write-files" + ] + } + ] + }, + "allow": { + "items": { + "title": "Entry", + "type": "object", + "required": [ + "path" + ], + "properties": { + "path": { + "type": "string" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#" + } + }, + "deny": { + "items": { + "title": "Entry", + "type": "object", + "required": [ + "path" + ], + "properties": { + "path": { + "type": "string" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#" + } + } + } + }, + { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "oneOf": [ + { + "description": "http:default -> Allows all fetch operations", + "type": "string", + "enum": [ + "http:default" + ] + }, + { + "description": "http:allow-fetch -> Enables the fetch command without any pre-configured scope.", + "type": "string", + "enum": [ + "http:allow-fetch" + ] + }, + { + "description": "http:allow-fetch-cancel -> Enables the fetch_cancel command without any pre-configured scope.", + "type": "string", + "enum": [ + "http:allow-fetch-cancel" + ] + }, + { + "description": "http:allow-fetch-read-body -> Enables the fetch_read_body command without any pre-configured scope.", + "type": "string", + "enum": [ + "http:allow-fetch-read-body" + ] + }, + { + "description": "http:allow-fetch-send -> Enables the fetch_send command without any pre-configured scope.", + "type": "string", + "enum": [ + "http:allow-fetch-send" + ] + }, + { + "description": "http:deny-fetch -> Denies the fetch command without any pre-configured scope.", + "type": "string", + "enum": [ + "http:deny-fetch" + ] + }, + { + "description": "http:deny-fetch-cancel -> Denies the fetch_cancel command without any pre-configured scope.", + "type": "string", + "enum": [ + "http:deny-fetch-cancel" + ] + }, + { + "description": "http:deny-fetch-read-body -> Denies the fetch_read_body command without any pre-configured scope.", + "type": "string", + "enum": [ + "http:deny-fetch-read-body" + ] + }, + { + "description": "http:deny-fetch-send -> Denies the fetch_send command without any pre-configured scope.", + "type": "string", + "enum": [ + "http:deny-fetch-send" + ] + } + ] + }, + "allow": { + "items": { + "title": "ScopeEntry", + "description": "HTTP scope entry object definition.", + "type": "object", + "required": [ + "url" + ], + "properties": { + "url": { + "description": "A URL that can be accessed by the webview when using the HTTP APIs. The scoped URL is matched against the request URL using a glob pattern.\n\nExamples:\n\n- \"https://*\" or \"https://**\" : allows all HTTPS urls\n\n- \"https://*.github.com/tauri-apps/tauri\": allows any subdomain of \"github.com\" with the \"tauri-apps/api\" path\n\n- \"https://myapi.service.com/users/*\": allows access to any URLs that begins with \"https://myapi.service.com/users/\"", + "type": "string" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#" + } + }, + "deny": { + "items": { + "title": "ScopeEntry", + "description": "HTTP scope entry object definition.", + "type": "object", + "required": [ + "url" + ], + "properties": { + "url": { + "description": "A URL that can be accessed by the webview when using the HTTP APIs. The scoped URL is matched against the request URL using a glob pattern.\n\nExamples:\n\n- \"https://*\" or \"https://**\" : allows all HTTPS urls\n\n- \"https://*.github.com/tauri-apps/tauri\": allows any subdomain of \"github.com\" with the \"tauri-apps/api\" path\n\n- \"https://myapi.service.com/users/*\": allows access to any URLs that begins with \"https://myapi.service.com/users/\"", + "type": "string" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#" + } + } + } + }, + { + "type": "object", + "required": [ + "identifier" + ], + "properties": { + "identifier": { + "oneOf": [ + { + "description": "shell:allow-execute -> Enables the execute command without any pre-configured scope.", + "type": "string", + "enum": [ + "shell:allow-execute" + ] + }, + { + "description": "shell:allow-kill -> Enables the kill command without any pre-configured scope.", + "type": "string", + "enum": [ + "shell:allow-kill" + ] + }, + { + "description": "shell:allow-open -> Enables the open command without any pre-configured scope.", + "type": "string", + "enum": [ + "shell:allow-open" + ] + }, + { + "description": "shell:allow-stdin-write -> Enables the stdin_write command without any pre-configured scope.", + "type": "string", + "enum": [ + "shell:allow-stdin-write" + ] + }, + { + "description": "shell:deny-execute -> Denies the execute command without any pre-configured scope.", + "type": "string", + "enum": [ + "shell:deny-execute" + ] + }, + { + "description": "shell:deny-kill -> Denies the kill command without any pre-configured scope.", + "type": "string", + "enum": [ + "shell:deny-kill" + ] + }, + { + "description": "shell:deny-open -> Denies the open command without any pre-configured scope.", + "type": "string", + "enum": [ + "shell:deny-open" + ] + }, + { + "description": "shell:deny-stdin-write -> Denies the stdin_write command without any pre-configured scope.", + "type": "string", + "enum": [ + "shell:deny-stdin-write" + ] + } + ] + }, + "allow": { + "items": { + "title": "Entry", + "description": "A command allowed to be executed by the webview API.", + "type": "object", + "required": [ + "args", + "command", + "name", + "sidecar" + ], + "properties": { + "args": { + "description": "The allowed arguments for the command execution.", + "allOf": [ + { + "$ref": "#/definitions/ShellAllowedArgs" + } + ] + }, + "command": { + "description": "The command name. It can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.", + "type": "string" + }, + "name": { + "description": "The name for this allowed shell command configuration.\n\nThis name will be used inside of the webview API to call this command along with any specified arguments.", + "type": "string" + }, + "sidecar": { + "description": "If this command is a sidecar command.", + "type": "boolean" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "definitions": { + "ShellAllowedArg": { + "anyOf": [ + { + "description": "A non-configurable argument that is passed to the command in the order it was specified.", + "type": "string" + }, + { + "additionalProperties": false, + "description": "A variable that is set while calling the command from the webview API.", + "properties": { + "validator": { + "description": "[regex] validator to require passed values to conform to an expected input.\n\nThis will require the argument value passed to this variable to match the `validator` regex before it will be executed.\n\n[regex]: https://docs.rs/regex/latest/regex/#syntax", + "type": "string" + } + }, + "required": [ + "validator" + ], + "type": "object" + } + ], + "description": "A command argument allowed to be executed by the webview API." + }, + "ShellAllowedArgs": { + "anyOf": [ + { + "description": "Use a simple boolean to allow all or disable all arguments to this command configuration.", + "type": "boolean" + }, + { + "description": "A specific set of [`ShellAllowedArg`] that are valid to call for the command configuration.", + "items": { + "$ref": "#/definitions/ShellAllowedArg" + }, + "type": "array" + } + ], + "description": "A set of command arguments allowed to be executed by the webview API.\n\nA value of `true` will allow any arguments to be passed to the command. `false` will disable all arguments. A list of [`ShellAllowedArg`] will set those arguments as the only valid arguments to be passed to the attached command configuration." + } + } + } + }, + "deny": { + "items": { + "title": "Entry", + "description": "A command allowed to be executed by the webview API.", + "type": "object", + "required": [ + "args", + "command", + "name", + "sidecar" + ], + "properties": { + "args": { + "description": "The allowed arguments for the command execution.", + "allOf": [ + { + "$ref": "#/definitions/ShellAllowedArgs" + } + ] + }, + "command": { + "description": "The command name. It can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.", + "type": "string" + }, + "name": { + "description": "The name for this allowed shell command configuration.\n\nThis name will be used inside of the webview API to call this command along with any specified arguments.", + "type": "string" + }, + "sidecar": { + "description": "If this command is a sidecar command.", + "type": "boolean" + } + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "definitions": { + "ShellAllowedArg": { + "anyOf": [ + { + "description": "A non-configurable argument that is passed to the command in the order it was specified.", + "type": "string" + }, + { + "additionalProperties": false, + "description": "A variable that is set while calling the command from the webview API.", + "properties": { + "validator": { + "description": "[regex] validator to require passed values to conform to an expected input.\n\nThis will require the argument value passed to this variable to match the `validator` regex before it will be executed.\n\n[regex]: https://docs.rs/regex/latest/regex/#syntax", + "type": "string" + } + }, + "required": [ + "validator" + ], + "type": "object" + } + ], + "description": "A command argument allowed to be executed by the webview API." + }, + "ShellAllowedArgs": { + "anyOf": [ + { + "description": "Use a simple boolean to allow all or disable all arguments to this command configuration.", + "type": "boolean" + }, + { + "description": "A specific set of [`ShellAllowedArg`] that are valid to call for the command configuration.", + "items": { + "$ref": "#/definitions/ShellAllowedArg" + }, + "type": "array" + } + ], + "description": "A set of command arguments allowed to be executed by the webview API.\n\nA value of `true` will allow any arguments to be passed to the command. `false` will disable all arguments. A list of [`ShellAllowedArg`] will set those arguments as the only valid arguments to be passed to the attached command configuration." + } + } + } + } + } + } + ] + } + ] + }, + "Identifier": { + "description": "Permission identifier", + "oneOf": [ + { + "description": "app:default -> Default permissions for the plugin.", + "type": "string", + "enum": [ + "app:default" + ] + }, + { + "description": "app:allow-app-hide -> Enables the app_hide command without any pre-configured scope.", + "type": "string", + "enum": [ + "app:allow-app-hide" + ] + }, + { + "description": "app:allow-app-show -> Enables the app_show command without any pre-configured scope.", + "type": "string", + "enum": [ + "app:allow-app-show" + ] + }, + { + "description": "app:allow-name -> Enables the name command without any pre-configured scope.", + "type": "string", + "enum": [ + "app:allow-name" + ] + }, + { + "description": "app:allow-tauri-version -> Enables the tauri_version command without any pre-configured scope.", + "type": "string", + "enum": [ + "app:allow-tauri-version" + ] + }, + { + "description": "app:allow-version -> Enables the version command without any pre-configured scope.", + "type": "string", + "enum": [ + "app:allow-version" + ] + }, + { + "description": "app:deny-app-hide -> Denies the app_hide command without any pre-configured scope.", + "type": "string", + "enum": [ + "app:deny-app-hide" + ] + }, + { + "description": "app:deny-app-show -> Denies the app_show command without any pre-configured scope.", + "type": "string", + "enum": [ + "app:deny-app-show" + ] + }, + { + "description": "app:deny-name -> Denies the name command without any pre-configured scope.", + "type": "string", + "enum": [ + "app:deny-name" + ] + }, + { + "description": "app:deny-tauri-version -> Denies the tauri_version command without any pre-configured scope.", + "type": "string", + "enum": [ + "app:deny-tauri-version" + ] + }, + { + "description": "app:deny-version -> Denies the version command without any pre-configured scope.", + "type": "string", + "enum": [ + "app:deny-version" + ] + }, + { + "description": "barcode-scanner:allow-cancel -> Enables the cancel command without any pre-configured scope.", + "type": "string", + "enum": [ + "barcode-scanner:allow-cancel" + ] + }, + { + "description": "barcode-scanner:allow-check-permissions -> Enables the check_permissions command without any pre-configured scope.", + "type": "string", + "enum": [ + "barcode-scanner:allow-check-permissions" + ] + }, + { + "description": "barcode-scanner:allow-open-app-settings -> Enables the open_app_settings command without any pre-configured scope.", + "type": "string", + "enum": [ + "barcode-scanner:allow-open-app-settings" + ] + }, + { + "description": "barcode-scanner:allow-request-permissions -> Enables the request_permissions command without any pre-configured scope.", + "type": "string", + "enum": [ + "barcode-scanner:allow-request-permissions" + ] + }, + { + "description": "barcode-scanner:allow-scan -> Enables the scan command without any pre-configured scope.", + "type": "string", + "enum": [ + "barcode-scanner:allow-scan" + ] + }, + { + "description": "barcode-scanner:allow-vibrate -> Enables the vibrate command without any pre-configured scope.", + "type": "string", + "enum": [ + "barcode-scanner:allow-vibrate" + ] + }, + { + "description": "barcode-scanner:deny-cancel -> Denies the cancel command without any pre-configured scope.", + "type": "string", + "enum": [ + "barcode-scanner:deny-cancel" + ] + }, + { + "description": "barcode-scanner:deny-check-permissions -> Denies the check_permissions command without any pre-configured scope.", + "type": "string", + "enum": [ + "barcode-scanner:deny-check-permissions" + ] + }, + { + "description": "barcode-scanner:deny-open-app-settings -> Denies the open_app_settings command without any pre-configured scope.", + "type": "string", + "enum": [ + "barcode-scanner:deny-open-app-settings" + ] + }, + { + "description": "barcode-scanner:deny-request-permissions -> Denies the request_permissions command without any pre-configured scope.", + "type": "string", + "enum": [ + "barcode-scanner:deny-request-permissions" + ] + }, + { + "description": "barcode-scanner:deny-scan -> Denies the scan command without any pre-configured scope.", + "type": "string", + "enum": [ + "barcode-scanner:deny-scan" + ] + }, + { + "description": "barcode-scanner:deny-vibrate -> Denies the vibrate command without any pre-configured scope.", + "type": "string", + "enum": [ + "barcode-scanner:deny-vibrate" + ] + }, + { + "description": "biometric:allow-authenticate -> Enables the authenticate command without any pre-configured scope.", + "type": "string", + "enum": [ + "biometric:allow-authenticate" + ] + }, + { + "description": "biometric:allow-status -> Enables the status command without any pre-configured scope.", + "type": "string", + "enum": [ + "biometric:allow-status" + ] + }, + { + "description": "biometric:deny-authenticate -> Denies the authenticate command without any pre-configured scope.", + "type": "string", + "enum": [ + "biometric:deny-authenticate" + ] + }, + { + "description": "biometric:deny-status -> Denies the status command without any pre-configured scope.", + "type": "string", + "enum": [ + "biometric:deny-status" + ] + }, + { + "description": "clipboard-manager:allow-read -> Enables the read command without any pre-configured scope.", + "type": "string", + "enum": [ + "clipboard-manager:allow-read" + ] + }, + { + "description": "clipboard-manager:allow-write -> Enables the write command without any pre-configured scope.", + "type": "string", + "enum": [ + "clipboard-manager:allow-write" + ] + }, + { + "description": "clipboard-manager:deny-read -> Denies the read command without any pre-configured scope.", + "type": "string", + "enum": [ + "clipboard-manager:deny-read" + ] + }, + { + "description": "clipboard-manager:deny-write -> Denies the write command without any pre-configured scope.", + "type": "string", + "enum": [ + "clipboard-manager:deny-write" + ] + }, + { + "description": "dialog:allow-ask -> Enables the ask command without any pre-configured scope.", + "type": "string", + "enum": [ + "dialog:allow-ask" + ] + }, + { + "description": "dialog:allow-confirm -> Enables the confirm command without any pre-configured scope.", + "type": "string", + "enum": [ + "dialog:allow-confirm" + ] + }, + { + "description": "dialog:allow-message -> Enables the message command without any pre-configured scope.", + "type": "string", + "enum": [ + "dialog:allow-message" + ] + }, + { + "description": "dialog:allow-open -> Enables the open command without any pre-configured scope.", + "type": "string", + "enum": [ + "dialog:allow-open" + ] + }, + { + "description": "dialog:allow-save -> Enables the save command without any pre-configured scope.", + "type": "string", + "enum": [ + "dialog:allow-save" + ] + }, + { + "description": "dialog:deny-ask -> Denies the ask command without any pre-configured scope.", + "type": "string", + "enum": [ + "dialog:deny-ask" + ] + }, + { + "description": "dialog:deny-confirm -> Denies the confirm command without any pre-configured scope.", + "type": "string", + "enum": [ + "dialog:deny-confirm" + ] + }, + { + "description": "dialog:deny-message -> Denies the message command without any pre-configured scope.", + "type": "string", + "enum": [ + "dialog:deny-message" + ] + }, + { + "description": "dialog:deny-open -> Denies the open command without any pre-configured scope.", + "type": "string", + "enum": [ + "dialog:deny-open" + ] + }, + { + "description": "dialog:deny-save -> Denies the save command without any pre-configured scope.", + "type": "string", + "enum": [ + "dialog:deny-save" + ] + }, + { + "description": "event:default -> Default permissions for the plugin.", + "type": "string", + "enum": [ + "event:default" + ] + }, + { + "description": "event:allow-emit -> Enables the emit command without any pre-configured scope.", + "type": "string", + "enum": [ + "event:allow-emit" + ] + }, + { + "description": "event:allow-emit-to -> Enables the emit_to command without any pre-configured scope.", + "type": "string", + "enum": [ + "event:allow-emit-to" + ] + }, + { + "description": "event:allow-listen -> Enables the listen command without any pre-configured scope.", + "type": "string", + "enum": [ + "event:allow-listen" + ] + }, + { + "description": "event:allow-unlisten -> Enables the unlisten command without any pre-configured scope.", + "type": "string", + "enum": [ + "event:allow-unlisten" + ] + }, + { + "description": "event:deny-emit -> Denies the emit command without any pre-configured scope.", + "type": "string", + "enum": [ + "event:deny-emit" + ] + }, + { + "description": "event:deny-emit-to -> Denies the emit_to command without any pre-configured scope.", + "type": "string", + "enum": [ + "event:deny-emit-to" + ] + }, + { + "description": "event:deny-listen -> Denies the listen command without any pre-configured scope.", + "type": "string", + "enum": [ + "event:deny-listen" + ] + }, + { + "description": "event:deny-unlisten -> Denies the unlisten command without any pre-configured scope.", + "type": "string", + "enum": [ + "event:deny-unlisten" + ] + }, + { + "description": "fs:allow-app-meta -> This allows read access to metadata of the `$APP` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-app-meta" + ] + }, + { + "description": "fs:allow-app-meta-recursive -> This allows read access to metadata of the `$APP` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-app-meta-recursive" + ] + }, + { + "description": "fs:allow-app-read -> This allows non-recursive read access to the `$APP` folder.", + "type": "string", + "enum": [ + "fs:allow-app-read" + ] + }, + { + "description": "fs:allow-app-read-recursive -> This allows full recursive read access to the complete `$APP` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-app-read-recursive" + ] + }, + { + "description": "fs:allow-app-write -> This allows non-recursive write access to the `$APP` folder.", + "type": "string", + "enum": [ + "fs:allow-app-write" + ] + }, + { + "description": "fs:allow-app-write-recursive -> This allows full recusrive write access to the complete `$APP` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-app-write-recursive" + ] + }, + { + "description": "fs:allow-appcache-meta -> This allows read access to metadata of the `$APPCACHE` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-appcache-meta" + ] + }, + { + "description": "fs:allow-appcache-meta-recursive -> This allows read access to metadata of the `$APPCACHE` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-appcache-meta-recursive" + ] + }, + { + "description": "fs:allow-appcache-read -> This allows non-recursive read access to the `$APPCACHE` folder.", + "type": "string", + "enum": [ + "fs:allow-appcache-read" + ] + }, + { + "description": "fs:allow-appcache-read-recursive -> This allows full recursive read access to the complete `$APPCACHE` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-appcache-read-recursive" + ] + }, + { + "description": "fs:allow-appcache-write -> This allows non-recursive write access to the `$APPCACHE` folder.", + "type": "string", + "enum": [ + "fs:allow-appcache-write" + ] + }, + { + "description": "fs:allow-appcache-write-recursive -> This allows full recusrive write access to the complete `$APPCACHE` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-appcache-write-recursive" + ] + }, + { + "description": "fs:allow-appconfig-meta -> This allows read access to metadata of the `$APPCONFIG` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-appconfig-meta" + ] + }, + { + "description": "fs:allow-appconfig-meta-recursive -> This allows read access to metadata of the `$APPCONFIG` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-appconfig-meta-recursive" + ] + }, + { + "description": "fs:allow-appconfig-read -> This allows non-recursive read access to the `$APPCONFIG` folder.", + "type": "string", + "enum": [ + "fs:allow-appconfig-read" + ] + }, + { + "description": "fs:allow-appconfig-read-recursive -> This allows full recursive read access to the complete `$APPCONFIG` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-appconfig-read-recursive" + ] + }, + { + "description": "fs:allow-appconfig-write -> This allows non-recursive write access to the `$APPCONFIG` folder.", + "type": "string", + "enum": [ + "fs:allow-appconfig-write" + ] + }, + { + "description": "fs:allow-appconfig-write-recursive -> This allows full recusrive write access to the complete `$APPCONFIG` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-appconfig-write-recursive" + ] + }, + { + "description": "fs:allow-appdata-meta -> This allows read access to metadata of the `$APPDATA` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-appdata-meta" + ] + }, + { + "description": "fs:allow-appdata-meta-recursive -> This allows read access to metadata of the `$APPDATA` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-appdata-meta-recursive" + ] + }, + { + "description": "fs:allow-appdata-read -> This allows non-recursive read access to the `$APPDATA` folder.", + "type": "string", + "enum": [ + "fs:allow-appdata-read" + ] + }, + { + "description": "fs:allow-appdata-read-recursive -> This allows full recursive read access to the complete `$APPDATA` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-appdata-read-recursive" + ] + }, + { + "description": "fs:allow-appdata-write -> This allows non-recursive write access to the `$APPDATA` folder.", + "type": "string", + "enum": [ + "fs:allow-appdata-write" + ] + }, + { + "description": "fs:allow-appdata-write-recursive -> This allows full recusrive write access to the complete `$APPDATA` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-appdata-write-recursive" + ] + }, + { + "description": "fs:allow-applocaldata-meta -> This allows read access to metadata of the `$APPLOCALDATA` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-applocaldata-meta" + ] + }, + { + "description": "fs:allow-applocaldata-meta-recursive -> This allows read access to metadata of the `$APPLOCALDATA` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-applocaldata-meta-recursive" + ] + }, + { + "description": "fs:allow-applocaldata-read -> This allows non-recursive read access to the `$APPLOCALDATA` folder.", + "type": "string", + "enum": [ + "fs:allow-applocaldata-read" + ] + }, + { + "description": "fs:allow-applocaldata-read-recursive -> This allows full recursive read access to the complete `$APPLOCALDATA` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-applocaldata-read-recursive" + ] + }, + { + "description": "fs:allow-applocaldata-write -> This allows non-recursive write access to the `$APPLOCALDATA` folder.", + "type": "string", + "enum": [ + "fs:allow-applocaldata-write" + ] + }, + { + "description": "fs:allow-applocaldata-write-recursive -> This allows full recusrive write access to the complete `$APPLOCALDATA` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-applocaldata-write-recursive" + ] + }, + { + "description": "fs:allow-applog-meta -> This allows read access to metadata of the `$APPLOG` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-applog-meta" + ] + }, + { + "description": "fs:allow-applog-meta-recursive -> This allows read access to metadata of the `$APPLOG` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-applog-meta-recursive" + ] + }, + { + "description": "fs:allow-applog-read -> This allows non-recursive read access to the `$APPLOG` folder.", + "type": "string", + "enum": [ + "fs:allow-applog-read" + ] + }, + { + "description": "fs:allow-applog-read-recursive -> This allows full recursive read access to the complete `$APPLOG` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-applog-read-recursive" + ] + }, + { + "description": "fs:allow-applog-write -> This allows non-recursive write access to the `$APPLOG` folder.", + "type": "string", + "enum": [ + "fs:allow-applog-write" + ] + }, + { + "description": "fs:allow-applog-write-recursive -> This allows full recusrive write access to the complete `$APPLOG` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-applog-write-recursive" + ] + }, + { + "description": "fs:allow-audio-meta -> This allows read access to metadata of the `$AUDIO` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-audio-meta" + ] + }, + { + "description": "fs:allow-audio-meta-recursive -> This allows read access to metadata of the `$AUDIO` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-audio-meta-recursive" + ] + }, + { + "description": "fs:allow-audio-read -> This allows non-recursive read access to the `$AUDIO` folder.", + "type": "string", + "enum": [ + "fs:allow-audio-read" + ] + }, + { + "description": "fs:allow-audio-read-recursive -> This allows full recursive read access to the complete `$AUDIO` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-audio-read-recursive" + ] + }, + { + "description": "fs:allow-audio-write -> This allows non-recursive write access to the `$AUDIO` folder.", + "type": "string", + "enum": [ + "fs:allow-audio-write" + ] + }, + { + "description": "fs:allow-audio-write-recursive -> This allows full recusrive write access to the complete `$AUDIO` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-audio-write-recursive" + ] + }, + { + "description": "fs:allow-cache-meta -> This allows read access to metadata of the `$CACHE` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-cache-meta" + ] + }, + { + "description": "fs:allow-cache-meta-recursive -> This allows read access to metadata of the `$CACHE` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-cache-meta-recursive" + ] + }, + { + "description": "fs:allow-cache-read -> This allows non-recursive read access to the `$CACHE` folder.", + "type": "string", + "enum": [ + "fs:allow-cache-read" + ] + }, + { + "description": "fs:allow-cache-read-recursive -> This allows full recursive read access to the complete `$CACHE` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-cache-read-recursive" + ] + }, + { + "description": "fs:allow-cache-write -> This allows non-recursive write access to the `$CACHE` folder.", + "type": "string", + "enum": [ + "fs:allow-cache-write" + ] + }, + { + "description": "fs:allow-cache-write-recursive -> This allows full recusrive write access to the complete `$CACHE` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-cache-write-recursive" + ] + }, + { + "description": "fs:allow-config-meta -> This allows read access to metadata of the `$CONFIG` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-config-meta" + ] + }, + { + "description": "fs:allow-config-meta-recursive -> This allows read access to metadata of the `$CONFIG` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-config-meta-recursive" + ] + }, + { + "description": "fs:allow-config-read -> This allows non-recursive read access to the `$CONFIG` folder.", + "type": "string", + "enum": [ + "fs:allow-config-read" + ] + }, + { + "description": "fs:allow-config-read-recursive -> This allows full recursive read access to the complete `$CONFIG` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-config-read-recursive" + ] + }, + { + "description": "fs:allow-config-write -> This allows non-recursive write access to the `$CONFIG` folder.", + "type": "string", + "enum": [ + "fs:allow-config-write" + ] + }, + { + "description": "fs:allow-config-write-recursive -> This allows full recusrive write access to the complete `$CONFIG` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-config-write-recursive" + ] + }, + { + "description": "fs:allow-data-meta -> This allows read access to metadata of the `$DATA` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-data-meta" + ] + }, + { + "description": "fs:allow-data-meta-recursive -> This allows read access to metadata of the `$DATA` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-data-meta-recursive" + ] + }, + { + "description": "fs:allow-data-read -> This allows non-recursive read access to the `$DATA` folder.", + "type": "string", + "enum": [ + "fs:allow-data-read" + ] + }, + { + "description": "fs:allow-data-read-recursive -> This allows full recursive read access to the complete `$DATA` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-data-read-recursive" + ] + }, + { + "description": "fs:allow-data-write -> This allows non-recursive write access to the `$DATA` folder.", + "type": "string", + "enum": [ + "fs:allow-data-write" + ] + }, + { + "description": "fs:allow-data-write-recursive -> This allows full recusrive write access to the complete `$DATA` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-data-write-recursive" + ] + }, + { + "description": "fs:allow-desktop-meta -> This allows read access to metadata of the `$DESKTOP` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-desktop-meta" + ] + }, + { + "description": "fs:allow-desktop-meta-recursive -> This allows read access to metadata of the `$DESKTOP` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-desktop-meta-recursive" + ] + }, + { + "description": "fs:allow-desktop-read -> This allows non-recursive read access to the `$DESKTOP` folder.", + "type": "string", + "enum": [ + "fs:allow-desktop-read" + ] + }, + { + "description": "fs:allow-desktop-read-recursive -> This allows full recursive read access to the complete `$DESKTOP` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-desktop-read-recursive" + ] + }, + { + "description": "fs:allow-desktop-write -> This allows non-recursive write access to the `$DESKTOP` folder.", + "type": "string", + "enum": [ + "fs:allow-desktop-write" + ] + }, + { + "description": "fs:allow-desktop-write-recursive -> This allows full recusrive write access to the complete `$DESKTOP` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-desktop-write-recursive" + ] + }, + { + "description": "fs:allow-document-meta -> This allows read access to metadata of the `$DOCUMENT` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-document-meta" + ] + }, + { + "description": "fs:allow-document-meta-recursive -> This allows read access to metadata of the `$DOCUMENT` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-document-meta-recursive" + ] + }, + { + "description": "fs:allow-document-read -> This allows non-recursive read access to the `$DOCUMENT` folder.", + "type": "string", + "enum": [ + "fs:allow-document-read" + ] + }, + { + "description": "fs:allow-document-read-recursive -> This allows full recursive read access to the complete `$DOCUMENT` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-document-read-recursive" + ] + }, + { + "description": "fs:allow-document-write -> This allows non-recursive write access to the `$DOCUMENT` folder.", + "type": "string", + "enum": [ + "fs:allow-document-write" + ] + }, + { + "description": "fs:allow-document-write-recursive -> This allows full recusrive write access to the complete `$DOCUMENT` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-document-write-recursive" + ] + }, + { + "description": "fs:allow-download-meta -> This allows read access to metadata of the `$DOWNLOAD` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-download-meta" + ] + }, + { + "description": "fs:allow-download-meta-recursive -> This allows read access to metadata of the `$DOWNLOAD` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-download-meta-recursive" + ] + }, + { + "description": "fs:allow-download-read -> This allows non-recursive read access to the `$DOWNLOAD` folder.", + "type": "string", + "enum": [ + "fs:allow-download-read" + ] + }, + { + "description": "fs:allow-download-read-recursive -> This allows full recursive read access to the complete `$DOWNLOAD` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-download-read-recursive" + ] + }, + { + "description": "fs:allow-download-write -> This allows non-recursive write access to the `$DOWNLOAD` folder.", + "type": "string", + "enum": [ + "fs:allow-download-write" + ] + }, + { + "description": "fs:allow-download-write-recursive -> This allows full recusrive write access to the complete `$DOWNLOAD` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-download-write-recursive" + ] + }, + { + "description": "fs:allow-exe-meta -> This allows read access to metadata of the `$EXE` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-exe-meta" + ] + }, + { + "description": "fs:allow-exe-meta-recursive -> This allows read access to metadata of the `$EXE` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-exe-meta-recursive" + ] + }, + { + "description": "fs:allow-exe-read -> This allows non-recursive read access to the `$EXE` folder.", + "type": "string", + "enum": [ + "fs:allow-exe-read" + ] + }, + { + "description": "fs:allow-exe-read-recursive -> This allows full recursive read access to the complete `$EXE` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-exe-read-recursive" + ] + }, + { + "description": "fs:allow-exe-write -> This allows non-recursive write access to the `$EXE` folder.", + "type": "string", + "enum": [ + "fs:allow-exe-write" + ] + }, + { + "description": "fs:allow-exe-write-recursive -> This allows full recusrive write access to the complete `$EXE` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-exe-write-recursive" + ] + }, + { + "description": "fs:allow-font-meta -> This allows read access to metadata of the `$FONT` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-font-meta" + ] + }, + { + "description": "fs:allow-font-meta-recursive -> This allows read access to metadata of the `$FONT` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-font-meta-recursive" + ] + }, + { + "description": "fs:allow-font-read -> This allows non-recursive read access to the `$FONT` folder.", + "type": "string", + "enum": [ + "fs:allow-font-read" + ] + }, + { + "description": "fs:allow-font-read-recursive -> This allows full recursive read access to the complete `$FONT` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-font-read-recursive" + ] + }, + { + "description": "fs:allow-font-write -> This allows non-recursive write access to the `$FONT` folder.", + "type": "string", + "enum": [ + "fs:allow-font-write" + ] + }, + { + "description": "fs:allow-font-write-recursive -> This allows full recusrive write access to the complete `$FONT` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-font-write-recursive" + ] + }, + { + "description": "fs:allow-home-meta -> This allows read access to metadata of the `$HOME` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-home-meta" + ] + }, + { + "description": "fs:allow-home-meta-recursive -> This allows read access to metadata of the `$HOME` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-home-meta-recursive" + ] + }, + { + "description": "fs:allow-home-read -> This allows non-recursive read access to the `$HOME` folder.", + "type": "string", + "enum": [ + "fs:allow-home-read" + ] + }, + { + "description": "fs:allow-home-read-recursive -> This allows full recursive read access to the complete `$HOME` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-home-read-recursive" + ] + }, + { + "description": "fs:allow-home-write -> This allows non-recursive write access to the `$HOME` folder.", + "type": "string", + "enum": [ + "fs:allow-home-write" + ] + }, + { + "description": "fs:allow-home-write-recursive -> This allows full recusrive write access to the complete `$HOME` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-home-write-recursive" + ] + }, + { + "description": "fs:allow-localdata-meta -> This allows read access to metadata of the `$LOCALDATA` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-localdata-meta" + ] + }, + { + "description": "fs:allow-localdata-meta-recursive -> This allows read access to metadata of the `$LOCALDATA` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-localdata-meta-recursive" + ] + }, + { + "description": "fs:allow-localdata-read -> This allows non-recursive read access to the `$LOCALDATA` folder.", + "type": "string", + "enum": [ + "fs:allow-localdata-read" + ] + }, + { + "description": "fs:allow-localdata-read-recursive -> This allows full recursive read access to the complete `$LOCALDATA` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-localdata-read-recursive" + ] + }, + { + "description": "fs:allow-localdata-write -> This allows non-recursive write access to the `$LOCALDATA` folder.", + "type": "string", + "enum": [ + "fs:allow-localdata-write" + ] + }, + { + "description": "fs:allow-localdata-write-recursive -> This allows full recusrive write access to the complete `$LOCALDATA` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-localdata-write-recursive" + ] + }, + { + "description": "fs:allow-log-meta -> This allows read access to metadata of the `$LOG` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-log-meta" + ] + }, + { + "description": "fs:allow-log-meta-recursive -> This allows read access to metadata of the `$LOG` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-log-meta-recursive" + ] + }, + { + "description": "fs:allow-log-read -> This allows non-recursive read access to the `$LOG` folder.", + "type": "string", + "enum": [ + "fs:allow-log-read" + ] + }, + { + "description": "fs:allow-log-read-recursive -> This allows full recursive read access to the complete `$LOG` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-log-read-recursive" + ] + }, + { + "description": "fs:allow-log-write -> This allows non-recursive write access to the `$LOG` folder.", + "type": "string", + "enum": [ + "fs:allow-log-write" + ] + }, + { + "description": "fs:allow-log-write-recursive -> This allows full recusrive write access to the complete `$LOG` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-log-write-recursive" + ] + }, + { + "description": "fs:allow-picture-meta -> This allows read access to metadata of the `$PICTURE` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-picture-meta" + ] + }, + { + "description": "fs:allow-picture-meta-recursive -> This allows read access to metadata of the `$PICTURE` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-picture-meta-recursive" + ] + }, + { + "description": "fs:allow-picture-read -> This allows non-recursive read access to the `$PICTURE` folder.", + "type": "string", + "enum": [ + "fs:allow-picture-read" + ] + }, + { + "description": "fs:allow-picture-read-recursive -> This allows full recursive read access to the complete `$PICTURE` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-picture-read-recursive" + ] + }, + { + "description": "fs:allow-picture-write -> This allows non-recursive write access to the `$PICTURE` folder.", + "type": "string", + "enum": [ + "fs:allow-picture-write" + ] + }, + { + "description": "fs:allow-picture-write-recursive -> This allows full recusrive write access to the complete `$PICTURE` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-picture-write-recursive" + ] + }, + { + "description": "fs:allow-public-meta -> This allows read access to metadata of the `$PUBLIC` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-public-meta" + ] + }, + { + "description": "fs:allow-public-meta-recursive -> This allows read access to metadata of the `$PUBLIC` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-public-meta-recursive" + ] + }, + { + "description": "fs:allow-public-read -> This allows non-recursive read access to the `$PUBLIC` folder.", + "type": "string", + "enum": [ + "fs:allow-public-read" + ] + }, + { + "description": "fs:allow-public-read-recursive -> This allows full recursive read access to the complete `$PUBLIC` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-public-read-recursive" + ] + }, + { + "description": "fs:allow-public-write -> This allows non-recursive write access to the `$PUBLIC` folder.", + "type": "string", + "enum": [ + "fs:allow-public-write" + ] + }, + { + "description": "fs:allow-public-write-recursive -> This allows full recusrive write access to the complete `$PUBLIC` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-public-write-recursive" + ] + }, + { + "description": "fs:allow-resource-meta -> This allows read access to metadata of the `$RESOURCE` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-resource-meta" + ] + }, + { + "description": "fs:allow-resource-meta-recursive -> This allows read access to metadata of the `$RESOURCE` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-resource-meta-recursive" + ] + }, + { + "description": "fs:allow-resource-read -> This allows non-recursive read access to the `$RESOURCE` folder.", + "type": "string", + "enum": [ + "fs:allow-resource-read" + ] + }, + { + "description": "fs:allow-resource-read-recursive -> This allows full recursive read access to the complete `$RESOURCE` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-resource-read-recursive" + ] + }, + { + "description": "fs:allow-resource-write -> This allows non-recursive write access to the `$RESOURCE` folder.", + "type": "string", + "enum": [ + "fs:allow-resource-write" + ] + }, + { + "description": "fs:allow-resource-write-recursive -> This allows full recusrive write access to the complete `$RESOURCE` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-resource-write-recursive" + ] + }, + { + "description": "fs:allow-runtime-meta -> This allows read access to metadata of the `$RUNTIME` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-runtime-meta" + ] + }, + { + "description": "fs:allow-runtime-meta-recursive -> This allows read access to metadata of the `$RUNTIME` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-runtime-meta-recursive" + ] + }, + { + "description": "fs:allow-runtime-read -> This allows non-recursive read access to the `$RUNTIME` folder.", + "type": "string", + "enum": [ + "fs:allow-runtime-read" + ] + }, + { + "description": "fs:allow-runtime-read-recursive -> This allows full recursive read access to the complete `$RUNTIME` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-runtime-read-recursive" + ] + }, + { + "description": "fs:allow-runtime-write -> This allows non-recursive write access to the `$RUNTIME` folder.", + "type": "string", + "enum": [ + "fs:allow-runtime-write" + ] + }, + { + "description": "fs:allow-runtime-write-recursive -> This allows full recusrive write access to the complete `$RUNTIME` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-runtime-write-recursive" + ] + }, + { + "description": "fs:allow-temp-meta -> This allows read access to metadata of the `$TEMP` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-temp-meta" + ] + }, + { + "description": "fs:allow-temp-meta-recursive -> This allows read access to metadata of the `$TEMP` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-temp-meta-recursive" + ] + }, + { + "description": "fs:allow-temp-read -> This allows non-recursive read access to the `$TEMP` folder.", + "type": "string", + "enum": [ + "fs:allow-temp-read" + ] + }, + { + "description": "fs:allow-temp-read-recursive -> This allows full recursive read access to the complete `$TEMP` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-temp-read-recursive" + ] + }, + { + "description": "fs:allow-temp-write -> This allows non-recursive write access to the `$TEMP` folder.", + "type": "string", + "enum": [ + "fs:allow-temp-write" + ] + }, + { + "description": "fs:allow-temp-write-recursive -> This allows full recusrive write access to the complete `$TEMP` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-temp-write-recursive" + ] + }, + { + "description": "fs:allow-template-meta -> This allows read access to metadata of the `$TEMPLATE` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-template-meta" + ] + }, + { + "description": "fs:allow-template-meta-recursive -> This allows read access to metadata of the `$TEMPLATE` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-template-meta-recursive" + ] + }, + { + "description": "fs:allow-template-read -> This allows non-recursive read access to the `$TEMPLATE` folder.", + "type": "string", + "enum": [ + "fs:allow-template-read" + ] + }, + { + "description": "fs:allow-template-read-recursive -> This allows full recursive read access to the complete `$TEMPLATE` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-template-read-recursive" + ] + }, + { + "description": "fs:allow-template-write -> This allows non-recursive write access to the `$TEMPLATE` folder.", + "type": "string", + "enum": [ + "fs:allow-template-write" + ] + }, + { + "description": "fs:allow-template-write-recursive -> This allows full recusrive write access to the complete `$TEMPLATE` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-template-write-recursive" + ] + }, + { + "description": "fs:allow-video-meta -> This allows read access to metadata of the `$VIDEO` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-video-meta" + ] + }, + { + "description": "fs:allow-video-meta-recursive -> This allows read access to metadata of the `$VIDEO` folder, including file listing and statistics.", + "type": "string", + "enum": [ + "fs:allow-video-meta-recursive" + ] + }, + { + "description": "fs:allow-video-read -> This allows non-recursive read access to the `$VIDEO` folder.", + "type": "string", + "enum": [ + "fs:allow-video-read" + ] + }, + { + "description": "fs:allow-video-read-recursive -> This allows full recursive read access to the complete `$VIDEO` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-video-read-recursive" + ] + }, + { + "description": "fs:allow-video-write -> This allows non-recursive write access to the `$VIDEO` folder.", + "type": "string", + "enum": [ + "fs:allow-video-write" + ] + }, + { + "description": "fs:allow-video-write-recursive -> This allows full recusrive write access to the complete `$VIDEO` folder, files and subdirectories.", + "type": "string", + "enum": [ + "fs:allow-video-write-recursive" + ] + }, + { + "description": "fs:deny-default -> This denies access to dangerous Tauri relevant files and folders by default.", + "type": "string", + "enum": [ + "fs:deny-default" + ] + }, + { + "description": "fs:default -> # Tauri `fs` default permissions\n\nThis configuration file defines the default permissions granted\nto the filesystem.\n\n### Granted Permissions\n\nThis default permission set enables all read-related commands and\nallows access to the `$APP` folder and sub directories created in it.\nThe location of the `$APP` folder depends on the operating system,\nwhere the application is run.\n\nIn general the `$APP` folder needs to be manually created\nby the application at runtime, before accessing files or folders\nin it is possible.\n\n### Denied Permissions\n\nThis default permission set prevents access to critical components\nof the Tauri application by default.\nOn Windows the webview data folder access is denied.\n\n", + "type": "string", + "enum": [ + "fs:default" + ] + }, + { + "description": "fs:allow-copy-file -> Enables the copy_file command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-copy-file" + ] + }, + { + "description": "fs:allow-create -> Enables the create command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-create" + ] + }, + { + "description": "fs:allow-exists -> Enables the exists command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-exists" + ] + }, + { + "description": "fs:allow-fstat -> Enables the fstat command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-fstat" + ] + }, + { + "description": "fs:allow-ftruncate -> Enables the ftruncate command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-ftruncate" + ] + }, + { + "description": "fs:allow-lstat -> Enables the lstat command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-lstat" + ] + }, + { + "description": "fs:allow-mkdir -> Enables the mkdir command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-mkdir" + ] + }, + { + "description": "fs:allow-open -> Enables the open command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-open" + ] + }, + { + "description": "fs:allow-read -> Enables the read command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-read" + ] + }, + { + "description": "fs:allow-read-dir -> Enables the read_dir command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-read-dir" + ] + }, + { + "description": "fs:allow-read-file -> Enables the read_file command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-read-file" + ] + }, + { + "description": "fs:allow-read-text-file -> Enables the read_text_file command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-read-text-file" + ] + }, + { + "description": "fs:allow-read-text-file-lines -> Enables the read_text_file_lines command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-read-text-file-lines" + ] + }, + { + "description": "fs:allow-read-text-file-lines-next -> Enables the read_text_file_lines_next command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-read-text-file-lines-next" + ] + }, + { + "description": "fs:allow-remove -> Enables the remove command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-remove" + ] + }, + { + "description": "fs:allow-rename -> Enables the rename command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-rename" + ] + }, + { + "description": "fs:allow-seek -> Enables the seek command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-seek" + ] + }, + { + "description": "fs:allow-stat -> Enables the stat command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-stat" + ] + }, + { + "description": "fs:allow-truncate -> Enables the truncate command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-truncate" + ] + }, + { + "description": "fs:allow-unwatch -> Enables the unwatch command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-unwatch" + ] + }, + { + "description": "fs:allow-watch -> Enables the watch command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-watch" + ] + }, + { + "description": "fs:allow-write -> Enables the write command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-write" + ] + }, + { + "description": "fs:allow-write-file -> Enables the write_file command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-write-file" + ] + }, + { + "description": "fs:allow-write-text-file -> Enables the write_text_file command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:allow-write-text-file" + ] + }, + { + "description": "fs:deny-copy-file -> Denies the copy_file command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-copy-file" + ] + }, + { + "description": "fs:deny-create -> Denies the create command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-create" + ] + }, + { + "description": "fs:deny-exists -> Denies the exists command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-exists" + ] + }, + { + "description": "fs:deny-fstat -> Denies the fstat command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-fstat" + ] + }, + { + "description": "fs:deny-ftruncate -> Denies the ftruncate command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-ftruncate" + ] + }, + { + "description": "fs:deny-lstat -> Denies the lstat command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-lstat" + ] + }, + { + "description": "fs:deny-mkdir -> Denies the mkdir command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-mkdir" + ] + }, + { + "description": "fs:deny-open -> Denies the open command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-open" + ] + }, + { + "description": "fs:deny-read -> Denies the read command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-read" + ] + }, + { + "description": "fs:deny-read-dir -> Denies the read_dir command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-read-dir" + ] + }, + { + "description": "fs:deny-read-file -> Denies the read_file command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-read-file" + ] + }, + { + "description": "fs:deny-read-text-file -> Denies the read_text_file command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-read-text-file" + ] + }, + { + "description": "fs:deny-read-text-file-lines -> Denies the read_text_file_lines command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-read-text-file-lines" + ] + }, + { + "description": "fs:deny-read-text-file-lines-next -> Denies the read_text_file_lines_next command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-read-text-file-lines-next" + ] + }, + { + "description": "fs:deny-remove -> Denies the remove command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-remove" + ] + }, + { + "description": "fs:deny-rename -> Denies the rename command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-rename" + ] + }, + { + "description": "fs:deny-seek -> Denies the seek command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-seek" + ] + }, + { + "description": "fs:deny-stat -> Denies the stat command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-stat" + ] + }, + { + "description": "fs:deny-truncate -> Denies the truncate command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-truncate" + ] + }, + { + "description": "fs:deny-unwatch -> Denies the unwatch command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-unwatch" + ] + }, + { + "description": "fs:deny-watch -> Denies the watch command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-watch" + ] + }, + { + "description": "fs:deny-webview-data-linux -> This denies read access to the\n`$APPLOCALDATA` folder on linux as the webview data and configuration values are stored here.\nAllowing access can lead to sensitive information disclosure and should be well considered.", + "type": "string", + "enum": [ + "fs:deny-webview-data-linux" + ] + }, + { + "description": "fs:deny-webview-data-windows -> This denies read access to the\n`$APPLOCALDATA/EBWebView` folder on windows as the webview data and configuration values are stored here.\nAllowing access can lead to sensitive information disclosure and should be well considered.", + "type": "string", + "enum": [ + "fs:deny-webview-data-windows" + ] + }, + { + "description": "fs:deny-write -> Denies the write command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-write" + ] + }, + { + "description": "fs:deny-write-file -> Denies the write_file command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-write-file" + ] + }, + { + "description": "fs:deny-write-text-file -> Denies the write_text_file command without any pre-configured scope.", + "type": "string", + "enum": [ + "fs:deny-write-text-file" + ] + }, + { + "description": "fs:read-all -> This enables all read related commands without any pre-configured accessible paths.", + "type": "string", + "enum": [ + "fs:read-all" + ] + }, + { + "description": "fs:read-dirs -> This enables directory read and file metadata related commands without any pre-configured accessible paths.", + "type": "string", + "enum": [ + "fs:read-dirs" + ] + }, + { + "description": "fs:read-files -> This enables file read related commands without any pre-configured accessible paths.", + "type": "string", + "enum": [ + "fs:read-files" + ] + }, + { + "description": "fs:read-meta -> This enables all index or metadata related commands without any pre-configured accessible paths.", + "type": "string", + "enum": [ + "fs:read-meta" + ] + }, + { + "description": "fs:scope -> An empty permission you can use to modify the global scope.", + "type": "string", + "enum": [ + "fs:scope" + ] + }, + { + "description": "fs:scope-app -> This scope permits access to all files and list content of top level directories in the `$APP`folder.", + "type": "string", + "enum": [ + "fs:scope-app" + ] + }, + { + "description": "fs:scope-app-index -> This scope permits to list all files and folders in the `$APP`folder.", + "type": "string", + "enum": [ + "fs:scope-app-index" + ] + }, + { + "description": "fs:scope-app-recursive -> This scope recursive access to the complete `$APP` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-app-recursive" + ] + }, + { + "description": "fs:scope-appcache -> This scope permits access to all files and list content of top level directories in the `$APPCACHE`folder.", + "type": "string", + "enum": [ + "fs:scope-appcache" + ] + }, + { + "description": "fs:scope-appcache-index -> This scope permits to list all files and folders in the `$APPCACHE`folder.", + "type": "string", + "enum": [ + "fs:scope-appcache-index" + ] + }, + { + "description": "fs:scope-appcache-recursive -> This scope recursive access to the complete `$APPCACHE` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-appcache-recursive" + ] + }, + { + "description": "fs:scope-appconfig -> This scope permits access to all files and list content of top level directories in the `$APPCONFIG`folder.", + "type": "string", + "enum": [ + "fs:scope-appconfig" + ] + }, + { + "description": "fs:scope-appconfig-index -> This scope permits to list all files and folders in the `$APPCONFIG`folder.", + "type": "string", + "enum": [ + "fs:scope-appconfig-index" + ] + }, + { + "description": "fs:scope-appconfig-recursive -> This scope recursive access to the complete `$APPCONFIG` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-appconfig-recursive" + ] + }, + { + "description": "fs:scope-appdata -> This scope permits access to all files and list content of top level directories in the `$APPDATA`folder.", + "type": "string", + "enum": [ + "fs:scope-appdata" + ] + }, + { + "description": "fs:scope-appdata-index -> This scope permits to list all files and folders in the `$APPDATA`folder.", + "type": "string", + "enum": [ + "fs:scope-appdata-index" + ] + }, + { + "description": "fs:scope-appdata-recursive -> This scope recursive access to the complete `$APPDATA` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-appdata-recursive" + ] + }, + { + "description": "fs:scope-applocaldata -> This scope permits access to all files and list content of top level directories in the `$APPLOCALDATA`folder.", + "type": "string", + "enum": [ + "fs:scope-applocaldata" + ] + }, + { + "description": "fs:scope-applocaldata-index -> This scope permits to list all files and folders in the `$APPLOCALDATA`folder.", + "type": "string", + "enum": [ + "fs:scope-applocaldata-index" + ] + }, + { + "description": "fs:scope-applocaldata-recursive -> This scope recursive access to the complete `$APPLOCALDATA` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-applocaldata-recursive" + ] + }, + { + "description": "fs:scope-applog -> This scope permits access to all files and list content of top level directories in the `$APPLOG`folder.", + "type": "string", + "enum": [ + "fs:scope-applog" + ] + }, + { + "description": "fs:scope-applog-index -> This scope permits to list all files and folders in the `$APPLOG`folder.", + "type": "string", + "enum": [ + "fs:scope-applog-index" + ] + }, + { + "description": "fs:scope-applog-recursive -> This scope recursive access to the complete `$APPLOG` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-applog-recursive" + ] + }, + { + "description": "fs:scope-audio -> This scope permits access to all files and list content of top level directories in the `$AUDIO`folder.", + "type": "string", + "enum": [ + "fs:scope-audio" + ] + }, + { + "description": "fs:scope-audio-index -> This scope permits to list all files and folders in the `$AUDIO`folder.", + "type": "string", + "enum": [ + "fs:scope-audio-index" + ] + }, + { + "description": "fs:scope-audio-recursive -> This scope recursive access to the complete `$AUDIO` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-audio-recursive" + ] + }, + { + "description": "fs:scope-cache -> This scope permits access to all files and list content of top level directories in the `$CACHE`folder.", + "type": "string", + "enum": [ + "fs:scope-cache" + ] + }, + { + "description": "fs:scope-cache-index -> This scope permits to list all files and folders in the `$CACHE`folder.", + "type": "string", + "enum": [ + "fs:scope-cache-index" + ] + }, + { + "description": "fs:scope-cache-recursive -> This scope recursive access to the complete `$CACHE` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-cache-recursive" + ] + }, + { + "description": "fs:scope-config -> This scope permits access to all files and list content of top level directories in the `$CONFIG`folder.", + "type": "string", + "enum": [ + "fs:scope-config" + ] + }, + { + "description": "fs:scope-config-index -> This scope permits to list all files and folders in the `$CONFIG`folder.", + "type": "string", + "enum": [ + "fs:scope-config-index" + ] + }, + { + "description": "fs:scope-config-recursive -> This scope recursive access to the complete `$CONFIG` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-config-recursive" + ] + }, + { + "description": "fs:scope-data -> This scope permits access to all files and list content of top level directories in the `$DATA`folder.", + "type": "string", + "enum": [ + "fs:scope-data" + ] + }, + { + "description": "fs:scope-data-index -> This scope permits to list all files and folders in the `$DATA`folder.", + "type": "string", + "enum": [ + "fs:scope-data-index" + ] + }, + { + "description": "fs:scope-data-recursive -> This scope recursive access to the complete `$DATA` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-data-recursive" + ] + }, + { + "description": "fs:scope-desktop -> This scope permits access to all files and list content of top level directories in the `$DESKTOP`folder.", + "type": "string", + "enum": [ + "fs:scope-desktop" + ] + }, + { + "description": "fs:scope-desktop-index -> This scope permits to list all files and folders in the `$DESKTOP`folder.", + "type": "string", + "enum": [ + "fs:scope-desktop-index" + ] + }, + { + "description": "fs:scope-desktop-recursive -> This scope recursive access to the complete `$DESKTOP` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-desktop-recursive" + ] + }, + { + "description": "fs:scope-document -> This scope permits access to all files and list content of top level directories in the `$DOCUMENT`folder.", + "type": "string", + "enum": [ + "fs:scope-document" + ] + }, + { + "description": "fs:scope-document-index -> This scope permits to list all files and folders in the `$DOCUMENT`folder.", + "type": "string", + "enum": [ + "fs:scope-document-index" + ] + }, + { + "description": "fs:scope-document-recursive -> This scope recursive access to the complete `$DOCUMENT` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-document-recursive" + ] + }, + { + "description": "fs:scope-download -> This scope permits access to all files and list content of top level directories in the `$DOWNLOAD`folder.", + "type": "string", + "enum": [ + "fs:scope-download" + ] + }, + { + "description": "fs:scope-download-index -> This scope permits to list all files and folders in the `$DOWNLOAD`folder.", + "type": "string", + "enum": [ + "fs:scope-download-index" + ] + }, + { + "description": "fs:scope-download-recursive -> This scope recursive access to the complete `$DOWNLOAD` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-download-recursive" + ] + }, + { + "description": "fs:scope-exe -> This scope permits access to all files and list content of top level directories in the `$EXE`folder.", + "type": "string", + "enum": [ + "fs:scope-exe" + ] + }, + { + "description": "fs:scope-exe-index -> This scope permits to list all files and folders in the `$EXE`folder.", + "type": "string", + "enum": [ + "fs:scope-exe-index" + ] + }, + { + "description": "fs:scope-exe-recursive -> This scope recursive access to the complete `$EXE` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-exe-recursive" + ] + }, + { + "description": "fs:scope-font -> This scope permits access to all files and list content of top level directories in the `$FONT`folder.", + "type": "string", + "enum": [ + "fs:scope-font" + ] + }, + { + "description": "fs:scope-font-index -> This scope permits to list all files and folders in the `$FONT`folder.", + "type": "string", + "enum": [ + "fs:scope-font-index" + ] + }, + { + "description": "fs:scope-font-recursive -> This scope recursive access to the complete `$FONT` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-font-recursive" + ] + }, + { + "description": "fs:scope-home -> This scope permits access to all files and list content of top level directories in the `$HOME`folder.", + "type": "string", + "enum": [ + "fs:scope-home" + ] + }, + { + "description": "fs:scope-home-index -> This scope permits to list all files and folders in the `$HOME`folder.", + "type": "string", + "enum": [ + "fs:scope-home-index" + ] + }, + { + "description": "fs:scope-home-recursive -> This scope recursive access to the complete `$HOME` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-home-recursive" + ] + }, + { + "description": "fs:scope-localdata -> This scope permits access to all files and list content of top level directories in the `$LOCALDATA`folder.", + "type": "string", + "enum": [ + "fs:scope-localdata" + ] + }, + { + "description": "fs:scope-localdata-index -> This scope permits to list all files and folders in the `$LOCALDATA`folder.", + "type": "string", + "enum": [ + "fs:scope-localdata-index" + ] + }, + { + "description": "fs:scope-localdata-recursive -> This scope recursive access to the complete `$LOCALDATA` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-localdata-recursive" + ] + }, + { + "description": "fs:scope-log -> This scope permits access to all files and list content of top level directories in the `$LOG`folder.", + "type": "string", + "enum": [ + "fs:scope-log" + ] + }, + { + "description": "fs:scope-log-index -> This scope permits to list all files and folders in the `$LOG`folder.", + "type": "string", + "enum": [ + "fs:scope-log-index" + ] + }, + { + "description": "fs:scope-log-recursive -> This scope recursive access to the complete `$LOG` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-log-recursive" + ] + }, + { + "description": "fs:scope-picture -> This scope permits access to all files and list content of top level directories in the `$PICTURE`folder.", + "type": "string", + "enum": [ + "fs:scope-picture" + ] + }, + { + "description": "fs:scope-picture-index -> This scope permits to list all files and folders in the `$PICTURE`folder.", + "type": "string", + "enum": [ + "fs:scope-picture-index" + ] + }, + { + "description": "fs:scope-picture-recursive -> This scope recursive access to the complete `$PICTURE` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-picture-recursive" + ] + }, + { + "description": "fs:scope-public -> This scope permits access to all files and list content of top level directories in the `$PUBLIC`folder.", + "type": "string", + "enum": [ + "fs:scope-public" + ] + }, + { + "description": "fs:scope-public-index -> This scope permits to list all files and folders in the `$PUBLIC`folder.", + "type": "string", + "enum": [ + "fs:scope-public-index" + ] + }, + { + "description": "fs:scope-public-recursive -> This scope recursive access to the complete `$PUBLIC` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-public-recursive" + ] + }, + { + "description": "fs:scope-resource -> This scope permits access to all files and list content of top level directories in the `$RESOURCE`folder.", + "type": "string", + "enum": [ + "fs:scope-resource" + ] + }, + { + "description": "fs:scope-resource-index -> This scope permits to list all files and folders in the `$RESOURCE`folder.", + "type": "string", + "enum": [ + "fs:scope-resource-index" + ] + }, + { + "description": "fs:scope-resource-recursive -> This scope recursive access to the complete `$RESOURCE` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-resource-recursive" + ] + }, + { + "description": "fs:scope-runtime -> This scope permits access to all files and list content of top level directories in the `$RUNTIME`folder.", + "type": "string", + "enum": [ + "fs:scope-runtime" + ] + }, + { + "description": "fs:scope-runtime-index -> This scope permits to list all files and folders in the `$RUNTIME`folder.", + "type": "string", + "enum": [ + "fs:scope-runtime-index" + ] + }, + { + "description": "fs:scope-runtime-recursive -> This scope recursive access to the complete `$RUNTIME` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-runtime-recursive" + ] + }, + { + "description": "fs:scope-temp -> This scope permits access to all files and list content of top level directories in the `$TEMP`folder.", + "type": "string", + "enum": [ + "fs:scope-temp" + ] + }, + { + "description": "fs:scope-temp-index -> This scope permits to list all files and folders in the `$TEMP`folder.", + "type": "string", + "enum": [ + "fs:scope-temp-index" + ] + }, + { + "description": "fs:scope-temp-recursive -> This scope recursive access to the complete `$TEMP` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-temp-recursive" + ] + }, + { + "description": "fs:scope-template -> This scope permits access to all files and list content of top level directories in the `$TEMPLATE`folder.", + "type": "string", + "enum": [ + "fs:scope-template" + ] + }, + { + "description": "fs:scope-template-index -> This scope permits to list all files and folders in the `$TEMPLATE`folder.", + "type": "string", + "enum": [ + "fs:scope-template-index" + ] + }, + { + "description": "fs:scope-template-recursive -> This scope recursive access to the complete `$TEMPLATE` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-template-recursive" + ] + }, + { + "description": "fs:scope-video -> This scope permits access to all files and list content of top level directories in the `$VIDEO`folder.", + "type": "string", + "enum": [ + "fs:scope-video" + ] + }, + { + "description": "fs:scope-video-index -> This scope permits to list all files and folders in the `$VIDEO`folder.", + "type": "string", + "enum": [ + "fs:scope-video-index" + ] + }, + { + "description": "fs:scope-video-recursive -> This scope recursive access to the complete `$VIDEO` folder, including sub directories and files.", + "type": "string", + "enum": [ + "fs:scope-video-recursive" + ] + }, + { + "description": "fs:write-all -> This enables all write related commands without any pre-configured accessible paths.", + "type": "string", + "enum": [ + "fs:write-all" + ] + }, + { + "description": "fs:write-files -> This enables all file write related commands without any pre-configured accessible paths.", + "type": "string", + "enum": [ + "fs:write-files" + ] + }, + { + "description": "http:default -> Allows all fetch operations", + "type": "string", + "enum": [ + "http:default" + ] + }, + { + "description": "http:allow-fetch -> Enables the fetch command without any pre-configured scope.", + "type": "string", + "enum": [ + "http:allow-fetch" + ] + }, + { + "description": "http:allow-fetch-cancel -> Enables the fetch_cancel command without any pre-configured scope.", + "type": "string", + "enum": [ + "http:allow-fetch-cancel" + ] + }, + { + "description": "http:allow-fetch-read-body -> Enables the fetch_read_body command without any pre-configured scope.", + "type": "string", + "enum": [ + "http:allow-fetch-read-body" + ] + }, + { + "description": "http:allow-fetch-send -> Enables the fetch_send command without any pre-configured scope.", + "type": "string", + "enum": [ + "http:allow-fetch-send" + ] + }, + { + "description": "http:deny-fetch -> Denies the fetch command without any pre-configured scope.", + "type": "string", + "enum": [ + "http:deny-fetch" + ] + }, + { + "description": "http:deny-fetch-cancel -> Denies the fetch_cancel command without any pre-configured scope.", + "type": "string", + "enum": [ + "http:deny-fetch-cancel" + ] + }, + { + "description": "http:deny-fetch-read-body -> Denies the fetch_read_body command without any pre-configured scope.", + "type": "string", + "enum": [ + "http:deny-fetch-read-body" + ] + }, + { + "description": "http:deny-fetch-send -> Denies the fetch_send command without any pre-configured scope.", + "type": "string", + "enum": [ + "http:deny-fetch-send" + ] + }, + { + "description": "log:default -> Allows the log command", + "type": "string", + "enum": [ + "log:default" + ] + }, + { + "description": "log:allow-log -> Enables the log command without any pre-configured scope.", + "type": "string", + "enum": [ + "log:allow-log" + ] + }, + { + "description": "log:deny-log -> Denies the log command without any pre-configured scope.", + "type": "string", + "enum": [ + "log:deny-log" + ] + }, + { + "description": "menu:default -> Default permissions for the plugin.", + "type": "string", + "enum": [ + "menu:default" + ] + }, + { + "description": "menu:allow-append -> Enables the append command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:allow-append" + ] + }, + { + "description": "menu:allow-create-default -> Enables the create_default command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:allow-create-default" + ] + }, + { + "description": "menu:allow-get -> Enables the get command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:allow-get" + ] + }, + { + "description": "menu:allow-insert -> Enables the insert command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:allow-insert" + ] + }, + { + "description": "menu:allow-is-checked -> Enables the is_checked command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:allow-is-checked" + ] + }, + { + "description": "menu:allow-is-enabled -> Enables the is_enabled command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:allow-is-enabled" + ] + }, + { + "description": "menu:allow-items -> Enables the items command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:allow-items" + ] + }, + { + "description": "menu:allow-new -> Enables the new command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:allow-new" + ] + }, + { + "description": "menu:allow-popup -> Enables the popup command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:allow-popup" + ] + }, + { + "description": "menu:allow-prepend -> Enables the prepend command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:allow-prepend" + ] + }, + { + "description": "menu:allow-remove -> Enables the remove command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:allow-remove" + ] + }, + { + "description": "menu:allow-remove-at -> Enables the remove_at command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:allow-remove-at" + ] + }, + { + "description": "menu:allow-set-accelerator -> Enables the set_accelerator command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:allow-set-accelerator" + ] + }, + { + "description": "menu:allow-set-as-app-menu -> Enables the set_as_app_menu command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:allow-set-as-app-menu" + ] + }, + { + "description": "menu:allow-set-as-help-menu-for-nsapp -> Enables the set_as_help_menu_for_nsapp command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:allow-set-as-help-menu-for-nsapp" + ] + }, + { + "description": "menu:allow-set-as-window-menu -> Enables the set_as_window_menu command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:allow-set-as-window-menu" + ] + }, + { + "description": "menu:allow-set-as-windows-menu-for-nsapp -> Enables the set_as_windows_menu_for_nsapp command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:allow-set-as-windows-menu-for-nsapp" + ] + }, + { + "description": "menu:allow-set-checked -> Enables the set_checked command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:allow-set-checked" + ] + }, + { + "description": "menu:allow-set-enabled -> Enables the set_enabled command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:allow-set-enabled" + ] + }, + { + "description": "menu:allow-set-icon -> Enables the set_icon command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:allow-set-icon" + ] + }, + { + "description": "menu:allow-set-text -> Enables the set_text command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:allow-set-text" + ] + }, + { + "description": "menu:allow-text -> Enables the text command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:allow-text" + ] + }, + { + "description": "menu:deny-append -> Denies the append command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:deny-append" + ] + }, + { + "description": "menu:deny-create-default -> Denies the create_default command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:deny-create-default" + ] + }, + { + "description": "menu:deny-get -> Denies the get command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:deny-get" + ] + }, + { + "description": "menu:deny-insert -> Denies the insert command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:deny-insert" + ] + }, + { + "description": "menu:deny-is-checked -> Denies the is_checked command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:deny-is-checked" + ] + }, + { + "description": "menu:deny-is-enabled -> Denies the is_enabled command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:deny-is-enabled" + ] + }, + { + "description": "menu:deny-items -> Denies the items command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:deny-items" + ] + }, + { + "description": "menu:deny-new -> Denies the new command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:deny-new" + ] + }, + { + "description": "menu:deny-popup -> Denies the popup command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:deny-popup" + ] + }, + { + "description": "menu:deny-prepend -> Denies the prepend command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:deny-prepend" + ] + }, + { + "description": "menu:deny-remove -> Denies the remove command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:deny-remove" + ] + }, + { + "description": "menu:deny-remove-at -> Denies the remove_at command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:deny-remove-at" + ] + }, + { + "description": "menu:deny-set-accelerator -> Denies the set_accelerator command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:deny-set-accelerator" + ] + }, + { + "description": "menu:deny-set-as-app-menu -> Denies the set_as_app_menu command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:deny-set-as-app-menu" + ] + }, + { + "description": "menu:deny-set-as-help-menu-for-nsapp -> Denies the set_as_help_menu_for_nsapp command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:deny-set-as-help-menu-for-nsapp" + ] + }, + { + "description": "menu:deny-set-as-window-menu -> Denies the set_as_window_menu command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:deny-set-as-window-menu" + ] + }, + { + "description": "menu:deny-set-as-windows-menu-for-nsapp -> Denies the set_as_windows_menu_for_nsapp command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:deny-set-as-windows-menu-for-nsapp" + ] + }, + { + "description": "menu:deny-set-checked -> Denies the set_checked command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:deny-set-checked" + ] + }, + { + "description": "menu:deny-set-enabled -> Denies the set_enabled command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:deny-set-enabled" + ] + }, + { + "description": "menu:deny-set-icon -> Denies the set_icon command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:deny-set-icon" + ] + }, + { + "description": "menu:deny-set-text -> Denies the set_text command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:deny-set-text" + ] + }, + { + "description": "menu:deny-text -> Denies the text command without any pre-configured scope.", + "type": "string", + "enum": [ + "menu:deny-text" + ] + }, + { + "description": "nfc:allow-is-available -> Enables the is_available command without any pre-configured scope.", + "type": "string", + "enum": [ + "nfc:allow-is-available" + ] + }, + { + "description": "nfc:allow-scan -> Enables the scan command without any pre-configured scope.", + "type": "string", + "enum": [ + "nfc:allow-scan" + ] + }, + { + "description": "nfc:allow-write -> Enables the write command without any pre-configured scope.", + "type": "string", + "enum": [ + "nfc:allow-write" + ] + }, + { + "description": "nfc:deny-is-available -> Denies the is_available command without any pre-configured scope.", + "type": "string", + "enum": [ + "nfc:deny-is-available" + ] + }, + { + "description": "nfc:deny-scan -> Denies the scan command without any pre-configured scope.", + "type": "string", + "enum": [ + "nfc:deny-scan" + ] + }, + { + "description": "nfc:deny-write -> Denies the write command without any pre-configured scope.", + "type": "string", + "enum": [ + "nfc:deny-write" + ] + }, + { + "description": "notification:default -> Allows requesting permission, checking permission state and sending notifications", + "type": "string", + "enum": [ + "notification:default" + ] + }, + { + "description": "notification:allow-is-permission-granted -> Enables the is_permission_granted command without any pre-configured scope.", + "type": "string", + "enum": [ + "notification:allow-is-permission-granted" + ] + }, + { + "description": "notification:allow-notify -> Enables the notify command without any pre-configured scope.", + "type": "string", + "enum": [ + "notification:allow-notify" + ] + }, + { + "description": "notification:allow-request-permission -> Enables the request_permission command without any pre-configured scope.", + "type": "string", + "enum": [ + "notification:allow-request-permission" + ] + }, + { + "description": "notification:deny-is-permission-granted -> Denies the is_permission_granted command without any pre-configured scope.", + "type": "string", + "enum": [ + "notification:deny-is-permission-granted" + ] + }, + { + "description": "notification:deny-notify -> Denies the notify command without any pre-configured scope.", + "type": "string", + "enum": [ + "notification:deny-notify" + ] + }, + { + "description": "notification:deny-request-permission -> Denies the request_permission command without any pre-configured scope.", + "type": "string", + "enum": [ + "notification:deny-request-permission" + ] + }, + { + "description": "os:allow-arch -> Enables the arch command without any pre-configured scope.", + "type": "string", + "enum": [ + "os:allow-arch" + ] + }, + { + "description": "os:allow-exe-extension -> Enables the exe_extension command without any pre-configured scope.", + "type": "string", + "enum": [ + "os:allow-exe-extension" + ] + }, + { + "description": "os:allow-family -> Enables the family command without any pre-configured scope.", + "type": "string", + "enum": [ + "os:allow-family" + ] + }, + { + "description": "os:allow-hostname -> Enables the hostname command without any pre-configured scope.", + "type": "string", + "enum": [ + "os:allow-hostname" + ] + }, + { + "description": "os:allow-locale -> Enables the locale command without any pre-configured scope.", + "type": "string", + "enum": [ + "os:allow-locale" + ] + }, + { + "description": "os:allow-os-type -> Enables the os_type command without any pre-configured scope.", + "type": "string", + "enum": [ + "os:allow-os-type" + ] + }, + { + "description": "os:allow-platform -> Enables the platform command without any pre-configured scope.", + "type": "string", + "enum": [ + "os:allow-platform" + ] + }, + { + "description": "os:allow-version -> Enables the version command without any pre-configured scope.", + "type": "string", + "enum": [ + "os:allow-version" + ] + }, + { + "description": "os:deny-arch -> Denies the arch command without any pre-configured scope.", + "type": "string", + "enum": [ + "os:deny-arch" + ] + }, + { + "description": "os:deny-exe-extension -> Denies the exe_extension command without any pre-configured scope.", + "type": "string", + "enum": [ + "os:deny-exe-extension" + ] + }, + { + "description": "os:deny-family -> Denies the family command without any pre-configured scope.", + "type": "string", + "enum": [ + "os:deny-family" + ] + }, + { + "description": "os:deny-hostname -> Denies the hostname command without any pre-configured scope.", + "type": "string", + "enum": [ + "os:deny-hostname" + ] + }, + { + "description": "os:deny-locale -> Denies the locale command without any pre-configured scope.", + "type": "string", + "enum": [ + "os:deny-locale" + ] + }, + { + "description": "os:deny-os-type -> Denies the os_type command without any pre-configured scope.", + "type": "string", + "enum": [ + "os:deny-os-type" + ] + }, + { + "description": "os:deny-platform -> Denies the platform command without any pre-configured scope.", + "type": "string", + "enum": [ + "os:deny-platform" + ] + }, + { + "description": "os:deny-version -> Denies the version command without any pre-configured scope.", + "type": "string", + "enum": [ + "os:deny-version" + ] + }, + { + "description": "path:default -> Default permissions for the plugin.", + "type": "string", + "enum": [ + "path:default" + ] + }, + { + "description": "path:allow-basename -> Enables the basename command without any pre-configured scope.", + "type": "string", + "enum": [ + "path:allow-basename" + ] + }, + { + "description": "path:allow-dirname -> Enables the dirname command without any pre-configured scope.", + "type": "string", + "enum": [ + "path:allow-dirname" + ] + }, + { + "description": "path:allow-extname -> Enables the extname command without any pre-configured scope.", + "type": "string", + "enum": [ + "path:allow-extname" + ] + }, + { + "description": "path:allow-is-absolute -> Enables the is_absolute command without any pre-configured scope.", + "type": "string", + "enum": [ + "path:allow-is-absolute" + ] + }, + { + "description": "path:allow-join -> Enables the join command without any pre-configured scope.", + "type": "string", + "enum": [ + "path:allow-join" + ] + }, + { + "description": "path:allow-normalize -> Enables the normalize command without any pre-configured scope.", + "type": "string", + "enum": [ + "path:allow-normalize" + ] + }, + { + "description": "path:allow-resolve -> Enables the resolve command without any pre-configured scope.", + "type": "string", + "enum": [ + "path:allow-resolve" + ] + }, + { + "description": "path:allow-resolve-directory -> Enables the resolve_directory command without any pre-configured scope.", + "type": "string", + "enum": [ + "path:allow-resolve-directory" + ] + }, + { + "description": "path:deny-basename -> Denies the basename command without any pre-configured scope.", + "type": "string", + "enum": [ + "path:deny-basename" + ] + }, + { + "description": "path:deny-dirname -> Denies the dirname command without any pre-configured scope.", + "type": "string", + "enum": [ + "path:deny-dirname" + ] + }, + { + "description": "path:deny-extname -> Denies the extname command without any pre-configured scope.", + "type": "string", + "enum": [ + "path:deny-extname" + ] + }, + { + "description": "path:deny-is-absolute -> Denies the is_absolute command without any pre-configured scope.", + "type": "string", + "enum": [ + "path:deny-is-absolute" + ] + }, + { + "description": "path:deny-join -> Denies the join command without any pre-configured scope.", + "type": "string", + "enum": [ + "path:deny-join" + ] + }, + { + "description": "path:deny-normalize -> Denies the normalize command without any pre-configured scope.", + "type": "string", + "enum": [ + "path:deny-normalize" + ] + }, + { + "description": "path:deny-resolve -> Denies the resolve command without any pre-configured scope.", + "type": "string", + "enum": [ + "path:deny-resolve" + ] + }, + { + "description": "path:deny-resolve-directory -> Denies the resolve_directory command without any pre-configured scope.", + "type": "string", + "enum": [ + "path:deny-resolve-directory" + ] + }, + { + "description": "process:allow-exit -> Enables the exit command without any pre-configured scope.", + "type": "string", + "enum": [ + "process:allow-exit" + ] + }, + { + "description": "process:allow-restart -> Enables the restart command without any pre-configured scope.", + "type": "string", + "enum": [ + "process:allow-restart" + ] + }, + { + "description": "process:deny-exit -> Denies the exit command without any pre-configured scope.", + "type": "string", + "enum": [ + "process:deny-exit" + ] + }, + { + "description": "process:deny-restart -> Denies the restart command without any pre-configured scope.", + "type": "string", + "enum": [ + "process:deny-restart" + ] + }, + { + "description": "resources:default -> Default permissions for the plugin.", + "type": "string", + "enum": [ + "resources:default" + ] + }, + { + "description": "resources:allow-close -> Enables the close command without any pre-configured scope.", + "type": "string", + "enum": [ + "resources:allow-close" + ] + }, + { + "description": "resources:deny-close -> Denies the close command without any pre-configured scope.", + "type": "string", + "enum": [ + "resources:deny-close" + ] + }, + { + "description": "shell:allow-execute -> Enables the execute command without any pre-configured scope.", + "type": "string", + "enum": [ + "shell:allow-execute" + ] + }, + { + "description": "shell:allow-kill -> Enables the kill command without any pre-configured scope.", + "type": "string", + "enum": [ + "shell:allow-kill" + ] + }, + { + "description": "shell:allow-open -> Enables the open command without any pre-configured scope.", + "type": "string", + "enum": [ + "shell:allow-open" + ] + }, + { + "description": "shell:allow-stdin-write -> Enables the stdin_write command without any pre-configured scope.", + "type": "string", + "enum": [ + "shell:allow-stdin-write" + ] + }, + { + "description": "shell:deny-execute -> Denies the execute command without any pre-configured scope.", + "type": "string", + "enum": [ + "shell:deny-execute" + ] + }, + { + "description": "shell:deny-kill -> Denies the kill command without any pre-configured scope.", + "type": "string", + "enum": [ + "shell:deny-kill" + ] + }, + { + "description": "shell:deny-open -> Denies the open command without any pre-configured scope.", + "type": "string", + "enum": [ + "shell:deny-open" + ] + }, + { + "description": "shell:deny-stdin-write -> Denies the stdin_write command without any pre-configured scope.", + "type": "string", + "enum": [ + "shell:deny-stdin-write" + ] + }, + { + "description": "tray:default -> Default permissions for the plugin.", + "type": "string", + "enum": [ + "tray:default" + ] + }, + { + "description": "tray:allow-new -> Enables the new command without any pre-configured scope.", + "type": "string", + "enum": [ + "tray:allow-new" + ] + }, + { + "description": "tray:allow-set-icon -> Enables the set_icon command without any pre-configured scope.", + "type": "string", + "enum": [ + "tray:allow-set-icon" + ] + }, + { + "description": "tray:allow-set-icon-as-template -> Enables the set_icon_as_template command without any pre-configured scope.", + "type": "string", + "enum": [ + "tray:allow-set-icon-as-template" + ] + }, + { + "description": "tray:allow-set-menu -> Enables the set_menu command without any pre-configured scope.", + "type": "string", + "enum": [ + "tray:allow-set-menu" + ] + }, + { + "description": "tray:allow-set-show-menu-on-left-click -> Enables the set_show_menu_on_left_click command without any pre-configured scope.", + "type": "string", + "enum": [ + "tray:allow-set-show-menu-on-left-click" + ] + }, + { + "description": "tray:allow-set-temp-dir-path -> Enables the set_temp_dir_path command without any pre-configured scope.", + "type": "string", + "enum": [ + "tray:allow-set-temp-dir-path" + ] + }, + { + "description": "tray:allow-set-title -> Enables the set_title command without any pre-configured scope.", + "type": "string", + "enum": [ + "tray:allow-set-title" + ] + }, + { + "description": "tray:allow-set-tooltip -> Enables the set_tooltip command without any pre-configured scope.", + "type": "string", + "enum": [ + "tray:allow-set-tooltip" + ] + }, + { + "description": "tray:allow-set-visible -> Enables the set_visible command without any pre-configured scope.", + "type": "string", + "enum": [ + "tray:allow-set-visible" + ] + }, + { + "description": "tray:deny-new -> Denies the new command without any pre-configured scope.", + "type": "string", + "enum": [ + "tray:deny-new" + ] + }, + { + "description": "tray:deny-set-icon -> Denies the set_icon command without any pre-configured scope.", + "type": "string", + "enum": [ + "tray:deny-set-icon" + ] + }, + { + "description": "tray:deny-set-icon-as-template -> Denies the set_icon_as_template command without any pre-configured scope.", + "type": "string", + "enum": [ + "tray:deny-set-icon-as-template" + ] + }, + { + "description": "tray:deny-set-menu -> Denies the set_menu command without any pre-configured scope.", + "type": "string", + "enum": [ + "tray:deny-set-menu" + ] + }, + { + "description": "tray:deny-set-show-menu-on-left-click -> Denies the set_show_menu_on_left_click command without any pre-configured scope.", + "type": "string", + "enum": [ + "tray:deny-set-show-menu-on-left-click" + ] + }, + { + "description": "tray:deny-set-temp-dir-path -> Denies the set_temp_dir_path command without any pre-configured scope.", + "type": "string", + "enum": [ + "tray:deny-set-temp-dir-path" + ] + }, + { + "description": "tray:deny-set-title -> Denies the set_title command without any pre-configured scope.", + "type": "string", + "enum": [ + "tray:deny-set-title" + ] + }, + { + "description": "tray:deny-set-tooltip -> Denies the set_tooltip command without any pre-configured scope.", + "type": "string", + "enum": [ + "tray:deny-set-tooltip" + ] + }, + { + "description": "tray:deny-set-visible -> Denies the set_visible command without any pre-configured scope.", + "type": "string", + "enum": [ + "tray:deny-set-visible" + ] + }, + { + "description": "webview:default -> Default permissions for the plugin.", + "type": "string", + "enum": [ + "webview:default" + ] + }, + { + "description": "webview:allow-create-webview -> Enables the create_webview command without any pre-configured scope.", + "type": "string", + "enum": [ + "webview:allow-create-webview" + ] + }, + { + "description": "webview:allow-create-webview-window -> Enables the create_webview_window command without any pre-configured scope.", + "type": "string", + "enum": [ + "webview:allow-create-webview-window" + ] + }, + { + "description": "webview:allow-internal-toggle-devtools -> Enables the internal_toggle_devtools command without any pre-configured scope.", + "type": "string", + "enum": [ + "webview:allow-internal-toggle-devtools" + ] + }, + { + "description": "webview:allow-print -> Enables the print command without any pre-configured scope.", + "type": "string", + "enum": [ + "webview:allow-print" + ] + }, + { + "description": "webview:allow-set-webview-focus -> Enables the set_webview_focus command without any pre-configured scope.", + "type": "string", + "enum": [ + "webview:allow-set-webview-focus" + ] + }, + { + "description": "webview:allow-set-webview-position -> Enables the set_webview_position command without any pre-configured scope.", + "type": "string", + "enum": [ + "webview:allow-set-webview-position" + ] + }, + { + "description": "webview:allow-set-webview-size -> Enables the set_webview_size command without any pre-configured scope.", + "type": "string", + "enum": [ + "webview:allow-set-webview-size" + ] + }, + { + "description": "webview:allow-webview-close -> Enables the webview_close command without any pre-configured scope.", + "type": "string", + "enum": [ + "webview:allow-webview-close" + ] + }, + { + "description": "webview:allow-webview-position -> Enables the webview_position command without any pre-configured scope.", + "type": "string", + "enum": [ + "webview:allow-webview-position" + ] + }, + { + "description": "webview:allow-webview-size -> Enables the webview_size command without any pre-configured scope.", + "type": "string", + "enum": [ + "webview:allow-webview-size" + ] + }, + { + "description": "webview:deny-create-webview -> Denies the create_webview command without any pre-configured scope.", + "type": "string", + "enum": [ + "webview:deny-create-webview" + ] + }, + { + "description": "webview:deny-create-webview-window -> Denies the create_webview_window command without any pre-configured scope.", + "type": "string", + "enum": [ + "webview:deny-create-webview-window" + ] + }, + { + "description": "webview:deny-internal-toggle-devtools -> Denies the internal_toggle_devtools command without any pre-configured scope.", + "type": "string", + "enum": [ + "webview:deny-internal-toggle-devtools" + ] + }, + { + "description": "webview:deny-print -> Denies the print command without any pre-configured scope.", + "type": "string", + "enum": [ + "webview:deny-print" + ] + }, + { + "description": "webview:deny-set-webview-focus -> Denies the set_webview_focus command without any pre-configured scope.", + "type": "string", + "enum": [ + "webview:deny-set-webview-focus" + ] + }, + { + "description": "webview:deny-set-webview-position -> Denies the set_webview_position command without any pre-configured scope.", + "type": "string", + "enum": [ + "webview:deny-set-webview-position" + ] + }, + { + "description": "webview:deny-set-webview-size -> Denies the set_webview_size command without any pre-configured scope.", + "type": "string", + "enum": [ + "webview:deny-set-webview-size" + ] + }, + { + "description": "webview:deny-webview-close -> Denies the webview_close command without any pre-configured scope.", + "type": "string", + "enum": [ + "webview:deny-webview-close" + ] + }, + { + "description": "webview:deny-webview-position -> Denies the webview_position command without any pre-configured scope.", + "type": "string", + "enum": [ + "webview:deny-webview-position" + ] + }, + { + "description": "webview:deny-webview-size -> Denies the webview_size command without any pre-configured scope.", + "type": "string", + "enum": [ + "webview:deny-webview-size" + ] + }, + { + "description": "window:default -> Default permissions for the plugin.", + "type": "string", + "enum": [ + "window:default" + ] + }, + { + "description": "window:allow-available-monitors -> Enables the available_monitors command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-available-monitors" + ] + }, + { + "description": "window:allow-center -> Enables the center command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-center" + ] + }, + { + "description": "window:allow-close -> Enables the close command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-close" + ] + }, + { + "description": "window:allow-create -> Enables the create command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-create" + ] + }, + { + "description": "window:allow-current-monitor -> Enables the current_monitor command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-current-monitor" + ] + }, + { + "description": "window:allow-destroy -> Enables the destroy command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-destroy" + ] + }, + { + "description": "window:allow-hide -> Enables the hide command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-hide" + ] + }, + { + "description": "window:allow-inner-position -> Enables the inner_position command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-inner-position" + ] + }, + { + "description": "window:allow-inner-size -> Enables the inner_size command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-inner-size" + ] + }, + { + "description": "window:allow-internal-on-mousedown -> Enables the internal_on_mousedown command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-internal-on-mousedown" + ] + }, + { + "description": "window:allow-internal-on-mousemove -> Enables the internal_on_mousemove command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-internal-on-mousemove" + ] + }, + { + "description": "window:allow-internal-toggle-maximize -> Enables the internal_toggle_maximize command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-internal-toggle-maximize" + ] + }, + { + "description": "window:allow-is-closable -> Enables the is_closable command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-is-closable" + ] + }, + { + "description": "window:allow-is-decorated -> Enables the is_decorated command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-is-decorated" + ] + }, + { + "description": "window:allow-is-focused -> Enables the is_focused command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-is-focused" + ] + }, + { + "description": "window:allow-is-fullscreen -> Enables the is_fullscreen command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-is-fullscreen" + ] + }, + { + "description": "window:allow-is-maximizable -> Enables the is_maximizable command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-is-maximizable" + ] + }, + { + "description": "window:allow-is-maximized -> Enables the is_maximized command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-is-maximized" + ] + }, + { + "description": "window:allow-is-minimizable -> Enables the is_minimizable command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-is-minimizable" + ] + }, + { + "description": "window:allow-is-minimized -> Enables the is_minimized command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-is-minimized" + ] + }, + { + "description": "window:allow-is-resizable -> Enables the is_resizable command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-is-resizable" + ] + }, + { + "description": "window:allow-is-visible -> Enables the is_visible command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-is-visible" + ] + }, + { + "description": "window:allow-maximize -> Enables the maximize command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-maximize" + ] + }, + { + "description": "window:allow-minimize -> Enables the minimize command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-minimize" + ] + }, + { + "description": "window:allow-outer-position -> Enables the outer_position command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-outer-position" + ] + }, + { + "description": "window:allow-outer-size -> Enables the outer_size command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-outer-size" + ] + }, + { + "description": "window:allow-primary-monitor -> Enables the primary_monitor command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-primary-monitor" + ] + }, + { + "description": "window:allow-request-user-attention -> Enables the request_user_attention command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-request-user-attention" + ] + }, + { + "description": "window:allow-scale-factor -> Enables the scale_factor command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-scale-factor" + ] + }, + { + "description": "window:allow-set-always-on-bottom -> Enables the set_always_on_bottom command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-set-always-on-bottom" + ] + }, + { + "description": "window:allow-set-always-on-top -> Enables the set_always_on_top command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-set-always-on-top" + ] + }, + { + "description": "window:allow-set-closable -> Enables the set_closable command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-set-closable" + ] + }, + { + "description": "window:allow-set-content-protected -> Enables the set_content_protected command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-set-content-protected" + ] + }, + { + "description": "window:allow-set-cursor-grab -> Enables the set_cursor_grab command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-set-cursor-grab" + ] + }, + { + "description": "window:allow-set-cursor-icon -> Enables the set_cursor_icon command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-set-cursor-icon" + ] + }, + { + "description": "window:allow-set-cursor-position -> Enables the set_cursor_position command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-set-cursor-position" + ] + }, + { + "description": "window:allow-set-cursor-visible -> Enables the set_cursor_visible command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-set-cursor-visible" + ] + }, + { + "description": "window:allow-set-decorations -> Enables the set_decorations command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-set-decorations" + ] + }, + { + "description": "window:allow-set-effects -> Enables the set_effects command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-set-effects" + ] + }, + { + "description": "window:allow-set-focus -> Enables the set_focus command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-set-focus" + ] + }, + { + "description": "window:allow-set-fullscreen -> Enables the set_fullscreen command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-set-fullscreen" + ] + }, + { + "description": "window:allow-set-icon -> Enables the set_icon command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-set-icon" + ] + }, + { + "description": "window:allow-set-ignore-cursor-events -> Enables the set_ignore_cursor_events command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-set-ignore-cursor-events" + ] + }, + { + "description": "window:allow-set-max-size -> Enables the set_max_size command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-set-max-size" + ] + }, + { + "description": "window:allow-set-maximizable -> Enables the set_maximizable command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-set-maximizable" + ] + }, + { + "description": "window:allow-set-min-size -> Enables the set_min_size command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-set-min-size" + ] + }, + { + "description": "window:allow-set-minimizable -> Enables the set_minimizable command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-set-minimizable" + ] + }, + { + "description": "window:allow-set-position -> Enables the set_position command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-set-position" + ] + }, + { + "description": "window:allow-set-progress-bar -> Enables the set_progress_bar command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-set-progress-bar" + ] + }, + { + "description": "window:allow-set-resizable -> Enables the set_resizable command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-set-resizable" + ] + }, + { + "description": "window:allow-set-shadow -> Enables the set_shadow command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-set-shadow" + ] + }, + { + "description": "window:allow-set-size -> Enables the set_size command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-set-size" + ] + }, + { + "description": "window:allow-set-skip-taskbar -> Enables the set_skip_taskbar command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-set-skip-taskbar" + ] + }, + { + "description": "window:allow-set-title -> Enables the set_title command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-set-title" + ] + }, + { + "description": "window:allow-set-visible-on-all-workspaces -> Enables the set_visible_on_all_workspaces command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-set-visible-on-all-workspaces" + ] + }, + { + "description": "window:allow-show -> Enables the show command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-show" + ] + }, + { + "description": "window:allow-start-dragging -> Enables the start_dragging command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-start-dragging" + ] + }, + { + "description": "window:allow-theme -> Enables the theme command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-theme" + ] + }, + { + "description": "window:allow-title -> Enables the title command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-title" + ] + }, + { + "description": "window:allow-toggle-maximize -> Enables the toggle_maximize command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-toggle-maximize" + ] + }, + { + "description": "window:allow-unmaximize -> Enables the unmaximize command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-unmaximize" + ] + }, + { + "description": "window:allow-unminimize -> Enables the unminimize command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-unminimize" + ] + }, + { + "description": "window:deny-available-monitors -> Denies the available_monitors command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-available-monitors" + ] + }, + { + "description": "window:deny-center -> Denies the center command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-center" + ] + }, + { + "description": "window:deny-close -> Denies the close command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-close" + ] + }, + { + "description": "window:deny-create -> Denies the create command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-create" + ] + }, + { + "description": "window:deny-current-monitor -> Denies the current_monitor command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-current-monitor" + ] + }, + { + "description": "window:deny-destroy -> Denies the destroy command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-destroy" + ] + }, + { + "description": "window:deny-hide -> Denies the hide command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-hide" + ] + }, + { + "description": "window:deny-inner-position -> Denies the inner_position command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-inner-position" + ] + }, + { + "description": "window:deny-inner-size -> Denies the inner_size command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-inner-size" + ] + }, + { + "description": "window:deny-internal-on-mousedown -> Denies the internal_on_mousedown command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-internal-on-mousedown" + ] + }, + { + "description": "window:deny-internal-on-mousemove -> Denies the internal_on_mousemove command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-internal-on-mousemove" + ] + }, + { + "description": "window:deny-internal-toggle-maximize -> Denies the internal_toggle_maximize command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-internal-toggle-maximize" + ] + }, + { + "description": "window:deny-is-closable -> Denies the is_closable command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-is-closable" + ] + }, + { + "description": "window:deny-is-decorated -> Denies the is_decorated command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-is-decorated" + ] + }, + { + "description": "window:deny-is-focused -> Denies the is_focused command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-is-focused" + ] + }, + { + "description": "window:deny-is-fullscreen -> Denies the is_fullscreen command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-is-fullscreen" + ] + }, + { + "description": "window:deny-is-maximizable -> Denies the is_maximizable command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-is-maximizable" + ] + }, + { + "description": "window:deny-is-maximized -> Denies the is_maximized command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-is-maximized" + ] + }, + { + "description": "window:deny-is-minimizable -> Denies the is_minimizable command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-is-minimizable" + ] + }, + { + "description": "window:deny-is-minimized -> Denies the is_minimized command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-is-minimized" + ] + }, + { + "description": "window:deny-is-resizable -> Denies the is_resizable command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-is-resizable" + ] + }, + { + "description": "window:deny-is-visible -> Denies the is_visible command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-is-visible" + ] + }, + { + "description": "window:deny-maximize -> Denies the maximize command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-maximize" + ] + }, + { + "description": "window:deny-minimize -> Denies the minimize command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-minimize" + ] + }, + { + "description": "window:deny-outer-position -> Denies the outer_position command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-outer-position" + ] + }, + { + "description": "window:deny-outer-size -> Denies the outer_size command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-outer-size" + ] + }, + { + "description": "window:deny-primary-monitor -> Denies the primary_monitor command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-primary-monitor" + ] + }, + { + "description": "window:deny-request-user-attention -> Denies the request_user_attention command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-request-user-attention" + ] + }, + { + "description": "window:deny-scale-factor -> Denies the scale_factor command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-scale-factor" + ] + }, + { + "description": "window:deny-set-always-on-bottom -> Denies the set_always_on_bottom command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-set-always-on-bottom" + ] + }, + { + "description": "window:deny-set-always-on-top -> Denies the set_always_on_top command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-set-always-on-top" + ] + }, + { + "description": "window:deny-set-closable -> Denies the set_closable command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-set-closable" + ] + }, + { + "description": "window:deny-set-content-protected -> Denies the set_content_protected command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-set-content-protected" + ] + }, + { + "description": "window:deny-set-cursor-grab -> Denies the set_cursor_grab command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-set-cursor-grab" + ] + }, + { + "description": "window:deny-set-cursor-icon -> Denies the set_cursor_icon command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-set-cursor-icon" + ] + }, + { + "description": "window:deny-set-cursor-position -> Denies the set_cursor_position command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-set-cursor-position" + ] + }, + { + "description": "window:deny-set-cursor-visible -> Denies the set_cursor_visible command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-set-cursor-visible" + ] + }, + { + "description": "window:deny-set-decorations -> Denies the set_decorations command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-set-decorations" + ] + }, + { + "description": "window:deny-set-effects -> Denies the set_effects command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-set-effects" + ] + }, + { + "description": "window:deny-set-focus -> Denies the set_focus command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-set-focus" + ] + }, + { + "description": "window:deny-set-fullscreen -> Denies the set_fullscreen command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-set-fullscreen" + ] + }, + { + "description": "window:deny-set-icon -> Denies the set_icon command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-set-icon" + ] + }, + { + "description": "window:deny-set-ignore-cursor-events -> Denies the set_ignore_cursor_events command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-set-ignore-cursor-events" + ] + }, + { + "description": "window:deny-set-max-size -> Denies the set_max_size command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-set-max-size" + ] + }, + { + "description": "window:deny-set-maximizable -> Denies the set_maximizable command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-set-maximizable" + ] + }, + { + "description": "window:deny-set-min-size -> Denies the set_min_size command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-set-min-size" + ] + }, + { + "description": "window:deny-set-minimizable -> Denies the set_minimizable command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-set-minimizable" + ] + }, + { + "description": "window:deny-set-position -> Denies the set_position command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-set-position" + ] + }, + { + "description": "window:deny-set-progress-bar -> Denies the set_progress_bar command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-set-progress-bar" + ] + }, + { + "description": "window:deny-set-resizable -> Denies the set_resizable command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-set-resizable" + ] + }, + { + "description": "window:deny-set-shadow -> Denies the set_shadow command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-set-shadow" + ] + }, + { + "description": "window:deny-set-size -> Denies the set_size command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-set-size" + ] + }, + { + "description": "window:deny-set-skip-taskbar -> Denies the set_skip_taskbar command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-set-skip-taskbar" + ] + }, + { + "description": "window:deny-set-title -> Denies the set_title command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-set-title" + ] + }, + { + "description": "window:deny-set-visible-on-all-workspaces -> Denies the set_visible_on_all_workspaces command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-set-visible-on-all-workspaces" + ] + }, + { + "description": "window:deny-show -> Denies the show command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-show" + ] + }, + { + "description": "window:deny-start-dragging -> Denies the start_dragging command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-start-dragging" + ] + }, + { + "description": "window:deny-theme -> Denies the theme command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-theme" + ] + }, + { + "description": "window:deny-title -> Denies the title command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-title" + ] + }, + { + "description": "window:deny-toggle-maximize -> Denies the toggle_maximize command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-toggle-maximize" + ] + }, + { + "description": "window:deny-unmaximize -> Denies the unmaximize command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-unmaximize" + ] + }, + { + "description": "window:deny-unminimize -> Denies the unminimize command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-unminimize" + ] + } + ] + }, + "Value": { + "description": "All supported ACL values.", + "anyOf": [ + { + "description": "Represents a null JSON value.", + "type": "null" + }, + { + "description": "Represents a [`bool`].", + "type": "boolean" + }, + { + "description": "Represents a valid ACL [`Number`].", + "allOf": [ + { + "$ref": "#/definitions/Number" + } + ] + }, + { + "description": "Represents a [`String`].", + "type": "string" + }, + { + "description": "Represents a list of other [`Value`]s.", + "type": "array", + "items": { + "$ref": "#/definitions/Value" + } + }, + { + "description": "Represents a map of [`String`] keys to [`Value`]s.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/Value" + } + } + ] + }, + "Number": { + "description": "A valid ACL number.", + "anyOf": [ + { + "description": "Represents an [`i64`].", + "type": "integer", + "format": "int64" + }, + { + "description": "Represents a [`f64`].", + "type": "number", + "format": "double" + } + ] + }, + "Target": { + "description": "Platform target.", + "oneOf": [ + { + "description": "MacOS.", + "type": "string", + "enum": [ + "macOS" + ] + }, + { + "description": "Windows.", + "type": "string", + "enum": [ + "windows" + ] + }, + { + "description": "Linux.", + "type": "string", + "enum": [ + "linux" + ] + }, + { + "description": "Android.", + "type": "string", + "enum": [ + "android" + ] + }, + { + "description": "iOS.", + "type": "string", + "enum": [ + "iOS" + ] + } + ] + } + } +} \ No newline at end of file diff --git a/examples/api/src-tauri/src/lib.rs b/examples/api/src-tauri/src/lib.rs index 099552f90..b40290bd2 100644 --- a/examples/api/src-tauri/src/lib.rs +++ b/examples/api/src-tauri/src/lib.rs @@ -7,7 +7,7 @@ mod cmd; mod tray; use serde::Serialize; -use tauri::{window::WindowBuilder, App, AppHandle, Manager, RunEvent, WindowUrl}; +use tauri::{webview::WebviewWindowBuilder, App, AppHandle, Manager, RunEvent, WebviewUrl}; #[derive(Clone, Serialize)] struct Reply { @@ -51,10 +51,11 @@ pub fn run() { app.handle().plugin(tauri_plugin_biometric::init())?; } - let mut window_builder = WindowBuilder::new(app, "main", WindowUrl::default()); + let mut webview_window_builder = + WebviewWindowBuilder::new(app, "main", WebviewUrl::default()); #[cfg(desktop)] { - window_builder = window_builder + webview_window_builder = webview_window_builder .user_agent(&format!("Tauri API - {}", std::env::consts::OS)) .title("Tauri API Validation") .inner_size(1000., 800.) @@ -64,7 +65,7 @@ pub fn run() { #[cfg(target_os = "windows")] { - window_builder = window_builder + webview_window_builder = webview_window_builder .transparent(true) .shadow(true) .decorations(false); @@ -72,15 +73,14 @@ pub fn run() { #[cfg(target_os = "macos")] { - window_builder = window_builder.transparent(true); + webview_window_builder = webview_window_builder.transparent(true); } - let window = window_builder.build().unwrap(); + let webview = webview_window_builder.build().unwrap(); #[cfg(debug_assertions)] - window.open_devtools(); + webview.open_devtools(); - #[cfg(desktop)] std::thread::spawn(|| { let server = match tiny_http::Server::http("localhost:3003") { Ok(s) => s, @@ -107,15 +107,15 @@ pub fn run() { Ok(()) }) - .on_page_load(|window, _| { - let window_ = window.clone(); - window.listen("js-event", move |event| { + .on_page_load(|webview, _| { + let webview_ = webview.clone(); + webview.listen("js-event", move |event| { println!("got js-event with message '{:?}'", event.payload()); let reply = Reply { data: "something else".to_string(), }; - window_ + webview_ .emit("rust-event", Some(reply)) .expect("failed to emit"); }); diff --git a/examples/api/src-tauri/src/tray.rs b/examples/api/src-tauri/src/tray.rs index 9028057dc..470764f87 100644 --- a/examples/api/src-tauri/src/tray.rs +++ b/examples/api/src-tauri/src/tray.rs @@ -6,19 +6,20 @@ use std::sync::atomic::{AtomicBool, Ordering}; use tauri::{ menu::{Menu, MenuItem}, tray::{ClickType, TrayIconBuilder}, - Manager, Runtime, WindowBuilder, WindowUrl, + Manager, Runtime, WebviewUrl, WebviewWindowBuilder, }; pub fn create_tray(app: &tauri::AppHandle) -> tauri::Result<()> { - let toggle_i = MenuItem::with_id(app, "toggle", "Toggle", true, None); - let new_window_i = MenuItem::with_id(app, "new-window", "New window", true, None); - let icon_i_1 = MenuItem::with_id(app, "icon-1", "Icon 1", true, None); - let icon_i_2 = MenuItem::with_id(app, "icon-2", "Icon 2", true, None); + let toggle_i = MenuItem::with_id(app, "toggle", "Toggle", true, None::<&str>)?; + let new_window_i = MenuItem::with_id(app, "new-window", "New window", true, None::<&str>)?; + let icon_i_1 = MenuItem::with_id(app, "icon-1", "Icon 1", true, None::<&str>)?; + let icon_i_2 = MenuItem::with_id(app, "icon-2", "Icon 2", true, None::<&str>)?; #[cfg(target_os = "macos")] - let set_title_i = MenuItem::with_id(app, "set-title", "Set Title", true, None); - let switch_i = MenuItem::with_id(app, "switch-menu", "Switch Menu", true, None); - let quit_i = MenuItem::with_id(app, "quit", "Quit", true, None); - let remove_tray_i = MenuItem::with_id(app, "remove-tray", "Remove Tray icon", true, None); + let set_title_i = MenuItem::with_id(app, "set-title", "Set Title", true, None::<&str>)?; + let switch_i = MenuItem::with_id(app, "switch-menu", "Switch Menu", true, None::<&str>)?; + let quit_i = MenuItem::with_id(app, "quit", "Quit", true, None::<&str>)?; + let remove_tray_i = + MenuItem::with_id(app, "remove-tray", "Remove Tray icon", true, None::<&str>)?; let menu1 = Menu::with_items( app, &[ @@ -53,7 +54,7 @@ pub fn create_tray(app: &tauri::AppHandle) -> tauri::Result<()> { app.remove_tray_by_id("tray-1"); } "toggle" => { - if let Some(window) = app.get_window("main") { + if let Some(window) = app.get_webview_window("main") { let new_title = if window.is_visible().unwrap_or_default() { let _ = window.hide(); "Show" @@ -66,7 +67,7 @@ pub fn create_tray(app: &tauri::AppHandle) -> tauri::Result<()> { } } "new-window" => { - let _ = WindowBuilder::new(app, "new", WindowUrl::App("index.html".into())) + let _ = WebviewWindowBuilder::new(app, "new", WebviewUrl::App("index.html".into())) .title("Tauri") .build(); } @@ -104,7 +105,7 @@ pub fn create_tray(app: &tauri::AppHandle) -> tauri::Result<()> { .on_tray_icon_event(|tray, event| { if event.click_type == ClickType::Left { let app = tray.app_handle(); - if let Some(window) = app.get_window("main") { + if let Some(window) = app.get_webview_window("main") { let _ = window.show(); let _ = window.set_focus(); } diff --git a/examples/api/src-tauri/tauri.conf.json b/examples/api/src-tauri/tauri.conf.json index cab202203..ec3190ef8 100644 --- a/examples/api/src-tauri/tauri.conf.json +++ b/examples/api/src-tauri/tauri.conf.json @@ -72,45 +72,14 @@ } } }, - "fs": { - "scope": { - "allow": ["$APPDATA/db/**", "$DOWNLOAD/**", "$RESOURCE/**"], - "deny": ["$APPDATA/db/*.stronghold"] - } - }, "shell": { - "open": true, - "scope": [ - { - "name": "sh", - "cmd": "sh", - "args": [ - "-c", - { - "validator": "\\S+" - } - ] - }, - { - "name": "cmd", - "cmd": "cmd", - "args": [ - "/C", - { - "validator": "\\S+" - } - ] - } - ] - }, - "http": { - "scope": ["http://localhost:3003"] + "open": true }, "updater": { + "pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDE5QzMxNjYwNTM5OEUwNTgKUldSWTRKaFRZQmJER1h4d1ZMYVA3dnluSjdpN2RmMldJR09hUFFlZDY0SlFqckkvRUJhZDJVZXAK", "endpoints": [ "https://tauri-update-server.vercel.app/update/{{target}}/{{current_version}}" - ], - "pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDE5QzMxNjYwNTM5OEUwNTgKUldSWTRKaFRZQmJER1h4d1ZMYVA3dnluSjdpN2RmMldJR09hUFFlZDY0SlFqckkvRUJhZDJVZXAK" + ] } }, "bundle": { diff --git a/plugins/authenticator/Cargo.toml b/plugins/authenticator/Cargo.toml index 2c70cbb0f..3469f864e 100644 --- a/plugins/authenticator/Cargo.toml +++ b/plugins/authenticator/Cargo.toml @@ -6,10 +6,14 @@ authors = { workspace = true } license = { workspace = true } edition = { workspace = true } rust-version = { workspace = true } +links = "tauri-plugin-authenticator" [package.metadata.docs.rs] -rustc-args = [ "--cfg", "docsrs" ] -rustdoc-args = [ "--cfg", "docsrs" ] +rustc-args = ["--cfg", "docsrs"] +rustdoc-args = ["--cfg", "docsrs"] + +[build-dependencies] +tauri-plugin = { workspace = true, features = ["build"] } [dependencies] serde = { workspace = true } diff --git a/plugins/authenticator/build.rs b/plugins/authenticator/build.rs new file mode 100644 index 000000000..993df57a9 --- /dev/null +++ b/plugins/authenticator/build.rs @@ -0,0 +1,15 @@ +// Copyright 2019-2023 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + +const COMMANDS: &[&str] = &[ + "init_auth", + "register", + "verify_registration", + "sign", + "verify_signature", +]; + +fn main() { + tauri_plugin::Builder::new(COMMANDS).build(); +} diff --git a/plugins/authenticator/package.json b/plugins/authenticator/package.json index 6f41ae75b..d6fdb4264 100644 --- a/plugins/authenticator/package.json +++ b/plugins/authenticator/package.json @@ -24,6 +24,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.13" + "@tauri-apps/api": "2.0.0-beta.0" } } diff --git a/plugins/authenticator/permissions/.dgitignore b/plugins/authenticator/permissions/.dgitignore new file mode 100644 index 000000000..c75f615b1 --- /dev/null +++ b/plugins/authenticator/permissions/.dgitignore @@ -0,0 +1 @@ +schemas/ diff --git a/plugins/authenticator/permissions/.gitignore b/plugins/authenticator/permissions/.gitignore new file mode 100644 index 000000000..c75f615b1 --- /dev/null +++ b/plugins/authenticator/permissions/.gitignore @@ -0,0 +1 @@ +schemas/ diff --git a/plugins/authenticator/permissions/autogenerated/commands/init_auth.toml b/plugins/authenticator/permissions/autogenerated/commands/init_auth.toml new file mode 100644 index 000000000..4781773e3 --- /dev/null +++ b/plugins/authenticator/permissions/autogenerated/commands/init_auth.toml @@ -0,0 +1,13 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +[[permission]] +identifier = "allow-init-auth" +description = "Enables the init_auth command without any pre-configured scope." +commands.allow = ["init_auth"] + +[[permission]] +identifier = "deny-init-auth" +description = "Denies the init_auth command without any pre-configured scope." +commands.deny = ["init_auth"] diff --git a/plugins/authenticator/permissions/autogenerated/commands/register.toml b/plugins/authenticator/permissions/autogenerated/commands/register.toml new file mode 100644 index 000000000..4eec17dc7 --- /dev/null +++ b/plugins/authenticator/permissions/autogenerated/commands/register.toml @@ -0,0 +1,13 @@ +# 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"] diff --git a/plugins/authenticator/permissions/autogenerated/commands/sign.toml b/plugins/authenticator/permissions/autogenerated/commands/sign.toml new file mode 100644 index 000000000..f8b6a778d --- /dev/null +++ b/plugins/authenticator/permissions/autogenerated/commands/sign.toml @@ -0,0 +1,13 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +[[permission]] +identifier = "allow-sign" +description = "Enables the sign command without any pre-configured scope." +commands.allow = ["sign"] + +[[permission]] +identifier = "deny-sign" +description = "Denies the sign command without any pre-configured scope." +commands.deny = ["sign"] diff --git a/plugins/authenticator/permissions/autogenerated/commands/verify_registration.toml b/plugins/authenticator/permissions/autogenerated/commands/verify_registration.toml new file mode 100644 index 000000000..f6b15d58b --- /dev/null +++ b/plugins/authenticator/permissions/autogenerated/commands/verify_registration.toml @@ -0,0 +1,13 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +[[permission]] +identifier = "allow-verify-registration" +description = "Enables the verify_registration command without any pre-configured scope." +commands.allow = ["verify_registration"] + +[[permission]] +identifier = "deny-verify-registration" +description = "Denies the verify_registration command without any pre-configured scope." +commands.deny = ["verify_registration"] diff --git a/plugins/authenticator/permissions/autogenerated/commands/verify_signature.toml b/plugins/authenticator/permissions/autogenerated/commands/verify_signature.toml new file mode 100644 index 000000000..90b24095a --- /dev/null +++ b/plugins/authenticator/permissions/autogenerated/commands/verify_signature.toml @@ -0,0 +1,13 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +[[permission]] +identifier = "allow-verify-signature" +description = "Enables the verify_signature command without any pre-configured scope." +commands.allow = ["verify_signature"] + +[[permission]] +identifier = "deny-verify-signature" +description = "Denies the verify_signature command without any pre-configured scope." +commands.deny = ["verify_signature"] diff --git a/plugins/authenticator/permissions/autogenerated/reference.md b/plugins/authenticator/permissions/autogenerated/reference.md new file mode 100644 index 000000000..8e3cbb525 --- /dev/null +++ b/plugins/authenticator/permissions/autogenerated/reference.md @@ -0,0 +1,42 @@ +# Permissions + +## allow-init-auth + +Enables the init_auth command without any pre-configured scope. + +## deny-init-auth + +Denies the init_auth command without any pre-configured scope. + +## allow-register + +Enables the register command without any pre-configured scope. + +## deny-register + +Denies the register command without any pre-configured scope. + +## allow-sign + +Enables the sign command without any pre-configured scope. + +## deny-sign + +Denies the sign command without any pre-configured scope. + +## allow-verify-registration + +Enables the verify_registration command without any pre-configured scope. + +## deny-verify-registration + +Denies the verify_registration command without any pre-configured scope. + +## allow-verify-signature + +Enables the verify_signature command without any pre-configured scope. + +## deny-verify-signature + +Denies the verify_signature command without any pre-configured scope. + diff --git a/plugins/autostart/Cargo.toml b/plugins/autostart/Cargo.toml index 639f1805b..535d6c156 100644 --- a/plugins/autostart/Cargo.toml +++ b/plugins/autostart/Cargo.toml @@ -6,11 +6,15 @@ authors = { workspace = true } license = { workspace = true } edition = { workspace = true } rust-version = { workspace = true } +links = "tauri-plugin-autostart" [package.metadata.docs.rs] rustc-args = [ "--cfg", "docsrs" ] rustdoc-args = [ "--cfg", "docsrs" ] +[build-dependencies] +tauri-plugin = { workspace = true, features = [ "build" ] } + [dependencies] serde = { workspace = true } serde_json = { workspace = true } diff --git a/plugins/autostart/build.rs b/plugins/autostart/build.rs new file mode 100644 index 000000000..2b27eff07 --- /dev/null +++ b/plugins/autostart/build.rs @@ -0,0 +1,9 @@ +// Copyright 2019-2023 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + +const COMMANDS: &[&str] = &["enable", "disable", "is_enabled"]; + +fn main() { + tauri_plugin::Builder::new(COMMANDS).build(); +} diff --git a/plugins/autostart/package.json b/plugins/autostart/package.json index 01b1d7ee2..691b8da0c 100644 --- a/plugins/autostart/package.json +++ b/plugins/autostart/package.json @@ -23,6 +23,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.13" + "@tauri-apps/api": "2.0.0-beta.0" } } diff --git a/plugins/autostart/permissions/.dgitignore b/plugins/autostart/permissions/.dgitignore new file mode 100644 index 000000000..c75f615b1 --- /dev/null +++ b/plugins/autostart/permissions/.dgitignore @@ -0,0 +1 @@ +schemas/ diff --git a/plugins/autostart/permissions/.gitignore b/plugins/autostart/permissions/.gitignore new file mode 100644 index 000000000..c75f615b1 --- /dev/null +++ b/plugins/autostart/permissions/.gitignore @@ -0,0 +1 @@ +schemas/ diff --git a/plugins/autostart/permissions/autogenerated/commands/disable.toml b/plugins/autostart/permissions/autogenerated/commands/disable.toml new file mode 100644 index 000000000..849c50a2d --- /dev/null +++ b/plugins/autostart/permissions/autogenerated/commands/disable.toml @@ -0,0 +1,13 @@ +# 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"] diff --git a/plugins/autostart/permissions/autogenerated/commands/enable.toml b/plugins/autostart/permissions/autogenerated/commands/enable.toml new file mode 100644 index 000000000..f931a9e54 --- /dev/null +++ b/plugins/autostart/permissions/autogenerated/commands/enable.toml @@ -0,0 +1,13 @@ +# 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"] diff --git a/plugins/autostart/permissions/autogenerated/commands/is_enabled.toml b/plugins/autostart/permissions/autogenerated/commands/is_enabled.toml new file mode 100644 index 000000000..88a6a2823 --- /dev/null +++ b/plugins/autostart/permissions/autogenerated/commands/is_enabled.toml @@ -0,0 +1,13 @@ +# 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"] diff --git a/plugins/autostart/permissions/autogenerated/reference.md b/plugins/autostart/permissions/autogenerated/reference.md new file mode 100644 index 000000000..e129ae027 --- /dev/null +++ b/plugins/autostart/permissions/autogenerated/reference.md @@ -0,0 +1,26 @@ +# Permissions + +## allow-disable + +Enables the disable command without any pre-configured scope. + +## deny-disable + +Denies the disable command without any pre-configured scope. + +## allow-enable + +Enables the enable command without any pre-configured scope. + +## deny-enable + +Denies the enable command without any pre-configured scope. + +## allow-is-enabled + +Enables the is_enabled command without any pre-configured scope. + +## deny-is-enabled + +Denies the is_enabled command without any pre-configured scope. + diff --git a/plugins/barcode-scanner/Cargo.toml b/plugins/barcode-scanner/Cargo.toml index e7a91db14..bdfca8af9 100644 --- a/plugins/barcode-scanner/Cargo.toml +++ b/plugins/barcode-scanner/Cargo.toml @@ -9,12 +9,12 @@ rust-version = { workspace = true } links = "tauri-plugin-barcode-scanner" [package.metadata.docs.rs] -rustc-args = [ "--cfg", "docsrs" ] -rustdoc-args = [ "--cfg", "docsrs" ] -targets = [ "x86_64-linux-android" ] +rustc-args = ["--cfg", "docsrs"] +rustdoc-args = ["--cfg", "docsrs"] +targets = ["x86_64-linux-android"] [build-dependencies] -tauri-build = { workspace = true } +tauri-plugin = { workspace = true, features = ["build"] } [dependencies] serde = { workspace = true } diff --git a/plugins/barcode-scanner/build.rs b/plugins/barcode-scanner/build.rs index da7cd3cc4..9239a4046 100644 --- a/plugins/barcode-scanner/build.rs +++ b/plugins/barcode-scanner/build.rs @@ -2,11 +2,20 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT +const COMMANDS: &[&str] = &[ + "scan", + "cancel", + "request_permissions", + "check_permissions", + "open_app_settings", + "vibrate", +]; + fn main() { - if let Err(error) = tauri_build::mobile::PluginBuilder::new() + if let Err(error) = tauri_plugin::Builder::new(COMMANDS) .android_path("android") .ios_path("ios") - .run() + .try_build() { println!("{error:#}"); // when building documentation for Android the plugin build result is irrelevant to the crate itself diff --git a/plugins/barcode-scanner/guest-js/index.ts b/plugins/barcode-scanner/guest-js/index.ts index bf2b5f410..8e964420f 100644 --- a/plugins/barcode-scanner/guest-js/index.ts +++ b/plugins/barcode-scanner/guest-js/index.ts @@ -39,14 +39,14 @@ export interface Scanned { * @param options */ export async function scan(options?: ScanOptions): Promise { - return await invoke("plugin:barcodeScanner|scan", { ...options }); + return await invoke("plugin:barcode-scanner|scan", { ...options }); } /** * Cancel the current scan process. */ export async function cancel(): Promise { - return await invoke("plugin:barcodeScanner|cancel"); + return await invoke("plugin:barcode-scanner|cancel"); } /** @@ -54,7 +54,7 @@ export async function cancel(): Promise { */ export async function checkPermissions(): Promise { return await invoke<{ camera: PermissionState }>( - "plugin:barcodeScanner|checkPermissions", + "plugin:barcode-scanner|check_permissions", ).then((r) => r.camera); } @@ -63,7 +63,7 @@ export async function checkPermissions(): Promise { */ export async function requestPermissions(): Promise { return await invoke<{ camera: PermissionState }>( - "plugin:barcodeScanner|requestPermissions", + "plugin:barcode-scanner|request_permissions", ).then((r) => r.camera); } @@ -71,5 +71,5 @@ export async function requestPermissions(): Promise { * Open application settings. Useful if permission was denied and the user must manually enable it. */ export async function openAppSettings(): Promise { - return await invoke("plugin:barcodeScanner|openAppSettings"); + return await invoke("plugin:barcode-scanner|open_app_settings"); } diff --git a/plugins/barcode-scanner/package.json b/plugins/barcode-scanner/package.json index 1e3a82c02..5f481c2df 100644 --- a/plugins/barcode-scanner/package.json +++ b/plugins/barcode-scanner/package.json @@ -24,6 +24,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.13" + "@tauri-apps/api": "2.0.0-beta.0" } } diff --git a/plugins/barcode-scanner/permissions/.dgitignore b/plugins/barcode-scanner/permissions/.dgitignore new file mode 100644 index 000000000..c75f615b1 --- /dev/null +++ b/plugins/barcode-scanner/permissions/.dgitignore @@ -0,0 +1 @@ +schemas/ diff --git a/plugins/barcode-scanner/permissions/.gitignore b/plugins/barcode-scanner/permissions/.gitignore new file mode 100644 index 000000000..c75f615b1 --- /dev/null +++ b/plugins/barcode-scanner/permissions/.gitignore @@ -0,0 +1 @@ +schemas/ diff --git a/plugins/barcode-scanner/permissions/autogenerated/commands/cancel.toml b/plugins/barcode-scanner/permissions/autogenerated/commands/cancel.toml new file mode 100644 index 000000000..91efeaa00 --- /dev/null +++ b/plugins/barcode-scanner/permissions/autogenerated/commands/cancel.toml @@ -0,0 +1,13 @@ +# 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"] diff --git a/plugins/barcode-scanner/permissions/autogenerated/commands/check_permissions.toml b/plugins/barcode-scanner/permissions/autogenerated/commands/check_permissions.toml new file mode 100644 index 000000000..f5af08b13 --- /dev/null +++ b/plugins/barcode-scanner/permissions/autogenerated/commands/check_permissions.toml @@ -0,0 +1,13 @@ +# 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"] diff --git a/plugins/barcode-scanner/permissions/autogenerated/commands/open_app_settings.toml b/plugins/barcode-scanner/permissions/autogenerated/commands/open_app_settings.toml new file mode 100644 index 000000000..9da98d852 --- /dev/null +++ b/plugins/barcode-scanner/permissions/autogenerated/commands/open_app_settings.toml @@ -0,0 +1,13 @@ +# 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"] diff --git a/plugins/barcode-scanner/permissions/autogenerated/commands/request_permissions.toml b/plugins/barcode-scanner/permissions/autogenerated/commands/request_permissions.toml new file mode 100644 index 000000000..02dcd6271 --- /dev/null +++ b/plugins/barcode-scanner/permissions/autogenerated/commands/request_permissions.toml @@ -0,0 +1,13 @@ +# 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"] diff --git a/plugins/barcode-scanner/permissions/autogenerated/commands/scan.toml b/plugins/barcode-scanner/permissions/autogenerated/commands/scan.toml new file mode 100644 index 000000000..efa621dd5 --- /dev/null +++ b/plugins/barcode-scanner/permissions/autogenerated/commands/scan.toml @@ -0,0 +1,13 @@ +# 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"] diff --git a/plugins/barcode-scanner/permissions/autogenerated/commands/vibrate.toml b/plugins/barcode-scanner/permissions/autogenerated/commands/vibrate.toml new file mode 100644 index 000000000..4c2fe94e2 --- /dev/null +++ b/plugins/barcode-scanner/permissions/autogenerated/commands/vibrate.toml @@ -0,0 +1,13 @@ +# 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"] diff --git a/plugins/barcode-scanner/permissions/autogenerated/reference.md b/plugins/barcode-scanner/permissions/autogenerated/reference.md new file mode 100644 index 000000000..d20ff1480 --- /dev/null +++ b/plugins/barcode-scanner/permissions/autogenerated/reference.md @@ -0,0 +1,50 @@ +# Permissions + +## allow-cancel + +Enables the cancel command without any pre-configured scope. + +## deny-cancel + +Denies the cancel command without any pre-configured scope. + +## allow-check-permissions + +Enables the check_permissions command without any pre-configured scope. + +## deny-check-permissions + +Denies the check_permissions command without any pre-configured scope. + +## allow-open-app-settings + +Enables the open_app_settings command without any pre-configured scope. + +## deny-open-app-settings + +Denies the open_app_settings command without any pre-configured scope. + +## allow-request-permissions + +Enables the request_permissions command without any pre-configured scope. + +## deny-request-permissions + +Denies the request_permissions command without any pre-configured scope. + +## allow-scan + +Enables the scan command without any pre-configured scope. + +## deny-scan + +Denies the scan command without any pre-configured scope. + +## allow-vibrate + +Enables the vibrate command without any pre-configured scope. + +## deny-vibrate + +Denies the vibrate command without any pre-configured scope. + diff --git a/plugins/barcode-scanner/src/api-iife.js b/plugins/barcode-scanner/src/api-iife.js index d94c59491..77c9d45cc 100644 --- a/plugins/barcode-scanner/src/api-iife.js +++ b/plugins/barcode-scanner/src/api-iife.js @@ -1 +1 @@ -if("__TAURI__"in window){var __TAURI_PLUGIN_BARCODESCANNER__=function(n){"use strict";async function e(n,e={},r){return window.__TAURI_INTERNALS__.invoke(n,e,r)}var r;return"function"==typeof SuppressedError&&SuppressedError,n.Format=void 0,(r=n.Format||(n.Format={})).QRCode="QR_CODE",r.UPC_A="UPC_A",r.UPC_E="UPC_E",r.EAN8="EAN_8",r.EAN13="EAN_13",r.Code39="CODE_39",r.Code93="CODE_93",r.Code128="CODE_128",r.Codabar="CODABAR",r.ITF="ITF",r.Aztec="AZTEC",r.DataMatrix="DATA_MATRIX",r.PDF417="PDF_417",n.cancel=async function(){return await e("plugin:barcodeScanner|cancel")},n.checkPermissions=async function(){return await e("plugin:barcodeScanner|checkPermissions").then((n=>n.camera))},n.openAppSettings=async function(){return await e("plugin:barcodeScanner|openAppSettings")},n.requestPermissions=async function(){return await e("plugin:barcodeScanner|requestPermissions").then((n=>n.camera))},n.scan=async function(n){return await e("plugin:barcodeScanner|scan",{...n})},n}({});Object.defineProperty(window.__TAURI__,"barcodeScanner",{value:__TAURI_PLUGIN_BARCODESCANNER__})} +if("__TAURI__"in window){var __TAURI_PLUGIN_BARCODESCANNER__=function(n){"use strict";async function e(n,e={},r){return window.__TAURI_INTERNALS__.invoke(n,e,r)}var r;return"function"==typeof SuppressedError&&SuppressedError,n.Format=void 0,(r=n.Format||(n.Format={})).QRCode="QR_CODE",r.UPC_A="UPC_A",r.UPC_E="UPC_E",r.EAN8="EAN_8",r.EAN13="EAN_13",r.Code39="CODE_39",r.Code93="CODE_93",r.Code128="CODE_128",r.Codabar="CODABAR",r.ITF="ITF",r.Aztec="AZTEC",r.DataMatrix="DATA_MATRIX",r.PDF417="PDF_417",n.cancel=async function(){return await e("plugin:barcode-scanner|cancel")},n.checkPermissions=async function(){return await e("plugin:barcode-scanner|check_permissions").then((n=>n.camera))},n.openAppSettings=async function(){return await e("plugin:barcode-scanner|open_app_settings")},n.requestPermissions=async function(){return await e("plugin:barcode-scanner|request_permissions").then((n=>n.camera))},n.scan=async function(n){return await e("plugin:barcode-scanner|scan",{...n})},n}({});Object.defineProperty(window.__TAURI__,"barcodeScanner",{value:__TAURI_PLUGIN_BARCODESCANNER__})} diff --git a/plugins/barcode-scanner/src/lib.rs b/plugins/barcode-scanner/src/lib.rs index 0ca820364..1b6fcff41 100644 --- a/plugins/barcode-scanner/src/lib.rs +++ b/plugins/barcode-scanner/src/lib.rs @@ -40,7 +40,7 @@ impl> crate::BarcodeScannerExt for T { /// Initializes the plugin. pub fn init() -> TauriPlugin { - Builder::new("barcodeScanner") + Builder::new("barcode-scanner") .setup(|app, api| { #[cfg(target_os = "android")] let handle = api.register_android_plugin(PLUGIN_IDENTIFIER, "BarcodeScannerPlugin")?; diff --git a/plugins/biometric/Cargo.toml b/plugins/biometric/Cargo.toml index 0803318fb..a769a593d 100644 --- a/plugins/biometric/Cargo.toml +++ b/plugins/biometric/Cargo.toml @@ -12,7 +12,7 @@ rustc-args = ["--cfg", "docsrs"] rustdoc-args = ["--cfg", "docsrs"] [build-dependencies] -tauri-build = { workspace = true } +tauri-plugin = { workspace = true, features = ["build"] } [dependencies] serde = { workspace = true } diff --git a/plugins/biometric/android/src/main/java/BiometricPlugin.kt b/plugins/biometric/android/src/main/java/BiometricPlugin.kt index bde32f09b..11e3ddf5c 100644 --- a/plugins/biometric/android/src/main/java/BiometricPlugin.kt +++ b/plugins/biometric/android/src/main/java/BiometricPlugin.kt @@ -110,7 +110,7 @@ class BiometricPlugin(private val activity: Activity): Plugin(activity) { * Check the device's availability and type of biometric authentication. */ @Command - fun getStatus(invoke: Invoke) { + fun status(invoke: Invoke) { val manager = BiometricManager.from(activity) val biometryResult = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) { manager.canAuthenticate(BiometricManager.Authenticators.BIOMETRIC_WEAK) diff --git a/plugins/biometric/build.rs b/plugins/biometric/build.rs index 743096a60..3df01ac9e 100644 --- a/plugins/biometric/build.rs +++ b/plugins/biometric/build.rs @@ -2,15 +2,11 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT -use std::process::exit; +const COMMANDS: &[&str] = &["authenticate", "status"]; fn main() { - if let Err(error) = tauri_build::mobile::PluginBuilder::new() + tauri_plugin::Builder::new(COMMANDS) .android_path("android") .ios_path("ios") - .run() - { - println!("{error:#}"); - exit(1); - } + .build(); } diff --git a/plugins/biometric/package.json b/plugins/biometric/package.json index 4334c2483..4928e7ce5 100644 --- a/plugins/biometric/package.json +++ b/plugins/biometric/package.json @@ -27,6 +27,6 @@ "tslib": "2.6.0" }, "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.13" + "@tauri-apps/api": "2.0.0-beta.0" } } diff --git a/plugins/biometric/permissions/.dgitignore b/plugins/biometric/permissions/.dgitignore new file mode 100644 index 000000000..c75f615b1 --- /dev/null +++ b/plugins/biometric/permissions/.dgitignore @@ -0,0 +1 @@ +schemas/ diff --git a/plugins/biometric/permissions/.gitignore b/plugins/biometric/permissions/.gitignore new file mode 100644 index 000000000..c75f615b1 --- /dev/null +++ b/plugins/biometric/permissions/.gitignore @@ -0,0 +1 @@ +schemas/ diff --git a/plugins/biometric/permissions/autogenerated/commands/authenticate.toml b/plugins/biometric/permissions/autogenerated/commands/authenticate.toml new file mode 100644 index 000000000..be4c9f9b4 --- /dev/null +++ b/plugins/biometric/permissions/autogenerated/commands/authenticate.toml @@ -0,0 +1,13 @@ +# 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"] diff --git a/plugins/biometric/permissions/autogenerated/commands/status.toml b/plugins/biometric/permissions/autogenerated/commands/status.toml new file mode 100644 index 000000000..c8ed433c3 --- /dev/null +++ b/plugins/biometric/permissions/autogenerated/commands/status.toml @@ -0,0 +1,13 @@ +# 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"] diff --git a/plugins/biometric/permissions/autogenerated/reference.md b/plugins/biometric/permissions/autogenerated/reference.md new file mode 100644 index 000000000..ef091dfa1 --- /dev/null +++ b/plugins/biometric/permissions/autogenerated/reference.md @@ -0,0 +1,18 @@ +# Permissions + +## allow-authenticate + +Enables the authenticate command without any pre-configured scope. + +## deny-authenticate + +Denies the authenticate command without any pre-configured scope. + +## allow-status + +Enables the status command without any pre-configured scope. + +## deny-status + +Denies the status command without any pre-configured scope. + diff --git a/plugins/cli/Cargo.toml b/plugins/cli/Cargo.toml index ef11a612c..465a29126 100644 --- a/plugins/cli/Cargo.toml +++ b/plugins/cli/Cargo.toml @@ -6,11 +6,15 @@ edition = { workspace = true } authors = { workspace = true } license = { workspace = true } rust-version = { workspace = true } +links = "tauri-plugin-cli" [package.metadata.docs.rs] rustc-args = [ "--cfg", "docsrs" ] rustdoc-args = [ "--cfg", "docsrs" ] +[build-dependencies] +tauri-plugin = { workspace = true, features = [ "build" ] } + [dependencies] serde = { workspace = true } serde_json = { workspace = true } diff --git a/plugins/cli/build.rs b/plugins/cli/build.rs new file mode 100644 index 000000000..15ff656f8 --- /dev/null +++ b/plugins/cli/build.rs @@ -0,0 +1,9 @@ +// Copyright 2019-2023 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + +const COMMANDS: &[&str] = &["cli_matches"]; + +fn main() { + tauri_plugin::Builder::new(COMMANDS).build(); +} diff --git a/plugins/cli/package.json b/plugins/cli/package.json index cf325d797..8946b4cad 100644 --- a/plugins/cli/package.json +++ b/plugins/cli/package.json @@ -23,6 +23,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.13" + "@tauri-apps/api": "2.0.0-beta.0" } } diff --git a/plugins/cli/permissions/.dgitignore b/plugins/cli/permissions/.dgitignore new file mode 100644 index 000000000..c75f615b1 --- /dev/null +++ b/plugins/cli/permissions/.dgitignore @@ -0,0 +1 @@ +schemas/ diff --git a/plugins/cli/permissions/.gitignore b/plugins/cli/permissions/.gitignore new file mode 100644 index 000000000..c75f615b1 --- /dev/null +++ b/plugins/cli/permissions/.gitignore @@ -0,0 +1 @@ +schemas/ diff --git a/plugins/cli/permissions/autogenerated/commands/cli_matches.toml b/plugins/cli/permissions/autogenerated/commands/cli_matches.toml new file mode 100644 index 000000000..b0a2e8f3f --- /dev/null +++ b/plugins/cli/permissions/autogenerated/commands/cli_matches.toml @@ -0,0 +1,13 @@ +# 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"] diff --git a/plugins/cli/permissions/autogenerated/reference.md b/plugins/cli/permissions/autogenerated/reference.md new file mode 100644 index 000000000..0f231dc30 --- /dev/null +++ b/plugins/cli/permissions/autogenerated/reference.md @@ -0,0 +1,14 @@ +# Permissions + +## allow-cli-matches + +Enables the cli_matches command without any pre-configured scope. + +## deny-cli-matches + +Denies the cli_matches command without any pre-configured scope. + +## default + +Allows reading the CLI matches + diff --git a/plugins/cli/permissions/default.toml b/plugins/cli/permissions/default.toml new file mode 100644 index 000000000..82bf7ca8f --- /dev/null +++ b/plugins/cli/permissions/default.toml @@ -0,0 +1,4 @@ +"$schema" = "schemas/schema.json" +[default] +description = "Allows reading the CLI matches" +permissions = ["allow-cli-matches"] diff --git a/plugins/clipboard-manager/Cargo.toml b/plugins/clipboard-manager/Cargo.toml index b5e9df8da..1101ef496 100644 --- a/plugins/clipboard-manager/Cargo.toml +++ b/plugins/clipboard-manager/Cargo.toml @@ -9,12 +9,12 @@ rust-version = { workspace = true } links = "tauri-plugin-clipboard-manager" [package.metadata.docs.rs] -rustc-args = [ "--cfg", "docsrs" ] -rustdoc-args = [ "--cfg", "docsrs" ] -targets = [ "x86_64-unknown-linux-gnu", "x86_64-linux-android" ] +rustc-args = ["--cfg", "docsrs"] +rustdoc-args = ["--cfg", "docsrs"] +targets = ["x86_64-unknown-linux-gnu", "x86_64-linux-android"] [build-dependencies] -tauri-build = { workspace = true } +tauri-plugin = { workspace = true, features = ["build"] } [dependencies] serde = { workspace = true } diff --git a/plugins/clipboard-manager/build.rs b/plugins/clipboard-manager/build.rs index da7cd3cc4..758d64f30 100644 --- a/plugins/clipboard-manager/build.rs +++ b/plugins/clipboard-manager/build.rs @@ -2,11 +2,13 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT +const COMMANDS: &[&str] = &["write", "read"]; + fn main() { - if let Err(error) = tauri_build::mobile::PluginBuilder::new() + if let Err(error) = tauri_plugin::Builder::new(COMMANDS) .android_path("android") .ios_path("ios") - .run() + .try_build() { println!("{error:#}"); // when building documentation for Android the plugin build result is irrelevant to the crate itself diff --git a/plugins/clipboard-manager/guest-js/index.ts b/plugins/clipboard-manager/guest-js/index.ts index 8338ac104..4a9d10a0e 100644 --- a/plugins/clipboard-manager/guest-js/index.ts +++ b/plugins/clipboard-manager/guest-js/index.ts @@ -29,7 +29,7 @@ async function writeText( text: string, opts?: { label?: string }, ): Promise { - return invoke("plugin:clipboard|write", { + return invoke("plugin:clipboard-manager|write", { data: { plainText: { label: opts?.label, @@ -49,7 +49,7 @@ async function writeText( * @since 2.0.0 */ async function readText(): Promise { - const kind: ClipResponse = await invoke("plugin:clipboard|read"); + const kind: ClipResponse = await invoke("plugin:clipboard-manager|read"); return kind.plainText.text; } diff --git a/plugins/clipboard-manager/package.json b/plugins/clipboard-manager/package.json index 91fe9e340..18cd5ae38 100644 --- a/plugins/clipboard-manager/package.json +++ b/plugins/clipboard-manager/package.json @@ -23,6 +23,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.13" + "@tauri-apps/api": "2.0.0-beta.0" } } diff --git a/plugins/clipboard-manager/permissions/.dgitignore b/plugins/clipboard-manager/permissions/.dgitignore new file mode 100644 index 000000000..c75f615b1 --- /dev/null +++ b/plugins/clipboard-manager/permissions/.dgitignore @@ -0,0 +1 @@ +schemas/ diff --git a/plugins/clipboard-manager/permissions/.gitignore b/plugins/clipboard-manager/permissions/.gitignore new file mode 100644 index 000000000..c75f615b1 --- /dev/null +++ b/plugins/clipboard-manager/permissions/.gitignore @@ -0,0 +1 @@ +schemas/ diff --git a/plugins/clipboard-manager/permissions/autogenerated/commands/read.toml b/plugins/clipboard-manager/permissions/autogenerated/commands/read.toml new file mode 100644 index 000000000..20fa10c6b --- /dev/null +++ b/plugins/clipboard-manager/permissions/autogenerated/commands/read.toml @@ -0,0 +1,13 @@ +# 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"] diff --git a/plugins/clipboard-manager/permissions/autogenerated/commands/write.toml b/plugins/clipboard-manager/permissions/autogenerated/commands/write.toml new file mode 100644 index 000000000..73d1d3878 --- /dev/null +++ b/plugins/clipboard-manager/permissions/autogenerated/commands/write.toml @@ -0,0 +1,13 @@ +# 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"] diff --git a/plugins/clipboard-manager/permissions/autogenerated/reference.md b/plugins/clipboard-manager/permissions/autogenerated/reference.md new file mode 100644 index 000000000..02d3e533f --- /dev/null +++ b/plugins/clipboard-manager/permissions/autogenerated/reference.md @@ -0,0 +1,18 @@ +# Permissions + +## allow-read + +Enables the read command without any pre-configured scope. + +## deny-read + +Denies the read command without any pre-configured scope. + +## allow-write + +Enables the write command without any pre-configured scope. + +## deny-write + +Denies the write command without any pre-configured scope. + diff --git a/plugins/clipboard-manager/src/api-iife.js b/plugins/clipboard-manager/src/api-iife.js index 9e494285a..8dc516551 100644 --- a/plugins/clipboard-manager/src/api-iife.js +++ b/plugins/clipboard-manager/src/api-iife.js @@ -1 +1 @@ -if("__TAURI__"in window){var __TAURI_PLUGIN_CLIPBOARDMANAGER__=function(e){"use strict";async function n(e,n={},r){return window.__TAURI_INTERNALS__.invoke(e,n,r)}return"function"==typeof SuppressedError&&SuppressedError,e.readText=async function(){return(await n("plugin:clipboard|read")).plainText.text},e.writeText=async function(e,r){return n("plugin:clipboard|write",{data:{plainText:{label:r?.label,text:e}}})},e}({});Object.defineProperty(window.__TAURI__,"clipboardManager",{value:__TAURI_PLUGIN_CLIPBOARDMANAGER__})} +if("__TAURI__"in window){var __TAURI_PLUGIN_CLIPBOARDMANAGER__=function(e){"use strict";async function n(e,n={},r){return window.__TAURI_INTERNALS__.invoke(e,n,r)}return"function"==typeof SuppressedError&&SuppressedError,e.readText=async function(){return(await n("plugin:clipboard-manager|read")).plainText.text},e.writeText=async function(e,r){return n("plugin:clipboard-manager|write",{data:{plainText:{label:r?.label,text:e}}})},e}({});Object.defineProperty(window.__TAURI__,"clipboardManager",{value:__TAURI_PLUGIN_CLIPBOARDMANAGER__})} diff --git a/plugins/clipboard-manager/src/lib.rs b/plugins/clipboard-manager/src/lib.rs index d4ccdb0ab..2b7934ab3 100644 --- a/plugins/clipboard-manager/src/lib.rs +++ b/plugins/clipboard-manager/src/lib.rs @@ -47,7 +47,7 @@ impl> crate::ClipboardExt for T { /// Initializes the plugin. pub fn init() -> TauriPlugin { - Builder::new("clipboard") + Builder::new("clipboard-manager") .js_init_script(include_str!("api-iife.js").to_string()) .invoke_handler(tauri::generate_handler![commands::write, commands::read]) .setup(|app, api| { diff --git a/plugins/deep-link/Cargo.toml b/plugins/deep-link/Cargo.toml index 678585855..40be3ea4b 100644 --- a/plugins/deep-link/Cargo.toml +++ b/plugins/deep-link/Cargo.toml @@ -9,14 +9,14 @@ rust-version = { workspace = true } links = "tauri-plugin-deep-link" [package.metadata.docs.rs] -rustc-args = [ "--cfg", "docsrs" ] -rustdoc-args = [ "--cfg", "docsrs" ] -targets = [ "x86_64-linux-android" ] +rustc-args = ["--cfg", "docsrs"] +rustdoc-args = ["--cfg", "docsrs"] +targets = ["x86_64-linux-android"] [build-dependencies] serde = { workspace = true } serde_json = { workspace = true } -tauri-build = { workspace = true } +tauri-plugin = { workspace = true, features = ["build"] } [dependencies] serde = { workspace = true } diff --git a/plugins/deep-link/build.rs b/plugins/deep-link/build.rs index 6e06ccadd..bffa4675a 100644 --- a/plugins/deep-link/build.rs +++ b/plugins/deep-link/build.rs @@ -6,6 +6,8 @@ mod config; use config::{AssociatedDomain, Config}; +const COMMANDS: &[&str] = &["get_current"]; + // TODO: Consider using activity-alias in case users may have multiple activities in their app. // TODO: Do we want to support the other path* configs too? fn intent_filter(domain: &AssociatedDomain) -> String { @@ -30,9 +32,9 @@ fn intent_filter(domain: &AssociatedDomain) -> String { } fn main() { - if let Err(error) = tauri_build::mobile::PluginBuilder::new() + if let Err(error) = tauri_plugin::Builder::new(COMMANDS) .android_path("android") - .run() + .try_build() { println!("{error:#}"); if !(cfg!(docsrs) && std::env::var("TARGET").unwrap().contains("android")) { @@ -40,8 +42,8 @@ fn main() { } } - if let Some(config) = tauri_build::config::plugin_config::("deep-link") { - tauri_build::mobile::update_android_manifest( + if let Some(config) = tauri_plugin::plugin_config::("deep-link") { + tauri_plugin::mobile::update_android_manifest( "DEEP LINK PLUGIN", "activity", config @@ -55,7 +57,7 @@ fn main() { #[cfg(target_os = "macos")] { - tauri_build::mobile::update_entitlements(|entitlements| { + tauri_plugin::mobile::update_entitlements(|entitlements| { entitlements.insert( "com.apple.developer.associated-domains".into(), config diff --git a/plugins/deep-link/examples/app/package.json b/plugins/deep-link/examples/app/package.json index acad291a8..05e8647fb 100644 --- a/plugins/deep-link/examples/app/package.json +++ b/plugins/deep-link/examples/app/package.json @@ -10,13 +10,13 @@ "tauri": "tauri" }, "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.13", + "@tauri-apps/api": "2.0.0-beta.0", "@tauri-apps/plugin-deep-link": "2.0.0-alpha.4" }, "devDependencies": { - "@tauri-apps/cli": "2.0.0-alpha.20", + "@tauri-apps/cli": "2.0.0-beta.0", "internal-ip": "^8.0.0", "typescript": "^5.2.2", - "vite": "^5.0.6" + "vite": "^5.0.12" } } diff --git a/plugins/deep-link/examples/app/src-tauri/.gitignore b/plugins/deep-link/examples/app/src-tauri/.gitignore index 821bbb6bd..67d4662d8 100644 --- a/plugins/deep-link/examples/app/src-tauri/.gitignore +++ b/plugins/deep-link/examples/app/src-tauri/.gitignore @@ -2,4 +2,6 @@ # will have compiled files and executables /target/ +/capabilities/schemas + .cargo \ No newline at end of file diff --git a/plugins/deep-link/examples/app/src-tauri/Cargo.toml b/plugins/deep-link/examples/app/src-tauri/Cargo.toml index d4d2effb1..7cbf3fd50 100644 --- a/plugins/deep-link/examples/app/src-tauri/Cargo.toml +++ b/plugins/deep-link/examples/app/src-tauri/Cargo.toml @@ -23,7 +23,7 @@ tauri = { workspace = true } tauri-plugin-deep-link = { path = "../../../" } [features] -# this feature is used for production builds or when `devPath` points to the filesystem and the built-in dev server is disabled. +# this feature is used for production builds or when `devUrl` points to the filesystem and the built-in dev server is disabled. # If you use cargo directly instead of tauri's cli you can use this feature flag to switch between tauri's `dev` and `build` modes. # DO NOT REMOVE!! custom-protocol = [ "tauri/custom-protocol" ] diff --git a/plugins/deep-link/examples/app/src-tauri/src/lib.rs b/plugins/deep-link/examples/app/src-tauri/src/lib.rs index 524f56cb0..5fcb3b237 100644 --- a/plugins/deep-link/examples/app/src-tauri/src/lib.rs +++ b/plugins/deep-link/examples/app/src-tauri/src/lib.rs @@ -2,8 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT -use tauri::Manager; - // Learn more about Tauri commands at https://tauri.app/v1/guides/features/command #[tauri::command] fn greet(name: &str) -> String { @@ -15,7 +13,7 @@ pub fn run() { tauri::Builder::default() .plugin(tauri_plugin_deep_link::init()) .setup(|app| { - app.listen_global("deep-link://new-url", |url| { + app.listen("deep-link://new-url", |url| { dbg!(url); }); Ok(()) diff --git a/plugins/deep-link/examples/app/src-tauri/tauri.conf.json b/plugins/deep-link/examples/app/src-tauri/tauri.conf.json index f95b1d7c7..bec5fb761 100644 --- a/plugins/deep-link/examples/app/src-tauri/tauri.conf.json +++ b/plugins/deep-link/examples/app/src-tauri/tauri.conf.json @@ -29,8 +29,13 @@ }, "deep-link": { "domains": [ - { "host": "fabianlars.de", "pathPrefix": ["/intent"] }, - { "host": "tauri.app" } + { + "host": "fabianlars.de", + "pathPrefix": ["/intent"] + }, + { + "host": "tauri.app" + } ] } }, diff --git a/plugins/deep-link/package.json b/plugins/deep-link/package.json index 45c4dc440..ba611922e 100644 --- a/plugins/deep-link/package.json +++ b/plugins/deep-link/package.json @@ -24,6 +24,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.13" + "@tauri-apps/api": "2.0.0-beta.0" } } diff --git a/plugins/deep-link/permissions/.dgitignore b/plugins/deep-link/permissions/.dgitignore new file mode 100644 index 000000000..c75f615b1 --- /dev/null +++ b/plugins/deep-link/permissions/.dgitignore @@ -0,0 +1 @@ +schemas/ diff --git a/plugins/deep-link/permissions/.gitignore b/plugins/deep-link/permissions/.gitignore new file mode 100644 index 000000000..c75f615b1 --- /dev/null +++ b/plugins/deep-link/permissions/.gitignore @@ -0,0 +1 @@ +schemas/ diff --git a/plugins/deep-link/permissions/autogenerated/commands/get_current.toml b/plugins/deep-link/permissions/autogenerated/commands/get_current.toml new file mode 100644 index 000000000..e729de116 --- /dev/null +++ b/plugins/deep-link/permissions/autogenerated/commands/get_current.toml @@ -0,0 +1,13 @@ +# 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"] diff --git a/plugins/deep-link/permissions/autogenerated/reference.md b/plugins/deep-link/permissions/autogenerated/reference.md new file mode 100644 index 000000000..d0791ef90 --- /dev/null +++ b/plugins/deep-link/permissions/autogenerated/reference.md @@ -0,0 +1,14 @@ +# Permissions + +## allow-get-current + +Enables the get_current command without any pre-configured scope. + +## deny-get-current + +Denies the get_current command without any pre-configured scope. + +## default + +Allows reading the opened deep link via the get_current command + diff --git a/plugins/deep-link/permissions/default.toml b/plugins/deep-link/permissions/default.toml new file mode 100644 index 000000000..0c3cf2c06 --- /dev/null +++ b/plugins/deep-link/permissions/default.toml @@ -0,0 +1,4 @@ +"$schema" = "schemas/schema.json" +[default] +description = "Allows reading the opened deep link via the get_current command" +permissions = ["allow-get-current"] diff --git a/plugins/deep-link/src/api-iife.js b/plugins/deep-link/src/api-iife.js index 4a39700d9..6a37d7481 100644 --- a/plugins/deep-link/src/api-iife.js +++ b/plugins/deep-link/src/api-iife.js @@ -1 +1 @@ -if("__TAURI__"in window){var __TAURI_PLUGIN_DEEPLINK__=function(e){"use strict";function n(e,n=!1){return window.__TAURI_INTERNALS__.transformCallback(e,n)}async function r(e,n={},r){return window.__TAURI_INTERNALS__.invoke(e,n,r)}var t;async function _(e,t,_){return r("plugin:event|listen",{event:e,windowLabel:_?.target,handler:n(t)}).then((n=>async()=>async function(e,n){await r("plugin:event|unlisten",{event:e,eventId:n})}(e,n)))}async function i(){return await r("plugin:deep-link|get_current")}return"function"==typeof SuppressedError&&SuppressedError,function(e){e.WINDOW_RESIZED="tauri://resize",e.WINDOW_MOVED="tauri://move",e.WINDOW_CLOSE_REQUESTED="tauri://close-requested",e.WINDOW_CREATED="tauri://window-created",e.WINDOW_DESTROYED="tauri://destroyed",e.WINDOW_FOCUS="tauri://focus",e.WINDOW_BLUR="tauri://blur",e.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",e.WINDOW_THEME_CHANGED="tauri://theme-changed",e.WINDOW_FILE_DROP="tauri://file-drop",e.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",e.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled"}(t||(t={})),e.getCurrent=i,e.onOpenUrl=async function(e){const n=await i();return null!=n&&e(n),await _("deep-link://new-url",(n=>e(n.payload)))},e}({});Object.defineProperty(window.__TAURI__,"deepLink",{value:__TAURI_PLUGIN_DEEPLINK__})} +if("__TAURI__"in window){var __TAURI_PLUGIN_DEEPLINK__=function(e){"use strict";function n(e,n=!1){return window.__TAURI_INTERNALS__.transformCallback(e,n)}async function t(e,n={},t){return window.__TAURI_INTERNALS__.invoke(e,n,t)}var r;async function _(e,r,_){const i="string"==typeof _?.target?{kind:"AnyLabel",label:_.target}:_?.target??{kind:"Any"};return t("plugin:event|listen",{event:e,target:i,handler:n(r)}).then((n=>async()=>async function(e,n){await t("plugin:event|unlisten",{event:e,eventId:n})}(e,n)))}async function i(){return await t("plugin:deep-link|get_current")}return"function"==typeof SuppressedError&&SuppressedError,function(e){e.WINDOW_RESIZED="tauri://resize",e.WINDOW_MOVED="tauri://move",e.WINDOW_CLOSE_REQUESTED="tauri://close-requested",e.WINDOW_DESTROYED="tauri://destroyed",e.WINDOW_FOCUS="tauri://focus",e.WINDOW_BLUR="tauri://blur",e.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",e.WINDOW_THEME_CHANGED="tauri://theme-changed",e.WEBVIEW_CREATED="tauri://webview-created",e.WEBVIEW_FILE_DROP="tauri://file-drop",e.WEBVIEW_FILE_DROP_HOVER="tauri://file-drop-hover",e.WEBVIEW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled"}(r||(r={})),e.getCurrent=i,e.onOpenUrl=async function(e){const n=await i();return null!=n&&e(n),await _("deep-link://new-url",(n=>e(n.payload)))},e}({});Object.defineProperty(window.__TAURI__,"deepLink",{value:__TAURI_PLUGIN_DEEPLINK__})} diff --git a/plugins/deep-link/src/lib.rs b/plugins/deep-link/src/lib.rs index 6db0b1d79..5fa4b9075 100644 --- a/plugins/deep-link/src/lib.rs +++ b/plugins/deep-link/src/lib.rs @@ -43,6 +43,7 @@ fn init_deep_link( }; let _ = app_handle.emit("deep-link://new-url", vec![url]); + Ok(()) }), }, diff --git a/plugins/dialog/Cargo.toml b/plugins/dialog/Cargo.toml index d22e4acf2..df7147f44 100644 --- a/plugins/dialog/Cargo.toml +++ b/plugins/dialog/Cargo.toml @@ -9,9 +9,12 @@ rust-version = { workspace = true } links = "tauri-plugin-dialog" [package.metadata.docs.rs] -rustc-args = [ "--cfg", "docsrs" ] -rustdoc-args = [ "--cfg", "docsrs" ] -targets = [ "x86_64-unknown-linux-gnu", "x86_64-linux-android" ] +rustc-args = ["--cfg", "docsrs"] +rustdoc-args = ["--cfg", "docsrs"] +targets = ["x86_64-unknown-linux-gnu", "x86_64-linux-android"] + +[build-dependencies] +tauri-plugin = { workspace = true, features = ["build"] } [dependencies] serde = { workspace = true } @@ -25,8 +28,5 @@ tauri-plugin-fs = { path = "../fs", version = "2.0.0-alpha.7" } glib = "0.16" [target."cfg(any(target_os = \"macos\", windows, target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies] -rfd = { version = "=0.12.0", features = [ "gtk3", "common-controls-v6" ] } +rfd = { version = "=0.12.0", features = ["gtk3", "common-controls-v6"] } raw-window-handle = "0.5" - -[build-dependencies] -tauri-build = { workspace = true } diff --git a/plugins/dialog/build.rs b/plugins/dialog/build.rs index da7cd3cc4..d692f66d7 100644 --- a/plugins/dialog/build.rs +++ b/plugins/dialog/build.rs @@ -2,11 +2,13 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT +const COMMANDS: &[&str] = &["open", "save", "message", "ask", "confirm"]; + fn main() { - if let Err(error) = tauri_build::mobile::PluginBuilder::new() + if let Err(error) = tauri_plugin::Builder::new(COMMANDS) .android_path("android") .ios_path("ios") - .run() + .try_build() { println!("{error:#}"); // when building documentation for Android the plugin build result is irrelevant to the crate itself diff --git a/plugins/dialog/package.json b/plugins/dialog/package.json index b95495675..4c9a9306b 100644 --- a/plugins/dialog/package.json +++ b/plugins/dialog/package.json @@ -23,6 +23,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.13" + "@tauri-apps/api": "2.0.0-beta.0" } } diff --git a/plugins/dialog/permissions/.dgitignore b/plugins/dialog/permissions/.dgitignore new file mode 100644 index 000000000..c75f615b1 --- /dev/null +++ b/plugins/dialog/permissions/.dgitignore @@ -0,0 +1 @@ +schemas/ diff --git a/plugins/dialog/permissions/.gitignore b/plugins/dialog/permissions/.gitignore new file mode 100644 index 000000000..c75f615b1 --- /dev/null +++ b/plugins/dialog/permissions/.gitignore @@ -0,0 +1 @@ +schemas/ diff --git a/plugins/dialog/permissions/autogenerated/commands/ask.toml b/plugins/dialog/permissions/autogenerated/commands/ask.toml new file mode 100644 index 000000000..4142c59ff --- /dev/null +++ b/plugins/dialog/permissions/autogenerated/commands/ask.toml @@ -0,0 +1,13 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +[[permission]] +identifier = "allow-ask" +description = "Enables the ask command without any pre-configured scope." +commands.allow = ["ask"] + +[[permission]] +identifier = "deny-ask" +description = "Denies the ask command without any pre-configured scope." +commands.deny = ["ask"] diff --git a/plugins/dialog/permissions/autogenerated/commands/confirm.toml b/plugins/dialog/permissions/autogenerated/commands/confirm.toml new file mode 100644 index 000000000..a297d0757 --- /dev/null +++ b/plugins/dialog/permissions/autogenerated/commands/confirm.toml @@ -0,0 +1,13 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +[[permission]] +identifier = "allow-confirm" +description = "Enables the confirm command without any pre-configured scope." +commands.allow = ["confirm"] + +[[permission]] +identifier = "deny-confirm" +description = "Denies the confirm command without any pre-configured scope." +commands.deny = ["confirm"] diff --git a/plugins/dialog/permissions/autogenerated/commands/message.toml b/plugins/dialog/permissions/autogenerated/commands/message.toml new file mode 100644 index 000000000..d386d91e8 --- /dev/null +++ b/plugins/dialog/permissions/autogenerated/commands/message.toml @@ -0,0 +1,13 @@ +# 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"] diff --git a/plugins/dialog/permissions/autogenerated/commands/open.toml b/plugins/dialog/permissions/autogenerated/commands/open.toml new file mode 100644 index 000000000..4ea6dff16 --- /dev/null +++ b/plugins/dialog/permissions/autogenerated/commands/open.toml @@ -0,0 +1,13 @@ +# 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"] diff --git a/plugins/dialog/permissions/autogenerated/commands/save.toml b/plugins/dialog/permissions/autogenerated/commands/save.toml new file mode 100644 index 000000000..d3e842201 --- /dev/null +++ b/plugins/dialog/permissions/autogenerated/commands/save.toml @@ -0,0 +1,13 @@ +# 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"] diff --git a/plugins/dialog/permissions/autogenerated/reference.md b/plugins/dialog/permissions/autogenerated/reference.md new file mode 100644 index 000000000..9c000f9ec --- /dev/null +++ b/plugins/dialog/permissions/autogenerated/reference.md @@ -0,0 +1,42 @@ +# Permissions + +## allow-ask + +Enables the ask command without any pre-configured scope. + +## deny-ask + +Denies the ask command without any pre-configured scope. + +## allow-confirm + +Enables the confirm command without any pre-configured scope. + +## deny-confirm + +Denies the confirm command without any pre-configured scope. + +## allow-message + +Enables the message command without any pre-configured scope. + +## deny-message + +Denies the message command without any pre-configured scope. + +## allow-open + +Enables the open command without any pre-configured scope. + +## deny-open + +Denies the open command without any pre-configured scope. + +## allow-save + +Enables the save command without any pre-configured scope. + +## deny-save + +Denies the save command without any pre-configured scope. + diff --git a/plugins/dialog/src/commands.rs b/plugins/dialog/src/commands.rs index a7de38185..02c80f0d8 100644 --- a/plugins/dialog/src/commands.rs +++ b/plugins/dialog/src/commands.rs @@ -118,7 +118,7 @@ pub(crate) async fn open( if let Some(folders) = &folders { for folder in folders { if let Some(s) = window.try_fs_scope() { - s.allow_directory(folder, options.recursive)?; + s.allow_directory(folder, options.recursive); } } } @@ -127,7 +127,7 @@ pub(crate) async fn open( let folder = dialog_builder.blocking_pick_folder(); if let Some(path) = &folder { if let Some(s) = window.try_fs_scope() { - s.allow_directory(path, options.recursive)?; + s.allow_directory(path, options.recursive); } } OpenResponse::Folder(folder) @@ -140,7 +140,7 @@ pub(crate) async fn open( if let Some(files) = &files { for file in files { if let Some(s) = window.try_fs_scope() { - s.allow_file(&file.path)?; + s.allow_file(&file.path); } window .state::() @@ -152,7 +152,7 @@ pub(crate) async fn open( let file = dialog_builder.blocking_pick_file(); if let Some(file) = &file { if let Some(s) = window.try_fs_scope() { - s.allow_file(&file.path)?; + s.allow_file(&file.path); } window .state::() @@ -193,7 +193,7 @@ pub(crate) async fn save( let path = dialog_builder.blocking_save_file(); if let Some(p) = &path { if let Some(s) = window.try_fs_scope() { - s.allow_file(p)?; + s.allow_file(p); } window.state::().allow_file(p)?; } diff --git a/plugins/dialog/test/tauri.conf.json b/plugins/dialog/test/tauri.conf.json index 83cda94c3..d9e6f8731 100644 --- a/plugins/dialog/test/tauri.conf.json +++ b/plugins/dialog/test/tauri.conf.json @@ -1,5 +1,6 @@ { - "identifier": "studio.tauri.example", + "$schema": "../../../node_modules/.pnpm/@tauri-apps+cli@2.0.0-alpha.17/node_modules/@tauri-apps/cli/schema.json", + "identifier": "app.tauri.example", "build": { "frontendDist": ".", "devUrl": "http://localhost:4000" diff --git a/plugins/fs/Cargo.toml b/plugins/fs/Cargo.toml index 7ea7da8d9..d67814ac8 100644 --- a/plugins/fs/Cargo.toml +++ b/plugins/fs/Cargo.toml @@ -6,19 +6,26 @@ authors = { workspace = true } license = { workspace = true } edition = { workspace = true } rust-version = { workspace = true } +links = "tauri-plugin-fs" [package.metadata.docs.rs] -rustc-args = [ "--cfg", "docsrs" ] -rustdoc-args = [ "--cfg", "docsrs" ] +rustc-args = ["--cfg", "docsrs"] +rustdoc-args = ["--cfg", "docsrs"] + +[build-dependencies] +tauri-plugin = { workspace = true, features = ["build"] } +schemars = { workspace = true } [dependencies] serde = { workspace = true } +serde_json = { workspace = true } +schemars = { workspace = true } serde_repr = "0.1" tauri = { workspace = true } thiserror = { workspace = true } url = { workspace = true } anyhow = "1" -uuid = { version = "1", features = [ "v4" ] } +uuid = { version = "1", features = ["v4"] } glob = "0.3" notify = { version = "6", optional = true, features = [ "serde" ] } notify-debouncer-full = { version = "0.3", optional = true } diff --git a/plugins/fs/SECURITY.md b/plugins/fs/SECURITY.md new file mode 100644 index 000000000..1adc7ebb2 --- /dev/null +++ b/plugins/fs/SECURITY.md @@ -0,0 +1,51 @@ +# Security Policy + +**Do not report security vulnerabilities through public GitHub issues.** + +**Please use the [Private Vulnerability Disclosure](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability#privately-reporting-a-security-vulnerability) feature of GitHub.** + +Include as much of the following information: + +- Type of issue (e.g. improper input parsing, privilege escalation, etc.) +- The location of the affected source code (tag/branch/commit or direct URL) +- Any special configuration required to reproduce the issue +- The distribution affected or used to help us with reproduction of the issue +- Step-by-step instructions to reproduce the issue +- Ideally a reproduction repository +- Impact of the issue, including how an attacker might exploit the issue + +We prefer to receive reports in English. + +## Contact + +Please disclose a vulnerability or security relevant issue here: [https://github.com/tauri-apps/plugins-workspace/security/advisories/new](https://github.com/tauri-apps/plugins-workspace/security/advisories/new). + +Alternatively, you can also contact us by email via [security@tauri.app](mailto:security@tauri.app). + +## Threat Model + +This plugin possibly allows access to the full filesystem available to the application process. +Depending on the operating system the access is already confined (android/ios) to only certain locations. +In other operating systems like Linux/MacOS/Windows it depends on the installation and packaging method but in most cases full +access is granted. + +To prevent exposure of sensitive locations and data this plugin can be scoped to only allow certain base directories +or only access to specific files or subdirectories. +This scoping effectively affects only calls made from the webviews/frontend code and calls made from rust can always circumvent +the restrictions imposed by the scope. + +The scope is defined at compile time in the used permissions but the user or application developer can grant or revoke access to specific files or folders at runtime by modifying the scope state through the runtime authority, if configured during plugin initialization. + + +### Security Assumptions + +- The filesystem access is limited by user permissions +- The operating system filesystem access confinment works as documented +- The scoping mechanism of the Tauri `fs` commands work as intended and has no bypasses +- The user or application developer can grant or revoke access to specific files at runtime by modifying the scope + + +#### Out Of Scope + +- Exploits in underlying filesystems +- Exploits in the underlying rust `std::fs` library diff --git a/plugins/fs/build.rs b/plugins/fs/build.rs new file mode 100644 index 000000000..1901f3a48 --- /dev/null +++ b/plugins/fs/build.rs @@ -0,0 +1,164 @@ +// Copyright 2019-2023 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + +use std::{fs::create_dir_all, path::Path}; + +#[path = "src/scope.rs"] +#[allow(dead_code)] +mod scope; + +const BASE_DIR_VARS: &[&str] = &[ + "AUDIO", + "CACHE", + "CONFIG", + "DATA", + "LOCALDATA", + "DESKTOP", + "DOCUMENT", + "DOWNLOAD", + "EXE", + "FONT", + "HOME", + "PICTURE", + "PUBLIC", + "RUNTIME", + "TEMPLATE", + "VIDEO", + "RESOURCE", + "APP", + "LOG", + "TEMP", + "APPCONFIG", + "APPDATA", + "APPLOCALDATA", + "APPCACHE", + "APPLOG", +]; +const COMMANDS: &[&str] = &[ + "mkdir", + "create", + "copy_file", + "remove", + "rename", + "truncate", + "ftruncate", + "write", + "write_file", + "write_text_file", + "read_dir", + "read_file", + "read", + "open", + "read_text_file", + "read_text_file_lines", + "read_text_file_lines_next", + "seek", + "stat", + "lstat", + "fstat", + "exists", + "watch", + "unwatch", +]; + +fn main() { + let autogenerated = Path::new("permissions/autogenerated/"); + let base_dirs = &autogenerated.join("base-directories"); + + if !base_dirs.exists() { + create_dir_all(base_dirs).expect("unable to create autogenerated base directories dir"); + } + + for base_dir in BASE_DIR_VARS { + let upper = base_dir; + let lower = base_dir.to_lowercase(); + let toml = format!( + r###"# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +# Scopes Section +# This section contains scopes, which define file level access + +[[permission]] +identifier = "scope-{lower}-recursive" +description = "This scope recursive access to the complete `${upper}` folder, including sub directories and files." + +[[permission.scope.allow]] +path = "${upper}/**" + +[[permission]] +identifier = "scope-{lower}" +description = "This scope permits access to all files and list content of top level directories in the `${upper}`folder." + +[[permission.scope.allow]] +path = "${upper}/*" + +[[permission]] +identifier = "scope-{lower}-index" +description = "This scope permits to list all files and folders in the `${upper}`folder." + +[[permission.scope.allow]] +path = "${upper}/" + +# Sets Section +# This section combines the scope elements with enablement of commands + +[[set]] +identifier = "allow-{lower}-read-recursive" +description = "This allows full recursive read access to the complete `${upper}` folder, files and subdirectories." +permissions = [ + "read-all", + "scope-{lower}-recursive" +] + +[[set]] +identifier = "allow-{lower}-write-recursive" +description = "This allows full recusrive write access to the complete `${upper}` folder, files and subdirectories." +permissions = [ + "write-all", + "scope-{lower}-recursive" +] + +[[set]] +identifier = "allow-{lower}-read" +description = "This allows non-recursive read access to the `${upper}` folder." +permissions = [ + "read-all", + "scope-{lower}" +] + +[[set]] +identifier = "allow-{lower}-write" +description = "This allows non-recursive write access to the `${upper}` folder." +permissions = [ + "write-all", + "scope-{lower}" +] + +[[set]] +identifier = "allow-{lower}-meta-recursive" +description = "This allows read access to metadata of the `${upper}` folder, including file listing and statistics." +permissions = [ + "read-meta", + "scope-{lower}-recursive" +] + +[[set]] +identifier = "allow-{lower}-meta" +description = "This allows read access to metadata of the `${upper}` folder, including file listing and statistics." +permissions = [ + "read-meta", + "scope-{lower}-index" +]"### + ); + + std::fs::write(base_dirs.join(format!("{lower}.toml")), toml) + .unwrap_or_else(|e| panic!("unable to autogenerate ${upper}: {e}")); + } + + tauri_plugin::Builder::new(COMMANDS) + .global_scope_schema(schemars::schema_for!(scope::Entry)) + .build(); +} diff --git a/plugins/fs/package.json b/plugins/fs/package.json index 30f9c8c21..c47d76717 100644 --- a/plugins/fs/package.json +++ b/plugins/fs/package.json @@ -24,6 +24,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.13" + "@tauri-apps/api": "2.0.0-beta.0" } } diff --git a/plugins/fs/permissions/.gitignore b/plugins/fs/permissions/.gitignore new file mode 100644 index 000000000..c75f615b1 --- /dev/null +++ b/plugins/fs/permissions/.gitignore @@ -0,0 +1 @@ +schemas/ diff --git a/plugins/fs/permissions/autogenerated/base-directories/app.toml b/plugins/fs/permissions/autogenerated/base-directories/app.toml new file mode 100644 index 000000000..37eaadcf3 --- /dev/null +++ b/plugins/fs/permissions/autogenerated/base-directories/app.toml @@ -0,0 +1,78 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +# Scopes Section +# This section contains scopes, which define file level access + +[[permission]] +identifier = "scope-app-recursive" +description = "This scope recursive access to the complete `$APP` folder, including sub directories and files." + +[[permission.scope.allow]] +path = "$APP/**" + +[[permission]] +identifier = "scope-app" +description = "This scope permits access to all files and list content of top level directories in the `$APP`folder." + +[[permission.scope.allow]] +path = "$APP/*" + +[[permission]] +identifier = "scope-app-index" +description = "This scope permits to list all files and folders in the `$APP`folder." + +[[permission.scope.allow]] +path = "$APP/" + +# Sets Section +# This section combines the scope elements with enablement of commands + +[[set]] +identifier = "allow-app-read-recursive" +description = "This allows full recursive read access to the complete `$APP` folder, files and subdirectories." +permissions = [ + "read-all", + "scope-app-recursive" +] + +[[set]] +identifier = "allow-app-write-recursive" +description = "This allows full recusrive write access to the complete `$APP` folder, files and subdirectories." +permissions = [ + "write-all", + "scope-app-recursive" +] + +[[set]] +identifier = "allow-app-read" +description = "This allows non-recursive read access to the `$APP` folder." +permissions = [ + "read-all", + "scope-app" +] + +[[set]] +identifier = "allow-app-write" +description = "This allows non-recursive write access to the `$APP` folder." +permissions = [ + "write-all", + "scope-app" +] + +[[set]] +identifier = "allow-app-meta-recursive" +description = "This allows read access to metadata of the `$APP` folder, including file listing and statistics." +permissions = [ + "read-meta", + "scope-app-recursive" +] + +[[set]] +identifier = "allow-app-meta" +description = "This allows read access to metadata of the `$APP` folder, including file listing and statistics." +permissions = [ + "read-meta", + "scope-app-index" +] \ No newline at end of file diff --git a/plugins/fs/permissions/autogenerated/base-directories/appcache.toml b/plugins/fs/permissions/autogenerated/base-directories/appcache.toml new file mode 100644 index 000000000..4deca0ff9 --- /dev/null +++ b/plugins/fs/permissions/autogenerated/base-directories/appcache.toml @@ -0,0 +1,78 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +# Scopes Section +# This section contains scopes, which define file level access + +[[permission]] +identifier = "scope-appcache-recursive" +description = "This scope recursive access to the complete `$APPCACHE` folder, including sub directories and files." + +[[permission.scope.allow]] +path = "$APPCACHE/**" + +[[permission]] +identifier = "scope-appcache" +description = "This scope permits access to all files and list content of top level directories in the `$APPCACHE`folder." + +[[permission.scope.allow]] +path = "$APPCACHE/*" + +[[permission]] +identifier = "scope-appcache-index" +description = "This scope permits to list all files and folders in the `$APPCACHE`folder." + +[[permission.scope.allow]] +path = "$APPCACHE/" + +# Sets Section +# This section combines the scope elements with enablement of commands + +[[set]] +identifier = "allow-appcache-read-recursive" +description = "This allows full recursive read access to the complete `$APPCACHE` folder, files and subdirectories." +permissions = [ + "read-all", + "scope-appcache-recursive" +] + +[[set]] +identifier = "allow-appcache-write-recursive" +description = "This allows full recusrive write access to the complete `$APPCACHE` folder, files and subdirectories." +permissions = [ + "write-all", + "scope-appcache-recursive" +] + +[[set]] +identifier = "allow-appcache-read" +description = "This allows non-recursive read access to the `$APPCACHE` folder." +permissions = [ + "read-all", + "scope-appcache" +] + +[[set]] +identifier = "allow-appcache-write" +description = "This allows non-recursive write access to the `$APPCACHE` folder." +permissions = [ + "write-all", + "scope-appcache" +] + +[[set]] +identifier = "allow-appcache-meta-recursive" +description = "This allows read access to metadata of the `$APPCACHE` folder, including file listing and statistics." +permissions = [ + "read-meta", + "scope-appcache-recursive" +] + +[[set]] +identifier = "allow-appcache-meta" +description = "This allows read access to metadata of the `$APPCACHE` folder, including file listing and statistics." +permissions = [ + "read-meta", + "scope-appcache-index" +] \ No newline at end of file diff --git a/plugins/fs/permissions/autogenerated/base-directories/appconfig.toml b/plugins/fs/permissions/autogenerated/base-directories/appconfig.toml new file mode 100644 index 000000000..e87229a75 --- /dev/null +++ b/plugins/fs/permissions/autogenerated/base-directories/appconfig.toml @@ -0,0 +1,78 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +# Scopes Section +# This section contains scopes, which define file level access + +[[permission]] +identifier = "scope-appconfig-recursive" +description = "This scope recursive access to the complete `$APPCONFIG` folder, including sub directories and files." + +[[permission.scope.allow]] +path = "$APPCONFIG/**" + +[[permission]] +identifier = "scope-appconfig" +description = "This scope permits access to all files and list content of top level directories in the `$APPCONFIG`folder." + +[[permission.scope.allow]] +path = "$APPCONFIG/*" + +[[permission]] +identifier = "scope-appconfig-index" +description = "This scope permits to list all files and folders in the `$APPCONFIG`folder." + +[[permission.scope.allow]] +path = "$APPCONFIG/" + +# Sets Section +# This section combines the scope elements with enablement of commands + +[[set]] +identifier = "allow-appconfig-read-recursive" +description = "This allows full recursive read access to the complete `$APPCONFIG` folder, files and subdirectories." +permissions = [ + "read-all", + "scope-appconfig-recursive" +] + +[[set]] +identifier = "allow-appconfig-write-recursive" +description = "This allows full recusrive write access to the complete `$APPCONFIG` folder, files and subdirectories." +permissions = [ + "write-all", + "scope-appconfig-recursive" +] + +[[set]] +identifier = "allow-appconfig-read" +description = "This allows non-recursive read access to the `$APPCONFIG` folder." +permissions = [ + "read-all", + "scope-appconfig" +] + +[[set]] +identifier = "allow-appconfig-write" +description = "This allows non-recursive write access to the `$APPCONFIG` folder." +permissions = [ + "write-all", + "scope-appconfig" +] + +[[set]] +identifier = "allow-appconfig-meta-recursive" +description = "This allows read access to metadata of the `$APPCONFIG` folder, including file listing and statistics." +permissions = [ + "read-meta", + "scope-appconfig-recursive" +] + +[[set]] +identifier = "allow-appconfig-meta" +description = "This allows read access to metadata of the `$APPCONFIG` folder, including file listing and statistics." +permissions = [ + "read-meta", + "scope-appconfig-index" +] \ No newline at end of file diff --git a/plugins/fs/permissions/autogenerated/base-directories/appdata.toml b/plugins/fs/permissions/autogenerated/base-directories/appdata.toml new file mode 100644 index 000000000..fc080b3ae --- /dev/null +++ b/plugins/fs/permissions/autogenerated/base-directories/appdata.toml @@ -0,0 +1,78 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +# Scopes Section +# This section contains scopes, which define file level access + +[[permission]] +identifier = "scope-appdata-recursive" +description = "This scope recursive access to the complete `$APPDATA` folder, including sub directories and files." + +[[permission.scope.allow]] +path = "$APPDATA/**" + +[[permission]] +identifier = "scope-appdata" +description = "This scope permits access to all files and list content of top level directories in the `$APPDATA`folder." + +[[permission.scope.allow]] +path = "$APPDATA/*" + +[[permission]] +identifier = "scope-appdata-index" +description = "This scope permits to list all files and folders in the `$APPDATA`folder." + +[[permission.scope.allow]] +path = "$APPDATA/" + +# Sets Section +# This section combines the scope elements with enablement of commands + +[[set]] +identifier = "allow-appdata-read-recursive" +description = "This allows full recursive read access to the complete `$APPDATA` folder, files and subdirectories." +permissions = [ + "read-all", + "scope-appdata-recursive" +] + +[[set]] +identifier = "allow-appdata-write-recursive" +description = "This allows full recusrive write access to the complete `$APPDATA` folder, files and subdirectories." +permissions = [ + "write-all", + "scope-appdata-recursive" +] + +[[set]] +identifier = "allow-appdata-read" +description = "This allows non-recursive read access to the `$APPDATA` folder." +permissions = [ + "read-all", + "scope-appdata" +] + +[[set]] +identifier = "allow-appdata-write" +description = "This allows non-recursive write access to the `$APPDATA` folder." +permissions = [ + "write-all", + "scope-appdata" +] + +[[set]] +identifier = "allow-appdata-meta-recursive" +description = "This allows read access to metadata of the `$APPDATA` folder, including file listing and statistics." +permissions = [ + "read-meta", + "scope-appdata-recursive" +] + +[[set]] +identifier = "allow-appdata-meta" +description = "This allows read access to metadata of the `$APPDATA` folder, including file listing and statistics." +permissions = [ + "read-meta", + "scope-appdata-index" +] \ No newline at end of file diff --git a/plugins/fs/permissions/autogenerated/base-directories/applocaldata.toml b/plugins/fs/permissions/autogenerated/base-directories/applocaldata.toml new file mode 100644 index 000000000..f72202a23 --- /dev/null +++ b/plugins/fs/permissions/autogenerated/base-directories/applocaldata.toml @@ -0,0 +1,78 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +# Scopes Section +# This section contains scopes, which define file level access + +[[permission]] +identifier = "scope-applocaldata-recursive" +description = "This scope recursive access to the complete `$APPLOCALDATA` folder, including sub directories and files." + +[[permission.scope.allow]] +path = "$APPLOCALDATA/**" + +[[permission]] +identifier = "scope-applocaldata" +description = "This scope permits access to all files and list content of top level directories in the `$APPLOCALDATA`folder." + +[[permission.scope.allow]] +path = "$APPLOCALDATA/*" + +[[permission]] +identifier = "scope-applocaldata-index" +description = "This scope permits to list all files and folders in the `$APPLOCALDATA`folder." + +[[permission.scope.allow]] +path = "$APPLOCALDATA/" + +# Sets Section +# This section combines the scope elements with enablement of commands + +[[set]] +identifier = "allow-applocaldata-read-recursive" +description = "This allows full recursive read access to the complete `$APPLOCALDATA` folder, files and subdirectories." +permissions = [ + "read-all", + "scope-applocaldata-recursive" +] + +[[set]] +identifier = "allow-applocaldata-write-recursive" +description = "This allows full recusrive write access to the complete `$APPLOCALDATA` folder, files and subdirectories." +permissions = [ + "write-all", + "scope-applocaldata-recursive" +] + +[[set]] +identifier = "allow-applocaldata-read" +description = "This allows non-recursive read access to the `$APPLOCALDATA` folder." +permissions = [ + "read-all", + "scope-applocaldata" +] + +[[set]] +identifier = "allow-applocaldata-write" +description = "This allows non-recursive write access to the `$APPLOCALDATA` folder." +permissions = [ + "write-all", + "scope-applocaldata" +] + +[[set]] +identifier = "allow-applocaldata-meta-recursive" +description = "This allows read access to metadata of the `$APPLOCALDATA` folder, including file listing and statistics." +permissions = [ + "read-meta", + "scope-applocaldata-recursive" +] + +[[set]] +identifier = "allow-applocaldata-meta" +description = "This allows read access to metadata of the `$APPLOCALDATA` folder, including file listing and statistics." +permissions = [ + "read-meta", + "scope-applocaldata-index" +] \ No newline at end of file diff --git a/plugins/fs/permissions/autogenerated/base-directories/applog.toml b/plugins/fs/permissions/autogenerated/base-directories/applog.toml new file mode 100644 index 000000000..e345bef85 --- /dev/null +++ b/plugins/fs/permissions/autogenerated/base-directories/applog.toml @@ -0,0 +1,78 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +# Scopes Section +# This section contains scopes, which define file level access + +[[permission]] +identifier = "scope-applog-recursive" +description = "This scope recursive access to the complete `$APPLOG` folder, including sub directories and files." + +[[permission.scope.allow]] +path = "$APPLOG/**" + +[[permission]] +identifier = "scope-applog" +description = "This scope permits access to all files and list content of top level directories in the `$APPLOG`folder." + +[[permission.scope.allow]] +path = "$APPLOG/*" + +[[permission]] +identifier = "scope-applog-index" +description = "This scope permits to list all files and folders in the `$APPLOG`folder." + +[[permission.scope.allow]] +path = "$APPLOG/" + +# Sets Section +# This section combines the scope elements with enablement of commands + +[[set]] +identifier = "allow-applog-read-recursive" +description = "This allows full recursive read access to the complete `$APPLOG` folder, files and subdirectories." +permissions = [ + "read-all", + "scope-applog-recursive" +] + +[[set]] +identifier = "allow-applog-write-recursive" +description = "This allows full recusrive write access to the complete `$APPLOG` folder, files and subdirectories." +permissions = [ + "write-all", + "scope-applog-recursive" +] + +[[set]] +identifier = "allow-applog-read" +description = "This allows non-recursive read access to the `$APPLOG` folder." +permissions = [ + "read-all", + "scope-applog" +] + +[[set]] +identifier = "allow-applog-write" +description = "This allows non-recursive write access to the `$APPLOG` folder." +permissions = [ + "write-all", + "scope-applog" +] + +[[set]] +identifier = "allow-applog-meta-recursive" +description = "This allows read access to metadata of the `$APPLOG` folder, including file listing and statistics." +permissions = [ + "read-meta", + "scope-applog-recursive" +] + +[[set]] +identifier = "allow-applog-meta" +description = "This allows read access to metadata of the `$APPLOG` folder, including file listing and statistics." +permissions = [ + "read-meta", + "scope-applog-index" +] \ No newline at end of file diff --git a/plugins/fs/permissions/autogenerated/base-directories/audio.toml b/plugins/fs/permissions/autogenerated/base-directories/audio.toml new file mode 100644 index 000000000..adb15d935 --- /dev/null +++ b/plugins/fs/permissions/autogenerated/base-directories/audio.toml @@ -0,0 +1,78 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +# Scopes Section +# This section contains scopes, which define file level access + +[[permission]] +identifier = "scope-audio-recursive" +description = "This scope recursive access to the complete `$AUDIO` folder, including sub directories and files." + +[[permission.scope.allow]] +path = "$AUDIO/**" + +[[permission]] +identifier = "scope-audio" +description = "This scope permits access to all files and list content of top level directories in the `$AUDIO`folder." + +[[permission.scope.allow]] +path = "$AUDIO/*" + +[[permission]] +identifier = "scope-audio-index" +description = "This scope permits to list all files and folders in the `$AUDIO`folder." + +[[permission.scope.allow]] +path = "$AUDIO/" + +# Sets Section +# This section combines the scope elements with enablement of commands + +[[set]] +identifier = "allow-audio-read-recursive" +description = "This allows full recursive read access to the complete `$AUDIO` folder, files and subdirectories." +permissions = [ + "read-all", + "scope-audio-recursive" +] + +[[set]] +identifier = "allow-audio-write-recursive" +description = "This allows full recusrive write access to the complete `$AUDIO` folder, files and subdirectories." +permissions = [ + "write-all", + "scope-audio-recursive" +] + +[[set]] +identifier = "allow-audio-read" +description = "This allows non-recursive read access to the `$AUDIO` folder." +permissions = [ + "read-all", + "scope-audio" +] + +[[set]] +identifier = "allow-audio-write" +description = "This allows non-recursive write access to the `$AUDIO` folder." +permissions = [ + "write-all", + "scope-audio" +] + +[[set]] +identifier = "allow-audio-meta-recursive" +description = "This allows read access to metadata of the `$AUDIO` folder, including file listing and statistics." +permissions = [ + "read-meta", + "scope-audio-recursive" +] + +[[set]] +identifier = "allow-audio-meta" +description = "This allows read access to metadata of the `$AUDIO` folder, including file listing and statistics." +permissions = [ + "read-meta", + "scope-audio-index" +] \ No newline at end of file diff --git a/plugins/fs/permissions/autogenerated/base-directories/cache.toml b/plugins/fs/permissions/autogenerated/base-directories/cache.toml new file mode 100644 index 000000000..b9831a77e --- /dev/null +++ b/plugins/fs/permissions/autogenerated/base-directories/cache.toml @@ -0,0 +1,78 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +# Scopes Section +# This section contains scopes, which define file level access + +[[permission]] +identifier = "scope-cache-recursive" +description = "This scope recursive access to the complete `$CACHE` folder, including sub directories and files." + +[[permission.scope.allow]] +path = "$CACHE/**" + +[[permission]] +identifier = "scope-cache" +description = "This scope permits access to all files and list content of top level directories in the `$CACHE`folder." + +[[permission.scope.allow]] +path = "$CACHE/*" + +[[permission]] +identifier = "scope-cache-index" +description = "This scope permits to list all files and folders in the `$CACHE`folder." + +[[permission.scope.allow]] +path = "$CACHE/" + +# Sets Section +# This section combines the scope elements with enablement of commands + +[[set]] +identifier = "allow-cache-read-recursive" +description = "This allows full recursive read access to the complete `$CACHE` folder, files and subdirectories." +permissions = [ + "read-all", + "scope-cache-recursive" +] + +[[set]] +identifier = "allow-cache-write-recursive" +description = "This allows full recusrive write access to the complete `$CACHE` folder, files and subdirectories." +permissions = [ + "write-all", + "scope-cache-recursive" +] + +[[set]] +identifier = "allow-cache-read" +description = "This allows non-recursive read access to the `$CACHE` folder." +permissions = [ + "read-all", + "scope-cache" +] + +[[set]] +identifier = "allow-cache-write" +description = "This allows non-recursive write access to the `$CACHE` folder." +permissions = [ + "write-all", + "scope-cache" +] + +[[set]] +identifier = "allow-cache-meta-recursive" +description = "This allows read access to metadata of the `$CACHE` folder, including file listing and statistics." +permissions = [ + "read-meta", + "scope-cache-recursive" +] + +[[set]] +identifier = "allow-cache-meta" +description = "This allows read access to metadata of the `$CACHE` folder, including file listing and statistics." +permissions = [ + "read-meta", + "scope-cache-index" +] \ No newline at end of file diff --git a/plugins/fs/permissions/autogenerated/base-directories/config.toml b/plugins/fs/permissions/autogenerated/base-directories/config.toml new file mode 100644 index 000000000..6ad6d4b1b --- /dev/null +++ b/plugins/fs/permissions/autogenerated/base-directories/config.toml @@ -0,0 +1,78 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +# Scopes Section +# This section contains scopes, which define file level access + +[[permission]] +identifier = "scope-config-recursive" +description = "This scope recursive access to the complete `$CONFIG` folder, including sub directories and files." + +[[permission.scope.allow]] +path = "$CONFIG/**" + +[[permission]] +identifier = "scope-config" +description = "This scope permits access to all files and list content of top level directories in the `$CONFIG`folder." + +[[permission.scope.allow]] +path = "$CONFIG/*" + +[[permission]] +identifier = "scope-config-index" +description = "This scope permits to list all files and folders in the `$CONFIG`folder." + +[[permission.scope.allow]] +path = "$CONFIG/" + +# Sets Section +# This section combines the scope elements with enablement of commands + +[[set]] +identifier = "allow-config-read-recursive" +description = "This allows full recursive read access to the complete `$CONFIG` folder, files and subdirectories." +permissions = [ + "read-all", + "scope-config-recursive" +] + +[[set]] +identifier = "allow-config-write-recursive" +description = "This allows full recusrive write access to the complete `$CONFIG` folder, files and subdirectories." +permissions = [ + "write-all", + "scope-config-recursive" +] + +[[set]] +identifier = "allow-config-read" +description = "This allows non-recursive read access to the `$CONFIG` folder." +permissions = [ + "read-all", + "scope-config" +] + +[[set]] +identifier = "allow-config-write" +description = "This allows non-recursive write access to the `$CONFIG` folder." +permissions = [ + "write-all", + "scope-config" +] + +[[set]] +identifier = "allow-config-meta-recursive" +description = "This allows read access to metadata of the `$CONFIG` folder, including file listing and statistics." +permissions = [ + "read-meta", + "scope-config-recursive" +] + +[[set]] +identifier = "allow-config-meta" +description = "This allows read access to metadata of the `$CONFIG` folder, including file listing and statistics." +permissions = [ + "read-meta", + "scope-config-index" +] \ No newline at end of file diff --git a/plugins/fs/permissions/autogenerated/base-directories/data.toml b/plugins/fs/permissions/autogenerated/base-directories/data.toml new file mode 100644 index 000000000..d30423ddf --- /dev/null +++ b/plugins/fs/permissions/autogenerated/base-directories/data.toml @@ -0,0 +1,78 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +# Scopes Section +# This section contains scopes, which define file level access + +[[permission]] +identifier = "scope-data-recursive" +description = "This scope recursive access to the complete `$DATA` folder, including sub directories and files." + +[[permission.scope.allow]] +path = "$DATA/**" + +[[permission]] +identifier = "scope-data" +description = "This scope permits access to all files and list content of top level directories in the `$DATA`folder." + +[[permission.scope.allow]] +path = "$DATA/*" + +[[permission]] +identifier = "scope-data-index" +description = "This scope permits to list all files and folders in the `$DATA`folder." + +[[permission.scope.allow]] +path = "$DATA/" + +# Sets Section +# This section combines the scope elements with enablement of commands + +[[set]] +identifier = "allow-data-read-recursive" +description = "This allows full recursive read access to the complete `$DATA` folder, files and subdirectories." +permissions = [ + "read-all", + "scope-data-recursive" +] + +[[set]] +identifier = "allow-data-write-recursive" +description = "This allows full recusrive write access to the complete `$DATA` folder, files and subdirectories." +permissions = [ + "write-all", + "scope-data-recursive" +] + +[[set]] +identifier = "allow-data-read" +description = "This allows non-recursive read access to the `$DATA` folder." +permissions = [ + "read-all", + "scope-data" +] + +[[set]] +identifier = "allow-data-write" +description = "This allows non-recursive write access to the `$DATA` folder." +permissions = [ + "write-all", + "scope-data" +] + +[[set]] +identifier = "allow-data-meta-recursive" +description = "This allows read access to metadata of the `$DATA` folder, including file listing and statistics." +permissions = [ + "read-meta", + "scope-data-recursive" +] + +[[set]] +identifier = "allow-data-meta" +description = "This allows read access to metadata of the `$DATA` folder, including file listing and statistics." +permissions = [ + "read-meta", + "scope-data-index" +] \ No newline at end of file diff --git a/plugins/fs/permissions/autogenerated/base-directories/desktop.toml b/plugins/fs/permissions/autogenerated/base-directories/desktop.toml new file mode 100644 index 000000000..4268eb24a --- /dev/null +++ b/plugins/fs/permissions/autogenerated/base-directories/desktop.toml @@ -0,0 +1,78 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +# Scopes Section +# This section contains scopes, which define file level access + +[[permission]] +identifier = "scope-desktop-recursive" +description = "This scope recursive access to the complete `$DESKTOP` folder, including sub directories and files." + +[[permission.scope.allow]] +path = "$DESKTOP/**" + +[[permission]] +identifier = "scope-desktop" +description = "This scope permits access to all files and list content of top level directories in the `$DESKTOP`folder." + +[[permission.scope.allow]] +path = "$DESKTOP/*" + +[[permission]] +identifier = "scope-desktop-index" +description = "This scope permits to list all files and folders in the `$DESKTOP`folder." + +[[permission.scope.allow]] +path = "$DESKTOP/" + +# Sets Section +# This section combines the scope elements with enablement of commands + +[[set]] +identifier = "allow-desktop-read-recursive" +description = "This allows full recursive read access to the complete `$DESKTOP` folder, files and subdirectories." +permissions = [ + "read-all", + "scope-desktop-recursive" +] + +[[set]] +identifier = "allow-desktop-write-recursive" +description = "This allows full recusrive write access to the complete `$DESKTOP` folder, files and subdirectories." +permissions = [ + "write-all", + "scope-desktop-recursive" +] + +[[set]] +identifier = "allow-desktop-read" +description = "This allows non-recursive read access to the `$DESKTOP` folder." +permissions = [ + "read-all", + "scope-desktop" +] + +[[set]] +identifier = "allow-desktop-write" +description = "This allows non-recursive write access to the `$DESKTOP` folder." +permissions = [ + "write-all", + "scope-desktop" +] + +[[set]] +identifier = "allow-desktop-meta-recursive" +description = "This allows read access to metadata of the `$DESKTOP` folder, including file listing and statistics." +permissions = [ + "read-meta", + "scope-desktop-recursive" +] + +[[set]] +identifier = "allow-desktop-meta" +description = "This allows read access to metadata of the `$DESKTOP` folder, including file listing and statistics." +permissions = [ + "read-meta", + "scope-desktop-index" +] \ No newline at end of file diff --git a/plugins/fs/permissions/autogenerated/base-directories/document.toml b/plugins/fs/permissions/autogenerated/base-directories/document.toml new file mode 100644 index 000000000..668286dba --- /dev/null +++ b/plugins/fs/permissions/autogenerated/base-directories/document.toml @@ -0,0 +1,78 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +# Scopes Section +# This section contains scopes, which define file level access + +[[permission]] +identifier = "scope-document-recursive" +description = "This scope recursive access to the complete `$DOCUMENT` folder, including sub directories and files." + +[[permission.scope.allow]] +path = "$DOCUMENT/**" + +[[permission]] +identifier = "scope-document" +description = "This scope permits access to all files and list content of top level directories in the `$DOCUMENT`folder." + +[[permission.scope.allow]] +path = "$DOCUMENT/*" + +[[permission]] +identifier = "scope-document-index" +description = "This scope permits to list all files and folders in the `$DOCUMENT`folder." + +[[permission.scope.allow]] +path = "$DOCUMENT/" + +# Sets Section +# This section combines the scope elements with enablement of commands + +[[set]] +identifier = "allow-document-read-recursive" +description = "This allows full recursive read access to the complete `$DOCUMENT` folder, files and subdirectories." +permissions = [ + "read-all", + "scope-document-recursive" +] + +[[set]] +identifier = "allow-document-write-recursive" +description = "This allows full recusrive write access to the complete `$DOCUMENT` folder, files and subdirectories." +permissions = [ + "write-all", + "scope-document-recursive" +] + +[[set]] +identifier = "allow-document-read" +description = "This allows non-recursive read access to the `$DOCUMENT` folder." +permissions = [ + "read-all", + "scope-document" +] + +[[set]] +identifier = "allow-document-write" +description = "This allows non-recursive write access to the `$DOCUMENT` folder." +permissions = [ + "write-all", + "scope-document" +] + +[[set]] +identifier = "allow-document-meta-recursive" +description = "This allows read access to metadata of the `$DOCUMENT` folder, including file listing and statistics." +permissions = [ + "read-meta", + "scope-document-recursive" +] + +[[set]] +identifier = "allow-document-meta" +description = "This allows read access to metadata of the `$DOCUMENT` folder, including file listing and statistics." +permissions = [ + "read-meta", + "scope-document-index" +] \ No newline at end of file diff --git a/plugins/fs/permissions/autogenerated/base-directories/download.toml b/plugins/fs/permissions/autogenerated/base-directories/download.toml new file mode 100644 index 000000000..b9ea94d22 --- /dev/null +++ b/plugins/fs/permissions/autogenerated/base-directories/download.toml @@ -0,0 +1,78 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +# Scopes Section +# This section contains scopes, which define file level access + +[[permission]] +identifier = "scope-download-recursive" +description = "This scope recursive access to the complete `$DOWNLOAD` folder, including sub directories and files." + +[[permission.scope.allow]] +path = "$DOWNLOAD/**" + +[[permission]] +identifier = "scope-download" +description = "This scope permits access to all files and list content of top level directories in the `$DOWNLOAD`folder." + +[[permission.scope.allow]] +path = "$DOWNLOAD/*" + +[[permission]] +identifier = "scope-download-index" +description = "This scope permits to list all files and folders in the `$DOWNLOAD`folder." + +[[permission.scope.allow]] +path = "$DOWNLOAD/" + +# Sets Section +# This section combines the scope elements with enablement of commands + +[[set]] +identifier = "allow-download-read-recursive" +description = "This allows full recursive read access to the complete `$DOWNLOAD` folder, files and subdirectories." +permissions = [ + "read-all", + "scope-download-recursive" +] + +[[set]] +identifier = "allow-download-write-recursive" +description = "This allows full recusrive write access to the complete `$DOWNLOAD` folder, files and subdirectories." +permissions = [ + "write-all", + "scope-download-recursive" +] + +[[set]] +identifier = "allow-download-read" +description = "This allows non-recursive read access to the `$DOWNLOAD` folder." +permissions = [ + "read-all", + "scope-download" +] + +[[set]] +identifier = "allow-download-write" +description = "This allows non-recursive write access to the `$DOWNLOAD` folder." +permissions = [ + "write-all", + "scope-download" +] + +[[set]] +identifier = "allow-download-meta-recursive" +description = "This allows read access to metadata of the `$DOWNLOAD` folder, including file listing and statistics." +permissions = [ + "read-meta", + "scope-download-recursive" +] + +[[set]] +identifier = "allow-download-meta" +description = "This allows read access to metadata of the `$DOWNLOAD` folder, including file listing and statistics." +permissions = [ + "read-meta", + "scope-download-index" +] \ No newline at end of file diff --git a/plugins/fs/permissions/autogenerated/base-directories/exe.toml b/plugins/fs/permissions/autogenerated/base-directories/exe.toml new file mode 100644 index 000000000..74da907a4 --- /dev/null +++ b/plugins/fs/permissions/autogenerated/base-directories/exe.toml @@ -0,0 +1,78 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +# Scopes Section +# This section contains scopes, which define file level access + +[[permission]] +identifier = "scope-exe-recursive" +description = "This scope recursive access to the complete `$EXE` folder, including sub directories and files." + +[[permission.scope.allow]] +path = "$EXE/**" + +[[permission]] +identifier = "scope-exe" +description = "This scope permits access to all files and list content of top level directories in the `$EXE`folder." + +[[permission.scope.allow]] +path = "$EXE/*" + +[[permission]] +identifier = "scope-exe-index" +description = "This scope permits to list all files and folders in the `$EXE`folder." + +[[permission.scope.allow]] +path = "$EXE/" + +# Sets Section +# This section combines the scope elements with enablement of commands + +[[set]] +identifier = "allow-exe-read-recursive" +description = "This allows full recursive read access to the complete `$EXE` folder, files and subdirectories." +permissions = [ + "read-all", + "scope-exe-recursive" +] + +[[set]] +identifier = "allow-exe-write-recursive" +description = "This allows full recusrive write access to the complete `$EXE` folder, files and subdirectories." +permissions = [ + "write-all", + "scope-exe-recursive" +] + +[[set]] +identifier = "allow-exe-read" +description = "This allows non-recursive read access to the `$EXE` folder." +permissions = [ + "read-all", + "scope-exe" +] + +[[set]] +identifier = "allow-exe-write" +description = "This allows non-recursive write access to the `$EXE` folder." +permissions = [ + "write-all", + "scope-exe" +] + +[[set]] +identifier = "allow-exe-meta-recursive" +description = "This allows read access to metadata of the `$EXE` folder, including file listing and statistics." +permissions = [ + "read-meta", + "scope-exe-recursive" +] + +[[set]] +identifier = "allow-exe-meta" +description = "This allows read access to metadata of the `$EXE` folder, including file listing and statistics." +permissions = [ + "read-meta", + "scope-exe-index" +] \ No newline at end of file diff --git a/plugins/fs/permissions/autogenerated/base-directories/font.toml b/plugins/fs/permissions/autogenerated/base-directories/font.toml new file mode 100644 index 000000000..13cfcc37a --- /dev/null +++ b/plugins/fs/permissions/autogenerated/base-directories/font.toml @@ -0,0 +1,78 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +# Scopes Section +# This section contains scopes, which define file level access + +[[permission]] +identifier = "scope-font-recursive" +description = "This scope recursive access to the complete `$FONT` folder, including sub directories and files." + +[[permission.scope.allow]] +path = "$FONT/**" + +[[permission]] +identifier = "scope-font" +description = "This scope permits access to all files and list content of top level directories in the `$FONT`folder." + +[[permission.scope.allow]] +path = "$FONT/*" + +[[permission]] +identifier = "scope-font-index" +description = "This scope permits to list all files and folders in the `$FONT`folder." + +[[permission.scope.allow]] +path = "$FONT/" + +# Sets Section +# This section combines the scope elements with enablement of commands + +[[set]] +identifier = "allow-font-read-recursive" +description = "This allows full recursive read access to the complete `$FONT` folder, files and subdirectories." +permissions = [ + "read-all", + "scope-font-recursive" +] + +[[set]] +identifier = "allow-font-write-recursive" +description = "This allows full recusrive write access to the complete `$FONT` folder, files and subdirectories." +permissions = [ + "write-all", + "scope-font-recursive" +] + +[[set]] +identifier = "allow-font-read" +description = "This allows non-recursive read access to the `$FONT` folder." +permissions = [ + "read-all", + "scope-font" +] + +[[set]] +identifier = "allow-font-write" +description = "This allows non-recursive write access to the `$FONT` folder." +permissions = [ + "write-all", + "scope-font" +] + +[[set]] +identifier = "allow-font-meta-recursive" +description = "This allows read access to metadata of the `$FONT` folder, including file listing and statistics." +permissions = [ + "read-meta", + "scope-font-recursive" +] + +[[set]] +identifier = "allow-font-meta" +description = "This allows read access to metadata of the `$FONT` folder, including file listing and statistics." +permissions = [ + "read-meta", + "scope-font-index" +] \ No newline at end of file diff --git a/plugins/fs/permissions/autogenerated/base-directories/home.toml b/plugins/fs/permissions/autogenerated/base-directories/home.toml new file mode 100644 index 000000000..a48d5d763 --- /dev/null +++ b/plugins/fs/permissions/autogenerated/base-directories/home.toml @@ -0,0 +1,78 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +# Scopes Section +# This section contains scopes, which define file level access + +[[permission]] +identifier = "scope-home-recursive" +description = "This scope recursive access to the complete `$HOME` folder, including sub directories and files." + +[[permission.scope.allow]] +path = "$HOME/**" + +[[permission]] +identifier = "scope-home" +description = "This scope permits access to all files and list content of top level directories in the `$HOME`folder." + +[[permission.scope.allow]] +path = "$HOME/*" + +[[permission]] +identifier = "scope-home-index" +description = "This scope permits to list all files and folders in the `$HOME`folder." + +[[permission.scope.allow]] +path = "$HOME/" + +# Sets Section +# This section combines the scope elements with enablement of commands + +[[set]] +identifier = "allow-home-read-recursive" +description = "This allows full recursive read access to the complete `$HOME` folder, files and subdirectories." +permissions = [ + "read-all", + "scope-home-recursive" +] + +[[set]] +identifier = "allow-home-write-recursive" +description = "This allows full recusrive write access to the complete `$HOME` folder, files and subdirectories." +permissions = [ + "write-all", + "scope-home-recursive" +] + +[[set]] +identifier = "allow-home-read" +description = "This allows non-recursive read access to the `$HOME` folder." +permissions = [ + "read-all", + "scope-home" +] + +[[set]] +identifier = "allow-home-write" +description = "This allows non-recursive write access to the `$HOME` folder." +permissions = [ + "write-all", + "scope-home" +] + +[[set]] +identifier = "allow-home-meta-recursive" +description = "This allows read access to metadata of the `$HOME` folder, including file listing and statistics." +permissions = [ + "read-meta", + "scope-home-recursive" +] + +[[set]] +identifier = "allow-home-meta" +description = "This allows read access to metadata of the `$HOME` folder, including file listing and statistics." +permissions = [ + "read-meta", + "scope-home-index" +] \ No newline at end of file diff --git a/plugins/fs/permissions/autogenerated/base-directories/localdata.toml b/plugins/fs/permissions/autogenerated/base-directories/localdata.toml new file mode 100644 index 000000000..6d0633cf4 --- /dev/null +++ b/plugins/fs/permissions/autogenerated/base-directories/localdata.toml @@ -0,0 +1,78 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +# Scopes Section +# This section contains scopes, which define file level access + +[[permission]] +identifier = "scope-localdata-recursive" +description = "This scope recursive access to the complete `$LOCALDATA` folder, including sub directories and files." + +[[permission.scope.allow]] +path = "$LOCALDATA/**" + +[[permission]] +identifier = "scope-localdata" +description = "This scope permits access to all files and list content of top level directories in the `$LOCALDATA`folder." + +[[permission.scope.allow]] +path = "$LOCALDATA/*" + +[[permission]] +identifier = "scope-localdata-index" +description = "This scope permits to list all files and folders in the `$LOCALDATA`folder." + +[[permission.scope.allow]] +path = "$LOCALDATA/" + +# Sets Section +# This section combines the scope elements with enablement of commands + +[[set]] +identifier = "allow-localdata-read-recursive" +description = "This allows full recursive read access to the complete `$LOCALDATA` folder, files and subdirectories." +permissions = [ + "read-all", + "scope-localdata-recursive" +] + +[[set]] +identifier = "allow-localdata-write-recursive" +description = "This allows full recusrive write access to the complete `$LOCALDATA` folder, files and subdirectories." +permissions = [ + "write-all", + "scope-localdata-recursive" +] + +[[set]] +identifier = "allow-localdata-read" +description = "This allows non-recursive read access to the `$LOCALDATA` folder." +permissions = [ + "read-all", + "scope-localdata" +] + +[[set]] +identifier = "allow-localdata-write" +description = "This allows non-recursive write access to the `$LOCALDATA` folder." +permissions = [ + "write-all", + "scope-localdata" +] + +[[set]] +identifier = "allow-localdata-meta-recursive" +description = "This allows read access to metadata of the `$LOCALDATA` folder, including file listing and statistics." +permissions = [ + "read-meta", + "scope-localdata-recursive" +] + +[[set]] +identifier = "allow-localdata-meta" +description = "This allows read access to metadata of the `$LOCALDATA` folder, including file listing and statistics." +permissions = [ + "read-meta", + "scope-localdata-index" +] \ No newline at end of file diff --git a/plugins/fs/permissions/autogenerated/base-directories/log.toml b/plugins/fs/permissions/autogenerated/base-directories/log.toml new file mode 100644 index 000000000..81d476e64 --- /dev/null +++ b/plugins/fs/permissions/autogenerated/base-directories/log.toml @@ -0,0 +1,78 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +# Scopes Section +# This section contains scopes, which define file level access + +[[permission]] +identifier = "scope-log-recursive" +description = "This scope recursive access to the complete `$LOG` folder, including sub directories and files." + +[[permission.scope.allow]] +path = "$LOG/**" + +[[permission]] +identifier = "scope-log" +description = "This scope permits access to all files and list content of top level directories in the `$LOG`folder." + +[[permission.scope.allow]] +path = "$LOG/*" + +[[permission]] +identifier = "scope-log-index" +description = "This scope permits to list all files and folders in the `$LOG`folder." + +[[permission.scope.allow]] +path = "$LOG/" + +# Sets Section +# This section combines the scope elements with enablement of commands + +[[set]] +identifier = "allow-log-read-recursive" +description = "This allows full recursive read access to the complete `$LOG` folder, files and subdirectories." +permissions = [ + "read-all", + "scope-log-recursive" +] + +[[set]] +identifier = "allow-log-write-recursive" +description = "This allows full recusrive write access to the complete `$LOG` folder, files and subdirectories." +permissions = [ + "write-all", + "scope-log-recursive" +] + +[[set]] +identifier = "allow-log-read" +description = "This allows non-recursive read access to the `$LOG` folder." +permissions = [ + "read-all", + "scope-log" +] + +[[set]] +identifier = "allow-log-write" +description = "This allows non-recursive write access to the `$LOG` folder." +permissions = [ + "write-all", + "scope-log" +] + +[[set]] +identifier = "allow-log-meta-recursive" +description = "This allows read access to metadata of the `$LOG` folder, including file listing and statistics." +permissions = [ + "read-meta", + "scope-log-recursive" +] + +[[set]] +identifier = "allow-log-meta" +description = "This allows read access to metadata of the `$LOG` folder, including file listing and statistics." +permissions = [ + "read-meta", + "scope-log-index" +] \ No newline at end of file diff --git a/plugins/fs/permissions/autogenerated/base-directories/picture.toml b/plugins/fs/permissions/autogenerated/base-directories/picture.toml new file mode 100644 index 000000000..5b6c361c2 --- /dev/null +++ b/plugins/fs/permissions/autogenerated/base-directories/picture.toml @@ -0,0 +1,78 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +# Scopes Section +# This section contains scopes, which define file level access + +[[permission]] +identifier = "scope-picture-recursive" +description = "This scope recursive access to the complete `$PICTURE` folder, including sub directories and files." + +[[permission.scope.allow]] +path = "$PICTURE/**" + +[[permission]] +identifier = "scope-picture" +description = "This scope permits access to all files and list content of top level directories in the `$PICTURE`folder." + +[[permission.scope.allow]] +path = "$PICTURE/*" + +[[permission]] +identifier = "scope-picture-index" +description = "This scope permits to list all files and folders in the `$PICTURE`folder." + +[[permission.scope.allow]] +path = "$PICTURE/" + +# Sets Section +# This section combines the scope elements with enablement of commands + +[[set]] +identifier = "allow-picture-read-recursive" +description = "This allows full recursive read access to the complete `$PICTURE` folder, files and subdirectories." +permissions = [ + "read-all", + "scope-picture-recursive" +] + +[[set]] +identifier = "allow-picture-write-recursive" +description = "This allows full recusrive write access to the complete `$PICTURE` folder, files and subdirectories." +permissions = [ + "write-all", + "scope-picture-recursive" +] + +[[set]] +identifier = "allow-picture-read" +description = "This allows non-recursive read access to the `$PICTURE` folder." +permissions = [ + "read-all", + "scope-picture" +] + +[[set]] +identifier = "allow-picture-write" +description = "This allows non-recursive write access to the `$PICTURE` folder." +permissions = [ + "write-all", + "scope-picture" +] + +[[set]] +identifier = "allow-picture-meta-recursive" +description = "This allows read access to metadata of the `$PICTURE` folder, including file listing and statistics." +permissions = [ + "read-meta", + "scope-picture-recursive" +] + +[[set]] +identifier = "allow-picture-meta" +description = "This allows read access to metadata of the `$PICTURE` folder, including file listing and statistics." +permissions = [ + "read-meta", + "scope-picture-index" +] \ No newline at end of file diff --git a/plugins/fs/permissions/autogenerated/base-directories/public.toml b/plugins/fs/permissions/autogenerated/base-directories/public.toml new file mode 100644 index 000000000..56e65f94f --- /dev/null +++ b/plugins/fs/permissions/autogenerated/base-directories/public.toml @@ -0,0 +1,78 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +# Scopes Section +# This section contains scopes, which define file level access + +[[permission]] +identifier = "scope-public-recursive" +description = "This scope recursive access to the complete `$PUBLIC` folder, including sub directories and files." + +[[permission.scope.allow]] +path = "$PUBLIC/**" + +[[permission]] +identifier = "scope-public" +description = "This scope permits access to all files and list content of top level directories in the `$PUBLIC`folder." + +[[permission.scope.allow]] +path = "$PUBLIC/*" + +[[permission]] +identifier = "scope-public-index" +description = "This scope permits to list all files and folders in the `$PUBLIC`folder." + +[[permission.scope.allow]] +path = "$PUBLIC/" + +# Sets Section +# This section combines the scope elements with enablement of commands + +[[set]] +identifier = "allow-public-read-recursive" +description = "This allows full recursive read access to the complete `$PUBLIC` folder, files and subdirectories." +permissions = [ + "read-all", + "scope-public-recursive" +] + +[[set]] +identifier = "allow-public-write-recursive" +description = "This allows full recusrive write access to the complete `$PUBLIC` folder, files and subdirectories." +permissions = [ + "write-all", + "scope-public-recursive" +] + +[[set]] +identifier = "allow-public-read" +description = "This allows non-recursive read access to the `$PUBLIC` folder." +permissions = [ + "read-all", + "scope-public" +] + +[[set]] +identifier = "allow-public-write" +description = "This allows non-recursive write access to the `$PUBLIC` folder." +permissions = [ + "write-all", + "scope-public" +] + +[[set]] +identifier = "allow-public-meta-recursive" +description = "This allows read access to metadata of the `$PUBLIC` folder, including file listing and statistics." +permissions = [ + "read-meta", + "scope-public-recursive" +] + +[[set]] +identifier = "allow-public-meta" +description = "This allows read access to metadata of the `$PUBLIC` folder, including file listing and statistics." +permissions = [ + "read-meta", + "scope-public-index" +] \ No newline at end of file diff --git a/plugins/fs/permissions/autogenerated/base-directories/resource.toml b/plugins/fs/permissions/autogenerated/base-directories/resource.toml new file mode 100644 index 000000000..05dd1a5eb --- /dev/null +++ b/plugins/fs/permissions/autogenerated/base-directories/resource.toml @@ -0,0 +1,78 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +# Scopes Section +# This section contains scopes, which define file level access + +[[permission]] +identifier = "scope-resource-recursive" +description = "This scope recursive access to the complete `$RESOURCE` folder, including sub directories and files." + +[[permission.scope.allow]] +path = "$RESOURCE/**" + +[[permission]] +identifier = "scope-resource" +description = "This scope permits access to all files and list content of top level directories in the `$RESOURCE`folder." + +[[permission.scope.allow]] +path = "$RESOURCE/*" + +[[permission]] +identifier = "scope-resource-index" +description = "This scope permits to list all files and folders in the `$RESOURCE`folder." + +[[permission.scope.allow]] +path = "$RESOURCE/" + +# Sets Section +# This section combines the scope elements with enablement of commands + +[[set]] +identifier = "allow-resource-read-recursive" +description = "This allows full recursive read access to the complete `$RESOURCE` folder, files and subdirectories." +permissions = [ + "read-all", + "scope-resource-recursive" +] + +[[set]] +identifier = "allow-resource-write-recursive" +description = "This allows full recusrive write access to the complete `$RESOURCE` folder, files and subdirectories." +permissions = [ + "write-all", + "scope-resource-recursive" +] + +[[set]] +identifier = "allow-resource-read" +description = "This allows non-recursive read access to the `$RESOURCE` folder." +permissions = [ + "read-all", + "scope-resource" +] + +[[set]] +identifier = "allow-resource-write" +description = "This allows non-recursive write access to the `$RESOURCE` folder." +permissions = [ + "write-all", + "scope-resource" +] + +[[set]] +identifier = "allow-resource-meta-recursive" +description = "This allows read access to metadata of the `$RESOURCE` folder, including file listing and statistics." +permissions = [ + "read-meta", + "scope-resource-recursive" +] + +[[set]] +identifier = "allow-resource-meta" +description = "This allows read access to metadata of the `$RESOURCE` folder, including file listing and statistics." +permissions = [ + "read-meta", + "scope-resource-index" +] \ No newline at end of file diff --git a/plugins/fs/permissions/autogenerated/base-directories/runtime.toml b/plugins/fs/permissions/autogenerated/base-directories/runtime.toml new file mode 100644 index 000000000..50569412b --- /dev/null +++ b/plugins/fs/permissions/autogenerated/base-directories/runtime.toml @@ -0,0 +1,78 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +# Scopes Section +# This section contains scopes, which define file level access + +[[permission]] +identifier = "scope-runtime-recursive" +description = "This scope recursive access to the complete `$RUNTIME` folder, including sub directories and files." + +[[permission.scope.allow]] +path = "$RUNTIME/**" + +[[permission]] +identifier = "scope-runtime" +description = "This scope permits access to all files and list content of top level directories in the `$RUNTIME`folder." + +[[permission.scope.allow]] +path = "$RUNTIME/*" + +[[permission]] +identifier = "scope-runtime-index" +description = "This scope permits to list all files and folders in the `$RUNTIME`folder." + +[[permission.scope.allow]] +path = "$RUNTIME/" + +# Sets Section +# This section combines the scope elements with enablement of commands + +[[set]] +identifier = "allow-runtime-read-recursive" +description = "This allows full recursive read access to the complete `$RUNTIME` folder, files and subdirectories." +permissions = [ + "read-all", + "scope-runtime-recursive" +] + +[[set]] +identifier = "allow-runtime-write-recursive" +description = "This allows full recusrive write access to the complete `$RUNTIME` folder, files and subdirectories." +permissions = [ + "write-all", + "scope-runtime-recursive" +] + +[[set]] +identifier = "allow-runtime-read" +description = "This allows non-recursive read access to the `$RUNTIME` folder." +permissions = [ + "read-all", + "scope-runtime" +] + +[[set]] +identifier = "allow-runtime-write" +description = "This allows non-recursive write access to the `$RUNTIME` folder." +permissions = [ + "write-all", + "scope-runtime" +] + +[[set]] +identifier = "allow-runtime-meta-recursive" +description = "This allows read access to metadata of the `$RUNTIME` folder, including file listing and statistics." +permissions = [ + "read-meta", + "scope-runtime-recursive" +] + +[[set]] +identifier = "allow-runtime-meta" +description = "This allows read access to metadata of the `$RUNTIME` folder, including file listing and statistics." +permissions = [ + "read-meta", + "scope-runtime-index" +] \ No newline at end of file diff --git a/plugins/fs/permissions/autogenerated/base-directories/temp.toml b/plugins/fs/permissions/autogenerated/base-directories/temp.toml new file mode 100644 index 000000000..9e359e953 --- /dev/null +++ b/plugins/fs/permissions/autogenerated/base-directories/temp.toml @@ -0,0 +1,78 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +# Scopes Section +# This section contains scopes, which define file level access + +[[permission]] +identifier = "scope-temp-recursive" +description = "This scope recursive access to the complete `$TEMP` folder, including sub directories and files." + +[[permission.scope.allow]] +path = "$TEMP/**" + +[[permission]] +identifier = "scope-temp" +description = "This scope permits access to all files and list content of top level directories in the `$TEMP`folder." + +[[permission.scope.allow]] +path = "$TEMP/*" + +[[permission]] +identifier = "scope-temp-index" +description = "This scope permits to list all files and folders in the `$TEMP`folder." + +[[permission.scope.allow]] +path = "$TEMP/" + +# Sets Section +# This section combines the scope elements with enablement of commands + +[[set]] +identifier = "allow-temp-read-recursive" +description = "This allows full recursive read access to the complete `$TEMP` folder, files and subdirectories." +permissions = [ + "read-all", + "scope-temp-recursive" +] + +[[set]] +identifier = "allow-temp-write-recursive" +description = "This allows full recusrive write access to the complete `$TEMP` folder, files and subdirectories." +permissions = [ + "write-all", + "scope-temp-recursive" +] + +[[set]] +identifier = "allow-temp-read" +description = "This allows non-recursive read access to the `$TEMP` folder." +permissions = [ + "read-all", + "scope-temp" +] + +[[set]] +identifier = "allow-temp-write" +description = "This allows non-recursive write access to the `$TEMP` folder." +permissions = [ + "write-all", + "scope-temp" +] + +[[set]] +identifier = "allow-temp-meta-recursive" +description = "This allows read access to metadata of the `$TEMP` folder, including file listing and statistics." +permissions = [ + "read-meta", + "scope-temp-recursive" +] + +[[set]] +identifier = "allow-temp-meta" +description = "This allows read access to metadata of the `$TEMP` folder, including file listing and statistics." +permissions = [ + "read-meta", + "scope-temp-index" +] \ No newline at end of file diff --git a/plugins/fs/permissions/autogenerated/base-directories/template.toml b/plugins/fs/permissions/autogenerated/base-directories/template.toml new file mode 100644 index 000000000..73e6262fe --- /dev/null +++ b/plugins/fs/permissions/autogenerated/base-directories/template.toml @@ -0,0 +1,78 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +# Scopes Section +# This section contains scopes, which define file level access + +[[permission]] +identifier = "scope-template-recursive" +description = "This scope recursive access to the complete `$TEMPLATE` folder, including sub directories and files." + +[[permission.scope.allow]] +path = "$TEMPLATE/**" + +[[permission]] +identifier = "scope-template" +description = "This scope permits access to all files and list content of top level directories in the `$TEMPLATE`folder." + +[[permission.scope.allow]] +path = "$TEMPLATE/*" + +[[permission]] +identifier = "scope-template-index" +description = "This scope permits to list all files and folders in the `$TEMPLATE`folder." + +[[permission.scope.allow]] +path = "$TEMPLATE/" + +# Sets Section +# This section combines the scope elements with enablement of commands + +[[set]] +identifier = "allow-template-read-recursive" +description = "This allows full recursive read access to the complete `$TEMPLATE` folder, files and subdirectories." +permissions = [ + "read-all", + "scope-template-recursive" +] + +[[set]] +identifier = "allow-template-write-recursive" +description = "This allows full recusrive write access to the complete `$TEMPLATE` folder, files and subdirectories." +permissions = [ + "write-all", + "scope-template-recursive" +] + +[[set]] +identifier = "allow-template-read" +description = "This allows non-recursive read access to the `$TEMPLATE` folder." +permissions = [ + "read-all", + "scope-template" +] + +[[set]] +identifier = "allow-template-write" +description = "This allows non-recursive write access to the `$TEMPLATE` folder." +permissions = [ + "write-all", + "scope-template" +] + +[[set]] +identifier = "allow-template-meta-recursive" +description = "This allows read access to metadata of the `$TEMPLATE` folder, including file listing and statistics." +permissions = [ + "read-meta", + "scope-template-recursive" +] + +[[set]] +identifier = "allow-template-meta" +description = "This allows read access to metadata of the `$TEMPLATE` folder, including file listing and statistics." +permissions = [ + "read-meta", + "scope-template-index" +] \ No newline at end of file diff --git a/plugins/fs/permissions/autogenerated/base-directories/video.toml b/plugins/fs/permissions/autogenerated/base-directories/video.toml new file mode 100644 index 000000000..2b73c825b --- /dev/null +++ b/plugins/fs/permissions/autogenerated/base-directories/video.toml @@ -0,0 +1,78 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +# Scopes Section +# This section contains scopes, which define file level access + +[[permission]] +identifier = "scope-video-recursive" +description = "This scope recursive access to the complete `$VIDEO` folder, including sub directories and files." + +[[permission.scope.allow]] +path = "$VIDEO/**" + +[[permission]] +identifier = "scope-video" +description = "This scope permits access to all files and list content of top level directories in the `$VIDEO`folder." + +[[permission.scope.allow]] +path = "$VIDEO/*" + +[[permission]] +identifier = "scope-video-index" +description = "This scope permits to list all files and folders in the `$VIDEO`folder." + +[[permission.scope.allow]] +path = "$VIDEO/" + +# Sets Section +# This section combines the scope elements with enablement of commands + +[[set]] +identifier = "allow-video-read-recursive" +description = "This allows full recursive read access to the complete `$VIDEO` folder, files and subdirectories." +permissions = [ + "read-all", + "scope-video-recursive" +] + +[[set]] +identifier = "allow-video-write-recursive" +description = "This allows full recusrive write access to the complete `$VIDEO` folder, files and subdirectories." +permissions = [ + "write-all", + "scope-video-recursive" +] + +[[set]] +identifier = "allow-video-read" +description = "This allows non-recursive read access to the `$VIDEO` folder." +permissions = [ + "read-all", + "scope-video" +] + +[[set]] +identifier = "allow-video-write" +description = "This allows non-recursive write access to the `$VIDEO` folder." +permissions = [ + "write-all", + "scope-video" +] + +[[set]] +identifier = "allow-video-meta-recursive" +description = "This allows read access to metadata of the `$VIDEO` folder, including file listing and statistics." +permissions = [ + "read-meta", + "scope-video-recursive" +] + +[[set]] +identifier = "allow-video-meta" +description = "This allows read access to metadata of the `$VIDEO` folder, including file listing and statistics." +permissions = [ + "read-meta", + "scope-video-index" +] \ No newline at end of file diff --git a/plugins/fs/permissions/autogenerated/commands/copy_file.toml b/plugins/fs/permissions/autogenerated/commands/copy_file.toml new file mode 100644 index 000000000..61bedf9e2 --- /dev/null +++ b/plugins/fs/permissions/autogenerated/commands/copy_file.toml @@ -0,0 +1,13 @@ +# 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"] diff --git a/plugins/fs/permissions/autogenerated/commands/create.toml b/plugins/fs/permissions/autogenerated/commands/create.toml new file mode 100644 index 000000000..6646cc6ca --- /dev/null +++ b/plugins/fs/permissions/autogenerated/commands/create.toml @@ -0,0 +1,13 @@ +# 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"] diff --git a/plugins/fs/permissions/autogenerated/commands/exists.toml b/plugins/fs/permissions/autogenerated/commands/exists.toml new file mode 100644 index 000000000..0eed148f3 --- /dev/null +++ b/plugins/fs/permissions/autogenerated/commands/exists.toml @@ -0,0 +1,13 @@ +# 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"] diff --git a/plugins/fs/permissions/autogenerated/commands/fstat.toml b/plugins/fs/permissions/autogenerated/commands/fstat.toml new file mode 100644 index 000000000..30d281128 --- /dev/null +++ b/plugins/fs/permissions/autogenerated/commands/fstat.toml @@ -0,0 +1,13 @@ +# 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"] diff --git a/plugins/fs/permissions/autogenerated/commands/ftruncate.toml b/plugins/fs/permissions/autogenerated/commands/ftruncate.toml new file mode 100644 index 000000000..6b54ffe08 --- /dev/null +++ b/plugins/fs/permissions/autogenerated/commands/ftruncate.toml @@ -0,0 +1,13 @@ +# 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"] diff --git a/plugins/fs/permissions/autogenerated/commands/lstat.toml b/plugins/fs/permissions/autogenerated/commands/lstat.toml new file mode 100644 index 000000000..b224635b4 --- /dev/null +++ b/plugins/fs/permissions/autogenerated/commands/lstat.toml @@ -0,0 +1,13 @@ +# 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"] diff --git a/plugins/fs/permissions/autogenerated/commands/mkdir.toml b/plugins/fs/permissions/autogenerated/commands/mkdir.toml new file mode 100644 index 000000000..58cdbbc7d --- /dev/null +++ b/plugins/fs/permissions/autogenerated/commands/mkdir.toml @@ -0,0 +1,13 @@ +# 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"] diff --git a/plugins/fs/permissions/autogenerated/commands/open.toml b/plugins/fs/permissions/autogenerated/commands/open.toml new file mode 100644 index 000000000..4ea6dff16 --- /dev/null +++ b/plugins/fs/permissions/autogenerated/commands/open.toml @@ -0,0 +1,13 @@ +# 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"] diff --git a/plugins/fs/permissions/autogenerated/commands/read.toml b/plugins/fs/permissions/autogenerated/commands/read.toml new file mode 100644 index 000000000..20fa10c6b --- /dev/null +++ b/plugins/fs/permissions/autogenerated/commands/read.toml @@ -0,0 +1,13 @@ +# 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"] diff --git a/plugins/fs/permissions/autogenerated/commands/read_dir.toml b/plugins/fs/permissions/autogenerated/commands/read_dir.toml new file mode 100644 index 000000000..eef68eba2 --- /dev/null +++ b/plugins/fs/permissions/autogenerated/commands/read_dir.toml @@ -0,0 +1,13 @@ +# 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"] diff --git a/plugins/fs/permissions/autogenerated/commands/read_file.toml b/plugins/fs/permissions/autogenerated/commands/read_file.toml new file mode 100644 index 000000000..b932b71ac --- /dev/null +++ b/plugins/fs/permissions/autogenerated/commands/read_file.toml @@ -0,0 +1,13 @@ +# 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"] diff --git a/plugins/fs/permissions/autogenerated/commands/read_text_file.toml b/plugins/fs/permissions/autogenerated/commands/read_text_file.toml new file mode 100644 index 000000000..7a25115db --- /dev/null +++ b/plugins/fs/permissions/autogenerated/commands/read_text_file.toml @@ -0,0 +1,13 @@ +# 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"] diff --git a/plugins/fs/permissions/autogenerated/commands/read_text_file_lines.toml b/plugins/fs/permissions/autogenerated/commands/read_text_file_lines.toml new file mode 100644 index 000000000..1ba629cbf --- /dev/null +++ b/plugins/fs/permissions/autogenerated/commands/read_text_file_lines.toml @@ -0,0 +1,13 @@ +# 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." +commands.allow = ["read_text_file_lines"] + +[[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"] diff --git a/plugins/fs/permissions/autogenerated/commands/read_text_file_lines_next.toml b/plugins/fs/permissions/autogenerated/commands/read_text_file_lines_next.toml new file mode 100644 index 000000000..021ea37cc --- /dev/null +++ b/plugins/fs/permissions/autogenerated/commands/read_text_file_lines_next.toml @@ -0,0 +1,13 @@ +# 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"] diff --git a/plugins/fs/permissions/autogenerated/commands/remove.toml b/plugins/fs/permissions/autogenerated/commands/remove.toml new file mode 100644 index 000000000..9c9791ebc --- /dev/null +++ b/plugins/fs/permissions/autogenerated/commands/remove.toml @@ -0,0 +1,13 @@ +# 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"] diff --git a/plugins/fs/permissions/autogenerated/commands/rename.toml b/plugins/fs/permissions/autogenerated/commands/rename.toml new file mode 100644 index 000000000..91def18f2 --- /dev/null +++ b/plugins/fs/permissions/autogenerated/commands/rename.toml @@ -0,0 +1,13 @@ +# 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"] diff --git a/plugins/fs/permissions/autogenerated/commands/seek.toml b/plugins/fs/permissions/autogenerated/commands/seek.toml new file mode 100644 index 000000000..cb21bdc31 --- /dev/null +++ b/plugins/fs/permissions/autogenerated/commands/seek.toml @@ -0,0 +1,13 @@ +# 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"] diff --git a/plugins/fs/permissions/autogenerated/commands/stat.toml b/plugins/fs/permissions/autogenerated/commands/stat.toml new file mode 100644 index 000000000..56f751bc6 --- /dev/null +++ b/plugins/fs/permissions/autogenerated/commands/stat.toml @@ -0,0 +1,13 @@ +# 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"] diff --git a/plugins/fs/permissions/autogenerated/commands/truncate.toml b/plugins/fs/permissions/autogenerated/commands/truncate.toml new file mode 100644 index 000000000..62fbb1447 --- /dev/null +++ b/plugins/fs/permissions/autogenerated/commands/truncate.toml @@ -0,0 +1,13 @@ +# 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"] diff --git a/plugins/fs/permissions/autogenerated/commands/unwatch.toml b/plugins/fs/permissions/autogenerated/commands/unwatch.toml new file mode 100644 index 000000000..3259e9a67 --- /dev/null +++ b/plugins/fs/permissions/autogenerated/commands/unwatch.toml @@ -0,0 +1,13 @@ +# 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"] diff --git a/plugins/fs/permissions/autogenerated/commands/watch.toml b/plugins/fs/permissions/autogenerated/commands/watch.toml new file mode 100644 index 000000000..8dd1b5772 --- /dev/null +++ b/plugins/fs/permissions/autogenerated/commands/watch.toml @@ -0,0 +1,13 @@ +# 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"] diff --git a/plugins/fs/permissions/autogenerated/commands/write.toml b/plugins/fs/permissions/autogenerated/commands/write.toml new file mode 100644 index 000000000..73d1d3878 --- /dev/null +++ b/plugins/fs/permissions/autogenerated/commands/write.toml @@ -0,0 +1,13 @@ +# 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"] diff --git a/plugins/fs/permissions/autogenerated/commands/write_file.toml b/plugins/fs/permissions/autogenerated/commands/write_file.toml new file mode 100644 index 000000000..cb0450fc5 --- /dev/null +++ b/plugins/fs/permissions/autogenerated/commands/write_file.toml @@ -0,0 +1,13 @@ +# 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." +commands.allow = ["write_file"] + +[[permission]] +identifier = "deny-write-file" +description = "Denies the write_file command without any pre-configured scope." +commands.deny = ["write_file"] diff --git a/plugins/fs/permissions/autogenerated/commands/write_text_file.toml b/plugins/fs/permissions/autogenerated/commands/write_text_file.toml new file mode 100644 index 000000000..6b497a70a --- /dev/null +++ b/plugins/fs/permissions/autogenerated/commands/write_text_file.toml @@ -0,0 +1,13 @@ +# 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"] diff --git a/plugins/fs/permissions/autogenerated/reference.md b/plugins/fs/permissions/autogenerated/reference.md new file mode 100644 index 000000000..6e1d78d84 --- /dev/null +++ b/plugins/fs/permissions/autogenerated/reference.md @@ -0,0 +1,1164 @@ +# Permissions + +## allow-app-read-recursive + +This allows full recursive read access to the complete `$APP` folder, files and subdirectories. + +## allow-app-write-recursive + +This allows full recusrive write access to the complete `$APP` folder, files and subdirectories. + +## allow-app-read + +This allows non-recursive read access to the `$APP` folder. + +## allow-app-write + +This allows non-recursive write access to the `$APP` folder. + +## allow-app-meta-recursive + +This allows read access to metadata of the `$APP` folder, including file listing and statistics. + +## allow-app-meta + +This allows read access to metadata of the `$APP` folder, including file listing and statistics. + +## scope-app-recursive + +This scope recursive access to the complete `$APP` folder, including sub directories and files. + +## scope-app + +This scope permits access to all files and list content of top level directories in the `$APP`folder. + +## scope-app-index + +This scope permits to list all files and folders in the `$APP`folder. + +## allow-appcache-read-recursive + +This allows full recursive read access to the complete `$APPCACHE` folder, files and subdirectories. + +## allow-appcache-write-recursive + +This allows full recusrive write access to the complete `$APPCACHE` folder, files and subdirectories. + +## allow-appcache-read + +This allows non-recursive read access to the `$APPCACHE` folder. + +## allow-appcache-write + +This allows non-recursive write access to the `$APPCACHE` folder. + +## allow-appcache-meta-recursive + +This allows read access to metadata of the `$APPCACHE` folder, including file listing and statistics. + +## allow-appcache-meta + +This allows read access to metadata of the `$APPCACHE` folder, including file listing and statistics. + +## scope-appcache-recursive + +This scope recursive access to the complete `$APPCACHE` folder, including sub directories and files. + +## scope-appcache + +This scope permits access to all files and list content of top level directories in the `$APPCACHE`folder. + +## scope-appcache-index + +This scope permits to list all files and folders in the `$APPCACHE`folder. + +## allow-appconfig-read-recursive + +This allows full recursive read access to the complete `$APPCONFIG` folder, files and subdirectories. + +## allow-appconfig-write-recursive + +This allows full recusrive write access to the complete `$APPCONFIG` folder, files and subdirectories. + +## allow-appconfig-read + +This allows non-recursive read access to the `$APPCONFIG` folder. + +## allow-appconfig-write + +This allows non-recursive write access to the `$APPCONFIG` folder. + +## allow-appconfig-meta-recursive + +This allows read access to metadata of the `$APPCONFIG` folder, including file listing and statistics. + +## allow-appconfig-meta + +This allows read access to metadata of the `$APPCONFIG` folder, including file listing and statistics. + +## scope-appconfig-recursive + +This scope recursive access to the complete `$APPCONFIG` folder, including sub directories and files. + +## scope-appconfig + +This scope permits access to all files and list content of top level directories in the `$APPCONFIG`folder. + +## scope-appconfig-index + +This scope permits to list all files and folders in the `$APPCONFIG`folder. + +## allow-appdata-read-recursive + +This allows full recursive read access to the complete `$APPDATA` folder, files and subdirectories. + +## allow-appdata-write-recursive + +This allows full recusrive write access to the complete `$APPDATA` folder, files and subdirectories. + +## allow-appdata-read + +This allows non-recursive read access to the `$APPDATA` folder. + +## allow-appdata-write + +This allows non-recursive write access to the `$APPDATA` folder. + +## allow-appdata-meta-recursive + +This allows read access to metadata of the `$APPDATA` folder, including file listing and statistics. + +## allow-appdata-meta + +This allows read access to metadata of the `$APPDATA` folder, including file listing and statistics. + +## scope-appdata-recursive + +This scope recursive access to the complete `$APPDATA` folder, including sub directories and files. + +## scope-appdata + +This scope permits access to all files and list content of top level directories in the `$APPDATA`folder. + +## scope-appdata-index + +This scope permits to list all files and folders in the `$APPDATA`folder. + +## allow-applocaldata-read-recursive + +This allows full recursive read access to the complete `$APPLOCALDATA` folder, files and subdirectories. + +## allow-applocaldata-write-recursive + +This allows full recusrive write access to the complete `$APPLOCALDATA` folder, files and subdirectories. + +## allow-applocaldata-read + +This allows non-recursive read access to the `$APPLOCALDATA` folder. + +## allow-applocaldata-write + +This allows non-recursive write access to the `$APPLOCALDATA` folder. + +## allow-applocaldata-meta-recursive + +This allows read access to metadata of the `$APPLOCALDATA` folder, including file listing and statistics. + +## allow-applocaldata-meta + +This allows read access to metadata of the `$APPLOCALDATA` folder, including file listing and statistics. + +## scope-applocaldata-recursive + +This scope recursive access to the complete `$APPLOCALDATA` folder, including sub directories and files. + +## scope-applocaldata + +This scope permits access to all files and list content of top level directories in the `$APPLOCALDATA`folder. + +## scope-applocaldata-index + +This scope permits to list all files and folders in the `$APPLOCALDATA`folder. + +## allow-applog-read-recursive + +This allows full recursive read access to the complete `$APPLOG` folder, files and subdirectories. + +## allow-applog-write-recursive + +This allows full recusrive write access to the complete `$APPLOG` folder, files and subdirectories. + +## allow-applog-read + +This allows non-recursive read access to the `$APPLOG` folder. + +## allow-applog-write + +This allows non-recursive write access to the `$APPLOG` folder. + +## allow-applog-meta-recursive + +This allows read access to metadata of the `$APPLOG` folder, including file listing and statistics. + +## allow-applog-meta + +This allows read access to metadata of the `$APPLOG` folder, including file listing and statistics. + +## scope-applog-recursive + +This scope recursive access to the complete `$APPLOG` folder, including sub directories and files. + +## scope-applog + +This scope permits access to all files and list content of top level directories in the `$APPLOG`folder. + +## scope-applog-index + +This scope permits to list all files and folders in the `$APPLOG`folder. + +## allow-audio-read-recursive + +This allows full recursive read access to the complete `$AUDIO` folder, files and subdirectories. + +## allow-audio-write-recursive + +This allows full recusrive write access to the complete `$AUDIO` folder, files and subdirectories. + +## allow-audio-read + +This allows non-recursive read access to the `$AUDIO` folder. + +## allow-audio-write + +This allows non-recursive write access to the `$AUDIO` folder. + +## allow-audio-meta-recursive + +This allows read access to metadata of the `$AUDIO` folder, including file listing and statistics. + +## allow-audio-meta + +This allows read access to metadata of the `$AUDIO` folder, including file listing and statistics. + +## scope-audio-recursive + +This scope recursive access to the complete `$AUDIO` folder, including sub directories and files. + +## scope-audio + +This scope permits access to all files and list content of top level directories in the `$AUDIO`folder. + +## scope-audio-index + +This scope permits to list all files and folders in the `$AUDIO`folder. + +## allow-cache-read-recursive + +This allows full recursive read access to the complete `$CACHE` folder, files and subdirectories. + +## allow-cache-write-recursive + +This allows full recusrive write access to the complete `$CACHE` folder, files and subdirectories. + +## allow-cache-read + +This allows non-recursive read access to the `$CACHE` folder. + +## allow-cache-write + +This allows non-recursive write access to the `$CACHE` folder. + +## allow-cache-meta-recursive + +This allows read access to metadata of the `$CACHE` folder, including file listing and statistics. + +## allow-cache-meta + +This allows read access to metadata of the `$CACHE` folder, including file listing and statistics. + +## scope-cache-recursive + +This scope recursive access to the complete `$CACHE` folder, including sub directories and files. + +## scope-cache + +This scope permits access to all files and list content of top level directories in the `$CACHE`folder. + +## scope-cache-index + +This scope permits to list all files and folders in the `$CACHE`folder. + +## allow-config-read-recursive + +This allows full recursive read access to the complete `$CONFIG` folder, files and subdirectories. + +## allow-config-write-recursive + +This allows full recusrive write access to the complete `$CONFIG` folder, files and subdirectories. + +## allow-config-read + +This allows non-recursive read access to the `$CONFIG` folder. + +## allow-config-write + +This allows non-recursive write access to the `$CONFIG` folder. + +## allow-config-meta-recursive + +This allows read access to metadata of the `$CONFIG` folder, including file listing and statistics. + +## allow-config-meta + +This allows read access to metadata of the `$CONFIG` folder, including file listing and statistics. + +## scope-config-recursive + +This scope recursive access to the complete `$CONFIG` folder, including sub directories and files. + +## scope-config + +This scope permits access to all files and list content of top level directories in the `$CONFIG`folder. + +## scope-config-index + +This scope permits to list all files and folders in the `$CONFIG`folder. + +## allow-data-read-recursive + +This allows full recursive read access to the complete `$DATA` folder, files and subdirectories. + +## allow-data-write-recursive + +This allows full recusrive write access to the complete `$DATA` folder, files and subdirectories. + +## allow-data-read + +This allows non-recursive read access to the `$DATA` folder. + +## allow-data-write + +This allows non-recursive write access to the `$DATA` folder. + +## allow-data-meta-recursive + +This allows read access to metadata of the `$DATA` folder, including file listing and statistics. + +## allow-data-meta + +This allows read access to metadata of the `$DATA` folder, including file listing and statistics. + +## scope-data-recursive + +This scope recursive access to the complete `$DATA` folder, including sub directories and files. + +## scope-data + +This scope permits access to all files and list content of top level directories in the `$DATA`folder. + +## scope-data-index + +This scope permits to list all files and folders in the `$DATA`folder. + +## allow-desktop-read-recursive + +This allows full recursive read access to the complete `$DESKTOP` folder, files and subdirectories. + +## allow-desktop-write-recursive + +This allows full recusrive write access to the complete `$DESKTOP` folder, files and subdirectories. + +## allow-desktop-read + +This allows non-recursive read access to the `$DESKTOP` folder. + +## allow-desktop-write + +This allows non-recursive write access to the `$DESKTOP` folder. + +## allow-desktop-meta-recursive + +This allows read access to metadata of the `$DESKTOP` folder, including file listing and statistics. + +## allow-desktop-meta + +This allows read access to metadata of the `$DESKTOP` folder, including file listing and statistics. + +## scope-desktop-recursive + +This scope recursive access to the complete `$DESKTOP` folder, including sub directories and files. + +## scope-desktop + +This scope permits access to all files and list content of top level directories in the `$DESKTOP`folder. + +## scope-desktop-index + +This scope permits to list all files and folders in the `$DESKTOP`folder. + +## allow-document-read-recursive + +This allows full recursive read access to the complete `$DOCUMENT` folder, files and subdirectories. + +## allow-document-write-recursive + +This allows full recusrive write access to the complete `$DOCUMENT` folder, files and subdirectories. + +## allow-document-read + +This allows non-recursive read access to the `$DOCUMENT` folder. + +## allow-document-write + +This allows non-recursive write access to the `$DOCUMENT` folder. + +## allow-document-meta-recursive + +This allows read access to metadata of the `$DOCUMENT` folder, including file listing and statistics. + +## allow-document-meta + +This allows read access to metadata of the `$DOCUMENT` folder, including file listing and statistics. + +## scope-document-recursive + +This scope recursive access to the complete `$DOCUMENT` folder, including sub directories and files. + +## scope-document + +This scope permits access to all files and list content of top level directories in the `$DOCUMENT`folder. + +## scope-document-index + +This scope permits to list all files and folders in the `$DOCUMENT`folder. + +## allow-download-read-recursive + +This allows full recursive read access to the complete `$DOWNLOAD` folder, files and subdirectories. + +## allow-download-write-recursive + +This allows full recusrive write access to the complete `$DOWNLOAD` folder, files and subdirectories. + +## allow-download-read + +This allows non-recursive read access to the `$DOWNLOAD` folder. + +## allow-download-write + +This allows non-recursive write access to the `$DOWNLOAD` folder. + +## allow-download-meta-recursive + +This allows read access to metadata of the `$DOWNLOAD` folder, including file listing and statistics. + +## allow-download-meta + +This allows read access to metadata of the `$DOWNLOAD` folder, including file listing and statistics. + +## scope-download-recursive + +This scope recursive access to the complete `$DOWNLOAD` folder, including sub directories and files. + +## scope-download + +This scope permits access to all files and list content of top level directories in the `$DOWNLOAD`folder. + +## scope-download-index + +This scope permits to list all files and folders in the `$DOWNLOAD`folder. + +## allow-exe-read-recursive + +This allows full recursive read access to the complete `$EXE` folder, files and subdirectories. + +## allow-exe-write-recursive + +This allows full recusrive write access to the complete `$EXE` folder, files and subdirectories. + +## allow-exe-read + +This allows non-recursive read access to the `$EXE` folder. + +## allow-exe-write + +This allows non-recursive write access to the `$EXE` folder. + +## allow-exe-meta-recursive + +This allows read access to metadata of the `$EXE` folder, including file listing and statistics. + +## allow-exe-meta + +This allows read access to metadata of the `$EXE` folder, including file listing and statistics. + +## scope-exe-recursive + +This scope recursive access to the complete `$EXE` folder, including sub directories and files. + +## scope-exe + +This scope permits access to all files and list content of top level directories in the `$EXE`folder. + +## scope-exe-index + +This scope permits to list all files and folders in the `$EXE`folder. + +## allow-font-read-recursive + +This allows full recursive read access to the complete `$FONT` folder, files and subdirectories. + +## allow-font-write-recursive + +This allows full recusrive write access to the complete `$FONT` folder, files and subdirectories. + +## allow-font-read + +This allows non-recursive read access to the `$FONT` folder. + +## allow-font-write + +This allows non-recursive write access to the `$FONT` folder. + +## allow-font-meta-recursive + +This allows read access to metadata of the `$FONT` folder, including file listing and statistics. + +## allow-font-meta + +This allows read access to metadata of the `$FONT` folder, including file listing and statistics. + +## scope-font-recursive + +This scope recursive access to the complete `$FONT` folder, including sub directories and files. + +## scope-font + +This scope permits access to all files and list content of top level directories in the `$FONT`folder. + +## scope-font-index + +This scope permits to list all files and folders in the `$FONT`folder. + +## allow-home-read-recursive + +This allows full recursive read access to the complete `$HOME` folder, files and subdirectories. + +## allow-home-write-recursive + +This allows full recusrive write access to the complete `$HOME` folder, files and subdirectories. + +## allow-home-read + +This allows non-recursive read access to the `$HOME` folder. + +## allow-home-write + +This allows non-recursive write access to the `$HOME` folder. + +## allow-home-meta-recursive + +This allows read access to metadata of the `$HOME` folder, including file listing and statistics. + +## allow-home-meta + +This allows read access to metadata of the `$HOME` folder, including file listing and statistics. + +## scope-home-recursive + +This scope recursive access to the complete `$HOME` folder, including sub directories and files. + +## scope-home + +This scope permits access to all files and list content of top level directories in the `$HOME`folder. + +## scope-home-index + +This scope permits to list all files and folders in the `$HOME`folder. + +## allow-localdata-read-recursive + +This allows full recursive read access to the complete `$LOCALDATA` folder, files and subdirectories. + +## allow-localdata-write-recursive + +This allows full recusrive write access to the complete `$LOCALDATA` folder, files and subdirectories. + +## allow-localdata-read + +This allows non-recursive read access to the `$LOCALDATA` folder. + +## allow-localdata-write + +This allows non-recursive write access to the `$LOCALDATA` folder. + +## allow-localdata-meta-recursive + +This allows read access to metadata of the `$LOCALDATA` folder, including file listing and statistics. + +## allow-localdata-meta + +This allows read access to metadata of the `$LOCALDATA` folder, including file listing and statistics. + +## scope-localdata-recursive + +This scope recursive access to the complete `$LOCALDATA` folder, including sub directories and files. + +## scope-localdata + +This scope permits access to all files and list content of top level directories in the `$LOCALDATA`folder. + +## scope-localdata-index + +This scope permits to list all files and folders in the `$LOCALDATA`folder. + +## allow-log-read-recursive + +This allows full recursive read access to the complete `$LOG` folder, files and subdirectories. + +## allow-log-write-recursive + +This allows full recusrive write access to the complete `$LOG` folder, files and subdirectories. + +## allow-log-read + +This allows non-recursive read access to the `$LOG` folder. + +## allow-log-write + +This allows non-recursive write access to the `$LOG` folder. + +## allow-log-meta-recursive + +This allows read access to metadata of the `$LOG` folder, including file listing and statistics. + +## allow-log-meta + +This allows read access to metadata of the `$LOG` folder, including file listing and statistics. + +## scope-log-recursive + +This scope recursive access to the complete `$LOG` folder, including sub directories and files. + +## scope-log + +This scope permits access to all files and list content of top level directories in the `$LOG`folder. + +## scope-log-index + +This scope permits to list all files and folders in the `$LOG`folder. + +## allow-picture-read-recursive + +This allows full recursive read access to the complete `$PICTURE` folder, files and subdirectories. + +## allow-picture-write-recursive + +This allows full recusrive write access to the complete `$PICTURE` folder, files and subdirectories. + +## allow-picture-read + +This allows non-recursive read access to the `$PICTURE` folder. + +## allow-picture-write + +This allows non-recursive write access to the `$PICTURE` folder. + +## allow-picture-meta-recursive + +This allows read access to metadata of the `$PICTURE` folder, including file listing and statistics. + +## allow-picture-meta + +This allows read access to metadata of the `$PICTURE` folder, including file listing and statistics. + +## scope-picture-recursive + +This scope recursive access to the complete `$PICTURE` folder, including sub directories and files. + +## scope-picture + +This scope permits access to all files and list content of top level directories in the `$PICTURE`folder. + +## scope-picture-index + +This scope permits to list all files and folders in the `$PICTURE`folder. + +## allow-public-read-recursive + +This allows full recursive read access to the complete `$PUBLIC` folder, files and subdirectories. + +## allow-public-write-recursive + +This allows full recusrive write access to the complete `$PUBLIC` folder, files and subdirectories. + +## allow-public-read + +This allows non-recursive read access to the `$PUBLIC` folder. + +## allow-public-write + +This allows non-recursive write access to the `$PUBLIC` folder. + +## allow-public-meta-recursive + +This allows read access to metadata of the `$PUBLIC` folder, including file listing and statistics. + +## allow-public-meta + +This allows read access to metadata of the `$PUBLIC` folder, including file listing and statistics. + +## scope-public-recursive + +This scope recursive access to the complete `$PUBLIC` folder, including sub directories and files. + +## scope-public + +This scope permits access to all files and list content of top level directories in the `$PUBLIC`folder. + +## scope-public-index + +This scope permits to list all files and folders in the `$PUBLIC`folder. + +## allow-resource-read-recursive + +This allows full recursive read access to the complete `$RESOURCE` folder, files and subdirectories. + +## allow-resource-write-recursive + +This allows full recusrive write access to the complete `$RESOURCE` folder, files and subdirectories. + +## allow-resource-read + +This allows non-recursive read access to the `$RESOURCE` folder. + +## allow-resource-write + +This allows non-recursive write access to the `$RESOURCE` folder. + +## allow-resource-meta-recursive + +This allows read access to metadata of the `$RESOURCE` folder, including file listing and statistics. + +## allow-resource-meta + +This allows read access to metadata of the `$RESOURCE` folder, including file listing and statistics. + +## scope-resource-recursive + +This scope recursive access to the complete `$RESOURCE` folder, including sub directories and files. + +## scope-resource + +This scope permits access to all files and list content of top level directories in the `$RESOURCE`folder. + +## scope-resource-index + +This scope permits to list all files and folders in the `$RESOURCE`folder. + +## allow-runtime-read-recursive + +This allows full recursive read access to the complete `$RUNTIME` folder, files and subdirectories. + +## allow-runtime-write-recursive + +This allows full recusrive write access to the complete `$RUNTIME` folder, files and subdirectories. + +## allow-runtime-read + +This allows non-recursive read access to the `$RUNTIME` folder. + +## allow-runtime-write + +This allows non-recursive write access to the `$RUNTIME` folder. + +## allow-runtime-meta-recursive + +This allows read access to metadata of the `$RUNTIME` folder, including file listing and statistics. + +## allow-runtime-meta + +This allows read access to metadata of the `$RUNTIME` folder, including file listing and statistics. + +## scope-runtime-recursive + +This scope recursive access to the complete `$RUNTIME` folder, including sub directories and files. + +## scope-runtime + +This scope permits access to all files and list content of top level directories in the `$RUNTIME`folder. + +## scope-runtime-index + +This scope permits to list all files and folders in the `$RUNTIME`folder. + +## allow-temp-read-recursive + +This allows full recursive read access to the complete `$TEMP` folder, files and subdirectories. + +## allow-temp-write-recursive + +This allows full recusrive write access to the complete `$TEMP` folder, files and subdirectories. + +## allow-temp-read + +This allows non-recursive read access to the `$TEMP` folder. + +## allow-temp-write + +This allows non-recursive write access to the `$TEMP` folder. + +## allow-temp-meta-recursive + +This allows read access to metadata of the `$TEMP` folder, including file listing and statistics. + +## allow-temp-meta + +This allows read access to metadata of the `$TEMP` folder, including file listing and statistics. + +## scope-temp-recursive + +This scope recursive access to the complete `$TEMP` folder, including sub directories and files. + +## scope-temp + +This scope permits access to all files and list content of top level directories in the `$TEMP`folder. + +## scope-temp-index + +This scope permits to list all files and folders in the `$TEMP`folder. + +## allow-template-read-recursive + +This allows full recursive read access to the complete `$TEMPLATE` folder, files and subdirectories. + +## allow-template-write-recursive + +This allows full recusrive write access to the complete `$TEMPLATE` folder, files and subdirectories. + +## allow-template-read + +This allows non-recursive read access to the `$TEMPLATE` folder. + +## allow-template-write + +This allows non-recursive write access to the `$TEMPLATE` folder. + +## allow-template-meta-recursive + +This allows read access to metadata of the `$TEMPLATE` folder, including file listing and statistics. + +## allow-template-meta + +This allows read access to metadata of the `$TEMPLATE` folder, including file listing and statistics. + +## scope-template-recursive + +This scope recursive access to the complete `$TEMPLATE` folder, including sub directories and files. + +## scope-template + +This scope permits access to all files and list content of top level directories in the `$TEMPLATE`folder. + +## scope-template-index + +This scope permits to list all files and folders in the `$TEMPLATE`folder. + +## allow-video-read-recursive + +This allows full recursive read access to the complete `$VIDEO` folder, files and subdirectories. + +## allow-video-write-recursive + +This allows full recusrive write access to the complete `$VIDEO` folder, files and subdirectories. + +## allow-video-read + +This allows non-recursive read access to the `$VIDEO` folder. + +## allow-video-write + +This allows non-recursive write access to the `$VIDEO` folder. + +## allow-video-meta-recursive + +This allows read access to metadata of the `$VIDEO` folder, including file listing and statistics. + +## allow-video-meta + +This allows read access to metadata of the `$VIDEO` folder, including file listing and statistics. + +## scope-video-recursive + +This scope recursive access to the complete `$VIDEO` folder, including sub directories and files. + +## scope-video + +This scope permits access to all files and list content of top level directories in the `$VIDEO`folder. + +## scope-video-index + +This scope permits to list all files and folders in the `$VIDEO`folder. + +## allow-copy-file + +Enables the copy_file command without any pre-configured scope. + +## deny-copy-file + +Denies the copy_file command without any pre-configured scope. + +## allow-create + +Enables the create command without any pre-configured scope. + +## deny-create + +Denies the create command without any pre-configured scope. + +## allow-exists + +Enables the exists command without any pre-configured scope. + +## deny-exists + +Denies the exists command without any pre-configured scope. + +## allow-fstat + +Enables the fstat command without any pre-configured scope. + +## deny-fstat + +Denies the fstat command without any pre-configured scope. + +## allow-ftruncate + +Enables the ftruncate command without any pre-configured scope. + +## deny-ftruncate + +Denies the ftruncate command without any pre-configured scope. + +## allow-lstat + +Enables the lstat command without any pre-configured scope. + +## deny-lstat + +Denies the lstat command without any pre-configured scope. + +## allow-mkdir + +Enables the mkdir command without any pre-configured scope. + +## deny-mkdir + +Denies the mkdir command without any pre-configured scope. + +## allow-open + +Enables the open command without any pre-configured scope. + +## deny-open + +Denies the open command without any pre-configured scope. + +## allow-read + +Enables the read command without any pre-configured scope. + +## deny-read + +Denies the read command without any pre-configured scope. + +## allow-read-dir + +Enables the read_dir command without any pre-configured scope. + +## deny-read-dir + +Denies the read_dir command without any pre-configured scope. + +## allow-read-file + +Enables the read_file command without any pre-configured scope. + +## deny-read-file + +Denies the read_file command without any pre-configured scope. + +## allow-read-text-file + +Enables the read_text_file command without any pre-configured scope. + +## deny-read-text-file + +Denies the read_text_file command without any pre-configured scope. + +## allow-read-text-file-lines + +Enables the read_text_file_lines command without any pre-configured scope. + +## deny-read-text-file-lines + +Denies the read_text_file_lines command without any pre-configured scope. + +## allow-read-text-file-lines-next + +Enables the read_text_file_lines_next command without any pre-configured scope. + +## deny-read-text-file-lines-next + +Denies the read_text_file_lines_next command without any pre-configured scope. + +## allow-remove + +Enables the remove command without any pre-configured scope. + +## deny-remove + +Denies the remove command without any pre-configured scope. + +## allow-rename + +Enables the rename command without any pre-configured scope. + +## deny-rename + +Denies the rename command without any pre-configured scope. + +## allow-seek + +Enables the seek command without any pre-configured scope. + +## deny-seek + +Denies the seek command without any pre-configured scope. + +## allow-stat + +Enables the stat command without any pre-configured scope. + +## deny-stat + +Denies the stat command without any pre-configured scope. + +## allow-truncate + +Enables the truncate command without any pre-configured scope. + +## deny-truncate + +Denies the truncate command without any pre-configured scope. + +## allow-unwatch + +Enables the unwatch command without any pre-configured scope. + +## deny-unwatch + +Denies the unwatch command without any pre-configured scope. + +## allow-watch + +Enables the watch command without any pre-configured scope. + +## deny-watch + +Denies the watch command without any pre-configured scope. + +## allow-write + +Enables the write command without any pre-configured scope. + +## deny-write + +Denies the write command without any pre-configured scope. + +## allow-write-file + +Enables the write_file command without any pre-configured scope. + +## deny-write-file + +Denies the write_file command without any pre-configured scope. + +## allow-write-text-file + +Enables the write_text_file command without any pre-configured scope. + +## deny-write-text-file + +Denies the write_text_file command without any pre-configured scope. + +## default + +# Tauri `fs` default permissions + +This configuration file defines the default permissions granted +to the filesystem. + +### Granted Permissions + +This default permission set enables all read-related commands and +allows access to the `$APP` folder and sub directories created in it. +The location of the `$APP` folder depends on the operating system, +where the application is run. + +In general the `$APP` folder needs to be manually created +by the application at runtime, before accessing files or folders +in it is possible. + +### Denied Permissions + +This default permission set prevents access to critical components +of the Tauri application by default. +On Windows the webview data folder access is denied. + + + +## deny-default + +This denies access to dangerous Tauri relevant files and folders by default. + +## deny-webview-data-linux + +This denies read access to the +`$APPLOCALDATA` folder on linux as the webview data and configuration values are stored here. +Allowing access can lead to sensitive information disclosure and should be well considered. + +## deny-webview-data-windows + +This denies read access to the +`$APPLOCALDATA/EBWebView` folder on windows as the webview data and configuration values are stored here. +Allowing access can lead to sensitive information disclosure and should be well considered. + +## read-all + +This enables all read related commands without any pre-configured accessible paths. + +## read-dirs + +This enables directory read and file metadata related commands without any pre-configured accessible paths. + +## read-files + +This enables file read related commands without any pre-configured accessible paths. + +## read-meta + +This enables all index or metadata related commands without any pre-configured accessible paths. + +## scope + +An empty permission you can use to modify the global scope. + +## write-all + +This enables all write related commands without any pre-configured accessible paths. + +## write-files + +This enables all file write related commands without any pre-configured accessible paths. + diff --git a/plugins/fs/permissions/default.toml b/plugins/fs/permissions/default.toml new file mode 100644 index 000000000..213fece0e --- /dev/null +++ b/plugins/fs/permissions/default.toml @@ -0,0 +1,28 @@ +"$schema" = "schemas/schema.json" + +[default] +description = """ +# Tauri `fs` default permissions + +This configuration file defines the default permissions granted +to the filesystem. + +### Granted Permissions + +This default permission set enables all read-related commands and +allows access to the `$APP` folder and sub directories created in it. +The location of the `$APP` folder depends on the operating system, +where the application is run. + +In general the `$APP` folder needs to be manually created +by the application at runtime, before accessing files or folders +in it is possible. + +### Denied Permissions + +This default permission set prevents access to critical components +of the Tauri application by default. +On Windows the webview data folder access is denied. + +""" +permissions = ["read-all", "scope-app-recursive", "deny-default"] diff --git a/plugins/fs/permissions/deny-default.toml b/plugins/fs/permissions/deny-default.toml new file mode 100644 index 000000000..22d8186ff --- /dev/null +++ b/plugins/fs/permissions/deny-default.toml @@ -0,0 +1,6 @@ +"$schema" = "schemas/schema.json" + +[[set]] +identifier = "deny-default" +description = "This denies access to dangerous Tauri relevant files and folders by default." +permissions = ["deny-webview-data-linux", "deny-webview-data-windows"] diff --git a/plugins/fs/permissions/deny-webview-data.toml b/plugins/fs/permissions/deny-webview-data.toml new file mode 100644 index 000000000..73712d95e --- /dev/null +++ b/plugins/fs/permissions/deny-webview-data.toml @@ -0,0 +1,19 @@ +"$schema" = "schemas/schema.json" + +[[permission]] +identifier = "deny-webview-data-linux" +description = """This denies read access to the +`$APPLOCALDATA` folder on linux as the webview data and configuration values are stored here. +Allowing access can lead to sensitive information disclosure and should be well considered.""" + +[[scope.deny]] +path = "$APPLOCALDATA/**" + +[[permission]] +identifier = "deny-webview-data-windows" +description = """This denies read access to the +`$APPLOCALDATA/EBWebView` folder on windows as the webview data and configuration values are stored here. +Allowing access can lead to sensitive information disclosure and should be well considered.""" + +[[scope.deny]] +path = "$APPLOCALDATA/EBWebView/**" diff --git a/plugins/fs/permissions/read-all.toml b/plugins/fs/permissions/read-all.toml new file mode 100644 index 000000000..99cbadf39 --- /dev/null +++ b/plugins/fs/permissions/read-all.toml @@ -0,0 +1,21 @@ +"$schema" = "schemas/schema.json" + +[[permission]] +identifier = "read-all" +description = "This enables all read related commands without any pre-configured accessible paths." +commands.allow = [ + "read_dir", + "read_file", + "read", + "open", + "read_text_file", + "read_text_file_lines", + "read_text_file_lines_next", + "seek", + "stat", + "lstat", + "fstat", + "exists", + "watch", + "unwatch", +] diff --git a/plugins/fs/permissions/read-dirs.toml b/plugins/fs/permissions/read-dirs.toml new file mode 100644 index 000000000..eb383632d --- /dev/null +++ b/plugins/fs/permissions/read-dirs.toml @@ -0,0 +1,6 @@ +"$schema" = "schemas/schema.json" + +[[permission]] +identifier = "read-dirs" +description = "This enables directory read and file metadata related commands without any pre-configured accessible paths." +commands.allow = ["read_dir", "stat", "lstat", "fstat", "exists"] diff --git a/plugins/fs/permissions/read-files.toml b/plugins/fs/permissions/read-files.toml new file mode 100644 index 000000000..a0691b44f --- /dev/null +++ b/plugins/fs/permissions/read-files.toml @@ -0,0 +1,19 @@ +"$schema" = "schemas/schema.json" + +[[permission]] +identifier = "read-files" +description = "This enables file read related commands without any pre-configured accessible paths." +commands.allow = [ + "read_file", + "read", + "open", + "read_text_file", + "read_text_file_lines", + "read_text_file_lines_next", + "seek", + "stat", + "lstat", + "fstat", + "exists", + +] diff --git a/plugins/fs/permissions/read-meta.toml b/plugins/fs/permissions/read-meta.toml new file mode 100644 index 000000000..09c731ad6 --- /dev/null +++ b/plugins/fs/permissions/read-meta.toml @@ -0,0 +1,6 @@ +"$schema" = "schemas/schema.json" + +[[permission]] +identifier = "read-meta" +description = "This enables all index or metadata related commands without any pre-configured accessible paths." +commands.allow = ["read_dir", "stat", "lstat", "fstat", "exists"] diff --git a/plugins/fs/permissions/scope.toml b/plugins/fs/permissions/scope.toml new file mode 100644 index 000000000..7e945aa8b --- /dev/null +++ b/plugins/fs/permissions/scope.toml @@ -0,0 +1,5 @@ +"$schema" = "schemas/schema.json" + +[[permission]] +identifier = "scope" +description = "An empty permission you can use to modify the global scope." diff --git a/plugins/fs/permissions/write-all.toml b/plugins/fs/permissions/write-all.toml new file mode 100644 index 000000000..55a512ded --- /dev/null +++ b/plugins/fs/permissions/write-all.toml @@ -0,0 +1,17 @@ +"$schema" = "schemas/schema.json" + +[[permission]] +identifier = "write-all" +description = "This enables all write related commands without any pre-configured accessible paths." +commands.allow = [ + "mkdir", + "create", + "copy_file", + "remove", + "rename", + "truncate", + "ftruncate", + "write", + "write_file", + "write_text_file", +] diff --git a/plugins/fs/permissions/write-files.toml b/plugins/fs/permissions/write-files.toml new file mode 100644 index 000000000..239bc60d7 --- /dev/null +++ b/plugins/fs/permissions/write-files.toml @@ -0,0 +1,16 @@ +"$schema" = "schemas/schema.json" + +[[permission]] +identifier = "write-files" +description = "This enables all file write related commands without any pre-configured accessible paths." +commands.allow = [ + "create", + "copy_file", + "remove", + "rename", + "truncate", + "ftruncate", + "write", + "write_file", + "write_text_file", +] diff --git a/plugins/fs/src/commands.rs b/plugins/fs/src/commands.rs index 3e7bbd6d5..0b4f80153 100644 --- a/plugins/fs/src/commands.rs +++ b/plugins/fs/src/commands.rs @@ -6,7 +6,9 @@ use serde::{Deserialize, Serialize, Serializer}; use serde_repr::{Deserialize_repr, Serialize_repr}; use tauri::{ + ipc::{CommandScope, GlobalScope}, path::{BaseDirectory, SafePathBuf}, + utils::config::FsScope, AppHandle, Manager, Resource, ResourceId, Runtime, }; @@ -18,7 +20,7 @@ use std::{ time::{SystemTime, UNIX_EPOCH}, }; -use crate::{Error, FsExt}; +use crate::{scope::Entry, Error, FsExt}; #[derive(Debug, thiserror::Error)] pub enum CommandError { @@ -71,10 +73,18 @@ pub struct BaseOptions { #[tauri::command] pub fn create( app: AppHandle, + global_scope: GlobalScope<'_, Entry>, + command_scope: CommandScope<'_, Entry>, path: SafePathBuf, options: Option, ) -> CommandResult { - let resolved_path = resolve_path(&app, path, options.and_then(|o| o.base_dir))?; + let resolved_path = resolve_path( + &app, + &global_scope, + &command_scope, + path, + options.and_then(|o| o.base_dir), + )?; let file = File::create(&resolved_path).map_err(|e| { format!( "failed to create file at path: {} with error: {e}", @@ -113,10 +123,18 @@ fn default_true() -> bool { #[tauri::command] pub fn open( app: AppHandle, + global_scope: GlobalScope<'_, Entry>, + command_scope: CommandScope<'_, Entry>, path: SafePathBuf, options: Option, ) -> CommandResult { - let resolved_path = resolve_path(&app, path, options.as_ref().and_then(|o| o.base.base_dir))?; + let resolved_path = resolve_path( + &app, + &global_scope, + &command_scope, + path, + options.as_ref().and_then(|o| o.base.base_dir), + )?; let mut opts = std::fs::OpenOptions::new(); // default to read-only @@ -166,17 +184,23 @@ pub struct CopyFileOptions { #[tauri::command] pub fn copy_file( app: AppHandle, + global_scope: GlobalScope<'_, Entry>, + command_scope: CommandScope<'_, Entry>, from_path: SafePathBuf, to_path: SafePathBuf, options: Option, ) -> CommandResult<()> { let resolved_from_path = resolve_path( &app, + &global_scope, + &command_scope, from_path, options.as_ref().and_then(|o| o.from_path_base_dir), )?; let resolved_to_path = resolve_path( &app, + &global_scope, + &command_scope, to_path, options.as_ref().and_then(|o| o.to_path_base_dir), )?; @@ -202,10 +226,18 @@ pub struct MkdirOptions { #[tauri::command] pub fn mkdir( app: AppHandle, + global_scope: GlobalScope<'_, Entry>, + command_scope: CommandScope<'_, Entry>, path: SafePathBuf, options: Option, ) -> CommandResult<()> { - let resolved_path = resolve_path(&app, path, options.as_ref().and_then(|o| o.base.base_dir))?; + let resolved_path = resolve_path( + &app, + &global_scope, + &command_scope, + path, + options.as_ref().and_then(|o| o.base.base_dir), + )?; let mut builder = std::fs::DirBuilder::new(); builder.recursive(options.as_ref().and_then(|o| o.recursive).unwrap_or(false)); @@ -261,10 +293,18 @@ fn read_dir_inner>(path: P) -> crate::Result> { #[tauri::command] pub fn read_dir( app: AppHandle, + global_scope: GlobalScope<'_, Entry>, + command_scope: CommandScope<'_, Entry>, path: SafePathBuf, options: Option, ) -> CommandResult> { - let resolved_path = resolve_path(&app, path, options.as_ref().and_then(|o| o.base_dir))?; + let resolved_path = resolve_path( + &app, + &global_scope, + &command_scope, + path, + options.as_ref().and_then(|o| o.base_dir), + )?; read_dir_inner(&resolved_path) .map_err(|e| { @@ -292,10 +332,18 @@ pub fn read( #[tauri::command] pub fn read_file( app: AppHandle, + global_scope: GlobalScope<'_, Entry>, + command_scope: CommandScope<'_, Entry>, path: SafePathBuf, options: Option, ) -> CommandResult> { - let resolved_path = resolve_path(&app, path, options.as_ref().and_then(|o| o.base_dir))?; + let resolved_path = resolve_path( + &app, + &global_scope, + &command_scope, + path, + options.as_ref().and_then(|o| o.base_dir), + )?; std::fs::read(&resolved_path) .map_err(|e| { format!( @@ -309,10 +357,18 @@ pub fn read_file( #[tauri::command] pub fn read_text_file( app: AppHandle, + global_scope: GlobalScope<'_, Entry>, + command_scope: CommandScope<'_, Entry>, path: SafePathBuf, options: Option, ) -> CommandResult { - let resolved_path = resolve_path(&app, path, options.as_ref().and_then(|o| o.base_dir))?; + let resolved_path = resolve_path( + &app, + &global_scope, + &command_scope, + path, + options.as_ref().and_then(|o| o.base_dir), + )?; std::fs::read_to_string(&resolved_path) .map_err(|e| { format!( @@ -326,12 +382,20 @@ pub fn read_text_file( #[tauri::command] pub fn read_text_file_lines( app: AppHandle, + global_scope: GlobalScope<'_, Entry>, + command_scope: CommandScope<'_, Entry>, path: SafePathBuf, options: Option, ) -> CommandResult { use std::io::BufRead; - let resolved_path = resolve_path(&app, path, options.as_ref().and_then(|o| o.base_dir))?; + let resolved_path = resolve_path( + &app, + &global_scope, + &command_scope, + path, + options.as_ref().and_then(|o| o.base_dir), + )?; let file = File::open(&resolved_path).map_err(|e| { format!( @@ -374,10 +438,18 @@ pub struct RemoveOptions { #[tauri::command] pub fn remove( app: AppHandle, + global_scope: GlobalScope<'_, Entry>, + command_scope: CommandScope<'_, Entry>, path: SafePathBuf, options: Option, ) -> CommandResult<()> { - let resolved_path = resolve_path(&app, path, options.as_ref().and_then(|o| o.base.base_dir))?; + let resolved_path = resolve_path( + &app, + &global_scope, + &command_scope, + path, + options.as_ref().and_then(|o| o.base.base_dir), + )?; let metadata = std::fs::symlink_metadata(&resolved_path).map_err(|e| { format!( @@ -434,17 +506,23 @@ pub struct RenameOptions { #[tauri::command] pub fn rename( app: AppHandle, + global_scope: GlobalScope<'_, Entry>, + command_scope: CommandScope<'_, Entry>, old_path: SafePathBuf, new_path: SafePathBuf, options: Option, ) -> CommandResult<()> { let resolved_old_path = resolve_path( &app, + &global_scope, + &command_scope, old_path, options.as_ref().and_then(|o| o.old_path_base_dir), )?; let resolved_new_path = resolve_path( &app, + &global_scope, + &command_scope, new_path, options.as_ref().and_then(|o| o.new_path_base_dir), )?; @@ -490,10 +568,18 @@ pub fn seek( #[tauri::command] pub fn stat( app: AppHandle, + global_scope: GlobalScope<'_, Entry>, + command_scope: CommandScope<'_, Entry>, path: SafePathBuf, options: Option, ) -> CommandResult { - let resolved_path = resolve_path(&app, path, options.as_ref().and_then(|o| o.base_dir))?; + let resolved_path = resolve_path( + &app, + &global_scope, + &command_scope, + path, + options.as_ref().and_then(|o| o.base_dir), + )?; let metadata = std::fs::metadata(&resolved_path).map_err(|e| { format!( "failed to get metadata of path: {} with error: {e}", @@ -506,10 +592,18 @@ pub fn stat( #[tauri::command] pub fn lstat( app: AppHandle, + global_scope: GlobalScope<'_, Entry>, + command_scope: CommandScope<'_, Entry>, path: SafePathBuf, options: Option, ) -> CommandResult { - let resolved_path = resolve_path(&app, path, options.as_ref().and_then(|o| o.base_dir))?; + let resolved_path = resolve_path( + &app, + &global_scope, + &command_scope, + path, + options.as_ref().and_then(|o| o.base_dir), + )?; let metadata = std::fs::symlink_metadata(&resolved_path).map_err(|e| { format!( "failed to get metadata of path: {} with error: {e}", @@ -530,11 +624,19 @@ pub fn fstat(app: AppHandle, rid: ResourceId) -> CommandResult( app: AppHandle, + global_scope: GlobalScope<'_, Entry>, + command_scope: CommandScope<'_, Entry>, path: SafePathBuf, len: Option, options: Option, ) -> CommandResult<()> { - let resolved_path = resolve_path(&app, path, options.as_ref().and_then(|o| o.base_dir))?; + let resolved_path = resolve_path( + &app, + &global_scope, + &command_scope, + path, + options.as_ref().and_then(|o| o.base_dir), + )?; let f = std::fs::OpenOptions::new() .write(true) .open(&resolved_path) @@ -599,11 +701,19 @@ fn default_create_value() -> bool { fn write_file_inner( app: AppHandle, + global_scope: &GlobalScope<'_, Entry>, + command_scope: &CommandScope<'_, Entry>, path: SafePathBuf, data: &[u8], options: Option, ) -> CommandResult<()> { - let resolved_path = resolve_path(&app, path, options.as_ref().and_then(|o| o.base.base_dir))?; + let resolved_path = resolve_path( + &app, + global_scope, + command_scope, + path, + options.as_ref().and_then(|o| o.base.base_dir), + )?; let mut opts = std::fs::OpenOptions::new(); // defaults @@ -644,35 +754,56 @@ fn write_file_inner( #[tauri::command] pub fn write_file( app: AppHandle, + global_scope: GlobalScope<'_, Entry>, + command_scope: CommandScope<'_, Entry>, path: SafePathBuf, data: Vec, options: Option, ) -> CommandResult<()> { - write_file_inner(app, path, &data, options) + write_file_inner(app, &global_scope, &command_scope, path, &data, options) } #[tauri::command] pub fn write_text_file( app: AppHandle, + global_scope: GlobalScope<'_, Entry>, + command_scope: CommandScope<'_, Entry>, path: SafePathBuf, data: String, options: Option, ) -> CommandResult<()> { - write_file_inner(app, path, data.as_bytes(), options) + write_file_inner( + app, + &global_scope, + &command_scope, + path, + data.as_bytes(), + options, + ) } #[tauri::command] pub fn exists( app: AppHandle, + global_scope: GlobalScope<'_, Entry>, + command_scope: CommandScope<'_, Entry>, path: SafePathBuf, options: Option, ) -> CommandResult { - let resolved_path = resolve_path(&app, path, options.as_ref().and_then(|o| o.base_dir))?; + let resolved_path = resolve_path( + &app, + &global_scope, + &command_scope, + path, + options.as_ref().and_then(|o| o.base_dir), + )?; Ok(resolved_path.exists()) } pub fn resolve_path( app: &AppHandle, + global_scope: &GlobalScope<'_, Entry>, + command_scope: &CommandScope<'_, Entry>, path: SafePathBuf, base_dir: Option, ) -> CommandResult { @@ -684,7 +815,35 @@ pub fn resolve_path( } else { path.as_ref().to_path_buf() }; - if app.fs_scope().is_allowed(&path) { + + let scope = tauri::scope::fs::Scope::new( + app, + &FsScope::Scope { + allow: app + .fs_scope() + .allowed + .lock() + .unwrap() + .clone() + .into_iter() + .chain(global_scope.allows().iter().map(|e| e.path.clone())) + .chain(command_scope.allows().iter().map(|e| e.path.clone())) + .collect(), + deny: app + .fs_scope() + .denied + .lock() + .unwrap() + .clone() + .into_iter() + .chain(global_scope.denies().iter().map(|e| e.path.clone())) + .chain(command_scope.denies().iter().map(|e| e.path.clone())) + .collect(), + require_literal_leading_dot: None, + }, + )?; + + if scope.is_allowed(&path) { Ok(path) } else { Err(CommandError::Plugin(Error::PathForbidden(path))) diff --git a/plugins/fs/src/config.rs b/plugins/fs/src/config.rs index b05321f31..d8a197140 100644 --- a/plugins/fs/src/config.rs +++ b/plugins/fs/src/config.rs @@ -3,9 +3,16 @@ // SPDX-License-Identifier: MIT use serde::Deserialize; -use tauri::utils::config::FsScope; -#[derive(Debug, Deserialize)] +#[derive(Deserialize)] pub struct Config { - pub scope: FsScope, + /// Whether or not paths that contain components that start with a `.` + /// will require that `.` appears literally in the pattern; `*`, `?`, `**`, + /// or `[...]` will not match. This is useful because such files are + /// conventionally considered hidden on Unix systems and it might be + /// desirable to skip them when listing files. + /// + /// Defaults to `true` on Unix systems and `false` on Windows + // dotfiles are not supposed to be exposed by default on unix + pub require_literal_leading_dot: Option, } diff --git a/plugins/fs/src/error.rs b/plugins/fs/src/error.rs index effc017f0..212714eff 100644 --- a/plugins/fs/src/error.rs +++ b/plugins/fs/src/error.rs @@ -8,6 +8,10 @@ use serde::{Serialize, Serializer}; #[derive(Debug, thiserror::Error)] pub enum Error { + #[error(transparent)] + Json(#[from] serde_json::Error), + #[error(transparent)] + Tauri(#[from] tauri::Error), #[error(transparent)] Io(#[from] std::io::Error), #[error("forbidden path: {0}")] diff --git a/plugins/fs/src/lib.rs b/plugins/fs/src/lib.rs index 6b8d5994b..5bd6545c5 100644 --- a/plugins/fs/src/lib.rs +++ b/plugins/fs/src/lib.rs @@ -11,21 +11,25 @@ html_favicon_url = "https://github.com/tauri-apps/tauri/raw/dev/app-icon.png" )] +use std::path::PathBuf; + +use serde::Deserialize; use tauri::{ + ipc::ScopeObject, plugin::{Builder as PluginBuilder, TauriPlugin}, - scope::fs::Scope, - utils::config::FsScope, - FileDropEvent, Manager, RunEvent, Runtime, WindowEvent, + utils::acl::Value, + AppHandle, FileDropEvent, Manager, RunEvent, Runtime, WindowEvent, }; mod commands; mod config; mod error; +mod scope; #[cfg(feature = "watch")] mod watcher; -pub use config::Config; pub use error::Error; +pub use scope::{Event as ScopeEvent, Scope}; type Result = std::result::Result; @@ -44,8 +48,27 @@ impl> FsExt for T { } } -pub fn init() -> TauriPlugin> { - PluginBuilder::>::new("fs") +impl ScopeObject for scope::Entry { + type Error = Error; + fn deserialize( + app: &AppHandle, + raw: Value, + ) -> std::result::Result { + #[derive(Deserialize)] + struct EntryRaw { + path: PathBuf, + } + + let entry = serde_json::from_value::(raw.into())?; + + Ok(Self { + path: app.path().parse(entry.path)?, + }) + } +} + +pub fn init() -> TauriPlugin> { + PluginBuilder::>::new("fs") .js_init_script(include_str!("api-iife.js").to_string()) .invoke_handler(tauri::generate_handler![ commands::create, @@ -76,16 +99,13 @@ pub fn init() -> TauriPlugin> { #[cfg(feature = "watch")] watcher::unwatch ]) - .setup(|app: &tauri::AppHandle, api| { - let default_scope = FsScope::default(); - app.manage(Scope::new( - app, - api.config() - .as_ref() - .map(|c| &c.scope) - .unwrap_or(&default_scope), - )?); - + .setup(|app, api| { + let mut scope = Scope::default(); + scope.require_literal_leading_dot = api + .config() + .as_ref() + .and_then(|c| c.require_literal_leading_dot); + app.manage(scope); Ok(()) }) .on_event(|app, event| { @@ -98,9 +118,9 @@ pub fn init() -> TauriPlugin> { let scope = app.fs_scope(); for path in paths { if path.is_file() { - let _ = scope.allow_file(path); + scope.allow_file(path); } else { - let _ = scope.allow_directory(path, false); + scope.allow_directory(path, false); } } } diff --git a/plugins/fs/src/scope.rs b/plugins/fs/src/scope.rs new file mode 100644 index 000000000..d7040a58a --- /dev/null +++ b/plugins/fs/src/scope.rs @@ -0,0 +1,118 @@ +// Copyright 2019-2023 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + +use std::{ + collections::HashMap, + path::{Path, PathBuf}, + sync::{ + atomic::{AtomicU32, Ordering}, + Mutex, + }, +}; + +#[derive(Debug, schemars::JsonSchema)] +pub struct Entry { + pub path: PathBuf, +} + +pub type EventId = u32; +type EventListener = Box; + +/// Scope change event. +#[derive(Debug, Clone)] +pub enum Event { + /// A path has been allowed. + PathAllowed(PathBuf), + /// A path has been forbidden. + PathForbidden(PathBuf), +} + +#[derive(Default)] +pub struct Scope { + pub(crate) allowed: Mutex>, + pub(crate) denied: Mutex>, + event_listeners: Mutex>, + next_event_id: AtomicU32, + pub(crate) require_literal_leading_dot: Option, +} + +impl Scope { + /// Extend the allowed patterns with the given directory. + /// + /// After this function has been called, the frontend will be able to use the Tauri API to read + /// the directory and all of its files. If `recursive` is `true`, subdirectories will be accessible too. + pub fn allow_directory>(&self, path: P, recursive: bool) { + let path = path.as_ref(); + + let mut allowed = self.allowed.lock().unwrap(); + allowed.push(path.to_path_buf()); + allowed.push(path.join(if recursive { "**" } else { "*" })); + + self.emit(Event::PathAllowed(path.to_path_buf())); + } + + /// Extend the allowed patterns with the given file path. + /// + /// After this function has been called, the frontend will be able to use the Tauri API to read the contents of this file. + pub fn allow_file>(&self, path: P) { + let path = path.as_ref(); + + self.allowed.lock().unwrap().push(path.to_path_buf()); + + self.emit(Event::PathAllowed(path.to_path_buf())); + } + + /// Set the given directory path to be forbidden by this scope. + /// + /// **Note:** this takes precedence over allowed paths, so its access gets denied **always**. + pub fn forbid_directory>(&self, path: P, recursive: bool) { + let path = path.as_ref(); + + let mut denied = self.denied.lock().unwrap(); + denied.push(path.to_path_buf()); + denied.push(path.join(if recursive { "**" } else { "*" })); + + self.emit(Event::PathForbidden(path.to_path_buf())); + } + + /// Set the given file path to be forbidden by this scope. + /// + /// **Note:** this takes precedence over allowed paths, so its access gets denied **always**. + pub fn forbid_file>(&self, path: P) { + let path = path.as_ref(); + + self.denied.lock().unwrap().push(path.to_path_buf()); + + self.emit(Event::PathForbidden(path.to_path_buf())); + } + + /// List of allowed paths. + pub fn allowed(&self) -> Vec { + self.allowed.lock().unwrap().clone() + } + + /// List of forbidden paths. + pub fn forbidden(&self) -> Vec { + self.denied.lock().unwrap().clone() + } + + fn next_event_id(&self) -> u32 { + self.next_event_id.fetch_add(1, Ordering::Relaxed) + } + + fn emit(&self, event: Event) { + let listeners = self.event_listeners.lock().unwrap(); + let handlers = listeners.values(); + for listener in handlers { + listener(&event); + } + } + + /// Listen to an event on this scope. + pub fn listen(&self, f: F) -> EventId { + let id = self.next_event_id(); + self.event_listeners.lock().unwrap().insert(id, Box::new(f)); + id + } +} diff --git a/plugins/fs/src/watcher.rs b/plugins/fs/src/watcher.rs index 07e46b616..eae62698e 100644 --- a/plugins/fs/src/watcher.rs +++ b/plugins/fs/src/watcher.rs @@ -6,7 +6,7 @@ use notify::{Config, Event, RecommendedWatcher, RecursiveMode, Watcher}; use notify_debouncer_full::{new_debouncer, DebounceEventResult, Debouncer, FileIdMap}; use serde::Deserialize; use tauri::{ - ipc::Channel, + ipc::{Channel, CommandScope, GlobalScope}, path::{BaseDirectory, SafePathBuf}, AppHandle, Manager, Resource, ResourceId, Runtime, }; @@ -21,7 +21,10 @@ use std::{ time::Duration, }; -use crate::commands::{resolve_path, CommandResult}; +use crate::{ + commands::{resolve_path, CommandResult}, + scope::Entry, +}; struct InnerWatcher { pub kind: WatcherKind, @@ -83,10 +86,18 @@ pub async fn watch( paths: Vec, options: WatchOptions, on_event: Channel, + global_scope: GlobalScope<'_, Entry>, + command_scope: CommandScope<'_, Entry>, ) -> CommandResult { let mut resolved_paths = Vec::with_capacity(paths.capacity()); for path in paths { - resolved_paths.push(resolve_path(&app, path, options.dir)?); + resolved_paths.push(resolve_path( + &app, + &global_scope, + &command_scope, + path, + options.dir, + )?); } let mode = if options.recursive { diff --git a/plugins/global-shortcut/Cargo.toml b/plugins/global-shortcut/Cargo.toml index c2850766b..b087e4aa1 100644 --- a/plugins/global-shortcut/Cargo.toml +++ b/plugins/global-shortcut/Cargo.toml @@ -6,10 +6,14 @@ edition = { workspace = true } authors = { workspace = true } license = { workspace = true } rust-version = { workspace = true } +links = "tauri-plugin-global-shortcut" [package.metadata.docs.rs] -rustc-args = [ "--cfg", "docsrs" ] -rustdoc-args = [ "--cfg", "docsrs" ] +rustc-args = ["--cfg", "docsrs"] +rustdoc-args = ["--cfg", "docsrs"] + +[build-dependencies] +tauri-plugin = { workspace = true, features = ["build"] } [dependencies] serde = { workspace = true } diff --git a/plugins/global-shortcut/build.rs b/plugins/global-shortcut/build.rs new file mode 100644 index 000000000..8c5c71dfd --- /dev/null +++ b/plugins/global-shortcut/build.rs @@ -0,0 +1,15 @@ +// Copyright 2019-2023 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + +const COMMANDS: &[&str] = &[ + "register", + "register_all", + "unregister", + "unregister_all", + "is_registered", +]; + +fn main() { + tauri_plugin::Builder::new(COMMANDS).build(); +} diff --git a/plugins/global-shortcut/guest-js/index.ts b/plugins/global-shortcut/guest-js/index.ts index 337e62fa6..e9cd935fe 100644 --- a/plugins/global-shortcut/guest-js/index.ts +++ b/plugins/global-shortcut/guest-js/index.ts @@ -34,7 +34,7 @@ async function register( const h = new Channel(); h.onmessage = handler; - return await invoke("plugin:globalShortcut|register", { + return await invoke("plugin:global-shortcut|register", { shortcut, handler: h, }); @@ -62,7 +62,7 @@ async function registerAll( const h = new Channel(); h.onmessage = handler; - return await invoke("plugin:globalShortcut|register_all", { + return await invoke("plugin:global-shortcut|register_all", { shortcuts, handler: h, }); @@ -84,7 +84,7 @@ async function registerAll( * @since 2.0.0 */ async function isRegistered(shortcut: string): Promise { - return await invoke("plugin:globalShortcut|is_registered", { + return await invoke("plugin:global-shortcut|is_registered", { shortcut, }); } @@ -102,7 +102,7 @@ async function isRegistered(shortcut: string): Promise { * @since 2.0.0 */ async function unregister(shortcut: string): Promise { - return await invoke("plugin:globalShortcut|unregister", { + return await invoke("plugin:global-shortcut|unregister", { shortcut, }); } @@ -118,7 +118,7 @@ async function unregister(shortcut: string): Promise { * @since 2.0.0 */ async function unregisterAll(): Promise { - return await invoke("plugin:globalShortcut|unregister_all"); + return await invoke("plugin:global-shortcut|unregister_all"); } export { register, registerAll, isRegistered, unregister, unregisterAll }; diff --git a/plugins/global-shortcut/package.json b/plugins/global-shortcut/package.json index f78dca4d5..db7bb1d5f 100644 --- a/plugins/global-shortcut/package.json +++ b/plugins/global-shortcut/package.json @@ -23,6 +23,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.13" + "@tauri-apps/api": "2.0.0-beta.0" } } diff --git a/plugins/global-shortcut/permissions/.dgitignore b/plugins/global-shortcut/permissions/.dgitignore new file mode 100644 index 000000000..c75f615b1 --- /dev/null +++ b/plugins/global-shortcut/permissions/.dgitignore @@ -0,0 +1 @@ +schemas/ diff --git a/plugins/global-shortcut/permissions/.gitignore b/plugins/global-shortcut/permissions/.gitignore new file mode 100644 index 000000000..c75f615b1 --- /dev/null +++ b/plugins/global-shortcut/permissions/.gitignore @@ -0,0 +1 @@ +schemas/ diff --git a/plugins/global-shortcut/permissions/autogenerated/commands/is_registered.toml b/plugins/global-shortcut/permissions/autogenerated/commands/is_registered.toml new file mode 100644 index 000000000..2dd73acea --- /dev/null +++ b/plugins/global-shortcut/permissions/autogenerated/commands/is_registered.toml @@ -0,0 +1,13 @@ +# 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"] diff --git a/plugins/global-shortcut/permissions/autogenerated/commands/register.toml b/plugins/global-shortcut/permissions/autogenerated/commands/register.toml new file mode 100644 index 000000000..4eec17dc7 --- /dev/null +++ b/plugins/global-shortcut/permissions/autogenerated/commands/register.toml @@ -0,0 +1,13 @@ +# 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"] diff --git a/plugins/global-shortcut/permissions/autogenerated/commands/register_all.toml b/plugins/global-shortcut/permissions/autogenerated/commands/register_all.toml new file mode 100644 index 000000000..df5d0ecff --- /dev/null +++ b/plugins/global-shortcut/permissions/autogenerated/commands/register_all.toml @@ -0,0 +1,13 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +[[permission]] +identifier = "allow-register-all" +description = "Enables the register_all command without any pre-configured scope." +commands.allow = ["register_all"] + +[[permission]] +identifier = "deny-register-all" +description = "Denies the register_all command without any pre-configured scope." +commands.deny = ["register_all"] diff --git a/plugins/global-shortcut/permissions/autogenerated/commands/unregister.toml b/plugins/global-shortcut/permissions/autogenerated/commands/unregister.toml new file mode 100644 index 000000000..5d33c97c2 --- /dev/null +++ b/plugins/global-shortcut/permissions/autogenerated/commands/unregister.toml @@ -0,0 +1,13 @@ +# 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"] diff --git a/plugins/global-shortcut/permissions/autogenerated/commands/unregister_all.toml b/plugins/global-shortcut/permissions/autogenerated/commands/unregister_all.toml new file mode 100644 index 000000000..12c12f8bc --- /dev/null +++ b/plugins/global-shortcut/permissions/autogenerated/commands/unregister_all.toml @@ -0,0 +1,13 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +[[permission]] +identifier = "allow-unregister-all" +description = "Enables the unregister_all command without any pre-configured scope." +commands.allow = ["unregister_all"] + +[[permission]] +identifier = "deny-unregister-all" +description = "Denies the unregister_all command without any pre-configured scope." +commands.deny = ["unregister_all"] diff --git a/plugins/global-shortcut/permissions/autogenerated/reference.md b/plugins/global-shortcut/permissions/autogenerated/reference.md new file mode 100644 index 000000000..daff8abad --- /dev/null +++ b/plugins/global-shortcut/permissions/autogenerated/reference.md @@ -0,0 +1,42 @@ +# Permissions + +## allow-is-registered + +Enables the is_registered command without any pre-configured scope. + +## deny-is-registered + +Denies the is_registered command without any pre-configured scope. + +## allow-register + +Enables the register command without any pre-configured scope. + +## deny-register + +Denies the register command without any pre-configured scope. + +## allow-register-all + +Enables the register_all command without any pre-configured scope. + +## deny-register-all + +Denies the register_all command without any pre-configured scope. + +## allow-unregister + +Enables the unregister command without any pre-configured scope. + +## deny-unregister + +Denies the unregister command without any pre-configured scope. + +## allow-unregister-all + +Enables the unregister_all command without any pre-configured scope. + +## deny-unregister-all + +Denies the unregister_all command without any pre-configured scope. + diff --git a/plugins/global-shortcut/src/api-iife.js b/plugins/global-shortcut/src/api-iife.js index a46308f19..54da2b597 100644 --- a/plugins/global-shortcut/src/api-iife.js +++ b/plugins/global-shortcut/src/api-iife.js @@ -1 +1 @@ -if("__TAURI__"in window){var __TAURI_PLUGIN_GLOBALSHORTCUT__=function(t){"use strict";function e(t,e,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(t):n?n.value:e.get(t)}var r;"function"==typeof SuppressedError&&SuppressedError;class n{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,r.set(this,(()=>{})),this.id=function(t,e=!1){return window.__TAURI_INTERNALS__.transformCallback(t,e)}((t=>{e(this,r,"f").call(this,t)}))}set onmessage(t){!function(t,e,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===n?o.call(t,r):o?o.value=r:e.set(t,r)}(this,r,t,"f")}get onmessage(){return e(this,r,"f")}toJSON(){return`__CHANNEL__:${this.id}`}}async function o(t,e={},r){return window.__TAURI_INTERNALS__.invoke(t,e,r)}return r=new WeakMap,t.isRegistered=async function(t){return await o("plugin:globalShortcut|is_registered",{shortcut:t})},t.register=async function(t,e){const r=new n;return r.onmessage=e,await o("plugin:globalShortcut|register",{shortcut:t,handler:r})},t.registerAll=async function(t,e){const r=new n;return r.onmessage=e,await o("plugin:globalShortcut|register_all",{shortcuts:t,handler:r})},t.unregister=async function(t){return await o("plugin:globalShortcut|unregister",{shortcut:t})},t.unregisterAll=async function(){return await o("plugin:globalShortcut|unregister_all")},t}({});Object.defineProperty(window.__TAURI__,"globalShortcut",{value:__TAURI_PLUGIN_GLOBALSHORTCUT__})} +if("__TAURI__"in window){var __TAURI_PLUGIN_GLOBALSHORTCUT__=function(t){"use strict";function e(t,e,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(t):n?n.value:e.get(t)}var r;"function"==typeof SuppressedError&&SuppressedError;class n{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,r.set(this,(()=>{})),this.id=function(t,e=!1){return window.__TAURI_INTERNALS__.transformCallback(t,e)}((t=>{e(this,r,"f").call(this,t)}))}set onmessage(t){!function(t,e,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===n?o.call(t,r):o?o.value=r:e.set(t,r)}(this,r,t,"f")}get onmessage(){return e(this,r,"f")}toJSON(){return`__CHANNEL__:${this.id}`}}async function o(t,e={},r){return window.__TAURI_INTERNALS__.invoke(t,e,r)}return r=new WeakMap,t.isRegistered=async function(t){return await o("plugin:global-shortcut|is_registered",{shortcut:t})},t.register=async function(t,e){const r=new n;return r.onmessage=e,await o("plugin:global-shortcut|register",{shortcut:t,handler:r})},t.registerAll=async function(t,e){const r=new n;return r.onmessage=e,await o("plugin:global-shortcut|register_all",{shortcuts:t,handler:r})},t.unregister=async function(t){return await o("plugin:global-shortcut|unregister",{shortcut:t})},t.unregisterAll=async function(){return await o("plugin:global-shortcut|unregister_all")},t}({});Object.defineProperty(window.__TAURI__,"globalShortcut",{value:__TAURI_PLUGIN_GLOBALSHORTCUT__})} diff --git a/plugins/global-shortcut/src/lib.rs b/plugins/global-shortcut/src/lib.rs index 1cb9d25c1..eed72a99c 100644 --- a/plugins/global-shortcut/src/lib.rs +++ b/plugins/global-shortcut/src/lib.rs @@ -295,7 +295,7 @@ impl Builder { pub fn build(self) -> TauriPlugin { let handler = self.handler; - PluginBuilder::new("globalShortcut") + PluginBuilder::new("global-shortcut") .js_init_script(include_str!("api-iife.js").to_string()) .invoke_handler(tauri::generate_handler![ register, diff --git a/plugins/http/Cargo.toml b/plugins/http/Cargo.toml index 108c3b894..d65dc7e22 100644 --- a/plugins/http/Cargo.toml +++ b/plugins/http/Cargo.toml @@ -6,10 +6,18 @@ edition = { workspace = true } authors = { workspace = true } license = { workspace = true } rust-version = { workspace = true } +links = "tauri-plugin-http" [package.metadata.docs.rs] -rustc-args = [ "--cfg", "docsrs" ] -rustdoc-args = [ "--cfg", "docsrs" ] +rustc-args = ["--cfg", "docsrs"] +rustdoc-args = ["--cfg", "docsrs"] + +[build-dependencies] +tauri-plugin = { workspace = true, features = ["build"] } +schemars = { workspace = true } +serde = { workspace = true } +url = { workspace = true } +glob = "0.3" [dependencies] serde = { workspace = true } @@ -24,22 +32,22 @@ url = { workspace = true } data-url = "0.3" [features] -multipart = [ "reqwest/multipart" ] -json = [ "reqwest/json" ] -stream = [ "reqwest/stream" ] -native-tls = [ "reqwest/native-tls" ] -native-tls-vendored = [ "reqwest/native-tls-vendored" ] -rustls-tls = [ "reqwest/rustls-tls" ] -default-tls = [ "reqwest/default-tls" ] -native-tls-alpn = [ "reqwest/native-tls-alpn" ] -rustls-tls-manual-roots = [ "reqwest/rustls-tls-manual-roots" ] -rustls-tls-webpki-roots = [ "reqwest/rustls-tls-webpki-roots" ] -rustls-tls-native-roots = [ "reqwest/rustls-tls-native-roots" ] -blocking = [ "reqwest/blocking" ] -cookies = [ "reqwest/cookies" ] -gzip = [ "reqwest/gzip" ] -brotli = [ "reqwest/brotli" ] -deflate = [ "reqwest/deflate" ] -trust-dns = [ "reqwest/trust-dns" ] -socks = [ "reqwest/socks" ] -http3 = [ "reqwest/http3" ] +multipart = ["reqwest/multipart"] +json = ["reqwest/json"] +stream = ["reqwest/stream"] +native-tls = ["reqwest/native-tls"] +native-tls-vendored = ["reqwest/native-tls-vendored"] +rustls-tls = ["reqwest/rustls-tls"] +default-tls = ["reqwest/default-tls"] +native-tls-alpn = ["reqwest/native-tls-alpn"] +rustls-tls-manual-roots = ["reqwest/rustls-tls-manual-roots"] +rustls-tls-webpki-roots = ["reqwest/rustls-tls-webpki-roots"] +rustls-tls-native-roots = ["reqwest/rustls-tls-native-roots"] +blocking = ["reqwest/blocking"] +cookies = ["reqwest/cookies"] +gzip = ["reqwest/gzip"] +brotli = ["reqwest/brotli"] +deflate = ["reqwest/deflate"] +trust-dns = ["reqwest/trust-dns"] +socks = ["reqwest/socks"] +http3 = ["reqwest/http3"] diff --git a/plugins/http/build.rs b/plugins/http/build.rs new file mode 100644 index 000000000..2eaf72ba6 --- /dev/null +++ b/plugins/http/build.rs @@ -0,0 +1,40 @@ +// Copyright 2019-2023 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + +#[path = "src/scope.rs"] +#[allow(dead_code)] +mod scope; + +const COMMANDS: &[&str] = &["fetch", "fetch_cancel", "fetch_send", "fetch_read_body"]; + +/// HTTP scope entry object definition. +#[derive(schemars::JsonSchema)] +struct ScopeEntry { + /// A URL that can be accessed by the webview when using the HTTP APIs. + /// The scoped URL is matched against the request URL using a glob pattern. + /// + /// Examples: + /// + /// - "https://*" or "https://**" : allows all HTTPS urls + /// + /// - "https://*.github.com/tauri-apps/tauri": allows any subdomain of "github.com" with the "tauri-apps/api" path + /// + /// - "https://myapi.service.com/users/*": allows access to any URLs that begins with "https://myapi.service.com/users/" + url: String, +} + +// ensure scope entry is up to date +impl From for scope::Entry { + fn from(value: ScopeEntry) -> Self { + scope::Entry { + url: value.url.parse().unwrap(), + } + } +} + +fn main() { + tauri_plugin::Builder::new(COMMANDS) + .global_scope_schema(schemars::schema_for!(ScopeEntry)) + .build(); +} diff --git a/plugins/http/package.json b/plugins/http/package.json index 2e5b456ab..ec850ee60 100644 --- a/plugins/http/package.json +++ b/plugins/http/package.json @@ -23,6 +23,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.13" + "@tauri-apps/api": "2.0.0-beta.0" } } diff --git a/plugins/http/permissions/.dgitignore b/plugins/http/permissions/.dgitignore new file mode 100644 index 000000000..c75f615b1 --- /dev/null +++ b/plugins/http/permissions/.dgitignore @@ -0,0 +1 @@ +schemas/ diff --git a/plugins/http/permissions/.gitignore b/plugins/http/permissions/.gitignore new file mode 100644 index 000000000..c75f615b1 --- /dev/null +++ b/plugins/http/permissions/.gitignore @@ -0,0 +1 @@ +schemas/ diff --git a/plugins/http/permissions/autogenerated/commands/fetch.toml b/plugins/http/permissions/autogenerated/commands/fetch.toml new file mode 100644 index 000000000..c4e068a7c --- /dev/null +++ b/plugins/http/permissions/autogenerated/commands/fetch.toml @@ -0,0 +1,13 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +[[permission]] +identifier = "allow-fetch" +description = "Enables the fetch command without any pre-configured scope." +commands.allow = ["fetch"] + +[[permission]] +identifier = "deny-fetch" +description = "Denies the fetch command without any pre-configured scope." +commands.deny = ["fetch"] diff --git a/plugins/http/permissions/autogenerated/commands/fetch_cancel.toml b/plugins/http/permissions/autogenerated/commands/fetch_cancel.toml new file mode 100644 index 000000000..70c1139b5 --- /dev/null +++ b/plugins/http/permissions/autogenerated/commands/fetch_cancel.toml @@ -0,0 +1,13 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +[[permission]] +identifier = "allow-fetch-cancel" +description = "Enables the fetch_cancel command without any pre-configured scope." +commands.allow = ["fetch_cancel"] + +[[permission]] +identifier = "deny-fetch-cancel" +description = "Denies the fetch_cancel command without any pre-configured scope." +commands.deny = ["fetch_cancel"] diff --git a/plugins/http/permissions/autogenerated/commands/fetch_read_body.toml b/plugins/http/permissions/autogenerated/commands/fetch_read_body.toml new file mode 100644 index 000000000..b5867e99f --- /dev/null +++ b/plugins/http/permissions/autogenerated/commands/fetch_read_body.toml @@ -0,0 +1,13 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +[[permission]] +identifier = "allow-fetch-read-body" +description = "Enables the fetch_read_body command without any pre-configured scope." +commands.allow = ["fetch_read_body"] + +[[permission]] +identifier = "deny-fetch-read-body" +description = "Denies the fetch_read_body command without any pre-configured scope." +commands.deny = ["fetch_read_body"] diff --git a/plugins/http/permissions/autogenerated/commands/fetch_send.toml b/plugins/http/permissions/autogenerated/commands/fetch_send.toml new file mode 100644 index 000000000..f6a55d280 --- /dev/null +++ b/plugins/http/permissions/autogenerated/commands/fetch_send.toml @@ -0,0 +1,13 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +[[permission]] +identifier = "allow-fetch-send" +description = "Enables the fetch_send command without any pre-configured scope." +commands.allow = ["fetch_send"] + +[[permission]] +identifier = "deny-fetch-send" +description = "Denies the fetch_send command without any pre-configured scope." +commands.deny = ["fetch_send"] diff --git a/plugins/http/permissions/autogenerated/reference.md b/plugins/http/permissions/autogenerated/reference.md new file mode 100644 index 000000000..16508acbb --- /dev/null +++ b/plugins/http/permissions/autogenerated/reference.md @@ -0,0 +1,38 @@ +# Permissions + +## allow-fetch + +Enables the fetch command without any pre-configured scope. + +## deny-fetch + +Denies the fetch command without any pre-configured scope. + +## allow-fetch-cancel + +Enables the fetch_cancel command without any pre-configured scope. + +## deny-fetch-cancel + +Denies the fetch_cancel command without any pre-configured scope. + +## allow-fetch-read-body + +Enables the fetch_read_body command without any pre-configured scope. + +## deny-fetch-read-body + +Denies the fetch_read_body command without any pre-configured scope. + +## allow-fetch-send + +Enables the fetch_send command without any pre-configured scope. + +## deny-fetch-send + +Denies the fetch_send command without any pre-configured scope. + +## default + +Allows all fetch operations + diff --git a/plugins/http/permissions/default.toml b/plugins/http/permissions/default.toml new file mode 100644 index 000000000..fd7802b43 --- /dev/null +++ b/plugins/http/permissions/default.toml @@ -0,0 +1,9 @@ +"$schema" = "schemas/schema.json" +[default] +description = "Allows all fetch operations" +permissions = [ + "allow-fetch", + "allow-fetch-cancel", + "allow-fetch-read-body", + "allow-fetch-send", +] diff --git a/plugins/http/src/commands.rs b/plugins/http/src/commands.rs index d6bd9cf73..bc030b851 100644 --- a/plugins/http/src/commands.rs +++ b/plugins/http/src/commands.rs @@ -7,9 +7,17 @@ use std::{collections::HashMap, future::Future, pin::Pin, sync::Arc, time::Durat use http::{header, HeaderName, HeaderValue, Method, StatusCode}; use reqwest::{redirect::Policy, NoProxy}; use serde::{Deserialize, Serialize}; -use tauri::{async_runtime::Mutex, command, AppHandle, Manager, ResourceId, Runtime}; - -use crate::{Error, HttpExt, Result}; +use tauri::{ + async_runtime::Mutex, + command, + ipc::{CommandScope, GlobalScope}, + AppHandle, Manager, ResourceId, Runtime, +}; + +use crate::{ + scope::{Entry, Scope}, + Error, Result, +}; struct ReqwestResponse(reqwest::Response); @@ -131,6 +139,8 @@ fn attach_proxy( pub async fn fetch( app: AppHandle, client_config: ClientConfig, + command_scope: CommandScope<'_, Entry>, + global_scope: GlobalScope<'_, Entry>, ) -> crate::Result { let ClientConfig { method, @@ -148,7 +158,20 @@ pub async fn fetch( match scheme { "http" | "https" => { - if app.http().scope.is_allowed(&url) { + if Scope::new( + command_scope + .allows() + .iter() + .chain(global_scope.allows()) + .collect(), + command_scope + .denies() + .iter() + .chain(global_scope.denies()) + .collect(), + ) + .is_allowed(&url) + { let mut builder = reqwest::ClientBuilder::new(); if let Some(timeout) = connect_timeout { @@ -238,10 +261,11 @@ pub async fn fetch_cancel(app: AppHandle, rid: ResourceId) -> cra }; let mut req = req.0.lock().await; *req = Box::pin(async { Err(Error::RequestCanceled) }); + Ok(()) } -#[command] +#[tauri::command] pub async fn fetch_send( app: AppHandle, rid: ResourceId, @@ -278,7 +302,7 @@ pub async fn fetch_send( }) } -#[command] +#[tauri::command] pub(crate) async fn fetch_read_body( app: AppHandle, rid: ResourceId, diff --git a/plugins/http/src/config.rs b/plugins/http/src/config.rs deleted file mode 100644 index e4ac882b3..000000000 --- a/plugins/http/src/config.rs +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2019-2023 Tauri Programme within The Commons Conservancy -// SPDX-License-Identifier: Apache-2.0 -// SPDX-License-Identifier: MIT - -use serde::Deserialize; - -#[derive(Deserialize)] -pub struct Config { - pub scope: HttpAllowlistScope, -} - -/// HTTP API scope definition. -/// It is a list of URLs that can be accessed by the webview when using the HTTP APIs. -/// The scoped URL is matched against the request URL using a glob pattern. -/// -/// Examples: -/// - "https://*" or "https://**" : allows all HTTPS urls -/// - "https://*.github.com/tauri-apps/tauri": allows any subdomain of "github.com" with the "tauri-apps/api" path -/// - "https://myapi.service.com/users/*": allows access to any URLs that begins with "https://myapi.service.com/users/" -#[allow(rustdoc::bare_urls)] -#[derive(Debug, Default, PartialEq, Eq, Clone, Deserialize)] -pub struct HttpAllowlistScope(pub Vec); diff --git a/plugins/http/src/lib.rs b/plugins/http/src/lib.rs index b7a7f4288..e4aa7ba1e 100644 --- a/plugins/http/src/lib.rs +++ b/plugins/http/src/lib.rs @@ -12,18 +12,15 @@ use tauri::{ AppHandle, Manager, Runtime, }; -use crate::config::{Config, HttpAllowlistScope}; pub use error::{Error, Result}; mod commands; -mod config; mod error; mod scope; struct Http { #[allow(dead_code)] app: AppHandle, - scope: scope::Scope, } trait HttpExt { @@ -36,8 +33,8 @@ impl> HttpExt for T { } } -pub fn init() -> TauriPlugin> { - Builder::>::new("http") +pub fn init() -> TauriPlugin { + Builder::::new("http") .js_init_script(include_str!("api-iife.js").to_string()) .invoke_handler(tauri::generate_handler![ commands::fetch, @@ -45,17 +42,8 @@ pub fn init() -> TauriPlugin> { commands::fetch_send, commands::fetch_read_body, ]) - .setup(|app, api| { - let default_scope = HttpAllowlistScope::default(); - app.manage(Http { - app: app.clone(), - scope: scope::Scope::new( - api.config() - .as_ref() - .map(|c| &c.scope) - .unwrap_or(&default_scope), - ), - }); + .setup(|app, _api| { + app.manage(Http { app: app.clone() }); Ok(()) }) .build() diff --git a/plugins/http/src/scope.rs b/plugins/http/src/scope.rs index 00ef7e083..d80a55fbe 100644 --- a/plugins/http/src/scope.rs +++ b/plugins/http/src/scope.rs @@ -2,52 +2,92 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT -use glob::Pattern; -use reqwest::Url; +use serde::{Deserialize, Deserializer}; +use url::Url; -use crate::config::HttpAllowlistScope; +#[allow(rustdoc::bare_urls)] +#[derive(Debug)] +pub struct Entry { + pub url: glob::Pattern, +} + +impl<'de> Deserialize<'de> for Entry { + fn deserialize(deserializer: D) -> std::result::Result + where + D: Deserializer<'de>, + { + #[derive(Deserialize)] + struct EntryRaw { + url: String, + } + + EntryRaw::deserialize(deserializer).and_then(|raw| { + Ok(Entry { + url: glob::Pattern::new(&raw.url).map_err(|e| { + serde::de::Error::custom(format!( + "URL `{}` is not a valid glob pattern: {e}", + raw.url + )) + })?, + }) + }) + } +} /// Scope for filesystem access. -#[derive(Debug, Clone)] -pub struct Scope { - allowed_urls: Vec, +#[derive(Debug)] +pub struct Scope<'a> { + allowed: Vec<&'a Entry>, + denied: Vec<&'a Entry>, } -impl Scope { +impl<'a> Scope<'a> { /// Creates a new scope from the scope configuration. - pub(crate) fn new(scope: &HttpAllowlistScope) -> Self { - Self { - allowed_urls: scope - .0 - .iter() - .map(|url| { - glob::Pattern::new(url).unwrap_or_else(|_| { - panic!("scoped URL is not a valid glob pattern: `{url}`") - }) - }) - .collect(), - } + pub(crate) fn new(allowed: Vec<&'a Entry>, denied: Vec<&'a Entry>) -> Self { + Self { allowed, denied } } /// Determines if the given URL is allowed on this scope. pub fn is_allowed(&self, url: &Url) -> bool { - self.allowed_urls.iter().any(|allowed| { - allowed.matches(url.as_str()) - || allowed.matches(url.as_str().strip_suffix('/').unwrap_or_default()) - }) + let denied = self.denied.iter().any(|entry| { + entry.url.matches(url.as_str()) + || entry + .url + .matches(url.as_str().strip_suffix('/').unwrap_or_default()) + }); + if denied { + false + } else { + self.allowed.iter().any(|entry| { + entry.url.matches(url.as_str()) + || entry + .url + .matches(url.as_str().strip_suffix('/').unwrap_or_default()) + }) + } } } #[cfg(test)] mod tests { - use crate::config::HttpAllowlistScope; + use std::str::FromStr; + + use super::Entry; + + impl FromStr for Entry { + type Err = glob::PatternError; + + fn from_str(s: &str) -> Result { + let pattern = s.parse()?; + Ok(Self { url: pattern }) + } + } #[test] fn is_allowed() { // plain URL - let scope = super::Scope::new(&HttpAllowlistScope(vec!["http://localhost:8080" - .parse() - .unwrap()])); + let entry = "http://localhost:8080".parse().unwrap(); + let scope = super::Scope::new(vec![&entry], Vec::new()); assert!(scope.is_allowed(&"http://localhost:8080".parse().unwrap())); assert!(scope.is_allowed(&"http://localhost:8080/".parse().unwrap())); @@ -57,10 +97,15 @@ mod tests { assert!(!scope.is_allowed(&"http://localhost:8081".parse().unwrap())); assert!(!scope.is_allowed(&"http://local:8080".parse().unwrap())); + // deny takes precedence + let allow = "http://localhost:8080/file.png".parse().unwrap(); + let deny = "http://localhost:8080/*".parse().unwrap(); + let scope = super::Scope::new(vec![&allow], vec![&deny]); + assert!(!scope.is_allowed(&"http://localhost:8080/file.png".parse().unwrap())); + // URL with fixed path - let scope = super::Scope::new(&HttpAllowlistScope(vec!["http://localhost:8080/file.png" - .parse() - .unwrap()])); + let entry = "http://localhost:8080/file.png".parse().unwrap(); + let scope = super::Scope::new(vec![&entry], Vec::new()); assert!(scope.is_allowed(&"http://localhost:8080/file.png".parse().unwrap())); @@ -69,22 +114,23 @@ mod tests { assert!(!scope.is_allowed(&"http://localhost:8080/file.png/other.jpg".parse().unwrap())); // URL with glob pattern - let scope = super::Scope::new(&HttpAllowlistScope(vec!["http://localhost:8080/*.png" - .parse() - .unwrap()])); + let entry = "http://localhost:8080/*.png".parse().unwrap(); + let scope = super::Scope::new(vec![&entry], Vec::new()); assert!(scope.is_allowed(&"http://localhost:8080/file.png".parse().unwrap())); assert!(scope.is_allowed(&"http://localhost:8080/assets/file.png".parse().unwrap())); assert!(!scope.is_allowed(&"http://localhost:8080/file.jpeg".parse().unwrap())); - let scope = super::Scope::new(&HttpAllowlistScope(vec!["http://*".parse().unwrap()])); + let entry = "http://*".parse().unwrap(); + let scope = super::Scope::new(vec![&entry], Vec::new()); assert!(scope.is_allowed(&"http://something.else".parse().unwrap())); assert!(scope.is_allowed(&"http://something.else/path/to/file".parse().unwrap())); assert!(!scope.is_allowed(&"https://something.else".parse().unwrap())); - let scope = super::Scope::new(&HttpAllowlistScope(vec!["http://**".parse().unwrap()])); + let entry = "http://**".parse().unwrap(); + let scope = super::Scope::new(vec![&entry], Vec::new()); assert!(scope.is_allowed(&"http://something.else".parse().unwrap())); assert!(scope.is_allowed(&"http://something.else/path/to/file".parse().unwrap())); diff --git a/plugins/localhost/Cargo.toml b/plugins/localhost/Cargo.toml index 3d3f42895..93bb6557a 100644 --- a/plugins/localhost/Cargo.toml +++ b/plugins/localhost/Cargo.toml @@ -8,8 +8,8 @@ edition = { workspace = true } rust-version = { workspace = true } [package.metadata.docs.rs] -rustc-args = [ "--cfg", "docsrs" ] -rustdoc-args = [ "--cfg", "docsrs" ] +rustc-args = ["--cfg", "docsrs"] +rustdoc-args = ["--cfg", "docsrs"] [dependencies] serde = { workspace = true } diff --git a/plugins/log/Cargo.toml b/plugins/log/Cargo.toml index b66b3f4e4..1bc09aa64 100644 --- a/plugins/log/Cargo.toml +++ b/plugins/log/Cargo.toml @@ -6,13 +6,14 @@ authors = { workspace = true } license = { workspace = true } edition = { workspace = true } rust-version = { workspace = true } +links = "tauri-plugin-log" [package.metadata.docs.rs] -rustc-args = [ "--cfg", "docsrs" ] -rustdoc-args = [ "--cfg", "docsrs" ] +rustc-args = ["--cfg", "docsrs"] +rustdoc-args = ["--cfg", "docsrs"] [build-dependencies] -tauri-build = { workspace = true } +tauri-plugin = { workspace = true, features = ["build"] } [dependencies] serde = { workspace = true } @@ -20,8 +21,8 @@ serde_json = { workspace = true } tauri = { workspace = true } serde_repr = "0.1" byte-unit = "4.0" -log = { workspace = true, features = [ "kv_unstable" ] } -time = { version = "0.3", features = [ "formatting", "local-offset" ] } +log = { workspace = true, features = ["kv_unstable"] } +time = { version = "0.3", features = ["formatting", "local-offset"] } fern = "0.6" [target."cfg(target_os = \"android\")".dependencies] @@ -33,4 +34,4 @@ objc = "0.2" cocoa = "0.24" [features] -colored = [ "fern/colored" ] +colored = ["fern/colored"] diff --git a/plugins/log/build.rs b/plugins/log/build.rs index e499a5e5d..f413529a1 100644 --- a/plugins/log/build.rs +++ b/plugins/log/build.rs @@ -2,14 +2,8 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT -use std::process::exit; +const COMMANDS: &[&str] = &["log"]; fn main() { - if let Err(error) = tauri_build::mobile::PluginBuilder::new() - .ios_path("ios") - .run() - { - println!("{error:#}"); - exit(1); - } + tauri_plugin::Builder::new(COMMANDS).ios_path("ios").build(); } diff --git a/plugins/log/package.json b/plugins/log/package.json index 16d0922dd..452117bb5 100644 --- a/plugins/log/package.json +++ b/plugins/log/package.json @@ -24,6 +24,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.13" + "@tauri-apps/api": "2.0.0-beta.0" } } diff --git a/plugins/log/permissions/.dgitignore b/plugins/log/permissions/.dgitignore new file mode 100644 index 000000000..c75f615b1 --- /dev/null +++ b/plugins/log/permissions/.dgitignore @@ -0,0 +1 @@ +schemas/ diff --git a/plugins/log/permissions/.gitignore b/plugins/log/permissions/.gitignore new file mode 100644 index 000000000..c75f615b1 --- /dev/null +++ b/plugins/log/permissions/.gitignore @@ -0,0 +1 @@ +schemas/ diff --git a/plugins/log/permissions/autogenerated/commands/log.toml b/plugins/log/permissions/autogenerated/commands/log.toml new file mode 100644 index 000000000..ba36eff5b --- /dev/null +++ b/plugins/log/permissions/autogenerated/commands/log.toml @@ -0,0 +1,13 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +[[permission]] +identifier = "allow-log" +description = "Enables the log command without any pre-configured scope." +commands.allow = ["log"] + +[[permission]] +identifier = "deny-log" +description = "Denies the log command without any pre-configured scope." +commands.deny = ["log"] diff --git a/plugins/log/permissions/autogenerated/reference.md b/plugins/log/permissions/autogenerated/reference.md new file mode 100644 index 000000000..7dd146d0d --- /dev/null +++ b/plugins/log/permissions/autogenerated/reference.md @@ -0,0 +1,14 @@ +# Permissions + +## allow-log + +Enables the log command without any pre-configured scope. + +## deny-log + +Denies the log command without any pre-configured scope. + +## default + +Allows the log command + diff --git a/plugins/log/permissions/default.toml b/plugins/log/permissions/default.toml new file mode 100644 index 000000000..b2cb7c3ae --- /dev/null +++ b/plugins/log/permissions/default.toml @@ -0,0 +1,4 @@ +"$schema" = "schemas/schema.json" +[default] +description = "Allows the log command" +permissions = ["allow-log"] diff --git a/plugins/log/src/api-iife.js b/plugins/log/src/api-iife.js index c28d7da39..6d6a3e1cf 100644 --- a/plugins/log/src/api-iife.js +++ b/plugins/log/src/api-iife.js @@ -1 +1 @@ -if("__TAURI__"in window){var __TAURI_PLUGIN_LOG__=function(e){"use strict";function n(e,n=!1){return window.__TAURI_INTERNALS__.transformCallback(e,n)}async function r(e,n={},r){return window.__TAURI_INTERNALS__.invoke(e,n,r)}var a,o;async function t(e,a,o){return r("plugin:event|listen",{event:e,windowLabel:o?.target,handler:n(a)}).then((n=>async()=>async function(e,n){await r("plugin:event|unlisten",{event:e,eventId:n})}(e,n)))}async function i(e,n,a){const o=(new Error).stack?.split("\n").map((e=>e.split("@"))),t=o?.filter((([e,n])=>e.length>0&&"[native code]"!==n)),{file:i,line:c,keyValues:l}=a??{};let u=t?.[0]?.filter((e=>e.length>0)).join("@");"Error"===u&&(u="webview::unknown"),await r("plugin:log|log",{level:e,message:n,location:u,file:i,line:c,keyValues:l})}return"function"==typeof SuppressedError&&SuppressedError,function(e){e.WINDOW_RESIZED="tauri://resize",e.WINDOW_MOVED="tauri://move",e.WINDOW_CLOSE_REQUESTED="tauri://close-requested",e.WINDOW_CREATED="tauri://window-created",e.WINDOW_DESTROYED="tauri://destroyed",e.WINDOW_FOCUS="tauri://focus",e.WINDOW_BLUR="tauri://blur",e.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",e.WINDOW_THEME_CHANGED="tauri://theme-changed",e.WINDOW_FILE_DROP="tauri://file-drop",e.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",e.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled"}(a||(a={})),function(e){e[e.Trace=1]="Trace",e[e.Debug=2]="Debug",e[e.Info=3]="Info",e[e.Warn=4]="Warn",e[e.Error=5]="Error"}(o||(o={})),e.attachConsole=async function(){return await t("log://log",(e=>{const n=e.payload,r=n.message.replace(/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g,"");switch(n.level){case o.Trace:console.log(r);break;case o.Debug:console.debug(r);break;case o.Info:console.info(r);break;case o.Warn:console.warn(r);break;case o.Error:console.error(r);break;default:throw new Error(`unknown log level ${n.level}`)}}))},e.debug=async function(e,n){await i(o.Debug,e,n)},e.error=async function(e,n){await i(o.Error,e,n)},e.info=async function(e,n){await i(o.Info,e,n)},e.trace=async function(e,n){await i(o.Trace,e,n)},e.warn=async function(e,n){await i(o.Warn,e,n)},e}({});Object.defineProperty(window.__TAURI__,"log",{value:__TAURI_PLUGIN_LOG__})} +if("__TAURI__"in window){var __TAURI_PLUGIN_LOG__=function(e){"use strict";function n(e,n=!1){return window.__TAURI_INTERNALS__.transformCallback(e,n)}async function r(e,n={},r){return window.__TAURI_INTERNALS__.invoke(e,n,r)}var a,t;async function o(e,a,t){const o="string"==typeof t?.target?{kind:"AnyLabel",label:t.target}:t?.target??{kind:"Any"};return r("plugin:event|listen",{event:e,target:o,handler:n(a)}).then((n=>async()=>async function(e,n){await r("plugin:event|unlisten",{event:e,eventId:n})}(e,n)))}async function i(e,n,a){const t=(new Error).stack?.split("\n").map((e=>e.split("@"))),o=t?.filter((([e,n])=>e.length>0&&"[native code]"!==n)),{file:i,line:c,keyValues:l}=a??{};let u=o?.[0]?.filter((e=>e.length>0)).join("@");"Error"===u&&(u="webview::unknown"),await r("plugin:log|log",{level:e,message:n,location:u,file:i,line:c,keyValues:l})}return"function"==typeof SuppressedError&&SuppressedError,function(e){e.WINDOW_RESIZED="tauri://resize",e.WINDOW_MOVED="tauri://move",e.WINDOW_CLOSE_REQUESTED="tauri://close-requested",e.WINDOW_DESTROYED="tauri://destroyed",e.WINDOW_FOCUS="tauri://focus",e.WINDOW_BLUR="tauri://blur",e.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",e.WINDOW_THEME_CHANGED="tauri://theme-changed",e.WEBVIEW_CREATED="tauri://webview-created",e.WEBVIEW_FILE_DROP="tauri://file-drop",e.WEBVIEW_FILE_DROP_HOVER="tauri://file-drop-hover",e.WEBVIEW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled"}(a||(a={})),function(e){e[e.Trace=1]="Trace",e[e.Debug=2]="Debug",e[e.Info=3]="Info",e[e.Warn=4]="Warn",e[e.Error=5]="Error"}(t||(t={})),e.attachConsole=async function(){return await o("log://log",(e=>{const n=e.payload,r=n.message.replace(/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g,"");switch(n.level){case t.Trace:console.log(r);break;case t.Debug:console.debug(r);break;case t.Info:console.info(r);break;case t.Warn:console.warn(r);break;case t.Error:console.error(r);break;default:throw new Error(`unknown log level ${n.level}`)}}))},e.debug=async function(e,n){await i(t.Debug,e,n)},e.error=async function(e,n){await i(t.Error,e,n)},e.info=async function(e,n){await i(t.Info,e,n)},e.trace=async function(e,n){await i(t.Trace,e,n)},e.warn=async function(e,n){await i(t.Warn,e,n)},e}({});Object.defineProperty(window.__TAURI__,"log",{value:__TAURI_PLUGIN_LOG__})} diff --git a/plugins/nfc/Cargo.toml b/plugins/nfc/Cargo.toml index 74aed23f8..36ac87fdb 100644 --- a/plugins/nfc/Cargo.toml +++ b/plugins/nfc/Cargo.toml @@ -12,7 +12,7 @@ rustc-args = ["--cfg", "docsrs"] rustdoc-args = ["--cfg", "docsrs"] [build-dependencies] -tauri-build = { workspace = true } +tauri-plugin = { workspace = true, features = ["build"] } [dependencies] serde = { workspace = true } diff --git a/plugins/nfc/build.rs b/plugins/nfc/build.rs index 2f932ecc7..1d2343712 100644 --- a/plugins/nfc/build.rs +++ b/plugins/nfc/build.rs @@ -2,21 +2,17 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT -use std::process::exit; +const COMMANDS: &[&str] = &["is_available", "write", "scan"]; fn main() { - if let Err(error) = tauri_build::mobile::PluginBuilder::new() + tauri_plugin::Builder::new(COMMANDS) .android_path("android") .ios_path("ios") - .run() - { - println!("{error:#}"); - exit(1); - } + .build(); // TODO: triple check if this can reference the plugin's xml as it expects rn // TODO: This has to be configurable if we want to support handling nfc tags when the app is not open. - tauri_build::mobile::update_android_manifest( + tauri_plugin::mobile::update_android_manifest( "NFC PLUGIN", "activity", r#" diff --git a/plugins/nfc/guest-js/index.ts b/plugins/nfc/guest-js/index.ts index 089253eda..b16c8a5c5 100644 --- a/plugins/nfc/guest-js/index.ts +++ b/plugins/nfc/guest-js/index.ts @@ -268,5 +268,5 @@ export async function write( } export async function isAvailable(): Promise { - return await invoke("plugin:nfc|isAvailable"); + return await invoke("plugin:nfc|is_available"); } diff --git a/plugins/nfc/package.json b/plugins/nfc/package.json index 3a4732f80..530652af6 100644 --- a/plugins/nfc/package.json +++ b/plugins/nfc/package.json @@ -27,6 +27,6 @@ "tslib": "2.6.0" }, "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.13" + "@tauri-apps/api": "2.0.0-beta.0" } } diff --git a/plugins/nfc/permissions/.dgitignore b/plugins/nfc/permissions/.dgitignore new file mode 100644 index 000000000..c75f615b1 --- /dev/null +++ b/plugins/nfc/permissions/.dgitignore @@ -0,0 +1 @@ +schemas/ diff --git a/plugins/nfc/permissions/.gitignore b/plugins/nfc/permissions/.gitignore new file mode 100644 index 000000000..c75f615b1 --- /dev/null +++ b/plugins/nfc/permissions/.gitignore @@ -0,0 +1 @@ +schemas/ diff --git a/plugins/nfc/permissions/autogenerated/commands/is_available.toml b/plugins/nfc/permissions/autogenerated/commands/is_available.toml new file mode 100644 index 000000000..6f49c5ab4 --- /dev/null +++ b/plugins/nfc/permissions/autogenerated/commands/is_available.toml @@ -0,0 +1,13 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +[[permission]] +identifier = "allow-is-available" +description = "Enables the is_available command without any pre-configured scope." +commands.allow = ["is_available"] + +[[permission]] +identifier = "deny-is-available" +description = "Denies the is_available command without any pre-configured scope." +commands.deny = ["is_available"] diff --git a/plugins/nfc/permissions/autogenerated/commands/scan.toml b/plugins/nfc/permissions/autogenerated/commands/scan.toml new file mode 100644 index 000000000..efa621dd5 --- /dev/null +++ b/plugins/nfc/permissions/autogenerated/commands/scan.toml @@ -0,0 +1,13 @@ +# 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"] diff --git a/plugins/nfc/permissions/autogenerated/commands/write.toml b/plugins/nfc/permissions/autogenerated/commands/write.toml new file mode 100644 index 000000000..73d1d3878 --- /dev/null +++ b/plugins/nfc/permissions/autogenerated/commands/write.toml @@ -0,0 +1,13 @@ +# 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"] diff --git a/plugins/nfc/permissions/autogenerated/reference.md b/plugins/nfc/permissions/autogenerated/reference.md new file mode 100644 index 000000000..9b972b2b2 --- /dev/null +++ b/plugins/nfc/permissions/autogenerated/reference.md @@ -0,0 +1,26 @@ +# Permissions + +## allow-is-available + +Enables the is_available command without any pre-configured scope. + +## deny-is-available + +Denies the is_available command without any pre-configured scope. + +## allow-scan + +Enables the scan command without any pre-configured scope. + +## deny-scan + +Denies the scan command without any pre-configured scope. + +## allow-write + +Enables the write command without any pre-configured scope. + +## deny-write + +Denies the write command without any pre-configured scope. + diff --git a/plugins/nfc/src/api-iife.js b/plugins/nfc/src/api-iife.js index 80156954e..1828f2b6c 100644 --- a/plugins/nfc/src/api-iife.js +++ b/plugins/nfc/src/api-iife.js @@ -1 +1 @@ -if("__TAURI__"in window){var __TAURI_PLUGIN_NFC__=function(n){"use strict";async function e(n,e={},t){return window.__TAURI_INTERNALS__.invoke(n,e,t)}"function"==typeof SuppressedError&&SuppressedError;const t=[84],r=[85];var o,c;function i(n,e,t,r){return{format:n,kind:"string"==typeof e?Array.from((new TextEncoder).encode(e)):e,id:"string"==typeof t?Array.from((new TextEncoder).encode(t)):t,payload:"string"==typeof r?Array.from((new TextEncoder).encode(r)):r}}n.TechKind=void 0,(o=n.TechKind||(n.TechKind={}))[o.IsoDep=0]="IsoDep",o[o.MifareClassic=1]="MifareClassic",o[o.MifareUltralight=2]="MifareUltralight",o[o.Ndef=3]="Ndef",o[o.NdefFormatable=4]="NdefFormatable",o[o.NfcA=5]="NfcA",o[o.NfcB=6]="NfcB",o[o.NfcBarcode=7]="NfcBarcode",o[o.NfcF=8]="NfcF",o[o.NfcV=9]="NfcV",n.NFCTypeNameFormat=void 0,(c=n.NFCTypeNameFormat||(n.NFCTypeNameFormat={}))[c.Empty=0]="Empty",c[c.NfcWellKnown=1]="NfcWellKnown",c[c.Media=2]="Media",c[c.AbsoluteURI=3]="AbsoluteURI",c[c.NfcExternal=4]="NfcExternal",c[c.Unknown=5]="Unknown",c[c.Unchanged=6]="Unchanged";const a=["","http://www.","https://www.","http://","https://","tel:","mailto:","ftp://anonymous:anonymous@","ftp://ftp.","ftps://","sftp://","smb://","nfs://","ftp://","dav://","news:","telnet://","imap:","rtsp://","urn:","pop:","sip:","sips:","tftp:","btspp://","btl2cap://","btgoep://","tcpobex://","irdaobex://","file://","urn:epc:id:","urn:epc:tag:","urn:epc:pat:","urn:epc:raw:","urn:epc:","urn:nfc:"];function f(n){const{type:e,...t}=n;return{[e]:t}}return n.RTD_TEXT=t,n.RTD_URI=r,n.isAvailable=async function(){return await e("plugin:nfc|isAvailable")},n.record=i,n.scan=async function(n,t){return await e("plugin:nfc|scan",{kind:f(n),...t})},n.textRecord=function(e,r,o="en"){const c=Array.from((new TextEncoder).encode(o+e));return c.unshift(o.length),i(n.NFCTypeNameFormat.NfcWellKnown,t,r||[],c)},n.uriRecord=function(e,t){return i(n.NFCTypeNameFormat.NfcWellKnown,r,t||[],function(n){let e="";a.slice(1).forEach((function(t){e&&"urn:"!==e||0!==n.indexOf(t)||(e=t)})),e||(e="");const t=Array.from((new TextEncoder).encode(n.slice(e.length))),r=a.indexOf(e);return t.unshift(r),t}(e))},n.write=async function(n,t){const{kind:r,...o}=t||{};return r&&(o.kind=f(r)),await e("plugin:nfc|write",{records:n,...o})},n}({});Object.defineProperty(window.__TAURI__,"nfc",{value:__TAURI_PLUGIN_NFC__})} +if("__TAURI__"in window){var __TAURI_PLUGIN_NFC__=function(n){"use strict";async function e(n,e={},t){return window.__TAURI_INTERNALS__.invoke(n,e,t)}"function"==typeof SuppressedError&&SuppressedError;const t=[84],r=[85];var o,c;function a(n,e,t,r){return{format:n,kind:"string"==typeof e?Array.from((new TextEncoder).encode(e)):e,id:"string"==typeof t?Array.from((new TextEncoder).encode(t)):t,payload:"string"==typeof r?Array.from((new TextEncoder).encode(r)):r}}n.TechKind=void 0,(o=n.TechKind||(n.TechKind={}))[o.IsoDep=0]="IsoDep",o[o.MifareClassic=1]="MifareClassic",o[o.MifareUltralight=2]="MifareUltralight",o[o.Ndef=3]="Ndef",o[o.NdefFormatable=4]="NdefFormatable",o[o.NfcA=5]="NfcA",o[o.NfcB=6]="NfcB",o[o.NfcBarcode=7]="NfcBarcode",o[o.NfcF=8]="NfcF",o[o.NfcV=9]="NfcV",n.NFCTypeNameFormat=void 0,(c=n.NFCTypeNameFormat||(n.NFCTypeNameFormat={}))[c.Empty=0]="Empty",c[c.NfcWellKnown=1]="NfcWellKnown",c[c.Media=2]="Media",c[c.AbsoluteURI=3]="AbsoluteURI",c[c.NfcExternal=4]="NfcExternal",c[c.Unknown=5]="Unknown",c[c.Unchanged=6]="Unchanged";const i=["","http://www.","https://www.","http://","https://","tel:","mailto:","ftp://anonymous:anonymous@","ftp://ftp.","ftps://","sftp://","smb://","nfs://","ftp://","dav://","news:","telnet://","imap:","rtsp://","urn:","pop:","sip:","sips:","tftp:","btspp://","btl2cap://","btgoep://","tcpobex://","irdaobex://","file://","urn:epc:id:","urn:epc:tag:","urn:epc:pat:","urn:epc:raw:","urn:epc:","urn:nfc:"];function f(n){const{type:e,...t}=n;return{[e]:t}}return n.RTD_TEXT=t,n.RTD_URI=r,n.isAvailable=async function(){return await e("plugin:nfc|is_available")},n.record=a,n.scan=async function(n,t){return await e("plugin:nfc|scan",{kind:f(n),...t})},n.textRecord=function(e,r,o="en"){const c=Array.from((new TextEncoder).encode(o+e));return c.unshift(o.length),a(n.NFCTypeNameFormat.NfcWellKnown,t,r||[],c)},n.uriRecord=function(e,t){return a(n.NFCTypeNameFormat.NfcWellKnown,r,t||[],function(n){let e="";i.slice(1).forEach((function(t){e&&"urn:"!==e||0!==n.indexOf(t)||(e=t)})),e||(e="");const t=Array.from((new TextEncoder).encode(n.slice(e.length))),r=i.indexOf(e);return t.unshift(r),t}(e))},n.write=async function(n,t){const{kind:r,...o}=t||{};return r&&(o.kind=f(r)),await e("plugin:nfc|write",{records:n,...o})},n}({});Object.defineProperty(window.__TAURI__,"nfc",{value:__TAURI_PLUGIN_NFC__})} diff --git a/plugins/notification/Cargo.toml b/plugins/notification/Cargo.toml index 15c52a898..e730acd6e 100644 --- a/plugins/notification/Cargo.toml +++ b/plugins/notification/Cargo.toml @@ -9,12 +9,12 @@ rust-version = { workspace = true } links = "tauri-plugin-notification" [package.metadata.docs.rs] -rustc-args = [ "--cfg", "docsrs" ] -rustdoc-args = [ "--cfg", "docsrs" ] -targets = [ "x86_64-unknown-linux-gnu", "x86_64-linux-android" ] +rustc-args = ["--cfg", "docsrs"] +rustdoc-args = ["--cfg", "docsrs"] +targets = ["x86_64-unknown-linux-gnu", "x86_64-linux-android"] [build-dependencies] -tauri-build = { workspace = true } +tauri-plugin = { workspace = true, features = ["build"] } [dependencies] serde = { workspace = true } @@ -23,8 +23,8 @@ tauri = { workspace = true } log = { workspace = true } thiserror = { workspace = true } rand = "0.8" -time = { version = "0.3", features = [ "serde", "parsing", "formatting" ] } -url = { version = "2", features = [ "serde" ] } +time = { version = "0.3", features = ["serde", "parsing", "formatting"] } +url = { version = "2", features = ["serde"] } serde_repr = "0.1" [target."cfg(any(target_os = \"macos\", windows, target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies] @@ -35,4 +35,4 @@ win7-notifications = { version = "0.3.1", optional = true } windows-version = { version = "0.1", optional = true } [features] -windows7-compat = [ "win7-notifications", "windows-version" ] +windows7-compat = ["win7-notifications", "windows-version"] diff --git a/plugins/notification/build.rs b/plugins/notification/build.rs index da7cd3cc4..26d1f96e9 100644 --- a/plugins/notification/build.rs +++ b/plugins/notification/build.rs @@ -2,11 +2,13 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT +const COMMANDS: &[&str] = &["notify", "request_permission", "is_permission_granted"]; + fn main() { - if let Err(error) = tauri_build::mobile::PluginBuilder::new() + if let Err(error) = tauri_plugin::Builder::new(COMMANDS) .android_path("android") .ios_path("ios") - .run() + .try_build() { println!("{error:#}"); // when building documentation for Android the plugin build result is irrelevant to the crate itself diff --git a/plugins/notification/package.json b/plugins/notification/package.json index cdf619257..6205801b8 100644 --- a/plugins/notification/package.json +++ b/plugins/notification/package.json @@ -23,6 +23,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.13" + "@tauri-apps/api": "2.0.0-beta.0" } } diff --git a/plugins/notification/permissions/.dgitignore b/plugins/notification/permissions/.dgitignore new file mode 100644 index 000000000..c75f615b1 --- /dev/null +++ b/plugins/notification/permissions/.dgitignore @@ -0,0 +1 @@ +schemas/ diff --git a/plugins/notification/permissions/.gitignore b/plugins/notification/permissions/.gitignore new file mode 100644 index 000000000..c75f615b1 --- /dev/null +++ b/plugins/notification/permissions/.gitignore @@ -0,0 +1 @@ +schemas/ diff --git a/plugins/notification/permissions/autogenerated/commands/is_permission_granted.toml b/plugins/notification/permissions/autogenerated/commands/is_permission_granted.toml new file mode 100644 index 000000000..5faa73f34 --- /dev/null +++ b/plugins/notification/permissions/autogenerated/commands/is_permission_granted.toml @@ -0,0 +1,13 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +[[permission]] +identifier = "allow-is-permission-granted" +description = "Enables the is_permission_granted command without any pre-configured scope." +commands.allow = ["is_permission_granted"] + +[[permission]] +identifier = "deny-is-permission-granted" +description = "Denies the is_permission_granted command without any pre-configured scope." +commands.deny = ["is_permission_granted"] diff --git a/plugins/notification/permissions/autogenerated/commands/notify.toml b/plugins/notification/permissions/autogenerated/commands/notify.toml new file mode 100644 index 000000000..7d6d46c2b --- /dev/null +++ b/plugins/notification/permissions/autogenerated/commands/notify.toml @@ -0,0 +1,13 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +[[permission]] +identifier = "allow-notify" +description = "Enables the notify command without any pre-configured scope." +commands.allow = ["notify"] + +[[permission]] +identifier = "deny-notify" +description = "Denies the notify command without any pre-configured scope." +commands.deny = ["notify"] diff --git a/plugins/notification/permissions/autogenerated/commands/request_permission.toml b/plugins/notification/permissions/autogenerated/commands/request_permission.toml new file mode 100644 index 000000000..0b410d6a2 --- /dev/null +++ b/plugins/notification/permissions/autogenerated/commands/request_permission.toml @@ -0,0 +1,13 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +[[permission]] +identifier = "allow-request-permission" +description = "Enables the request_permission command without any pre-configured scope." +commands.allow = ["request_permission"] + +[[permission]] +identifier = "deny-request-permission" +description = "Denies the request_permission command without any pre-configured scope." +commands.deny = ["request_permission"] diff --git a/plugins/notification/permissions/autogenerated/reference.md b/plugins/notification/permissions/autogenerated/reference.md new file mode 100644 index 000000000..44cbd31b8 --- /dev/null +++ b/plugins/notification/permissions/autogenerated/reference.md @@ -0,0 +1,30 @@ +# Permissions + +## allow-is-permission-granted + +Enables the is_permission_granted command without any pre-configured scope. + +## deny-is-permission-granted + +Denies the is_permission_granted command without any pre-configured scope. + +## allow-notify + +Enables the notify command without any pre-configured scope. + +## deny-notify + +Denies the notify command without any pre-configured scope. + +## allow-request-permission + +Enables the request_permission command without any pre-configured scope. + +## deny-request-permission + +Denies the request_permission command without any pre-configured scope. + +## default + +Allows requesting permission, checking permission state and sending notifications + diff --git a/plugins/notification/permissions/default.toml b/plugins/notification/permissions/default.toml new file mode 100644 index 000000000..2bd851428 --- /dev/null +++ b/plugins/notification/permissions/default.toml @@ -0,0 +1,8 @@ +"$schema" = "schemas/schema.json" +[default] +description = "Allows requesting permission, checking permission state and sending notifications" +permissions = [ + "allow-is-permission-granted", + "allow-request-permission", + "allow-notify", +] diff --git a/plugins/notification/src/desktop.rs b/plugins/notification/src/desktop.rs index 6938334b8..8015885e1 100644 --- a/plugins/notification/src/desktop.rs +++ b/plugins/notification/src/desktop.rs @@ -19,13 +19,12 @@ pub struct Notification(AppHandle); impl crate::NotificationBuilder { pub fn show(self) -> crate::Result<()> { - let mut notification = - imp::Notification::new(self.app.config().tauri.bundle.identifier.clone()); + let mut notification = imp::Notification::new(self.app.config().identifier.clone()); if let Some(title) = self .data .title - .or_else(|| self.app.config().package.product_name.clone()) + .or_else(|| self.app.config().product_name.clone()) { notification = notification.title(title); } diff --git a/plugins/notification/test/tauri.conf.json b/plugins/notification/test/tauri.conf.json index 83cda94c3..d9e6f8731 100644 --- a/plugins/notification/test/tauri.conf.json +++ b/plugins/notification/test/tauri.conf.json @@ -1,5 +1,6 @@ { - "identifier": "studio.tauri.example", + "$schema": "../../../node_modules/.pnpm/@tauri-apps+cli@2.0.0-alpha.17/node_modules/@tauri-apps/cli/schema.json", + "identifier": "app.tauri.example", "build": { "frontendDist": ".", "devUrl": "http://localhost:4000" diff --git a/plugins/os/Cargo.toml b/plugins/os/Cargo.toml index ae50bdc05..1fe26c5bc 100644 --- a/plugins/os/Cargo.toml +++ b/plugins/os/Cargo.toml @@ -6,10 +6,14 @@ edition = { workspace = true } authors = { workspace = true } license = { workspace = true } rust-version = { workspace = true } +links = "tauri-plugin-os" [package.metadata.docs.rs] -rustc-args = [ "--cfg", "docsrs" ] -rustdoc-args = [ "--cfg", "docsrs" ] +rustc-args = ["--cfg", "docsrs"] +rustdoc-args = ["--cfg", "docsrs"] + +[build-dependencies] +tauri-plugin = { workspace = true, features = ["build"] } [dependencies] serde = { workspace = true } diff --git a/plugins/os/build.rs b/plugins/os/build.rs new file mode 100644 index 000000000..91dca73ef --- /dev/null +++ b/plugins/os/build.rs @@ -0,0 +1,18 @@ +// Copyright 2019-2023 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + +const COMMANDS: &[&str] = &[ + "platform", + "version", + "os_type", + "family", + "arch", + "exe_extension", + "locale", + "hostname", +]; + +fn main() { + tauri_plugin::Builder::new(COMMANDS).build(); +} diff --git a/plugins/os/package.json b/plugins/os/package.json index 7140d1afe..5f02a48d1 100644 --- a/plugins/os/package.json +++ b/plugins/os/package.json @@ -23,6 +23,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.13" + "@tauri-apps/api": "2.0.0-beta.0" } } diff --git a/plugins/os/permissions/.dgitignore b/plugins/os/permissions/.dgitignore new file mode 100644 index 000000000..c75f615b1 --- /dev/null +++ b/plugins/os/permissions/.dgitignore @@ -0,0 +1 @@ +schemas/ diff --git a/plugins/os/permissions/.gitignore b/plugins/os/permissions/.gitignore new file mode 100644 index 000000000..c75f615b1 --- /dev/null +++ b/plugins/os/permissions/.gitignore @@ -0,0 +1 @@ +schemas/ diff --git a/plugins/os/permissions/autogenerated/commands/arch.toml b/plugins/os/permissions/autogenerated/commands/arch.toml new file mode 100644 index 000000000..160cce0d8 --- /dev/null +++ b/plugins/os/permissions/autogenerated/commands/arch.toml @@ -0,0 +1,13 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +[[permission]] +identifier = "allow-arch" +description = "Enables the arch command without any pre-configured scope." +commands.allow = ["arch"] + +[[permission]] +identifier = "deny-arch" +description = "Denies the arch command without any pre-configured scope." +commands.deny = ["arch"] diff --git a/plugins/os/permissions/autogenerated/commands/exe_extension.toml b/plugins/os/permissions/autogenerated/commands/exe_extension.toml new file mode 100644 index 000000000..aef4d2e61 --- /dev/null +++ b/plugins/os/permissions/autogenerated/commands/exe_extension.toml @@ -0,0 +1,13 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +[[permission]] +identifier = "allow-exe-extension" +description = "Enables the exe_extension command without any pre-configured scope." +commands.allow = ["exe_extension"] + +[[permission]] +identifier = "deny-exe-extension" +description = "Denies the exe_extension command without any pre-configured scope." +commands.deny = ["exe_extension"] diff --git a/plugins/os/permissions/autogenerated/commands/family.toml b/plugins/os/permissions/autogenerated/commands/family.toml new file mode 100644 index 000000000..4109be395 --- /dev/null +++ b/plugins/os/permissions/autogenerated/commands/family.toml @@ -0,0 +1,13 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +[[permission]] +identifier = "allow-family" +description = "Enables the family command without any pre-configured scope." +commands.allow = ["family"] + +[[permission]] +identifier = "deny-family" +description = "Denies the family command without any pre-configured scope." +commands.deny = ["family"] diff --git a/plugins/os/permissions/autogenerated/commands/hostname.toml b/plugins/os/permissions/autogenerated/commands/hostname.toml new file mode 100644 index 000000000..c65376cbb --- /dev/null +++ b/plugins/os/permissions/autogenerated/commands/hostname.toml @@ -0,0 +1,13 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +[[permission]] +identifier = "allow-hostname" +description = "Enables the hostname command without any pre-configured scope." +commands.allow = ["hostname"] + +[[permission]] +identifier = "deny-hostname" +description = "Denies the hostname command without any pre-configured scope." +commands.deny = ["hostname"] diff --git a/plugins/os/permissions/autogenerated/commands/locale.toml b/plugins/os/permissions/autogenerated/commands/locale.toml new file mode 100644 index 000000000..2a85e4710 --- /dev/null +++ b/plugins/os/permissions/autogenerated/commands/locale.toml @@ -0,0 +1,13 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +[[permission]] +identifier = "allow-locale" +description = "Enables the locale command without any pre-configured scope." +commands.allow = ["locale"] + +[[permission]] +identifier = "deny-locale" +description = "Denies the locale command without any pre-configured scope." +commands.deny = ["locale"] diff --git a/plugins/os/permissions/autogenerated/commands/os_type.toml b/plugins/os/permissions/autogenerated/commands/os_type.toml new file mode 100644 index 000000000..c91987a36 --- /dev/null +++ b/plugins/os/permissions/autogenerated/commands/os_type.toml @@ -0,0 +1,13 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +[[permission]] +identifier = "allow-os-type" +description = "Enables the os_type command without any pre-configured scope." +commands.allow = ["os_type"] + +[[permission]] +identifier = "deny-os-type" +description = "Denies the os_type command without any pre-configured scope." +commands.deny = ["os_type"] diff --git a/plugins/os/permissions/autogenerated/commands/platform.toml b/plugins/os/permissions/autogenerated/commands/platform.toml new file mode 100644 index 000000000..49dc08d62 --- /dev/null +++ b/plugins/os/permissions/autogenerated/commands/platform.toml @@ -0,0 +1,13 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +[[permission]] +identifier = "allow-platform" +description = "Enables the platform command without any pre-configured scope." +commands.allow = ["platform"] + +[[permission]] +identifier = "deny-platform" +description = "Denies the platform command without any pre-configured scope." +commands.deny = ["platform"] diff --git a/plugins/os/permissions/autogenerated/commands/version.toml b/plugins/os/permissions/autogenerated/commands/version.toml new file mode 100644 index 000000000..2d65e3257 --- /dev/null +++ b/plugins/os/permissions/autogenerated/commands/version.toml @@ -0,0 +1,13 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +[[permission]] +identifier = "allow-version" +description = "Enables the version command without any pre-configured scope." +commands.allow = ["version"] + +[[permission]] +identifier = "deny-version" +description = "Denies the version command without any pre-configured scope." +commands.deny = ["version"] diff --git a/plugins/os/permissions/autogenerated/reference.md b/plugins/os/permissions/autogenerated/reference.md new file mode 100644 index 000000000..f8d334fb6 --- /dev/null +++ b/plugins/os/permissions/autogenerated/reference.md @@ -0,0 +1,66 @@ +# Permissions + +## allow-arch + +Enables the arch command without any pre-configured scope. + +## deny-arch + +Denies the arch command without any pre-configured scope. + +## allow-exe-extension + +Enables the exe_extension command without any pre-configured scope. + +## deny-exe-extension + +Denies the exe_extension command without any pre-configured scope. + +## allow-family + +Enables the family command without any pre-configured scope. + +## deny-family + +Denies the family command without any pre-configured scope. + +## allow-hostname + +Enables the hostname command without any pre-configured scope. + +## deny-hostname + +Denies the hostname command without any pre-configured scope. + +## allow-locale + +Enables the locale command without any pre-configured scope. + +## deny-locale + +Denies the locale command without any pre-configured scope. + +## allow-os-type + +Enables the os_type command without any pre-configured scope. + +## deny-os-type + +Denies the os_type command without any pre-configured scope. + +## allow-platform + +Enables the platform command without any pre-configured scope. + +## deny-platform + +Denies the platform command without any pre-configured scope. + +## allow-version + +Enables the version command without any pre-configured scope. + +## deny-version + +Denies the version command without any pre-configured scope. + diff --git a/plugins/persisted-scope/Cargo.toml b/plugins/persisted-scope/Cargo.toml index 81e1851c1..be0d58e46 100644 --- a/plugins/persisted-scope/Cargo.toml +++ b/plugins/persisted-scope/Cargo.toml @@ -8,8 +8,8 @@ edition = { workspace = true } rust-version = { workspace = true } [package.metadata.docs.rs] -rustc-args = [ "--cfg", "docsrs" ] -rustdoc-args = [ "--cfg", "docsrs" ] +rustc-args = ["--cfg", "docsrs"] +rustdoc-args = ["--cfg", "docsrs"] [dependencies] serde = { workspace = true } @@ -22,4 +22,4 @@ bincode = "1" tauri-plugin-fs = { path = "../fs", version = "2.0.0-alpha.7" } [features] -protocol-asset = [ "tauri/protocol-asset" ] +protocol-asset = ["tauri/protocol-asset"] diff --git a/plugins/persisted-scope/src/lib.rs b/plugins/persisted-scope/src/lib.rs index 1d289071e..d9988f8e1 100644 --- a/plugins/persisted-scope/src/lib.rs +++ b/plugins/persisted-scope/src/lib.rs @@ -14,7 +14,6 @@ use aho_corasick::AhoCorasick; use serde::{Deserialize, Serialize}; -use tauri::scope::fs::{Event as FsScopeEvent, Scope as FsScope}; use tauri::{ plugin::{Builder, TauriPlugin}, scope::fs::Pattern as GlobPattern, @@ -48,39 +47,77 @@ const PATTERNS: &[&str] = &[ const REPLACE_WITH: &[&str] = &[r"[", r"]", r"?", r"*", r"\?", r"\\?\", r"\\?\"]; trait ScopeExt { + type Pattern: ToString; + fn allow_file(&self, path: &Path); fn allow_directory(&self, path: &Path, recursive: bool); fn forbid_file(&self, path: &Path); fn forbid_directory(&self, path: &Path, recursive: bool); - fn allowed_patterns(&self) -> HashSet; - fn forbidden_patterns(&self) -> HashSet; + fn allowed_patterns(&self) -> HashSet; + fn forbidden_patterns(&self) -> HashSet; +} + +impl ScopeExt for tauri::scope::fs::Scope { + type Pattern = GlobPattern; + + fn allow_file(&self, path: &Path) { + let _ = tauri::scope::fs::Scope::allow_file(self, path); + } + + fn allow_directory(&self, path: &Path, recursive: bool) { + let _ = tauri::scope::fs::Scope::allow_directory(self, path, recursive); + } + + fn forbid_file(&self, path: &Path) { + let _ = tauri::scope::fs::Scope::forbid_file(self, path); + } + + fn forbid_directory(&self, path: &Path, recursive: bool) { + let _ = tauri::scope::fs::Scope::forbid_directory(self, path, recursive); + } + + fn allowed_patterns(&self) -> HashSet { + tauri::scope::fs::Scope::allowed_patterns(self) + } + + fn forbidden_patterns(&self) -> HashSet { + tauri::scope::fs::Scope::forbidden_patterns(self) + } } -impl ScopeExt for FsScope { +impl ScopeExt for tauri_plugin_fs::Scope { + type Pattern = String; + fn allow_file(&self, path: &Path) { - let _ = FsScope::allow_file(self, path); + tauri_plugin_fs::Scope::allow_file(self, path); } fn allow_directory(&self, path: &Path, recursive: bool) { - let _ = FsScope::allow_directory(self, path, recursive); + tauri_plugin_fs::Scope::allow_directory(self, path, recursive); } fn forbid_file(&self, path: &Path) { - let _ = FsScope::forbid_file(self, path); + tauri_plugin_fs::Scope::forbid_file(self, path); } fn forbid_directory(&self, path: &Path, recursive: bool) { - let _ = FsScope::forbid_directory(self, path, recursive); + tauri_plugin_fs::Scope::forbid_directory(self, path, recursive); } - fn allowed_patterns(&self) -> HashSet { - FsScope::allowed_patterns(self) + fn allowed_patterns(&self) -> HashSet { + self.allowed() + .into_iter() + .map(|p| p.to_string_lossy().to_string()) + .collect() } - fn forbidden_patterns(&self) -> HashSet { - FsScope::forbidden_patterns(self) + fn forbidden_patterns(&self) -> HashSet { + self.forbidden() + .into_iter() + .map(|p| p.to_string_lossy().to_string()) + .collect() } } @@ -216,7 +253,7 @@ pub fn init() -> TauriPlugin { let asset_scope_state_path = app_dir.join(ASSET_SCOPE_STATE_FILENAME); if let Some(fs_scope) = fs_scope { - let _ = fs_scope.forbid_file(&fs_scope_state_path); + fs_scope.forbid_file(&fs_scope_state_path); } #[cfg(feature = "protocol-asset")] let _ = asset_protocol_scope.forbid_file(&asset_scope_state_path); @@ -269,19 +306,21 @@ pub fn init() -> TauriPlugin { #[cfg(feature = "protocol-asset")] let app_dir_ = app_dir.clone(); + if let Some(fs_scope) = fs_scope { - let fs_scope_ = fs_scope.clone(); + let app_ = app.clone(); fs_scope.listen(move |event| { - if let FsScopeEvent::PathAllowed(_) = event { - save_scopes(&fs_scope_, &app_dir, &fs_scope_state_path); + if let tauri_plugin_fs::ScopeEvent::PathAllowed(_) = event { + save_scopes(app_.fs_scope(), &app_dir, &fs_scope_state_path); } }); } + #[cfg(feature = "protocol-asset")] { let asset_protocol_scope_ = asset_protocol_scope.clone(); asset_protocol_scope.listen(move |event| { - if let FsScopeEvent::PathAllowed(_) = event { + if let tauri::scope::fs::Event::PathAllowed(_) = event { save_scopes(&asset_protocol_scope_, &app_dir_, &asset_scope_state_path); } }); diff --git a/plugins/positioner/Cargo.toml b/plugins/positioner/Cargo.toml index 380111966..f1a6bd12c 100644 --- a/plugins/positioner/Cargo.toml +++ b/plugins/positioner/Cargo.toml @@ -6,10 +6,14 @@ authors = { workspace = true } license = { workspace = true } edition = { workspace = true } rust-version = { workspace = true } +links = "tauri-plugin-positioner" [package.metadata.docs.rs] -rustc-args = [ "--cfg", "docsrs" ] -rustdoc-args = [ "--cfg", "docsrs" ] +rustc-args = ["--cfg", "docsrs"] +rustdoc-args = ["--cfg", "docsrs"] + +[build-dependencies] +tauri-plugin = { workspace = true, features = ["build"] } [dependencies] serde = { workspace = true } @@ -20,4 +24,4 @@ thiserror = { workspace = true } serde_repr = "0.1" [features] -tray-icon = [ "tauri/tray-icon" ] +tray-icon = ["tauri/tray-icon"] diff --git a/plugins/positioner/build.rs b/plugins/positioner/build.rs new file mode 100644 index 000000000..1fc5acfb8 --- /dev/null +++ b/plugins/positioner/build.rs @@ -0,0 +1,9 @@ +// Copyright 2019-2023 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + +const COMMANDS: &[&str] = &["move_window"]; + +fn main() { + tauri_plugin::Builder::new(COMMANDS).build(); +} diff --git a/plugins/positioner/package.json b/plugins/positioner/package.json index fae71f776..843dfe8ce 100644 --- a/plugins/positioner/package.json +++ b/plugins/positioner/package.json @@ -24,6 +24,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.13" + "@tauri-apps/api": "2.0.0-beta.0" } } diff --git a/plugins/positioner/permissions/.dgitignore b/plugins/positioner/permissions/.dgitignore new file mode 100644 index 000000000..c75f615b1 --- /dev/null +++ b/plugins/positioner/permissions/.dgitignore @@ -0,0 +1 @@ +schemas/ diff --git a/plugins/positioner/permissions/.gitignore b/plugins/positioner/permissions/.gitignore new file mode 100644 index 000000000..c75f615b1 --- /dev/null +++ b/plugins/positioner/permissions/.gitignore @@ -0,0 +1 @@ +schemas/ diff --git a/plugins/positioner/permissions/autogenerated/commands/move_window.toml b/plugins/positioner/permissions/autogenerated/commands/move_window.toml new file mode 100644 index 000000000..f78f9c783 --- /dev/null +++ b/plugins/positioner/permissions/autogenerated/commands/move_window.toml @@ -0,0 +1,13 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +[[permission]] +identifier = "allow-move-window" +description = "Enables the move_window command without any pre-configured scope." +commands.allow = ["move_window"] + +[[permission]] +identifier = "deny-move-window" +description = "Denies the move_window command without any pre-configured scope." +commands.deny = ["move_window"] diff --git a/plugins/positioner/permissions/autogenerated/reference.md b/plugins/positioner/permissions/autogenerated/reference.md new file mode 100644 index 000000000..60d18ba5f --- /dev/null +++ b/plugins/positioner/permissions/autogenerated/reference.md @@ -0,0 +1,14 @@ +# Permissions + +## allow-move-window + +Enables the move_window command without any pre-configured scope. + +## deny-move-window + +Denies the move_window command without any pre-configured scope. + +## default + +Allows the move_window command + diff --git a/plugins/positioner/permissions/default.toml b/plugins/positioner/permissions/default.toml new file mode 100644 index 000000000..b0b3b3e29 --- /dev/null +++ b/plugins/positioner/permissions/default.toml @@ -0,0 +1,4 @@ +"$schema" = "schemas/schema.json" +[default] +description = "Allows the move_window command" +permissions = ["allow-move-window"] diff --git a/plugins/process/Cargo.toml b/plugins/process/Cargo.toml index b1e4f0488..5c70e46e2 100644 --- a/plugins/process/Cargo.toml +++ b/plugins/process/Cargo.toml @@ -6,10 +6,14 @@ edition = { workspace = true } authors = { workspace = true } license = { workspace = true } rust-version = { workspace = true } +links = "tauri-plugin-process" [package.metadata.docs.rs] -rustc-args = [ "--cfg", "docsrs" ] -rustdoc-args = [ "--cfg", "docsrs" ] +rustc-args = ["--cfg", "docsrs"] +rustdoc-args = ["--cfg", "docsrs"] + +[build-dependencies] +tauri-plugin = { workspace = true, features = ["build"] } [dependencies] tauri = { workspace = true } diff --git a/plugins/process/build.rs b/plugins/process/build.rs new file mode 100644 index 000000000..e9d6cfda1 --- /dev/null +++ b/plugins/process/build.rs @@ -0,0 +1,9 @@ +// Copyright 2019-2023 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + +const COMMANDS: &[&str] = &["exit", "restart"]; + +fn main() { + tauri_plugin::Builder::new(COMMANDS).build(); +} diff --git a/plugins/process/package.json b/plugins/process/package.json index 3f168abe2..43874bd61 100644 --- a/plugins/process/package.json +++ b/plugins/process/package.json @@ -23,6 +23,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.13" + "@tauri-apps/api": "2.0.0-beta.0" } } diff --git a/plugins/process/permissions/.dgitignore b/plugins/process/permissions/.dgitignore new file mode 100644 index 000000000..c75f615b1 --- /dev/null +++ b/plugins/process/permissions/.dgitignore @@ -0,0 +1 @@ +schemas/ diff --git a/plugins/process/permissions/.gitignore b/plugins/process/permissions/.gitignore new file mode 100644 index 000000000..c75f615b1 --- /dev/null +++ b/plugins/process/permissions/.gitignore @@ -0,0 +1 @@ +schemas/ diff --git a/plugins/process/permissions/autogenerated/commands/exit.toml b/plugins/process/permissions/autogenerated/commands/exit.toml new file mode 100644 index 000000000..8abaf2960 --- /dev/null +++ b/plugins/process/permissions/autogenerated/commands/exit.toml @@ -0,0 +1,13 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +[[permission]] +identifier = "allow-exit" +description = "Enables the exit command without any pre-configured scope." +commands.allow = ["exit"] + +[[permission]] +identifier = "deny-exit" +description = "Denies the exit command without any pre-configured scope." +commands.deny = ["exit"] diff --git a/plugins/process/permissions/autogenerated/commands/restart.toml b/plugins/process/permissions/autogenerated/commands/restart.toml new file mode 100644 index 000000000..63b228c89 --- /dev/null +++ b/plugins/process/permissions/autogenerated/commands/restart.toml @@ -0,0 +1,13 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +[[permission]] +identifier = "allow-restart" +description = "Enables the restart command without any pre-configured scope." +commands.allow = ["restart"] + +[[permission]] +identifier = "deny-restart" +description = "Denies the restart command without any pre-configured scope." +commands.deny = ["restart"] diff --git a/plugins/process/permissions/autogenerated/reference.md b/plugins/process/permissions/autogenerated/reference.md new file mode 100644 index 000000000..a5822a923 --- /dev/null +++ b/plugins/process/permissions/autogenerated/reference.md @@ -0,0 +1,18 @@ +# Permissions + +## allow-exit + +Enables the exit command without any pre-configured scope. + +## deny-exit + +Denies the exit command without any pre-configured scope. + +## allow-restart + +Enables the restart command without any pre-configured scope. + +## deny-restart + +Denies the restart command without any pre-configured scope. + diff --git a/plugins/shell/Cargo.toml b/plugins/shell/Cargo.toml index fe2284688..e0ffbfe13 100644 --- a/plugins/shell/Cargo.toml +++ b/plugins/shell/Cargo.toml @@ -6,13 +6,20 @@ edition = { workspace = true } authors = { workspace = true } license = { workspace = true } rust-version = { workspace = true } +links = "tauri-plugin-shell" [package.metadata.docs.rs] -rustc-args = [ "--cfg", "docsrs" ] -rustdoc-args = [ "--cfg", "docsrs" ] +rustc-args = ["--cfg", "docsrs"] +rustdoc-args = ["--cfg", "docsrs"] + +[build-dependencies] +tauri-plugin = { workspace = true, features = ["build"] } +schemars = { workspace = true } +serde = { workspace = true } [dependencies] serde = { workspace = true } +schemars = { workspace = true } serde_json = { workspace = true } tauri = { workspace = true } log = { workspace = true } diff --git a/plugins/shell/build.rs b/plugins/shell/build.rs new file mode 100644 index 000000000..f3ff751de --- /dev/null +++ b/plugins/shell/build.rs @@ -0,0 +1,14 @@ +// Copyright 2019-2023 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + +#[path = "src/scope_entry.rs"] +mod scope_entry; + +const COMMANDS: &[&str] = &["execute", "stdin_write", "kill", "open"]; + +fn main() { + tauri_plugin::Builder::new(COMMANDS) + .global_scope_schema(schemars::schema_for!(scope_entry::Entry)) + .build(); +} diff --git a/plugins/shell/package.json b/plugins/shell/package.json index 15f1943b1..4bb6ec55b 100644 --- a/plugins/shell/package.json +++ b/plugins/shell/package.json @@ -23,6 +23,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.13" + "@tauri-apps/api": "2.0.0-beta.0" } } diff --git a/plugins/shell/permissions/.dgitignore b/plugins/shell/permissions/.dgitignore new file mode 100644 index 000000000..c75f615b1 --- /dev/null +++ b/plugins/shell/permissions/.dgitignore @@ -0,0 +1 @@ +schemas/ diff --git a/plugins/shell/permissions/.gitignore b/plugins/shell/permissions/.gitignore new file mode 100644 index 000000000..c75f615b1 --- /dev/null +++ b/plugins/shell/permissions/.gitignore @@ -0,0 +1 @@ +schemas/ diff --git a/plugins/shell/permissions/autogenerated/commands/execute.toml b/plugins/shell/permissions/autogenerated/commands/execute.toml new file mode 100644 index 000000000..d98be8993 --- /dev/null +++ b/plugins/shell/permissions/autogenerated/commands/execute.toml @@ -0,0 +1,13 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +[[permission]] +identifier = "allow-execute" +description = "Enables the execute command without any pre-configured scope." +commands.allow = ["execute"] + +[[permission]] +identifier = "deny-execute" +description = "Denies the execute command without any pre-configured scope." +commands.deny = ["execute"] diff --git a/plugins/shell/permissions/autogenerated/commands/kill.toml b/plugins/shell/permissions/autogenerated/commands/kill.toml new file mode 100644 index 000000000..11d2f7f07 --- /dev/null +++ b/plugins/shell/permissions/autogenerated/commands/kill.toml @@ -0,0 +1,13 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +[[permission]] +identifier = "allow-kill" +description = "Enables the kill command without any pre-configured scope." +commands.allow = ["kill"] + +[[permission]] +identifier = "deny-kill" +description = "Denies the kill command without any pre-configured scope." +commands.deny = ["kill"] diff --git a/plugins/shell/permissions/autogenerated/commands/open.toml b/plugins/shell/permissions/autogenerated/commands/open.toml new file mode 100644 index 000000000..4ea6dff16 --- /dev/null +++ b/plugins/shell/permissions/autogenerated/commands/open.toml @@ -0,0 +1,13 @@ +# 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"] diff --git a/plugins/shell/permissions/autogenerated/commands/stdin_write.toml b/plugins/shell/permissions/autogenerated/commands/stdin_write.toml new file mode 100644 index 000000000..46ca5a738 --- /dev/null +++ b/plugins/shell/permissions/autogenerated/commands/stdin_write.toml @@ -0,0 +1,13 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +[[permission]] +identifier = "allow-stdin-write" +description = "Enables the stdin_write command without any pre-configured scope." +commands.allow = ["stdin_write"] + +[[permission]] +identifier = "deny-stdin-write" +description = "Denies the stdin_write command without any pre-configured scope." +commands.deny = ["stdin_write"] diff --git a/plugins/shell/permissions/autogenerated/reference.md b/plugins/shell/permissions/autogenerated/reference.md new file mode 100644 index 000000000..93f94f3d9 --- /dev/null +++ b/plugins/shell/permissions/autogenerated/reference.md @@ -0,0 +1,34 @@ +# Permissions + +## allow-execute + +Enables the execute command without any pre-configured scope. + +## deny-execute + +Denies the execute command without any pre-configured scope. + +## allow-kill + +Enables the kill command without any pre-configured scope. + +## deny-kill + +Denies the kill command without any pre-configured scope. + +## allow-open + +Enables the open command without any pre-configured scope. + +## deny-open + +Denies the open command without any pre-configured scope. + +## allow-stdin-write + +Enables the stdin_write command without any pre-configured scope. + +## deny-stdin-write + +Denies the stdin_write command without any pre-configured scope. + diff --git a/plugins/shell/src/commands.rs b/plugins/shell/src/commands.rs index fd1e5058a..0d44f9363 100644 --- a/plugins/shell/src/commands.rs +++ b/plugins/shell/src/commands.rs @@ -6,7 +6,10 @@ use std::{collections::HashMap, path::PathBuf, string::FromUtf8Error}; use encoding_rs::Encoding; use serde::{Deserialize, Serialize}; -use tauri::{ipc::Channel, Manager, Runtime, State, Window}; +use tauri::{ + ipc::{Channel, CommandScope, GlobalScope}, + Manager, Runtime, State, Window, +}; use crate::{ open::Program, @@ -91,6 +94,7 @@ fn default_env() -> Option> { Some(HashMap::default()) } +#[allow(clippy::too_many_arguments)] #[tauri::command] pub fn execute( window: Window, @@ -99,14 +103,23 @@ pub fn execute( args: ExecuteArgs, on_event: Channel, options: CommandOptions, + command_scope: CommandScope<'_, crate::scope::ScopeAllowedCommand>, + global_scope: GlobalScope<'_, crate::scope::ScopeAllowedCommand>, ) -> crate::Result { + let scope = crate::scope::ShellScope { + scopes: command_scope + .allows() + .iter() + .chain(global_scope.allows()) + .collect(), + }; + let mut command = if options.sidecar { let program = PathBuf::from(program); let program_as_string = program.display().to_string(); let program_no_ext_as_string = program.with_extension("").display().to_string(); let configured_sidecar = window .config() - .tauri .bundle .external_bin .as_ref() @@ -116,14 +129,12 @@ pub fn execute( }) .cloned(); if let Some(sidecar) = configured_sidecar { - shell - .scope - .prepare_sidecar(&program.to_string_lossy(), &sidecar, args)? + scope.prepare_sidecar(&program.to_string_lossy(), &sidecar, args)? } else { return Err(crate::Error::SidecarNotAllowed(program)); } } else { - match shell.scope.prepare(&program, args) { + match scope.prepare(&program, args) { Ok(cmd) => cmd, Err(e) => { #[cfg(debug_assertions)] diff --git a/plugins/shell/src/config.rs b/plugins/shell/src/config.rs index 5dd32862d..95390988a 100644 --- a/plugins/shell/src/config.rs +++ b/plugins/shell/src/config.rs @@ -2,130 +2,17 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT -use std::path::PathBuf; - -use serde::{de::Error as DeError, Deserialize, Deserializer}; +use serde::Deserialize; /// Configuration for the shell plugin. #[derive(Debug, Default, PartialEq, Eq, Clone, Deserialize)] #[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct Config { - /// Access scope for the binary execution APIs. - /// Sidecars are automatically enabled. - #[serde(default)] - pub scope: ShellAllowlistScope, /// Open URL with the user's default application. #[serde(default)] pub open: ShellAllowlistOpen, } -/// A command allowed to be executed by the webview API. -#[derive(Debug, PartialEq, Eq, Clone)] -pub struct ShellAllowedCommand { - /// The name for this allowed shell command configuration. - /// - /// This name will be used inside of the webview API to call this command along with - /// any specified arguments. - pub name: String, - - /// The command name. - /// It can start with a variable that resolves to a system base directory. - /// The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, - /// `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, - /// `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, - /// `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`. - // use default just so the schema doesn't flag it as required - pub command: PathBuf, - - /// The allowed arguments for the command execution. - pub args: ShellAllowedArgs, - - /// If this command is a sidecar command. - pub sidecar: bool, -} - -impl<'de> Deserialize<'de> for ShellAllowedCommand { - fn deserialize(deserializer: D) -> Result - where - D: Deserializer<'de>, - { - #[derive(Deserialize)] - struct InnerShellAllowedCommand { - name: String, - #[serde(rename = "cmd")] - command: Option, - #[serde(default)] - args: ShellAllowedArgs, - #[serde(default)] - sidecar: bool, - } - - let config = InnerShellAllowedCommand::deserialize(deserializer)?; - - if !config.sidecar && config.command.is_none() { - return Err(DeError::custom( - "The shell scope `command` value is required.", - )); - } - - Ok(ShellAllowedCommand { - name: config.name, - command: config.command.unwrap_or_default(), - args: config.args, - sidecar: config.sidecar, - }) - } -} - -/// A set of command arguments allowed to be executed by the webview API. -/// -/// A value of `true` will allow any arguments to be passed to the command. `false` will disable all -/// arguments. A list of [`ShellAllowedArg`] will set those arguments as the only valid arguments to -/// be passed to the attached command configuration. -#[derive(Debug, PartialEq, Eq, Clone, Deserialize)] -#[serde(untagged, deny_unknown_fields)] -#[non_exhaustive] -pub enum ShellAllowedArgs { - /// Use a simple boolean to allow all or disable all arguments to this command configuration. - Flag(bool), - - /// A specific set of [`ShellAllowedArg`] that are valid to call for the command configuration. - List(Vec), -} - -impl Default for ShellAllowedArgs { - fn default() -> Self { - Self::Flag(false) - } -} - -/// A command argument allowed to be executed by the webview API. -#[derive(Debug, PartialEq, Eq, Clone, Deserialize)] -#[serde(untagged, deny_unknown_fields)] -#[non_exhaustive] -pub enum ShellAllowedArg { - /// A non-configurable argument that is passed to the command in the order it was specified. - Fixed(String), - - /// A variable that is set while calling the command from the webview API. - /// - Var { - /// [regex] validator to require passed values to conform to an expected input. - /// - /// This will require the argument value passed to this variable to match the `validator` regex - /// before it will be executed. - /// - /// [regex]: https://docs.rs/regex/latest/regex/#syntax - validator: String, - }, -} - -/// Shell scope definition. -/// It is a list of command names and associated CLI arguments that restrict the API access from the webview. -#[derive(Debug, Default, PartialEq, Eq, Clone, Deserialize)] - -pub struct ShellAllowlistScope(pub Vec); - /// Defines the `shell > open` api scope. #[derive(Debug, PartialEq, Eq, Clone, Deserialize)] #[serde(untagged, deny_unknown_fields)] diff --git a/plugins/shell/src/error.rs b/plugins/shell/src/error.rs index 0a673e8a3..c8af2343b 100644 --- a/plugins/shell/src/error.rs +++ b/plugins/shell/src/error.rs @@ -24,6 +24,9 @@ pub enum Error { ProgramNotAllowed(PathBuf), #[error("unknown encoding {0}")] UnknownEncoding(String), + /// JSON error. + #[error(transparent)] + Json(#[from] serde_json::Error), } impl Serialize for Error { diff --git a/plugins/shell/src/lib.rs b/plugins/shell/src/lib.rs index 36d022aa6..8b32b7ecf 100644 --- a/plugins/shell/src/lib.rs +++ b/plugins/shell/src/lib.rs @@ -20,7 +20,6 @@ use std::{ use process::{Command, CommandChild}; use regex::Regex; -use scope::{Scope, ScopeAllowedCommand, ScopeConfig}; use tauri::{ plugin::{Builder, TauriPlugin}, AppHandle, Manager, RunEvent, Runtime, @@ -32,8 +31,8 @@ mod error; mod open; pub mod process; mod scope; +mod scope_entry; -use config::{Config, ShellAllowedArg, ShellAllowedArgs, ShellAllowlistOpen, ShellAllowlistScope}; pub use error::Error; type Result = std::result::Result; type ChildStore = Arc>>; @@ -41,7 +40,7 @@ type ChildStore = Arc>>; pub struct Shell { #[allow(dead_code)] app: AppHandle, - scope: Scope, + open_scope: scope::OpenScope, children: ChildStore, } @@ -63,7 +62,7 @@ impl Shell { /// /// See [`crate::api::shell::open`] for how it handles security-related measures. pub fn open(&self, path: impl Into, with: Option) -> Result<()> { - open::open(&self.scope, path.into(), with).map_err(Into::into) + open::open(&self.open_scope, path.into(), with).map_err(Into::into) } } @@ -77,11 +76,11 @@ impl> ShellExt for T { } } -pub fn init() -> TauriPlugin> { +pub fn init() -> TauriPlugin> { let mut init_script = include_str!("init-iife.js").to_string(); init_script.push_str(include_str!("api-iife.js")); - Builder::>::new("shell") + Builder::>::new("shell") .js_init_script(init_script) .invoke_handler(tauri::generate_handler![ commands::execute, @@ -90,12 +89,12 @@ pub fn init() -> TauriPlugin> { commands::open ]) .setup(|app, api| { - let default_config = Config::default(); + let default_config = config::Config::default(); let config = api.config().as_ref().unwrap_or(&default_config); app.manage(Shell { app: app.clone(), children: Default::default(), - scope: Scope::new(app, shell_scope(config.scope.clone(), &config.open)), + open_scope: open_scope(&config.open), }); Ok(()) }) @@ -114,56 +113,20 @@ pub fn init() -> TauriPlugin> { .build() } -fn shell_scope(scope: ShellAllowlistScope, open: &ShellAllowlistOpen) -> ScopeConfig { - let shell_scopes = get_allowed_clis(scope); - +fn open_scope(open: &config::ShellAllowlistOpen) -> scope::OpenScope { let shell_scope_open = match open { - ShellAllowlistOpen::Flag(false) => None, - ShellAllowlistOpen::Flag(true) => { + config::ShellAllowlistOpen::Flag(false) => None, + config::ShellAllowlistOpen::Flag(true) => { Some(Regex::new(r"^((mailto:\w+)|(tel:\w+)|(https?://\w+)).+").unwrap()) } - ShellAllowlistOpen::Validate(validator) => { + config::ShellAllowlistOpen::Validate(validator) => { let validator = Regex::new(validator).unwrap_or_else(|e| panic!("invalid regex {validator}: {e}")); Some(validator) } }; - ScopeConfig { + scope::OpenScope { open: shell_scope_open, - scopes: shell_scopes, } } - -fn get_allowed_clis(scope: ShellAllowlistScope) -> HashMap { - scope - .0 - .into_iter() - .map(|scope| { - let args = match scope.args { - ShellAllowedArgs::Flag(true) => None, - ShellAllowedArgs::Flag(false) => Some(Vec::new()), - ShellAllowedArgs::List(list) => { - let list = list.into_iter().map(|arg| match arg { - ShellAllowedArg::Fixed(fixed) => scope::ScopeAllowedArg::Fixed(fixed), - ShellAllowedArg::Var { validator } => { - let validator = Regex::new(&validator) - .unwrap_or_else(|e| panic!("invalid regex {validator}: {e}")); - scope::ScopeAllowedArg::Var { validator } - } - }); - Some(list.collect()) - } - }; - - ( - scope.name, - ScopeAllowedCommand { - command: scope.command, - args, - sidecar: scope.sidecar, - }, - ) - }) - .collect() -} diff --git a/plugins/shell/src/open.rs b/plugins/shell/src/open.rs index a46d3f14b..8366b45b3 100644 --- a/plugins/shell/src/open.rs +++ b/plugins/shell/src/open.rs @@ -6,7 +6,7 @@ use serde::{Deserialize, Deserializer}; -use crate::scope::Scope; +use crate::scope::OpenScope; use std::str::FromStr; /// Program to use on the [`open()`] call. @@ -117,6 +117,6 @@ impl Program { /// Ok(()) /// }); /// ``` -pub fn open>(scope: &Scope, path: P, with: Option) -> crate::Result<()> { +pub fn open>(scope: &OpenScope, path: P, with: Option) -> crate::Result<()> { scope.open(path.as_ref(), with).map_err(Into::into) } diff --git a/plugins/shell/src/scope.rs b/plugins/shell/src/scope.rs index c184e9226..6351196b5 100644 --- a/plugins/shell/src/scope.rs +++ b/plugins/shell/src/scope.rs @@ -4,11 +4,10 @@ use crate::open::Program; use crate::process::Command; -use crate::{Manager, Runtime}; use regex::Regex; - -use std::collections::HashMap; +use tauri::ipc::ScopeObject; +use tauri::Manager; /// Allowed representation of `Execute` command arguments. #[derive(Debug, Clone, serde::Deserialize)] @@ -55,19 +54,12 @@ impl From> for ExecuteArgs { } } -/// Shell scope configuration. -#[derive(Debug, Clone)] -pub struct ScopeConfig { - /// The validation regex that `shell > open` paths must match against. - pub open: Option, - - /// All allowed commands, using their unique command name as the keys. - pub scopes: HashMap, -} - /// A configured scoped shell command. #[derive(Debug, Clone)] pub struct ScopeAllowedCommand { + /// Name of the command (key). + pub name: String, + /// The shell command to be called. pub command: std::path::PathBuf, @@ -78,6 +70,47 @@ pub struct ScopeAllowedCommand { pub sidecar: bool, } +impl ScopeObject for ScopeAllowedCommand { + type Error = crate::Error; + fn deserialize( + app: &tauri::AppHandle, + raw: tauri::utils::acl::Value, + ) -> Result { + let scope = serde_json::from_value::(raw.into())?; + + let args = match scope.args.clone() { + crate::scope_entry::ShellAllowedArgs::Flag(true) => None, + crate::scope_entry::ShellAllowedArgs::Flag(false) => Some(Vec::new()), + crate::scope_entry::ShellAllowedArgs::List(list) => { + let list = list.into_iter().map(|arg| match arg { + crate::scope_entry::ShellAllowedArg::Fixed(fixed) => { + crate::scope::ScopeAllowedArg::Fixed(fixed) + } + crate::scope_entry::ShellAllowedArg::Var { validator } => { + let validator = Regex::new(&validator) + .unwrap_or_else(|e| panic!("invalid regex {validator}: {e}")); + crate::scope::ScopeAllowedArg::Var { validator } + } + }); + Some(list.collect()) + } + }; + + let command = if let Ok(path) = app.path().parse(&scope.command) { + path + } else { + scope.command.clone() + }; + + Ok(Self { + name: scope.name, + command, + args, + sidecar: scope.sidecar, + }) + } +} + /// A configured argument to a scoped shell command. #[derive(Debug, Clone)] pub enum ScopeAllowedArg { @@ -98,9 +131,18 @@ impl ScopeAllowedArg { } } -/// Scope for filesystem access. +/// Scope for the open command +pub struct OpenScope { + /// The validation regex that `shell > open` paths must match against. + pub open: Option, +} + +/// Scope for shell process spawning. #[derive(Clone)] -pub struct Scope(ScopeConfig); +pub struct ShellScope<'a> { + /// All allowed commands, using their unique command name as the keys. + pub scopes: Vec<&'a ScopeAllowedCommand>, +} /// All errors that can happen while validating a scoped command. #[derive(Debug, thiserror::Error)] @@ -147,17 +189,33 @@ pub enum Error { Io(#[from] std::io::Error), } -impl Scope { - /// Creates a new shell scope. - pub(crate) fn new>(manager: &M, mut scope: ScopeConfig) -> Self { - for cmd in scope.scopes.values_mut() { - if let Ok(path) = manager.path().parse(&cmd.command) { - cmd.command = path; +impl OpenScope { + /// Open a path in the default (or specified) browser. + /// + /// The path is validated against the `plugins > shell > open` validation regex, which + /// defaults to `^((mailto:\w+)|(tel:\w+)|(https?://\w+)).+`. + pub fn open(&self, path: &str, with: Option) -> Result<(), Error> { + // ensure we pass validation if the configuration has one + if let Some(regex) = &self.open { + if !regex.is_match(path) { + return Err(Error::Validation { + index: 0, + validation: regex.as_str().into(), + }); } } - Self(scope) + + // The prevention of argument escaping is handled by the usage of std::process::Command::arg by + // the `open` dependency. This behavior should be re-confirmed during upgrades of `open`. + match with.map(Program::name) { + Some(program) => ::open::with_detached(path, program), + None => ::open::that_detached(path), + } + .map_err(Into::into) } +} +impl<'a> ShellScope<'a> { /// Validates argument inputs and creates a Tauri sidecar [`Command`]. pub fn prepare_sidecar( &self, @@ -180,7 +238,7 @@ impl Scope { args: ExecuteArgs, sidecar: Option<&str>, ) -> Result { - let command = match self.0.scopes.get(command_name) { + let command = match self.scopes.iter().find(|s| s.name == command_name) { Some(command) => command, None => return Err(Error::NotFound(command_name.into())), }; @@ -245,28 +303,4 @@ impl Scope { Ok(command.args(args)) } - - /// Open a path in the default (or specified) browser. - /// - /// The path is validated against the `plugins > shell > open` validation regex, which - /// defaults to `^((mailto:\w+)|(tel:\w+)|(https?://\w+)).+`. - pub fn open(&self, path: &str, with: Option) -> Result<(), Error> { - // ensure we pass validation if the configuration has one - if let Some(regex) = &self.0.open { - if !regex.is_match(path) { - return Err(Error::Validation { - index: 0, - validation: regex.as_str().into(), - }); - } - } - - // The prevention of argument escaping is handled by the usage of std::process::Command::arg by - // the `open` dependency. This behavior should be re-confirmed during upgrades of `open`. - match with.map(Program::name) { - Some(program) => ::open::with_detached(path, program), - None => ::open::that_detached(path), - } - .map_err(Into::into) - } } diff --git a/plugins/shell/src/scope_entry.rs b/plugins/shell/src/scope_entry.rs new file mode 100644 index 000000000..aac8e695f --- /dev/null +++ b/plugins/shell/src/scope_entry.rs @@ -0,0 +1,108 @@ +// Copyright 2019-2023 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + +use serde::{de::Error as DeError, Deserialize, Deserializer}; + +use std::path::PathBuf; + +/// A command allowed to be executed by the webview API. +#[derive(Debug, Clone, PartialEq, Eq, Hash, schemars::JsonSchema)] +pub struct Entry { + /// The name for this allowed shell command configuration. + /// + /// This name will be used inside of the webview API to call this command along with + /// any specified arguments. + pub name: String, + + /// The command name. + /// It can start with a variable that resolves to a system base directory. + /// The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, + /// `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, + /// `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, + /// `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`. + // use default just so the schema doesn't flag it as required + pub command: PathBuf, + + /// The allowed arguments for the command execution. + pub args: ShellAllowedArgs, + + /// If this command is a sidecar command. + pub sidecar: bool, +} + +impl<'de> Deserialize<'de> for Entry { + fn deserialize(deserializer: D) -> Result + where + D: Deserializer<'de>, + { + #[derive(Deserialize)] + struct InnerEntry { + name: String, + #[serde(rename = "cmd")] + command: Option, + #[serde(default)] + args: ShellAllowedArgs, + #[serde(default)] + sidecar: bool, + } + + let config = InnerEntry::deserialize(deserializer)?; + + if !config.sidecar && config.command.is_none() { + return Err(DeError::custom( + "The shell scope `command` value is required.", + )); + } + + Ok(Entry { + name: config.name, + command: config.command.unwrap_or_default(), + args: config.args, + sidecar: config.sidecar, + }) + } +} + +/// A set of command arguments allowed to be executed by the webview API. +/// +/// A value of `true` will allow any arguments to be passed to the command. `false` will disable all +/// arguments. A list of [`ShellAllowedArg`] will set those arguments as the only valid arguments to +/// be passed to the attached command configuration. +#[derive(Debug, PartialEq, Eq, Clone, Hash, Deserialize, schemars::JsonSchema)] +#[serde(untagged, deny_unknown_fields)] +#[non_exhaustive] +pub enum ShellAllowedArgs { + /// Use a simple boolean to allow all or disable all arguments to this command configuration. + Flag(bool), + + /// A specific set of [`ShellAllowedArg`] that are valid to call for the command configuration. + List(Vec), +} + +impl Default for ShellAllowedArgs { + fn default() -> Self { + Self::Flag(false) + } +} + +/// A command argument allowed to be executed by the webview API. +#[derive(Debug, PartialEq, Eq, Clone, Hash, Deserialize, schemars::JsonSchema)] +#[serde(untagged, deny_unknown_fields)] +#[non_exhaustive] +pub enum ShellAllowedArg { + /// A non-configurable argument that is passed to the command in the order it was specified. + Fixed(String), + + /// A variable that is set while calling the command from the webview API. + /// + Var { + /// [regex] validator to require passed values to conform to an expected input. + /// + /// This will require the argument value passed to this variable to match the `validator` regex + /// before it will be executed. + /// + /// [regex]: https://docs.rs/regex/latest/regex/#syntax + validator: String, + }, +} diff --git a/plugins/single-instance/examples/vanilla/package.json b/plugins/single-instance/examples/vanilla/package.json index 2aa18ee3b..96e9f1d8f 100644 --- a/plugins/single-instance/examples/vanilla/package.json +++ b/plugins/single-instance/examples/vanilla/package.json @@ -9,6 +9,6 @@ "author": "", "license": "MIT", "devDependencies": { - "@tauri-apps/cli": "2.0.0-alpha.20" + "@tauri-apps/cli": "2.0.0-beta.0" } } diff --git a/plugins/single-instance/examples/vanilla/src-tauri/.gitignore b/plugins/single-instance/examples/vanilla/src-tauri/.gitignore index c12370459..ea13580b7 100644 --- a/plugins/single-instance/examples/vanilla/src-tauri/.gitignore +++ b/plugins/single-instance/examples/vanilla/src-tauri/.gitignore @@ -2,3 +2,5 @@ # will have compiled files and executables /target/ WixTools + +/capabilities/schemas diff --git a/plugins/single-instance/src/platform_impl/linux.rs b/plugins/single-instance/src/platform_impl/linux.rs index f05007d38..c34187341 100644 --- a/plugins/single-instance/src/platform_impl/linux.rs +++ b/plugins/single-instance/src/platform_impl/linux.rs @@ -29,7 +29,7 @@ impl SingleInstanceDBus { } fn dbus_id(config: &Config) -> String { - config.tauri.bundle.identifier.replace(['.', '-'], "_") + config.identifier.replace(['.', '-'], "_") } pub fn init(f: Box>) -> TauriPlugin { diff --git a/plugins/single-instance/src/platform_impl/windows.rs b/plugins/single-instance/src/platform_impl/windows.rs index 9501b19f9..f66b2d1ae 100644 --- a/plugins/single-instance/src/platform_impl/windows.rs +++ b/plugins/single-instance/src/platform_impl/windows.rs @@ -33,7 +33,7 @@ const WMCOPYDATA_SINGLE_INSTANCE_DATA: usize = 1542; pub fn init(f: Box>) -> TauriPlugin { plugin::Builder::new("single-instance") .setup(|app, _api| { - let id = &app.config().tauri.bundle.identifier; + let id = &app.config().identifier; let class_name = encode_wide(format!("{id}-sic")); let window_name = encode_wide(format!("{id}-siw")); diff --git a/plugins/sql/Cargo.toml b/plugins/sql/Cargo.toml index bb4d39d4a..0295e7267 100644 --- a/plugins/sql/Cargo.toml +++ b/plugins/sql/Cargo.toml @@ -6,11 +6,15 @@ authors = { workspace = true } license = { workspace = true } edition = { workspace = true } rust-version = { workspace = true } +links = "tauri-plugin-sql" [package.metadata.docs.rs] -features = [ "sqlite" ] -rustc-args = [ "--cfg", "docsrs" ] -rustdoc-args = [ "--cfg", "docsrs" ] +features = ["sqlite"] +rustc-args = ["--cfg", "docsrs"] +rustdoc-args = ["--cfg", "docsrs"] + +[build-dependencies] +tauri-plugin = { workspace = true, features = ["build"] } [dependencies] serde = { workspace = true } @@ -19,11 +23,11 @@ tauri = { workspace = true } log = { workspace = true } thiserror = { workspace = true } futures-core = "0.3" -sqlx = { version = "0.7", features = [ "json", "time" ] } +sqlx = { version = "0.7", features = ["json", "time"] } time = "0.3" -tokio = { version = "1", features = [ "sync" ] } +tokio = { version = "1", features = ["sync"] } [features] -sqlite = [ "sqlx/sqlite", "sqlx/runtime-tokio" ] -mysql = [ "sqlx/mysql", "sqlx/runtime-tokio-rustls" ] -postgres = [ "sqlx/postgres", "sqlx/runtime-tokio-rustls" ] +sqlite = ["sqlx/sqlite", "sqlx/runtime-tokio"] +mysql = ["sqlx/mysql", "sqlx/runtime-tokio-rustls"] +postgres = ["sqlx/postgres", "sqlx/runtime-tokio-rustls"] diff --git a/plugins/sql/build.rs b/plugins/sql/build.rs new file mode 100644 index 000000000..e74fdb42e --- /dev/null +++ b/plugins/sql/build.rs @@ -0,0 +1,9 @@ +// Copyright 2019-2023 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + +const COMMANDS: &[&str] = &["load", "execute", "select", "close"]; + +fn main() { + tauri_plugin::Builder::new(COMMANDS).build(); +} diff --git a/plugins/sql/package.json b/plugins/sql/package.json index f4f3587d3..56b385a9e 100644 --- a/plugins/sql/package.json +++ b/plugins/sql/package.json @@ -24,6 +24,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.13" + "@tauri-apps/api": "2.0.0-beta.0" } } diff --git a/plugins/sql/permissions/.dgitignore b/plugins/sql/permissions/.dgitignore new file mode 100644 index 000000000..c75f615b1 --- /dev/null +++ b/plugins/sql/permissions/.dgitignore @@ -0,0 +1 @@ +schemas/ diff --git a/plugins/sql/permissions/.gitignore b/plugins/sql/permissions/.gitignore new file mode 100644 index 000000000..c75f615b1 --- /dev/null +++ b/plugins/sql/permissions/.gitignore @@ -0,0 +1 @@ +schemas/ diff --git a/plugins/sql/permissions/autogenerated/commands/close.toml b/plugins/sql/permissions/autogenerated/commands/close.toml new file mode 100644 index 000000000..fad12d151 --- /dev/null +++ b/plugins/sql/permissions/autogenerated/commands/close.toml @@ -0,0 +1,13 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +[[permission]] +identifier = "allow-close" +description = "Enables the close command without any pre-configured scope." +commands.allow = ["close"] + +[[permission]] +identifier = "deny-close" +description = "Denies the close command without any pre-configured scope." +commands.deny = ["close"] diff --git a/plugins/sql/permissions/autogenerated/commands/execute.toml b/plugins/sql/permissions/autogenerated/commands/execute.toml new file mode 100644 index 000000000..d98be8993 --- /dev/null +++ b/plugins/sql/permissions/autogenerated/commands/execute.toml @@ -0,0 +1,13 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +[[permission]] +identifier = "allow-execute" +description = "Enables the execute command without any pre-configured scope." +commands.allow = ["execute"] + +[[permission]] +identifier = "deny-execute" +description = "Denies the execute command without any pre-configured scope." +commands.deny = ["execute"] diff --git a/plugins/sql/permissions/autogenerated/commands/load.toml b/plugins/sql/permissions/autogenerated/commands/load.toml new file mode 100644 index 000000000..f6e47ad8e --- /dev/null +++ b/plugins/sql/permissions/autogenerated/commands/load.toml @@ -0,0 +1,13 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +[[permission]] +identifier = "allow-load" +description = "Enables the load command without any pre-configured scope." +commands.allow = ["load"] + +[[permission]] +identifier = "deny-load" +description = "Denies the load command without any pre-configured scope." +commands.deny = ["load"] diff --git a/plugins/sql/permissions/autogenerated/commands/select.toml b/plugins/sql/permissions/autogenerated/commands/select.toml new file mode 100644 index 000000000..5a13a0229 --- /dev/null +++ b/plugins/sql/permissions/autogenerated/commands/select.toml @@ -0,0 +1,13 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +[[permission]] +identifier = "allow-select" +description = "Enables the select command without any pre-configured scope." +commands.allow = ["select"] + +[[permission]] +identifier = "deny-select" +description = "Denies the select command without any pre-configured scope." +commands.deny = ["select"] diff --git a/plugins/sql/permissions/autogenerated/reference.md b/plugins/sql/permissions/autogenerated/reference.md new file mode 100644 index 000000000..a9734e010 --- /dev/null +++ b/plugins/sql/permissions/autogenerated/reference.md @@ -0,0 +1,34 @@ +# Permissions + +## allow-close + +Enables the close command without any pre-configured scope. + +## deny-close + +Denies the close command without any pre-configured scope. + +## allow-execute + +Enables the execute command without any pre-configured scope. + +## deny-execute + +Denies the execute command without any pre-configured scope. + +## allow-load + +Enables the load command without any pre-configured scope. + +## deny-load + +Denies the load command without any pre-configured scope. + +## allow-select + +Enables the select command without any pre-configured scope. + +## deny-select + +Denies the select command without any pre-configured scope. + diff --git a/plugins/store/Cargo.toml b/plugins/store/Cargo.toml index 6419802cc..8251fe36b 100644 --- a/plugins/store/Cargo.toml +++ b/plugins/store/Cargo.toml @@ -6,10 +6,14 @@ authors = { workspace = true } license = { workspace = true } edition = { workspace = true } rust-version = { workspace = true } +links = "tauri-plugin-store" [package.metadata.docs.rs] -rustc-args = [ "--cfg", "docsrs" ] -rustdoc-args = [ "--cfg", "docsrs" ] +rustc-args = ["--cfg", "docsrs"] +rustdoc-args = ["--cfg", "docsrs"] + +[build-dependencies] +tauri-plugin = { workspace = true, features = ["build"] } [dependencies] serde = { workspace = true } diff --git a/plugins/store/build.rs b/plugins/store/build.rs new file mode 100644 index 000000000..30ed3968c --- /dev/null +++ b/plugins/store/build.rs @@ -0,0 +1,12 @@ +// Copyright 2019-2023 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + +const COMMANDS: &[&str] = &[ + "set", "get", "has", "delete", "clear", "reset", "keys", "values", "length", "entries", "load", + "save", +]; + +fn main() { + tauri_plugin::Builder::new(COMMANDS).build(); +} diff --git a/plugins/store/package.json b/plugins/store/package.json index 5734c5e58..facc77491 100644 --- a/plugins/store/package.json +++ b/plugins/store/package.json @@ -24,6 +24,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.13" + "@tauri-apps/api": "2.0.0-beta.0" } } diff --git a/plugins/store/permissions/.dgitignore b/plugins/store/permissions/.dgitignore new file mode 100644 index 000000000..c75f615b1 --- /dev/null +++ b/plugins/store/permissions/.dgitignore @@ -0,0 +1 @@ +schemas/ diff --git a/plugins/store/permissions/.gitignore b/plugins/store/permissions/.gitignore new file mode 100644 index 000000000..c75f615b1 --- /dev/null +++ b/plugins/store/permissions/.gitignore @@ -0,0 +1 @@ +schemas/ diff --git a/plugins/store/permissions/autogenerated/commands/clear.toml b/plugins/store/permissions/autogenerated/commands/clear.toml new file mode 100644 index 000000000..83de18192 --- /dev/null +++ b/plugins/store/permissions/autogenerated/commands/clear.toml @@ -0,0 +1,13 @@ +# 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"] diff --git a/plugins/store/permissions/autogenerated/commands/delete.toml b/plugins/store/permissions/autogenerated/commands/delete.toml new file mode 100644 index 000000000..3d9d52344 --- /dev/null +++ b/plugins/store/permissions/autogenerated/commands/delete.toml @@ -0,0 +1,13 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +[[permission]] +identifier = "allow-delete" +description = "Enables the delete command without any pre-configured scope." +commands.allow = ["delete"] + +[[permission]] +identifier = "deny-delete" +description = "Denies the delete command without any pre-configured scope." +commands.deny = ["delete"] diff --git a/plugins/store/permissions/autogenerated/commands/entries.toml b/plugins/store/permissions/autogenerated/commands/entries.toml new file mode 100644 index 000000000..ce8b5f4bb --- /dev/null +++ b/plugins/store/permissions/autogenerated/commands/entries.toml @@ -0,0 +1,13 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +[[permission]] +identifier = "allow-entries" +description = "Enables the entries command without any pre-configured scope." +commands.allow = ["entries"] + +[[permission]] +identifier = "deny-entries" +description = "Denies the entries command without any pre-configured scope." +commands.deny = ["entries"] diff --git a/plugins/store/permissions/autogenerated/commands/get.toml b/plugins/store/permissions/autogenerated/commands/get.toml new file mode 100644 index 000000000..d75b4030c --- /dev/null +++ b/plugins/store/permissions/autogenerated/commands/get.toml @@ -0,0 +1,13 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +[[permission]] +identifier = "allow-get" +description = "Enables the get command without any pre-configured scope." +commands.allow = ["get"] + +[[permission]] +identifier = "deny-get" +description = "Denies the get command without any pre-configured scope." +commands.deny = ["get"] diff --git a/plugins/store/permissions/autogenerated/commands/has.toml b/plugins/store/permissions/autogenerated/commands/has.toml new file mode 100644 index 000000000..41d0a9384 --- /dev/null +++ b/plugins/store/permissions/autogenerated/commands/has.toml @@ -0,0 +1,13 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +[[permission]] +identifier = "allow-has" +description = "Enables the has command without any pre-configured scope." +commands.allow = ["has"] + +[[permission]] +identifier = "deny-has" +description = "Denies the has command without any pre-configured scope." +commands.deny = ["has"] diff --git a/plugins/store/permissions/autogenerated/commands/keys.toml b/plugins/store/permissions/autogenerated/commands/keys.toml new file mode 100644 index 000000000..1808d0e90 --- /dev/null +++ b/plugins/store/permissions/autogenerated/commands/keys.toml @@ -0,0 +1,13 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +[[permission]] +identifier = "allow-keys" +description = "Enables the keys command without any pre-configured scope." +commands.allow = ["keys"] + +[[permission]] +identifier = "deny-keys" +description = "Denies the keys command without any pre-configured scope." +commands.deny = ["keys"] diff --git a/plugins/store/permissions/autogenerated/commands/length.toml b/plugins/store/permissions/autogenerated/commands/length.toml new file mode 100644 index 000000000..318c5582e --- /dev/null +++ b/plugins/store/permissions/autogenerated/commands/length.toml @@ -0,0 +1,13 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +[[permission]] +identifier = "allow-length" +description = "Enables the length command without any pre-configured scope." +commands.allow = ["length"] + +[[permission]] +identifier = "deny-length" +description = "Denies the length command without any pre-configured scope." +commands.deny = ["length"] diff --git a/plugins/store/permissions/autogenerated/commands/load.toml b/plugins/store/permissions/autogenerated/commands/load.toml new file mode 100644 index 000000000..f6e47ad8e --- /dev/null +++ b/plugins/store/permissions/autogenerated/commands/load.toml @@ -0,0 +1,13 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +[[permission]] +identifier = "allow-load" +description = "Enables the load command without any pre-configured scope." +commands.allow = ["load"] + +[[permission]] +identifier = "deny-load" +description = "Denies the load command without any pre-configured scope." +commands.deny = ["load"] diff --git a/plugins/store/permissions/autogenerated/commands/reset.toml b/plugins/store/permissions/autogenerated/commands/reset.toml new file mode 100644 index 000000000..c32086dec --- /dev/null +++ b/plugins/store/permissions/autogenerated/commands/reset.toml @@ -0,0 +1,13 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +[[permission]] +identifier = "allow-reset" +description = "Enables the reset command without any pre-configured scope." +commands.allow = ["reset"] + +[[permission]] +identifier = "deny-reset" +description = "Denies the reset command without any pre-configured scope." +commands.deny = ["reset"] diff --git a/plugins/store/permissions/autogenerated/commands/save.toml b/plugins/store/permissions/autogenerated/commands/save.toml new file mode 100644 index 000000000..d3e842201 --- /dev/null +++ b/plugins/store/permissions/autogenerated/commands/save.toml @@ -0,0 +1,13 @@ +# 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"] diff --git a/plugins/store/permissions/autogenerated/commands/set.toml b/plugins/store/permissions/autogenerated/commands/set.toml new file mode 100644 index 000000000..1e1cc9e73 --- /dev/null +++ b/plugins/store/permissions/autogenerated/commands/set.toml @@ -0,0 +1,13 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +[[permission]] +identifier = "allow-set" +description = "Enables the set command without any pre-configured scope." +commands.allow = ["set"] + +[[permission]] +identifier = "deny-set" +description = "Denies the set command without any pre-configured scope." +commands.deny = ["set"] diff --git a/plugins/store/permissions/autogenerated/commands/values.toml b/plugins/store/permissions/autogenerated/commands/values.toml new file mode 100644 index 000000000..9343fd1a5 --- /dev/null +++ b/plugins/store/permissions/autogenerated/commands/values.toml @@ -0,0 +1,13 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +[[permission]] +identifier = "allow-values" +description = "Enables the values command without any pre-configured scope." +commands.allow = ["values"] + +[[permission]] +identifier = "deny-values" +description = "Denies the values command without any pre-configured scope." +commands.deny = ["values"] diff --git a/plugins/store/permissions/autogenerated/reference.md b/plugins/store/permissions/autogenerated/reference.md new file mode 100644 index 000000000..fd626ff78 --- /dev/null +++ b/plugins/store/permissions/autogenerated/reference.md @@ -0,0 +1,98 @@ +# Permissions + +## allow-clear + +Enables the clear command without any pre-configured scope. + +## deny-clear + +Denies the clear command without any pre-configured scope. + +## allow-delete + +Enables the delete command without any pre-configured scope. + +## deny-delete + +Denies the delete command without any pre-configured scope. + +## allow-entries + +Enables the entries command without any pre-configured scope. + +## deny-entries + +Denies the entries command without any pre-configured scope. + +## allow-get + +Enables the get command without any pre-configured scope. + +## deny-get + +Denies the get command without any pre-configured scope. + +## allow-has + +Enables the has command without any pre-configured scope. + +## deny-has + +Denies the has command without any pre-configured scope. + +## allow-keys + +Enables the keys command without any pre-configured scope. + +## deny-keys + +Denies the keys command without any pre-configured scope. + +## allow-length + +Enables the length command without any pre-configured scope. + +## deny-length + +Denies the length command without any pre-configured scope. + +## allow-load + +Enables the load command without any pre-configured scope. + +## deny-load + +Denies the load command without any pre-configured scope. + +## allow-reset + +Enables the reset command without any pre-configured scope. + +## deny-reset + +Denies the reset command without any pre-configured scope. + +## allow-save + +Enables the save command without any pre-configured scope. + +## deny-save + +Denies the save command without any pre-configured scope. + +## allow-set + +Enables the set command without any pre-configured scope. + +## deny-set + +Denies the set command without any pre-configured scope. + +## allow-values + +Enables the values command without any pre-configured scope. + +## deny-values + +Denies the values command without any pre-configured scope. + diff --git a/plugins/store/src/api-iife.js b/plugins/store/src/api-iife.js index 4d1bdd5bc..4a50fb76a 100644 --- a/plugins/store/src/api-iife.js +++ b/plugins/store/src/api-iife.js @@ -1 +1 @@ -if("__TAURI__"in window){var __TAURI_PLUGIN_STORE__=function(t){"use strict";function a(t,a=!1){return window.__TAURI_INTERNALS__.transformCallback(t,a)}async function e(t,a={},e){return window.__TAURI_INTERNALS__.invoke(t,a,e)}var n;async function r(t,n,r){return e("plugin:event|listen",{event:t,windowLabel:r?.target,handler:a(n)}).then((a=>async()=>async function(t,a){await e("plugin:event|unlisten",{event:t,eventId:a})}(t,a)))}"function"==typeof SuppressedError&&SuppressedError,function(t){t.WINDOW_RESIZED="tauri://resize",t.WINDOW_MOVED="tauri://move",t.WINDOW_CLOSE_REQUESTED="tauri://close-requested",t.WINDOW_CREATED="tauri://window-created",t.WINDOW_DESTROYED="tauri://destroyed",t.WINDOW_FOCUS="tauri://focus",t.WINDOW_BLUR="tauri://blur",t.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",t.WINDOW_THEME_CHANGED="tauri://theme-changed",t.WINDOW_FILE_DROP="tauri://file-drop",t.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",t.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled"}(n||(n={}));return t.Store=class{constructor(t){this.path=t}async set(t,a){return await e("plugin:store|set",{path:this.path,key:t,value:a})}async get(t){return await e("plugin:store|get",{path:this.path,key:t})}async has(t){return await e("plugin:store|has",{path:this.path,key:t})}async delete(t){return await e("plugin:store|delete",{path:this.path,key:t})}async clear(){return await e("plugin:store|clear",{path:this.path})}async reset(){return await e("plugin:store|reset",{path:this.path})}async keys(){return await e("plugin:store|keys",{path:this.path})}async values(){return await e("plugin:store|values",{path:this.path})}async entries(){return await e("plugin:store|entries",{path:this.path})}async length(){return await e("plugin:store|length",{path:this.path})}async load(){return await e("plugin:store|load",{path:this.path})}async save(){return await e("plugin:store|save",{path:this.path})}async onKeyChange(t,a){return await r("store://change",(e=>{e.payload.path===this.path&&e.payload.key===t&&a(e.payload.value)}))}async onChange(t){return await r("store://change",(a=>{a.payload.path===this.path&&t(a.payload.key,a.payload.value)}))}},t}({});Object.defineProperty(window.__TAURI__,"store",{value:__TAURI_PLUGIN_STORE__})} +if("__TAURI__"in window){var __TAURI_PLUGIN_STORE__=function(t){"use strict";function a(t,a=!1){return window.__TAURI_INTERNALS__.transformCallback(t,a)}async function e(t,a={},e){return window.__TAURI_INTERNALS__.invoke(t,a,e)}var n;async function r(t,n,r){const i="string"==typeof r?.target?{kind:"AnyLabel",label:r.target}:r?.target??{kind:"Any"};return e("plugin:event|listen",{event:t,target:i,handler:a(n)}).then((a=>async()=>async function(t,a){await e("plugin:event|unlisten",{event:t,eventId:a})}(t,a)))}"function"==typeof SuppressedError&&SuppressedError,function(t){t.WINDOW_RESIZED="tauri://resize",t.WINDOW_MOVED="tauri://move",t.WINDOW_CLOSE_REQUESTED="tauri://close-requested",t.WINDOW_DESTROYED="tauri://destroyed",t.WINDOW_FOCUS="tauri://focus",t.WINDOW_BLUR="tauri://blur",t.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",t.WINDOW_THEME_CHANGED="tauri://theme-changed",t.WEBVIEW_CREATED="tauri://webview-created",t.WEBVIEW_FILE_DROP="tauri://file-drop",t.WEBVIEW_FILE_DROP_HOVER="tauri://file-drop-hover",t.WEBVIEW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled"}(n||(n={}));return t.Store=class{constructor(t){this.path=t}async set(t,a){return await e("plugin:store|set",{path:this.path,key:t,value:a})}async get(t){return await e("plugin:store|get",{path:this.path,key:t})}async has(t){return await e("plugin:store|has",{path:this.path,key:t})}async delete(t){return await e("plugin:store|delete",{path:this.path,key:t})}async clear(){return await e("plugin:store|clear",{path:this.path})}async reset(){return await e("plugin:store|reset",{path:this.path})}async keys(){return await e("plugin:store|keys",{path:this.path})}async values(){return await e("plugin:store|values",{path:this.path})}async entries(){return await e("plugin:store|entries",{path:this.path})}async length(){return await e("plugin:store|length",{path:this.path})}async load(){return await e("plugin:store|load",{path:this.path})}async save(){return await e("plugin:store|save",{path:this.path})}async onKeyChange(t,a){return await r("store://change",(e=>{e.payload.path===this.path&&e.payload.key===t&&a(e.payload.value)}))}async onChange(t){return await r("store://change",(a=>{a.payload.path===this.path&&t(a.payload.key,a.payload.value)}))}},t}({});Object.defineProperty(window.__TAURI__,"store",{value:__TAURI_PLUGIN_STORE__})} diff --git a/plugins/stronghold/Cargo.toml b/plugins/stronghold/Cargo.toml index d876cd739..69e0f7b4f 100644 --- a/plugins/stronghold/Cargo.toml +++ b/plugins/stronghold/Cargo.toml @@ -6,10 +6,14 @@ authors = { workspace = true } license = { workspace = true } edition = { workspace = true } rust-version = { workspace = true } +links = "tauri-plugin-stronghold" [package.metadata.docs.rs] -rustc-args = [ "--cfg", "docsrs" ] -rustdoc-args = [ "--cfg", "docsrs" ] +rustc-args = ["--cfg", "docsrs"] +rustdoc-args = ["--cfg", "docsrs"] + +[build-dependencies] +tauri-plugin = { workspace = true, features = ["build"] } [dependencies] serde = { workspace = true } @@ -20,15 +24,15 @@ thiserror = { workspace = true } iota_stronghold = "1" iota-crypto = "0.23" hex = "0.4" -zeroize = { version = "1", features = [ "zeroize_derive" ] } +zeroize = { version = "1", features = ["zeroize_derive"] } rust-argon2 = { version = "1", optional = true } rand_chacha = { version = "0.3.1", optional = true } -rand_core = { version = "0.6.4", features = [ "getrandom" ], optional = true } +rand_core = { version = "0.6.4", features = ["getrandom"], optional = true } [dev-dependencies] rand = "0.8" rusty-fork = "0.3" [features] -default = [ "kdf" ] -kdf = [ "dep:rust-argon2", "dep:rand_chacha", "dep:rand_core" ] +default = ["kdf"] +kdf = ["dep:rust-argon2", "dep:rand_chacha", "dep:rand_core"] diff --git a/plugins/stronghold/build.rs b/plugins/stronghold/build.rs new file mode 100644 index 000000000..05404a1be --- /dev/null +++ b/plugins/stronghold/build.rs @@ -0,0 +1,21 @@ +// Copyright 2019-2023 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + +const COMMANDS: &[&str] = &[ + "initialize", + "destroy", + "save", + "create_client", + "load_client", + "get_store_record", + "save_store_record", + "remove_store_record", + "save_secret", + "remove_secret", + "execute_procedure", +]; + +fn main() { + tauri_plugin::Builder::new(COMMANDS).build(); +} diff --git a/plugins/stronghold/package.json b/plugins/stronghold/package.json index 40009612a..cda0fbc06 100644 --- a/plugins/stronghold/package.json +++ b/plugins/stronghold/package.json @@ -24,6 +24,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.13" + "@tauri-apps/api": "2.0.0-beta.0" } } diff --git a/plugins/stronghold/permissions/.dgitignore b/plugins/stronghold/permissions/.dgitignore new file mode 100644 index 000000000..c75f615b1 --- /dev/null +++ b/plugins/stronghold/permissions/.dgitignore @@ -0,0 +1 @@ +schemas/ diff --git a/plugins/stronghold/permissions/.gitignore b/plugins/stronghold/permissions/.gitignore new file mode 100644 index 000000000..c75f615b1 --- /dev/null +++ b/plugins/stronghold/permissions/.gitignore @@ -0,0 +1 @@ +schemas/ diff --git a/plugins/stronghold/permissions/autogenerated/commands/create_client.toml b/plugins/stronghold/permissions/autogenerated/commands/create_client.toml new file mode 100644 index 000000000..1405d1e2f --- /dev/null +++ b/plugins/stronghold/permissions/autogenerated/commands/create_client.toml @@ -0,0 +1,13 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +[[permission]] +identifier = "allow-create-client" +description = "Enables the create_client command without any pre-configured scope." +commands.allow = ["create_client"] + +[[permission]] +identifier = "deny-create-client" +description = "Denies the create_client command without any pre-configured scope." +commands.deny = ["create_client"] diff --git a/plugins/stronghold/permissions/autogenerated/commands/destroy.toml b/plugins/stronghold/permissions/autogenerated/commands/destroy.toml new file mode 100644 index 000000000..79580619e --- /dev/null +++ b/plugins/stronghold/permissions/autogenerated/commands/destroy.toml @@ -0,0 +1,13 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +[[permission]] +identifier = "allow-destroy" +description = "Enables the destroy command without any pre-configured scope." +commands.allow = ["destroy"] + +[[permission]] +identifier = "deny-destroy" +description = "Denies the destroy command without any pre-configured scope." +commands.deny = ["destroy"] diff --git a/plugins/stronghold/permissions/autogenerated/commands/execute_procedure.toml b/plugins/stronghold/permissions/autogenerated/commands/execute_procedure.toml new file mode 100644 index 000000000..f6c2d2b13 --- /dev/null +++ b/plugins/stronghold/permissions/autogenerated/commands/execute_procedure.toml @@ -0,0 +1,13 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +[[permission]] +identifier = "allow-execute-procedure" +description = "Enables the execute_procedure command without any pre-configured scope." +commands.allow = ["execute_procedure"] + +[[permission]] +identifier = "deny-execute-procedure" +description = "Denies the execute_procedure command without any pre-configured scope." +commands.deny = ["execute_procedure"] diff --git a/plugins/stronghold/permissions/autogenerated/commands/get_store_record.toml b/plugins/stronghold/permissions/autogenerated/commands/get_store_record.toml new file mode 100644 index 000000000..84a9e53c4 --- /dev/null +++ b/plugins/stronghold/permissions/autogenerated/commands/get_store_record.toml @@ -0,0 +1,13 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +[[permission]] +identifier = "allow-get-store-record" +description = "Enables the get_store_record command without any pre-configured scope." +commands.allow = ["get_store_record"] + +[[permission]] +identifier = "deny-get-store-record" +description = "Denies the get_store_record command without any pre-configured scope." +commands.deny = ["get_store_record"] diff --git a/plugins/stronghold/permissions/autogenerated/commands/initialize.toml b/plugins/stronghold/permissions/autogenerated/commands/initialize.toml new file mode 100644 index 000000000..73961d137 --- /dev/null +++ b/plugins/stronghold/permissions/autogenerated/commands/initialize.toml @@ -0,0 +1,13 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +[[permission]] +identifier = "allow-initialize" +description = "Enables the initialize command without any pre-configured scope." +commands.allow = ["initialize"] + +[[permission]] +identifier = "deny-initialize" +description = "Denies the initialize command without any pre-configured scope." +commands.deny = ["initialize"] diff --git a/plugins/stronghold/permissions/autogenerated/commands/load_client.toml b/plugins/stronghold/permissions/autogenerated/commands/load_client.toml new file mode 100644 index 000000000..77949c108 --- /dev/null +++ b/plugins/stronghold/permissions/autogenerated/commands/load_client.toml @@ -0,0 +1,13 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +[[permission]] +identifier = "allow-load-client" +description = "Enables the load_client command without any pre-configured scope." +commands.allow = ["load_client"] + +[[permission]] +identifier = "deny-load-client" +description = "Denies the load_client command without any pre-configured scope." +commands.deny = ["load_client"] diff --git a/plugins/stronghold/permissions/autogenerated/commands/remove_secret.toml b/plugins/stronghold/permissions/autogenerated/commands/remove_secret.toml new file mode 100644 index 000000000..6dafb68b0 --- /dev/null +++ b/plugins/stronghold/permissions/autogenerated/commands/remove_secret.toml @@ -0,0 +1,13 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +[[permission]] +identifier = "allow-remove-secret" +description = "Enables the remove_secret command without any pre-configured scope." +commands.allow = ["remove_secret"] + +[[permission]] +identifier = "deny-remove-secret" +description = "Denies the remove_secret command without any pre-configured scope." +commands.deny = ["remove_secret"] diff --git a/plugins/stronghold/permissions/autogenerated/commands/remove_store_record.toml b/plugins/stronghold/permissions/autogenerated/commands/remove_store_record.toml new file mode 100644 index 000000000..20fd1e8a0 --- /dev/null +++ b/plugins/stronghold/permissions/autogenerated/commands/remove_store_record.toml @@ -0,0 +1,13 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +[[permission]] +identifier = "allow-remove-store-record" +description = "Enables the remove_store_record command without any pre-configured scope." +commands.allow = ["remove_store_record"] + +[[permission]] +identifier = "deny-remove-store-record" +description = "Denies the remove_store_record command without any pre-configured scope." +commands.deny = ["remove_store_record"] diff --git a/plugins/stronghold/permissions/autogenerated/commands/save.toml b/plugins/stronghold/permissions/autogenerated/commands/save.toml new file mode 100644 index 000000000..d3e842201 --- /dev/null +++ b/plugins/stronghold/permissions/autogenerated/commands/save.toml @@ -0,0 +1,13 @@ +# 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"] diff --git a/plugins/stronghold/permissions/autogenerated/commands/save_secret.toml b/plugins/stronghold/permissions/autogenerated/commands/save_secret.toml new file mode 100644 index 000000000..d999f0b25 --- /dev/null +++ b/plugins/stronghold/permissions/autogenerated/commands/save_secret.toml @@ -0,0 +1,13 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +[[permission]] +identifier = "allow-save-secret" +description = "Enables the save_secret command without any pre-configured scope." +commands.allow = ["save_secret"] + +[[permission]] +identifier = "deny-save-secret" +description = "Denies the save_secret command without any pre-configured scope." +commands.deny = ["save_secret"] diff --git a/plugins/stronghold/permissions/autogenerated/commands/save_store_record.toml b/plugins/stronghold/permissions/autogenerated/commands/save_store_record.toml new file mode 100644 index 000000000..8292ded00 --- /dev/null +++ b/plugins/stronghold/permissions/autogenerated/commands/save_store_record.toml @@ -0,0 +1,13 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +[[permission]] +identifier = "allow-save-store-record" +description = "Enables the save_store_record command without any pre-configured scope." +commands.allow = ["save_store_record"] + +[[permission]] +identifier = "deny-save-store-record" +description = "Denies the save_store_record command without any pre-configured scope." +commands.deny = ["save_store_record"] diff --git a/plugins/stronghold/permissions/autogenerated/reference.md b/plugins/stronghold/permissions/autogenerated/reference.md new file mode 100644 index 000000000..799ae7dbf --- /dev/null +++ b/plugins/stronghold/permissions/autogenerated/reference.md @@ -0,0 +1,90 @@ +# Permissions + +## allow-create-client + +Enables the create_client command without any pre-configured scope. + +## deny-create-client + +Denies the create_client command without any pre-configured scope. + +## allow-destroy + +Enables the destroy command without any pre-configured scope. + +## deny-destroy + +Denies the destroy command without any pre-configured scope. + +## allow-execute-procedure + +Enables the execute_procedure command without any pre-configured scope. + +## deny-execute-procedure + +Denies the execute_procedure command without any pre-configured scope. + +## allow-get-store-record + +Enables the get_store_record command without any pre-configured scope. + +## deny-get-store-record + +Denies the get_store_record command without any pre-configured scope. + +## allow-initialize + +Enables the initialize command without any pre-configured scope. + +## deny-initialize + +Denies the initialize command without any pre-configured scope. + +## allow-load-client + +Enables the load_client command without any pre-configured scope. + +## deny-load-client + +Denies the load_client command without any pre-configured scope. + +## allow-remove-secret + +Enables the remove_secret command without any pre-configured scope. + +## deny-remove-secret + +Denies the remove_secret command without any pre-configured scope. + +## allow-remove-store-record + +Enables the remove_store_record command without any pre-configured scope. + +## deny-remove-store-record + +Denies the remove_store_record command without any pre-configured scope. + +## allow-save + +Enables the save command without any pre-configured scope. + +## deny-save + +Denies the save command without any pre-configured scope. + +## allow-save-secret + +Enables the save_secret command without any pre-configured scope. + +## deny-save-secret + +Denies the save_secret command without any pre-configured scope. + +## allow-save-store-record + +Enables the save_store_record command without any pre-configured scope. + +## deny-save-store-record + +Denies the save_store_record command without any pre-configured scope. + diff --git a/plugins/updater/Cargo.toml b/plugins/updater/Cargo.toml index dba6817fd..46a62ac9f 100644 --- a/plugins/updater/Cargo.toml +++ b/plugins/updater/Cargo.toml @@ -6,10 +6,14 @@ edition = { workspace = true } authors = { workspace = true } license = { workspace = true } rust-version = { workspace = true } +links = "tauri-plugin-updater" [package.metadata.docs.rs] -rustc-args = [ "--cfg", "docsrs" ] -rustdoc-args = [ "--cfg", "docsrs" ] +rustc-args = ["--cfg", "docsrs"] +rustdoc-args = ["--cfg", "docsrs"] + +[build-dependencies] +tauri-plugin = { workspace = true, features = ["build"] } [dependencies] tauri = { workspace = true } @@ -17,15 +21,18 @@ serde = { workspace = true } serde_json = { workspace = true } thiserror = { workspace = true } tokio = "1" -reqwest = { version = "0.11", default-features = false, features = [ "json", "stream" ] } +reqwest = { version = "0.11", default-features = false, features = [ + "json", + "stream", +] } url = { workspace = true } http = "0.2" dirs-next = "2" minisign-verify = "0.2" -time = { version = "0.3", features = [ "parsing", "formatting" ] } +time = { version = "0.3", features = ["parsing", "formatting"] } base64 = "0.21" percent-encoding = "2" -semver = { version = "1", features = [ "serde" ] } +semver = { version = "1", features = ["serde"] } futures-util = "0.3" tempfile = "3" zip = "0.6" @@ -41,6 +48,6 @@ flate2 = "1.0.27" mockito = "0.31" [features] -native-tls = [ "reqwest/native-tls" ] -native-tls-vendored = [ "reqwest/native-tls-vendored" ] -rustls-tls = [ "reqwest/rustls-tls" ] +native-tls = ["reqwest/native-tls"] +native-tls-vendored = ["reqwest/native-tls-vendored"] +rustls-tls = ["reqwest/rustls-tls"] diff --git a/plugins/updater/build.rs b/plugins/updater/build.rs index 0b339c43e..6ba1a7d91 100644 --- a/plugins/updater/build.rs +++ b/plugins/updater/build.rs @@ -2,7 +2,11 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT +const COMMANDS: &[&str] = &["check", "download_and_install"]; + fn main() { + tauri_plugin::Builder::new(COMMANDS).build(); + let target_os = std::env::var("CARGO_CFG_TARGET_OS").unwrap(); let mobile = target_os == "ios" || target_os == "android"; alias("desktop", !mobile); diff --git a/plugins/updater/package.json b/plugins/updater/package.json index 3022942f7..56d99942c 100644 --- a/plugins/updater/package.json +++ b/plugins/updater/package.json @@ -23,6 +23,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.13" + "@tauri-apps/api": "2.0.0-beta.0" } } diff --git a/plugins/updater/permissions/.dgitignore b/plugins/updater/permissions/.dgitignore new file mode 100644 index 000000000..c75f615b1 --- /dev/null +++ b/plugins/updater/permissions/.dgitignore @@ -0,0 +1 @@ +schemas/ diff --git a/plugins/updater/permissions/.gitignore b/plugins/updater/permissions/.gitignore new file mode 100644 index 000000000..c75f615b1 --- /dev/null +++ b/plugins/updater/permissions/.gitignore @@ -0,0 +1 @@ +schemas/ diff --git a/plugins/updater/permissions/autogenerated/commands/check.toml b/plugins/updater/permissions/autogenerated/commands/check.toml new file mode 100644 index 000000000..fca73ce9f --- /dev/null +++ b/plugins/updater/permissions/autogenerated/commands/check.toml @@ -0,0 +1,13 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +[[permission]] +identifier = "allow-check" +description = "Enables the check command without any pre-configured scope." +commands.allow = ["check"] + +[[permission]] +identifier = "deny-check" +description = "Denies the check command without any pre-configured scope." +commands.deny = ["check"] diff --git a/plugins/updater/permissions/autogenerated/commands/download_and_install.toml b/plugins/updater/permissions/autogenerated/commands/download_and_install.toml new file mode 100644 index 000000000..40858d1b3 --- /dev/null +++ b/plugins/updater/permissions/autogenerated/commands/download_and_install.toml @@ -0,0 +1,13 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +[[permission]] +identifier = "allow-download-and-install" +description = "Enables the download_and_install command without any pre-configured scope." +commands.allow = ["download_and_install"] + +[[permission]] +identifier = "deny-download-and-install" +description = "Denies the download_and_install command without any pre-configured scope." +commands.deny = ["download_and_install"] diff --git a/plugins/updater/permissions/autogenerated/reference.md b/plugins/updater/permissions/autogenerated/reference.md new file mode 100644 index 000000000..033690d41 --- /dev/null +++ b/plugins/updater/permissions/autogenerated/reference.md @@ -0,0 +1,22 @@ +# Permissions + +## allow-check + +Enables the check command without any pre-configured scope. + +## deny-check + +Denies the check command without any pre-configured scope. + +## allow-download-and-install + +Enables the download_and_install command without any pre-configured scope. + +## deny-download-and-install + +Denies the download_and_install command without any pre-configured scope. + +## default + +Allows checking for new updates and installing them + diff --git a/plugins/updater/permissions/default.toml b/plugins/updater/permissions/default.toml new file mode 100644 index 000000000..857f9b5e3 --- /dev/null +++ b/plugins/updater/permissions/default.toml @@ -0,0 +1,4 @@ +"$schema" = "schemas/schema.json" +[default] +description = "Allows checking for new updates and installing them" +permissions = ["allow-check", "allow-download-and-install"] diff --git a/plugins/updater/src/config.rs b/plugins/updater/src/config.rs index 84835b3b7..aea6a5474 100644 --- a/plugins/updater/src/config.rs +++ b/plugins/updater/src/config.rs @@ -64,10 +64,10 @@ impl Default for WindowsUpdateInstallMode { #[serde(rename_all = "camelCase")] pub struct WindowsConfig { /// Additional arguments given to the NSIS or WiX installer. - #[serde(default)] + #[serde(default, alias = "installer-args")] pub installer_args: Vec, /// Updating mode, see [`WindowsUpdateInstallMode`] for more info. - #[serde(default)] + #[serde(default, alias = "install-mode")] pub install_mode: WindowsUpdateInstallMode, } @@ -78,9 +78,9 @@ pub struct Config { /// Updater endpoints. #[serde(default)] pub endpoints: Vec, - /// Updater pubkey used to verify signatures. + /// Signature public key. pub pubkey: String, - /// Updater config options specific to windows. + /// The Windows configuration for the updater. pub windows: Option, } diff --git a/plugins/updater/tests/app-updater/.gitignore b/plugins/updater/tests/app-updater/.gitignore index e69de29bb..fd0dd6567 100644 --- a/plugins/updater/tests/app-updater/.gitignore +++ b/plugins/updater/tests/app-updater/.gitignore @@ -0,0 +1 @@ +/capabilities/schemas diff --git a/plugins/updater/tests/app-updater/tests/update.rs b/plugins/updater/tests/app-updater/tests/update.rs index 29e878a9e..797be1f8a 100644 --- a/plugins/updater/tests/app-updater/tests/update.rs +++ b/plugins/updater/tests/app-updater/tests/update.rs @@ -15,14 +15,9 @@ use serde::Serialize; const UPDATER_PRIVATE_KEY: &str = "dW50cnVzdGVkIGNvbW1lbnQ6IHJzaWduIGVuY3J5cHRlZCBzZWNyZXQga2V5ClJXUlRZMEl5Qm9uUXIyeEM2YkczeGMwZDFENmw1WHEzaFk5aDlOOXNyTWRxRnY4UUpzZ0FBQkFBQUFBQUFBQUFBQUlBQUFBQTVWbWdFYUZRWnNDZmdyUW9ibWExVEFTY0pVTWpVS2xlOHdhR1I3Q3hpd2FTNjg1MXZENEQyZWxnVE5PbnJUYWFTajRmdTJ3UWVPRlNDZldqY3dJeThKNktmY3BGdXl1M1BPdHgwOFhIQzJLSnpqS0Z2cVdmaEs2WWRmK3d4SHVCMlpHVGduaVAzclU9Cg=="; -#[derive(Serialize)] -struct PackageConfig { - version: &'static str, -} - #[derive(Serialize)] struct Config { - package: PackageConfig, + version: &'static str, } #[derive(Serialize)] @@ -163,9 +158,7 @@ fn update_app() { let manifest_dir = PathBuf::from(env!("CARGO_MANIFEST_DIR")); let root_dir = manifest_dir.join("../../../.."); - let mut config = Config { - package: PackageConfig { version: "1.0.0" }, - }; + let mut config = Config { version: "1.0.0" }; // bundle app update build_app(&manifest_dir, &config, true, Default::default()); @@ -248,7 +241,7 @@ fn update_app() { } }); - config.package.version = "0.1.0"; + config.version = "0.1.0"; // bundle initial app version build_app(&manifest_dir, &config, false, bundle_target); diff --git a/plugins/upload/Cargo.toml b/plugins/upload/Cargo.toml index df2f04e16..a22438069 100644 --- a/plugins/upload/Cargo.toml +++ b/plugins/upload/Cargo.toml @@ -6,10 +6,14 @@ authors = { workspace = true } license = { workspace = true } edition = { workspace = true } rust-version = { workspace = true } +links = "tauri-plugin-upload" [package.metadata.docs.rs] -rustc-args = [ "--cfg", "docsrs" ] -rustdoc-args = [ "--cfg", "docsrs" ] +rustc-args = ["--cfg", "docsrs"] +rustdoc-args = ["--cfg", "docsrs"] + +[build-dependencies] +tauri-plugin = { workspace = true, features = ["build"] } [dependencies] serde = { workspace = true } @@ -17,13 +21,16 @@ serde_json = { workspace = true } tauri = { workspace = true } log = { workspace = true } thiserror = { workspace = true } -tokio = { version = "1", features = [ "fs" ] } -tokio-util = { version = "0.7", features = [ "codec" ] } -reqwest = { version = "0.11", default-features = false, features = [ "json", "stream" ] } +tokio = { version = "1", features = ["fs"] } +tokio-util = { version = "0.7", features = ["codec"] } +reqwest = { version = "0.11", default-features = false, features = [ + "json", + "stream", +] } futures-util = "0.3" read-progress-stream = "1.0.0" [features] -native-tls = [ "reqwest/native-tls" ] -native-tls-vendored = [ "reqwest/native-tls-vendored" ] -rustls-tls = [ "reqwest/rustls-tls" ] +native-tls = ["reqwest/native-tls"] +native-tls-vendored = ["reqwest/native-tls-vendored"] +rustls-tls = ["reqwest/rustls-tls"] diff --git a/plugins/upload/build.rs b/plugins/upload/build.rs new file mode 100644 index 000000000..bfdf48b9c --- /dev/null +++ b/plugins/upload/build.rs @@ -0,0 +1,9 @@ +// Copyright 2019-2023 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + +const COMMANDS: &[&str] = &["download", "upload"]; + +fn main() { + tauri_plugin::Builder::new(COMMANDS).build(); +} diff --git a/plugins/upload/package.json b/plugins/upload/package.json index 729f73c77..9a850b59f 100644 --- a/plugins/upload/package.json +++ b/plugins/upload/package.json @@ -24,6 +24,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.13" + "@tauri-apps/api": "2.0.0-beta.0" } } diff --git a/plugins/upload/permissions/.dgitignore b/plugins/upload/permissions/.dgitignore new file mode 100644 index 000000000..c75f615b1 --- /dev/null +++ b/plugins/upload/permissions/.dgitignore @@ -0,0 +1 @@ +schemas/ diff --git a/plugins/upload/permissions/.gitignore b/plugins/upload/permissions/.gitignore new file mode 100644 index 000000000..c75f615b1 --- /dev/null +++ b/plugins/upload/permissions/.gitignore @@ -0,0 +1 @@ +schemas/ diff --git a/plugins/upload/permissions/autogenerated/commands/download.toml b/plugins/upload/permissions/autogenerated/commands/download.toml new file mode 100644 index 000000000..896b30ce2 --- /dev/null +++ b/plugins/upload/permissions/autogenerated/commands/download.toml @@ -0,0 +1,13 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +[[permission]] +identifier = "allow-download" +description = "Enables the download command without any pre-configured scope." +commands.allow = ["download"] + +[[permission]] +identifier = "deny-download" +description = "Denies the download command without any pre-configured scope." +commands.deny = ["download"] diff --git a/plugins/upload/permissions/autogenerated/commands/upload.toml b/plugins/upload/permissions/autogenerated/commands/upload.toml new file mode 100644 index 000000000..d36081c9c --- /dev/null +++ b/plugins/upload/permissions/autogenerated/commands/upload.toml @@ -0,0 +1,13 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +[[permission]] +identifier = "allow-upload" +description = "Enables the upload command without any pre-configured scope." +commands.allow = ["upload"] + +[[permission]] +identifier = "deny-upload" +description = "Denies the upload command without any pre-configured scope." +commands.deny = ["upload"] diff --git a/plugins/upload/permissions/autogenerated/reference.md b/plugins/upload/permissions/autogenerated/reference.md new file mode 100644 index 000000000..2e8a4853c --- /dev/null +++ b/plugins/upload/permissions/autogenerated/reference.md @@ -0,0 +1,18 @@ +# Permissions + +## allow-download + +Enables the download command without any pre-configured scope. + +## deny-download + +Denies the download command without any pre-configured scope. + +## allow-upload + +Enables the upload command without any pre-configured scope. + +## deny-upload + +Denies the upload command without any pre-configured scope. + diff --git a/plugins/websocket/Cargo.toml b/plugins/websocket/Cargo.toml index a53b367f8..d9733fb77 100644 --- a/plugins/websocket/Cargo.toml +++ b/plugins/websocket/Cargo.toml @@ -6,11 +6,15 @@ authors = { workspace = true } license = { workspace = true } edition = { workspace = true } rust-version = { workspace = true } -exclude = [ "/examples" ] +links = "tauri-plugin-websocket" +exclude = ["/examples"] [package.metadata.docs.rs] -rustc-args = [ "--cfg", "docsrs" ] -rustdoc-args = [ "--cfg", "docsrs" ] +rustc-args = ["--cfg", "docsrs"] +rustdoc-args = ["--cfg", "docsrs"] + +[build-dependencies] +tauri-plugin = { workspace = true, features = ["build"] } [dependencies] serde = { workspace = true } @@ -20,10 +24,10 @@ log = { workspace = true } thiserror = { workspace = true } rand = "0.8" futures-util = "0.3" -tokio = { version = "1", features = [ "net", "sync" ] } +tokio = { version = "1", features = ["net", "sync"] } tokio-tungstenite = { version = "0.20" } [features] -native-tls = [ "tokio-tungstenite/native-tls" ] -native-tls-vendored = [ "tokio-tungstenite/native-tls-vendored" ] -rustls-tls-webpki-roots = [ "tokio-tungstenite/rustls-tls-webpki-roots" ] +native-tls = ["tokio-tungstenite/native-tls"] +native-tls-vendored = ["tokio-tungstenite/native-tls-vendored"] +rustls-tls-webpki-roots = ["tokio-tungstenite/rustls-tls-webpki-roots"] diff --git a/plugins/websocket/build.rs b/plugins/websocket/build.rs new file mode 100644 index 000000000..b7bf848cb --- /dev/null +++ b/plugins/websocket/build.rs @@ -0,0 +1,9 @@ +// Copyright 2019-2023 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + +const COMMANDS: &[&str] = &["connect", "send"]; + +fn main() { + tauri_plugin::Builder::new(COMMANDS).build(); +} diff --git a/plugins/websocket/examples/svelte-app/package.json b/plugins/websocket/examples/svelte-app/package.json index fbc2238c5..0e8e79831 100644 --- a/plugins/websocket/examples/svelte-app/package.json +++ b/plugins/websocket/examples/svelte-app/package.json @@ -13,11 +13,11 @@ "devDependencies": { "@sveltejs/adapter-auto": "2.1.1", "@sveltejs/kit": "1.27.7", - "@tauri-apps/cli": "2.0.0-alpha.20", + "@tauri-apps/cli": "2.0.0-beta.0", "svelte": "4.2.8", "svelte-check": "3.6.2", "typescript": "5.3.2", - "vite": "5.0.6" + "vite": "5.0.12" }, "dependencies": { "@tauri-apps/plugin-websocket": "link:..\\.." diff --git a/plugins/websocket/examples/svelte-app/src-tauri/.gitignore b/plugins/websocket/examples/svelte-app/src-tauri/.gitignore index c10605e59..b4fd48c68 100644 --- a/plugins/websocket/examples/svelte-app/src-tauri/.gitignore +++ b/plugins/websocket/examples/svelte-app/src-tauri/.gitignore @@ -3,5 +3,7 @@ /target/ WixTools +/capabilities/schemas + # These are backup files generated by rustfmt **/*.rs.bk diff --git a/plugins/websocket/package.json b/plugins/websocket/package.json index 1f059e3da..a1e3b442d 100644 --- a/plugins/websocket/package.json +++ b/plugins/websocket/package.json @@ -23,6 +23,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.13" + "@tauri-apps/api": "2.0.0-beta.0" } } diff --git a/plugins/websocket/permissions/.dgitignore b/plugins/websocket/permissions/.dgitignore new file mode 100644 index 000000000..c75f615b1 --- /dev/null +++ b/plugins/websocket/permissions/.dgitignore @@ -0,0 +1 @@ +schemas/ diff --git a/plugins/websocket/permissions/.gitignore b/plugins/websocket/permissions/.gitignore new file mode 100644 index 000000000..c75f615b1 --- /dev/null +++ b/plugins/websocket/permissions/.gitignore @@ -0,0 +1 @@ +schemas/ diff --git a/plugins/websocket/permissions/autogenerated/commands/connect.toml b/plugins/websocket/permissions/autogenerated/commands/connect.toml new file mode 100644 index 000000000..49ce9ad3f --- /dev/null +++ b/plugins/websocket/permissions/autogenerated/commands/connect.toml @@ -0,0 +1,13 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +[[permission]] +identifier = "allow-connect" +description = "Enables the connect command without any pre-configured scope." +commands.allow = ["connect"] + +[[permission]] +identifier = "deny-connect" +description = "Denies the connect command without any pre-configured scope." +commands.deny = ["connect"] diff --git a/plugins/websocket/permissions/autogenerated/commands/send.toml b/plugins/websocket/permissions/autogenerated/commands/send.toml new file mode 100644 index 000000000..a7bac8f57 --- /dev/null +++ b/plugins/websocket/permissions/autogenerated/commands/send.toml @@ -0,0 +1,13 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +[[permission]] +identifier = "allow-send" +description = "Enables the send command without any pre-configured scope." +commands.allow = ["send"] + +[[permission]] +identifier = "deny-send" +description = "Denies the send command without any pre-configured scope." +commands.deny = ["send"] diff --git a/plugins/websocket/permissions/autogenerated/reference.md b/plugins/websocket/permissions/autogenerated/reference.md new file mode 100644 index 000000000..9f66b7986 --- /dev/null +++ b/plugins/websocket/permissions/autogenerated/reference.md @@ -0,0 +1,22 @@ +# Permissions + +## allow-connect + +Enables the connect command without any pre-configured scope. + +## deny-connect + +Denies the connect command without any pre-configured scope. + +## allow-send + +Enables the send command without any pre-configured scope. + +## deny-send + +Denies the send command without any pre-configured scope. + +## default + +Allows connecting and sending data to a WebSocket server + diff --git a/plugins/websocket/permissions/default.toml b/plugins/websocket/permissions/default.toml new file mode 100644 index 000000000..5fc8962b4 --- /dev/null +++ b/plugins/websocket/permissions/default.toml @@ -0,0 +1,4 @@ +"$schema" = "schemas/schema.json" +[default] +description = "Allows connecting and sending data to a WebSocket server" +permissions = ["allow-connect", "allow-send"] diff --git a/plugins/window-state/Cargo.toml b/plugins/window-state/Cargo.toml index 300a57048..fe7089392 100644 --- a/plugins/window-state/Cargo.toml +++ b/plugins/window-state/Cargo.toml @@ -6,10 +6,14 @@ authors = { workspace = true } license = { workspace = true } edition = { workspace = true } rust-version = { workspace = true } +links = "tauri-plugin-window-state" [package.metadata.docs.rs] -rustc-args = [ "--cfg", "docsrs" ] -rustdoc-args = [ "--cfg", "docsrs" ] +rustc-args = ["--cfg", "docsrs"] +rustdoc-args = ["--cfg", "docsrs"] + +[build-dependencies] +tauri-plugin = { workspace = true, features = ["build"] } [dependencies] serde = { workspace = true } diff --git a/plugins/window-state/build.rs b/plugins/window-state/build.rs new file mode 100644 index 000000000..9d9a160a3 --- /dev/null +++ b/plugins/window-state/build.rs @@ -0,0 +1,9 @@ +// Copyright 2019-2023 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + +const COMMANDS: &[&str] = &["save_window_state", "restore_window_state"]; + +fn main() { + tauri_plugin::Builder::new(COMMANDS).build(); +} diff --git a/plugins/window-state/package.json b/plugins/window-state/package.json index e6a66f2a1..aa051c223 100644 --- a/plugins/window-state/package.json +++ b/plugins/window-state/package.json @@ -24,6 +24,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.13" + "@tauri-apps/api": "2.0.0-beta.0" } } diff --git a/plugins/window-state/permissions/.dgitignore b/plugins/window-state/permissions/.dgitignore new file mode 100644 index 000000000..c75f615b1 --- /dev/null +++ b/plugins/window-state/permissions/.dgitignore @@ -0,0 +1 @@ +schemas/ diff --git a/plugins/window-state/permissions/.gitignore b/plugins/window-state/permissions/.gitignore new file mode 100644 index 000000000..c75f615b1 --- /dev/null +++ b/plugins/window-state/permissions/.gitignore @@ -0,0 +1 @@ +schemas/ diff --git a/plugins/window-state/permissions/autogenerated/commands/restore_window_state.toml b/plugins/window-state/permissions/autogenerated/commands/restore_window_state.toml new file mode 100644 index 000000000..07fa8bb21 --- /dev/null +++ b/plugins/window-state/permissions/autogenerated/commands/restore_window_state.toml @@ -0,0 +1,13 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +[[permission]] +identifier = "allow-restore-window-state" +description = "Enables the restore_window_state command without any pre-configured scope." +commands.allow = ["restore_window_state"] + +[[permission]] +identifier = "deny-restore-window-state" +description = "Denies the restore_window_state command without any pre-configured scope." +commands.deny = ["restore_window_state"] diff --git a/plugins/window-state/permissions/autogenerated/commands/save_window_state.toml b/plugins/window-state/permissions/autogenerated/commands/save_window_state.toml new file mode 100644 index 000000000..b29e1bf3b --- /dev/null +++ b/plugins/window-state/permissions/autogenerated/commands/save_window_state.toml @@ -0,0 +1,13 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +[[permission]] +identifier = "allow-save-window-state" +description = "Enables the save_window_state command without any pre-configured scope." +commands.allow = ["save_window_state"] + +[[permission]] +identifier = "deny-save-window-state" +description = "Denies the save_window_state command without any pre-configured scope." +commands.deny = ["save_window_state"] diff --git a/plugins/window-state/permissions/autogenerated/reference.md b/plugins/window-state/permissions/autogenerated/reference.md new file mode 100644 index 000000000..767eea84b --- /dev/null +++ b/plugins/window-state/permissions/autogenerated/reference.md @@ -0,0 +1,18 @@ +# Permissions + +## allow-restore-window-state + +Enables the restore_window_state command without any pre-configured scope. + +## deny-restore-window-state + +Denies the restore_window_state command without any pre-configured scope. + +## allow-save-window-state + +Enables the save_window_state command without any pre-configured scope. + +## deny-save-window-state + +Denies the save_window_state command without any pre-configured scope. + diff --git a/plugins/window-state/src/api-iife.js b/plugins/window-state/src/api-iife.js index eeabcbfd1..cbfa26f82 100644 --- a/plugins/window-state/src/api-iife.js +++ b/plugins/window-state/src/api-iife.js @@ -1 +1 @@ -if("__TAURI__"in window){var __TAURI_PLUGIN_WINDOWSTATE__=function(e){"use strict";function t(e,t=!1){return window.__TAURI_INTERNALS__.transformCallback(e,t)}async function i(e,t={},i){return window.__TAURI_INTERNALS__.invoke(e,t,i)}"function"==typeof SuppressedError&&SuppressedError;class n{constructor(e,t){this.type="Logical",this.width=e,this.height=t}}class a{constructor(e,t){this.type="Physical",this.width=e,this.height=t}toLogical(e){return new n(this.width/e,this.height/e)}}class l{constructor(e,t){this.type="Logical",this.x=e,this.y=t}}class s{constructor(e,t){this.type="Physical",this.x=e,this.y=t}toLogical(e){return new l(this.x/e,this.y/e)}}var r,o,u;async function c(e,t){await i("plugin:event|unlisten",{event:e,eventId:t})}async function h(e,n,a){return i("plugin:event|listen",{event:e,windowLabel:a?.target,handler:t(n)}).then((t=>async()=>c(e,t)))}!function(e){e.WINDOW_RESIZED="tauri://resize",e.WINDOW_MOVED="tauri://move",e.WINDOW_CLOSE_REQUESTED="tauri://close-requested",e.WINDOW_CREATED="tauri://window-created",e.WINDOW_DESTROYED="tauri://destroyed",e.WINDOW_FOCUS="tauri://focus",e.WINDOW_BLUR="tauri://blur",e.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",e.WINDOW_THEME_CHANGED="tauri://theme-changed",e.WINDOW_FILE_DROP="tauri://file-drop",e.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",e.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled"}(r||(r={})),function(e){e[e.Critical=1]="Critical",e[e.Informational=2]="Informational"}(o||(o={}));class w{constructor(e){this._preventDefault=!1,this.event=e.event,this.windowLabel=e.windowLabel,this.id=e.id}preventDefault(){this._preventDefault=!0}isPreventDefault(){return this._preventDefault}}function d(){return new y(window.__TAURI_INTERNALS__.metadata.currentWindow.label,{skip:!0})}function b(){return window.__TAURI_INTERNALS__.metadata.windows.map((e=>new y(e.label,{skip:!0})))}!function(e){e.None="none",e.Normal="normal",e.Indeterminate="indeterminate",e.Paused="paused",e.Error="error"}(u||(u={}));const p=["tauri://created","tauri://error"];class y{constructor(e,t={}){this.label=e,this.listeners=Object.create(null),t?.skip||i("plugin:window|create",{options:{...t,label:e}}).then((async()=>this.emit("tauri://created"))).catch((async e=>this.emit("tauri://error",e)))}static getByLabel(e){return b().some((t=>t.label===e))?new y(e,{skip:!0}):null}static getCurrent(){return d()}static getAll(){return b()}static async getFocusedWindow(){for(const e of b())if(await e.isFocused())return e;return null}async listen(e,t){return this._handleTauriEvent(e,t)?Promise.resolve((()=>{const i=this.listeners[e];i.splice(i.indexOf(t),1)})):h(e,t,{target:this.label})}async once(e,t){return this._handleTauriEvent(e,t)?Promise.resolve((()=>{const i=this.listeners[e];i.splice(i.indexOf(t),1)})):async function(e,t,i){return h(e,(i=>{t(i),c(e,i.id).catch((()=>{}))}),i)}(e,t,{target:this.label})}async emit(e,t){if(p.includes(e)){for(const i of this.listeners[e]||[])i({event:e,id:-1,windowLabel:this.label,payload:t});return Promise.resolve()}return async function(e,t,n){await i("plugin:event|emit",{event:e,windowLabel:n?.target,payload:t})}(e,t,{target:this.label})}_handleTauriEvent(e,t){return!!p.includes(e)&&(e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t],!0)}async scaleFactor(){return i("plugin:window|scale_factor",{label:this.label})}async innerPosition(){return i("plugin:window|inner_position",{label:this.label}).then((({x:e,y:t})=>new s(e,t)))}async outerPosition(){return i("plugin:window|outer_position",{label:this.label}).then((({x:e,y:t})=>new s(e,t)))}async innerSize(){return i("plugin:window|inner_size",{label:this.label}).then((({width:e,height:t})=>new a(e,t)))}async outerSize(){return i("plugin:window|outer_size",{label:this.label}).then((({width:e,height:t})=>new a(e,t)))}async isFullscreen(){return i("plugin:window|is_fullscreen",{label:this.label})}async isMinimized(){return i("plugin:window|is_minimized",{label:this.label})}async isMaximized(){return i("plugin:window|is_maximized",{label:this.label})}async isFocused(){return i("plugin:window|is_focused",{label:this.label})}async isDecorated(){return i("plugin:window|is_decorated",{label:this.label})}async isResizable(){return i("plugin:window|is_resizable",{label:this.label})}async isMaximizable(){return i("plugin:window|is_maximizable",{label:this.label})}async isMinimizable(){return i("plugin:window|is_minimizable",{label:this.label})}async isClosable(){return i("plugin:window|is_closable",{label:this.label})}async isVisible(){return i("plugin:window|is_visible",{label:this.label})}async title(){return i("plugin:window|title",{label:this.label})}async theme(){return i("plugin:window|theme",{label:this.label})}async center(){return i("plugin:window|center",{label:this.label})}async requestUserAttention(e){let t=null;return e&&(t=e===o.Critical?{type:"Critical"}:{type:"Informational"}),i("plugin:window|request_user_attention",{label:this.label,value:t})}async setResizable(e){return i("plugin:window|set_resizable",{label:this.label,value:e})}async setMaximizable(e){return i("plugin:window|set_maximizable",{label:this.label,value:e})}async setMinimizable(e){return i("plugin:window|set_minimizable",{label:this.label,value:e})}async setClosable(e){return i("plugin:window|set_closable",{label:this.label,value:e})}async setTitle(e){return i("plugin:window|set_title",{label:this.label,value:e})}async maximize(){return i("plugin:window|maximize",{label:this.label})}async unmaximize(){return i("plugin:window|unmaximize",{label:this.label})}async toggleMaximize(){return i("plugin:window|toggle_maximize",{label:this.label})}async minimize(){return i("plugin:window|minimize",{label:this.label})}async unminimize(){return i("plugin:window|unminimize",{label:this.label})}async show(){return i("plugin:window|show",{label:this.label})}async hide(){return i("plugin:window|hide",{label:this.label})}async close(){return i("plugin:window|close",{label:this.label})}async setDecorations(e){return i("plugin:window|set_decorations",{label:this.label,value:e})}async setShadow(e){return i("plugin:window|set_shadow",{label:this.label,value:e})}async setEffects(e){return i("plugin:window|set_effects",{label:this.label,value:e})}async clearEffects(){return i("plugin:window|set_effects",{label:this.label,value:null})}async setAlwaysOnTop(e){return i("plugin:window|set_always_on_top",{label:this.label,value:e})}async setAlwaysOnBottom(e){return i("plugin:window|set_always_on_bottom",{label:this.label,value:e})}async setContentProtected(e){return i("plugin:window|set_content_protected",{label:this.label,value:e})}async setSize(e){if(!e||"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return i("plugin:window|set_size",{label:this.label,value:{type:e.type,data:{width:e.width,height:e.height}}})}async setMinSize(e){if(e&&"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return i("plugin:window|set_min_size",{label:this.label,value:e?{type:e.type,data:{width:e.width,height:e.height}}:null})}async setMaxSize(e){if(e&&"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return i("plugin:window|set_max_size",{label:this.label,value:e?{type:e.type,data:{width:e.width,height:e.height}}:null})}async setPosition(e){if(!e||"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return i("plugin:window|set_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setFullscreen(e){return i("plugin:window|set_fullscreen",{label:this.label,value:e})}async setFocus(){return i("plugin:window|set_focus",{label:this.label})}async setIcon(e){return i("plugin:window|set_icon",{label:this.label,value:"string"==typeof e?e:Array.from(e)})}async setSkipTaskbar(e){return i("plugin:window|set_skip_taskbar",{label:this.label,value:e})}async setCursorGrab(e){return i("plugin:window|set_cursor_grab",{label:this.label,value:e})}async setCursorVisible(e){return i("plugin:window|set_cursor_visible",{label:this.label,value:e})}async setCursorIcon(e){return i("plugin:window|set_cursor_icon",{label:this.label,value:e})}async setCursorPosition(e){if(!e||"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return i("plugin:window|set_cursor_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setIgnoreCursorEvents(e){return i("plugin:window|set_ignore_cursor_events",{label:this.label,value:e})}async startDragging(){return i("plugin:window|start_dragging",{label:this.label})}async setProgressBar(e){return i("plugin:window|set_progress_bar",{label:this.label,value:e})}async onResized(e){return this.listen(r.WINDOW_RESIZED,(t=>{var i;t.payload=(i=t.payload,new a(i.width,i.height)),e(t)}))}async onMoved(e){return this.listen(r.WINDOW_MOVED,(t=>{t.payload=v(t.payload),e(t)}))}async onCloseRequested(e){return this.listen(r.WINDOW_CLOSE_REQUESTED,(t=>{const i=new w(t);Promise.resolve(e(i)).then((()=>{if(!i.isPreventDefault())return this.close()}))}))}async onFocusChanged(e){const t=await this.listen(r.WINDOW_FOCUS,(t=>{e({...t,payload:!0})})),i=await this.listen(r.WINDOW_BLUR,(t=>{e({...t,payload:!1})}));return()=>{t(),i()}}async onScaleChanged(e){return this.listen(r.WINDOW_SCALE_FACTOR_CHANGED,e)}async onFileDropEvent(e){const t=await this.listen(r.WINDOW_FILE_DROP,(t=>{e({...t,payload:{type:"drop",paths:t.payload.paths,position:v(t.payload.position)}})})),i=await this.listen(r.WINDOW_FILE_DROP_HOVER,(t=>{e({...t,payload:{type:"hover",paths:t.payload.paths,position:v(t.payload.position)}})})),n=await this.listen(r.WINDOW_FILE_DROP_CANCELLED,(t=>{e({...t,payload:{type:"cancel"}})}));return()=>{t(),i(),n()}}async onThemeChanged(e){return this.listen(r.WINDOW_THEME_CHANGED,e)}}var _,g,m;function v(e){return new s(e.x,e.y)}async function E(e,t){return i("plugin:window-state|restore_state",{label:e,flags:t})}return function(e){e.AppearanceBased="appearanceBased",e.Light="light",e.Dark="dark",e.MediumLight="mediumLight",e.UltraDark="ultraDark",e.Titlebar="titlebar",e.Selection="selection",e.Menu="menu",e.Popover="popover",e.Sidebar="sidebar",e.HeaderView="headerView",e.Sheet="sheet",e.WindowBackground="windowBackground",e.HudWindow="hudWindow",e.FullScreenUI="fullScreenUI",e.Tooltip="tooltip",e.ContentBackground="contentBackground",e.UnderWindowBackground="underWindowBackground",e.UnderPageBackground="underPageBackground",e.Mica="mica",e.Blur="blur",e.Acrylic="acrylic",e.Tabbed="tabbed",e.TabbedDark="tabbedDark",e.TabbedLight="tabbedLight"}(_||(_={})),function(e){e.FollowsWindowActiveState="followsWindowActiveState",e.Active="active",e.Inactive="inactive"}(g||(g={})),e.StateFlags=void 0,(m=e.StateFlags||(e.StateFlags={}))[m.SIZE=1]="SIZE",m[m.POSITION=2]="POSITION",m[m.MAXIMIZED=4]="MAXIMIZED",m[m.VISIBLE=8]="VISIBLE",m[m.DECORATIONS=16]="DECORATIONS",m[m.FULLSCREEN=32]="FULLSCREEN",m[m.ALL=63]="ALL",e.restoreState=E,e.restoreStateCurrent=async function(e){return E(d().label,e)},e.saveWindowState=async function(e){return i("plugin:window-state|save_window_state",{flags:e})},e}({});Object.defineProperty(window.__TAURI__,"windowState",{value:__TAURI_PLUGIN_WINDOWSTATE__})} +if("__TAURI__"in window){var __TAURI_PLUGIN_WINDOWSTATE__=function(e){"use strict";function t(e,t=!1){return window.__TAURI_INTERNALS__.transformCallback(e,t)}async function i(e,t={},i){return window.__TAURI_INTERNALS__.invoke(e,t,i)}"function"==typeof SuppressedError&&SuppressedError;class n{constructor(e,t){this.type="Logical",this.width=e,this.height=t}}class a{constructor(e,t){this.type="Physical",this.width=e,this.height=t}toLogical(e){return new n(this.width/e,this.height/e)}}class l{constructor(e,t){this.type="Logical",this.x=e,this.y=t}}class s{constructor(e,t){this.type="Physical",this.x=e,this.y=t}toLogical(e){return new l(this.x/e,this.y/e)}}var r,o,u;async function c(e,t){await i("plugin:event|unlisten",{event:e,eventId:t})}async function d(e,n,a){const l="string"==typeof a?.target?{kind:"AnyLabel",label:a.target}:a?.target??{kind:"Any"};return i("plugin:event|listen",{event:e,target:l,handler:t(n)}).then((t=>async()=>c(e,t)))}!function(e){e.WINDOW_RESIZED="tauri://resize",e.WINDOW_MOVED="tauri://move",e.WINDOW_CLOSE_REQUESTED="tauri://close-requested",e.WINDOW_DESTROYED="tauri://destroyed",e.WINDOW_FOCUS="tauri://focus",e.WINDOW_BLUR="tauri://blur",e.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",e.WINDOW_THEME_CHANGED="tauri://theme-changed",e.WEBVIEW_CREATED="tauri://webview-created",e.WEBVIEW_FILE_DROP="tauri://file-drop",e.WEBVIEW_FILE_DROP_HOVER="tauri://file-drop-hover",e.WEBVIEW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled"}(r||(r={})),function(e){e[e.Critical=1]="Critical",e[e.Informational=2]="Informational"}(o||(o={}));class w{constructor(e){this._preventDefault=!1,this.event=e.event,this.id=e.id}preventDefault(){this._preventDefault=!0}isPreventDefault(){return this._preventDefault}}function h(){return new g(window.__TAURI_INTERNALS__.metadata.currentWindow.label,{skip:!0})}function b(){return window.__TAURI_INTERNALS__.metadata.windows.map((e=>new g(e.label,{skip:!0})))}!function(e){e.None="none",e.Normal="normal",e.Indeterminate="indeterminate",e.Paused="paused",e.Error="error"}(u||(u={}));const y=["tauri://created","tauri://error"];class g{constructor(e,t={}){this.label=e,this.listeners=Object.create(null),t?.skip||i("plugin:window|create",{options:{...t,parent:"string"==typeof t.parent?t.parent:t.parent?.label,label:e}}).then((async()=>this.emit("tauri://created"))).catch((async e=>this.emit("tauri://error",e)))}static getByLabel(e){return b().find((t=>t.label===e))??null}static getCurrent(){return h()}static getAll(){return b()}static async getFocusedWindow(){for(const e of b())if(await e.isFocused())return e;return null}async listen(e,t){return this._handleTauriEvent(e,t)?Promise.resolve((()=>{const i=this.listeners[e];i.splice(i.indexOf(t),1)})):d(e,t,{target:{kind:"Window",label:this.label}})}async once(e,t){return this._handleTauriEvent(e,t)?Promise.resolve((()=>{const i=this.listeners[e];i.splice(i.indexOf(t),1)})):async function(e,t,i){return d(e,(i=>{t(i),c(e,i.id).catch((()=>{}))}),i)}(e,t,{target:{kind:"Window",label:this.label}})}async emit(e,t){if(y.includes(e)){for(const i of this.listeners[e]||[])i({event:e,id:-1,payload:t});return Promise.resolve()}return async function(e,t){await i("plugin:event|emit",{event:e,payload:t})}(e,t)}async emitTo(e,t,n){if(y.includes(t)){for(const e of this.listeners[t]||[])e({event:t,id:-1,payload:n});return Promise.resolve()}return async function(e,t,n){const a="string"==typeof e?{kind:"AnyLabel",label:e}:e;await i("plugin:event|emit_to",{target:a,event:t,payload:n})}(e,t,n)}_handleTauriEvent(e,t){return!!y.includes(e)&&(e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t],!0)}async scaleFactor(){return i("plugin:window|scale_factor",{label:this.label})}async innerPosition(){return i("plugin:window|inner_position",{label:this.label}).then((({x:e,y:t})=>new s(e,t)))}async outerPosition(){return i("plugin:window|outer_position",{label:this.label}).then((({x:e,y:t})=>new s(e,t)))}async innerSize(){return i("plugin:window|inner_size",{label:this.label}).then((({width:e,height:t})=>new a(e,t)))}async outerSize(){return i("plugin:window|outer_size",{label:this.label}).then((({width:e,height:t})=>new a(e,t)))}async isFullscreen(){return i("plugin:window|is_fullscreen",{label:this.label})}async isMinimized(){return i("plugin:window|is_minimized",{label:this.label})}async isMaximized(){return i("plugin:window|is_maximized",{label:this.label})}async isFocused(){return i("plugin:window|is_focused",{label:this.label})}async isDecorated(){return i("plugin:window|is_decorated",{label:this.label})}async isResizable(){return i("plugin:window|is_resizable",{label:this.label})}async isMaximizable(){return i("plugin:window|is_maximizable",{label:this.label})}async isMinimizable(){return i("plugin:window|is_minimizable",{label:this.label})}async isClosable(){return i("plugin:window|is_closable",{label:this.label})}async isVisible(){return i("plugin:window|is_visible",{label:this.label})}async title(){return i("plugin:window|title",{label:this.label})}async theme(){return i("plugin:window|theme",{label:this.label})}async center(){return i("plugin:window|center",{label:this.label})}async requestUserAttention(e){let t=null;return e&&(t=e===o.Critical?{type:"Critical"}:{type:"Informational"}),i("plugin:window|request_user_attention",{label:this.label,value:t})}async setResizable(e){return i("plugin:window|set_resizable",{label:this.label,value:e})}async setMaximizable(e){return i("plugin:window|set_maximizable",{label:this.label,value:e})}async setMinimizable(e){return i("plugin:window|set_minimizable",{label:this.label,value:e})}async setClosable(e){return i("plugin:window|set_closable",{label:this.label,value:e})}async setTitle(e){return i("plugin:window|set_title",{label:this.label,value:e})}async maximize(){return i("plugin:window|maximize",{label:this.label})}async unmaximize(){return i("plugin:window|unmaximize",{label:this.label})}async toggleMaximize(){return i("plugin:window|toggle_maximize",{label:this.label})}async minimize(){return i("plugin:window|minimize",{label:this.label})}async unminimize(){return i("plugin:window|unminimize",{label:this.label})}async show(){return i("plugin:window|show",{label:this.label})}async hide(){return i("plugin:window|hide",{label:this.label})}async close(){return i("plugin:window|close",{label:this.label})}async destroy(){return i("plugin:window|destroy",{label:this.label})}async setDecorations(e){return i("plugin:window|set_decorations",{label:this.label,value:e})}async setShadow(e){return i("plugin:window|set_shadow",{label:this.label,value:e})}async setEffects(e){return i("plugin:window|set_effects",{label:this.label,value:e})}async clearEffects(){return i("plugin:window|set_effects",{label:this.label,value:null})}async setAlwaysOnTop(e){return i("plugin:window|set_always_on_top",{label:this.label,value:e})}async setAlwaysOnBottom(e){return i("plugin:window|set_always_on_bottom",{label:this.label,value:e})}async setContentProtected(e){return i("plugin:window|set_content_protected",{label:this.label,value:e})}async setSize(e){if(!e||"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return i("plugin:window|set_size",{label:this.label,value:{type:e.type,data:{width:e.width,height:e.height}}})}async setMinSize(e){if(e&&"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return i("plugin:window|set_min_size",{label:this.label,value:e?{type:e.type,data:{width:e.width,height:e.height}}:null})}async setMaxSize(e){if(e&&"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return i("plugin:window|set_max_size",{label:this.label,value:e?{type:e.type,data:{width:e.width,height:e.height}}:null})}async setPosition(e){if(!e||"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return i("plugin:window|set_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setFullscreen(e){return i("plugin:window|set_fullscreen",{label:this.label,value:e})}async setFocus(){return i("plugin:window|set_focus",{label:this.label})}async setIcon(e){return i("plugin:window|set_icon",{label:this.label,value:"string"==typeof e?e:Array.from(e)})}async setSkipTaskbar(e){return i("plugin:window|set_skip_taskbar",{label:this.label,value:e})}async setCursorGrab(e){return i("plugin:window|set_cursor_grab",{label:this.label,value:e})}async setCursorVisible(e){return i("plugin:window|set_cursor_visible",{label:this.label,value:e})}async setCursorIcon(e){return i("plugin:window|set_cursor_icon",{label:this.label,value:e})}async setCursorPosition(e){if(!e||"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return i("plugin:window|set_cursor_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setIgnoreCursorEvents(e){return i("plugin:window|set_ignore_cursor_events",{label:this.label,value:e})}async startDragging(){return i("plugin:window|start_dragging",{label:this.label})}async startResizeDragging(e){return i("plugin:window|start_resize_dragging",{label:this.label,value:e})}async setProgressBar(e){return i("plugin:window|set_progress_bar",{label:this.label,value:e})}async setVisibleOnAllWorkspaces(e){return i("plugin:window|set_visible_on_all_workspaces",{label:this.label,value:e})}async onResized(e){return this.listen(r.WINDOW_RESIZED,(t=>{var i;t.payload=(i=t.payload,new a(i.width,i.height)),e(t)}))}async onMoved(e){return this.listen(r.WINDOW_MOVED,(t=>{var i;t.payload=(i=t.payload,new s(i.x,i.y)),e(t)}))}async onCloseRequested(e){return this.listen(r.WINDOW_CLOSE_REQUESTED,(t=>{const i=new w(t);Promise.resolve(e(i)).then((()=>{if(!i.isPreventDefault())return this.destroy()}))}))}async onFocusChanged(e){const t=await this.listen(r.WINDOW_FOCUS,(t=>{e({...t,payload:!0})})),i=await this.listen(r.WINDOW_BLUR,(t=>{e({...t,payload:!1})}));return()=>{t(),i()}}async onScaleChanged(e){return this.listen(r.WINDOW_SCALE_FACTOR_CHANGED,e)}async onThemeChanged(e){return this.listen(r.WINDOW_THEME_CHANGED,e)}}var p,_,m;async function v(e,t){return i("plugin:window-state|restore_state",{label:e,flags:t})}return function(e){e.AppearanceBased="appearanceBased",e.Light="light",e.Dark="dark",e.MediumLight="mediumLight",e.UltraDark="ultraDark",e.Titlebar="titlebar",e.Selection="selection",e.Menu="menu",e.Popover="popover",e.Sidebar="sidebar",e.HeaderView="headerView",e.Sheet="sheet",e.WindowBackground="windowBackground",e.HudWindow="hudWindow",e.FullScreenUI="fullScreenUI",e.Tooltip="tooltip",e.ContentBackground="contentBackground",e.UnderWindowBackground="underWindowBackground",e.UnderPageBackground="underPageBackground",e.Mica="mica",e.Blur="blur",e.Acrylic="acrylic",e.Tabbed="tabbed",e.TabbedDark="tabbedDark",e.TabbedLight="tabbedLight"}(p||(p={})),function(e){e.FollowsWindowActiveState="followsWindowActiveState",e.Active="active",e.Inactive="inactive"}(_||(_={})),e.StateFlags=void 0,(m=e.StateFlags||(e.StateFlags={}))[m.SIZE=1]="SIZE",m[m.POSITION=2]="POSITION",m[m.MAXIMIZED=4]="MAXIMIZED",m[m.VISIBLE=8]="VISIBLE",m[m.DECORATIONS=16]="DECORATIONS",m[m.FULLSCREEN=32]="FULLSCREEN",m[m.ALL=63]="ALL",e.restoreState=v,e.restoreStateCurrent=async function(e){return v(h().label,e)},e.saveWindowState=async function(e){return i("plugin:window-state|save_window_state",{flags:e})},e}({});Object.defineProperty(window.__TAURI__,"windowState",{value:__TAURI_PLUGIN_WINDOWSTATE__})} diff --git a/plugins/window-state/src/cmd.rs b/plugins/window-state/src/cmd.rs index 17486505a..75a390b7a 100644 --- a/plugins/window-state/src/cmd.rs +++ b/plugins/window-state/src/cmd.rs @@ -24,8 +24,10 @@ pub async fn restore_state( ) -> std::result::Result<(), String> { let flags = StateFlags::from_bits(flags) .ok_or_else(|| format!("Invalid state flags bits: {}", flags))?; - app.get_window(&label) + app.get_webview_window(&label) .ok_or_else(|| format!("Couldn't find window with label: {}", label))? + .as_ref() + .window() .restore_state(flags) .map_err(|e| e.to_string())?; Ok(()) diff --git a/plugins/window-state/src/lib.rs b/plugins/window-state/src/lib.rs index bf2bcd571..2171e2a37 100644 --- a/plugins/window-state/src/lib.rs +++ b/plugins/window-state/src/lib.rs @@ -101,8 +101,8 @@ impl AppHandleExt for tauri::AppHandle { let cache = self.state::(); let mut state = cache.0.lock().unwrap(); for (label, s) in state.iter_mut() { - if let Some(window) = self.get_window(label) { - window.update_state(s, flags)?; + if let Some(window) = self.get_webview_window(label) { + window.as_ref().window().update_state(s, flags)?; } } @@ -329,7 +329,7 @@ impl Builder { app.manage(WindowStateCache(cache)); Ok(()) }) - .on_webview_ready(move |window| { + .on_window_ready(move |window| { if self.denylist.contains(window.label()) { return; } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ede917ffa..96f9d9517 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -64,8 +64,8 @@ importers: examples/api: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.13 - version: 2.0.0-alpha.13 + specifier: 2.0.0-beta.0 + version: 2.0.0-beta.0 '@tauri-apps/plugin-barcode-scanner': specifier: 2.0.0-alpha.4 version: link:../../plugins/barcode-scanner @@ -120,10 +120,10 @@ importers: version: 1.1.8 '@sveltejs/vite-plugin-svelte': specifier: ^3.0.1 - version: 3.0.1(svelte@4.2.8)(vite@5.0.6) + version: 3.0.1(svelte@4.2.8)(vite@5.0.12) '@tauri-apps/cli': - specifier: 2.0.0-alpha.20 - version: 2.0.0-alpha.20 + specifier: 2.0.0-beta.0 + version: 2.0.0-beta.0 '@unocss/extractor-svelte': specifier: ^0.58.0 version: 0.58.0 @@ -135,34 +135,34 @@ importers: version: 4.2.8 unocss: specifier: ^0.58.0 - version: 0.58.0(postcss@8.4.32)(vite@5.0.6) + version: 0.58.0(postcss@8.4.32)(rollup@4.6.1)(vite@5.0.12) vite: - specifier: ^5.0.6 - version: 5.0.6 + specifier: ^5.0.12 + version: 5.0.12 plugins/authenticator: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.13 - version: 2.0.0-alpha.13 + specifier: 2.0.0-beta.0 + version: 2.0.0-beta.0 plugins/autostart: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.13 - version: 2.0.0-alpha.13 + specifier: 2.0.0-beta.0 + version: 2.0.0-beta.0 plugins/barcode-scanner: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.13 - version: 2.0.0-alpha.13 + specifier: 2.0.0-beta.0 + version: 2.0.0-beta.0 plugins/biometric: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.13 - version: 2.0.0-alpha.13 + specifier: 2.0.0-beta.0 + version: 2.0.0-beta.0 devDependencies: tslib: specifier: 2.6.0 @@ -171,33 +171,33 @@ importers: plugins/cli: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.13 - version: 2.0.0-alpha.13 + specifier: 2.0.0-beta.0 + version: 2.0.0-beta.0 plugins/clipboard-manager: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.13 - version: 2.0.0-alpha.13 + specifier: 2.0.0-beta.0 + version: 2.0.0-beta.0 plugins/deep-link: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.13 - version: 2.0.0-alpha.13 + specifier: 2.0.0-beta.0 + version: 2.0.0-beta.0 plugins/deep-link/examples/app: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.13 - version: 2.0.0-alpha.13 + specifier: 2.0.0-beta.0 + version: 2.0.0-beta.0 '@tauri-apps/plugin-deep-link': specifier: 2.0.0-alpha.4 version: link:../.. devDependencies: '@tauri-apps/cli': - specifier: 2.0.0-alpha.20 - version: 2.0.0-alpha.20 + specifier: 2.0.0-beta.0 + version: 2.0.0-beta.0 internal-ip: specifier: ^8.0.0 version: 8.0.0 @@ -205,44 +205,44 @@ importers: specifier: ^5.2.2 version: 5.3.2 vite: - specifier: ^5.0.6 - version: 5.0.6 + specifier: ^5.0.12 + version: 5.0.12 plugins/dialog: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.13 - version: 2.0.0-alpha.13 + specifier: 2.0.0-beta.0 + version: 2.0.0-beta.0 plugins/fs: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.13 - version: 2.0.0-alpha.13 + specifier: 2.0.0-beta.0 + version: 2.0.0-beta.0 plugins/global-shortcut: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.13 - version: 2.0.0-alpha.13 + specifier: 2.0.0-beta.0 + version: 2.0.0-beta.0 plugins/http: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.13 - version: 2.0.0-alpha.13 + specifier: 2.0.0-beta.0 + version: 2.0.0-beta.0 plugins/log: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.13 - version: 2.0.0-alpha.13 + specifier: 2.0.0-beta.0 + version: 2.0.0-beta.0 plugins/nfc: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.13 - version: 2.0.0-alpha.13 + specifier: 2.0.0-beta.0 + version: 2.0.0-beta.0 devDependencies: tslib: specifier: 2.6.0 @@ -251,74 +251,74 @@ importers: plugins/notification: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.13 - version: 2.0.0-alpha.13 + specifier: 2.0.0-beta.0 + version: 2.0.0-beta.0 plugins/os: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.13 - version: 2.0.0-alpha.13 + specifier: 2.0.0-beta.0 + version: 2.0.0-beta.0 plugins/positioner: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.13 - version: 2.0.0-alpha.13 + specifier: 2.0.0-beta.0 + version: 2.0.0-beta.0 plugins/process: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.13 - version: 2.0.0-alpha.13 + specifier: 2.0.0-beta.0 + version: 2.0.0-beta.0 plugins/shell: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.13 - version: 2.0.0-alpha.13 + specifier: 2.0.0-beta.0 + version: 2.0.0-beta.0 plugins/single-instance/examples/vanilla: devDependencies: '@tauri-apps/cli': - specifier: 2.0.0-alpha.20 - version: 2.0.0-alpha.20 + specifier: 2.0.0-beta.0 + version: 2.0.0-beta.0 plugins/sql: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.13 - version: 2.0.0-alpha.13 + specifier: 2.0.0-beta.0 + version: 2.0.0-beta.0 plugins/store: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.13 - version: 2.0.0-alpha.13 + specifier: 2.0.0-beta.0 + version: 2.0.0-beta.0 plugins/stronghold: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.13 - version: 2.0.0-alpha.13 + specifier: 2.0.0-beta.0 + version: 2.0.0-beta.0 plugins/updater: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.13 - version: 2.0.0-alpha.13 + specifier: 2.0.0-beta.0 + version: 2.0.0-beta.0 plugins/upload: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.13 - version: 2.0.0-alpha.13 + specifier: 2.0.0-beta.0 + version: 2.0.0-beta.0 plugins/websocket: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.13 - version: 2.0.0-alpha.13 + specifier: 2.0.0-beta.0 + version: 2.0.0-beta.0 plugins/websocket/examples/svelte-app: dependencies: @@ -331,10 +331,10 @@ importers: version: 2.1.1(@sveltejs/kit@1.27.7) '@sveltejs/kit': specifier: 1.27.7 - version: 1.27.7(svelte@4.2.8)(vite@5.0.6) + version: 1.27.7(svelte@4.2.8)(vite@5.0.12) '@tauri-apps/cli': - specifier: 2.0.0-alpha.20 - version: 2.0.0-alpha.20 + specifier: 2.0.0-beta.0 + version: 2.0.0-beta.0 svelte: specifier: 4.2.8 version: 4.2.8 @@ -345,14 +345,14 @@ importers: specifier: 5.3.2 version: 5.3.2 vite: - specifier: 5.0.6 - version: 5.0.6 + specifier: 5.0.12 + version: 5.0.12 plugins/window-state: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.13 - version: 2.0.0-alpha.13 + specifier: 2.0.0-beta.0 + version: 2.0.0-beta.0 packages: @@ -407,7 +407,7 @@ packages: '@babel/traverse': 7.23.5 '@babel/types': 7.23.5 convert-source-map: 2.0.0 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) gensync: 1.0.0-beta.2 json5: 2.2.3 semver: 7.5.4 @@ -677,7 +677,7 @@ packages: '@babel/helper-split-export-declaration': 7.22.6 '@babel/parser': 7.23.5 '@babel/types': 7.23.5 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) globals: 11.12.0 transitivePeerDependencies: - supports-color @@ -811,7 +811,7 @@ packages: peerDependencies: mocha: ^10.0.0 dependencies: - effection: 2.0.8 + effection: 2.0.8(mocha@10.2.0) mocha: 10.2.0 dev: true @@ -1058,7 +1058,7 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: ajv: 6.12.6 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) espree: 9.6.1 globals: 13.23.0 ignore: 5.3.0 @@ -1085,7 +1085,7 @@ packages: engines: {node: '>=10.10.0'} dependencies: '@humanwhocodes/object-schema': 2.0.1 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) minimatch: 3.1.2 transitivePeerDependencies: - supports-color @@ -1126,7 +1126,7 @@ packages: '@antfu/install-pkg': 0.1.1 '@antfu/utils': 0.7.6 '@iconify/types': 2.0.0 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) kolorist: 1.8.0 local-pkg: 0.4.3 transitivePeerDependencies: @@ -1242,20 +1242,6 @@ packages: typescript: 5.3.2 dev: true - /@rollup/pluginutils@5.1.0: - resolution: {integrity: sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==} - engines: {node: '>=14.0.0'} - peerDependencies: - rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 - peerDependenciesMeta: - rollup: - optional: true - dependencies: - '@types/estree': 1.0.5 - estree-walker: 2.0.2 - picomatch: 2.3.1 - dev: true - /@rollup/pluginutils@5.1.0(rollup@4.6.1): resolution: {integrity: sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==} engines: {node: '>=14.0.0'} @@ -1372,11 +1358,11 @@ packages: peerDependencies: '@sveltejs/kit': ^1.0.0 dependencies: - '@sveltejs/kit': 1.27.7(svelte@4.2.8)(vite@5.0.6) + '@sveltejs/kit': 1.27.7(svelte@4.2.8)(vite@5.0.12) import-meta-resolve: 4.0.0 dev: true - /@sveltejs/kit@1.27.7(svelte@4.2.8)(vite@5.0.6): + /@sveltejs/kit@1.27.7(svelte@4.2.8)(vite@5.0.12): resolution: {integrity: sha512-AzXYDoYt42clCBwLF9GTHsXyg2DFR31Ncyt8yxu8Aw4tgB433V+w+hcr1RTfAN9zKW2J2PY9FMQ8FoX/4Vw8CA==} engines: {node: ^16.14 || >=18} hasBin: true @@ -1385,7 +1371,7 @@ packages: svelte: ^3.54.0 || ^4.0.0-next.0 || ^5.0.0-next.0 vite: ^4.0.0 dependencies: - '@sveltejs/vite-plugin-svelte': 2.5.3(svelte@4.2.8)(vite@5.0.6) + '@sveltejs/vite-plugin-svelte': 2.5.3(svelte@4.2.8)(vite@5.0.12) '@types/cookie': 0.5.4 cookie: 0.5.0 devalue: 4.3.2 @@ -1399,12 +1385,12 @@ packages: svelte: 4.2.8 tiny-glob: 0.2.9 undici: 5.26.5 - vite: 5.0.6 + vite: 5.0.12 transitivePeerDependencies: - supports-color dev: true - /@sveltejs/vite-plugin-svelte-inspector@1.0.4(@sveltejs/vite-plugin-svelte@2.5.3)(svelte@4.2.8)(vite@5.0.6): + /@sveltejs/vite-plugin-svelte-inspector@1.0.4(@sveltejs/vite-plugin-svelte@2.5.3)(svelte@4.2.8)(vite@5.0.12): resolution: {integrity: sha512-zjiuZ3yydBtwpF3bj0kQNV0YXe+iKE545QGZVTaylW3eAzFr+pJ/cwK8lZEaRp4JtaJXhD5DyWAV4AxLh6DgaQ==} engines: {node: ^14.18.0 || >= 16} peerDependencies: @@ -1412,15 +1398,15 @@ packages: svelte: ^3.54.0 || ^4.0.0 vite: ^4.0.0 dependencies: - '@sveltejs/vite-plugin-svelte': 2.5.3(svelte@4.2.8)(vite@5.0.6) - debug: 4.3.4 + '@sveltejs/vite-plugin-svelte': 2.5.3(svelte@4.2.8)(vite@5.0.12) + debug: 4.3.4(supports-color@8.1.1) svelte: 4.2.8 - vite: 5.0.6 + vite: 5.0.12 transitivePeerDependencies: - supports-color dev: true - /@sveltejs/vite-plugin-svelte-inspector@2.0.0(@sveltejs/vite-plugin-svelte@3.0.1)(svelte@4.2.8)(vite@5.0.6): + /@sveltejs/vite-plugin-svelte-inspector@2.0.0(@sveltejs/vite-plugin-svelte@3.0.1)(svelte@4.2.8)(vite@5.0.12): resolution: {integrity: sha512-gjr9ZFg1BSlIpfZ4PRewigrvYmHWbDrq2uvvPB1AmTWKuM+dI1JXQSUu2pIrYLb/QncyiIGkFDFKTwJ0XqQZZg==} engines: {node: ^18.0.0 || >=20} peerDependencies: @@ -1428,61 +1414,61 @@ packages: svelte: ^4.0.0 || ^5.0.0-next.0 vite: ^5.0.0 dependencies: - '@sveltejs/vite-plugin-svelte': 3.0.1(svelte@4.2.8)(vite@5.0.6) - debug: 4.3.4 + '@sveltejs/vite-plugin-svelte': 3.0.1(svelte@4.2.8)(vite@5.0.12) + debug: 4.3.4(supports-color@8.1.1) svelte: 4.2.8 - vite: 5.0.6 + vite: 5.0.12 transitivePeerDependencies: - supports-color dev: true - /@sveltejs/vite-plugin-svelte@2.5.3(svelte@4.2.8)(vite@5.0.6): + /@sveltejs/vite-plugin-svelte@2.5.3(svelte@4.2.8)(vite@5.0.12): resolution: {integrity: sha512-erhNtXxE5/6xGZz/M9eXsmI7Pxa6MS7jyTy06zN3Ck++ldrppOnOlJwHHTsMC7DHDQdgUp4NAc4cDNQ9eGdB/w==} engines: {node: ^14.18.0 || >= 16} peerDependencies: svelte: ^3.54.0 || ^4.0.0 || ^5.0.0-next.0 vite: ^4.0.0 dependencies: - '@sveltejs/vite-plugin-svelte-inspector': 1.0.4(@sveltejs/vite-plugin-svelte@2.5.3)(svelte@4.2.8)(vite@5.0.6) - debug: 4.3.4 + '@sveltejs/vite-plugin-svelte-inspector': 1.0.4(@sveltejs/vite-plugin-svelte@2.5.3)(svelte@4.2.8)(vite@5.0.12) + debug: 4.3.4(supports-color@8.1.1) deepmerge: 4.3.1 kleur: 4.1.5 magic-string: 0.30.5 svelte: 4.2.8 svelte-hmr: 0.15.3(svelte@4.2.8) - vite: 5.0.6 - vitefu: 0.2.5(vite@5.0.6) + vite: 5.0.12 + vitefu: 0.2.5(vite@5.0.12) transitivePeerDependencies: - supports-color dev: true - /@sveltejs/vite-plugin-svelte@3.0.1(svelte@4.2.8)(vite@5.0.6): + /@sveltejs/vite-plugin-svelte@3.0.1(svelte@4.2.8)(vite@5.0.12): resolution: {integrity: sha512-CGURX6Ps+TkOovK6xV+Y2rn8JKa8ZPUHPZ/NKgCxAmgBrXReavzFl8aOSCj3kQ1xqT7yGJj53hjcV/gqwDAaWA==} engines: {node: ^18.0.0 || >=20} peerDependencies: svelte: ^4.0.0 || ^5.0.0-next.0 vite: ^5.0.0 dependencies: - '@sveltejs/vite-plugin-svelte-inspector': 2.0.0(@sveltejs/vite-plugin-svelte@3.0.1)(svelte@4.2.8)(vite@5.0.6) - debug: 4.3.4 + '@sveltejs/vite-plugin-svelte-inspector': 2.0.0(@sveltejs/vite-plugin-svelte@3.0.1)(svelte@4.2.8)(vite@5.0.12) + debug: 4.3.4(supports-color@8.1.1) deepmerge: 4.3.1 kleur: 4.1.5 magic-string: 0.30.5 svelte: 4.2.8 svelte-hmr: 0.15.3(svelte@4.2.8) - vite: 5.0.6 - vitefu: 0.2.5(vite@5.0.6) + vite: 5.0.12 + vitefu: 0.2.5(vite@5.0.12) transitivePeerDependencies: - supports-color dev: true - /@tauri-apps/api@2.0.0-alpha.13: - resolution: {integrity: sha512-sGgCkFahF3OZAHoGN5Ozt9WK7wJlbVZSgWpPQKNag4nSOX1+Py6VDRTEWriiJHDiV+gg31CWHnNXRy6TFoZmdA==} + /@tauri-apps/api@2.0.0-beta.0: + resolution: {integrity: sha512-WLoh/Vk8cgY7XrJV7Vpb6PssReBZWQCATfYBb1aCRDk+sp0NyPwumx6fZ2ECAKzAcs3OeanluwZcajruIW4CPQ==} engines: {node: '>= 18', npm: '>= 6.6.0', yarn: '>= 1.19.1'} dev: false - /@tauri-apps/cli-darwin-arm64@2.0.0-alpha.20: - resolution: {integrity: sha512-L+6OYTjKA42U7XXLQDxoUb43hcKSU8mJ4T3PMCuE08jtv4p6MNfcJQ9FwBCYV6XqYmqE1s5AEBGxR4wBk7bbXQ==} + /@tauri-apps/cli-darwin-arm64@2.0.0-beta.0: + resolution: {integrity: sha512-ncLUmkILngH/tG2lRpksT1N6GYbhmck0EaYdd6PTQQycMedP4ZwNXV+JnT3w/YD8JTQUmkcQnPDQtSUxdcPMWQ==} engines: {node: '>= 10'} cpu: [arm64] os: [darwin] @@ -1490,8 +1476,8 @@ packages: dev: true optional: true - /@tauri-apps/cli-darwin-x64@2.0.0-alpha.20: - resolution: {integrity: sha512-KnSuiZPnQi9rIbcBRUGyPBEjVpxZ4IcumUVbG2A+BhKMN/sZ4/w+xBhlRhG5V4gvp512LU20zGb3zMmePmOGlQ==} + /@tauri-apps/cli-darwin-x64@2.0.0-beta.0: + resolution: {integrity: sha512-O9PATRKiyLoYBfk5/D9uwWk7ceHyH9/M7nuq5rDtWsofe9Q1QrPGjEe+cTuFXlabhFeoXrsWHhunp09D3G2NrQ==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] @@ -1499,8 +1485,8 @@ packages: dev: true optional: true - /@tauri-apps/cli-linux-arm-gnueabihf@2.0.0-alpha.20: - resolution: {integrity: sha512-wfneLGGgd7unwMtNs4izkbyhbP+mswsep6aF11RWsGKasq3c6ZFcjFl1/E6/B5WspfjdlVW1/FfVGU6kMwZQwA==} + /@tauri-apps/cli-linux-arm-gnueabihf@2.0.0-beta.0: + resolution: {integrity: sha512-KEkCXaGopy7JWVwFySeacIBHoiKeBpmRcXg8MLSHfnjFttByZ38yY8A+1b1bzJqfK3C9jSRMdUvmIG/gFIgxIw==} engines: {node: '>= 10'} cpu: [arm] os: [linux] @@ -1508,8 +1494,8 @@ packages: dev: true optional: true - /@tauri-apps/cli-linux-arm64-gnu@2.0.0-alpha.20: - resolution: {integrity: sha512-QL+jKiJqCAf65iDkbylxvTKnM3hS3Dq9QCUoguJ5lfLTtztjJzXgCqTeo7yA1AOQjGPQ656p206HrBjO4Ppkog==} + /@tauri-apps/cli-linux-arm64-gnu@2.0.0-beta.0: + resolution: {integrity: sha512-UV9LJIQXTAdvusRCYL+6UyDwS1wGTuBQviKBJ/37+5LX8q7nbsjOYcrR8JTs78UwzHinFWFXsOpBbKgYEuh3ew==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] @@ -1517,8 +1503,8 @@ packages: dev: true optional: true - /@tauri-apps/cli-linux-arm64-musl@2.0.0-alpha.20: - resolution: {integrity: sha512-nVknro6J4e+82wkhVaNqc9eEA1SLXR0JQQ9lVcjZWauR7lU6gurRchSQ1xFaCfHW2ZwDgQE7RzdrCZGh3QJmog==} + /@tauri-apps/cli-linux-arm64-musl@2.0.0-beta.0: + resolution: {integrity: sha512-qosHNs/HDIV0pIX9ywNH0B9ARQazfcIiPpWbDH5kFDQufXTeSDLcEGlIW3HoqpkoWUzfDr6xDhG5vnCGT9gRsw==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] @@ -1526,8 +1512,8 @@ packages: dev: true optional: true - /@tauri-apps/cli-linux-x64-gnu@2.0.0-alpha.20: - resolution: {integrity: sha512-x6bCiOIvjnwcrHEabkXzFFRicPmdPNDCTtn02eX4vFnEWbmkssDM40NjqcWnTIR8z1F289FoPuPVA4WiEc0g9Q==} + /@tauri-apps/cli-linux-x64-gnu@2.0.0-beta.0: + resolution: {integrity: sha512-i4rK0sUmTuFoz5d5ItQUpyy98F0I6A0shVAx6Y5NNSNiMbUNuY8XuZ9zQ2Bbs/qX2tsxJa3n8l4E1e05EwrRxQ==} engines: {node: '>= 10'} cpu: [x64] os: [linux] @@ -1535,8 +1521,8 @@ packages: dev: true optional: true - /@tauri-apps/cli-linux-x64-musl@2.0.0-alpha.20: - resolution: {integrity: sha512-trA5N9r/RA6uaRrCzzd4Q/kHMehpfhzUruTnsu/bHXf2cnMOhGmnstPzLHlPRudyMELqCngrykR0l4Pp33XHvg==} + /@tauri-apps/cli-linux-x64-musl@2.0.0-beta.0: + resolution: {integrity: sha512-j9nKnT8/F76yc0zudGzuGAnFMArJU3NSkGWJOp/LcxqA+jJKDUnC/t7jEQdDUoUV1Te5gv3FVUso4L8I6arh4A==} engines: {node: '>= 10'} cpu: [x64] os: [linux] @@ -1544,8 +1530,8 @@ packages: dev: true optional: true - /@tauri-apps/cli-win32-arm64-msvc@2.0.0-alpha.20: - resolution: {integrity: sha512-ib99wuC4WEVS/aZ10YT+IdBOM/zeDRQV01wPd4WT0djNW4nv0b0TmhsZ9BaD9cL/GQD5YPWfwx/EGoHKB1rj9g==} + /@tauri-apps/cli-win32-arm64-msvc@2.0.0-beta.0: + resolution: {integrity: sha512-nMjFg5Q+yGS0wk//7QvJUVBw6mGpT/HirtCt2J6XGTKOHBxr/M/oYFqYa4m351IW4sjz4PcQVvIpOOvljihDvQ==} engines: {node: '>= 10'} cpu: [arm64] os: [win32] @@ -1553,8 +1539,8 @@ packages: dev: true optional: true - /@tauri-apps/cli-win32-ia32-msvc@2.0.0-alpha.20: - resolution: {integrity: sha512-xiJygmAIbqWl6BRA9LDOWwMg8BnH5KFQbcVaftGtuc+1K5ujViO18hEB4+3i76lNR/xTjq8AX3njxT7yKT0mVA==} + /@tauri-apps/cli-win32-ia32-msvc@2.0.0-beta.0: + resolution: {integrity: sha512-uthUiat0dXHvHLY6zQQzo552ToUaIVd9XPs0xfUktfHA7gUmF1trLgAF1be+N4A3wh6r5POqPzvy2L8NOt/Tyg==} engines: {node: '>= 10'} cpu: [ia32] os: [win32] @@ -1562,8 +1548,8 @@ packages: dev: true optional: true - /@tauri-apps/cli-win32-x64-msvc@2.0.0-alpha.20: - resolution: {integrity: sha512-4mN+rCPhPfv1Yjq3elpxaZnp5OY4BHrrlwKzOgLJty2crMy3UAP1s2uXwNZl/86HfHkIkR8RGaR8KR8ioFdmZg==} + /@tauri-apps/cli-win32-x64-msvc@2.0.0-beta.0: + resolution: {integrity: sha512-4EK3q5MA/bXniIeDbormaudOaoeJc3fggFZ0+RQ2zD9iobNCjaqmaZd6A31nxgooz7HBzrub7Fn7dlF7H/E4Xw==} engines: {node: '>= 10'} cpu: [x64] os: [win32] @@ -1571,21 +1557,21 @@ packages: dev: true optional: true - /@tauri-apps/cli@2.0.0-alpha.20: - resolution: {integrity: sha512-TNoaRunh2a9Id57EOWSSEziTszBdxyWUtHq9qw3olgY+i/fF3s0Kxwy2c7TM4kON1KnBSvzF+FEGRInNJNvbXw==} + /@tauri-apps/cli@2.0.0-beta.0: + resolution: {integrity: sha512-Mx/dyo0ZV6zhgxylH7DrObct1qtQFVQrYpAvtYe5Z/y3iLt49Y2loHCGy0r2ksAn+TQzqgtcIhXbgOCir8Vx+A==} engines: {node: '>= 10'} hasBin: true optionalDependencies: - '@tauri-apps/cli-darwin-arm64': 2.0.0-alpha.20 - '@tauri-apps/cli-darwin-x64': 2.0.0-alpha.20 - '@tauri-apps/cli-linux-arm-gnueabihf': 2.0.0-alpha.20 - '@tauri-apps/cli-linux-arm64-gnu': 2.0.0-alpha.20 - '@tauri-apps/cli-linux-arm64-musl': 2.0.0-alpha.20 - '@tauri-apps/cli-linux-x64-gnu': 2.0.0-alpha.20 - '@tauri-apps/cli-linux-x64-musl': 2.0.0-alpha.20 - '@tauri-apps/cli-win32-arm64-msvc': 2.0.0-alpha.20 - '@tauri-apps/cli-win32-ia32-msvc': 2.0.0-alpha.20 - '@tauri-apps/cli-win32-x64-msvc': 2.0.0-alpha.20 + '@tauri-apps/cli-darwin-arm64': 2.0.0-beta.0 + '@tauri-apps/cli-darwin-x64': 2.0.0-beta.0 + '@tauri-apps/cli-linux-arm-gnueabihf': 2.0.0-beta.0 + '@tauri-apps/cli-linux-arm64-gnu': 2.0.0-beta.0 + '@tauri-apps/cli-linux-arm64-musl': 2.0.0-beta.0 + '@tauri-apps/cli-linux-x64-gnu': 2.0.0-beta.0 + '@tauri-apps/cli-linux-x64-musl': 2.0.0-beta.0 + '@tauri-apps/cli-win32-arm64-msvc': 2.0.0-beta.0 + '@tauri-apps/cli-win32-ia32-msvc': 2.0.0-beta.0 + '@tauri-apps/cli-win32-x64-msvc': 2.0.0-beta.0 dev: true /@tauri-apps/toml@2.2.4: @@ -1646,7 +1632,7 @@ packages: '@typescript-eslint/type-utils': 6.13.2(eslint@8.55.0)(typescript@5.3.2) '@typescript-eslint/utils': 6.13.2(eslint@8.55.0)(typescript@5.3.2) '@typescript-eslint/visitor-keys': 6.13.2 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) eslint: 8.55.0 graphemer: 1.4.0 ignore: 5.3.0 @@ -1672,7 +1658,7 @@ packages: '@typescript-eslint/types': 6.13.2 '@typescript-eslint/typescript-estree': 6.13.2(typescript@5.3.2) '@typescript-eslint/visitor-keys': 6.13.2 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) eslint: 8.55.0 typescript: 5.3.2 transitivePeerDependencies: @@ -1699,7 +1685,7 @@ packages: dependencies: '@typescript-eslint/typescript-estree': 6.13.2(typescript@5.3.2) '@typescript-eslint/utils': 6.13.2(eslint@8.55.0)(typescript@5.3.2) - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) eslint: 8.55.0 ts-api-utils: 1.0.3(typescript@5.3.2) typescript: 5.3.2 @@ -1723,7 +1709,7 @@ packages: dependencies: '@typescript-eslint/types': 6.13.2 '@typescript-eslint/visitor-keys': 6.13.2 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) globby: 11.1.0 is-glob: 4.0.3 semver: 7.5.4 @@ -1764,7 +1750,7 @@ packages: resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} dev: true - /@unocss/astro@0.58.0(vite@5.0.6): + /@unocss/astro@0.58.0(rollup@4.6.1)(vite@5.0.12): resolution: {integrity: sha512-df+tEFO5eKXjQOwSWQhS9IdjD0sfLHLtn8U09sEKR2Nmh5CvpwyBxmvLQgOCilPou7ehmyKfsyGRLZg7IMp+Ew==} peerDependencies: vite: ^2.9.0 || ^3.0.0-0 || ^4.0.0 || ^5.0.0-0 @@ -1774,19 +1760,19 @@ packages: dependencies: '@unocss/core': 0.58.0 '@unocss/reset': 0.58.0 - '@unocss/vite': 0.58.0(vite@5.0.6) - vite: 5.0.6 + '@unocss/vite': 0.58.0(rollup@4.6.1)(vite@5.0.12) + vite: 5.0.12 transitivePeerDependencies: - rollup dev: true - /@unocss/cli@0.58.0: + /@unocss/cli@0.58.0(rollup@4.6.1): resolution: {integrity: sha512-rhsrDBxAVueygMcAbMkbuvsHbBL2rG6N96LllYwHn16FLgOE3Sf4JW1/LlNjQje3BtwMMtbSCCAeu2SryFhzbw==} engines: {node: '>=14'} hasBin: true dependencies: '@ampproject/remapping': 2.2.1 - '@rollup/pluginutils': 5.1.0 + '@rollup/pluginutils': 5.1.0(rollup@4.6.1) '@unocss/config': 0.58.0 '@unocss/core': 0.58.0 '@unocss/preset-uno': 0.58.0 @@ -1962,13 +1948,13 @@ packages: '@unocss/core': 0.58.0 dev: true - /@unocss/vite@0.58.0(vite@5.0.6): + /@unocss/vite@0.58.0(rollup@4.6.1)(vite@5.0.12): resolution: {integrity: sha512-OCUOLMSOBEtXOEyBbAvMI3/xdR175BWRzmvV9Wc34ANZclEvCdVH8+WU725ibjY4VT0gVIuX68b13fhXdHV41A==} peerDependencies: vite: ^2.9.0 || ^3.0.0-0 || ^4.0.0 || ^5.0.0-0 dependencies: '@ampproject/remapping': 2.2.1 - '@rollup/pluginutils': 5.1.0 + '@rollup/pluginutils': 5.1.0(rollup@4.6.1) '@unocss/config': 0.58.0 '@unocss/core': 0.58.0 '@unocss/inspector': 0.58.0 @@ -1977,7 +1963,7 @@ packages: chokidar: 3.5.3 fast-glob: 3.3.2 magic-string: 0.30.5 - vite: 5.0.6 + vite: 5.0.12 transitivePeerDependencies: - rollup dev: true @@ -2480,18 +2466,6 @@ packages: ms: 2.1.3 dev: true - /debug@4.3.4: - resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} - engines: {node: '>=6.0'} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - dependencies: - ms: 2.1.2 - dev: true - /debug@4.3.4(supports-color@8.1.1): resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} engines: {node: '>=6.0'} @@ -2601,18 +2575,6 @@ packages: resolution: {integrity: sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==} dev: true - /effection@2.0.8: - resolution: {integrity: sha512-/v7cbPIXGGylInQgHHjJutzqUn6VIfcP13hh2X0hXf04wwAlSI+lVjUBKpr5TX3+v9dXV/JLHO/pqQ9Cp1QAnQ==} - dependencies: - '@effection/channel': 2.0.6 - '@effection/core': 2.2.3 - '@effection/events': 2.0.6 - '@effection/fetch': 2.0.7(mocha@10.2.0) - '@effection/main': 2.1.2 - '@effection/stream': 2.0.6 - '@effection/subscription': 2.0.6 - dev: true - /effection@2.0.8(mocha@10.2.0): resolution: {integrity: sha512-/v7cbPIXGGylInQgHHjJutzqUn6VIfcP13hh2X0hXf04wwAlSI+lVjUBKpr5TX3+v9dXV/JLHO/pqQ9Cp1QAnQ==} dependencies: @@ -2958,7 +2920,7 @@ packages: ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) doctrine: 3.0.0 escape-string-regexp: 4.0.0 eslint-scope: 7.2.2 @@ -3900,7 +3862,7 @@ packages: /micromark@2.11.4: resolution: {integrity: sha512-+WoovN/ppKolQOFIAajxi7Lu9kInbPxFuTBVEavFcL8eAfVstoc5MocPmqBeAdBOJV00uaVjegzH4+MA0DN/uA==} dependencies: - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) parse-entities: 2.0.0 transitivePeerDependencies: - supports-color @@ -5040,7 +5002,7 @@ packages: '@types/unist': 2.0.10 dev: true - /unocss@0.58.0(postcss@8.4.32)(vite@5.0.6): + /unocss@0.58.0(postcss@8.4.32)(rollup@4.6.1)(vite@5.0.12): resolution: {integrity: sha512-MSPRHxBqWN+1AHGV+J5uUy4//e6ZBK6O+ISzD0qrXcCD/GNtxk1+lYjOK2ltkUiKX539+/KF91vNxzhhwEf+xA==} engines: {node: '>=14'} peerDependencies: @@ -5052,8 +5014,8 @@ packages: vite: optional: true dependencies: - '@unocss/astro': 0.58.0(vite@5.0.6) - '@unocss/cli': 0.58.0 + '@unocss/astro': 0.58.0(rollup@4.6.1)(vite@5.0.12) + '@unocss/cli': 0.58.0(rollup@4.6.1) '@unocss/core': 0.58.0 '@unocss/extractor-arbitrary-variants': 0.58.0 '@unocss/postcss': 0.58.0(postcss@8.4.32) @@ -5071,8 +5033,8 @@ packages: '@unocss/transformer-compile-class': 0.58.0 '@unocss/transformer-directives': 0.58.0 '@unocss/transformer-variant-group': 0.58.0 - '@unocss/vite': 0.58.0(vite@5.0.6) - vite: 5.0.6 + '@unocss/vite': 0.58.0(rollup@4.6.1)(vite@5.0.12) + vite: 5.0.12 transitivePeerDependencies: - postcss - rollup @@ -5116,8 +5078,8 @@ packages: vfile-message: 2.0.4 dev: true - /vite@5.0.6: - resolution: {integrity: sha512-MD3joyAEBtV7QZPl2JVVUai6zHms3YOmLR+BpMzLlX2Yzjfcc4gTgNi09d/Rua3F4EtC8zdwPU8eQYyib4vVMQ==} + /vite@5.0.12: + resolution: {integrity: sha512-4hsnEkG3q0N4Tzf1+t6NdN9dg/L3BM+q8SWgbSPnJvrgH2kgdyzfVJwbR1ic69/4uMJJ/3dqDZZE5/WwqW8U1w==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: @@ -5151,7 +5113,7 @@ packages: fsevents: 2.3.3 dev: true - /vitefu@0.2.5(vite@5.0.6): + /vitefu@0.2.5(vite@5.0.12): resolution: {integrity: sha512-SgHtMLoqaeeGnd2evZ849ZbACbnwQCIwRH57t18FxcXoZop0uQu0uzlIhJBlF/eWVzuce0sHeqPcDo+evVcg8Q==} peerDependencies: vite: ^3.0.0 || ^4.0.0 || ^5.0.0 @@ -5159,7 +5121,7 @@ packages: vite: optional: true dependencies: - vite: 5.0.6 + vite: 5.0.12 dev: true /wcwidth@1.0.1: diff --git a/shared/template/Cargo.toml b/shared/template/Cargo.toml index 8f11e5ad6..be8472bc0 100644 --- a/shared/template/Cargo.toml +++ b/shared/template/Cargo.toml @@ -10,10 +10,10 @@ links = "tauri-plugin-{{name}}" rustc-args = [ "--cfg", "docsrs" ] rustdoc-args = [ "--cfg", "docsrs" ] -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - [build-dependencies] -tauri-build = { workspace = true } +tauri-plugin = { workspace = true, features = [ "build" ] } + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] serde = { workspace = true } diff --git a/shared/template/build.rs b/shared/template/build.rs index da7cd3cc4..121f3b740 100644 --- a/shared/template/build.rs +++ b/shared/template/build.rs @@ -2,8 +2,10 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT +const COMMANDS: &[&str] = &["execute"]; + fn main() { - if let Err(error) = tauri_build::mobile::PluginBuilder::new() + if let Err(error) = tauri_plugin::Builder::new(COMMANDS) .android_path("android") .ios_path("ios") .run() diff --git a/shared/template/package.json b/shared/template/package.json index 1a9df852b..eb37eead2 100644 --- a/shared/template/package.json +++ b/shared/template/package.json @@ -23,6 +23,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.13" + "@tauri-apps/api": "2.0.0-beta.0" } }