diff --git a/.changes/clipboard-refactor.md b/.changes/clipboard-refactor.md new file mode 100644 index 000000000..d3d62befc --- /dev/null +++ b/.changes/clipboard-refactor.md @@ -0,0 +1,11 @@ +--- +"clipboard-manager": "patch" +--- + +Refactored the clipboard Rust APIs for more clarity and consistency: + +- Changed `Clipboard::write_text` to take a string type instead of an enum. +- Changed `Clipboard::read_text` to return a string type instead of an enum. +- Changed `Clipboard::write_html` to take 2 string arguments instead of an enum. +- Changed `Clipboard::write_image` to take a reference to a `tauri::Image` instead of an enum. +- Removed `ClipKind` and `ClipboardContents` enums. diff --git a/.changes/enhance-shell-raw-out.md b/.changes/enhance-shell-raw-out.md new file mode 100644 index 000000000..0b9c7c3ab --- /dev/null +++ b/.changes/enhance-shell-raw-out.md @@ -0,0 +1,6 @@ +--- +"shell": patch +--- + +When the "raw" encoding option is specified for a shell process, all bytes from the child's output streams are passed to the data handlers. +This makes it possible to read output from programs that write unencoded byte streams to stdout (like ffmpeg) \ No newline at end of file diff --git a/.changes/fix-default-arg-value.md b/.changes/fix-default-arg-value.md new file mode 100644 index 000000000..b2657724f --- /dev/null +++ b/.changes/fix-default-arg-value.md @@ -0,0 +1,7 @@ +--- +"notification": patch +"barcode-scanner": patch +"dialog": patch +--- + +Fixes command argument parsing on iOS. diff --git a/.changes/fix-fs-scope-deadlock.md b/.changes/fix-fs-scope-deadlock.md new file mode 100644 index 000000000..24d02d9c9 --- /dev/null +++ b/.changes/fix-fs-scope-deadlock.md @@ -0,0 +1,5 @@ +--- +"fs": patch +--- + +Fixes an issue that caused the app to freeze when the `dialog`, `fs`, and `persisted-scope` plugins were used together. diff --git a/.changes/fix-updater-cleanup-md b/.changes/fix-updater-cleanup.md similarity index 100% rename from .changes/fix-updater-cleanup-md rename to .changes/fix-updater-cleanup.md diff --git a/.changes/fix-updater-default-features.md b/.changes/fix-updater-default-features.md new file mode 100644 index 000000000..ac2fa867a --- /dev/null +++ b/.changes/fix-updater-default-features.md @@ -0,0 +1,5 @@ +--- +"updater": patch +--- + +**Breaking change:** The `rustls-tls` feature flag is now enabled by default. diff --git a/.changes/global-hotkey-event.md b/.changes/global-hotkey-event.md new file mode 100644 index 000000000..41cff7619 --- /dev/null +++ b/.changes/global-hotkey-event.md @@ -0,0 +1,11 @@ +--- +"global-shortcut": "patch" +"global-shortcut-js": "patch" +--- + +Refactored APIs to introduce new pressed and released events: + +- Added `ShortcutEvent` and `ShortcutState` types in Rust. +- Changed the handler function passed to `GlobalShortcut::on_shortcut`, `GlobalShortcut::on_all_shortcuts` and `Builder::with_handler` to take a 3rd argument of type `ShortcutEvent`. +- Added `ShortcutEvent` interface in JS. +- Changed `ShortcutHandler` type alias (which affects the JS `register` and `registerAll` APIs) to take `ShortcutEvent` instead of a string. diff --git a/.changes/impl-ext-for-webview-windows.md b/.changes/impl-ext-for-webview-windows.md new file mode 100644 index 000000000..ca9f1451e --- /dev/null +++ b/.changes/impl-ext-for-webview-windows.md @@ -0,0 +1,6 @@ +--- +"positioner": "patch" +"window-state": "patch" +--- + +Implement `WindowExt` for `WebviewWindow`. diff --git a/.changes/pre.json b/.changes/pre.json index 73c50026b..c467a7536 100644 --- a/.changes/pre.json +++ b/.changes/pre.json @@ -2,8 +2,10 @@ "tag": "beta", "changes": [ ".changes/beta.md", + ".changes/clipboard-expose-struct.md", ".changes/clipboard-html.md", ".changes/clipboard-manager-image.md", + ".changes/clipboard-refactor.md", ".changes/clipboard-text-command-rename.md", ".changes/dialog-can-create-directories.md", ".changes/dialog-linux-freeze.md", @@ -11,29 +13,51 @@ ".changes/dialog-path-return-mismatch.md", ".changes/enhance-fs-scope-type.md", ".changes/enhance-http-scope.md", + ".changes/feat-log-attachlogger.md", + ".changes/feat-single-instance-semver.md", + ".changes/feat-websocket-tls-connector.md", ".changes/file-autogen-fix.md", ".changes/fix-autolaunch-macos.md", + ".changes/fix-default-arg-value.md", + ".changes/fix-fs-scope-deadlock.md", ".changes/fix-fs-watcher-basedir.md", + ".changes/fix-http-default-features.md", ".changes/fix-http-scope-url-match.md", ".changes/fix-shutdown-timing.md", + ".changes/fix-updater-cleanup.md", + ".changes/fix-updater-default-features.md", ".changes/fix-updater-installer-args-deserialization.md", ".changes/fix-updater-installmode.md", ".changes/fix-updater-powershell-flashing.md", ".changes/fix-zbus-import.md", ".changes/global-api-script-refactor.md", + ".changes/global-hotkey-event.md", ".changes/global-shortcut-refactor.md", ".changes/http-unsafe-headers.md", ".changes/http-user-agent.md", ".changes/msrv-1.75.md", ".changes/notification-fix-dev-check.md", ".changes/public-with-store.md", + ".changes/remove-unc-path-prefix.md", + ".changes/reqwest-0.12.md", + ".changes/restore-default-window-state.md", + ".changes/scoped-resources-table.md", ".changes/shell-fix-schema-command-property-name.md", ".changes/shell-shellexcute.md", ".changes/single-instance.macos.md", + ".changes/tauri-beta-14-dependencies.md", ".changes/tauri-beta-14.md", + ".changes/tauri-beta-15.md", + ".changes/tauri-beta-17.md", ".changes/tauri-beta-4.md", ".changes/tauri-beta-8.md", ".changes/tauri-beta-9.md", + ".changes/updater-non-zip.md", + ".changes/upload-returnval.md", + ".changes/watcher-debouncer-rename.md", + ".changes/window-state-custom-filename.md", + ".changes/window-state-default-filename.md", + ".changes/window-state-js-binding.md", ".changes/window-state-json.md" ] } diff --git a/.changes/remove-unc-path-prefix.md b/.changes/remove-unc-path-prefix.md new file mode 100644 index 000000000..2c569f4ef --- /dev/null +++ b/.changes/remove-unc-path-prefix.md @@ -0,0 +1,7 @@ +--- +dialog: patch +fs: patch +store: patch +--- + +**Breaking Change:** All apis that return paths to the frontend will now remove the `\\?\` UNC prefix on Windows. diff --git a/.changes/restore-default-window-state.md b/.changes/restore-default-window-state.md new file mode 100644 index 000000000..d0a954dbe --- /dev/null +++ b/.changes/restore-default-window-state.md @@ -0,0 +1,5 @@ +--- +"window-state": patch +--- + +Fix `restore_window` doesn't work with `skip_initial_state` when no previous cache was found diff --git a/.changes/scoped-resources-table.md b/.changes/scoped-resources-table.md new file mode 100644 index 000000000..2ab47c293 --- /dev/null +++ b/.changes/scoped-resources-table.md @@ -0,0 +1,8 @@ +--- +"fs": "patch" +"http": "patch" +"updater": "patch" +"clipboard-manager": "patch" +--- + +Internally use the webview scoped resources table instead of the app one, so other webviews can't access other webviews resources. diff --git a/.changes/shell-command-execute-extra-new-lines.md b/.changes/shell-command-execute-extra-new-lines.md new file mode 100644 index 000000000..c233a6d12 --- /dev/null +++ b/.changes/shell-command-execute-extra-new-lines.md @@ -0,0 +1,5 @@ +--- +"shell-js": "patch" +--- + +Fix `Command.execute` API including extra new lines. diff --git a/.changes/shell-command-execute-speed.md b/.changes/shell-command-execute-speed.md new file mode 100644 index 000000000..8e99b5960 --- /dev/null +++ b/.changes/shell-command-execute-speed.md @@ -0,0 +1,6 @@ +--- +"shell": "patch" +"shell-js": "patch" +--- + +Improve the speed of the JS `Command.execute` API diff --git a/.changes/shell-command-lost-events.md b/.changes/shell-command-lost-events.md new file mode 100644 index 000000000..072bf83d3 --- /dev/null +++ b/.changes/shell-command-lost-events.md @@ -0,0 +1,5 @@ +--- +"shell": "patch" +--- + +Fix the JS `Command` API losing events for `stdout`. diff --git a/.changes/tauri-beta-15.md b/.changes/tauri-beta-15.md new file mode 100644 index 000000000..581453734 --- /dev/null +++ b/.changes/tauri-beta-15.md @@ -0,0 +1,8 @@ +--- +"fs": patch +"http": patch +"updater": patch +"clipboard-manager": patch +--- + +Update for tauri 2.0.0-beta.15. diff --git a/.changes/tauri-beta-17.md b/.changes/tauri-beta-17.md new file mode 100644 index 000000000..fcb51715c --- /dev/null +++ b/.changes/tauri-beta-17.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.17. diff --git a/.changes/updater-non-zip.md b/.changes/updater-non-zip.md new file mode 100644 index 000000000..9fd014ff9 --- /dev/null +++ b/.changes/updater-non-zip.md @@ -0,0 +1,5 @@ +--- +"updater": "patch" +--- + +Add support for updating using non-zipped files on Windows and Linux. diff --git a/.changes/watcher-debouncer-rename.md b/.changes/watcher-debouncer-rename.md new file mode 100644 index 000000000..a03bda6de --- /dev/null +++ b/.changes/watcher-debouncer-rename.md @@ -0,0 +1,5 @@ +--- +"fs": patch +--- + +Fixes `RenameMode::From` and `RenameMode::To` never getting converted to `RenameMode::Both` when using `watch` with a debounce on Windows diff --git a/.eslintignore b/.eslintignore index d7526cfb2..66b9c9240 100644 --- a/.eslintignore +++ b/.eslintignore @@ -5,4 +5,6 @@ build/ dist-js api-iife.js init-iife.js -init.js \ No newline at end of file +init.js +rollup.config.js +examples/ \ No newline at end of file diff --git a/.eslintrc.json b/.eslintrc.json index 84c29bc56..3c96a0f4e 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -4,6 +4,7 @@ "es2021": true }, "extends": [ + "love", "prettier", "eslint:recommended", "plugin:@typescript-eslint/recommended", @@ -13,7 +14,8 @@ "parser": "@typescript-eslint/parser", "parserOptions": { "ecmaVersion": "latest", - "sourceType": "module" + "sourceType": "module", + "project": ["**/tsconfig.json"] }, "plugins": ["@typescript-eslint"], "rules": {} diff --git a/.github/workflows/test-rust.yml b/.github/workflows/test-rust.yml index c829d6241..21c5ec8c0 100644 --- a/.github/workflows/test-rust.yml +++ b/.github/workflows/test-rust.yml @@ -144,7 +144,7 @@ jobs: command: "test", } - { - target: x86_64-apple-darwin, + target: aarch64-apple-darwin, os: macos-latest, runner: "cargo", command: "test", diff --git a/Cargo.lock b/Cargo.lock index e0742429a..d15d2014e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -230,7 +230,7 @@ checksum = "5ad32ce52e4161730f7098c077cd2ed6229b5804ccf99e5366be1ab72a98b4e1" [[package]] name = "api" -version = "2.0.0-beta.4" +version = "2.0.0-beta.7" dependencies = [ "log", "serde", @@ -252,7 +252,7 @@ dependencies = [ "tauri-plugin-process", "tauri-plugin-shell", "tauri-plugin-updater", - "tiny_http 0.11.0", + "tiny_http", "window-shadows", ] @@ -266,7 +266,7 @@ dependencies = [ "tauri-build", "tauri-plugin-updater", "time", - "tiny_http 0.11.0", + "tiny_http", ] [[package]] @@ -287,7 +287,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2041f1943049c7978768d84e6d0fd95de98b76d6c4727b09e78ec253d29fa58" dependencies = [ "clipboard-win", - "core-graphics 0.23.1", + "core-graphics", "image", "log", "objc", @@ -334,16 +334,6 @@ dependencies = [ "zbus", ] -[[package]] -name = "assert-json-diff" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47e4f2b81832e72834d7518d8487a0396a28cc408186a2e8854c0f98011faf12" -dependencies = [ - "serde", - "serde_json", -] - [[package]] name = "async-broadcast" version = "0.7.0" @@ -1019,7 +1009,7 @@ dependencies = [ "num-traits", "serde", "wasm-bindgen", - "windows-targets 0.52.4", + "windows-targets 0.52.5", ] [[package]] @@ -1083,22 +1073,6 @@ dependencies = [ "error-code", ] -[[package]] -name = "cocoa" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f425db7937052c684daec3bd6375c8abe2d146dca4b8b143d6db777c39138f3a" -dependencies = [ - "bitflags 1.3.2", - "block", - "cocoa-foundation", - "core-foundation", - "core-graphics 0.22.3", - "foreign-types 0.3.2", - "libc", - "objc", -] - [[package]] name = "cocoa" version = "0.25.0" @@ -1109,7 +1083,7 @@ dependencies = [ "block", "cocoa-foundation", "core-foundation", - "core-graphics 0.23.1", + "core-graphics", "foreign-types 0.5.0", "libc", "objc", @@ -1162,16 +1136,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "colored" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbf2150cce219b664a8a70df7a1f933836724b503f8a413af9365b4dcc4d90b8" -dependencies = [ - "lazy_static", - "windows-sys 0.48.0", -] - [[package]] name = "combine" version = "4.6.6" @@ -1279,19 +1243,6 @@ version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" -[[package]] -name = "core-graphics" -version = "0.22.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2581bbab3b8ffc6fcbd550bf46c355135d16e9ff2a6ea032ad6b9bf1d7efe4fb" -dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "core-graphics-types", - "foreign-types 0.3.2", - "libc", -] - [[package]] name = "core-graphics" version = "0.23.1" @@ -1951,7 +1902,7 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9f0c14694cbd524c8720dd69b0e3179344f04ebb5f90f2e4a440c6ea3b2f1ee" dependencies = [ - "colored 1.9.4", + "colored", "log", ] @@ -2470,7 +2421,7 @@ version = "0.18.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bb0228f477c0900c880fd78c8759b95c7636dbd7842707f49e132378aa2acdc" dependencies = [ - "heck", + "heck 0.4.1", "proc-macro-crate 2.0.0", "proc-macro-error", "proc-macro2", @@ -2496,15 +2447,19 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "global-hotkey" -version = "0.2.4" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08c12993a445d59000c3994fcd3d179e7da026a4234cc46db652987aa2785e4a" +checksum = "daf13ae557ac61fa8f6fa949c33616e9680f0f04a9dd0195cd210770ba643f1a" dependencies = [ + "bitflags 2.4.2", + "cocoa", "crossbeam-channel", - "keyboard-types 0.6.2", + "keyboard-types", + "objc", "once_cell", + "serde", "thiserror", - "windows-sys 0.48.0", + "windows-sys 0.52.0", "x11-dl", ] @@ -2637,6 +2592,12 @@ dependencies = [ "unicode-segmentation", ] +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + [[package]] name = "hermit-abi" version = "0.3.9" @@ -3161,17 +3122,6 @@ dependencies = [ "treediff", ] -[[package]] -name = "keyboard-types" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7668b7cff6a51fe61cdde64cd27c8a220786f399501b57ebe36f7d8112fd68" -dependencies = [ - "bitflags 1.3.2", - "serde", - "unicode-segmentation", -] - [[package]] name = "keyboard-types" version = "0.7.0" @@ -3278,7 +3228,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19" dependencies = [ "cfg-if", - "windows-targets 0.52.4", + "windows-targets 0.52.5", ] [[package]] @@ -3343,12 +3293,9 @@ dependencies = [ [[package]] name = "line-wrap" -version = "0.1.1" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f30344350a2a51da54c1d53be93fade8a237e545dbcc4bdbe635413f2117cab9" -dependencies = [ - "safemem", -] +checksum = "dd1bc4d24ad230d21fb898d1116b1801d7adfc449d42026475862ab48b11e70e" [[package]] name = "linux-raw-sys" @@ -3537,35 +3484,17 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "mockito" -version = "0.31.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80f9fece9bd97ab74339fe19f4bcaf52b76dcc18e5364c7977c1838f76b38de9" -dependencies = [ - "assert-json-diff", - "colored 2.1.0", - "httparse", - "lazy_static", - "log", - "rand 0.8.5", - "regex", - "serde_json", - "serde_urlencoded", - "similar", -] - [[package]] name = "muda" version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f428b4e9db3d17e2f809dfb1ff9ddfbbf16c71790d1656d10aee320877e1392f" dependencies = [ - "cocoa 0.25.0", + "cocoa", "crossbeam-channel", "dpi", "gtk", - "keyboard-types 0.7.0", + "keyboard-types", "objc", "once_cell", "png", @@ -4287,9 +4216,9 @@ checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[package]] name = "plist" -version = "1.6.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5699cc8a63d1aa2b1ee8e12b9ad70ac790d65788cd36101fa37f87ea46c4cef" +checksum = "d9d34169e64b3c7a80c8621a48adaf44e0cf62c78a9b25dd9dd35f1881a17cf9" dependencies = [ "base64 0.21.7", "indexmap 2.2.5", @@ -5052,12 +4981,6 @@ version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" -[[package]] -name = "safemem" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072" - [[package]] name = "same-file" version = "1.0.6" @@ -5403,12 +5326,6 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f27f6278552951f1f2b8cf9da965d10969b2efdea95a6ec47987ab46edfe263a" -[[package]] -name = "similar" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32fea41aca09ee824cc9724996433064c89f7777e60762749a4170a14abbfa21" - [[package]] name = "single-instance-example" version = "0.1.0" @@ -5460,8 +5377,8 @@ checksum = "071916a85d1db274b4ed57af3a14afb66bd836ae7f82ebb6f1fd3455107830d9" dependencies = [ "bytemuck", "cfg_aliases 0.2.0", - "cocoa 0.25.0", - "core-graphics 0.23.1", + "cocoa", + "core-graphics", "foreign-types 0.5.0", "js-sys", "log", @@ -5615,7 +5532,7 @@ dependencies = [ "atomic-write-file", "dotenvy", "either", - "heck", + "heck 0.4.1", "hex", "once_cell", "proc-macro2", @@ -5962,7 +5879,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a2d580ff6a20c55dfb86be5f9c238f67835d0e81cbdea8bf5680e0897320331" dependencies = [ "cfg-expr", - "heck", + "heck 0.4.1", "pkg-config", "toml 0.8.10", "version-compare", @@ -5975,9 +5892,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd5b6ec2c43abd15155f040c765001098f50f425414b679225d471a1cd782753" dependencies = [ "bitflags 1.3.2", - "cocoa 0.25.0", + "cocoa", "core-foundation", - "core-graphics 0.23.1", + "core-graphics", "crossbeam-channel", "dispatch", "dlopen2", @@ -6042,13 +5959,13 @@ checksum = "e1fc403891a21bcfb7c37834ba66a547a8f402146eba7265b5a6d88059c9ff2f" [[package]] name = "tauri" -version = "2.0.0-beta.15" +version = "2.0.0-beta.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd0aba659957a3f1f1666acbf17723e8d41dcc177539bf1adbe55305f5d7118a" +checksum = "5fedd5490eddf117253945f0baedafded43474c971cba546a818f527d5c26266" dependencies = [ "anyhow", "bytes", - "cocoa 0.25.0", + "cocoa", "dirs-next", "dunce", "embed_plist", @@ -6056,7 +5973,7 @@ dependencies = [ "getrandom 0.2.12", "glob", "gtk", - "heck", + "heck 0.5.0", "http", "http-range", "image", @@ -6089,20 +6006,20 @@ dependencies = [ "webkit2gtk", "webview2-com", "window-vibrancy", - "windows 0.54.0", + "windows 0.56.0", ] [[package]] name = "tauri-build" -version = "2.0.0-beta.12" +version = "2.0.0-beta.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33de24aabe2b9c340d67005800cb6dd40aac5283126a42896fc8eec0b87cbe45" +checksum = "abcf98a9b4527567c3e5ca9723431d121e001c2145651b3fa044d22b5e025a7e" dependencies = [ "anyhow", "cargo_toml", "dirs-next", "glob", - "heck", + "heck 0.5.0", "json-patch", "quote", "schemars", @@ -6118,9 +6035,9 @@ dependencies = [ [[package]] name = "tauri-codegen" -version = "2.0.0-beta.12" +version = "2.0.0-beta.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d1d211268a9590bbf75cc85b47208f59b447626c76396256e12479ac7df6c8b" +checksum = "b383f341efb803852b0235a2f330ca90c4c113f422dd6d646b888685b372cace" dependencies = [ "base64 0.22.0", "brotli", @@ -6145,11 +6062,11 @@ dependencies = [ [[package]] name = "tauri-macros" -version = "2.0.0-beta.12" +version = "2.0.0-beta.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b096f63f2724a1280ae0f5a34d0731de18ca18305e2ef6e5e9a39bb2710e8a85" +checksum = "71be71718cfe48b149507157bfbad0e2ba0e98ea51658be26c7c677eb188fb0c" dependencies = [ - "heck", + "heck 0.4.1", "proc-macro2", "quote", "syn 2.0.52", @@ -6159,9 +6076,9 @@ dependencies = [ [[package]] name = "tauri-plugin" -version = "2.0.0-beta.11" +version = "2.0.0-beta.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31ab1ac6122bf2ca5fc4ebb8aadff619f3b172477d2baf8134cf1d7f0e249a12" +checksum = "6baaee0a083db1e04a1b7a3b0670d86a4d95dd2a54e7cbfb5547762b8ed098d9" dependencies = [ "anyhow", "glob", @@ -6176,7 +6093,7 @@ dependencies = [ [[package]] name = "tauri-plugin-authenticator" -version = "2.0.0-beta.3" +version = "2.0.0-beta.5" dependencies = [ "authenticator", "base64 0.22.0", @@ -6198,7 +6115,7 @@ dependencies = [ [[package]] name = "tauri-plugin-autostart" -version = "2.0.0-beta.4" +version = "2.0.0-beta.5" dependencies = [ "auto-launch", "log", @@ -6211,7 +6128,7 @@ dependencies = [ [[package]] name = "tauri-plugin-barcode-scanner" -version = "2.0.0-beta.3" +version = "2.0.0-beta.5" dependencies = [ "log", "serde", @@ -6223,7 +6140,7 @@ dependencies = [ [[package]] name = "tauri-plugin-biometric" -version = "2.0.0-beta.3" +version = "2.0.0-beta.4" dependencies = [ "log", "serde", @@ -6236,7 +6153,7 @@ dependencies = [ [[package]] name = "tauri-plugin-cli" -version = "2.0.0-beta.3" +version = "2.0.0-beta.4" dependencies = [ "clap", "log", @@ -6249,7 +6166,7 @@ dependencies = [ [[package]] name = "tauri-plugin-clipboard-manager" -version = "2.1.0-beta.0" +version = "2.1.0-beta.2" dependencies = [ "arboard", "image", @@ -6263,7 +6180,7 @@ dependencies = [ [[package]] name = "tauri-plugin-deep-link" -version = "2.0.0-beta.3" +version = "2.0.0-beta.4" dependencies = [ "dunce", "log", @@ -6281,8 +6198,9 @@ dependencies = [ [[package]] name = "tauri-plugin-dialog" -version = "2.0.0-beta.4" +version = "2.0.0-beta.7" dependencies = [ + "dunce", "log", "raw-window-handle 0.6.0", "rfd", @@ -6296,7 +6214,7 @@ dependencies = [ [[package]] name = "tauri-plugin-fs" -version = "2.0.0-beta.4" +version = "2.0.0-beta.7" dependencies = [ "anyhow", "glob", @@ -6315,7 +6233,7 @@ dependencies = [ [[package]] name = "tauri-plugin-global-shortcut" -version = "2.0.0-beta.3" +version = "2.0.0-beta.4" dependencies = [ "global-hotkey", "log", @@ -6328,7 +6246,7 @@ dependencies = [ [[package]] name = "tauri-plugin-http" -version = "2.0.0-beta.4" +version = "2.0.0-beta.7" dependencies = [ "data-url", "http", @@ -6347,7 +6265,7 @@ dependencies = [ [[package]] name = "tauri-plugin-localhost" -version = "2.0.0-beta.3" +version = "2.0.0-beta.4" dependencies = [ "http", "log", @@ -6355,16 +6273,16 @@ dependencies = [ "serde_json", "tauri", "thiserror", - "tiny_http 0.12.0", + "tiny_http", ] [[package]] name = "tauri-plugin-log" -version = "2.0.0-beta.3" +version = "2.0.0-beta.4" dependencies = [ "android_logger", "byte-unit", - "cocoa 0.24.1", + "cocoa", "fern", "log", "objc", @@ -6379,7 +6297,7 @@ dependencies = [ [[package]] name = "tauri-plugin-nfc" -version = "2.0.0-beta.3" +version = "2.0.0-beta.4" dependencies = [ "log", "serde", @@ -6392,7 +6310,7 @@ dependencies = [ [[package]] name = "tauri-plugin-notification" -version = "2.0.0-beta.3" +version = "2.0.0-beta.5" dependencies = [ "chrono", "color-backtrace", @@ -6419,7 +6337,7 @@ dependencies = [ [[package]] name = "tauri-plugin-os" -version = "2.0.0-beta.3" +version = "2.0.0-beta.4" dependencies = [ "gethostname", "log", @@ -6435,7 +6353,7 @@ dependencies = [ [[package]] name = "tauri-plugin-persisted-scope" -version = "2.0.0-beta.4" +version = "2.0.0-beta.7" dependencies = [ "aho-corasick", "bincode", @@ -6449,7 +6367,7 @@ dependencies = [ [[package]] name = "tauri-plugin-positioner" -version = "2.0.0-beta.3" +version = "2.0.0-beta.4" dependencies = [ "log", "serde", @@ -6462,7 +6380,7 @@ dependencies = [ [[package]] name = "tauri-plugin-process" -version = "2.0.0-beta.3" +version = "2.0.0-beta.4" dependencies = [ "tauri", "tauri-plugin", @@ -6470,7 +6388,7 @@ dependencies = [ [[package]] name = "tauri-plugin-shell" -version = "2.0.0-beta.3" +version = "2.0.0-beta.4" dependencies = [ "encoding_rs", "log", @@ -6484,11 +6402,12 @@ dependencies = [ "tauri", "tauri-plugin", "thiserror", + "tokio", ] [[package]] name = "tauri-plugin-single-instance" -version = "2.0.0-beta.5" +version = "2.0.0-beta.7" dependencies = [ "log", "semver", @@ -6502,7 +6421,7 @@ dependencies = [ [[package]] name = "tauri-plugin-sql" -version = "2.0.0-beta.3" +version = "2.0.0-beta.4" dependencies = [ "futures-core", "log", @@ -6518,8 +6437,9 @@ dependencies = [ [[package]] name = "tauri-plugin-store" -version = "2.0.0-beta.4" +version = "2.0.0-beta.6" dependencies = [ + "dunce", "log", "serde", "serde_json", @@ -6530,7 +6450,7 @@ dependencies = [ [[package]] name = "tauri-plugin-stronghold" -version = "2.0.0-beta.3" +version = "2.0.0-beta.4" dependencies = [ "hex", "iota-crypto 0.23.1", @@ -6551,15 +6471,15 @@ dependencies = [ [[package]] name = "tauri-plugin-updater" -version = "2.0.0-beta.3" +version = "2.0.0-beta.5" dependencies = [ "base64 0.22.0", "dirs-next", "flate2", "futures-util", "http", + "infer", "minisign-verify", - "mockito", "reqwest", "semver", "serde", @@ -6578,7 +6498,7 @@ dependencies = [ [[package]] name = "tauri-plugin-upload" -version = "2.0.0-beta.3" +version = "2.0.0-beta.5" dependencies = [ "futures-util", "log", @@ -6595,7 +6515,7 @@ dependencies = [ [[package]] name = "tauri-plugin-websocket" -version = "2.0.0-beta.3" +version = "2.0.0-beta.5" dependencies = [ "futures-util", "http", @@ -6612,7 +6532,7 @@ dependencies = [ [[package]] name = "tauri-plugin-window-state" -version = "2.0.0-beta.4" +version = "2.0.0-beta.6" dependencies = [ "bitflags 2.4.2", "log", @@ -6625,9 +6545,9 @@ dependencies = [ [[package]] name = "tauri-runtime" -version = "2.0.0-beta.12" +version = "2.0.0-beta.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96c957749c40db7999959f379f799db095f2248a80bdbb13d8c078f6c299240e" +checksum = "148b6e6aff8e63fe5d4ae1d50159d50cfc0b4309abdeca64833c887c6b5631ef" dependencies = [ "dpi", "gtk", @@ -6639,16 +6559,16 @@ dependencies = [ "tauri-utils", "thiserror", "url", - "windows 0.54.0", + "windows 0.56.0", ] [[package]] name = "tauri-runtime-wry" -version = "2.0.0-beta.12" +version = "2.0.0-beta.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b937adb1cf3fa0457928ace959ca3fc1a85ddd69f56b124682d40f3e5683e60" +checksum = "398d065c6e0fbf3c4304583759b6e153bc1e0daeb033bede6834ebe4df371fc3" dependencies = [ - "cocoa 0.25.0", + "cocoa", "gtk", "http", "jni", @@ -6662,15 +6582,15 @@ dependencies = [ "url", "webkit2gtk", "webview2-com", - "windows 0.54.0", + "windows 0.56.0", "wry", ] [[package]] name = "tauri-utils" -version = "2.0.0-beta.12" +version = "2.0.0-beta.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "760ac613d7f0de95067bcbcbcea175fe1df88fc4ab59c7f0b2cc2d01dc16a199" +checksum = "d4709765385f035338ecc330f3fba753b8ee283c659c235da9768949cdb25469" dependencies = [ "aes-gcm 0.10.3", "brotli", @@ -6679,7 +6599,7 @@ dependencies = [ "dunce", "getrandom 0.2.12", "glob", - "heck", + "heck 0.5.0", "html5ever", "infer", "json-patch", @@ -6846,19 +6766,6 @@ dependencies = [ "crunchy", ] -[[package]] -name = "tiny_http" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0d6ef4e10d23c1efb862eecad25c5054429a71958b4eeef85eb5e7170b477ca" -dependencies = [ - "ascii", - "chunked_transfer", - "log", - "time", - "url", -] - [[package]] name = "tiny_http" version = "0.12.0" @@ -7158,8 +7065,8 @@ version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da36482ee1dbcedfddb038b3a0f6d27f04d9470dc99dabfa90b8d7cdc8b5f3d6" dependencies = [ - "cocoa 0.25.0", - "core-graphics 0.23.1", + "cocoa", + "core-graphics", "crossbeam-channel", "dirs-next", "libappindicator", @@ -7670,16 +7577,16 @@ dependencies = [ [[package]] name = "webview2-com" -version = "0.29.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d5949fc3f537e90240c3e4f78dda2fa0431b671d50845a2f582173ef8a1201" +checksum = "5c914dd492a52f0377bef56fd1b6e74a79090f9ee631d625d5b505a00e4538b6" dependencies = [ "webview2-com-macros", "webview2-com-sys", - "windows 0.54.0", - "windows-core 0.54.0", - "windows-implement", - "windows-interface", + "windows 0.56.0", + "windows-core 0.56.0", + "windows-implement 0.56.0", + "windows-interface 0.56.0", ] [[package]] @@ -7695,13 +7602,13 @@ dependencies = [ [[package]] name = "webview2-com-sys" -version = "0.29.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd1eaa1be63d6fdcadf893c40d7d53c889a6342b3a94930d34e6964d5bb7e8db" +checksum = "2a46bcf03482ec28eeb764ca788f67998cde4213adfbbfa90462622058530f5e" dependencies = [ "thiserror", - "windows 0.54.0", - "windows-core 0.54.0", + "windows 0.56.0", + "windows-core 0.56.0", ] [[package]] @@ -7767,7 +7674,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67ff424735b1ac21293b0492b069394b0a189c8a463fb015a16dea7c2e221c08" dependencies = [ - "cocoa 0.25.0", + "cocoa", "objc", "raw-window-handle 0.5.2", "windows-sys 0.48.0", @@ -7779,7 +7686,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33082acd404763b315866e14a0d5193f3422c81086657583937a750cdd3ec340" dependencies = [ - "cocoa 0.25.0", + "cocoa", "objc", "raw-window-handle 0.6.0", "windows-sys 0.52.0", @@ -7815,9 +7722,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9252e5725dbed82865af151df558e754e4a3c2c30818359eb17465f1346a1b49" dependencies = [ "windows-core 0.54.0", - "windows-implement", - "windows-interface", - "windows-targets 0.52.4", + "windows-implement 0.53.0", + "windows-interface 0.53.0", + "windows-targets 0.52.5", +] + +[[package]] +name = "windows" +version = "0.56.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1de69df01bdf1ead2f4ac895dc77c9351aefff65b2f3db429a343f9cbf05e132" +dependencies = [ + "windows-core 0.56.0", + "windows-targets 0.52.5", ] [[package]] @@ -7826,7 +7743,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.4", + "windows-targets 0.52.5", ] [[package]] @@ -7836,7 +7753,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "12661b9c89351d684a50a8a643ce5f608e20243b9fb84687800163429f161d65" dependencies = [ "windows-result", - "windows-targets 0.52.4", + "windows-targets 0.52.5", +] + +[[package]] +name = "windows-core" +version = "0.56.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4698e52ed2d08f8658ab0c39512a7c00ee5fe2688c65f8c0a4f06750d729f2a6" +dependencies = [ + "windows-implement 0.56.0", + "windows-interface 0.56.0", + "windows-result", + "windows-targets 0.52.5", ] [[package]] @@ -7850,6 +7779,17 @@ dependencies = [ "syn 2.0.52", ] +[[package]] +name = "windows-implement" +version = "0.56.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6fc35f58ecd95a9b71c4f2329b911016e6bec66b3f2e6a4aad86bd2e99e2f9b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.52", +] + [[package]] name = "windows-interface" version = "0.53.0" @@ -7861,23 +7801,34 @@ dependencies = [ "syn 2.0.52", ] +[[package]] +name = "windows-interface" +version = "0.56.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08990546bf4edef8f431fa6326e032865f27138718c587dc21bc0265bbcb57cc" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.52", +] + [[package]] name = "windows-registry" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e885d2dff8cad07e7451b78eac1ff62f958825c4598d6ddf87e7d2661980c1c" +checksum = "f721bc2e55efb506a1a395a545cb76c2481fb023d33b51f0050e7888716281cf" dependencies = [ "windows-result", - "windows-targets 0.52.4", + "windows-targets 0.52.5", ] [[package]] name = "windows-result" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd19df78e5168dfb0aedc343d1d1b8d422ab2db6756d2dc3fef75035402a3f64" +checksum = "749f0da9cc72d82e600d8d2e44cadd0b9eedb9038f71a1c58556ac1c5791813b" dependencies = [ - "windows-targets 0.52.4", + "windows-targets 0.52.5", ] [[package]] @@ -7904,7 +7855,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.4", + "windows-targets 0.52.5", ] [[package]] @@ -7939,17 +7890,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dd37b7e5ab9018759f893a1952c9420d060016fc19a472b4bb20d1bdd694d1b" +checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" dependencies = [ - "windows_aarch64_gnullvm 0.52.4", - "windows_aarch64_msvc 0.52.4", - "windows_i686_gnu 0.52.4", - "windows_i686_msvc 0.52.4", - "windows_x86_64_gnu 0.52.4", - "windows_x86_64_gnullvm 0.52.4", - "windows_x86_64_msvc 0.52.4", + "windows_aarch64_gnullvm 0.52.5", + "windows_aarch64_msvc 0.52.5", + "windows_i686_gnu 0.52.5", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.5", + "windows_x86_64_gnu 0.52.5", + "windows_x86_64_gnullvm 0.52.5", + "windows_x86_64_msvc 0.52.5", ] [[package]] @@ -7958,7 +7910,7 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75aa004c988e080ad34aff5739c39d0312f4684699d6d71fc8a198d057b8b9b4" dependencies = [ - "windows-targets 0.52.4", + "windows-targets 0.52.5", ] [[package]] @@ -7975,9 +7927,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcf46cf4c365c6f2d1cc93ce535f2c8b244591df96ceee75d8e83deb70a9cac9" +checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" [[package]] name = "windows_aarch64_msvc" @@ -7999,9 +7951,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da9f259dd3bcf6990b55bffd094c4f7235817ba4ceebde8e6d11cd0c5633b675" +checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" [[package]] name = "windows_i686_gnu" @@ -8023,9 +7975,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b474d8268f99e0995f25b9f095bc7434632601028cf86590aea5c8a5cb7801d3" +checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" [[package]] name = "windows_i686_msvc" @@ -8047,9 +8005,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1515e9a29e5bed743cb4415a9ecf5dfca648ce85ee42e15873c3cd8610ff8e02" +checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" [[package]] name = "windows_x86_64_gnu" @@ -8071,9 +8029,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5eee091590e89cc02ad514ffe3ead9eb6b660aedca2183455434b93546371a03" +checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" [[package]] name = "windows_x86_64_gnullvm" @@ -8089,9 +8047,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77ca79f2451b49fa9e2af39f0747fe999fcda4f5e241b2898624dca97a1f2177" +checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" [[package]] name = "windows_x86_64_msvc" @@ -8113,9 +8071,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8" +checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" [[package]] name = "winnow" @@ -8166,15 +8124,14 @@ dependencies = [ [[package]] name = "wry" -version = "0.39.0" +version = "0.39.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eca9d50437c04fc67e82c196ddd31d8e35794150713ae2d647f3a58c7f45d1a" +checksum = "6e180ac2740d6cb4d5cec0abf63eacbea90f1b7e5e3803043b13c1c84c4b7884" dependencies = [ - "base64 0.21.7", + "base64 0.22.0", "block", - "cfg_aliases 0.1.1", - "cocoa 0.25.0", - "core-graphics 0.23.1", + "cocoa", + "core-graphics", "crossbeam-channel", "dpi", "dunce", @@ -8201,7 +8158,8 @@ dependencies = [ "webkit2gtk", "webkit2gtk-sys", "webview2-com", - "windows 0.54.0", + "windows 0.56.0", + "windows-core 0.56.0", "windows-version", "x11-dl", ] diff --git a/Cargo.toml b/Cargo.toml index 9f0f306e9..f75db8545 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,14 +10,15 @@ resolver = "2" [workspace.dependencies] serde = { version = "1", features = ["derive"] } log = "0.4" -tauri = "2.0.0-beta.14" -tauri-build = "2.0.0-beta.11" -tauri-plugin = "2.0.0-beta.11" -tauri-utils = "2.0.0-beta.12" +tauri = "2.0.0-beta.17" +tauri-build = "2.0.0-beta.13" +tauri-plugin = "2.0.0-beta.13" +tauri-utils = "2.0.0-beta.13" serde_json = "1" thiserror = "1" url = "2" schemars = "0.8" +dunce = "1" [workspace.package] edition = "2021" diff --git a/examples/api/CHANGELOG.md b/examples/api/CHANGELOG.md index 4133e4f0b..50125bede 100644 --- a/examples/api/CHANGELOG.md +++ b/examples/api/CHANGELOG.md @@ -1,5 +1,31 @@ # Changelog +## \[2.0.0-beta.5] + +### Dependencies + +- Upgraded to `global-shortcut-js@2.0.0-beta.3` +- Upgraded to `barcode-scanner-js@2.0.0-beta.3` +- Upgraded to `biometric-js@2.0.0-beta.3` +- Upgraded to `cli-js@2.0.0-beta.3` +- Upgraded to `clipboard-manager-js@2.1.0-beta.1` +- Upgraded to `dialog-js@2.0.0-beta.3` +- Upgraded to `fs-js@2.0.0-beta.3` +- Upgraded to `http-js@2.0.0-beta.3` +- Upgraded to `log-js@2.0.0-beta.4` +- Upgraded to `nfc-js@2.0.0-beta.3` +- Upgraded to `notification-js@2.0.0-beta.3` +- Upgraded to `os-js@2.0.0-beta.3` +- Upgraded to `process-js@2.0.0-beta.3` +- Upgraded to `shell-js@2.0.0-beta.3` +- Upgraded to `updater-js@2.0.0-beta.3` + +## \[2.0.0-beta.4] + +### Dependencies + +- Upgraded to `log-js@2.0.0-beta.3` + ## \[2.0.0-beta.3] ### Dependencies diff --git a/examples/api/package.json b/examples/api/package.json index 480250877..9d6a16491 100644 --- a/examples/api/package.json +++ b/examples/api/package.json @@ -1,7 +1,7 @@ { "name": "svelte-app", "private": true, - "version": "2.0.0-beta.3", + "version": "2.0.0-beta.5", "type": "module", "scripts": { "dev": "vite --clearScreen false", @@ -9,28 +9,28 @@ "serve": "vite preview" }, "dependencies": { - "@tauri-apps/api": "2.0.0-beta.7", - "@tauri-apps/plugin-barcode-scanner": "2.0.0-beta.2", - "@tauri-apps/plugin-biometric": "2.0.0-beta.2", - "@tauri-apps/plugin-cli": "2.0.0-beta.2", - "@tauri-apps/plugin-clipboard-manager": "2.1.0-beta.0", - "@tauri-apps/plugin-dialog": "2.0.0-beta.2", - "@tauri-apps/plugin-fs": "2.0.0-beta.2", - "@tauri-apps/plugin-global-shortcut": "2.0.0-beta.2", - "@tauri-apps/plugin-http": "2.0.0-beta.2", - "@tauri-apps/plugin-nfc": "2.0.0-beta.2", - "@tauri-apps/plugin-notification": "2.0.0-beta.2", - "@tauri-apps/plugin-os": "2.0.0-beta.2", - "@tauri-apps/plugin-process": "2.0.0-beta.2", - "@tauri-apps/plugin-shell": "2.0.0-beta.2", - "@tauri-apps/plugin-updater": "2.0.0-beta.2", + "@tauri-apps/api": "2.0.0-beta.11", + "@tauri-apps/plugin-barcode-scanner": "2.0.0-beta.3", + "@tauri-apps/plugin-biometric": "2.0.0-beta.3", + "@tauri-apps/plugin-cli": "2.0.0-beta.3", + "@tauri-apps/plugin-clipboard-manager": "2.1.0-beta.1", + "@tauri-apps/plugin-dialog": "2.0.0-beta.3", + "@tauri-apps/plugin-fs": "2.0.0-beta.3", + "@tauri-apps/plugin-global-shortcut": "2.0.0-beta.3", + "@tauri-apps/plugin-http": "2.0.0-beta.3", + "@tauri-apps/plugin-nfc": "2.0.0-beta.3", + "@tauri-apps/plugin-notification": "2.0.0-beta.3", + "@tauri-apps/plugin-os": "2.0.0-beta.3", + "@tauri-apps/plugin-process": "2.0.0-beta.3", + "@tauri-apps/plugin-shell": "2.0.0-beta.3", + "@tauri-apps/plugin-updater": "2.0.0-beta.3", "@zerodevx/svelte-json-view": "1.0.9" }, "devDependencies": { "@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-beta.12", + "@tauri-apps/cli": "2.0.0-beta.16", "@unocss/extractor-svelte": "^0.59.0", "internal-ip": "^8.0.0", "svelte": "^4.2.8", diff --git a/examples/api/src-tauri/CHANGELOG.md b/examples/api/src-tauri/CHANGELOG.md index 5f6e98ec3..6bc0e2728 100644 --- a/examples/api/src-tauri/CHANGELOG.md +++ b/examples/api/src-tauri/CHANGELOG.md @@ -1,5 +1,45 @@ # Changelog +## \[2.0.0-beta.7] + +### Dependencies + +- Upgraded to `clipboard-manager@2.1.0-beta.2` +- Upgraded to `global-shortcut@2.0.0-beta.4` +- Upgraded to `barcode-scanner@2.0.0-beta.5` +- Upgraded to `biometric@2.0.0-beta.4` +- Upgraded to `cli@2.0.0-beta.4` +- Upgraded to `dialog@2.0.0-beta.7` +- Upgraded to `fs@2.0.0-beta.7` +- Upgraded to `http@2.0.0-beta.7` +- Upgraded to `log-plugin@2.0.0-beta.4` +- Upgraded to `nfc@2.0.0-beta.4` +- Upgraded to `notification@2.0.0-beta.5` +- Upgraded to `os@2.0.0-beta.4` +- Upgraded to `process@2.0.0-beta.4` +- Upgraded to `shell@2.0.0-beta.4` +- Upgraded to `updater@2.0.0-beta.5` + +## \[2.0.0-beta.6] + +### Dependencies + +- Upgraded to `notification@2.0.0-beta.4` +- Upgraded to `barcode-scanner@2.0.0-beta.4` +- Upgraded to `dialog@2.0.0-beta.6` +- Upgraded to `fs@2.0.0-beta.6` +- Upgraded to `http@2.0.0-beta.6` + +## \[2.0.0-beta.5] + +### Dependencies + +- Upgraded to `clipboard-manager@2.1.0-beta.1` +- Upgraded to `http@2.0.0-beta.5` +- Upgraded to `updater@2.0.0-beta.4` +- Upgraded to `dialog@2.0.0-beta.5` +- Upgraded to `fs@2.0.0-beta.5` + ## \[2.0.0-beta.4] ### Dependencies diff --git a/examples/api/src-tauri/Cargo.toml b/examples/api/src-tauri/Cargo.toml index c06ea11f9..382109abc 100644 --- a/examples/api/src-tauri/Cargo.toml +++ b/examples/api/src-tauri/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "api" publish = false -version = "2.0.0-beta.4" +version = "2.0.0-beta.7" description = "An example Tauri Application showcasing the api" edition = "2021" rust-version = { workspace = true } @@ -17,17 +17,17 @@ tauri-build = { workspace = true, features = [ "codegen", "isolation" ] } [dependencies] serde_json = { workspace = true } serde = { workspace = true } -tiny_http = "0.11" +tiny_http = "0.12" log = { workspace = true } -tauri-plugin-log = { path = "../../../plugins/log", version = "2.0.0-beta.3" } -tauri-plugin-fs = { path = "../../../plugins/fs", version = "2.0.0-beta.4", features = [ "watch" ] } -tauri-plugin-clipboard-manager = { path = "../../../plugins/clipboard-manager", version = "2.1.0-beta.0" } -tauri-plugin-dialog = { path = "../../../plugins/dialog", version = "2.0.0-beta.4" } -tauri-plugin-http = { path = "../../../plugins/http", features = [ "multipart" ], version = "2.0.0-beta.4" } -tauri-plugin-notification = { path = "../../../plugins/notification", version = "2.0.0-beta.3", features = [ "windows7-compat" ] } -tauri-plugin-os = { path = "../../../plugins/os", version = "2.0.0-beta.3" } -tauri-plugin-process = { path = "../../../plugins/process", version = "2.0.0-beta.3" } -tauri-plugin-shell = { path = "../../../plugins/shell", version = "2.0.0-beta.3" } +tauri-plugin-log = { path = "../../../plugins/log", version = "2.0.0-beta.4" } +tauri-plugin-fs = { path = "../../../plugins/fs", version = "2.0.0-beta.7", features = [ "watch" ] } +tauri-plugin-clipboard-manager = { path = "../../../plugins/clipboard-manager", version = "2.1.0-beta.2" } +tauri-plugin-dialog = { path = "../../../plugins/dialog", version = "2.0.0-beta.7" } +tauri-plugin-http = { path = "../../../plugins/http", features = [ "multipart" ], version = "2.0.0-beta.7" } +tauri-plugin-notification = { path = "../../../plugins/notification", version = "2.0.0-beta.5", features = [ "windows7-compat" ] } +tauri-plugin-os = { path = "../../../plugins/os", version = "2.0.0-beta.4" } +tauri-plugin-process = { path = "../../../plugins/process", version = "2.0.0-beta.4" } +tauri-plugin-shell = { path = "../../../plugins/shell", version = "2.0.0-beta.4" } [dependencies.tauri] workspace = true @@ -41,14 +41,14 @@ tauri-plugin-shell = { path = "../../../plugins/shell", version = "2.0.0-beta.3" ] [target."cfg(any(target_os = \"macos\", windows, target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies] -tauri-plugin-cli = { path = "../../../plugins/cli", version = "2.0.0-beta.3" } -tauri-plugin-global-shortcut = { path = "../../../plugins/global-shortcut", version = "2.0.0-beta.3" } -tauri-plugin-updater = { path = "../../../plugins/updater", version = "2.0.0-beta.3" } +tauri-plugin-cli = { path = "../../../plugins/cli", version = "2.0.0-beta.4" } +tauri-plugin-global-shortcut = { path = "../../../plugins/global-shortcut", version = "2.0.0-beta.4" } +tauri-plugin-updater = { path = "../../../plugins/updater", version = "2.0.0-beta.5" } [target."cfg(any(target_os = \"android\", target_os = \"ios\"))".dependencies] -tauri-plugin-barcode-scanner = { path = "../../../plugins/barcode-scanner/", version = "2.0.0-beta.3" } -tauri-plugin-nfc = { path = "../../../plugins/nfc", version = "2.0.0-beta.3" } -tauri-plugin-biometric = { path = "../../../plugins/biometric/", version = "2.0.0-beta.3" } +tauri-plugin-barcode-scanner = { path = "../../../plugins/barcode-scanner/", version = "2.0.0-beta.5" } +tauri-plugin-nfc = { path = "../../../plugins/nfc", version = "2.0.0-beta.4" } +tauri-plugin-biometric = { path = "../../../plugins/biometric/", version = "2.0.0-beta.4" } [target."cfg(target_os = \"windows\")".dependencies] window-shadows = "0.2" diff --git a/examples/api/src-tauri/gen/schemas/desktop-schema.json b/examples/api/src-tauri/gen/schemas/desktop-schema.json index fe2278617..c00d481bd 100644 --- a/examples/api/src-tauri/gen/schemas/desktop-schema.json +++ b/examples/api/src-tauri/gen/schemas/desktop-schema.json @@ -149,14 +149,14 @@ ] }, { - "description": "fs:allow-app-meta -> This allows read access to metadata of the `$APP` folder, including file listing and statistics.", + "description": "fs:allow-app-meta -> This allows non-recursive 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.", + "description": "fs:allow-app-meta-recursive -> This allows full recursive read access to metadata of the `$APP` folder, including file listing and statistics.", "type": "string", "enum": [ "fs:allow-app-meta-recursive" @@ -191,14 +191,14 @@ ] }, { - "description": "fs:allow-appcache-meta -> This allows read access to metadata of the `$APPCACHE` folder, including file listing and statistics.", + "description": "fs:allow-appcache-meta -> This allows non-recursive 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.", + "description": "fs:allow-appcache-meta-recursive -> This allows full recursive read access to metadata of the `$APPCACHE` folder, including file listing and statistics.", "type": "string", "enum": [ "fs:allow-appcache-meta-recursive" @@ -233,14 +233,14 @@ ] }, { - "description": "fs:allow-appconfig-meta -> This allows read access to metadata of the `$APPCONFIG` folder, including file listing and statistics.", + "description": "fs:allow-appconfig-meta -> This allows non-recursive 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.", + "description": "fs:allow-appconfig-meta-recursive -> This allows full recursive read access to metadata of the `$APPCONFIG` folder, including file listing and statistics.", "type": "string", "enum": [ "fs:allow-appconfig-meta-recursive" @@ -275,14 +275,14 @@ ] }, { - "description": "fs:allow-appdata-meta -> This allows read access to metadata of the `$APPDATA` folder, including file listing and statistics.", + "description": "fs:allow-appdata-meta -> This allows non-recursive 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.", + "description": "fs:allow-appdata-meta-recursive -> This allows full recursive read access to metadata of the `$APPDATA` folder, including file listing and statistics.", "type": "string", "enum": [ "fs:allow-appdata-meta-recursive" @@ -317,14 +317,14 @@ ] }, { - "description": "fs:allow-applocaldata-meta -> This allows read access to metadata of the `$APPLOCALDATA` folder, including file listing and statistics.", + "description": "fs:allow-applocaldata-meta -> This allows non-recursive 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.", + "description": "fs:allow-applocaldata-meta-recursive -> This allows full recursive read access to metadata of the `$APPLOCALDATA` folder, including file listing and statistics.", "type": "string", "enum": [ "fs:allow-applocaldata-meta-recursive" @@ -359,14 +359,14 @@ ] }, { - "description": "fs:allow-applog-meta -> This allows read access to metadata of the `$APPLOG` folder, including file listing and statistics.", + "description": "fs:allow-applog-meta -> This allows non-recursive 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.", + "description": "fs:allow-applog-meta-recursive -> This allows full recursive read access to metadata of the `$APPLOG` folder, including file listing and statistics.", "type": "string", "enum": [ "fs:allow-applog-meta-recursive" @@ -401,14 +401,14 @@ ] }, { - "description": "fs:allow-audio-meta -> This allows read access to metadata of the `$AUDIO` folder, including file listing and statistics.", + "description": "fs:allow-audio-meta -> This allows non-recursive 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.", + "description": "fs:allow-audio-meta-recursive -> This allows full recursive read access to metadata of the `$AUDIO` folder, including file listing and statistics.", "type": "string", "enum": [ "fs:allow-audio-meta-recursive" @@ -443,14 +443,14 @@ ] }, { - "description": "fs:allow-cache-meta -> This allows read access to metadata of the `$CACHE` folder, including file listing and statistics.", + "description": "fs:allow-cache-meta -> This allows non-recursive 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.", + "description": "fs:allow-cache-meta-recursive -> This allows full recursive read access to metadata of the `$CACHE` folder, including file listing and statistics.", "type": "string", "enum": [ "fs:allow-cache-meta-recursive" @@ -485,14 +485,14 @@ ] }, { - "description": "fs:allow-config-meta -> This allows read access to metadata of the `$CONFIG` folder, including file listing and statistics.", + "description": "fs:allow-config-meta -> This allows non-recursive 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.", + "description": "fs:allow-config-meta-recursive -> This allows full recursive read access to metadata of the `$CONFIG` folder, including file listing and statistics.", "type": "string", "enum": [ "fs:allow-config-meta-recursive" @@ -527,14 +527,14 @@ ] }, { - "description": "fs:allow-data-meta -> This allows read access to metadata of the `$DATA` folder, including file listing and statistics.", + "description": "fs:allow-data-meta -> This allows non-recursive 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.", + "description": "fs:allow-data-meta-recursive -> This allows full recursive read access to metadata of the `$DATA` folder, including file listing and statistics.", "type": "string", "enum": [ "fs:allow-data-meta-recursive" @@ -569,14 +569,14 @@ ] }, { - "description": "fs:allow-desktop-meta -> This allows read access to metadata of the `$DESKTOP` folder, including file listing and statistics.", + "description": "fs:allow-desktop-meta -> This allows non-recursive 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.", + "description": "fs:allow-desktop-meta-recursive -> This allows full recursive read access to metadata of the `$DESKTOP` folder, including file listing and statistics.", "type": "string", "enum": [ "fs:allow-desktop-meta-recursive" @@ -611,14 +611,14 @@ ] }, { - "description": "fs:allow-document-meta -> This allows read access to metadata of the `$DOCUMENT` folder, including file listing and statistics.", + "description": "fs:allow-document-meta -> This allows non-recursive 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.", + "description": "fs:allow-document-meta-recursive -> This allows full recursive read access to metadata of the `$DOCUMENT` folder, including file listing and statistics.", "type": "string", "enum": [ "fs:allow-document-meta-recursive" @@ -653,14 +653,14 @@ ] }, { - "description": "fs:allow-download-meta -> This allows read access to metadata of the `$DOWNLOAD` folder, including file listing and statistics.", + "description": "fs:allow-download-meta -> This allows non-recursive 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.", + "description": "fs:allow-download-meta-recursive -> This allows full recursive read access to metadata of the `$DOWNLOAD` folder, including file listing and statistics.", "type": "string", "enum": [ "fs:allow-download-meta-recursive" @@ -695,14 +695,14 @@ ] }, { - "description": "fs:allow-exe-meta -> This allows read access to metadata of the `$EXE` folder, including file listing and statistics.", + "description": "fs:allow-exe-meta -> This allows non-recursive 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.", + "description": "fs:allow-exe-meta-recursive -> This allows full recursive read access to metadata of the `$EXE` folder, including file listing and statistics.", "type": "string", "enum": [ "fs:allow-exe-meta-recursive" @@ -737,14 +737,14 @@ ] }, { - "description": "fs:allow-font-meta -> This allows read access to metadata of the `$FONT` folder, including file listing and statistics.", + "description": "fs:allow-font-meta -> This allows non-recursive 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.", + "description": "fs:allow-font-meta-recursive -> This allows full recursive read access to metadata of the `$FONT` folder, including file listing and statistics.", "type": "string", "enum": [ "fs:allow-font-meta-recursive" @@ -779,14 +779,14 @@ ] }, { - "description": "fs:allow-home-meta -> This allows read access to metadata of the `$HOME` folder, including file listing and statistics.", + "description": "fs:allow-home-meta -> This allows non-recursive 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.", + "description": "fs:allow-home-meta-recursive -> This allows full recursive read access to metadata of the `$HOME` folder, including file listing and statistics.", "type": "string", "enum": [ "fs:allow-home-meta-recursive" @@ -821,14 +821,14 @@ ] }, { - "description": "fs:allow-localdata-meta -> This allows read access to metadata of the `$LOCALDATA` folder, including file listing and statistics.", + "description": "fs:allow-localdata-meta -> This allows non-recursive 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.", + "description": "fs:allow-localdata-meta-recursive -> This allows full recursive read access to metadata of the `$LOCALDATA` folder, including file listing and statistics.", "type": "string", "enum": [ "fs:allow-localdata-meta-recursive" @@ -863,14 +863,14 @@ ] }, { - "description": "fs:allow-log-meta -> This allows read access to metadata of the `$LOG` folder, including file listing and statistics.", + "description": "fs:allow-log-meta -> This allows non-recursive 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.", + "description": "fs:allow-log-meta-recursive -> This allows full recursive read access to metadata of the `$LOG` folder, including file listing and statistics.", "type": "string", "enum": [ "fs:allow-log-meta-recursive" @@ -905,14 +905,14 @@ ] }, { - "description": "fs:allow-picture-meta -> This allows read access to metadata of the `$PICTURE` folder, including file listing and statistics.", + "description": "fs:allow-picture-meta -> This allows non-recursive 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.", + "description": "fs:allow-picture-meta-recursive -> This allows full recursive read access to metadata of the `$PICTURE` folder, including file listing and statistics.", "type": "string", "enum": [ "fs:allow-picture-meta-recursive" @@ -947,14 +947,14 @@ ] }, { - "description": "fs:allow-public-meta -> This allows read access to metadata of the `$PUBLIC` folder, including file listing and statistics.", + "description": "fs:allow-public-meta -> This allows non-recursive 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.", + "description": "fs:allow-public-meta-recursive -> This allows full recursive read access to metadata of the `$PUBLIC` folder, including file listing and statistics.", "type": "string", "enum": [ "fs:allow-public-meta-recursive" @@ -989,14 +989,14 @@ ] }, { - "description": "fs:allow-resource-meta -> This allows read access to metadata of the `$RESOURCE` folder, including file listing and statistics.", + "description": "fs:allow-resource-meta -> This allows non-recursive 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.", + "description": "fs:allow-resource-meta-recursive -> This allows full recursive read access to metadata of the `$RESOURCE` folder, including file listing and statistics.", "type": "string", "enum": [ "fs:allow-resource-meta-recursive" @@ -1031,14 +1031,14 @@ ] }, { - "description": "fs:allow-runtime-meta -> This allows read access to metadata of the `$RUNTIME` folder, including file listing and statistics.", + "description": "fs:allow-runtime-meta -> This allows non-recursive 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.", + "description": "fs:allow-runtime-meta-recursive -> This allows full recursive read access to metadata of the `$RUNTIME` folder, including file listing and statistics.", "type": "string", "enum": [ "fs:allow-runtime-meta-recursive" @@ -1073,14 +1073,14 @@ ] }, { - "description": "fs:allow-temp-meta -> This allows read access to metadata of the `$TEMP` folder, including file listing and statistics.", + "description": "fs:allow-temp-meta -> This allows non-recursive 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.", + "description": "fs:allow-temp-meta-recursive -> This allows full recursive read access to metadata of the `$TEMP` folder, including file listing and statistics.", "type": "string", "enum": [ "fs:allow-temp-meta-recursive" @@ -1115,14 +1115,14 @@ ] }, { - "description": "fs:allow-template-meta -> This allows read access to metadata of the `$TEMPLATE` folder, including file listing and statistics.", + "description": "fs:allow-template-meta -> This allows non-recursive 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.", + "description": "fs:allow-template-meta-recursive -> This allows full recursive read access to metadata of the `$TEMPLATE` folder, including file listing and statistics.", "type": "string", "enum": [ "fs:allow-template-meta-recursive" @@ -1157,14 +1157,14 @@ ] }, { - "description": "fs:allow-video-meta -> This allows read access to metadata of the `$VIDEO` folder, including file listing and statistics.", + "description": "fs:allow-video-meta -> This allows non-recursive 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.", + "description": "fs:allow-video-meta-recursive -> This allows full recursive read access to metadata of the `$VIDEO` folder, including file listing and statistics.", "type": "string", "enum": [ "fs:allow-video-meta-recursive" @@ -2339,6 +2339,13 @@ "shell:allow-open" ] }, + { + "description": "shell:allow-spawn -> Enables the spawn command without any pre-configured scope.", + "type": "string", + "enum": [ + "shell:allow-spawn" + ] + }, { "description": "shell:allow-stdin-write -> Enables the stdin_write command without any pre-configured scope.", "type": "string", @@ -2367,6 +2374,13 @@ "shell:deny-open" ] }, + { + "description": "shell:deny-spawn -> Denies the spawn command without any pre-configured scope.", + "type": "string", + "enum": [ + "shell:deny-spawn" + ] + }, { "description": "shell:deny-stdin-write -> Denies the stdin_write command without any pre-configured scope.", "type": "string", @@ -2782,14 +2796,14 @@ ] }, { - "description": "fs:allow-app-meta -> This allows read access to metadata of the `$APP` folder, including file listing and statistics.", + "description": "fs:allow-app-meta -> This allows non-recursive 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.", + "description": "fs:allow-app-meta-recursive -> This allows full recursive read access to metadata of the `$APP` folder, including file listing and statistics.", "type": "string", "enum": [ "fs:allow-app-meta-recursive" @@ -2824,14 +2838,14 @@ ] }, { - "description": "fs:allow-appcache-meta -> This allows read access to metadata of the `$APPCACHE` folder, including file listing and statistics.", + "description": "fs:allow-appcache-meta -> This allows non-recursive 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.", + "description": "fs:allow-appcache-meta-recursive -> This allows full recursive read access to metadata of the `$APPCACHE` folder, including file listing and statistics.", "type": "string", "enum": [ "fs:allow-appcache-meta-recursive" @@ -2866,14 +2880,14 @@ ] }, { - "description": "fs:allow-appconfig-meta -> This allows read access to metadata of the `$APPCONFIG` folder, including file listing and statistics.", + "description": "fs:allow-appconfig-meta -> This allows non-recursive 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.", + "description": "fs:allow-appconfig-meta-recursive -> This allows full recursive read access to metadata of the `$APPCONFIG` folder, including file listing and statistics.", "type": "string", "enum": [ "fs:allow-appconfig-meta-recursive" @@ -2908,14 +2922,14 @@ ] }, { - "description": "fs:allow-appdata-meta -> This allows read access to metadata of the `$APPDATA` folder, including file listing and statistics.", + "description": "fs:allow-appdata-meta -> This allows non-recursive 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.", + "description": "fs:allow-appdata-meta-recursive -> This allows full recursive read access to metadata of the `$APPDATA` folder, including file listing and statistics.", "type": "string", "enum": [ "fs:allow-appdata-meta-recursive" @@ -2950,14 +2964,14 @@ ] }, { - "description": "fs:allow-applocaldata-meta -> This allows read access to metadata of the `$APPLOCALDATA` folder, including file listing and statistics.", + "description": "fs:allow-applocaldata-meta -> This allows non-recursive 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.", + "description": "fs:allow-applocaldata-meta-recursive -> This allows full recursive read access to metadata of the `$APPLOCALDATA` folder, including file listing and statistics.", "type": "string", "enum": [ "fs:allow-applocaldata-meta-recursive" @@ -2992,14 +3006,14 @@ ] }, { - "description": "fs:allow-applog-meta -> This allows read access to metadata of the `$APPLOG` folder, including file listing and statistics.", + "description": "fs:allow-applog-meta -> This allows non-recursive 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.", + "description": "fs:allow-applog-meta-recursive -> This allows full recursive read access to metadata of the `$APPLOG` folder, including file listing and statistics.", "type": "string", "enum": [ "fs:allow-applog-meta-recursive" @@ -3034,14 +3048,14 @@ ] }, { - "description": "fs:allow-audio-meta -> This allows read access to metadata of the `$AUDIO` folder, including file listing and statistics.", + "description": "fs:allow-audio-meta -> This allows non-recursive 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.", + "description": "fs:allow-audio-meta-recursive -> This allows full recursive read access to metadata of the `$AUDIO` folder, including file listing and statistics.", "type": "string", "enum": [ "fs:allow-audio-meta-recursive" @@ -3076,14 +3090,14 @@ ] }, { - "description": "fs:allow-cache-meta -> This allows read access to metadata of the `$CACHE` folder, including file listing and statistics.", + "description": "fs:allow-cache-meta -> This allows non-recursive 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.", + "description": "fs:allow-cache-meta-recursive -> This allows full recursive read access to metadata of the `$CACHE` folder, including file listing and statistics.", "type": "string", "enum": [ "fs:allow-cache-meta-recursive" @@ -3118,14 +3132,14 @@ ] }, { - "description": "fs:allow-config-meta -> This allows read access to metadata of the `$CONFIG` folder, including file listing and statistics.", + "description": "fs:allow-config-meta -> This allows non-recursive 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.", + "description": "fs:allow-config-meta-recursive -> This allows full recursive read access to metadata of the `$CONFIG` folder, including file listing and statistics.", "type": "string", "enum": [ "fs:allow-config-meta-recursive" @@ -3160,14 +3174,14 @@ ] }, { - "description": "fs:allow-data-meta -> This allows read access to metadata of the `$DATA` folder, including file listing and statistics.", + "description": "fs:allow-data-meta -> This allows non-recursive 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.", + "description": "fs:allow-data-meta-recursive -> This allows full recursive read access to metadata of the `$DATA` folder, including file listing and statistics.", "type": "string", "enum": [ "fs:allow-data-meta-recursive" @@ -3202,14 +3216,14 @@ ] }, { - "description": "fs:allow-desktop-meta -> This allows read access to metadata of the `$DESKTOP` folder, including file listing and statistics.", + "description": "fs:allow-desktop-meta -> This allows non-recursive 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.", + "description": "fs:allow-desktop-meta-recursive -> This allows full recursive read access to metadata of the `$DESKTOP` folder, including file listing and statistics.", "type": "string", "enum": [ "fs:allow-desktop-meta-recursive" @@ -3244,14 +3258,14 @@ ] }, { - "description": "fs:allow-document-meta -> This allows read access to metadata of the `$DOCUMENT` folder, including file listing and statistics.", + "description": "fs:allow-document-meta -> This allows non-recursive 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.", + "description": "fs:allow-document-meta-recursive -> This allows full recursive read access to metadata of the `$DOCUMENT` folder, including file listing and statistics.", "type": "string", "enum": [ "fs:allow-document-meta-recursive" @@ -3286,14 +3300,14 @@ ] }, { - "description": "fs:allow-download-meta -> This allows read access to metadata of the `$DOWNLOAD` folder, including file listing and statistics.", + "description": "fs:allow-download-meta -> This allows non-recursive 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.", + "description": "fs:allow-download-meta-recursive -> This allows full recursive read access to metadata of the `$DOWNLOAD` folder, including file listing and statistics.", "type": "string", "enum": [ "fs:allow-download-meta-recursive" @@ -3328,14 +3342,14 @@ ] }, { - "description": "fs:allow-exe-meta -> This allows read access to metadata of the `$EXE` folder, including file listing and statistics.", + "description": "fs:allow-exe-meta -> This allows non-recursive 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.", + "description": "fs:allow-exe-meta-recursive -> This allows full recursive read access to metadata of the `$EXE` folder, including file listing and statistics.", "type": "string", "enum": [ "fs:allow-exe-meta-recursive" @@ -3370,14 +3384,14 @@ ] }, { - "description": "fs:allow-font-meta -> This allows read access to metadata of the `$FONT` folder, including file listing and statistics.", + "description": "fs:allow-font-meta -> This allows non-recursive 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.", + "description": "fs:allow-font-meta-recursive -> This allows full recursive read access to metadata of the `$FONT` folder, including file listing and statistics.", "type": "string", "enum": [ "fs:allow-font-meta-recursive" @@ -3412,14 +3426,14 @@ ] }, { - "description": "fs:allow-home-meta -> This allows read access to metadata of the `$HOME` folder, including file listing and statistics.", + "description": "fs:allow-home-meta -> This allows non-recursive 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.", + "description": "fs:allow-home-meta-recursive -> This allows full recursive read access to metadata of the `$HOME` folder, including file listing and statistics.", "type": "string", "enum": [ "fs:allow-home-meta-recursive" @@ -3454,14 +3468,14 @@ ] }, { - "description": "fs:allow-localdata-meta -> This allows read access to metadata of the `$LOCALDATA` folder, including file listing and statistics.", + "description": "fs:allow-localdata-meta -> This allows non-recursive 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.", + "description": "fs:allow-localdata-meta-recursive -> This allows full recursive read access to metadata of the `$LOCALDATA` folder, including file listing and statistics.", "type": "string", "enum": [ "fs:allow-localdata-meta-recursive" @@ -3496,14 +3510,14 @@ ] }, { - "description": "fs:allow-log-meta -> This allows read access to metadata of the `$LOG` folder, including file listing and statistics.", + "description": "fs:allow-log-meta -> This allows non-recursive 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.", + "description": "fs:allow-log-meta-recursive -> This allows full recursive read access to metadata of the `$LOG` folder, including file listing and statistics.", "type": "string", "enum": [ "fs:allow-log-meta-recursive" @@ -3538,14 +3552,14 @@ ] }, { - "description": "fs:allow-picture-meta -> This allows read access to metadata of the `$PICTURE` folder, including file listing and statistics.", + "description": "fs:allow-picture-meta -> This allows non-recursive 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.", + "description": "fs:allow-picture-meta-recursive -> This allows full recursive read access to metadata of the `$PICTURE` folder, including file listing and statistics.", "type": "string", "enum": [ "fs:allow-picture-meta-recursive" @@ -3580,14 +3594,14 @@ ] }, { - "description": "fs:allow-public-meta -> This allows read access to metadata of the `$PUBLIC` folder, including file listing and statistics.", + "description": "fs:allow-public-meta -> This allows non-recursive 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.", + "description": "fs:allow-public-meta-recursive -> This allows full recursive read access to metadata of the `$PUBLIC` folder, including file listing and statistics.", "type": "string", "enum": [ "fs:allow-public-meta-recursive" @@ -3622,14 +3636,14 @@ ] }, { - "description": "fs:allow-resource-meta -> This allows read access to metadata of the `$RESOURCE` folder, including file listing and statistics.", + "description": "fs:allow-resource-meta -> This allows non-recursive 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.", + "description": "fs:allow-resource-meta-recursive -> This allows full recursive read access to metadata of the `$RESOURCE` folder, including file listing and statistics.", "type": "string", "enum": [ "fs:allow-resource-meta-recursive" @@ -3664,14 +3678,14 @@ ] }, { - "description": "fs:allow-runtime-meta -> This allows read access to metadata of the `$RUNTIME` folder, including file listing and statistics.", + "description": "fs:allow-runtime-meta -> This allows non-recursive 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.", + "description": "fs:allow-runtime-meta-recursive -> This allows full recursive read access to metadata of the `$RUNTIME` folder, including file listing and statistics.", "type": "string", "enum": [ "fs:allow-runtime-meta-recursive" @@ -3706,14 +3720,14 @@ ] }, { - "description": "fs:allow-temp-meta -> This allows read access to metadata of the `$TEMP` folder, including file listing and statistics.", + "description": "fs:allow-temp-meta -> This allows non-recursive 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.", + "description": "fs:allow-temp-meta-recursive -> This allows full recursive read access to metadata of the `$TEMP` folder, including file listing and statistics.", "type": "string", "enum": [ "fs:allow-temp-meta-recursive" @@ -3748,14 +3762,14 @@ ] }, { - "description": "fs:allow-template-meta -> This allows read access to metadata of the `$TEMPLATE` folder, including file listing and statistics.", + "description": "fs:allow-template-meta -> This allows non-recursive 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.", + "description": "fs:allow-template-meta-recursive -> This allows full recursive read access to metadata of the `$TEMPLATE` folder, including file listing and statistics.", "type": "string", "enum": [ "fs:allow-template-meta-recursive" @@ -3790,14 +3804,14 @@ ] }, { - "description": "fs:allow-video-meta -> This allows read access to metadata of the `$VIDEO` folder, including file listing and statistics.", + "description": "fs:allow-video-meta -> This allows non-recursive 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.", + "description": "fs:allow-video-meta-recursive -> This allows full recursive read access to metadata of the `$VIDEO` folder, including file listing and statistics.", "type": "string", "enum": [ "fs:allow-video-meta-recursive" @@ -5689,6 +5703,13 @@ "shell:allow-open" ] }, + { + "description": "shell:allow-spawn -> Enables the spawn command without any pre-configured scope.", + "type": "string", + "enum": [ + "shell:allow-spawn" + ] + }, { "description": "shell:allow-stdin-write -> Enables the stdin_write command without any pre-configured scope.", "type": "string", @@ -5717,6 +5738,13 @@ "shell:deny-open" ] }, + { + "description": "shell:deny-spawn -> Denies the spawn command without any pre-configured scope.", + "type": "string", + "enum": [ + "shell:deny-spawn" + ] + }, { "description": "shell:deny-stdin-write -> Denies the stdin_write command without any pre-configured scope.", "type": "string", @@ -6137,6 +6165,13 @@ "window:allow-current-monitor" ] }, + { + "description": "window:allow-cursor-position -> Enables the cursor_position command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-cursor-position" + ] + }, { "description": "window:allow-destroy -> Enables the destroy command without any pre-configured scope.", "type": "string", @@ -6487,6 +6522,13 @@ "window:allow-start-dragging" ] }, + { + "description": "window:allow-start-resize-dragging -> Enables the start_resize_dragging command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:allow-start-resize-dragging" + ] + }, { "description": "window:allow-theme -> Enables the theme command without any pre-configured scope.", "type": "string", @@ -6557,6 +6599,13 @@ "window:deny-current-monitor" ] }, + { + "description": "window:deny-cursor-position -> Denies the cursor_position command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-cursor-position" + ] + }, { "description": "window:deny-destroy -> Denies the destroy command without any pre-configured scope.", "type": "string", @@ -6907,6 +6956,13 @@ "window:deny-start-dragging" ] }, + { + "description": "window:deny-start-resize-dragging -> Denies the start_resize_dragging command without any pre-configured scope.", + "type": "string", + "enum": [ + "window:deny-start-resize-dragging" + ] + }, { "description": "window:deny-theme -> Denies the theme command without any pre-configured scope.", "type": "string", diff --git a/examples/api/src/views/Shortcuts.svelte b/examples/api/src/views/Shortcuts.svelte index cdcc9066d..b2dde459f 100644 --- a/examples/api/src/views/Shortcuts.svelte +++ b/examples/api/src/views/Shortcuts.svelte @@ -12,8 +12,8 @@ function register() { const shortcut_ = shortcut; - registerShortcut(shortcut_, () => { - onMessage(`Shortcut ${shortcut_} triggered`); + registerShortcut(shortcut_, (e) => { + onMessage(`Shortcut ${shortcut_} triggered ${e.state}`); }) .then(() => { shortcuts.update((shortcuts_) => [...shortcuts_, shortcut_]); diff --git a/examples/api/src/views/Updater.svelte b/examples/api/src/views/Updater.svelte index 808e5868e..819c65e0c 100644 --- a/examples/api/src/views/Updater.svelte +++ b/examples/api/src/views/Updater.svelte @@ -12,8 +12,8 @@ isChecking = true; try { const update = await check(); - onMessage(`Should update: ${update.response.available}`); - onMessage(update.response); + onMessage(`Should update: ${update.available}`); + onMessage(update); newUpdate = update; } catch (e) { diff --git a/package.json b/package.json index 230ae45ff..575bb7c88 100644 --- a/package.json +++ b/package.json @@ -13,18 +13,18 @@ "@rollup/plugin-node-resolve": "15.2.3", "@rollup/plugin-terser": "0.4.4", "@rollup/plugin-typescript": "11.1.6", - "@typescript-eslint/eslint-plugin": "7.7.0", - "@typescript-eslint/parser": "7.7.0", + "@typescript-eslint/eslint-plugin": "7.8.0", + "@typescript-eslint/parser": "7.8.0", "covector": "^0.10.2", "eslint": "8.57.0", "eslint-config-prettier": "9.1.0", - "eslint-config-standard-with-typescript": "43.0.1", + "eslint-config-love": "47.0.0", "eslint-plugin-import": "2.29.1", - "eslint-plugin-n": "17.2.1", + "eslint-plugin-n": "17.5.1", "eslint-plugin-promise": "6.1.1", "eslint-plugin-security": "3.0.0", "prettier": "3.2.5", - "rollup": "4.14.3", + "rollup": "4.17.2", "tslib": "2.6.2", "typescript": "5.4.5" }, diff --git a/plugins/authenticator/CHANGELOG.md b/plugins/authenticator/CHANGELOG.md index 5b48ed78e..0147227bb 100644 --- a/plugins/authenticator/CHANGELOG.md +++ b/plugins/authenticator/CHANGELOG.md @@ -2,6 +2,14 @@ ## \[2.0.0-beta.3] +- [`bd1ed590`](https://github.com/tauri-apps/plugins-workspace/commit/bd1ed5903ffcce5500310dac1e59e8c67674ef1e)([#1237](https://github.com/tauri-apps/plugins-workspace/pull/1237)) Update to tauri beta.17. + +## \[2.0.0-beta.4] + +- [`7e2fcc5`](https://github.com/tauri-apps/plugins-workspace/commit/7e2fcc5e74df7c3c718e40f75bfb0eafc7d69d8d)([#1146](https://github.com/tauri-apps/plugins-workspace/pull/1146)) Update dependencies to align with tauri 2.0.0-beta.14. + +## \[2.0.0-beta.3] + - [`a04ea2f`](https://github.com/tauri-apps/plugins-workspace/commit/a04ea2f38294d5a3987578283badc8eec87a7752)([#1071](https://github.com/tauri-apps/plugins-workspace/pull/1071)) The global API script is now only added to the binary when the `withGlobalTauri` config is true. ## \[2.0.0-beta.2] diff --git a/plugins/authenticator/Cargo.toml b/plugins/authenticator/Cargo.toml index 37531f585..8885f796d 100644 --- a/plugins/authenticator/Cargo.toml +++ b/plugins/authenticator/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tauri-plugin-authenticator" -version = "2.0.0-beta.3" +version = "2.0.0-beta.5" description = "Use hardware security-keys in your Tauri App." authors = { workspace = true } license = { workspace = true } @@ -10,11 +10,11 @@ repository = { 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"] } +tauri-plugin = { workspace = true, features = [ "build" ] } [dependencies] serde = { workspace = true } diff --git a/plugins/authenticator/api-iife.js b/plugins/authenticator/api-iife.js index 5a3ceb7dd..7732dcff9 100644 --- a/plugins/authenticator/api-iife.js +++ b/plugins/authenticator/api-iife.js @@ -1 +1 @@ -if("__TAURI__"in window){var __TAURI_PLUGIN_AUTHENTICATOR__=function(t){"use strict";async function i(t,i={},a){return window.__TAURI_INTERNALS__.invoke(t,i,a)}"function"==typeof SuppressedError&&SuppressedError;return t.Authenticator=class{async init(){return await i("plugin:authenticator|init_auth")}async register(t,a){return await i("plugin:authenticator|register",{timeout:1e4,challenge:t,application:a})}async verifyRegistration(t,a,e,n){return await i("plugin:authenticator|verify_registration",{challenge:t,application:a,registerData:e,clientData:n})}async sign(t,a,e){return await i("plugin:authenticator|sign",{timeout:1e4,challenge:t,application:a,keyHandle:e})}async verifySignature(t,a,e,n,r,u){return await i("plugin:authenticator|verify_signature",{challenge:t,application:a,signData:e,clientData:n,keyHandle:r,pubkey:u})}},t}({});Object.defineProperty(window.__TAURI__,"authenticator",{value:__TAURI_PLUGIN_AUTHENTICATOR__})} +if("__TAURI__"in window){var __TAURI_PLUGIN_AUTHENTICATOR__=function(t){"use strict";async function i(t,i={},a){return window.__TAURI_INTERNALS__.invoke(t,i,a)}"function"==typeof SuppressedError&&SuppressedError;return t.Authenticator=class{async init(){await i("plugin:authenticator|init_auth")}async register(t,a){return await i("plugin:authenticator|register",{timeout:1e4,challenge:t,application:a})}async verifyRegistration(t,a,e,n){return await i("plugin:authenticator|verify_registration",{challenge:t,application:a,registerData:e,clientData:n})}async sign(t,a,e){return await i("plugin:authenticator|sign",{timeout:1e4,challenge:t,application:a,keyHandle:e})}async verifySignature(t,a,e,n,r,u){return await i("plugin:authenticator|verify_signature",{challenge:t,application:a,signData:e,clientData:n,keyHandle:r,pubkey:u})}},t}({});Object.defineProperty(window.__TAURI__,"authenticator",{value:__TAURI_PLUGIN_AUTHENTICATOR__})} diff --git a/plugins/authenticator/guest-js/index.ts b/plugins/authenticator/guest-js/index.ts index b1446eea1..bbd45e9ff 100644 --- a/plugins/authenticator/guest-js/index.ts +++ b/plugins/authenticator/guest-js/index.ts @@ -6,7 +6,7 @@ import { invoke } from "@tauri-apps/api/core"; export class Authenticator { async init(): Promise { - return await invoke("plugin:authenticator|init_auth"); + await invoke("plugin:authenticator|init_auth"); } async register(challenge: string, application: string): Promise { diff --git a/plugins/authenticator/package.json b/plugins/authenticator/package.json index 20b928c89..46a521848 100644 --- a/plugins/authenticator/package.json +++ b/plugins/authenticator/package.json @@ -1,6 +1,6 @@ { "name": "@tauri-apps/plugin-authenticator", - "version": "2.0.0-beta.2", + "version": "2.0.0-beta.3", "description": "Use hardware security-keys in your Tauri App.", "license": "MIT or APACHE-2.0", "authors": [ @@ -24,6 +24,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-beta.6" + "@tauri-apps/api": "2.0.0-beta.11" } } diff --git a/plugins/autostart/CHANGELOG.md b/plugins/autostart/CHANGELOG.md index 9a7b98882..76d63ad72 100644 --- a/plugins/autostart/CHANGELOG.md +++ b/plugins/autostart/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## \[2.0.0-beta.3] + +- [`bd1ed590`](https://github.com/tauri-apps/plugins-workspace/commit/bd1ed5903ffcce5500310dac1e59e8c67674ef1e)([#1237](https://github.com/tauri-apps/plugins-workspace/pull/1237)) Update to tauri beta.17. + ## \[2.0.0-beta.4] - [`a233919`](https://github.com/tauri-apps/plugins-workspace/commit/a2339195aa940bff86d76375fd05087595bf06ce)([#1118](https://github.com/tauri-apps/plugins-workspace/pull/1118)) Fix LaunchAgent-based autostart for macOS. diff --git a/plugins/autostart/Cargo.toml b/plugins/autostart/Cargo.toml index f83ed1897..1d93f54b8 100644 --- a/plugins/autostart/Cargo.toml +++ b/plugins/autostart/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tauri-plugin-autostart" -version = "2.0.0-beta.4" +version = "2.0.0-beta.5" description = "Automatically launch your application at startup." authors = { workspace = true } license = { workspace = true } @@ -10,11 +10,11 @@ repository = { workspace = true } links = "tauri-plugin-autostart" [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"] } +tauri-plugin = { workspace = true, features = [ "build" ] } [dependencies] serde = { workspace = true } diff --git a/plugins/autostart/package.json b/plugins/autostart/package.json index 6f54d5128..fd2b7f0b4 100644 --- a/plugins/autostart/package.json +++ b/plugins/autostart/package.json @@ -1,6 +1,6 @@ { "name": "@tauri-apps/plugin-autostart", - "version": "2.0.0-beta.2", + "version": "2.0.0-beta.3", "license": "MIT or APACHE-2.0", "authors": [ "Tauri Programme within The Commons Conservancy" @@ -23,6 +23,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-beta.6" + "@tauri-apps/api": "2.0.0-beta.11" } } diff --git a/plugins/barcode-scanner/CHANGELOG.md b/plugins/barcode-scanner/CHANGELOG.md index efa281e42..d43de64b6 100644 --- a/plugins/barcode-scanner/CHANGELOG.md +++ b/plugins/barcode-scanner/CHANGELOG.md @@ -2,6 +2,14 @@ ## \[2.0.0-beta.3] +- [`bd1ed590`](https://github.com/tauri-apps/plugins-workspace/commit/bd1ed5903ffcce5500310dac1e59e8c67674ef1e)([#1237](https://github.com/tauri-apps/plugins-workspace/pull/1237)) Update to tauri beta.17. + +## \[2.0.0-beta.4] + +- [`326df688`](https://github.com/tauri-apps/plugins-workspace/commit/326df6883998d416fc0837583ed972854628bb52)([#1236](https://github.com/tauri-apps/plugins-workspace/pull/1236)) Fixes command argument parsing on iOS. + +## \[2.0.0-beta.3] + - [`a04ea2f`](https://github.com/tauri-apps/plugins-workspace/commit/a04ea2f38294d5a3987578283badc8eec87a7752)([#1071](https://github.com/tauri-apps/plugins-workspace/pull/1071)) The global API script is now only added to the binary when the `withGlobalTauri` config is true. ## \[2.0.0-beta.2] diff --git a/plugins/barcode-scanner/Cargo.toml b/plugins/barcode-scanner/Cargo.toml index b4fe6438d..fae14e1b8 100644 --- a/plugins/barcode-scanner/Cargo.toml +++ b/plugins/barcode-scanner/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tauri-plugin-barcode-scanner" -version = "2.0.0-beta.3" +version = "2.0.0-beta.5" description = "Scan QR codes, EAN-13 and other kinds of barcodes on Android and iOS" edition = { workspace = true } authors = { workspace = true } @@ -10,12 +10,12 @@ repository = { 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-plugin = { workspace = true, features = ["build"] } +tauri-plugin = { workspace = true, features = [ "build" ] } [dependencies] serde = { workspace = true } diff --git a/plugins/barcode-scanner/api-iife.js b/plugins/barcode-scanner/api-iife.js index 77c9d45cc..3c812baae 100644 --- a/plugins/barcode-scanner/api-iife.js +++ b/plugins/barcode-scanner/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: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__})} +if("__TAURI__"in window){var __TAURI_PLUGIN_BARCODESCANNER__=function(n){"use strict";async function e(n,e={},a){return window.__TAURI_INTERNALS__.invoke(n,e,a)}var a;return"function"==typeof SuppressedError&&SuppressedError,n.Format=void 0,(a=n.Format||(n.Format={})).QRCode="QR_CODE",a.UPC_A="UPC_A",a.UPC_E="UPC_E",a.EAN8="EAN_8",a.EAN13="EAN_13",a.Code39="CODE_39",a.Code93="CODE_93",a.Code128="CODE_128",a.Codabar="CODABAR",a.ITF="ITF",a.Aztec="AZTEC",a.DataMatrix="DATA_MATRIX",a.PDF417="PDF_417",n.cancel=async function(){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(){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/guest-js/index.ts b/plugins/barcode-scanner/guest-js/index.ts index 8e964420f..d766e0dc1 100644 --- a/plugins/barcode-scanner/guest-js/index.ts +++ b/plugins/barcode-scanner/guest-js/index.ts @@ -46,7 +46,7 @@ export async function scan(options?: ScanOptions): Promise { * Cancel the current scan process. */ export async function cancel(): Promise { - return await invoke("plugin:barcode-scanner|cancel"); + await invoke("plugin:barcode-scanner|cancel"); } /** @@ -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:barcode-scanner|open_app_settings"); + await invoke("plugin:barcode-scanner|open_app_settings"); } diff --git a/plugins/barcode-scanner/ios/Sources/BarcodeScannerPlugin.swift b/plugins/barcode-scanner/ios/Sources/BarcodeScannerPlugin.swift index 7a329e374..ec16ad594 100644 --- a/plugins/barcode-scanner/ios/Sources/BarcodeScannerPlugin.swift +++ b/plugins/barcode-scanner/ios/Sources/BarcodeScannerPlugin.swift @@ -8,7 +8,7 @@ import UIKit import WebKit struct ScanOptions: Decodable { - var formats: [SupportedFormat] = [] + var formats: [SupportedFormat]? let windowed: Bool? let cameraDirection: String? } @@ -241,7 +241,7 @@ class BarcodeScannerPlugin: Plugin, AVCaptureMetadataOutputObjectsDelegate { private func runScanner(_ invoke: Invoke, args: ScanOptions) { scanFormats = [AVMetadataObject.ObjectType]() - args.formats.forEach { format in + (args.formats ?? []).forEach { format in scanFormats.append(format.value) } diff --git a/plugins/barcode-scanner/package.json b/plugins/barcode-scanner/package.json index 4af05dca8..3d0efdea3 100644 --- a/plugins/barcode-scanner/package.json +++ b/plugins/barcode-scanner/package.json @@ -1,6 +1,6 @@ { "name": "@tauri-apps/plugin-barcode-scanner", - "version": "2.0.0-beta.2", + "version": "2.0.0-beta.3", "description": "Scan QR codes, EAN-13 and other kinds of barcodes on Android and iOS", "license": "MIT or APACHE-2.0", "authors": [ @@ -24,6 +24,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-beta.6" + "@tauri-apps/api": "2.0.0-beta.11" } } diff --git a/plugins/biometric/CHANGELOG.md b/plugins/biometric/CHANGELOG.md index 2b58b001f..1172b4673 100644 --- a/plugins/biometric/CHANGELOG.md +++ b/plugins/biometric/CHANGELOG.md @@ -2,6 +2,10 @@ ## \[2.0.0-beta.3] +- [`bd1ed590`](https://github.com/tauri-apps/plugins-workspace/commit/bd1ed5903ffcce5500310dac1e59e8c67674ef1e)([#1237](https://github.com/tauri-apps/plugins-workspace/pull/1237)) Update to tauri beta.17. + +## \[2.0.0-beta.3] + - [`a04ea2f`](https://github.com/tauri-apps/plugins-workspace/commit/a04ea2f38294d5a3987578283badc8eec87a7752)([#1071](https://github.com/tauri-apps/plugins-workspace/pull/1071)) The global API script is now only added to the binary when the `withGlobalTauri` config is true. ## \[2.0.0-beta.2] diff --git a/plugins/biometric/Cargo.toml b/plugins/biometric/Cargo.toml index c1519f299..b9002972e 100644 --- a/plugins/biometric/Cargo.toml +++ b/plugins/biometric/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tauri-plugin-biometric" -version = "2.0.0-beta.3" +version = "2.0.0-beta.4" description = "Prompt the user for biometric authentication on Android and iOS." edition = { workspace = true } authors = { workspace = true } @@ -9,11 +9,11 @@ repository = { workspace = true } links = "tauri-plugin-biometric" [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"] } +tauri-plugin = { workspace = true, features = [ "build" ] } [dependencies] serde = { workspace = true } diff --git a/plugins/biometric/api-iife.js b/plugins/biometric/api-iife.js index 450585b53..3da2296ba 100644 --- a/plugins/biometric/api-iife.js +++ b/plugins/biometric/api-iife.js @@ -1 +1 @@ -if("__TAURI__"in window){var __TAURI_PLUGIN_BIOMETRIC__=function(e){"use strict";async function n(e,n={},r){return window.__TAURI_INTERNALS__.invoke(e,n,r)}var r;return"function"==typeof SuppressedError&&SuppressedError,e.BiometryType=void 0,(r=e.BiometryType||(e.BiometryType={}))[r.None=0]="None",r[r.TouchID=1]="TouchID",r[r.FaceID=2]="FaceID",r[r.Iris=3]="Iris",e.authenticate=async function(e,r){return n("plugin:biometric|authenticate",{reason:e,...r})},e.checkStatus=async function(){return n("plugin:biometric|status")},e}({});Object.defineProperty(window.__TAURI__,"biometric",{value:__TAURI_PLUGIN_BIOMETRIC__})} +if("__TAURI__"in window){var __TAURI_PLUGIN_BIOMETRIC__=function(e){"use strict";async function i(e,i={},t){return window.__TAURI_INTERNALS__.invoke(e,i,t)}var t;return"function"==typeof SuppressedError&&SuppressedError,e.BiometryType=void 0,(t=e.BiometryType||(e.BiometryType={}))[t.None=0]="None",t[t.TouchID=1]="TouchID",t[t.FaceID=2]="FaceID",t[t.Iris=3]="Iris",e.authenticate=async function(e,t){await i("plugin:biometric|authenticate",{reason:e,...t})},e.checkStatus=async function(){return await i("plugin:biometric|status")},e}({});Object.defineProperty(window.__TAURI__,"biometric",{value:__TAURI_PLUGIN_BIOMETRIC__})} diff --git a/plugins/biometric/guest-js/index.ts b/plugins/biometric/guest-js/index.ts index 16ab38077..3ff26d0ba 100644 --- a/plugins/biometric/guest-js/index.ts +++ b/plugins/biometric/guest-js/index.ts @@ -51,7 +51,7 @@ export interface AuthOptions { * @returns a promise resolving to an object containing all the information about the status of the biometry. */ export async function checkStatus(): Promise { - return invoke("plugin:biometric|status"); + return await invoke("plugin:biometric|status"); } /** @@ -70,7 +70,7 @@ export async function authenticate( reason: string, options?: AuthOptions, ): Promise { - return invoke("plugin:biometric|authenticate", { + await invoke("plugin:biometric|authenticate", { reason, ...options, }); diff --git a/plugins/biometric/package.json b/plugins/biometric/package.json index d9ebd7ecb..a3f1bde29 100644 --- a/plugins/biometric/package.json +++ b/plugins/biometric/package.json @@ -1,6 +1,6 @@ { "name": "@tauri-apps/plugin-biometric", - "version": "2.0.0-beta.2", + "version": "2.0.0-beta.3", "license": "MIT or APACHE-2.0", "authors": [ "Tauri Programme within The Commons Conservancy" @@ -24,6 +24,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-beta.6" + "@tauri-apps/api": "2.0.0-beta.11" } } diff --git a/plugins/cli/CHANGELOG.md b/plugins/cli/CHANGELOG.md index 5b48ed78e..ab644c9fd 100644 --- a/plugins/cli/CHANGELOG.md +++ b/plugins/cli/CHANGELOG.md @@ -2,6 +2,10 @@ ## \[2.0.0-beta.3] +- [`bd1ed590`](https://github.com/tauri-apps/plugins-workspace/commit/bd1ed5903ffcce5500310dac1e59e8c67674ef1e)([#1237](https://github.com/tauri-apps/plugins-workspace/pull/1237)) Update to tauri beta.17. + +## \[2.0.0-beta.3] + - [`a04ea2f`](https://github.com/tauri-apps/plugins-workspace/commit/a04ea2f38294d5a3987578283badc8eec87a7752)([#1071](https://github.com/tauri-apps/plugins-workspace/pull/1071)) The global API script is now only added to the binary when the `withGlobalTauri` config is true. ## \[2.0.0-beta.2] diff --git a/plugins/cli/Cargo.toml b/plugins/cli/Cargo.toml index 43d23b86a..7d8de1b3c 100644 --- a/plugins/cli/Cargo.toml +++ b/plugins/cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tauri-plugin-cli" -version = "2.0.0-beta.3" +version = "2.0.0-beta.4" description = "Parse arguments from your Tauri application's command line interface." edition = { workspace = true } authors = { workspace = true } @@ -10,11 +10,11 @@ repository = { workspace = true } links = "tauri-plugin-cli" [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"] } +tauri-plugin = { workspace = true, features = [ "build" ] } [dependencies] serde = { workspace = true } @@ -22,4 +22,4 @@ serde_json = { workspace = true } tauri = { workspace = true } log = { workspace = true } thiserror = { workspace = true } -clap = { version = "4", features = ["string"] } +clap = { version = "4", features = [ "string" ] } diff --git a/plugins/cli/package.json b/plugins/cli/package.json index a43cfb201..bb141b45a 100644 --- a/plugins/cli/package.json +++ b/plugins/cli/package.json @@ -1,6 +1,6 @@ { "name": "@tauri-apps/plugin-cli", - "version": "2.0.0-beta.2", + "version": "2.0.0-beta.3", "license": "MIT or APACHE-2.0", "authors": [ "Tauri Programme within The Commons Conservancy" @@ -23,6 +23,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-beta.6" + "@tauri-apps/api": "2.0.0-beta.11" } } diff --git a/plugins/clipboard-manager/CHANGELOG.md b/plugins/clipboard-manager/CHANGELOG.md index c7ea50671..cb9c6eece 100644 --- a/plugins/clipboard-manager/CHANGELOG.md +++ b/plugins/clipboard-manager/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## \[2.1.0-beta.1] + +- [`bd1ed590`](https://github.com/tauri-apps/plugins-workspace/commit/bd1ed5903ffcce5500310dac1e59e8c67674ef1e)([#1237](https://github.com/tauri-apps/plugins-workspace/pull/1237)) Update to tauri beta.17. + +## \[2.1.0-beta.1] + +- [`27b258c`](https://github.com/tauri-apps/plugins-workspace/commit/27b258cf31ae5557c99ae66537fb9196368d4d8b)([#1185](https://github.com/tauri-apps/plugins-workspace/pull/1185)) Expose `Clipboard` struct +- [`e3d41f4`](https://github.com/tauri-apps/plugins-workspace/commit/e3d41f4011bd3ea3ce281bb38bbe31d3709f8e0f)([#1191](https://github.com/tauri-apps/plugins-workspace/pull/1191)) Internally use the webview scoped resources table instead of the app one, so other webviews can't access other webviews resources. +- [`e3d41f4`](https://github.com/tauri-apps/plugins-workspace/commit/e3d41f4011bd3ea3ce281bb38bbe31d3709f8e0f)([#1191](https://github.com/tauri-apps/plugins-workspace/pull/1191)) Update for tauri 2.0.0-beta.15. + ## \[2.1.0-beta.0] - [`9dec960`](https://github.com/tauri-apps/plugins-workspace/commit/9dec9605ed1ce19dbef697e55debddf9008ecba1)([#845](https://github.com/tauri-apps/plugins-workspace/pull/845)) Add support for `read_image` and `write_image` to the clipboard plugin (desktop). @@ -51,7 +61,15 @@ - [`717ae67`](https://github.com/tauri-apps/plugins-workspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! 717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! -`](https://github.com/tauri-apps/plugins-workspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! + \`]\(https://github.com/tauri-apps/plugins-workspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! + te to alpha.11. + +## \[2.0.0-alpha.0] + +- [`717ae67`](https://github.com/tauri-apps/plugins-workspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! + 717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! +hub.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! + \`]\(https://github.com/tauri-apps/plugins-workspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! te to alpha.11. ## \[2.0.0-alpha.0] diff --git a/plugins/clipboard-manager/Cargo.toml b/plugins/clipboard-manager/Cargo.toml index 68add9426..419aa51d4 100644 --- a/plugins/clipboard-manager/Cargo.toml +++ b/plugins/clipboard-manager/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tauri-plugin-clipboard-manager" -version = "2.1.0-beta.0" +version = "2.1.0-beta.2" description = "Read and write to the system clipboard." edition = { workspace = true } authors = { workspace = true } @@ -10,12 +10,12 @@ repository = { 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-plugin = { workspace = true, features = ["build"] } +tauri-plugin = { workspace = true, features = [ "build" ] } [dependencies] serde = { workspace = true } diff --git a/plugins/clipboard-manager/api-iife.js b/plugins/clipboard-manager/api-iife.js index 82f025778..e2b2f6e3e 100644 --- a/plugins/clipboard-manager/api-iife.js +++ b/plugins/clipboard-manager/api-iife.js @@ -1 +1 @@ -if("__TAURI__"in window){var __TAURI_PLUGIN_CLIPBOARDMANAGER__=function(e){"use strict";var r;async function t(e,r={},t){return window.__TAURI_INTERNALS__.invoke(e,r,t)}"function"==typeof SuppressedError&&SuppressedError;class n{get rid(){return function(e,r,t,n){if("a"===t&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof r?e!==r||!n:!r.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===t?n:"a"===t?n.call(e):n?n.value:r.get(e)}(this,r,"f")}constructor(e){r.set(this,void 0),function(e,r,t,n,a){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!a)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof r?e!==r||!a:!r.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===n?a.call(e,t):a?a.value=t:r.set(e,t)}(this,r,e,"f")}async close(){return t("plugin:resources|close",{rid:this.rid})}}r=new WeakMap;class a extends n{constructor(e){super(e)}static async new(e,r,n){return t("plugin:image|new",{rgba:i(e),width:r,height:n}).then((e=>new a(e)))}static async fromBytes(e){return t("plugin:image|from_bytes",{bytes:i(e)}).then((e=>new a(e)))}static async fromPath(e){return t("plugin:image|from_path",{path:e}).then((e=>new a(e)))}async rgba(){return t("plugin:image|rgba",{rid:this.rid}).then((e=>new Uint8Array(e)))}async size(){return t("plugin:image|size",{rid:this.rid})}}function i(e){return null==e?null:"string"==typeof e?e:e instanceof Uint8Array?Array.from(e):e instanceof ArrayBuffer?Array.from(new Uint8Array(e)):e instanceof a?e.rid:e}return e.clear=async function(){await t("plugin:clipboard-manager|clear")},e.readImage=async function(){return await t("plugin:clipboard-manager|read_image").then((e=>new a(e)))},e.readText=async function(){return(await t("plugin:clipboard-manager|read_text")).plainText.text},e.writeHtml=async function(e,r){return t("plugin:clipboard-manager|write_html",{data:{html:{html:e,altHtml:r}}})},e.writeImage=async function(e){return t("plugin:clipboard-manager|write_image",{data:{image:{image:i(e)}}})},e.writeText=async function(e,r){return t("plugin:clipboard-manager|write_text",{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";var r;async function t(e,r={},t){return window.__TAURI_INTERNALS__.invoke(e,r,t)}"function"==typeof SuppressedError&&SuppressedError;class n{get rid(){return function(e,r,t,n){if("a"===t&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof r?e!==r||!n:!r.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===t?n:"a"===t?n.call(e):n?n.value:r.get(e)}(this,r,"f")}constructor(e){r.set(this,void 0),function(e,r,t,n,a){if("function"==typeof r?e!==r||!a:!r.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");r.set(e,t)}(this,r,e)}async close(){return t("plugin:resources|close",{rid:this.rid})}}r=new WeakMap;class a extends n{constructor(e){super(e)}static async new(e,r,n){return t("plugin:image|new",{rgba:i(e),width:r,height:n}).then((e=>new a(e)))}static async fromBytes(e){return t("plugin:image|from_bytes",{bytes:i(e)}).then((e=>new a(e)))}static async fromPath(e){return t("plugin:image|from_path",{path:e}).then((e=>new a(e)))}async rgba(){return t("plugin:image|rgba",{rid:this.rid}).then((e=>new Uint8Array(e)))}async size(){return t("plugin:image|size",{rid:this.rid})}}function i(e){return null==e?null:"string"==typeof e?e:e instanceof Uint8Array?Array.from(e):e instanceof ArrayBuffer?Array.from(new Uint8Array(e)):e instanceof a?e.rid:e}return e.clear=async function(){await t("plugin:clipboard-manager|clear")},e.readImage=async function(){return await t("plugin:clipboard-manager|read_image").then((e=>new a(e)))},e.readText=async function(){return await t("plugin:clipboard-manager|read_text")},e.writeHtml=async function(e,r){await t("plugin:clipboard-manager|write_html",{html:e,altHtml:r})},e.writeImage=async function(e){await t("plugin:clipboard-manager|write_image",{image:i(e)})},e.writeText=async function(e,r){await t("plugin:clipboard-manager|write_text",{label:r?.label,text:e})},e}({});Object.defineProperty(window.__TAURI__,"clipboardManager",{value:__TAURI_PLUGIN_CLIPBOARDMANAGER__})} diff --git a/plugins/clipboard-manager/guest-js/index.ts b/plugins/clipboard-manager/guest-js/index.ts index 9e6a5de83..ad261cbe6 100644 --- a/plugins/clipboard-manager/guest-js/index.ts +++ b/plugins/clipboard-manager/guest-js/index.ts @@ -11,8 +11,6 @@ import { invoke } from "@tauri-apps/api/core"; import { Image, transformImage } from "@tauri-apps/api/image"; -type ClipResponse = Record<"plainText", { text: string }>; - /** * Writes plain text to the clipboard. * @example @@ -30,13 +28,9 @@ async function writeText( text: string, opts?: { label?: string }, ): Promise { - return invoke("plugin:clipboard-manager|write_text", { - data: { - plainText: { - label: opts?.label, - text, - }, - }, + await invoke("plugin:clipboard-manager|write_text", { + label: opts?.label, + text, }); } @@ -50,26 +44,7 @@ async function writeText( * @since 2.0.0 */ async function readText(): Promise { - const kind: ClipResponse = await invoke("plugin:clipboard-manager|read_text"); - return kind.plainText.text; -} - -/** - * Gets the clipboard content as Uint8Array image. - * @example - * ```typescript - * import { readImage } from '@tauri-apps/plugin-clipboard-manager'; - * - * const clipboardImage = await readImage(); - * const blob = new Blob([clipboardImage.bytes], { type: 'image' }) - * const url = URL.createObjectURL(blob) - * ``` - * @since 2.0.0 - */ -async function readImage(): Promise { - return await invoke("plugin:clipboard-manager|read_image").then( - (rid) => new Image(rid), - ); + return await invoke("plugin:clipboard-manager|read_text"); } /** @@ -93,15 +68,29 @@ async function readImage(): Promise { async function writeImage( image: string | Image | Uint8Array | ArrayBuffer | number[], ): Promise { - return invoke("plugin:clipboard-manager|write_image", { - data: { - image: { - image: transformImage(image), - }, - }, + await invoke("plugin:clipboard-manager|write_image", { + image: transformImage(image), }); } +/** + * Gets the clipboard content as Uint8Array image. + * @example + * ```typescript + * import { readImage } from '@tauri-apps/plugin-clipboard-manager'; + * + * const clipboardImage = await readImage(); + * const blob = new Blob([clipboardImage.bytes], { type: 'image' }) + * const url = URL.createObjectURL(blob) + * ``` + * @since 2.0.0 + */ +async function readImage(): Promise { + return await invoke("plugin:clipboard-manager|read_image").then( + (rid) => new Image(rid), + ); +} + /** * * Writes HTML or fallbacks to write provided plain text to the clipboard. * @example @@ -117,13 +106,9 @@ async function writeImage( * @since 2.0.0 */ async function writeHtml(html: string, altHtml?: string): Promise { - return invoke("plugin:clipboard-manager|write_html", { - data: { - html: { - html, - altHtml, - }, - }, + await invoke("plugin:clipboard-manager|write_html", { + html, + altHtml, }); } @@ -138,7 +123,6 @@ async function writeHtml(html: string, altHtml?: string): Promise { */ async function clear(): Promise { await invoke("plugin:clipboard-manager|clear"); - return; } export { writeText, readText, writeHtml, clear, readImage, writeImage }; diff --git a/plugins/clipboard-manager/package.json b/plugins/clipboard-manager/package.json index d0bc6db2f..41afa72ff 100644 --- a/plugins/clipboard-manager/package.json +++ b/plugins/clipboard-manager/package.json @@ -1,6 +1,6 @@ { "name": "@tauri-apps/plugin-clipboard-manager", - "version": "2.1.0-beta.0", + "version": "2.1.0-beta.1", "license": "MIT or APACHE-2.0", "authors": [ "Tauri Programme within The Commons Conservancy" @@ -23,6 +23,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-beta.6" + "@tauri-apps/api": "2.0.0-beta.11" } } diff --git a/plugins/clipboard-manager/src/commands.rs b/plugins/clipboard-manager/src/commands.rs index e9a630d4a..a8dd94ac0 100644 --- a/plugins/clipboard-manager/src/commands.rs +++ b/plugins/clipboard-manager/src/commands.rs @@ -2,43 +2,61 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT -use tauri::{command, AppHandle, Manager, ResourceId, Runtime, State}; +use tauri::{command, image::JsImage, AppHandle, Manager, ResourceId, Runtime, State, Webview}; -use crate::{ClipKind, Clipboard, ClipboardContents, Result}; +use crate::{Clipboard, Result}; #[command] +#[cfg(desktop)] pub(crate) async fn write_text( _app: AppHandle, clipboard: State<'_, Clipboard>, - data: ClipKind, + text: &str, + #[allow(unused)] label: Option, ) -> Result<()> { - clipboard.write_text(data) + clipboard.write_text(text) } #[command] -pub(crate) async fn write_image( +#[cfg(not(desktop))] +pub(crate) async fn write_text( _app: AppHandle, clipboard: State<'_, Clipboard>, - data: ClipKind, + text: &str, + #[allow(unused)] label: Option<&str>, ) -> Result<()> { - clipboard.write_image(data) + match label { + Some(label) => clipboard.write_text_with_label(text, label), + None => clipboard.write_text(text), + } } #[command] pub(crate) async fn read_text( _app: AppHandle, clipboard: State<'_, Clipboard>, -) -> Result { +) -> Result { clipboard.read_text() } +#[command] +pub(crate) async fn write_image( + webview: Webview, + clipboard: State<'_, Clipboard>, + image: JsImage, +) -> Result<()> { + let resources_table = webview.resources_table(); + let image = image.into_img(&resources_table)?; + clipboard.write_image(&image) +} + #[command] pub(crate) async fn read_image( - app: AppHandle, + webview: Webview, clipboard: State<'_, Clipboard>, ) -> Result { let image = clipboard.read_image()?.to_owned(); - let mut resources_table = app.resources_table(); + let mut resources_table = webview.resources_table(); let rid = resources_table.add(image); Ok(rid) } @@ -47,9 +65,10 @@ pub(crate) async fn read_image( pub(crate) async fn write_html( _app: AppHandle, clipboard: State<'_, Clipboard>, - data: ClipKind, + html: &str, + alt_text: Option<&str>, ) -> Result<()> { - clipboard.write_html(data) + clipboard.write_html(html, alt_text) } #[command] diff --git a/plugins/clipboard-manager/src/desktop.rs b/plugins/clipboard-manager/src/desktop.rs index bcd15027a..899a5b1c6 100644 --- a/plugins/clipboard-manager/src/desktop.rs +++ b/plugins/clipboard-manager/src/desktop.rs @@ -7,8 +7,6 @@ use image::ImageEncoder; use serde::de::DeserializeOwned; use tauri::{image::Image, plugin::PluginApi, AppHandle, Runtime}; -use crate::models::*; - use std::{borrow::Cow, sync::Mutex}; pub fn init( @@ -29,58 +27,50 @@ pub struct Clipboard { } impl Clipboard { - pub fn write_text(&self, kind: ClipKind) -> crate::Result<()> { - match kind { - ClipKind::PlainText { text, .. } => match &self.clipboard { - Ok(clipboard) => clipboard.lock().unwrap().set_text(text).map_err(Into::into), - Err(e) => Err(crate::Error::Clipboard(e.to_string())), - }, - _ => Err(crate::Error::Clipboard("Invalid clip kind".to_string())), + pub fn write_text<'a, T: Into>>(&self, text: T) -> crate::Result<()> { + match &self.clipboard { + Ok(clipboard) => clipboard.lock().unwrap().set_text(text).map_err(Into::into), + Err(e) => Err(crate::Error::Clipboard(e.to_string())), } } - pub fn write_image(&self, kind: ClipKind) -> crate::Result<()> { - match kind { - ClipKind::Image { image, .. } => match &self.clipboard { - Ok(clipboard) => { - let image = image.into_img(&self.app)?; - clipboard - .lock() - .unwrap() - .set_image(ImageData { - bytes: Cow::Borrowed(image.rgba()), - width: image.width() as usize, - height: image.height() as usize, - }) - .map_err(Into::into) - } - Err(e) => Err(crate::Error::Clipboard(e.to_string())), - }, - _ => Err(crate::Error::Clipboard("Invalid clip kind".to_string())), + pub fn write_image(&self, image: &Image<'_>) -> crate::Result<()> { + match &self.clipboard { + Ok(clipboard) => clipboard + .lock() + .unwrap() + .set_image(ImageData { + bytes: Cow::Borrowed(image.rgba()), + width: image.width() as usize, + height: image.height() as usize, + }) + .map_err(Into::into), + Err(e) => Err(crate::Error::Clipboard(e.to_string())), } } - pub fn read_text(&self) -> crate::Result { + pub fn read_text(&self) -> crate::Result { match &self.clipboard { Ok(clipboard) => { let text = clipboard.lock().unwrap().get_text()?; - Ok(ClipboardContents::PlainText { text }) + Ok(text) } Err(e) => Err(crate::Error::Clipboard(e.to_string())), } } - pub fn write_html(&self, kind: ClipKind) -> crate::Result<()> { - match kind { - ClipKind::Html { html, alt_html, .. } => match &self.clipboard { - Ok(clipboard) => clipboard - .lock() - .unwrap() - .set_html(html, alt_html) - .map_err(Into::into), - Err(e) => Err(crate::Error::Clipboard(e.to_string())), - }, - _ => Err(crate::Error::Clipboard("Invalid clip kind!".to_string())), + pub fn write_html<'a, T: Into>>( + &self, + html: T, + alt_text: Option, + ) -> crate::Result<()> { + match &self.clipboard { + Ok(clipboard) => clipboard + .lock() + .unwrap() + .set_html(html, alt_text) + .map_err(Into::into), + Err(e) => Err(crate::Error::Clipboard(e.to_string())), } } diff --git a/plugins/clipboard-manager/src/error.rs b/plugins/clipboard-manager/src/error.rs index ce9f1be9f..7e36a11bc 100644 --- a/plugins/clipboard-manager/src/error.rs +++ b/plugins/clipboard-manager/src/error.rs @@ -13,7 +13,6 @@ pub enum Error { PluginInvoke(#[from] tauri::plugin::mobile::PluginInvokeError), #[error("{0}")] Clipboard(String), - #[cfg(desktop)] #[error(transparent)] Tauri(#[from] tauri::Error), #[cfg(desktop)] diff --git a/plugins/clipboard-manager/src/lib.rs b/plugins/clipboard-manager/src/lib.rs index 3ebf0ad40..3924d7f1e 100644 --- a/plugins/clipboard-manager/src/lib.rs +++ b/plugins/clipboard-manager/src/lib.rs @@ -16,8 +16,6 @@ use tauri::{ Manager, Runtime, }; -pub use models::*; - #[cfg(desktop)] mod desktop; #[cfg(mobile)] @@ -25,7 +23,6 @@ mod mobile; mod commands; mod error; -mod models; pub use error::{Error, Result}; diff --git a/plugins/clipboard-manager/src/mobile.rs b/plugins/clipboard-manager/src/mobile.rs index cb4ea6828..c5547abd8 100644 --- a/plugins/clipboard-manager/src/mobile.rs +++ b/plugins/clipboard-manager/src/mobile.rs @@ -3,13 +3,14 @@ // SPDX-License-Identifier: MIT use serde::de::DeserializeOwned; +use serde::{Deserialize, Serialize}; use tauri::{ image::Image, plugin::{PluginApi, PluginHandle}, AppHandle, Runtime, }; -use crate::models::*; +use std::borrow::Cow; #[cfg(target_os = "android")] const PLUGIN_IDENTIFIER: &str = "app.tauri.clipboard"; @@ -33,18 +34,44 @@ pub fn init( pub struct Clipboard(PluginHandle); impl Clipboard { - pub fn write_text(&self, kind: ClipKind) -> crate::Result<()> { - self.0.run_mobile_plugin("write", kind).map_err(Into::into) + pub fn write_text<'a, T: Into>>(&self, text: T) -> crate::Result<()> { + let text = text.into().to_string(); + self.0 + .run_mobile_plugin("write", ClipKind::PlainText { text, label: None }) + .map_err(Into::into) } - pub fn write_image(&self, kind: ClipKind) -> crate::Result<()> { + pub fn write_text_with_label<'a, T: Into>>( + &self, + text: T, + label: T, + ) -> crate::Result<()> { + let text = text.into().to_string(); + let label = label.into().to_string(); + self.0 + .run_mobile_plugin( + "write", + ClipKind::PlainText { + text, + label: Some(label), + }, + ) + .map_err(Into::into) + } + + pub fn write_image(&self, _image: &Image<'_>) -> crate::Result<()> { Err(crate::Error::Clipboard( "Unsupported on this platform".to_string(), )) } - pub fn read_text(&self) -> crate::Result { - self.0.run_mobile_plugin("read", ()).map_err(Into::into) + pub fn read_text(&self) -> crate::Result { + self.0 + .run_mobile_plugin("read", ()) + .map(|c| match c { + ClipboardContents::PlainText { text } => text, + }) + .map_err(Into::into) } pub fn read_image(&self) -> crate::Result> { @@ -54,7 +81,11 @@ impl Clipboard { } // Treat HTML as unsupported on mobile until tested - pub fn write_html(&self, _kind: ClipKind) -> crate::Result<()> { + pub fn write_html<'a, T: Into>>( + &self, + _html: T, + _alt_text: Option, + ) -> crate::Result<()> { Err(crate::Error::Clipboard( "Unsupported on this platform".to_string(), )) @@ -66,3 +97,15 @@ impl Clipboard { )) } } + +#[derive(Debug, Deserialize, Serialize)] +#[serde(rename_all = "camelCase")] +enum ClipKind { + PlainText { label: Option, text: String }, +} + +#[derive(Debug, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +enum ClipboardContents { + PlainText { text: String }, +} diff --git a/plugins/clipboard-manager/src/models.rs b/plugins/clipboard-manager/src/models.rs deleted file mode 100644 index 8384bb65d..000000000 --- a/plugins/clipboard-manager/src/models.rs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2019-2023 Tauri Programme within The Commons Conservancy -// SPDX-License-Identifier: Apache-2.0 -// SPDX-License-Identifier: MIT - -use serde::{Deserialize, Serialize}; - -#[derive(Deserialize)] -#[cfg_attr(mobile, derive(Serialize))] -#[serde(rename_all = "camelCase")] -pub enum ClipKind { - PlainText { - label: Option, - text: String, - }, - #[cfg(desktop)] - Image { - image: tauri::image::JsImage, - }, - Html { - html: String, - alt_html: Option, - }, -} - -#[derive(Debug, Serialize, Deserialize)] -#[serde(rename_all = "camelCase")] -pub enum ClipboardContents { - PlainText { - text: String, - }, - Image { - bytes: Vec, - width: usize, - height: usize, - }, -} diff --git a/plugins/deep-link/CHANGELOG.md b/plugins/deep-link/CHANGELOG.md index b6f60860c..c78a12d40 100644 --- a/plugins/deep-link/CHANGELOG.md +++ b/plugins/deep-link/CHANGELOG.md @@ -2,6 +2,10 @@ ## \[2.0.0-beta.3] +- [`bd1ed590`](https://github.com/tauri-apps/plugins-workspace/commit/bd1ed5903ffcce5500310dac1e59e8c67674ef1e)([#1237](https://github.com/tauri-apps/plugins-workspace/pull/1237)) Update to tauri beta.17. + +## \[2.0.0-beta.3] + - [`a04ea2f`](https://github.com/tauri-apps/plugins-workspace/commit/a04ea2f38294d5a3987578283badc8eec87a7752)([#1071](https://github.com/tauri-apps/plugins-workspace/pull/1071)) The global API script is now only added to the binary when the `withGlobalTauri` config is true. ## \[2.0.0-beta.2] diff --git a/plugins/deep-link/Cargo.toml b/plugins/deep-link/Cargo.toml index 0cbd72f12..e76fda41f 100644 --- a/plugins/deep-link/Cargo.toml +++ b/plugins/deep-link/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tauri-plugin-deep-link" -version = "2.0.0-beta.3" +version = "2.0.0-beta.4" description = "Set your Tauri application as the default handler for an URL" authors = { workspace = true } license = { workspace = true } @@ -10,9 +10,9 @@ repository = { 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 } diff --git a/plugins/deep-link/api-iife.js b/plugins/deep-link/api-iife.js index 1b70f8bfa..74922bb2d 100644 --- a/plugins/deep-link/api-iife.js +++ b/plugins/deep-link/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 t(e,n={},t){return window.__TAURI_INTERNALS__.invoke(e,n,t)}var r;async function i(e,r,i){const a="string"==typeof i?.target?{kind:"AnyLabel",label:i.target}:i?.target??{kind:"Any"};return t("plugin:event|listen",{event:e,target:a,handler:n(r)}).then((n=>async()=>async function(e,n){await t("plugin:event|unlisten",{event:e,eventId:n})}(e,n)))}async function a(){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.FILE_DROP="tauri://file-drop",e.FILE_DROP_HOVER="tauri://file-drop-hover",e.FILE_DROP_CANCELLED="tauri://file-drop-cancelled"}(r||(r={})),e.getCurrent=a,e.isRegistered=async function(e){return await t("plugin:deep-link|i_registered",{protocol:e})},e.onOpenUrl=async function(e){const n=await a();return null!=n&&e(n),await i("deep-link://new-url",(n=>e(n.payload)))},e.register=async function(e){return await t("plugin:deep-link|register",{protocol:e})},e.unregister=async function(e){return await t("plugin:deep-link|unregister",{protocol:e})},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 r(e,n={},r){return window.__TAURI_INTERNALS__.invoke(e,n,r)}var t;async function i(e,t,i){const a=(void 0,{kind:"Any"});return r("plugin:event|listen",{event:e,target:a,handler:n(t)}).then((n=>async()=>async function(e,n){await r("plugin:event|unlisten",{event:e,eventId:n})}(e,n)))}async function a(){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_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_CREATED="tauri://window-created",e.WEBVIEW_CREATED="tauri://webview-created",e.DRAG="tauri://drag",e.DROP="tauri://drop",e.DROP_OVER="tauri://drop-over",e.DROP_CANCELLED="tauri://drag-cancelled"}(t||(t={})),e.getCurrent=a,e.isRegistered=async function(e){return await r("plugin:deep-link|i_registered",{protocol:e})},e.onOpenUrl=async function(e){const n=await a();return null!=n&&e(n),await i("deep-link://new-url",(n=>{e(n.payload)}))},e.register=async function(e){return await r("plugin:deep-link|register",{protocol:e})},e.unregister=async function(e){return await r("plugin:deep-link|unregister",{protocol:e})},e}({});Object.defineProperty(window.__TAURI__,"deepLink",{value:__TAURI_PLUGIN_DEEPLINK__})} diff --git a/plugins/deep-link/examples/app/.gitignore b/plugins/deep-link/examples/app/.gitignore index a547bf36d..251ce6d2b 100644 --- a/plugins/deep-link/examples/app/.gitignore +++ b/plugins/deep-link/examples/app/.gitignore @@ -8,7 +8,6 @@ pnpm-debug.log* lerna-debug.log* node_modules -dist dist-ssr *.local diff --git a/plugins/deep-link/examples/app/CHANGELOG.md b/plugins/deep-link/examples/app/CHANGELOG.md index a8578b6b0..8cae8a1e8 100644 --- a/plugins/deep-link/examples/app/CHANGELOG.md +++ b/plugins/deep-link/examples/app/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## \[2.0.0-beta.3] + +### Dependencies + +- Upgraded to `deep-link-js@2.0.0-beta.3` + ## \[2.0.0-beta.2] ### Dependencies diff --git a/plugins/deep-link/examples/app/package.json b/plugins/deep-link/examples/app/package.json index c391310f1..d2a2be0b8 100644 --- a/plugins/deep-link/examples/app/package.json +++ b/plugins/deep-link/examples/app/package.json @@ -1,7 +1,7 @@ { "name": "deep-link-example", "private": true, - "version": "2.0.0-beta.2", + "version": "2.0.0-beta.3", "type": "module", "scripts": { "dev": "vite", @@ -10,11 +10,11 @@ "tauri": "tauri" }, "dependencies": { - "@tauri-apps/api": "2.0.0-beta.6", - "@tauri-apps/plugin-deep-link": "2.0.0-beta.2" + "@tauri-apps/api": "2.0.0-beta.11", + "@tauri-apps/plugin-deep-link": "2.0.0-beta.3" }, "devDependencies": { - "@tauri-apps/cli": "2.0.0-beta.9", + "@tauri-apps/cli": "2.0.0-beta.16", "internal-ip": "^8.0.0", "typescript": "^5.2.2", "vite": "^5.0.13" diff --git a/plugins/deep-link/guest-js/index.ts b/plugins/deep-link/guest-js/index.ts index fb722046a..105d0b6ad 100644 --- a/plugins/deep-link/guest-js/index.ts +++ b/plugins/deep-link/guest-js/index.ts @@ -3,7 +3,7 @@ // SPDX-License-Identifier: MIT import { invoke } from "@tauri-apps/api/core"; -import { UnlistenFn, listen } from "@tauri-apps/api/event"; +import { type UnlistenFn, listen } from "@tauri-apps/api/event"; /** * Get the current URLs that triggered the deep link. Use this on app load to check whether your app was started via a deep link. @@ -102,7 +102,7 @@ export async function onOpenUrl( handler(current); } - return await listen("deep-link://new-url", (event) => - handler(event.payload), - ); + return await listen("deep-link://new-url", (event) => { + handler(event.payload); + }); } diff --git a/plugins/deep-link/package.json b/plugins/deep-link/package.json index cc67b3e2d..95c89ecb7 100644 --- a/plugins/deep-link/package.json +++ b/plugins/deep-link/package.json @@ -1,6 +1,6 @@ { "name": "@tauri-apps/plugin-deep-link", - "version": "2.0.0-beta.2", + "version": "2.0.0-beta.3", "description": "Set your Tauri application as the default handler for an URL", "license": "MIT or APACHE-2.0", "authors": [ @@ -24,6 +24,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-beta.6" + "@tauri-apps/api": "2.0.0-beta.11" } } diff --git a/plugins/dialog/CHANGELOG.md b/plugins/dialog/CHANGELOG.md index aac54e107..107e0aac6 100644 --- a/plugins/dialog/CHANGELOG.md +++ b/plugins/dialog/CHANGELOG.md @@ -1,5 +1,25 @@ # Changelog +## \[2.0.0-beta.3] + +- [`bd1ed590`](https://github.com/tauri-apps/plugins-workspace/commit/bd1ed5903ffcce5500310dac1e59e8c67674ef1e)([#1237](https://github.com/tauri-apps/plugins-workspace/pull/1237)) Update to tauri beta.17. + +## \[2.0.0-beta.6] + +- [`326df688`](https://github.com/tauri-apps/plugins-workspace/commit/326df6883998d416fc0837583ed972854628bb52)([#1236](https://github.com/tauri-apps/plugins-workspace/pull/1236)) Fixes command argument parsing on iOS. + +### Dependencies + +- Upgraded to `fs@2.0.0-beta.6` + +## \[2.0.0-beta.5] + +- [`bb51a41`](https://github.com/tauri-apps/plugins-workspace/commit/bb51a41d67ebf989e8aedf10c4b1a7f9514d1bdf)([#1168](https://github.com/tauri-apps/plugins-workspace/pull/1168)) **Breaking Change:** All apis that return paths to the frontend will now remove the `\\?\` UNC prefix on Windows. + +### Dependencies + +- Upgraded to `fs@2.0.0-beta.5` + ## \[2.0.0-beta.4] - [`4cd8112`](https://github.com/tauri-apps/plugins-workspace/commit/4cd81126fdf25e1847546f8fdbd924aa4bfeabb5)([#1056](https://github.com/tauri-apps/plugins-workspace/pull/1056)) Fixed an issue where dialogs on android would return the Content URI instead of the file path @@ -115,3 +135,5 @@ pull/371)) First v2 alpha release! kspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! pull/371)) First v2 alpha release! +lpha release! + pull/371)) First v2 alpha release! diff --git a/plugins/dialog/Cargo.toml b/plugins/dialog/Cargo.toml index 165b493e0..826d2e910 100644 --- a/plugins/dialog/Cargo.toml +++ b/plugins/dialog/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tauri-plugin-dialog" -version = "2.0.0-beta.4" +version = "2.0.0-beta.7" description = "Native system dialogs for opening and saving files along with message dialogs on your Tauri application." edition = { workspace = true } authors = { workspace = true } @@ -10,12 +10,12 @@ repository = { 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"] } +tauri-plugin = { workspace = true, features = [ "build" ] } [dependencies] serde = { workspace = true } @@ -23,12 +23,9 @@ serde_json = { workspace = true } tauri = { workspace = true } log = { workspace = true } thiserror = { workspace = true } -tauri-plugin-fs = { path = "../fs", version = "2.0.0-beta.4" } +dunce = { workspace = true } +tauri-plugin-fs = { path = "../fs", version = "2.0.0-beta.7" } [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.14", default-features = false, features = [ - "tokio", - "gtk3", - "common-controls-v6", -] } +rfd = { version = "0.14", default-features = false, features = [ "tokio", "gtk3", "common-controls-v6" ] } raw-window-handle = "0.6" diff --git a/plugins/dialog/api-iife.js b/plugins/dialog/api-iife.js index 7aa975820..ee6045707 100644 --- a/plugins/dialog/api-iife.js +++ b/plugins/dialog/api-iife.js @@ -1 +1 @@ -if("__TAURI__"in window){var __TAURI_PLUGIN_DIALOG__=function(t){"use strict";async function n(t,n={},e){return window.__TAURI_INTERNALS__.invoke(t,n,e)}return"function"==typeof SuppressedError&&SuppressedError,t.ask=async function(t,e){const o="string"==typeof e?{title:e}:e;return n("plugin:dialog|ask",{message:t.toString(),title:o?.title?.toString(),kind:o?.kind,okButtonLabel:o?.okLabel?.toString()??"Yes",cancelButtonLabel:o?.cancelLabel?.toString()??"No"})},t.confirm=async function(t,e){const o="string"==typeof e?{title:e}:e;return n("plugin:dialog|confirm",{message:t.toString(),title:o?.title?.toString(),kind:o?.kind,okButtonLabel:o?.okLabel?.toString()??"Ok",cancelButtonLabel:o?.cancelLabel?.toString()??"Cancel"})},t.message=async function(t,e){const o="string"==typeof e?{title:e}:e;return n("plugin:dialog|message",{message:t.toString(),title:o?.title?.toString(),kind:o?.kind,okButtonLabel:o?.okLabel?.toString()})},t.open=async function(t={}){return"object"==typeof t&&Object.freeze(t),n("plugin:dialog|open",{options:t})},t.save=async function(t={}){return"object"==typeof t&&Object.freeze(t),n("plugin:dialog|save",{options:t})},t}({});Object.defineProperty(window.__TAURI__,"dialog",{value:__TAURI_PLUGIN_DIALOG__})} +if("__TAURI__"in window){var __TAURI_PLUGIN_DIALOG__=function(t){"use strict";async function n(t,n={},e){return window.__TAURI_INTERNALS__.invoke(t,n,e)}return"function"==typeof SuppressedError&&SuppressedError,t.ask=async function(t,e){const i="string"==typeof e?{title:e}:e;return await n("plugin:dialog|ask",{message:t.toString(),title:i?.title?.toString(),kind:i?.kind,okButtonLabel:i?.okLabel?.toString()??"Yes",cancelButtonLabel:i?.cancelLabel?.toString()??"No"})},t.confirm=async function(t,e){const i="string"==typeof e?{title:e}:e;return await n("plugin:dialog|confirm",{message:t.toString(),title:i?.title?.toString(),kind:i?.kind,okButtonLabel:i?.okLabel?.toString()??"Ok",cancelButtonLabel:i?.cancelLabel?.toString()??"Cancel"})},t.message=async function(t,e){const i="string"==typeof e?{title:e}:e;await n("plugin:dialog|message",{message:t.toString(),title:i?.title?.toString(),kind:i?.kind,okButtonLabel:i?.okLabel?.toString()})},t.open=async function(t={}){return"object"==typeof t&&Object.freeze(t),await n("plugin:dialog|open",{options:t})},t.save=async function(t={}){return"object"==typeof t&&Object.freeze(t),await n("plugin:dialog|save",{options:t})},t}({});Object.defineProperty(window.__TAURI__,"dialog",{value:__TAURI_PLUGIN_DIALOG__})} diff --git a/plugins/dialog/guest-js/index.ts b/plugins/dialog/guest-js/index.ts index 5aa440a67..79bf0b34c 100644 --- a/plugins/dialog/guest-js/index.ts +++ b/plugins/dialog/guest-js/index.ts @@ -163,13 +163,14 @@ type OpenDialogReturn = T["directory"] extends true * @since 2.0.0 */ async function open( + // eslint-disable-next-line @typescript-eslint/consistent-type-assertions options: T = {} as T, ): Promise> { if (typeof options === "object") { Object.freeze(options); } - return invoke("plugin:dialog|open", { options }); + return await invoke("plugin:dialog|open", { options }); } /** @@ -201,7 +202,7 @@ async function save(options: SaveDialogOptions = {}): Promise { Object.freeze(options); } - return invoke("plugin:dialog|save", { options }); + return await invoke("plugin:dialog|save", { options }); } /** @@ -226,7 +227,7 @@ async function message( options?: string | MessageDialogOptions, ): Promise { const opts = typeof options === "string" ? { title: options } : options; - return invoke("plugin:dialog|message", { + await invoke("plugin:dialog|message", { message: message.toString(), title: opts?.title?.toString(), kind: opts?.kind, @@ -255,7 +256,7 @@ async function ask( options?: string | ConfirmDialogOptions, ): Promise { const opts = typeof options === "string" ? { title: options } : options; - return invoke("plugin:dialog|ask", { + return await invoke("plugin:dialog|ask", { message: message.toString(), title: opts?.title?.toString(), kind: opts?.kind, @@ -285,7 +286,7 @@ async function confirm( options?: string | ConfirmDialogOptions, ): Promise { const opts = typeof options === "string" ? { title: options } : options; - return invoke("plugin:dialog|confirm", { + return await invoke("plugin:dialog|confirm", { message: message.toString(), title: opts?.title?.toString(), kind: opts?.kind, diff --git a/plugins/dialog/guest-js/init.ts b/plugins/dialog/guest-js/init.ts index 35ac29c0e..7936d2cd6 100644 --- a/plugins/dialog/guest-js/init.ts +++ b/plugins/dialog/guest-js/init.ts @@ -5,14 +5,14 @@ import { invoke } from "@tauri-apps/api/core"; window.alert = function (message: string) { - invoke("plugin:dialog|message", { + void invoke("plugin:dialog|message", { message: message.toString(), }); }; // @ts-expect-error tauri does not have sync IPC :( -window.confirm = function (message: string) { - return invoke("plugin:dialog|confirm", { +window.confirm = async function (message: string) { + return await invoke("plugin:dialog|confirm", { message: message.toString(), }); }; diff --git a/plugins/dialog/ios/Sources/DialogPlugin.swift b/plugins/dialog/ios/Sources/DialogPlugin.swift index 40f515718..26c9fefa2 100644 --- a/plugins/dialog/ios/Sources/DialogPlugin.swift +++ b/plugins/dialog/ios/Sources/DialogPlugin.swift @@ -19,18 +19,18 @@ enum FilePickerEvent { struct MessageDialogOptions: Decodable { let title: String? let message: String - var okButtonLabel = "OK" - var cancelButtonLabel = "Cancel" + let okButtonLabel: String? + let cancelButtonLabel: String? } struct Filter: Decodable { - var extensions: [String] = [] + var extensions: [String]? } struct FilePickerOptions: Decodable { - var multiple = false - var readData = false - var filters: [Filter] = [] + var multiple: Bool? + var readData: Bool? + var filters: [Filter]? } class DialogPlugin: Plugin { @@ -47,7 +47,7 @@ class DialogPlugin: Plugin { @objc public func showFilePicker(_ invoke: Invoke) throws { let args = try invoke.parseArgs(FilePickerOptions.self) - let parsedTypes = parseFiltersOption(args.filters) + let parsedTypes = parseFiltersOption(args.filters ?? []) var isMedia = true var uniqueMimeType: Bool? = nil @@ -74,7 +74,7 @@ class DialogPlugin: Plugin { DispatchQueue.main.async { if #available(iOS 14, *) { var configuration = PHPickerConfiguration(photoLibrary: PHPhotoLibrary.shared()) - configuration.selectionLimit = args.multiple ? 0 : 1 + configuration.selectionLimit = (args.multiple ?? false) ? 0 : 1 if uniqueMimeType == true { if mimeKind == "image" { @@ -106,7 +106,7 @@ class DialogPlugin: Plugin { DispatchQueue.main.async { let picker = UIDocumentPickerViewController(documentTypes: documentTypes, in: .import) picker.delegate = self.filePickerController - picker.allowsMultipleSelection = args.multiple + picker.allowsMultipleSelection = args.multiple ?? false picker.modalPresentationStyle = .fullScreen self.presentViewController(picker) } @@ -120,7 +120,7 @@ class DialogPlugin: Plugin { private func parseFiltersOption(_ filters: [Filter]) -> [String] { var parsedTypes: [String] = [] for filter in filters { - for ext in filter.extensions { + for ext in filter.extensions ?? [] { guard let utType: String = UTTypeCreatePreferredIdentifierForTag( kUTTagClassMIMEType, ext as CFString, nil)?.takeRetainedValue() as String? @@ -197,24 +197,36 @@ class DialogPlugin: Plugin { DispatchQueue.main.async { [] in let alert = UIAlertController( title: args.title, message: args.message, preferredStyle: UIAlertController.Style.alert) - alert.addAction( - UIAlertAction( - title: args.cancelButtonLabel, style: UIAlertAction.Style.default, - handler: { (_) -> Void in - invoke.resolve([ - "value": false, - "cancelled": false, - ]) - })) - alert.addAction( - UIAlertAction( - title: args.okButtonLabel, style: UIAlertAction.Style.default, - handler: { (_) -> Void in - invoke.resolve([ - "value": true, - "cancelled": false, - ]) - })) + + let cancelButtonLabel = args.cancelButtonLabel ?? "" + if !cancelButtonLabel.isEmpty { + alert.addAction( + UIAlertAction( + title: cancelButtonLabel, style: UIAlertAction.Style.default, + handler: { (_) -> Void in + Logger.error("cancel") + + invoke.resolve([ + "value": false, + "cancelled": false, + ]) + })) + } + + let okButtonLabel = args.okButtonLabel ?? (cancelButtonLabel.isEmpty ? "OK" : "") + if !okButtonLabel.isEmpty { + alert.addAction( + UIAlertAction( + title: okButtonLabel, style: UIAlertAction.Style.default, + handler: { (_) -> Void in + Logger.error("ok") + + invoke.resolve([ + "value": true, + "cancelled": false, + ]) + })) + } manager.viewController?.present(alert, animated: true, completion: nil) } diff --git a/plugins/dialog/package.json b/plugins/dialog/package.json index 426401d08..29918ef4e 100644 --- a/plugins/dialog/package.json +++ b/plugins/dialog/package.json @@ -1,6 +1,6 @@ { "name": "@tauri-apps/plugin-dialog", - "version": "2.0.0-beta.2", + "version": "2.0.0-beta.3", "license": "MIT or APACHE-2.0", "authors": [ "Tauri Programme within The Commons Conservancy" @@ -23,6 +23,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-beta.6" + "@tauri-apps/api": "2.0.0-beta.11" } } diff --git a/plugins/dialog/src/commands.rs b/plugins/dialog/src/commands.rs index f0dfb092e..0d4a0de9a 100644 --- a/plugins/dialog/src/commands.rs +++ b/plugins/dialog/src/commands.rs @@ -129,7 +129,12 @@ pub(crate) async fn open( } } } - OpenResponse::Folders(folders) + OpenResponse::Folders(folders.map(|folders| { + folders + .iter() + .map(|p| dunce::simplified(p).to_path_buf()) + .collect() + })) } else { let folder = dialog_builder.blocking_pick_folder(); if let Some(path) = &folder { @@ -137,7 +142,7 @@ pub(crate) async fn open( s.allow_directory(path, options.recursive); } } - OpenResponse::Folder(folder) + OpenResponse::Folder(folder.map(|p| dunce::simplified(&p).to_path_buf())) } } #[cfg(mobile)] @@ -154,7 +159,15 @@ pub(crate) async fn open( .allow_file(&file.path)?; } } - OpenResponse::Files(files) + OpenResponse::Files(files.map(|files| { + files + .into_iter() + .map(|mut f| { + f.path = dunce::simplified(&f.path).to_path_buf(); + f + }) + .collect() + })) } else { let file = dialog_builder.blocking_pick_file(); if let Some(file) = &file { @@ -165,7 +178,10 @@ pub(crate) async fn open( .state::() .allow_file(&file.path)?; } - OpenResponse::File(file) + OpenResponse::File(file.map(|mut f| { + f.path = dunce::simplified(&f.path).to_path_buf(); + f + })) }; Ok(res) } @@ -208,7 +224,7 @@ pub(crate) async fn save( window.state::().allow_file(p)?; } - Ok(path) + Ok(path.map(|p| dunce::simplified(&p).to_path_buf())) } } diff --git a/plugins/dialog/src/init-iife.js b/plugins/dialog/src/init-iife.js index f51830fd7..bcdf3f561 100644 --- a/plugins/dialog/src/init-iife.js +++ b/plugins/dialog/src/init-iife.js @@ -1 +1 @@ -!function(){"use strict";async function n(n,i={},o){return window.__TAURI_INTERNALS__.invoke(n,i,o)}"function"==typeof SuppressedError&&SuppressedError,window.alert=function(i){n("plugin:dialog|message",{message:i.toString()})},window.confirm=function(i){return n("plugin:dialog|confirm",{message:i.toString()})}}(); +!function(){"use strict";async function n(n,i={},o){return window.__TAURI_INTERNALS__.invoke(n,i,o)}"function"==typeof SuppressedError&&SuppressedError,window.alert=function(i){n("plugin:dialog|message",{message:i.toString()})},window.confirm=async function(i){return await n("plugin:dialog|confirm",{message:i.toString()})}}(); diff --git a/plugins/fs/CHANGELOG.md b/plugins/fs/CHANGELOG.md index 4aeb8a3b7..3f5cc8dda 100644 --- a/plugins/fs/CHANGELOG.md +++ b/plugins/fs/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## \[2.0.0-beta.3] + +- [`bd1ed590`](https://github.com/tauri-apps/plugins-workspace/commit/bd1ed5903ffcce5500310dac1e59e8c67674ef1e)([#1237](https://github.com/tauri-apps/plugins-workspace/pull/1237)) Update to tauri beta.17. + +## \[2.0.0-beta.6] + +- [`b115fd22`](https://github.com/tauri-apps/plugins-workspace/commit/b115fd22e0da073f5d758c13474ec2106cf78163)([#1221](https://github.com/tauri-apps/plugins-workspace/pull/1221)) Fixes an issue that caused the app to freeze when the `dialog`, `fs`, and `persisted-scope` plugins were used together. + +## \[2.0.0-beta.5] + +- [`bb51a41`](https://github.com/tauri-apps/plugins-workspace/commit/bb51a41d67ebf989e8aedf10c4b1a7f9514d1bdf)([#1168](https://github.com/tauri-apps/plugins-workspace/pull/1168)) **Breaking Change:** All apis that return paths to the frontend will now remove the `\\?\` UNC prefix on Windows. +- [`e3d41f4`](https://github.com/tauri-apps/plugins-workspace/commit/e3d41f4011bd3ea3ce281bb38bbe31d3709f8e0f)([#1191](https://github.com/tauri-apps/plugins-workspace/pull/1191)) Internally use the webview scoped resources table instead of the app one, so other webviews can't access other webviews resources. +- [`e3d41f4`](https://github.com/tauri-apps/plugins-workspace/commit/e3d41f4011bd3ea3ce281bb38bbe31d3709f8e0f)([#1191](https://github.com/tauri-apps/plugins-workspace/pull/1191)) Update for tauri 2.0.0-beta.15. + ## \[2.0.0-beta.4] - [`9c2fb93`](https://github.com/tauri-apps/plugins-workspace/commit/9c2fb9306ecd3936a2aef56b3c012899036db098) Enhance the scope type to also allow a plain string representing the path to allow or deny. @@ -73,3 +87,6 @@ 717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! .com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! 717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! +ac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! + .com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! + 717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! diff --git a/plugins/fs/Cargo.toml b/plugins/fs/Cargo.toml index 8bcdcf867..0449e33d4 100644 --- a/plugins/fs/Cargo.toml +++ b/plugins/fs/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tauri-plugin-fs" -version = "2.0.0-beta.4" +version = "2.0.0-beta.7" description = "Access the file system." authors = { workspace = true } license = { workspace = true } @@ -10,11 +10,11 @@ repository = { 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"] } +tauri-plugin = { workspace = true, features = [ "build" ] } schemars = { workspace = true } serde = { workspace = true } @@ -26,10 +26,10 @@ 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 = { version = "6", optional = true, features = [ "serde" ] } notify-debouncer-full = { version = "0.3", optional = true } [features] -watch = ["notify", "notify-debouncer-full"] +watch = [ "notify", "notify-debouncer-full" ] diff --git a/plugins/fs/api-iife.js b/plugins/fs/api-iife.js index 079ccde11..491200a02 100644 --- a/plugins/fs/api-iife.js +++ b/plugins/fs/api-iife.js @@ -1 +1 @@ -if("__TAURI__"in window){var __TAURI_PLUGIN_FS__=function(t){"use strict";function e(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)}function n(t,e,n,i,o){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!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");return"a"===i?o.call(t,n):o?o.value=n:e.set(t,n),n}var i,o,r,s,a,c;"function"==typeof SuppressedError&&SuppressedError;class f{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,i.set(this,(()=>{})),o.set(this,0),r.set(this,{}),this.id=function(t,e=!1){return window.__TAURI_INTERNALS__.transformCallback(t,e)}((({message:t,id:s})=>{if(s===e(this,o,"f")){n(this,o,s+1,"f"),e(this,i,"f").call(this,t);const a=Object.keys(e(this,r,"f"));if(a.length>0){let t=s+1;for(const n of a.sort()){if(parseInt(n)!==t)break;{const o=e(this,r,"f")[n];delete e(this,r,"f")[n],e(this,i,"f").call(this,o),t+=1}}}}else e(this,r,"f")[s.toString()]=t}))}set onmessage(t){n(this,i,t,"f")}get onmessage(){return e(this,i,"f")}toJSON(){return`__CHANNEL__:${this.id}`}}async function l(t,e={},n){return window.__TAURI_INTERNALS__.invoke(t,e,n)}i=new WeakMap,o=new WeakMap,r=new WeakMap;class u{get rid(){return e(this,s,"f")}constructor(t){s.set(this,void 0),n(this,s,t,"f")}async close(){return l("plugin:resources|close",{rid:this.rid})}}function p(t){return{isFile:t.isFile,isDirectory:t.isDirectory,isSymlink:t.isSymlink,size:t.size,mtime:null!=t.mtime?new Date(t.mtime):null,atime:null!=t.atime?new Date(t.atime):null,birthtime:null!=t.birthtime?new Date(t.birthtime):null,readonly:t.readonly,fileAttributes:t.fileAttributes,dev:t.dev,ino:t.ino,mode:t.mode,nlink:t.nlink,uid:t.uid,gid:t.gid,rdev:t.rdev,blksize:t.blksize,blocks:t.blocks}}s=new WeakMap,t.BaseDirectory=void 0,(a=t.BaseDirectory||(t.BaseDirectory={}))[a.Audio=1]="Audio",a[a.Cache=2]="Cache",a[a.Config=3]="Config",a[a.Data=4]="Data",a[a.LocalData=5]="LocalData",a[a.Document=6]="Document",a[a.Download=7]="Download",a[a.Picture=8]="Picture",a[a.Public=9]="Public",a[a.Video=10]="Video",a[a.Resource=11]="Resource",a[a.Temp=12]="Temp",a[a.AppConfig=13]="AppConfig",a[a.AppData=14]="AppData",a[a.AppLocalData=15]="AppLocalData",a[a.AppCache=16]="AppCache",a[a.AppLog=17]="AppLog",a[a.Desktop=18]="Desktop",a[a.Executable=19]="Executable",a[a.Font=20]="Font",a[a.Home=21]="Home",a[a.Runtime=22]="Runtime",a[a.Template=23]="Template",t.SeekMode=void 0,(c=t.SeekMode||(t.SeekMode={}))[c.Start=0]="Start",c[c.Current=1]="Current",c[c.End=2]="End";class h extends u{constructor(t){super(t)}async read(t){if(0===t.byteLength)return 0;const[e,n]=await l("plugin:fs|read",{rid:this.rid,len:t.byteLength});return t.set(e),0===n?null:n}async seek(t,e){return l("plugin:fs|seek",{rid:this.rid,offset:t,whence:e})}async stat(){return p(await l("plugin:fs|fstat",{rid:this.rid}))}async truncate(t){return l("plugin:fs|ftruncate",{rid:this.rid,len:t})}async write(t){return l("plugin:fs|write",{rid:this.rid,data:Array.from(t)})}}async function w(t){await l("plugin:fs|unwatch",{rid:t})}return t.FileHandle=h,t.copyFile=async function(t,e,n){if(t instanceof URL&&"file:"!==t.protocol||e instanceof URL&&"file:"!==e.protocol)throw new TypeError("Must be a file URL.");return l("plugin:fs|copy_file",{fromPath:t instanceof URL?t.toString():t,toPath:e instanceof URL?e.toString():e,options:n})},t.create=async function(t,e){if(t instanceof URL&&"file:"!==t.protocol)throw new TypeError("Must be a file URL.");const n=await l("plugin:fs|create",{path:t instanceof URL?t.toString():t,options:e});return new h(n)},t.exists=async function(t,e){if(t instanceof URL&&"file:"!==t.protocol)throw new TypeError("Must be a file URL.");return l("plugin:fs|exists",{path:t instanceof URL?t.toString():t,options:e})},t.lstat=async function(t,e){return p(await l("plugin:fs|lstat",{path:t instanceof URL?t.toString():t,options:e}))},t.mkdir=async function(t,e){if(t instanceof URL&&"file:"!==t.protocol)throw new TypeError("Must be a file URL.");return l("plugin:fs|mkdir",{path:t instanceof URL?t.toString():t,options:e})},t.open=async function(t,e){if(t instanceof URL&&"file:"!==t.protocol)throw new TypeError("Must be a file URL.");const n=await l("plugin:fs|open",{path:t instanceof URL?t.toString():t,options:e});return new h(n)},t.readDir=async function(t,e){if(t instanceof URL&&"file:"!==t.protocol)throw new TypeError("Must be a file URL.");return l("plugin:fs|read_dir",{path:t instanceof URL?t.toString():t,options:e})},t.readFile=async function(t,e){if(t instanceof URL&&"file:"!==t.protocol)throw new TypeError("Must be a file URL.");const n=await l("plugin:fs|read_file",{path:t instanceof URL?t.toString():t,options:e});return Uint8Array.from(n)},t.readTextFile=async function(t,e){if(t instanceof URL&&"file:"!==t.protocol)throw new TypeError("Must be a file URL.");return l("plugin:fs|read_text_file",{path:t instanceof URL?t.toString():t,options:e})},t.readTextFileLines=async function(t,e){if(t instanceof URL&&"file:"!==t.protocol)throw new TypeError("Must be a file URL.");const n=t instanceof URL?t.toString():t;return Promise.resolve({path:n,rid:null,async next(){this.rid||(this.rid=await l("plugin:fs|read_text_file_lines",{path:n,options:e}));const[t,i]=await l("plugin:fs|read_text_file_lines_next",{rid:this.rid});return i&&(this.rid=null),{value:i?"":t,done:i}},[Symbol.asyncIterator](){return this}})},t.remove=async function(t,e){if(t instanceof URL&&"file:"!==t.protocol)throw new TypeError("Must be a file URL.");return l("plugin:fs|remove",{path:t instanceof URL?t.toString():t,options:e})},t.rename=async function(t,e,n){if(t instanceof URL&&"file:"!==t.protocol||e instanceof URL&&"file:"!==e.protocol)throw new TypeError("Must be a file URL.");return l("plugin:fs|rename",{oldPath:t instanceof URL?t.toString():t,newPath:e instanceof URL?e.toString():e,options:n})},t.stat=async function(t,e){return p(await l("plugin:fs|stat",{path:t instanceof URL?t.toString():t,options:e}))},t.truncate=async function(t,e,n){if(t instanceof URL&&"file:"!==t.protocol)throw new TypeError("Must be a file URL.");return l("plugin:fs|truncate",{path:t instanceof URL?t.toString():t,len:e,options:n})},t.watch=async function(t,e,n){const i={recursive:!1,delayMs:2e3,...n},o=Array.isArray(t)?t:[t];for(const t of o)if(t instanceof URL&&"file:"!==t.protocol)throw new TypeError("Must be a file URL.");const r=new f;r.onmessage=e;const s=await l("plugin:fs|watch",{paths:o.map((t=>t instanceof URL?t.toString():t)),options:i,onEvent:r});return()=>{w(s)}},t.watchImmediate=async function(t,e,n){const i={recursive:!1,...n,delayMs:null},o=Array.isArray(t)?t:[t];for(const t of o)if(t instanceof URL&&"file:"!==t.protocol)throw new TypeError("Must be a file URL.");const r=new f;r.onmessage=e;const s=await l("plugin:fs|watch",{paths:o.map((t=>t instanceof URL?t.toString():t)),options:i,onEvent:r});return()=>{w(s)}},t.writeFile=async function(t,e,n){if(t instanceof URL&&"file:"!==t.protocol)throw new TypeError("Must be a file URL.");return l("plugin:fs|write_file",{path:t instanceof URL?t.toString():t,data:Array.from(e),options:n})},t.writeTextFile=async function(t,e,n){if(t instanceof URL&&"file:"!==t.protocol)throw new TypeError("Must be a file URL.");return l("plugin:fs|write_text_file",{path:t instanceof URL?t.toString():t,data:e,options:n})},t}({});Object.defineProperty(window.__TAURI__,"fs",{value:__TAURI_PLUGIN_FS__})} +if("__TAURI__"in window){var __TAURI_PLUGIN_FS__=function(t){"use strict";function e(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)}function n(t,e,n,i,o){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");return e.set(t,n),n}var i,o,r,a,s,c;"function"==typeof SuppressedError&&SuppressedError;class f{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,i.set(this,(()=>{})),o.set(this,0),r.set(this,{}),this.id=function(t,e=!1){return window.__TAURI_INTERNALS__.transformCallback(t,e)}((({message:t,id:a})=>{if(a===e(this,o,"f")){n(this,o,a+1),e(this,i,"f").call(this,t);const s=Object.keys(e(this,r,"f"));if(s.length>0){let t=a+1;for(const n of s.sort()){if(parseInt(n)!==t)break;{const o=e(this,r,"f")[n];delete e(this,r,"f")[n],e(this,i,"f").call(this,o),t+=1}}n(this,o,t)}}else e(this,r,"f")[a.toString()]=t}))}set onmessage(t){n(this,i,t)}get onmessage(){return e(this,i,"f")}toJSON(){return`__CHANNEL__:${this.id}`}}async function l(t,e={},n){return window.__TAURI_INTERNALS__.invoke(t,e,n)}i=new WeakMap,o=new WeakMap,r=new WeakMap;class u{get rid(){return e(this,a,"f")}constructor(t){a.set(this,void 0),n(this,a,t)}async close(){return l("plugin:resources|close",{rid:this.rid})}}function p(t){return{isFile:t.isFile,isDirectory:t.isDirectory,isSymlink:t.isSymlink,size:t.size,mtime:null!=t.mtime?new Date(t.mtime):null,atime:null!=t.atime?new Date(t.atime):null,birthtime:null!=t.birthtime?new Date(t.birthtime):null,readonly:t.readonly,fileAttributes:t.fileAttributes,dev:t.dev,ino:t.ino,mode:t.mode,nlink:t.nlink,uid:t.uid,gid:t.gid,rdev:t.rdev,blksize:t.blksize,blocks:t.blocks}}a=new WeakMap,t.BaseDirectory=void 0,(s=t.BaseDirectory||(t.BaseDirectory={}))[s.Audio=1]="Audio",s[s.Cache=2]="Cache",s[s.Config=3]="Config",s[s.Data=4]="Data",s[s.LocalData=5]="LocalData",s[s.Document=6]="Document",s[s.Download=7]="Download",s[s.Picture=8]="Picture",s[s.Public=9]="Public",s[s.Video=10]="Video",s[s.Resource=11]="Resource",s[s.Temp=12]="Temp",s[s.AppConfig=13]="AppConfig",s[s.AppData=14]="AppData",s[s.AppLocalData=15]="AppLocalData",s[s.AppCache=16]="AppCache",s[s.AppLog=17]="AppLog",s[s.Desktop=18]="Desktop",s[s.Executable=19]="Executable",s[s.Font=20]="Font",s[s.Home=21]="Home",s[s.Runtime=22]="Runtime",s[s.Template=23]="Template",t.SeekMode=void 0,(c=t.SeekMode||(t.SeekMode={}))[c.Start=0]="Start",c[c.Current=1]="Current",c[c.End=2]="End";class w extends u{async read(t){if(0===t.byteLength)return 0;const[e,n]=await l("plugin:fs|read",{rid:this.rid,len:t.byteLength});return t.set(e),0===n?null:n}async seek(t,e){return await l("plugin:fs|seek",{rid:this.rid,offset:t,whence:e})}async stat(){return p(await l("plugin:fs|fstat",{rid:this.rid}))}async truncate(t){await l("plugin:fs|ftruncate",{rid:this.rid,len:t})}async write(t){return await l("plugin:fs|write",{rid:this.rid,data:Array.from(t)})}}async function h(t){await l("plugin:fs|unwatch",{rid:t})}return t.FileHandle=w,t.copyFile=async function(t,e,n){if(t instanceof URL&&"file:"!==t.protocol||e instanceof URL&&"file:"!==e.protocol)throw new TypeError("Must be a file URL.");await l("plugin:fs|copy_file",{fromPath:t instanceof URL?t.toString():t,toPath:e instanceof URL?e.toString():e,options:n})},t.create=async function(t,e){if(t instanceof URL&&"file:"!==t.protocol)throw new TypeError("Must be a file URL.");const n=await l("plugin:fs|create",{path:t instanceof URL?t.toString():t,options:e});return new w(n)},t.exists=async function(t,e){if(t instanceof URL&&"file:"!==t.protocol)throw new TypeError("Must be a file URL.");return await l("plugin:fs|exists",{path:t instanceof URL?t.toString():t,options:e})},t.lstat=async function(t,e){return p(await l("plugin:fs|lstat",{path:t instanceof URL?t.toString():t,options:e}))},t.mkdir=async function(t,e){if(t instanceof URL&&"file:"!==t.protocol)throw new TypeError("Must be a file URL.");await l("plugin:fs|mkdir",{path:t instanceof URL?t.toString():t,options:e})},t.open=async function(t,e){if(t instanceof URL&&"file:"!==t.protocol)throw new TypeError("Must be a file URL.");const n=await l("plugin:fs|open",{path:t instanceof URL?t.toString():t,options:e});return new w(n)},t.readDir=async function(t,e){if(t instanceof URL&&"file:"!==t.protocol)throw new TypeError("Must be a file URL.");return await l("plugin:fs|read_dir",{path:t instanceof URL?t.toString():t,options:e})},t.readFile=async function(t,e){if(t instanceof URL&&"file:"!==t.protocol)throw new TypeError("Must be a file URL.");const n=await l("plugin:fs|read_file",{path:t instanceof URL?t.toString():t,options:e});return Uint8Array.from(n)},t.readTextFile=async function(t,e){if(t instanceof URL&&"file:"!==t.protocol)throw new TypeError("Must be a file URL.");return await l("plugin:fs|read_text_file",{path:t instanceof URL?t.toString():t,options:e})},t.readTextFileLines=async function(t,e){if(t instanceof URL&&"file:"!==t.protocol)throw new TypeError("Must be a file URL.");const n=t instanceof URL?t.toString():t;return await Promise.resolve({path:n,rid:null,async next(){null==this.rid&&(this.rid=await l("plugin:fs|read_text_file_lines",{path:n,options:e}));const[t,i]=await l("plugin:fs|read_text_file_lines_next",{rid:this.rid});return i&&(this.rid=null),{value:i?"":t,done:i}},[Symbol.asyncIterator](){return this}})},t.remove=async function(t,e){if(t instanceof URL&&"file:"!==t.protocol)throw new TypeError("Must be a file URL.");await l("plugin:fs|remove",{path:t instanceof URL?t.toString():t,options:e})},t.rename=async function(t,e,n){if(t instanceof URL&&"file:"!==t.protocol||e instanceof URL&&"file:"!==e.protocol)throw new TypeError("Must be a file URL.");await l("plugin:fs|rename",{oldPath:t instanceof URL?t.toString():t,newPath:e instanceof URL?e.toString():e,options:n})},t.stat=async function(t,e){return p(await l("plugin:fs|stat",{path:t instanceof URL?t.toString():t,options:e}))},t.truncate=async function(t,e,n){if(t instanceof URL&&"file:"!==t.protocol)throw new TypeError("Must be a file URL.");await l("plugin:fs|truncate",{path:t instanceof URL?t.toString():t,len:e,options:n})},t.watch=async function(t,e,n){const i={recursive:!1,delayMs:2e3,...n},o=Array.isArray(t)?t:[t];for(const t of o)if(t instanceof URL&&"file:"!==t.protocol)throw new TypeError("Must be a file URL.");const r=new f;r.onmessage=e;const a=await l("plugin:fs|watch",{paths:o.map((t=>t instanceof URL?t.toString():t)),options:i,onEvent:r});return()=>{h(a)}},t.watchImmediate=async function(t,e,n){const i={recursive:!1,...n,delayMs:null},o=Array.isArray(t)?t:[t];for(const t of o)if(t instanceof URL&&"file:"!==t.protocol)throw new TypeError("Must be a file URL.");const r=new f;r.onmessage=e;const a=await l("plugin:fs|watch",{paths:o.map((t=>t instanceof URL?t.toString():t)),options:i,onEvent:r});return()=>{h(a)}},t.writeFile=async function(t,e,n){if(t instanceof URL&&"file:"!==t.protocol)throw new TypeError("Must be a file URL.");await l("plugin:fs|write_file",{path:t instanceof URL?t.toString():t,data:Array.from(e),options:n})},t.writeTextFile=async function(t,e,n){if(t instanceof URL&&"file:"!==t.protocol)throw new TypeError("Must be a file URL.");await l("plugin:fs|write_text_file",{path:t instanceof URL?t.toString():t,data:e,options:n})},t}({});Object.defineProperty(window.__TAURI__,"fs",{value:__TAURI_PLUGIN_FS__})} diff --git a/plugins/fs/build.rs b/plugins/fs/build.rs index 66a7fa9fb..fdbebd8c6 100644 --- a/plugins/fs/build.rs +++ b/plugins/fs/build.rs @@ -165,7 +165,7 @@ permissions = [ [[set]] identifier = "allow-{lower}-meta-recursive" -description = "This allows read access to metadata of the `${upper}` folder, including file listing and statistics." +description = "This allows full recursive read access to metadata of the `${upper}` folder, including file listing and statistics." permissions = [ "read-meta", "scope-{lower}-recursive" @@ -173,7 +173,7 @@ permissions = [ [[set]] identifier = "allow-{lower}-meta" -description = "This allows read access to metadata of the `${upper}` folder, including file listing and statistics." +description = "This allows non-recursive read access to metadata of the `${upper}` folder, including file listing and statistics." permissions = [ "read-meta", "scope-{lower}-index" diff --git a/plugins/fs/guest-js/index.ts b/plugins/fs/guest-js/index.ts index 3d9aca34c..e886568d1 100644 --- a/plugins/fs/guest-js/index.ts +++ b/plugins/fs/guest-js/index.ts @@ -249,10 +249,6 @@ function parseFileInfo(r: UnparsedFileInfo): FileInfo { * @since 2.0.0 */ class FileHandle extends Resource { - constructor(rid: number) { - super(rid); - } - /** * Reads up to `p.byteLength` bytes into `p`. It resolves to the number of * bytes read (`0` < `n` <= `p.byteLength`) and rejects if any error @@ -330,7 +326,7 @@ class FileHandle extends Resource { * @since 2.0.0 */ async seek(offset: number, whence: SeekMode): Promise { - return invoke("plugin:fs|seek", { + return await invoke("plugin:fs|seek", { rid: this.rid, offset, whence, @@ -382,7 +378,7 @@ class FileHandle extends Resource { * @since 2.0.0 */ async truncate(len?: number): Promise { - return invoke("plugin:fs|ftruncate", { + await invoke("plugin:fs|ftruncate", { rid: this.rid, len, }); @@ -409,7 +405,7 @@ class FileHandle extends Resource { * @since 2.0.0 */ async write(data: Uint8Array): Promise { - return invoke("plugin:fs|write", { + return await invoke("plugin:fs|write", { rid: this.rid, data: Array.from(data), }); @@ -569,7 +565,7 @@ async function copyFile( throw new TypeError("Must be a file URL."); } - return invoke("plugin:fs|copy_file", { + await invoke("plugin:fs|copy_file", { fromPath: fromPath instanceof URL ? fromPath.toString() : fromPath, toPath: toPath instanceof URL ? toPath.toString() : toPath, options, @@ -608,7 +604,7 @@ async function mkdir( throw new TypeError("Must be a file URL."); } - return invoke("plugin:fs|mkdir", { + await invoke("plugin:fs|mkdir", { path: path instanceof URL ? path.toString() : path, options, }); @@ -669,7 +665,7 @@ async function readDir( throw new TypeError("Must be a file URL."); } - return invoke("plugin:fs|read_dir", { + return await invoke("plugin:fs|read_dir", { path: path instanceof URL ? path.toString() : path, options, }); @@ -728,7 +724,7 @@ async function readTextFile( throw new TypeError("Must be a file URL."); } - return invoke("plugin:fs|read_text_file", { + return await invoke("plugin:fs|read_text_file", { path: path instanceof URL ? path.toString() : path, options, }); @@ -759,11 +755,11 @@ async function readTextFileLines( const pathStr = path instanceof URL ? path.toString() : path; - return Promise.resolve({ + return await Promise.resolve({ path: pathStr, rid: null as number | null, async next(): Promise> { - if (!this.rid) { + if (this.rid == null) { this.rid = await invoke("plugin:fs|read_text_file_lines", { path: pathStr, options, @@ -779,7 +775,8 @@ async function readTextFileLines( if (done) this.rid = null; return { - value: done ? "" : (line as string), + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + value: done ? "" : line!, done, }; }, @@ -819,7 +816,7 @@ async function remove( throw new TypeError("Must be a file URL."); } - return invoke("plugin:fs|remove", { + await invoke("plugin:fs|remove", { path: path instanceof URL ? path.toString() : path, options, }); @@ -862,7 +859,7 @@ async function rename( throw new TypeError("Must be a file URL."); } - return invoke("plugin:fs|rename", { + await invoke("plugin:fs|rename", { oldPath: oldPath instanceof URL ? oldPath.toString() : oldPath, newPath: newPath instanceof URL ? newPath.toString() : newPath, options, @@ -965,7 +962,7 @@ async function truncate( throw new TypeError("Must be a file URL."); } - return invoke("plugin:fs|truncate", { + await invoke("plugin:fs|truncate", { path: path instanceof URL ? path.toString() : path, len, options, @@ -1010,7 +1007,7 @@ async function writeFile( throw new TypeError("Must be a file URL."); } - return invoke("plugin:fs|write_file", { + await invoke("plugin:fs|write_file", { path: path instanceof URL ? path.toString() : path, data: Array.from(data), options, @@ -1037,7 +1034,7 @@ async function writeTextFile( throw new TypeError("Must be a file URL."); } - return invoke("plugin:fs|write_text_file", { + await invoke("plugin:fs|write_text_file", { path: path instanceof URL ? path.toString() : path, data, options, @@ -1071,7 +1068,7 @@ async function exists( throw new TypeError("Must be a file URL."); } - return invoke("plugin:fs|exists", { + return await invoke("plugin:fs|exists", { path: path instanceof URL ? path.toString() : path, options, }); @@ -1098,11 +1095,11 @@ interface DebouncedWatchOptions extends WatchOptions { /** * @since 2.0.0 */ -type WatchEvent = { +interface WatchEvent { type: WatchEventKind; paths: string[]; attrs: unknown; -}; +} /** * @since 2.0.0 diff --git a/plugins/fs/package.json b/plugins/fs/package.json index 09670d39b..f3775e9d2 100644 --- a/plugins/fs/package.json +++ b/plugins/fs/package.json @@ -1,6 +1,6 @@ { "name": "@tauri-apps/plugin-fs", - "version": "2.0.0-beta.2", + "version": "2.0.0-beta.3", "description": "Access the file system.", "license": "MIT or APACHE-2.0", "authors": [ @@ -24,6 +24,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-beta.6" + "@tauri-apps/api": "2.0.0-beta.11" } } diff --git a/plugins/fs/permissions/autogenerated/base-directories/app.toml b/plugins/fs/permissions/autogenerated/base-directories/app.toml index d4acde100..96440bd0e 100644 --- a/plugins/fs/permissions/autogenerated/base-directories/app.toml +++ b/plugins/fs/permissions/autogenerated/base-directories/app.toml @@ -63,7 +63,7 @@ permissions = [ [[set]] identifier = "allow-app-meta-recursive" -description = "This allows read access to metadata of the `$APP` folder, including file listing and statistics." +description = "This allows full recursive read access to metadata of the `$APP` folder, including file listing and statistics." permissions = [ "read-meta", "scope-app-recursive" @@ -71,7 +71,7 @@ permissions = [ [[set]] identifier = "allow-app-meta" -description = "This allows read access to metadata of the `$APP` folder, including file listing and statistics." +description = "This allows non-recursive read access to metadata of the `$APP` folder, including file listing and statistics." permissions = [ "read-meta", "scope-app-index" diff --git a/plugins/fs/permissions/autogenerated/base-directories/appcache.toml b/plugins/fs/permissions/autogenerated/base-directories/appcache.toml index b1a6d44a3..bd017a61a 100644 --- a/plugins/fs/permissions/autogenerated/base-directories/appcache.toml +++ b/plugins/fs/permissions/autogenerated/base-directories/appcache.toml @@ -63,7 +63,7 @@ permissions = [ [[set]] identifier = "allow-appcache-meta-recursive" -description = "This allows read access to metadata of the `$APPCACHE` folder, including file listing and statistics." +description = "This allows full recursive read access to metadata of the `$APPCACHE` folder, including file listing and statistics." permissions = [ "read-meta", "scope-appcache-recursive" @@ -71,7 +71,7 @@ permissions = [ [[set]] identifier = "allow-appcache-meta" -description = "This allows read access to metadata of the `$APPCACHE` folder, including file listing and statistics." +description = "This allows non-recursive read access to metadata of the `$APPCACHE` folder, including file listing and statistics." permissions = [ "read-meta", "scope-appcache-index" diff --git a/plugins/fs/permissions/autogenerated/base-directories/appconfig.toml b/plugins/fs/permissions/autogenerated/base-directories/appconfig.toml index d4219e5c9..d9b57a76c 100644 --- a/plugins/fs/permissions/autogenerated/base-directories/appconfig.toml +++ b/plugins/fs/permissions/autogenerated/base-directories/appconfig.toml @@ -63,7 +63,7 @@ permissions = [ [[set]] identifier = "allow-appconfig-meta-recursive" -description = "This allows read access to metadata of the `$APPCONFIG` folder, including file listing and statistics." +description = "This allows full recursive read access to metadata of the `$APPCONFIG` folder, including file listing and statistics." permissions = [ "read-meta", "scope-appconfig-recursive" @@ -71,7 +71,7 @@ permissions = [ [[set]] identifier = "allow-appconfig-meta" -description = "This allows read access to metadata of the `$APPCONFIG` folder, including file listing and statistics." +description = "This allows non-recursive read access to metadata of the `$APPCONFIG` folder, including file listing and statistics." permissions = [ "read-meta", "scope-appconfig-index" diff --git a/plugins/fs/permissions/autogenerated/base-directories/appdata.toml b/plugins/fs/permissions/autogenerated/base-directories/appdata.toml index f95241b7a..5647b2eaa 100644 --- a/plugins/fs/permissions/autogenerated/base-directories/appdata.toml +++ b/plugins/fs/permissions/autogenerated/base-directories/appdata.toml @@ -63,7 +63,7 @@ permissions = [ [[set]] identifier = "allow-appdata-meta-recursive" -description = "This allows read access to metadata of the `$APPDATA` folder, including file listing and statistics." +description = "This allows full recursive read access to metadata of the `$APPDATA` folder, including file listing and statistics." permissions = [ "read-meta", "scope-appdata-recursive" @@ -71,7 +71,7 @@ permissions = [ [[set]] identifier = "allow-appdata-meta" -description = "This allows read access to metadata of the `$APPDATA` folder, including file listing and statistics." +description = "This allows non-recursive read access to metadata of the `$APPDATA` folder, including file listing and statistics." permissions = [ "read-meta", "scope-appdata-index" diff --git a/plugins/fs/permissions/autogenerated/base-directories/applocaldata.toml b/plugins/fs/permissions/autogenerated/base-directories/applocaldata.toml index 5c74af49f..15b00edf7 100644 --- a/plugins/fs/permissions/autogenerated/base-directories/applocaldata.toml +++ b/plugins/fs/permissions/autogenerated/base-directories/applocaldata.toml @@ -63,7 +63,7 @@ permissions = [ [[set]] identifier = "allow-applocaldata-meta-recursive" -description = "This allows read access to metadata of the `$APPLOCALDATA` folder, including file listing and statistics." +description = "This allows full recursive read access to metadata of the `$APPLOCALDATA` folder, including file listing and statistics." permissions = [ "read-meta", "scope-applocaldata-recursive" @@ -71,7 +71,7 @@ permissions = [ [[set]] identifier = "allow-applocaldata-meta" -description = "This allows read access to metadata of the `$APPLOCALDATA` folder, including file listing and statistics." +description = "This allows non-recursive read access to metadata of the `$APPLOCALDATA` folder, including file listing and statistics." permissions = [ "read-meta", "scope-applocaldata-index" diff --git a/plugins/fs/permissions/autogenerated/base-directories/applog.toml b/plugins/fs/permissions/autogenerated/base-directories/applog.toml index b63731170..e20742c94 100644 --- a/plugins/fs/permissions/autogenerated/base-directories/applog.toml +++ b/plugins/fs/permissions/autogenerated/base-directories/applog.toml @@ -63,7 +63,7 @@ permissions = [ [[set]] identifier = "allow-applog-meta-recursive" -description = "This allows read access to metadata of the `$APPLOG` folder, including file listing and statistics." +description = "This allows full recursive read access to metadata of the `$APPLOG` folder, including file listing and statistics." permissions = [ "read-meta", "scope-applog-recursive" @@ -71,7 +71,7 @@ permissions = [ [[set]] identifier = "allow-applog-meta" -description = "This allows read access to metadata of the `$APPLOG` folder, including file listing and statistics." +description = "This allows non-recursive read access to metadata of the `$APPLOG` folder, including file listing and statistics." permissions = [ "read-meta", "scope-applog-index" diff --git a/plugins/fs/permissions/autogenerated/base-directories/audio.toml b/plugins/fs/permissions/autogenerated/base-directories/audio.toml index 85e5a6bae..1acd968ac 100644 --- a/plugins/fs/permissions/autogenerated/base-directories/audio.toml +++ b/plugins/fs/permissions/autogenerated/base-directories/audio.toml @@ -63,7 +63,7 @@ permissions = [ [[set]] identifier = "allow-audio-meta-recursive" -description = "This allows read access to metadata of the `$AUDIO` folder, including file listing and statistics." +description = "This allows full recursive read access to metadata of the `$AUDIO` folder, including file listing and statistics." permissions = [ "read-meta", "scope-audio-recursive" @@ -71,7 +71,7 @@ permissions = [ [[set]] identifier = "allow-audio-meta" -description = "This allows read access to metadata of the `$AUDIO` folder, including file listing and statistics." +description = "This allows non-recursive read access to metadata of the `$AUDIO` folder, including file listing and statistics." permissions = [ "read-meta", "scope-audio-index" diff --git a/plugins/fs/permissions/autogenerated/base-directories/cache.toml b/plugins/fs/permissions/autogenerated/base-directories/cache.toml index 049b97a8a..eaaac4e73 100644 --- a/plugins/fs/permissions/autogenerated/base-directories/cache.toml +++ b/plugins/fs/permissions/autogenerated/base-directories/cache.toml @@ -63,7 +63,7 @@ permissions = [ [[set]] identifier = "allow-cache-meta-recursive" -description = "This allows read access to metadata of the `$CACHE` folder, including file listing and statistics." +description = "This allows full recursive read access to metadata of the `$CACHE` folder, including file listing and statistics." permissions = [ "read-meta", "scope-cache-recursive" @@ -71,7 +71,7 @@ permissions = [ [[set]] identifier = "allow-cache-meta" -description = "This allows read access to metadata of the `$CACHE` folder, including file listing and statistics." +description = "This allows non-recursive read access to metadata of the `$CACHE` folder, including file listing and statistics." permissions = [ "read-meta", "scope-cache-index" diff --git a/plugins/fs/permissions/autogenerated/base-directories/config.toml b/plugins/fs/permissions/autogenerated/base-directories/config.toml index 8a7f30762..99caa5b41 100644 --- a/plugins/fs/permissions/autogenerated/base-directories/config.toml +++ b/plugins/fs/permissions/autogenerated/base-directories/config.toml @@ -63,7 +63,7 @@ permissions = [ [[set]] identifier = "allow-config-meta-recursive" -description = "This allows read access to metadata of the `$CONFIG` folder, including file listing and statistics." +description = "This allows full recursive read access to metadata of the `$CONFIG` folder, including file listing and statistics." permissions = [ "read-meta", "scope-config-recursive" @@ -71,7 +71,7 @@ permissions = [ [[set]] identifier = "allow-config-meta" -description = "This allows read access to metadata of the `$CONFIG` folder, including file listing and statistics." +description = "This allows non-recursive read access to metadata of the `$CONFIG` folder, including file listing and statistics." permissions = [ "read-meta", "scope-config-index" diff --git a/plugins/fs/permissions/autogenerated/base-directories/data.toml b/plugins/fs/permissions/autogenerated/base-directories/data.toml index d57394608..d7ab55e02 100644 --- a/plugins/fs/permissions/autogenerated/base-directories/data.toml +++ b/plugins/fs/permissions/autogenerated/base-directories/data.toml @@ -63,7 +63,7 @@ permissions = [ [[set]] identifier = "allow-data-meta-recursive" -description = "This allows read access to metadata of the `$DATA` folder, including file listing and statistics." +description = "This allows full recursive read access to metadata of the `$DATA` folder, including file listing and statistics." permissions = [ "read-meta", "scope-data-recursive" @@ -71,7 +71,7 @@ permissions = [ [[set]] identifier = "allow-data-meta" -description = "This allows read access to metadata of the `$DATA` folder, including file listing and statistics." +description = "This allows non-recursive read access to metadata of the `$DATA` folder, including file listing and statistics." permissions = [ "read-meta", "scope-data-index" diff --git a/plugins/fs/permissions/autogenerated/base-directories/desktop.toml b/plugins/fs/permissions/autogenerated/base-directories/desktop.toml index ee43d606a..025b53a82 100644 --- a/plugins/fs/permissions/autogenerated/base-directories/desktop.toml +++ b/plugins/fs/permissions/autogenerated/base-directories/desktop.toml @@ -63,7 +63,7 @@ permissions = [ [[set]] identifier = "allow-desktop-meta-recursive" -description = "This allows read access to metadata of the `$DESKTOP` folder, including file listing and statistics." +description = "This allows full recursive read access to metadata of the `$DESKTOP` folder, including file listing and statistics." permissions = [ "read-meta", "scope-desktop-recursive" @@ -71,7 +71,7 @@ permissions = [ [[set]] identifier = "allow-desktop-meta" -description = "This allows read access to metadata of the `$DESKTOP` folder, including file listing and statistics." +description = "This allows non-recursive read access to metadata of the `$DESKTOP` folder, including file listing and statistics." permissions = [ "read-meta", "scope-desktop-index" diff --git a/plugins/fs/permissions/autogenerated/base-directories/document.toml b/plugins/fs/permissions/autogenerated/base-directories/document.toml index bfdc6cfaf..4f8660715 100644 --- a/plugins/fs/permissions/autogenerated/base-directories/document.toml +++ b/plugins/fs/permissions/autogenerated/base-directories/document.toml @@ -63,7 +63,7 @@ permissions = [ [[set]] identifier = "allow-document-meta-recursive" -description = "This allows read access to metadata of the `$DOCUMENT` folder, including file listing and statistics." +description = "This allows full recursive read access to metadata of the `$DOCUMENT` folder, including file listing and statistics." permissions = [ "read-meta", "scope-document-recursive" @@ -71,7 +71,7 @@ permissions = [ [[set]] identifier = "allow-document-meta" -description = "This allows read access to metadata of the `$DOCUMENT` folder, including file listing and statistics." +description = "This allows non-recursive read access to metadata of the `$DOCUMENT` folder, including file listing and statistics." permissions = [ "read-meta", "scope-document-index" diff --git a/plugins/fs/permissions/autogenerated/base-directories/download.toml b/plugins/fs/permissions/autogenerated/base-directories/download.toml index 0610b0269..b9bd8e6e3 100644 --- a/plugins/fs/permissions/autogenerated/base-directories/download.toml +++ b/plugins/fs/permissions/autogenerated/base-directories/download.toml @@ -63,7 +63,7 @@ permissions = [ [[set]] identifier = "allow-download-meta-recursive" -description = "This allows read access to metadata of the `$DOWNLOAD` folder, including file listing and statistics." +description = "This allows full recursive read access to metadata of the `$DOWNLOAD` folder, including file listing and statistics." permissions = [ "read-meta", "scope-download-recursive" @@ -71,7 +71,7 @@ permissions = [ [[set]] identifier = "allow-download-meta" -description = "This allows read access to metadata of the `$DOWNLOAD` folder, including file listing and statistics." +description = "This allows non-recursive read access to metadata of the `$DOWNLOAD` folder, including file listing and statistics." permissions = [ "read-meta", "scope-download-index" diff --git a/plugins/fs/permissions/autogenerated/base-directories/exe.toml b/plugins/fs/permissions/autogenerated/base-directories/exe.toml index d5c824f82..29141bd09 100644 --- a/plugins/fs/permissions/autogenerated/base-directories/exe.toml +++ b/plugins/fs/permissions/autogenerated/base-directories/exe.toml @@ -63,7 +63,7 @@ permissions = [ [[set]] identifier = "allow-exe-meta-recursive" -description = "This allows read access to metadata of the `$EXE` folder, including file listing and statistics." +description = "This allows full recursive read access to metadata of the `$EXE` folder, including file listing and statistics." permissions = [ "read-meta", "scope-exe-recursive" @@ -71,7 +71,7 @@ permissions = [ [[set]] identifier = "allow-exe-meta" -description = "This allows read access to metadata of the `$EXE` folder, including file listing and statistics." +description = "This allows non-recursive read access to metadata of the `$EXE` folder, including file listing and statistics." permissions = [ "read-meta", "scope-exe-index" diff --git a/plugins/fs/permissions/autogenerated/base-directories/font.toml b/plugins/fs/permissions/autogenerated/base-directories/font.toml index bc0adf52a..5e64cfcae 100644 --- a/plugins/fs/permissions/autogenerated/base-directories/font.toml +++ b/plugins/fs/permissions/autogenerated/base-directories/font.toml @@ -63,7 +63,7 @@ permissions = [ [[set]] identifier = "allow-font-meta-recursive" -description = "This allows read access to metadata of the `$FONT` folder, including file listing and statistics." +description = "This allows full recursive read access to metadata of the `$FONT` folder, including file listing and statistics." permissions = [ "read-meta", "scope-font-recursive" @@ -71,7 +71,7 @@ permissions = [ [[set]] identifier = "allow-font-meta" -description = "This allows read access to metadata of the `$FONT` folder, including file listing and statistics." +description = "This allows non-recursive read access to metadata of the `$FONT` folder, including file listing and statistics." permissions = [ "read-meta", "scope-font-index" diff --git a/plugins/fs/permissions/autogenerated/base-directories/home.toml b/plugins/fs/permissions/autogenerated/base-directories/home.toml index 212b4a25c..3002dbea8 100644 --- a/plugins/fs/permissions/autogenerated/base-directories/home.toml +++ b/plugins/fs/permissions/autogenerated/base-directories/home.toml @@ -63,7 +63,7 @@ permissions = [ [[set]] identifier = "allow-home-meta-recursive" -description = "This allows read access to metadata of the `$HOME` folder, including file listing and statistics." +description = "This allows full recursive read access to metadata of the `$HOME` folder, including file listing and statistics." permissions = [ "read-meta", "scope-home-recursive" @@ -71,7 +71,7 @@ permissions = [ [[set]] identifier = "allow-home-meta" -description = "This allows read access to metadata of the `$HOME` folder, including file listing and statistics." +description = "This allows non-recursive read access to metadata of the `$HOME` folder, including file listing and statistics." permissions = [ "read-meta", "scope-home-index" diff --git a/plugins/fs/permissions/autogenerated/base-directories/localdata.toml b/plugins/fs/permissions/autogenerated/base-directories/localdata.toml index 9090c2047..51198c58d 100644 --- a/plugins/fs/permissions/autogenerated/base-directories/localdata.toml +++ b/plugins/fs/permissions/autogenerated/base-directories/localdata.toml @@ -63,7 +63,7 @@ permissions = [ [[set]] identifier = "allow-localdata-meta-recursive" -description = "This allows read access to metadata of the `$LOCALDATA` folder, including file listing and statistics." +description = "This allows full recursive read access to metadata of the `$LOCALDATA` folder, including file listing and statistics." permissions = [ "read-meta", "scope-localdata-recursive" @@ -71,7 +71,7 @@ permissions = [ [[set]] identifier = "allow-localdata-meta" -description = "This allows read access to metadata of the `$LOCALDATA` folder, including file listing and statistics." +description = "This allows non-recursive read access to metadata of the `$LOCALDATA` folder, including file listing and statistics." permissions = [ "read-meta", "scope-localdata-index" diff --git a/plugins/fs/permissions/autogenerated/base-directories/log.toml b/plugins/fs/permissions/autogenerated/base-directories/log.toml index 569e782c9..1fa803526 100644 --- a/plugins/fs/permissions/autogenerated/base-directories/log.toml +++ b/plugins/fs/permissions/autogenerated/base-directories/log.toml @@ -63,7 +63,7 @@ permissions = [ [[set]] identifier = "allow-log-meta-recursive" -description = "This allows read access to metadata of the `$LOG` folder, including file listing and statistics." +description = "This allows full recursive read access to metadata of the `$LOG` folder, including file listing and statistics." permissions = [ "read-meta", "scope-log-recursive" @@ -71,7 +71,7 @@ permissions = [ [[set]] identifier = "allow-log-meta" -description = "This allows read access to metadata of the `$LOG` folder, including file listing and statistics." +description = "This allows non-recursive read access to metadata of the `$LOG` folder, including file listing and statistics." permissions = [ "read-meta", "scope-log-index" diff --git a/plugins/fs/permissions/autogenerated/base-directories/picture.toml b/plugins/fs/permissions/autogenerated/base-directories/picture.toml index 5a3339893..0982dec38 100644 --- a/plugins/fs/permissions/autogenerated/base-directories/picture.toml +++ b/plugins/fs/permissions/autogenerated/base-directories/picture.toml @@ -63,7 +63,7 @@ permissions = [ [[set]] identifier = "allow-picture-meta-recursive" -description = "This allows read access to metadata of the `$PICTURE` folder, including file listing and statistics." +description = "This allows full recursive read access to metadata of the `$PICTURE` folder, including file listing and statistics." permissions = [ "read-meta", "scope-picture-recursive" @@ -71,7 +71,7 @@ permissions = [ [[set]] identifier = "allow-picture-meta" -description = "This allows read access to metadata of the `$PICTURE` folder, including file listing and statistics." +description = "This allows non-recursive read access to metadata of the `$PICTURE` folder, including file listing and statistics." permissions = [ "read-meta", "scope-picture-index" diff --git a/plugins/fs/permissions/autogenerated/base-directories/public.toml b/plugins/fs/permissions/autogenerated/base-directories/public.toml index 45334801a..64532810d 100644 --- a/plugins/fs/permissions/autogenerated/base-directories/public.toml +++ b/plugins/fs/permissions/autogenerated/base-directories/public.toml @@ -63,7 +63,7 @@ permissions = [ [[set]] identifier = "allow-public-meta-recursive" -description = "This allows read access to metadata of the `$PUBLIC` folder, including file listing and statistics." +description = "This allows full recursive read access to metadata of the `$PUBLIC` folder, including file listing and statistics." permissions = [ "read-meta", "scope-public-recursive" @@ -71,7 +71,7 @@ permissions = [ [[set]] identifier = "allow-public-meta" -description = "This allows read access to metadata of the `$PUBLIC` folder, including file listing and statistics." +description = "This allows non-recursive read access to metadata of the `$PUBLIC` folder, including file listing and statistics." permissions = [ "read-meta", "scope-public-index" diff --git a/plugins/fs/permissions/autogenerated/base-directories/resource.toml b/plugins/fs/permissions/autogenerated/base-directories/resource.toml index 7a08c0f50..f1ec997d2 100644 --- a/plugins/fs/permissions/autogenerated/base-directories/resource.toml +++ b/plugins/fs/permissions/autogenerated/base-directories/resource.toml @@ -63,7 +63,7 @@ permissions = [ [[set]] identifier = "allow-resource-meta-recursive" -description = "This allows read access to metadata of the `$RESOURCE` folder, including file listing and statistics." +description = "This allows full recursive read access to metadata of the `$RESOURCE` folder, including file listing and statistics." permissions = [ "read-meta", "scope-resource-recursive" @@ -71,7 +71,7 @@ permissions = [ [[set]] identifier = "allow-resource-meta" -description = "This allows read access to metadata of the `$RESOURCE` folder, including file listing and statistics." +description = "This allows non-recursive read access to metadata of the `$RESOURCE` folder, including file listing and statistics." permissions = [ "read-meta", "scope-resource-index" diff --git a/plugins/fs/permissions/autogenerated/base-directories/runtime.toml b/plugins/fs/permissions/autogenerated/base-directories/runtime.toml index 3c8ce1eb1..d3f55fc23 100644 --- a/plugins/fs/permissions/autogenerated/base-directories/runtime.toml +++ b/plugins/fs/permissions/autogenerated/base-directories/runtime.toml @@ -63,7 +63,7 @@ permissions = [ [[set]] identifier = "allow-runtime-meta-recursive" -description = "This allows read access to metadata of the `$RUNTIME` folder, including file listing and statistics." +description = "This allows full recursive read access to metadata of the `$RUNTIME` folder, including file listing and statistics." permissions = [ "read-meta", "scope-runtime-recursive" @@ -71,7 +71,7 @@ permissions = [ [[set]] identifier = "allow-runtime-meta" -description = "This allows read access to metadata of the `$RUNTIME` folder, including file listing and statistics." +description = "This allows non-recursive read access to metadata of the `$RUNTIME` folder, including file listing and statistics." permissions = [ "read-meta", "scope-runtime-index" diff --git a/plugins/fs/permissions/autogenerated/base-directories/temp.toml b/plugins/fs/permissions/autogenerated/base-directories/temp.toml index 96ca190ba..7e2b9b372 100644 --- a/plugins/fs/permissions/autogenerated/base-directories/temp.toml +++ b/plugins/fs/permissions/autogenerated/base-directories/temp.toml @@ -63,7 +63,7 @@ permissions = [ [[set]] identifier = "allow-temp-meta-recursive" -description = "This allows read access to metadata of the `$TEMP` folder, including file listing and statistics." +description = "This allows full recursive read access to metadata of the `$TEMP` folder, including file listing and statistics." permissions = [ "read-meta", "scope-temp-recursive" @@ -71,7 +71,7 @@ permissions = [ [[set]] identifier = "allow-temp-meta" -description = "This allows read access to metadata of the `$TEMP` folder, including file listing and statistics." +description = "This allows non-recursive read access to metadata of the `$TEMP` folder, including file listing and statistics." permissions = [ "read-meta", "scope-temp-index" diff --git a/plugins/fs/permissions/autogenerated/base-directories/template.toml b/plugins/fs/permissions/autogenerated/base-directories/template.toml index 45e963934..77a671a6d 100644 --- a/plugins/fs/permissions/autogenerated/base-directories/template.toml +++ b/plugins/fs/permissions/autogenerated/base-directories/template.toml @@ -63,7 +63,7 @@ permissions = [ [[set]] identifier = "allow-template-meta-recursive" -description = "This allows read access to metadata of the `$TEMPLATE` folder, including file listing and statistics." +description = "This allows full recursive read access to metadata of the `$TEMPLATE` folder, including file listing and statistics." permissions = [ "read-meta", "scope-template-recursive" @@ -71,7 +71,7 @@ permissions = [ [[set]] identifier = "allow-template-meta" -description = "This allows read access to metadata of the `$TEMPLATE` folder, including file listing and statistics." +description = "This allows non-recursive read access to metadata of the `$TEMPLATE` folder, including file listing and statistics." permissions = [ "read-meta", "scope-template-index" diff --git a/plugins/fs/permissions/autogenerated/base-directories/video.toml b/plugins/fs/permissions/autogenerated/base-directories/video.toml index 59a659062..a898e4b02 100644 --- a/plugins/fs/permissions/autogenerated/base-directories/video.toml +++ b/plugins/fs/permissions/autogenerated/base-directories/video.toml @@ -63,7 +63,7 @@ permissions = [ [[set]] identifier = "allow-video-meta-recursive" -description = "This allows read access to metadata of the `$VIDEO` folder, including file listing and statistics." +description = "This allows full recursive read access to metadata of the `$VIDEO` folder, including file listing and statistics." permissions = [ "read-meta", "scope-video-recursive" @@ -71,7 +71,7 @@ permissions = [ [[set]] identifier = "allow-video-meta" -description = "This allows read access to metadata of the `$VIDEO` folder, including file listing and statistics." +description = "This allows non-recursive read access to metadata of the `$VIDEO` folder, including file listing and statistics." permissions = [ "read-meta", "scope-video-index" diff --git a/plugins/fs/permissions/autogenerated/reference.md b/plugins/fs/permissions/autogenerated/reference.md index e1fb94d87..e8b76cece 100644 --- a/plugins/fs/permissions/autogenerated/reference.md +++ b/plugins/fs/permissions/autogenerated/reference.md @@ -4,8 +4,8 @@ |`allow-app-write-recursive`|This allows full recursive 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.| +|`allow-app-meta-recursive`|This allows full recursive read access to metadata of the `$APP` folder, including file listing and statistics.| +|`allow-app-meta`|This allows non-recursive 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.| @@ -13,8 +13,8 @@ |`allow-appcache-write-recursive`|This allows full recursive 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.| +|`allow-appcache-meta-recursive`|This allows full recursive read access to metadata of the `$APPCACHE` folder, including file listing and statistics.| +|`allow-appcache-meta`|This allows non-recursive 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.| @@ -22,8 +22,8 @@ |`allow-appconfig-write-recursive`|This allows full recursive 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.| +|`allow-appconfig-meta-recursive`|This allows full recursive read access to metadata of the `$APPCONFIG` folder, including file listing and statistics.| +|`allow-appconfig-meta`|This allows non-recursive 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.| @@ -31,8 +31,8 @@ |`allow-appdata-write-recursive`|This allows full recursive 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.| +|`allow-appdata-meta-recursive`|This allows full recursive read access to metadata of the `$APPDATA` folder, including file listing and statistics.| +|`allow-appdata-meta`|This allows non-recursive 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.| @@ -40,8 +40,8 @@ |`allow-applocaldata-write-recursive`|This allows full recursive 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.| +|`allow-applocaldata-meta-recursive`|This allows full recursive read access to metadata of the `$APPLOCALDATA` folder, including file listing and statistics.| +|`allow-applocaldata-meta`|This allows non-recursive 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.| @@ -49,8 +49,8 @@ |`allow-applog-write-recursive`|This allows full recursive 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.| +|`allow-applog-meta-recursive`|This allows full recursive read access to metadata of the `$APPLOG` folder, including file listing and statistics.| +|`allow-applog-meta`|This allows non-recursive 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.| @@ -58,8 +58,8 @@ |`allow-audio-write-recursive`|This allows full recursive 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.| +|`allow-audio-meta-recursive`|This allows full recursive read access to metadata of the `$AUDIO` folder, including file listing and statistics.| +|`allow-audio-meta`|This allows non-recursive 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.| @@ -67,8 +67,8 @@ |`allow-cache-write-recursive`|This allows full recursive 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.| +|`allow-cache-meta-recursive`|This allows full recursive read access to metadata of the `$CACHE` folder, including file listing and statistics.| +|`allow-cache-meta`|This allows non-recursive 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.| @@ -76,8 +76,8 @@ |`allow-config-write-recursive`|This allows full recursive 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.| +|`allow-config-meta-recursive`|This allows full recursive read access to metadata of the `$CONFIG` folder, including file listing and statistics.| +|`allow-config-meta`|This allows non-recursive 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.| @@ -85,8 +85,8 @@ |`allow-data-write-recursive`|This allows full recursive 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.| +|`allow-data-meta-recursive`|This allows full recursive read access to metadata of the `$DATA` folder, including file listing and statistics.| +|`allow-data-meta`|This allows non-recursive 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.| @@ -94,8 +94,8 @@ |`allow-desktop-write-recursive`|This allows full recursive 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.| +|`allow-desktop-meta-recursive`|This allows full recursive read access to metadata of the `$DESKTOP` folder, including file listing and statistics.| +|`allow-desktop-meta`|This allows non-recursive 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.| @@ -103,8 +103,8 @@ |`allow-document-write-recursive`|This allows full recursive 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.| +|`allow-document-meta-recursive`|This allows full recursive read access to metadata of the `$DOCUMENT` folder, including file listing and statistics.| +|`allow-document-meta`|This allows non-recursive 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.| @@ -112,8 +112,8 @@ |`allow-download-write-recursive`|This allows full recursive 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.| +|`allow-download-meta-recursive`|This allows full recursive read access to metadata of the `$DOWNLOAD` folder, including file listing and statistics.| +|`allow-download-meta`|This allows non-recursive 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.| @@ -121,8 +121,8 @@ |`allow-exe-write-recursive`|This allows full recursive 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.| +|`allow-exe-meta-recursive`|This allows full recursive read access to metadata of the `$EXE` folder, including file listing and statistics.| +|`allow-exe-meta`|This allows non-recursive 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.| @@ -130,8 +130,8 @@ |`allow-font-write-recursive`|This allows full recursive 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.| +|`allow-font-meta-recursive`|This allows full recursive read access to metadata of the `$FONT` folder, including file listing and statistics.| +|`allow-font-meta`|This allows non-recursive 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.| @@ -139,8 +139,8 @@ |`allow-home-write-recursive`|This allows full recursive 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.| +|`allow-home-meta-recursive`|This allows full recursive read access to metadata of the `$HOME` folder, including file listing and statistics.| +|`allow-home-meta`|This allows non-recursive 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.| @@ -148,8 +148,8 @@ |`allow-localdata-write-recursive`|This allows full recursive 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.| +|`allow-localdata-meta-recursive`|This allows full recursive read access to metadata of the `$LOCALDATA` folder, including file listing and statistics.| +|`allow-localdata-meta`|This allows non-recursive 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.| @@ -157,8 +157,8 @@ |`allow-log-write-recursive`|This allows full recursive 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.| +|`allow-log-meta-recursive`|This allows full recursive read access to metadata of the `$LOG` folder, including file listing and statistics.| +|`allow-log-meta`|This allows non-recursive 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.| @@ -166,8 +166,8 @@ |`allow-picture-write-recursive`|This allows full recursive 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.| +|`allow-picture-meta-recursive`|This allows full recursive read access to metadata of the `$PICTURE` folder, including file listing and statistics.| +|`allow-picture-meta`|This allows non-recursive 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.| @@ -175,8 +175,8 @@ |`allow-public-write-recursive`|This allows full recursive 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.| +|`allow-public-meta-recursive`|This allows full recursive read access to metadata of the `$PUBLIC` folder, including file listing and statistics.| +|`allow-public-meta`|This allows non-recursive 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.| @@ -184,8 +184,8 @@ |`allow-resource-write-recursive`|This allows full recursive 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.| +|`allow-resource-meta-recursive`|This allows full recursive read access to metadata of the `$RESOURCE` folder, including file listing and statistics.| +|`allow-resource-meta`|This allows non-recursive 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.| @@ -193,8 +193,8 @@ |`allow-runtime-write-recursive`|This allows full recursive 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.| +|`allow-runtime-meta-recursive`|This allows full recursive read access to metadata of the `$RUNTIME` folder, including file listing and statistics.| +|`allow-runtime-meta`|This allows non-recursive 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.| @@ -202,8 +202,8 @@ |`allow-temp-write-recursive`|This allows full recursive 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.| +|`allow-temp-meta-recursive`|This allows full recursive read access to metadata of the `$TEMP` folder, including file listing and statistics.| +|`allow-temp-meta`|This allows non-recursive 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.| @@ -211,8 +211,8 @@ |`allow-template-write-recursive`|This allows full recursive 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.| +|`allow-template-meta-recursive`|This allows full recursive read access to metadata of the `$TEMPLATE` folder, including file listing and statistics.| +|`allow-template-meta`|This allows non-recursive 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.| @@ -220,8 +220,8 @@ |`allow-video-write-recursive`|This allows full recursive 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.| +|`allow-video-meta-recursive`|This allows full recursive read access to metadata of the `$VIDEO` folder, including file listing and statistics.| +|`allow-video-meta`|This allows non-recursive 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.| diff --git a/plugins/fs/permissions/schemas/schema.json b/plugins/fs/permissions/schemas/schema.json index da7f044b4..304562c3a 100644 --- a/plugins/fs/permissions/schemas/schema.json +++ b/plugins/fs/permissions/schemas/schema.json @@ -323,14 +323,14 @@ ] }, { - "description": "allow-app-meta-recursive -> This allows read access to metadata of the `$APP` folder, including file listing and statistics.", + "description": "allow-app-meta-recursive -> This allows full recursive read access to metadata of the `$APP` folder, including file listing and statistics.", "type": "string", "enum": [ "allow-app-meta-recursive" ] }, { - "description": "allow-app-meta -> This allows read access to metadata of the `$APP` folder, including file listing and statistics.", + "description": "allow-app-meta -> This allows non-recursive read access to metadata of the `$APP` folder, including file listing and statistics.", "type": "string", "enum": [ "allow-app-meta" @@ -386,14 +386,14 @@ ] }, { - "description": "allow-appcache-meta-recursive -> This allows read access to metadata of the `$APPCACHE` folder, including file listing and statistics.", + "description": "allow-appcache-meta-recursive -> This allows full recursive read access to metadata of the `$APPCACHE` folder, including file listing and statistics.", "type": "string", "enum": [ "allow-appcache-meta-recursive" ] }, { - "description": "allow-appcache-meta -> This allows read access to metadata of the `$APPCACHE` folder, including file listing and statistics.", + "description": "allow-appcache-meta -> This allows non-recursive read access to metadata of the `$APPCACHE` folder, including file listing and statistics.", "type": "string", "enum": [ "allow-appcache-meta" @@ -449,14 +449,14 @@ ] }, { - "description": "allow-appconfig-meta-recursive -> This allows read access to metadata of the `$APPCONFIG` folder, including file listing and statistics.", + "description": "allow-appconfig-meta-recursive -> This allows full recursive read access to metadata of the `$APPCONFIG` folder, including file listing and statistics.", "type": "string", "enum": [ "allow-appconfig-meta-recursive" ] }, { - "description": "allow-appconfig-meta -> This allows read access to metadata of the `$APPCONFIG` folder, including file listing and statistics.", + "description": "allow-appconfig-meta -> This allows non-recursive read access to metadata of the `$APPCONFIG` folder, including file listing and statistics.", "type": "string", "enum": [ "allow-appconfig-meta" @@ -512,14 +512,14 @@ ] }, { - "description": "allow-appdata-meta-recursive -> This allows read access to metadata of the `$APPDATA` folder, including file listing and statistics.", + "description": "allow-appdata-meta-recursive -> This allows full recursive read access to metadata of the `$APPDATA` folder, including file listing and statistics.", "type": "string", "enum": [ "allow-appdata-meta-recursive" ] }, { - "description": "allow-appdata-meta -> This allows read access to metadata of the `$APPDATA` folder, including file listing and statistics.", + "description": "allow-appdata-meta -> This allows non-recursive read access to metadata of the `$APPDATA` folder, including file listing and statistics.", "type": "string", "enum": [ "allow-appdata-meta" @@ -575,14 +575,14 @@ ] }, { - "description": "allow-applocaldata-meta-recursive -> This allows read access to metadata of the `$APPLOCALDATA` folder, including file listing and statistics.", + "description": "allow-applocaldata-meta-recursive -> This allows full recursive read access to metadata of the `$APPLOCALDATA` folder, including file listing and statistics.", "type": "string", "enum": [ "allow-applocaldata-meta-recursive" ] }, { - "description": "allow-applocaldata-meta -> This allows read access to metadata of the `$APPLOCALDATA` folder, including file listing and statistics.", + "description": "allow-applocaldata-meta -> This allows non-recursive read access to metadata of the `$APPLOCALDATA` folder, including file listing and statistics.", "type": "string", "enum": [ "allow-applocaldata-meta" @@ -638,14 +638,14 @@ ] }, { - "description": "allow-applog-meta-recursive -> This allows read access to metadata of the `$APPLOG` folder, including file listing and statistics.", + "description": "allow-applog-meta-recursive -> This allows full recursive read access to metadata of the `$APPLOG` folder, including file listing and statistics.", "type": "string", "enum": [ "allow-applog-meta-recursive" ] }, { - "description": "allow-applog-meta -> This allows read access to metadata of the `$APPLOG` folder, including file listing and statistics.", + "description": "allow-applog-meta -> This allows non-recursive read access to metadata of the `$APPLOG` folder, including file listing and statistics.", "type": "string", "enum": [ "allow-applog-meta" @@ -701,14 +701,14 @@ ] }, { - "description": "allow-audio-meta-recursive -> This allows read access to metadata of the `$AUDIO` folder, including file listing and statistics.", + "description": "allow-audio-meta-recursive -> This allows full recursive read access to metadata of the `$AUDIO` folder, including file listing and statistics.", "type": "string", "enum": [ "allow-audio-meta-recursive" ] }, { - "description": "allow-audio-meta -> This allows read access to metadata of the `$AUDIO` folder, including file listing and statistics.", + "description": "allow-audio-meta -> This allows non-recursive read access to metadata of the `$AUDIO` folder, including file listing and statistics.", "type": "string", "enum": [ "allow-audio-meta" @@ -764,14 +764,14 @@ ] }, { - "description": "allow-cache-meta-recursive -> This allows read access to metadata of the `$CACHE` folder, including file listing and statistics.", + "description": "allow-cache-meta-recursive -> This allows full recursive read access to metadata of the `$CACHE` folder, including file listing and statistics.", "type": "string", "enum": [ "allow-cache-meta-recursive" ] }, { - "description": "allow-cache-meta -> This allows read access to metadata of the `$CACHE` folder, including file listing and statistics.", + "description": "allow-cache-meta -> This allows non-recursive read access to metadata of the `$CACHE` folder, including file listing and statistics.", "type": "string", "enum": [ "allow-cache-meta" @@ -827,14 +827,14 @@ ] }, { - "description": "allow-config-meta-recursive -> This allows read access to metadata of the `$CONFIG` folder, including file listing and statistics.", + "description": "allow-config-meta-recursive -> This allows full recursive read access to metadata of the `$CONFIG` folder, including file listing and statistics.", "type": "string", "enum": [ "allow-config-meta-recursive" ] }, { - "description": "allow-config-meta -> This allows read access to metadata of the `$CONFIG` folder, including file listing and statistics.", + "description": "allow-config-meta -> This allows non-recursive read access to metadata of the `$CONFIG` folder, including file listing and statistics.", "type": "string", "enum": [ "allow-config-meta" @@ -890,14 +890,14 @@ ] }, { - "description": "allow-data-meta-recursive -> This allows read access to metadata of the `$DATA` folder, including file listing and statistics.", + "description": "allow-data-meta-recursive -> This allows full recursive read access to metadata of the `$DATA` folder, including file listing and statistics.", "type": "string", "enum": [ "allow-data-meta-recursive" ] }, { - "description": "allow-data-meta -> This allows read access to metadata of the `$DATA` folder, including file listing and statistics.", + "description": "allow-data-meta -> This allows non-recursive read access to metadata of the `$DATA` folder, including file listing and statistics.", "type": "string", "enum": [ "allow-data-meta" @@ -953,14 +953,14 @@ ] }, { - "description": "allow-desktop-meta-recursive -> This allows read access to metadata of the `$DESKTOP` folder, including file listing and statistics.", + "description": "allow-desktop-meta-recursive -> This allows full recursive read access to metadata of the `$DESKTOP` folder, including file listing and statistics.", "type": "string", "enum": [ "allow-desktop-meta-recursive" ] }, { - "description": "allow-desktop-meta -> This allows read access to metadata of the `$DESKTOP` folder, including file listing and statistics.", + "description": "allow-desktop-meta -> This allows non-recursive read access to metadata of the `$DESKTOP` folder, including file listing and statistics.", "type": "string", "enum": [ "allow-desktop-meta" @@ -1016,14 +1016,14 @@ ] }, { - "description": "allow-document-meta-recursive -> This allows read access to metadata of the `$DOCUMENT` folder, including file listing and statistics.", + "description": "allow-document-meta-recursive -> This allows full recursive read access to metadata of the `$DOCUMENT` folder, including file listing and statistics.", "type": "string", "enum": [ "allow-document-meta-recursive" ] }, { - "description": "allow-document-meta -> This allows read access to metadata of the `$DOCUMENT` folder, including file listing and statistics.", + "description": "allow-document-meta -> This allows non-recursive read access to metadata of the `$DOCUMENT` folder, including file listing and statistics.", "type": "string", "enum": [ "allow-document-meta" @@ -1079,14 +1079,14 @@ ] }, { - "description": "allow-download-meta-recursive -> This allows read access to metadata of the `$DOWNLOAD` folder, including file listing and statistics.", + "description": "allow-download-meta-recursive -> This allows full recursive read access to metadata of the `$DOWNLOAD` folder, including file listing and statistics.", "type": "string", "enum": [ "allow-download-meta-recursive" ] }, { - "description": "allow-download-meta -> This allows read access to metadata of the `$DOWNLOAD` folder, including file listing and statistics.", + "description": "allow-download-meta -> This allows non-recursive read access to metadata of the `$DOWNLOAD` folder, including file listing and statistics.", "type": "string", "enum": [ "allow-download-meta" @@ -1142,14 +1142,14 @@ ] }, { - "description": "allow-exe-meta-recursive -> This allows read access to metadata of the `$EXE` folder, including file listing and statistics.", + "description": "allow-exe-meta-recursive -> This allows full recursive read access to metadata of the `$EXE` folder, including file listing and statistics.", "type": "string", "enum": [ "allow-exe-meta-recursive" ] }, { - "description": "allow-exe-meta -> This allows read access to metadata of the `$EXE` folder, including file listing and statistics.", + "description": "allow-exe-meta -> This allows non-recursive read access to metadata of the `$EXE` folder, including file listing and statistics.", "type": "string", "enum": [ "allow-exe-meta" @@ -1205,14 +1205,14 @@ ] }, { - "description": "allow-font-meta-recursive -> This allows read access to metadata of the `$FONT` folder, including file listing and statistics.", + "description": "allow-font-meta-recursive -> This allows full recursive read access to metadata of the `$FONT` folder, including file listing and statistics.", "type": "string", "enum": [ "allow-font-meta-recursive" ] }, { - "description": "allow-font-meta -> This allows read access to metadata of the `$FONT` folder, including file listing and statistics.", + "description": "allow-font-meta -> This allows non-recursive read access to metadata of the `$FONT` folder, including file listing and statistics.", "type": "string", "enum": [ "allow-font-meta" @@ -1268,14 +1268,14 @@ ] }, { - "description": "allow-home-meta-recursive -> This allows read access to metadata of the `$HOME` folder, including file listing and statistics.", + "description": "allow-home-meta-recursive -> This allows full recursive read access to metadata of the `$HOME` folder, including file listing and statistics.", "type": "string", "enum": [ "allow-home-meta-recursive" ] }, { - "description": "allow-home-meta -> This allows read access to metadata of the `$HOME` folder, including file listing and statistics.", + "description": "allow-home-meta -> This allows non-recursive read access to metadata of the `$HOME` folder, including file listing and statistics.", "type": "string", "enum": [ "allow-home-meta" @@ -1331,14 +1331,14 @@ ] }, { - "description": "allow-localdata-meta-recursive -> This allows read access to metadata of the `$LOCALDATA` folder, including file listing and statistics.", + "description": "allow-localdata-meta-recursive -> This allows full recursive read access to metadata of the `$LOCALDATA` folder, including file listing and statistics.", "type": "string", "enum": [ "allow-localdata-meta-recursive" ] }, { - "description": "allow-localdata-meta -> This allows read access to metadata of the `$LOCALDATA` folder, including file listing and statistics.", + "description": "allow-localdata-meta -> This allows non-recursive read access to metadata of the `$LOCALDATA` folder, including file listing and statistics.", "type": "string", "enum": [ "allow-localdata-meta" @@ -1394,14 +1394,14 @@ ] }, { - "description": "allow-log-meta-recursive -> This allows read access to metadata of the `$LOG` folder, including file listing and statistics.", + "description": "allow-log-meta-recursive -> This allows full recursive read access to metadata of the `$LOG` folder, including file listing and statistics.", "type": "string", "enum": [ "allow-log-meta-recursive" ] }, { - "description": "allow-log-meta -> This allows read access to metadata of the `$LOG` folder, including file listing and statistics.", + "description": "allow-log-meta -> This allows non-recursive read access to metadata of the `$LOG` folder, including file listing and statistics.", "type": "string", "enum": [ "allow-log-meta" @@ -1457,14 +1457,14 @@ ] }, { - "description": "allow-picture-meta-recursive -> This allows read access to metadata of the `$PICTURE` folder, including file listing and statistics.", + "description": "allow-picture-meta-recursive -> This allows full recursive read access to metadata of the `$PICTURE` folder, including file listing and statistics.", "type": "string", "enum": [ "allow-picture-meta-recursive" ] }, { - "description": "allow-picture-meta -> This allows read access to metadata of the `$PICTURE` folder, including file listing and statistics.", + "description": "allow-picture-meta -> This allows non-recursive read access to metadata of the `$PICTURE` folder, including file listing and statistics.", "type": "string", "enum": [ "allow-picture-meta" @@ -1520,14 +1520,14 @@ ] }, { - "description": "allow-public-meta-recursive -> This allows read access to metadata of the `$PUBLIC` folder, including file listing and statistics.", + "description": "allow-public-meta-recursive -> This allows full recursive read access to metadata of the `$PUBLIC` folder, including file listing and statistics.", "type": "string", "enum": [ "allow-public-meta-recursive" ] }, { - "description": "allow-public-meta -> This allows read access to metadata of the `$PUBLIC` folder, including file listing and statistics.", + "description": "allow-public-meta -> This allows non-recursive read access to metadata of the `$PUBLIC` folder, including file listing and statistics.", "type": "string", "enum": [ "allow-public-meta" @@ -1583,14 +1583,14 @@ ] }, { - "description": "allow-resource-meta-recursive -> This allows read access to metadata of the `$RESOURCE` folder, including file listing and statistics.", + "description": "allow-resource-meta-recursive -> This allows full recursive read access to metadata of the `$RESOURCE` folder, including file listing and statistics.", "type": "string", "enum": [ "allow-resource-meta-recursive" ] }, { - "description": "allow-resource-meta -> This allows read access to metadata of the `$RESOURCE` folder, including file listing and statistics.", + "description": "allow-resource-meta -> This allows non-recursive read access to metadata of the `$RESOURCE` folder, including file listing and statistics.", "type": "string", "enum": [ "allow-resource-meta" @@ -1646,14 +1646,14 @@ ] }, { - "description": "allow-runtime-meta-recursive -> This allows read access to metadata of the `$RUNTIME` folder, including file listing and statistics.", + "description": "allow-runtime-meta-recursive -> This allows full recursive read access to metadata of the `$RUNTIME` folder, including file listing and statistics.", "type": "string", "enum": [ "allow-runtime-meta-recursive" ] }, { - "description": "allow-runtime-meta -> This allows read access to metadata of the `$RUNTIME` folder, including file listing and statistics.", + "description": "allow-runtime-meta -> This allows non-recursive read access to metadata of the `$RUNTIME` folder, including file listing and statistics.", "type": "string", "enum": [ "allow-runtime-meta" @@ -1709,14 +1709,14 @@ ] }, { - "description": "allow-temp-meta-recursive -> This allows read access to metadata of the `$TEMP` folder, including file listing and statistics.", + "description": "allow-temp-meta-recursive -> This allows full recursive read access to metadata of the `$TEMP` folder, including file listing and statistics.", "type": "string", "enum": [ "allow-temp-meta-recursive" ] }, { - "description": "allow-temp-meta -> This allows read access to metadata of the `$TEMP` folder, including file listing and statistics.", + "description": "allow-temp-meta -> This allows non-recursive read access to metadata of the `$TEMP` folder, including file listing and statistics.", "type": "string", "enum": [ "allow-temp-meta" @@ -1772,14 +1772,14 @@ ] }, { - "description": "allow-template-meta-recursive -> This allows read access to metadata of the `$TEMPLATE` folder, including file listing and statistics.", + "description": "allow-template-meta-recursive -> This allows full recursive read access to metadata of the `$TEMPLATE` folder, including file listing and statistics.", "type": "string", "enum": [ "allow-template-meta-recursive" ] }, { - "description": "allow-template-meta -> This allows read access to metadata of the `$TEMPLATE` folder, including file listing and statistics.", + "description": "allow-template-meta -> This allows non-recursive read access to metadata of the `$TEMPLATE` folder, including file listing and statistics.", "type": "string", "enum": [ "allow-template-meta" @@ -1835,14 +1835,14 @@ ] }, { - "description": "allow-video-meta-recursive -> This allows read access to metadata of the `$VIDEO` folder, including file listing and statistics.", + "description": "allow-video-meta-recursive -> This allows full recursive read access to metadata of the `$VIDEO` folder, including file listing and statistics.", "type": "string", "enum": [ "allow-video-meta-recursive" ] }, { - "description": "allow-video-meta -> This allows read access to metadata of the `$VIDEO` folder, including file listing and statistics.", + "description": "allow-video-meta -> This allows non-recursive read access to metadata of the `$VIDEO` folder, including file listing and statistics.", "type": "string", "enum": [ "allow-video-meta" diff --git a/plugins/fs/src/commands.rs b/plugins/fs/src/commands.rs index e9e747fcf..10f8b1260 100644 --- a/plugins/fs/src/commands.rs +++ b/plugins/fs/src/commands.rs @@ -9,7 +9,7 @@ use tauri::{ ipc::{CommandScope, GlobalScope}, path::{BaseDirectory, SafePathBuf}, utils::config::FsScope, - AppHandle, Manager, Resource, ResourceId, Runtime, + Manager, Resource, ResourceId, Runtime, Webview, }; use std::{ @@ -72,14 +72,14 @@ pub struct BaseOptions { #[tauri::command] pub fn create( - app: AppHandle, + webview: Webview, global_scope: GlobalScope, command_scope: CommandScope, path: SafePathBuf, options: Option, ) -> CommandResult { let resolved_path = resolve_path( - &app, + &webview, &global_scope, &command_scope, path, @@ -91,7 +91,7 @@ pub fn create( resolved_path.display() ) })?; - let rid = app.resources_table().add(StdFileResource::new(file)); + let rid = webview.resources_table().add(StdFileResource::new(file)); Ok(rid) } @@ -122,14 +122,14 @@ fn default_true() -> bool { #[tauri::command] pub fn open( - app: AppHandle, + webview: Webview, global_scope: GlobalScope, command_scope: CommandScope, path: SafePathBuf, options: Option, ) -> CommandResult { let resolved_path = resolve_path( - &app, + &webview, &global_scope, &command_scope, path, @@ -164,14 +164,14 @@ pub fn open( ) })?; - let rid = app.resources_table().add(StdFileResource::new(file)); + let rid = webview.resources_table().add(StdFileResource::new(file)); Ok(rid) } #[tauri::command] -pub fn close(app: AppHandle, rid: ResourceId) -> CommandResult<()> { - app.resources_table().close(rid).map_err(Into::into) +pub fn close(webview: Webview, rid: ResourceId) -> CommandResult<()> { + webview.resources_table().close(rid).map_err(Into::into) } #[derive(Debug, Clone, Deserialize)] @@ -183,7 +183,7 @@ pub struct CopyFileOptions { #[tauri::command] pub fn copy_file( - app: AppHandle, + webview: Webview, global_scope: GlobalScope, command_scope: CommandScope, from_path: SafePathBuf, @@ -191,14 +191,14 @@ pub fn copy_file( options: Option, ) -> CommandResult<()> { let resolved_from_path = resolve_path( - &app, + &webview, &global_scope, &command_scope, from_path, options.as_ref().and_then(|o| o.from_path_base_dir), )?; let resolved_to_path = resolve_path( - &app, + &webview, &global_scope, &command_scope, to_path, @@ -225,14 +225,14 @@ pub struct MkdirOptions { #[tauri::command] pub fn mkdir( - app: AppHandle, + webview: Webview, global_scope: GlobalScope, command_scope: CommandScope, path: SafePathBuf, options: Option, ) -> CommandResult<()> { let resolved_path = resolve_path( - &app, + &webview, &global_scope, &command_scope, path, @@ -292,14 +292,14 @@ fn read_dir_inner>(path: P) -> crate::Result> { #[tauri::command] pub fn read_dir( - app: AppHandle, + webview: Webview, global_scope: GlobalScope, command_scope: CommandScope, path: SafePathBuf, options: Option, ) -> CommandResult> { let resolved_path = resolve_path( - &app, + &webview, &global_scope, &command_scope, path, @@ -318,12 +318,12 @@ pub fn read_dir( #[tauri::command] pub fn read( - app: AppHandle, + webview: Webview, rid: ResourceId, len: u32, ) -> CommandResult<(Vec, usize)> { let mut data = vec![0; len as usize]; - let file = app.resources_table().get::(rid)?; + let file = webview.resources_table().get::(rid)?; let nread = StdFileResource::with_lock(&file, |mut file| file.read(&mut data)) .map_err(|e| format!("faied to read bytes from file with error: {e}"))?; Ok((data, nread)) @@ -331,14 +331,14 @@ pub fn read( #[tauri::command] pub fn read_file( - app: AppHandle, + webview: Webview, global_scope: GlobalScope, command_scope: CommandScope, path: SafePathBuf, options: Option, ) -> CommandResult> { let resolved_path = resolve_path( - &app, + &webview, &global_scope, &command_scope, path, @@ -356,14 +356,14 @@ pub fn read_file( #[tauri::command] pub fn read_text_file( - app: AppHandle, + webview: Webview, global_scope: GlobalScope, command_scope: CommandScope, path: SafePathBuf, options: Option, ) -> CommandResult { let resolved_path = resolve_path( - &app, + &webview, &global_scope, &command_scope, path, @@ -381,7 +381,7 @@ pub fn read_text_file( #[tauri::command] pub fn read_text_file_lines( - app: AppHandle, + webview: Webview, global_scope: GlobalScope, command_scope: CommandScope, path: SafePathBuf, @@ -390,7 +390,7 @@ pub fn read_text_file_lines( use std::io::BufRead; let resolved_path = resolve_path( - &app, + &webview, &global_scope, &command_scope, path, @@ -405,17 +405,17 @@ pub fn read_text_file_lines( })?; let lines = BufReader::new(file).lines(); - let rid = app.resources_table().add(StdLinesResource::new(lines)); + let rid = webview.resources_table().add(StdLinesResource::new(lines)); Ok(rid) } #[tauri::command] pub fn read_text_file_lines_next( - app: AppHandle, + webview: Webview, rid: ResourceId, ) -> CommandResult<(Option, bool)> { - let mut resource_table = app.resources_table(); + let mut resource_table = webview.resources_table(); let lines = resource_table.get::(rid)?; let ret = StdLinesResource::with_lock(&lines, |lines| { @@ -437,14 +437,14 @@ pub struct RemoveOptions { #[tauri::command] pub fn remove( - app: AppHandle, + webview: Webview, global_scope: GlobalScope, command_scope: CommandScope, path: SafePathBuf, options: Option, ) -> CommandResult<()> { let resolved_path = resolve_path( - &app, + &webview, &global_scope, &command_scope, path, @@ -505,7 +505,7 @@ pub struct RenameOptions { #[tauri::command] pub fn rename( - app: AppHandle, + webview: Webview, global_scope: GlobalScope, command_scope: CommandScope, old_path: SafePathBuf, @@ -513,14 +513,14 @@ pub fn rename( options: Option, ) -> CommandResult<()> { let resolved_old_path = resolve_path( - &app, + &webview, &global_scope, &command_scope, old_path, options.as_ref().and_then(|o| o.old_path_base_dir), )?; let resolved_new_path = resolve_path( - &app, + &webview, &global_scope, &command_scope, new_path, @@ -547,13 +547,13 @@ pub enum SeekMode { #[tauri::command] pub fn seek( - app: AppHandle, + webview: Webview, rid: ResourceId, offset: i64, whence: SeekMode, ) -> CommandResult { use std::io::{Seek, SeekFrom}; - let file = app.resources_table().get::(rid)?; + let file = webview.resources_table().get::(rid)?; StdFileResource::with_lock(&file, |mut file| { file.seek(match whence { SeekMode::Start => SeekFrom::Start(offset as u64), @@ -567,14 +567,14 @@ pub fn seek( #[tauri::command] pub fn stat( - app: AppHandle, + webview: Webview, global_scope: GlobalScope, command_scope: CommandScope, path: SafePathBuf, options: Option, ) -> CommandResult { let resolved_path = resolve_path( - &app, + &webview, &global_scope, &command_scope, path, @@ -591,14 +591,14 @@ pub fn stat( #[tauri::command] pub fn lstat( - app: AppHandle, + webview: Webview, global_scope: GlobalScope, command_scope: CommandScope, path: SafePathBuf, options: Option, ) -> CommandResult { let resolved_path = resolve_path( - &app, + &webview, &global_scope, &command_scope, path, @@ -614,8 +614,8 @@ pub fn lstat( } #[tauri::command] -pub fn fstat(app: AppHandle, rid: ResourceId) -> CommandResult { - let file = app.resources_table().get::(rid)?; +pub fn fstat(webview: Webview, rid: ResourceId) -> CommandResult { + let file = webview.resources_table().get::(rid)?; let metadata = StdFileResource::with_lock(&file, |file| file.metadata()) .map_err(|e| format!("failed to get metadata of file with error: {e}"))?; Ok(get_stat(metadata)) @@ -623,7 +623,7 @@ pub fn fstat(app: AppHandle, rid: ResourceId) -> CommandResult( - app: AppHandle, + webview: Webview, global_scope: GlobalScope, command_scope: CommandScope, path: SafePathBuf, @@ -631,7 +631,7 @@ pub fn truncate( options: Option, ) -> CommandResult<()> { let resolved_path = resolve_path( - &app, + &webview, &global_scope, &command_scope, path, @@ -658,11 +658,11 @@ pub fn truncate( #[tauri::command] pub fn ftruncate( - app: AppHandle, + webview: Webview, rid: ResourceId, len: Option, ) -> CommandResult<()> { - let file = app.resources_table().get::(rid)?; + let file = webview.resources_table().get::(rid)?; StdFileResource::with_lock(&file, |file| file.set_len(len.unwrap_or(0))) .map_err(|e| format!("failed to truncate file with error: {e}")) .map_err(Into::into) @@ -670,11 +670,11 @@ pub fn ftruncate( #[tauri::command] pub fn write( - app: AppHandle, + webview: Webview, rid: ResourceId, data: Vec, ) -> CommandResult { - let file = app.resources_table().get::(rid)?; + let file = webview.resources_table().get::(rid)?; StdFileResource::with_lock(&file, |mut file| file.write(&data)) .map_err(|e| format!("failed to write bytes to file with error: {e}")) .map_err(Into::into) @@ -700,7 +700,7 @@ fn default_create_value() -> bool { } fn write_file_inner( - app: AppHandle, + webview: Webview, global_scope: &GlobalScope, command_scope: &CommandScope, path: SafePathBuf, @@ -708,7 +708,7 @@ fn write_file_inner( options: Option, ) -> CommandResult<()> { let resolved_path = resolve_path( - &app, + &webview, global_scope, command_scope, path, @@ -753,19 +753,19 @@ fn write_file_inner( #[tauri::command] pub fn write_file( - app: AppHandle, + webview: Webview, global_scope: GlobalScope, command_scope: CommandScope, path: SafePathBuf, data: Vec, options: Option, ) -> CommandResult<()> { - write_file_inner(app, &global_scope, &command_scope, path, &data, options) + write_file_inner(webview, &global_scope, &command_scope, path, &data, options) } #[tauri::command] pub fn write_text_file( - app: AppHandle, + webview: Webview, global_scope: GlobalScope, command_scope: CommandScope, path: SafePathBuf, @@ -773,7 +773,7 @@ pub fn write_text_file( options: Option, ) -> CommandResult<()> { write_file_inner( - app, + webview, &global_scope, &command_scope, path, @@ -784,14 +784,14 @@ pub fn write_text_file( #[tauri::command] pub fn exists( - app: AppHandle, + webview: Webview, global_scope: GlobalScope, command_scope: CommandScope, path: SafePathBuf, options: Option, ) -> CommandResult { let resolved_path = resolve_path( - &app, + &webview, &global_scope, &command_scope, path, @@ -801,7 +801,7 @@ pub fn exists( } pub fn resolve_path( - app: &AppHandle, + app: &Webview, global_scope: &GlobalScope, command_scope: &CommandScope, path: SafePathBuf, diff --git a/plugins/fs/src/scope.rs b/plugins/fs/src/scope.rs index 29852a0d1..f31c786a6 100644 --- a/plugins/fs/src/scope.rs +++ b/plugins/fs/src/scope.rs @@ -55,9 +55,11 @@ impl Scope { 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 { "*" })); + { + 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())); } @@ -79,9 +81,11 @@ impl Scope { 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 { "*" })); + { + 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())); } diff --git a/plugins/fs/src/watcher.rs b/plugins/fs/src/watcher.rs index 0795aa49e..986aebffe 100644 --- a/plugins/fs/src/watcher.rs +++ b/plugins/fs/src/watcher.rs @@ -8,7 +8,7 @@ use serde::Deserialize; use tauri::{ ipc::{Channel, CommandScope, GlobalScope}, path::{BaseDirectory, SafePathBuf}, - AppHandle, Manager, Resource, ResourceId, Runtime, + Manager, Resource, ResourceId, Runtime, Webview, }; use std::{ @@ -82,7 +82,7 @@ pub struct WatchOptions { #[tauri::command] pub async fn watch( - app: AppHandle, + webview: Webview, paths: Vec, options: WatchOptions, on_event: Channel, @@ -92,7 +92,7 @@ pub async fn watch( let mut resolved_paths = Vec::with_capacity(paths.capacity()); for path in paths { resolved_paths.push(resolve_path( - &app, + &webview, &global_scope, &command_scope, path, @@ -100,7 +100,7 @@ pub async fn watch( )?); } - let mode = if options.recursive { + let recursive_mode = if options.recursive { RecursiveMode::Recursive } else { RecursiveMode::NonRecursive @@ -110,7 +110,8 @@ pub async fn watch( let (tx, rx) = channel(); let mut debouncer = new_debouncer(Duration::from_millis(delay), None, tx)?; for path in &resolved_paths { - debouncer.watcher().watch(path.as_ref(), mode)?; + debouncer.watcher().watch(path.as_ref(), recursive_mode)?; + debouncer.cache().add_root(path, recursive_mode); } watch_debounced(on_event, rx); WatcherKind::Debouncer(debouncer) @@ -118,13 +119,13 @@ pub async fn watch( let (tx, rx) = channel(); let mut watcher = RecommendedWatcher::new(tx, Config::default())?; for path in &resolved_paths { - watcher.watch(path.as_ref(), mode)?; + watcher.watch(path.as_ref(), recursive_mode)?; } watch_raw(on_event, rx); WatcherKind::Watcher(watcher) }; - let rid = app + let rid = webview .resources_table() .add(WatcherResource::new(kind, resolved_paths)); @@ -132,8 +133,8 @@ pub async fn watch( } #[tauri::command] -pub async fn unwatch(app: AppHandle, rid: ResourceId) -> CommandResult<()> { - let watcher = app.resources_table().take::(rid)?; +pub async fn unwatch(webview: Webview, rid: ResourceId) -> CommandResult<()> { + let watcher = webview.resources_table().take::(rid)?; WatcherResource::with_lock(&watcher, |watcher| { match &mut watcher.kind { WatcherKind::Debouncer(ref mut debouncer) => { diff --git a/plugins/global-shortcut/CHANGELOG.md b/plugins/global-shortcut/CHANGELOG.md index ba4bad1dd..13ce003c4 100644 --- a/plugins/global-shortcut/CHANGELOG.md +++ b/plugins/global-shortcut/CHANGELOG.md @@ -2,6 +2,16 @@ ## \[2.0.0-beta.3] +- [`9c7eb359`](https://github.com/tauri-apps/plugins-workspace/commit/9c7eb35967ad10659eb4976bd6f77d9d270bfeed)([#1244](https://github.com/tauri-apps/plugins-workspace/pull/1244)) Refactored APIs to introduce new pressed and released events: + + - Added `ShortcutEvent` and `ShortcutState` types in Rust. + - Changed the handler function passed to `GlobalShortcut::on_shortcut`, `GlobalShortcut::on_all_shortcuts` and `Builder::with_handler` to take a 3rd argument of type `ShortcutEvent`. + - Added `ShortcutEvent` interface in JS. + - Changed `ShortcutHandler` type alias (which affects the JS `register` and `registerAll` APIs) to take `ShortcutEvent` instead of a string. +- [`bd1ed590`](https://github.com/tauri-apps/plugins-workspace/commit/bd1ed5903ffcce5500310dac1e59e8c67674ef1e)([#1237](https://github.com/tauri-apps/plugins-workspace/pull/1237)) Update to tauri beta.17. + +## \[2.0.0-beta.3] + - [`a04ea2f`](https://github.com/tauri-apps/plugins-workspace/commit/a04ea2f38294d5a3987578283badc8eec87a7752)([#1071](https://github.com/tauri-apps/plugins-workspace/pull/1071)) The global API script is now only added to the binary when the `withGlobalTauri` config is true. - [`62dafda`](https://github.com/tauri-apps/plugins-workspace/commit/62dafda6526899b407a7c5a1bb269c5c0dfb2630)([#969](https://github.com/tauri-apps/plugins-workspace/pull/969)) **Breaking change** Refactored the plugin Rust APIs for better DX and flexibility: diff --git a/plugins/global-shortcut/Cargo.toml b/plugins/global-shortcut/Cargo.toml index df7572255..9a0c65cb3 100644 --- a/plugins/global-shortcut/Cargo.toml +++ b/plugins/global-shortcut/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tauri-plugin-global-shortcut" -version = "2.0.0-beta.3" +version = "2.0.0-beta.4" description = "Register global hotkeys listeners on your Tauri application." edition = { workspace = true } authors = { workspace = true } @@ -10,11 +10,11 @@ repository = { 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"] } +tauri-plugin = { workspace = true, features = [ "build" ] } [dependencies] serde = { workspace = true } @@ -24,4 +24,4 @@ log = { workspace = true } thiserror = { workspace = true } [target."cfg(not(any(target_os = \"android\", target_os = \"ios\")))".dependencies] -global-hotkey = "0.2.1" +global-hotkey = { version = "0.5", features = [ "serde" ] } diff --git a/plugins/global-shortcut/README.md b/plugins/global-shortcut/README.md index f3288258e..058b739e1 100644 --- a/plugins/global-shortcut/README.md +++ b/plugins/global-shortcut/README.md @@ -58,17 +58,19 @@ fn main() { #[cfg(desktop)] { use tauri::Manager; - use tauri_plugin_global_shortcut::{Code, Modifiers}; + use tauri_plugin_global_shortcut::{Code, Modifiers, ShortcutState}; app.handle().plugin( tauri_plugin_global_shortcut::Builder::new() .with_shortcuts(["ctrl+d", "alt+space"])? - .with_handler(|app, shortcut| { - if shortcut.matches(Modifiers::CONTROL, Code::KeyD) { - let _ = app.emit("shortcut-event", "Ctrl+D triggered"); - } - if shortcut.matches(Modifiers::ALT, Code::Space) { - let _ = app.emit("shortcut-event", "Alt+Space triggered"); + .with_handler(|app, shortcut, event| { + if event.state == ShortcutState::Pressed { + if shortcut.matches(Modifiers::CONTROL, Code::KeyD) { + let _ = app.emit("shortcut-event", "Ctrl+D triggered"); + } + if shortcut.matches(Modifiers::ALT, Code::Space) { + let _ = app.emit("shortcut-event", "Alt+Space triggered"); + } } }) .build(), @@ -86,8 +88,10 @@ Afterwards all the plugin's APIs are available through the JavaScript bindings: ```javascript import { register } from "@tauri-apps/plugin-global-shortcut"; -await register("CommandOrControl+Shift+C", () => { - console.log("Shortcut triggered"); +await register("CommandOrControl+Shift+C", (event) => { + if (event.state === "Pressed") { + console.log("Shortcut triggered"); + } }); ``` diff --git a/plugins/global-shortcut/api-iife.js b/plugins/global-shortcut/api-iife.js index e0e8833a3..613fcbc18 100644 --- a/plugins/global-shortcut/api-iife.js +++ b/plugins/global-shortcut/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)}function r(t,e,r,n,s){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?s.call(t,r):s?s.value=r:e.set(t,r),r}var n,s,i;"function"==typeof SuppressedError&&SuppressedError;class o{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,n.set(this,(()=>{})),s.set(this,0),i.set(this,{}),this.id=function(t,e=!1){return window.__TAURI_INTERNALS__.transformCallback(t,e)}((({message:t,id:o})=>{if(o===e(this,s,"f")){r(this,s,o+1,"f"),e(this,n,"f").call(this,t);const a=Object.keys(e(this,i,"f"));if(a.length>0){let t=o+1;for(const r of a.sort()){if(parseInt(r)!==t)break;{const s=e(this,i,"f")[r];delete e(this,i,"f")[r],e(this,n,"f").call(this,s),t+=1}}}}else e(this,i,"f")[o.toString()]=t}))}set onmessage(t){r(this,n,t,"f")}get onmessage(){return e(this,n,"f")}toJSON(){return`__CHANNEL__:${this.id}`}}async function a(t,e={},r){return window.__TAURI_INTERNALS__.invoke(t,e,r)}return n=new WeakMap,s=new WeakMap,i=new WeakMap,t.isRegistered=async function(t){return await a("plugin:global-shortcut|is_registered",{shortcut:t})},t.register=async function(t,e){const r=new o;return r.onmessage=e,await a("plugin:global-shortcut|register",{shortcut:t,handler:r})},t.registerAll=async function(t,e){const r=new o;return r.onmessage=e,await a("plugin:global-shortcut|register_all",{shortcuts:t,handler:r})},t.unregister=async function(t){return await a("plugin:global-shortcut|unregister",{shortcut:t})},t.unregisterAll=async function(){return await a("plugin:global-shortcut|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,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(t):s?s.value:e.get(t)}function r(t,e,r,s,n){if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(t,r),r}var s,n,i;"function"==typeof SuppressedError&&SuppressedError;class o{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,s.set(this,(()=>{})),n.set(this,0),i.set(this,{}),this.id=function(t,e=!1){return window.__TAURI_INTERNALS__.transformCallback(t,e)}((({message:t,id:o})=>{if(o===e(this,n,"f")){r(this,n,o+1),e(this,s,"f").call(this,t);const a=Object.keys(e(this,i,"f"));if(a.length>0){let t=o+1;for(const r of a.sort()){if(parseInt(r)!==t)break;{const n=e(this,i,"f")[r];delete e(this,i,"f")[r],e(this,s,"f").call(this,n),t+=1}}r(this,n,t)}}else e(this,i,"f")[o.toString()]=t}))}set onmessage(t){r(this,s,t)}get onmessage(){return e(this,s,"f")}toJSON(){return`__CHANNEL__:${this.id}`}}async function a(t,e={},r){return window.__TAURI_INTERNALS__.invoke(t,e,r)}return s=new WeakMap,n=new WeakMap,i=new WeakMap,t.isRegistered=async function(t){return await a("plugin:global-shortcut|is_registered",{shortcut:t})},t.register=async function(t,e){const r=new o;r.onmessage=e,await a("plugin:global-shortcut|register",{shortcut:t,handler:r})},t.registerAll=async function(t,e){const r=new o;r.onmessage=e,await a("plugin:global-shortcut|register_all",{shortcuts:t,handler:r})},t.unregister=async function(t){await a("plugin:global-shortcut|unregister",{shortcut:t})},t.unregisterAll=async function(){await a("plugin:global-shortcut|unregister_all")},t}({});Object.defineProperty(window.__TAURI__,"globalShortcut",{value:__TAURI_PLUGIN_GLOBALSHORTCUT__})} diff --git a/plugins/global-shortcut/guest-js/index.ts b/plugins/global-shortcut/guest-js/index.ts index e9cd935fe..17bd94e3a 100644 --- a/plugins/global-shortcut/guest-js/index.ts +++ b/plugins/global-shortcut/guest-js/index.ts @@ -10,15 +10,23 @@ import { invoke, Channel } from "@tauri-apps/api/core"; -export type ShortcutHandler = (shortcut: string) => void; +export interface ShortcutEvent { + shortcut: string; + id: number; + state: "Released" | "Pressed"; +} + +export type ShortcutHandler = (event: ShortcutEvent) => void; /** * Register a global shortcut. * @example * ```typescript * import { register } from '@tauri-apps/plugin-global-shortcut'; - * await register('CommandOrControl+Shift+C', () => { - * console.log('Shortcut triggered'); + * await register('CommandOrControl+Shift+C', (event) => { + * if (event.state === "Pressed") { + * console.log('Shortcut triggered'); + * } * }); * ``` * @@ -31,10 +39,10 @@ async function register( shortcut: string, handler: ShortcutHandler, ): Promise { - const h = new Channel(); + const h = new Channel(); h.onmessage = handler; - return await invoke("plugin:global-shortcut|register", { + await invoke("plugin:global-shortcut|register", { shortcut, handler: h, }); @@ -45,8 +53,8 @@ async function register( * @example * ```typescript * import { registerAll } from '@tauri-apps/plugin-global-shortcut'; - * await registerAll(['CommandOrControl+Shift+C', 'Ctrl+Alt+F12'], (shortcut) => { - * console.log(`Shortcut ${shortcut} triggered`); + * await registerAll(['CommandOrControl+Shift+C', 'Ctrl+Alt+F12'], (event) => { + * console.log(`Shortcut ${event.shortcut} ${event.state}`); * }); * ``` * @@ -59,10 +67,10 @@ async function registerAll( shortcuts: string[], handler: ShortcutHandler, ): Promise { - const h = new Channel(); + const h = new Channel(); h.onmessage = handler; - return await invoke("plugin:global-shortcut|register_all", { + await invoke("plugin:global-shortcut|register_all", { shortcuts, handler: h, }); @@ -102,7 +110,7 @@ async function isRegistered(shortcut: string): Promise { * @since 2.0.0 */ async function unregister(shortcut: string): Promise { - return await invoke("plugin:global-shortcut|unregister", { + await invoke("plugin:global-shortcut|unregister", { shortcut, }); } @@ -118,7 +126,7 @@ async function unregister(shortcut: string): Promise { * @since 2.0.0 */ async function unregisterAll(): Promise { - return await invoke("plugin:global-shortcut|unregister_all"); + 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 80b2db67e..86894acbd 100644 --- a/plugins/global-shortcut/package.json +++ b/plugins/global-shortcut/package.json @@ -1,6 +1,6 @@ { "name": "@tauri-apps/plugin-global-shortcut", - "version": "2.0.0-beta.2", + "version": "2.0.0-beta.3", "license": "MIT or APACHE-2.0", "authors": [ "Tauri Programme within The Commons Conservancy" @@ -23,6 +23,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-beta.6" + "@tauri-apps/api": "2.0.0-beta.11" } } diff --git a/plugins/global-shortcut/src/error.rs b/plugins/global-shortcut/src/error.rs index 8157000c8..a1e366a79 100644 --- a/plugins/global-shortcut/src/error.rs +++ b/plugins/global-shortcut/src/error.rs @@ -24,3 +24,9 @@ impl From for Error { Self::GlobalHotkey(value.to_string()) } } + +impl From for Error { + fn from(value: global_hotkey::hotkey::HotKeyParseError) -> Self { + Self::GlobalHotkey(value.to_string()) + } +} diff --git a/plugins/global-shortcut/src/lib.rs b/plugins/global-shortcut/src/lib.rs index 6680c78d4..ff23f5e0e 100644 --- a/plugins/global-shortcut/src/lib.rs +++ b/plugins/global-shortcut/src/lib.rs @@ -20,8 +20,12 @@ use std::{ sync::{Arc, Mutex}, }; -pub use global_hotkey::hotkey::{Code, HotKey as Shortcut, Modifiers}; +pub use global_hotkey::{ + hotkey::{Code, HotKey as Shortcut, Modifiers}, + GlobalHotKeyEvent as ShortcutEvent, HotKeyState as ShortcutState, +}; use global_hotkey::{GlobalHotKeyEvent, GlobalHotKeyManager}; +use serde::Serialize; use tauri::{ ipc::Channel, plugin::{Builder as PluginBuilder, TauriPlugin}, @@ -32,8 +36,9 @@ mod error; pub use error::Error; type Result = std::result::Result; + type HotKeyId = u32; -type HandlerFn = Box, &Shortcut) + Send + Sync + 'static>; +type HandlerFn = Box, &Shortcut, ShortcutEvent) + Send + Sync + 'static>; pub struct ShortcutWrapper(Shortcut); @@ -44,7 +49,7 @@ impl From for ShortcutWrapper { } impl TryFrom<&str> for ShortcutWrapper { - type Error = global_hotkey::Error; + type Error = global_hotkey::hotkey::HotKeyParseError; fn try_from(value: &str) -> std::result::Result { Shortcut::from_str(value).map(ShortcutWrapper) } @@ -63,7 +68,7 @@ pub struct GlobalShortcut { } impl GlobalShortcut { - fn register_internal, &Shortcut) + Send + Sync + 'static>( + fn register_internal, &Shortcut, ShortcutEvent) + Send + Sync + 'static>( &self, shortcut: Shortcut, handler: Option, @@ -82,7 +87,7 @@ impl GlobalShortcut { fn register_all_internal(&self, shortcuts: S, handler: Option) -> Result<()> where S: IntoIterator, - F: Fn(&AppHandle, &Shortcut) + Send + Sync + 'static, + F: Fn(&AppHandle, &Shortcut, ShortcutEvent) + Send + Sync + 'static, { let handler = handler.map(|h| Arc::new(Box::new(h) as HandlerFn)); @@ -111,7 +116,7 @@ impl GlobalShortcut { { self.register_internal( try_into_shortcut(shortcut)?, - None::, &Shortcut)>, + None::, &Shortcut, ShortcutEvent)>, ) } @@ -120,7 +125,7 @@ impl GlobalShortcut { where S: TryInto, S::Error: std::error::Error, - F: Fn(&AppHandle, &Shortcut) + Send + Sync + 'static, + F: Fn(&AppHandle, &Shortcut, ShortcutEvent) + Send + Sync + 'static, { self.register_internal(try_into_shortcut(shortcut)?, Some(handler)) } @@ -136,7 +141,7 @@ impl GlobalShortcut { for shortcut in shortcuts { s.push(try_into_shortcut(shortcut)?); } - self.register_all_internal(s, None::, &Shortcut)>) + self.register_all_internal(s, None::, &Shortcut, ShortcutEvent)>) } /// Register multiple shortcuts with a handler. @@ -145,7 +150,7 @@ impl GlobalShortcut { S: IntoIterator, T: TryInto, T::Error: std::error::Error, - F: Fn(&AppHandle, &Shortcut) + Send + Sync + 'static, + F: Fn(&AppHandle, &Shortcut, ShortcutEvent) + Send + Sync + 'static, { let mut s = Vec::new(); for shortcut in shortcuts { @@ -225,6 +230,13 @@ where .map_err(|e| Error::GlobalHotkey(e.to_string())) } +#[derive(Serialize)] +struct ShortcutJsEvent { + shortcut: String, + id: u32, + state: ShortcutState, +} + #[tauri::command] fn register( _window: Window, @@ -233,10 +245,17 @@ fn register( handler: Channel, ) -> Result<()> { global_shortcut.register_internal( - parse_shortcut(&shortcut)?, - Some(move |_app: &AppHandle, _shortcut: &Shortcut| { - let _ = handler.send(&shortcut); - }), + parse_shortcut(shortcut)?, + Some( + move |_app: &AppHandle, shortcut: &Shortcut, e: ShortcutEvent| { + let js_event = ShortcutJsEvent { + id: e.id, + state: e.state, + shortcut: shortcut.into_string(), + }; + let _ = handler.send(js_event); + }, + ), ) } @@ -258,11 +277,16 @@ fn register_all( global_shortcut.register_all_internal( hotkeys, - Some(move |_app: &AppHandle, shortcut: &Shortcut| { - if let Some(shortcut_str) = shortcut_map.get(&shortcut.id()) { - let _ = handler.send(shortcut_str); - } - }), + Some( + move |_app: &AppHandle, shortcut: &Shortcut, e: ShortcutEvent| { + let js_event = ShortcutJsEvent { + id: e.id, + state: e.state, + shortcut: shortcut.into_string(), + }; + let _ = handler.send(js_event); + }, + ), ) } @@ -341,7 +365,7 @@ impl Builder { } /// Specify a global shortcut handler that will be triggered for any and all shortcuts. - pub fn with_handler, &Shortcut) + Send + Sync + 'static>( + pub fn with_handler, &Shortcut, ShortcutEvent) + Send + Sync + 'static>( mut self, handler: F, ) -> Self { @@ -381,10 +405,10 @@ impl Builder { GlobalHotKeyEvent::set_event_handler(Some(move |e: GlobalHotKeyEvent| { if let Some(shortcut) = shortcuts_.lock().unwrap().get(&e.id) { if let Some(handler) = &shortcut.handler { - handler(&app_handle, &shortcut.shortcut); + handler(&app_handle, &shortcut.shortcut, e); } if let Some(handler) = &handler { - handler(&app_handle, &shortcut.shortcut); + handler(&app_handle, &shortcut.shortcut, e); } } })); diff --git a/plugins/http/CHANGELOG.md b/plugins/http/CHANGELOG.md index 3e4dc2685..00f773b5a 100644 --- a/plugins/http/CHANGELOG.md +++ b/plugins/http/CHANGELOG.md @@ -1,5 +1,26 @@ # Changelog +## \[2.0.0-beta.3] + +- [`bd1ed590`](https://github.com/tauri-apps/plugins-workspace/commit/bd1ed5903ffcce5500310dac1e59e8c67674ef1e)([#1237](https://github.com/tauri-apps/plugins-workspace/pull/1237)) Update to tauri beta.17. + +## \[2.0.0-beta.6] + +### Dependencies + +- Upgraded to `fs@2.0.0-beta.6` + +## \[2.0.0-beta.5] + +- [`500ff10`](https://github.com/tauri-apps/plugins-workspace/commit/500ff10fbd89fdfc73caf9d153029dad567b4ff1)([#1166](https://github.com/tauri-apps/plugins-workspace/pull/1166)) **Breaking change:** Removed the `default-tls` feature flag. The `rustls-tls`, `http2`, `macos-system-configuration`, and `charset` feature flags are now enabled by default. +- [`e3d41f4`](https://github.com/tauri-apps/plugins-workspace/commit/e3d41f4011bd3ea3ce281bb38bbe31d3709f8e0f)([#1191](https://github.com/tauri-apps/plugins-workspace/pull/1191)) Internally use the webview scoped resources table instead of the app one, so other webviews can't access other webviews resources. +- [`7e2fcc5`](https://github.com/tauri-apps/plugins-workspace/commit/7e2fcc5e74df7c3c718e40f75bfb0eafc7d69d8d)([#1146](https://github.com/tauri-apps/plugins-workspace/pull/1146)) Update dependencies to align with tauri 2.0.0-beta.14. +- [`e3d41f4`](https://github.com/tauri-apps/plugins-workspace/commit/e3d41f4011bd3ea3ce281bb38bbe31d3709f8e0f)([#1191](https://github.com/tauri-apps/plugins-workspace/pull/1191)) Update for tauri 2.0.0-beta.15. + +### Dependencies + +- Upgraded to `fs@2.0.0-beta.5` + ## \[2.0.0-beta.4] ### Dependencies @@ -120,3 +141,6 @@ 371\)) First v2 alpha release! ! 371\)) First v2 alpha release! +lpha release! + ! + 371\)) First v2 alpha release! diff --git a/plugins/http/Cargo.toml b/plugins/http/Cargo.toml index 193ef4cae..81fc8f63f 100644 --- a/plugins/http/Cargo.toml +++ b/plugins/http/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tauri-plugin-http" -version = "2.0.0-beta.4" +version = "2.0.0-beta.7" description = "Access an HTTP client written in Rust." edition = { workspace = true } authors = { workspace = true } @@ -10,11 +10,11 @@ repository = { 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"] } +tauri-plugin = { workspace = true, features = [ "build" ] } schemars = { workspace = true } serde = { workspace = true } url = { workspace = true } @@ -26,7 +26,7 @@ serde = { workspace = true } serde_json = { workspace = true } tauri = { workspace = true } thiserror = { workspace = true } -tauri-plugin-fs = { path = "../fs", version = "2.0.0-beta.4" } +tauri-plugin-fs = { path = "../fs", version = "2.0.0-beta.7" } urlpattern = "0.2" regex = "1" http = "1" @@ -35,25 +35,30 @@ url = { workspace = true } data-url = "0.3" [features] -default = ["rustls-tls", "http2", "charset", "macos-system-configuration"] -multipart = ["reqwest/multipart"] -json = ["reqwest/json"] -stream = ["reqwest/stream"] -native-tls = ["reqwest/native-tls"] -native-tls-vendored = ["reqwest/native-tls-vendored"] -native-tls-alpn = ["reqwest/native-tls-alpn"] -rustls-tls = ["reqwest/rustls-tls"] -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"] -http2 = ["reqwest/http2"] -charset = ["reqwest/charset"] -macos-system-configuration = ["reqwest/macos-system-configuration"] -unsafe-headers = [] +default = [ + "rustls-tls", + "http2", + "charset", + "macos-system-configuration" +] +multipart = [ "reqwest/multipart" ] +json = [ "reqwest/json" ] +stream = [ "reqwest/stream" ] +native-tls = [ "reqwest/native-tls" ] +native-tls-vendored = [ "reqwest/native-tls-vendored" ] +native-tls-alpn = [ "reqwest/native-tls-alpn" ] +rustls-tls = [ "reqwest/rustls-tls" ] +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" ] +http2 = [ "reqwest/http2" ] +charset = [ "reqwest/charset" ] +macos-system-configuration = [ "reqwest/macos-system-configuration" ] +unsafe-headers = [ ] diff --git a/plugins/http/api-iife.js b/plugins/http/api-iife.js index 40a09cb90..25a6b7720 100644 --- a/plugins/http/api-iife.js +++ b/plugins/http/api-iife.js @@ -1 +1 @@ -if("__TAURI__"in window){var __TAURI_PLUGIN_HTTP__=function(e){"use strict";async function t(e,t={},r){return window.__TAURI_INTERNALS__.invoke(e,t,r)}return"function"==typeof SuppressedError&&SuppressedError,e.fetch=async function(e,r){const n=r?.maxRedirections,a=r?.connectTimeout,i=r?.proxy;r&&(delete r.maxRedirections,delete r.connectTimeout,delete r.proxy);const s=r?.signal,o=(r?.headers?r.headers instanceof Headers?Array.from(r.headers.entries()):Array.isArray(r.headers)?r.headers:Object.entries(r.headers):[]).map((([e,t])=>[e,"string"==typeof t?t:t.toString()])),d=new Request(e,r),c=await d.arrayBuffer(),u=c.byteLength?Array.from(new Uint8Array(c)):null,_=await t("plugin:http|fetch",{clientConfig:{method:d.method,url:d.url,headers:o,data:u,maxRedirections:n,connectTimeout:a,proxy:i}});s?.addEventListener("abort",(()=>{t("plugin:http|fetch_cancel",{rid:_})}));const{status:f,statusText:h,url:p,headers:l,rid:y}=await t("plugin:http|fetch_send",{rid:_}),T=await t("plugin:http|fetch_read_body",{rid:y}),w=new Response(T instanceof ArrayBuffer&&T.byteLength?T:T instanceof Array&&T.length?new Uint8Array(T):null,{headers:l,status:f,statusText:h});return Object.defineProperty(w,"url",{value:p}),w},e}({});Object.defineProperty(window.__TAURI__,"http",{value:__TAURI_PLUGIN_HTTP__})} +if("__TAURI__"in window){var __TAURI_PLUGIN_HTTP__=function(e){"use strict";async function t(e,t={},r){return window.__TAURI_INTERNALS__.invoke(e,t,r)}return"function"==typeof SuppressedError&&SuppressedError,e.fetch=async function(e,r){const n=r?.maxRedirections,a=r?.connectTimeout,i=r?.proxy;null!=r&&(delete r.maxRedirections,delete r.connectTimeout,delete r.proxy);const s=r?.signal,o=(null==r?.headers?[]:r.headers instanceof Headers?Array.from(r.headers.entries()):Array.isArray(r.headers)?r.headers:Object.entries(r.headers)).map((([e,t])=>[e,"string"==typeof t?t:t.toString()])),d=new Request(e,r),u=await d.arrayBuffer(),c=0!==u.byteLength?Array.from(new Uint8Array(u)):null,_=await t("plugin:http|fetch",{clientConfig:{method:d.method,url:d.url,headers:o,data:c,maxRedirections:n,connectTimeout:a,proxy:i}});s?.addEventListener("abort",(()=>{t("plugin:http|fetch_cancel",{rid:_})}));const{status:l,statusText:f,url:h,headers:p,rid:y}=await t("plugin:http|fetch_send",{rid:_}),T=await t("plugin:http|fetch_read_body",{rid:y}),w=new Response(T instanceof ArrayBuffer&&0!==T.byteLength?T:T instanceof Array&&T.length>0?new Uint8Array(T):null,{headers:p,status:l,statusText:f});return Object.defineProperty(w,"url",{value:h}),w},e}({});Object.defineProperty(window.__TAURI__,"http",{value:__TAURI_PLUGIN_HTTP__})} diff --git a/plugins/http/guest-js/index.ts b/plugins/http/guest-js/index.ts index a1a6d77a4..49b1830be 100644 --- a/plugins/http/guest-js/index.ts +++ b/plugins/http/guest-js/index.ts @@ -31,7 +31,7 @@ import { invoke } from "@tauri-apps/api/core"; * * @since 2.0.0 */ -export type Proxy = { +export interface Proxy { /** * Proxy all traffic to the passed URL. */ @@ -44,7 +44,7 @@ export type Proxy = { * Proxy all HTTPS traffic to the passed URL. */ https?: string | ProxyConfig; -}; +} export interface ProxyConfig { /** @@ -59,7 +59,7 @@ export interface ProxyConfig { password: string; }; /** - * A configuration for filtering out requests that shouldn’t be proxied. + * A configuration for filtering out requests that shouldn't be proxied. * Entries are expected to be comma-separated (whitespace between entries is ignored) */ noProxy?: string; @@ -107,7 +107,7 @@ export async function fetch( const proxy = init?.proxy; // Remove these fields before creating the request - if (init) { + if (init != null) { delete init.maxRedirections; delete init.connectTimeout; delete init.proxy; @@ -115,15 +115,16 @@ export async function fetch( const signal = init?.signal; - const headers = !init?.headers - ? [] - : init.headers instanceof Headers - ? Array.from(init.headers.entries()) - : Array.isArray(init.headers) - ? init.headers - : Object.entries(init.headers); + const headers = + init?.headers == null + ? [] + : init.headers instanceof Headers + ? Array.from(init.headers.entries()) + : Array.isArray(init.headers) + ? init.headers + : Object.entries(init.headers); - const mappedHeaders: [string, string][] = headers.map(([name, val]) => [ + const mappedHeaders: Array<[string, string]> = headers.map(([name, val]) => [ name, // we need to ensure we have all values as strings // eslint-disable-next-line @@ -132,7 +133,8 @@ export async function fetch( const req = new Request(input, init); const buffer = await req.arrayBuffer(); - const reqData = buffer.byteLength ? Array.from(new Uint8Array(buffer)) : null; + const reqData = + buffer.byteLength !== 0 ? Array.from(new Uint8Array(buffer)) : null; const rid = await invoke("plugin:http|fetch", { clientConfig: { @@ -147,7 +149,7 @@ export async function fetch( }); signal?.addEventListener("abort", () => { - invoke("plugin:http|fetch_cancel", { + void invoke("plugin:http|fetch_cancel", { rid, }); }); @@ -178,9 +180,9 @@ export async function fetch( ); const res = new Response( - body instanceof ArrayBuffer && body.byteLength + body instanceof ArrayBuffer && body.byteLength !== 0 ? body - : body instanceof Array && body.length + : body instanceof Array && body.length > 0 ? new Uint8Array(body) : null, { diff --git a/plugins/http/package.json b/plugins/http/package.json index 2b174bb6a..ddaa7d1a4 100644 --- a/plugins/http/package.json +++ b/plugins/http/package.json @@ -1,6 +1,6 @@ { "name": "@tauri-apps/plugin-http", - "version": "2.0.0-beta.2", + "version": "2.0.0-beta.3", "license": "MIT or APACHE-2.0", "authors": [ "Tauri Programme within The Commons Conservancy" @@ -23,6 +23,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-beta.6" + "@tauri-apps/api": "2.0.0-beta.11" } } diff --git a/plugins/http/src/commands.rs b/plugins/http/src/commands.rs index e88608f60..4f93461c9 100644 --- a/plugins/http/src/commands.rs +++ b/plugins/http/src/commands.rs @@ -11,7 +11,7 @@ use tauri::{ async_runtime::Mutex, command, ipc::{CommandScope, GlobalScope}, - AppHandle, Manager, ResourceId, Runtime, + Manager, ResourceId, Runtime, Webview, }; use crate::{ @@ -137,7 +137,7 @@ fn attach_proxy( #[command] pub async fn fetch( - app: AppHandle, + webview: Webview, client_config: ClientConfig, command_scope: CommandScope, global_scope: GlobalScope, @@ -249,7 +249,7 @@ pub async fn fetch( } let fut = async move { Ok(request.send().await.map_err(Into::into)) }; - let mut resources_table = app.resources_table(); + let mut resources_table = webview.resources_table(); let rid = resources_table.add(FetchRequest::new(Box::pin(fut))); Ok(rid) @@ -270,7 +270,7 @@ pub async fn fetch( .body(reqwest::Body::from(body))?; let fut = async move { Ok(Ok(reqwest::Response::from(response))) }; - let mut resources_table = app.resources_table(); + let mut resources_table = webview.resources_table(); let rid = resources_table.add(FetchRequest::new(Box::pin(fut))); Ok(rid) } @@ -279,9 +279,9 @@ pub async fn fetch( } #[command] -pub async fn fetch_cancel(app: AppHandle, rid: ResourceId) -> crate::Result<()> { +pub async fn fetch_cancel(webview: Webview, rid: ResourceId) -> crate::Result<()> { let req = { - let resources_table = app.resources_table(); + let resources_table = webview.resources_table(); resources_table.get::(rid)? }; let mut req = req.0.lock().await; @@ -292,11 +292,11 @@ pub async fn fetch_cancel(app: AppHandle, rid: ResourceId) -> cra #[tauri::command] pub async fn fetch_send( - app: AppHandle, + webview: Webview, rid: ResourceId, ) -> crate::Result { let req = { - let mut resources_table = app.resources_table(); + let mut resources_table = webview.resources_table(); resources_table.take::(rid)? }; @@ -315,7 +315,7 @@ pub async fn fetch_send( )); } - let mut resources_table = app.resources_table(); + let mut resources_table = webview.resources_table(); let rid = resources_table.add(ReqwestResponse(res)); Ok(FetchResponse { @@ -329,11 +329,11 @@ pub async fn fetch_send( #[tauri::command] pub(crate) async fn fetch_read_body( - app: AppHandle, + webview: Webview, rid: ResourceId, ) -> crate::Result { let res = { - let mut resources_table = app.resources_table(); + let mut resources_table = webview.resources_table(); resources_table.take::(rid)? }; let res = Arc::into_inner(res).unwrap().0; diff --git a/plugins/localhost/CHANGELOG.md b/plugins/localhost/CHANGELOG.md index 4823b7e88..7de29bcbb 100644 --- a/plugins/localhost/CHANGELOG.md +++ b/plugins/localhost/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## \[2.0.0-beta.4] + +- [`bd1ed590`](https://github.com/tauri-apps/plugins-workspace/commit/bd1ed5903ffcce5500310dac1e59e8c67674ef1e)([#1237](https://github.com/tauri-apps/plugins-workspace/pull/1237)) Update to tauri beta.17. + ## \[2.0.0-beta.3] - [`a04ea2f`](https://github.com/tauri-apps/plugins-workspace/commit/a04ea2f38294d5a3987578283badc8eec87a7752)([#1071](https://github.com/tauri-apps/plugins-workspace/pull/1071)) The global API script is now only added to the binary when the `withGlobalTauri` config is true. diff --git a/plugins/localhost/Cargo.toml b/plugins/localhost/Cargo.toml index 6d16b0722..a15d96711 100644 --- a/plugins/localhost/Cargo.toml +++ b/plugins/localhost/Cargo.toml @@ -1,12 +1,12 @@ [package] name = "tauri-plugin-localhost" -version = "2.0.0-beta.3" +version = "2.0.0-beta.4" description = "Expose your apps assets through a localhost server instead of the default custom protocol." authors = { workspace = true } license = { workspace = true } edition = { workspace = true } rust-version = { workspace = true } -repository = { workspace = true } +repository = { workspace = true } [package.metadata.docs.rs] rustc-args = [ "--cfg", "docsrs" ] diff --git a/plugins/log/CHANGELOG.md b/plugins/log/CHANGELOG.md index 976a0b0e0..4ebb78438 100644 --- a/plugins/log/CHANGELOG.md +++ b/plugins/log/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## \[2.0.0-beta.4] + +- [`bd1ed590`](https://github.com/tauri-apps/plugins-workspace/commit/bd1ed5903ffcce5500310dac1e59e8c67674ef1e)([#1237](https://github.com/tauri-apps/plugins-workspace/pull/1237)) Update to tauri beta.17. + +## \[2.0.0-beta.3] + +- [`ed46dca`](https://github.com/tauri-apps/plugins-workspace/commit/ed46dca74ff3947dbbcb26a7b571c129bf925698) Added `attachLogger` helper function to register a function that should be called for each log entry. + ## \[2.0.0-beta.3] - [`a04ea2f`](https://github.com/tauri-apps/plugins-workspace/commit/a04ea2f38294d5a3987578283badc8eec87a7752)([#1071](https://github.com/tauri-apps/plugins-workspace/pull/1071)) The global API script is now only added to the binary when the `withGlobalTauri` config is true. diff --git a/plugins/log/Cargo.toml b/plugins/log/Cargo.toml index 6d43308dd..82692506b 100644 --- a/plugins/log/Cargo.toml +++ b/plugins/log/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tauri-plugin-log" -version = "2.0.0-beta.3" +version = "2.0.0-beta.4" description = "Configurable logging for your Tauri app." authors = { workspace = true } license = { workspace = true } @@ -10,11 +10,11 @@ repository = { 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-plugin = { workspace = true, features = ["build"] } +tauri-plugin = { workspace = true, features = [ "build" ] } [dependencies] serde = { workspace = true } @@ -22,8 +22,8 @@ serde_json = { workspace = true } tauri = { workspace = true } serde_repr = "0.1" byte-unit = "5" -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] @@ -32,7 +32,7 @@ android_logger = "0.13" [target."cfg(target_os = \"ios\")".dependencies] swift-rs = "1" objc = "0.2" -cocoa = "0.24" +cocoa = "0.25" [features] -colored = ["fern/colored"] +colored = [ "fern/colored" ] diff --git a/plugins/log/api-iife.js b/plugins/log/api-iife.js index f858afb2c..b6daa4969 100644 --- a/plugins/log/api-iife.js +++ b/plugins/log/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,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})}async function c(e){return await o("log://log",(n=>{const{level:r}=n.payload;let{message:a}=n.payload;a=a.replace(/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g,""),e({message:a,level:r})}))}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.FILE_DROP="tauri://file-drop",e.FILE_DROP_HOVER="tauri://file-drop-hover",e.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 c((({level:e,message:n})=>{switch(e){case t.Trace:console.log(n);break;case t.Debug:console.debug(n);break;case t.Info:console.info(n);break;case t.Warn:console.warn(n);break;case t.Error:console.error(n);break;default:throw new Error(`unknown log level ${e}`)}}))},e.attachLogger=c,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__})} +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=(void 0,{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:u}=a??{};let l=o?.[0]?.filter((e=>e.length>0)).join("@");"Error"===l&&(l="webview::unknown"),await r("plugin:log|log",{level:e,message:n,location:l,file:i,line:c,keyValues:u})}async function c(e){return await o("log://log",(n=>{const{level:r}=n.payload;let{message:a}=n.payload;a=a.replace(/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g,""),e({message:a,level:r})}))}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.WINDOW_CREATED="tauri://window-created",e.WEBVIEW_CREATED="tauri://webview-created",e.DRAG="tauri://drag",e.DROP="tauri://drop",e.DROP_OVER="tauri://drop-over",e.DROP_CANCELLED="tauri://drag-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 c((({level:e,message:n})=>{switch(e){case t.Trace:console.log(n);break;case t.Debug:console.debug(n);break;case t.Info:console.info(n);break;case t.Warn:console.warn(n);break;case t.Error:console.error(n);break;default:throw new Error(`unknown log level ${e}`)}}))},e.attachLogger=c,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/log/guest-js/index.ts b/plugins/log/guest-js/index.ts index b07922ba4..6fa316e46 100644 --- a/plugins/log/guest-js/index.ts +++ b/plugins/log/guest-js/index.ts @@ -5,11 +5,11 @@ import { invoke } from "@tauri-apps/api/core"; import { listen, type UnlistenFn, type Event } from "@tauri-apps/api/event"; -export type LogOptions = { +export interface LogOptions { file?: string; line?: number; keyValues?: Record; -}; +} enum LogLevel { /** @@ -218,7 +218,7 @@ export async function attachLogger(fn: LoggerFn): Promise { * @returns a function to cancel the listener. */ export async function attachConsole(): Promise { - return attachLogger(({ level, message }: RecordPayload) => { + return await attachLogger(({ level, message }: RecordPayload) => { switch (level) { case LogLevel.Trace: console.log(message); diff --git a/plugins/log/package.json b/plugins/log/package.json index 71710966b..af0e7cd76 100644 --- a/plugins/log/package.json +++ b/plugins/log/package.json @@ -1,6 +1,6 @@ { "name": "@tauri-apps/plugin-log", - "version": "2.0.0-beta.2", + "version": "2.0.0-beta.4", "description": "Configurable logging for your Tauri app.", "license": "MIT or APACHE-2.0", "authors": [ @@ -24,6 +24,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-beta.6" + "@tauri-apps/api": "2.0.0-beta.11" } } diff --git a/plugins/log/src/lib.rs b/plugins/log/src/lib.rs index 2cf190065..832f21907 100644 --- a/plugins/log/src/lib.rs +++ b/plugins/log/src/lib.rs @@ -434,7 +434,7 @@ impl Builder { TargetKind::Stderr => std::io::stderr().into(), TargetKind::Folder { path, file_name } => { if !path.exists() { - fs::create_dir_all(&path).unwrap(); + fs::create_dir_all(&path)?; } fern::log_file(get_log_file_path( @@ -450,9 +450,9 @@ impl Builder { TargetKind::LogDir { .. } => continue, #[cfg(desktop)] TargetKind::LogDir { file_name } => { - let path = app_handle.path().app_log_dir().unwrap(); + let path = app_handle.path().app_log_dir()?; if !path.exists() { - fs::create_dir_all(&path).unwrap(); + fs::create_dir_all(&path)?; } fern::log_file(get_log_file_path( @@ -474,7 +474,7 @@ impl Builder { }; let app_handle = app_handle.clone(); tauri::async_runtime::spawn(async move { - app_handle.emit("log://log", payload).unwrap(); + let _ = app_handle.emit("log://log", payload); }); }) } @@ -511,13 +511,9 @@ fn get_log_file_path( file_name, timezone_strategy .get_now() - .format( - &time::format_description::parse( - "[year]-[month]-[day]_[hour]-[minute]-[second]" - ) - .unwrap() - ) - .unwrap(), + .format(&time::format_description::parse( + "[year]-[month]-[day]_[hour]-[minute]-[second]" + )?)?, )); if to.is_file() { // designated rotated log file name already exists @@ -525,7 +521,10 @@ fn get_log_file_path( let mut to_bak = to.clone(); to_bak.set_file_name(format!( "{}.bak", - to_bak.file_name().unwrap().to_string_lossy() + to_bak + .file_name() + .map(|f| f.to_string_lossy()) + .unwrap_or_default() )); fs::rename(&to, to_bak)?; } diff --git a/plugins/nfc/CHANGELOG.md b/plugins/nfc/CHANGELOG.md index 2b51fbbf1..26b84b305 100644 --- a/plugins/nfc/CHANGELOG.md +++ b/plugins/nfc/CHANGELOG.md @@ -2,6 +2,10 @@ ## \[2.0.0-beta.3] +- [`bd1ed590`](https://github.com/tauri-apps/plugins-workspace/commit/bd1ed5903ffcce5500310dac1e59e8c67674ef1e)([#1237](https://github.com/tauri-apps/plugins-workspace/pull/1237)) Update to tauri beta.17. + +## \[2.0.0-beta.3] + - [`a04ea2f`](https://github.com/tauri-apps/plugins-workspace/commit/a04ea2f38294d5a3987578283badc8eec87a7752)([#1071](https://github.com/tauri-apps/plugins-workspace/pull/1071)) The global API script is now only added to the binary when the `withGlobalTauri` config is true. ## \[2.0.0-beta.2] diff --git a/plugins/nfc/Cargo.toml b/plugins/nfc/Cargo.toml index fcb210d7b..607424f72 100644 --- a/plugins/nfc/Cargo.toml +++ b/plugins/nfc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tauri-plugin-nfc" -version = "2.0.0-beta.3" +version = "2.0.0-beta.4" description = "Read and write NFC tags on Android and iOS." edition = { workspace = true } authors = { workspace = true } @@ -9,11 +9,11 @@ repository = { workspace = true } links = "tauri-plugin-nfc" [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"] } +tauri-plugin = { workspace = true, features = [ "build" ] } [dependencies] serde = { workspace = true } diff --git a/plugins/nfc/api-iife.js b/plugins/nfc/api-iife.js index 1828f2b6c..1b1168f39 100644 --- a/plugins/nfc/api-iife.js +++ b/plugins/nfc/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 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__})} +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){0!==e.length&&"urn:"!==e||0!==n.indexOf(t)||(e=t)})),0===e.length&&(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??{};null!=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/nfc/guest-js/index.ts b/plugins/nfc/guest-js/index.ts index b16c8a5c5..8ed1cef28 100644 --- a/plugins/nfc/guest-js/index.ts +++ b/plugins/nfc/guest-js/index.ts @@ -134,7 +134,7 @@ export function textRecord( ): NFCRecord { const payload = Array.from(new TextEncoder().encode(language + text)); payload.unshift(language.length); - return record(NFCTypeNameFormat.NfcWellKnown, RTD_TEXT, id || [], payload); + return record(NFCTypeNameFormat.NfcWellKnown, RTD_TEXT, id ?? [], payload); } const protocols = [ @@ -180,12 +180,15 @@ function encodeURI(uri: string): number[] { let prefix = ""; protocols.slice(1).forEach(function (protocol) { - if ((!prefix || prefix === "urn:") && uri.indexOf(protocol) === 0) { + if ( + (prefix.length === 0 || prefix === "urn:") && + uri.indexOf(protocol) === 0 + ) { prefix = protocol; } }); - if (!prefix) { + if (prefix.length === 0) { prefix = ""; } @@ -203,7 +206,7 @@ export function uriRecord(uri: string, id?: string | number[]): NFCRecord { return record( NFCTypeNameFormat.NfcWellKnown, RTD_URI, - id || [], + id ?? [], encodeURI(uri), ); } @@ -256,12 +259,12 @@ export async function write( records: NFCRecord[], options?: WriteOptions, ): Promise { - const { kind, ...opts } = options || {}; - if (kind) { + const { kind, ...opts } = options ?? {}; + if (kind != null) { // @ts-expect-error map the property opts.kind = mapScanKind(kind); } - return await invoke("plugin:nfc|write", { + await invoke("plugin:nfc|write", { records, ...opts, }); diff --git a/plugins/nfc/package.json b/plugins/nfc/package.json index 06aafe8be..5153aeee0 100644 --- a/plugins/nfc/package.json +++ b/plugins/nfc/package.json @@ -1,6 +1,6 @@ { "name": "@tauri-apps/plugin-nfc", - "version": "2.0.0-beta.2", + "version": "2.0.0-beta.3", "license": "MIT or APACHE-2.0", "authors": [ "Tauri Programme within The Commons Conservancy" @@ -24,6 +24,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-beta.6" + "@tauri-apps/api": "2.0.0-beta.11" } } diff --git a/plugins/notification/CHANGELOG.md b/plugins/notification/CHANGELOG.md index 54781421d..bc40696d6 100644 --- a/plugins/notification/CHANGELOG.md +++ b/plugins/notification/CHANGELOG.md @@ -2,6 +2,14 @@ ## \[2.0.0-beta.3] +- [`bd1ed590`](https://github.com/tauri-apps/plugins-workspace/commit/bd1ed5903ffcce5500310dac1e59e8c67674ef1e)([#1237](https://github.com/tauri-apps/plugins-workspace/pull/1237)) Update to tauri beta.17. + +## \[2.0.0-beta.4] + +- [`326df688`](https://github.com/tauri-apps/plugins-workspace/commit/326df6883998d416fc0837583ed972854628bb52)([#1236](https://github.com/tauri-apps/plugins-workspace/pull/1236)) Fixes command argument parsing on iOS. + +## \[2.0.0-beta.3] + - [`a04ea2f`](https://github.com/tauri-apps/plugins-workspace/commit/a04ea2f38294d5a3987578283badc8eec87a7752)([#1071](https://github.com/tauri-apps/plugins-workspace/pull/1071)) The global API script is now only added to the binary when the `withGlobalTauri` config is true. - [`62ce5df`](https://github.com/tauri-apps/plugins-workspace/commit/62ce5df52ca3c86786e711ef193a206e7b0dc0cf)([#1096](https://github.com/tauri-apps/plugins-workspace/pull/1096)) Fix development mode check to set the app ID on macOS. diff --git a/plugins/notification/Cargo.toml b/plugins/notification/Cargo.toml index df2b6a62f..98f5e19b1 100644 --- a/plugins/notification/Cargo.toml +++ b/plugins/notification/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tauri-plugin-notification" -version = "2.0.0-beta.3" +version = "2.0.0-beta.5" description = "Send desktop and mobile notifications on your Tauri application." edition = { workspace = true } authors = { workspace = true } @@ -10,12 +10,12 @@ repository = { 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-plugin = { workspace = true, features = ["build"] } +tauri-plugin = { workspace = true, features = [ "build" ] } [dependencies] serde = { workspace = true } @@ -24,8 +24,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(windows)".dependencies] @@ -48,9 +48,9 @@ winrt-notification = { package = "tauri-winrt-notification", version = "0.2" } [dev-dependencies] color-backtrace = "0.6" ctor = "0.2" -maplit = "1.0" +maplit = "1" [features] -default = ["zbus", "async"] -async = [] -windows7-compat = ["win7-notifications", "windows-version"] +default = [ "zbus", "async" ] +async = [ ] +windows7-compat = [ "win7-notifications", "windows-version" ] diff --git a/plugins/notification/api-iife.js b/plugins/notification/api-iife.js index 5a3bcb32e..1f961120b 100644 --- a/plugins/notification/api-iife.js +++ b/plugins/notification/api-iife.js @@ -1 +1 @@ -if("__TAURI__"in window){var __TAURI_PLUGIN_NOTIFICATION__=function(e){"use strict";function n(e,n,i,t){if("a"===i&&!t)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof n?e!==n||!t:!n.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?t:"a"===i?t.call(e):t?t.value:n.get(e)}function i(e,n,i,t,o){if("m"===t)throw new TypeError("Private method is not writable");if("a"===t&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof n?e!==n||!o:!n.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===t?o.call(e,i):o?o.value=i:n.set(e,i),i}var t,o,r,a,c,s;"function"==typeof SuppressedError&&SuppressedError;class l{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,t.set(this,(()=>{})),o.set(this,0),r.set(this,{}),this.id=function(e,n=!1){return window.__TAURI_INTERNALS__.transformCallback(e,n)}((({message:e,id:a})=>{if(a===n(this,o,"f")){i(this,o,a+1,"f"),n(this,t,"f").call(this,e);const c=Object.keys(n(this,r,"f"));if(c.length>0){let e=a+1;for(const i of c.sort()){if(parseInt(i)!==e)break;{const o=n(this,r,"f")[i];delete n(this,r,"f")[i],n(this,t,"f").call(this,o),e+=1}}}}else n(this,r,"f")[a.toString()]=e}))}set onmessage(e){i(this,t,e,"f")}get onmessage(){return n(this,t,"f")}toJSON(){return`__CHANNEL__:${this.id}`}}t=new WeakMap,o=new WeakMap,r=new WeakMap;class u{constructor(e,n,i){this.plugin=e,this.event=n,this.channelId=i}async unregister(){return d(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}}async function f(e,n,i){const t=new l;return t.onmessage=i,d(`plugin:${e}|register_listener`,{event:n,handler:t}).then((()=>new u(e,n,t.id)))}async function d(e,n={},i){return window.__TAURI_INTERNALS__.invoke(e,n,i)}e.ScheduleEvery=void 0,(a=e.ScheduleEvery||(e.ScheduleEvery={})).Year="year",a.Month="month",a.TwoWeeks="twoWeeks",a.Week="week",a.Day="day",a.Hour="hour",a.Minute="minute",a.Second="second";return e.Importance=void 0,(c=e.Importance||(e.Importance={}))[c.None=0]="None",c[c.Min=1]="Min",c[c.Low=2]="Low",c[c.Default=3]="Default",c[c.High=4]="High",e.Visibility=void 0,(s=e.Visibility||(e.Visibility={}))[s.Secret=-1]="Secret",s[s.Private=0]="Private",s[s.Public=1]="Public",e.Schedule=class{static at(e,n=!1,i=!1){return{at:{date:e,repeating:n,allowWhileIdle:i},interval:void 0,every:void 0}}static interval(e,n=!1){return{at:void 0,interval:{interval:e,allowWhileIdle:n},every:void 0}}static every(e,n,i=!1){return{at:void 0,interval:void 0,every:{interval:e,count:n,allowWhileIdle:i}}}},e.active=async function(){return d("plugin:notification|get_active")},e.cancel=async function(e){return d("plugin:notification|cancel",{notifications:e})},e.cancelAll=async function(){return d("plugin:notification|cancel")},e.channels=async function(){return d("plugin:notification|listChannels")},e.createChannel=async function(e){return d("plugin:notification|create_channel",{...e})},e.isPermissionGranted=async function(){return"default"!==window.Notification.permission?Promise.resolve("granted"===window.Notification.permission):d("plugin:notification|is_permission_granted")},e.onAction=async function(e){return f("notification","actionPerformed",e)},e.onNotificationReceived=async function(e){return f("notification","notification",e)},e.pending=async function(){return d("plugin:notification|get_pending")},e.registerActionTypes=async function(e){return d("plugin:notification|register_action_types",{types:e})},e.removeActive=async function(e){return d("plugin:notification|remove_active",{notifications:e})},e.removeAllActive=async function(){return d("plugin:notification|remove_active")},e.removeChannel=async function(e){return d("plugin:notification|delete_channel",{id:e})},e.requestPermission=async function(){return window.Notification.requestPermission()},e.sendNotification=function(e){"string"==typeof e?new window.Notification(e):new window.Notification(e.title,e)},e}({});Object.defineProperty(window.__TAURI__,"notification",{value:__TAURI_PLUGIN_NOTIFICATION__})} +if("__TAURI__"in window){var __TAURI_PLUGIN_NOTIFICATION__=function(i){"use strict";function t(i,t,n,e){if("a"===n&&!e)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?i!==t||!e:!t.has(i))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?e:"a"===n?e.call(i):e?e.value:t.get(i)}function n(i,t,n,e,o){if("function"==typeof t?i!==t||!o:!t.has(i))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(i,n),n}var e,o,a,r,c,s;"function"==typeof SuppressedError&&SuppressedError;class l{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,e.set(this,(()=>{})),o.set(this,0),a.set(this,{}),this.id=function(i,t=!1){return window.__TAURI_INTERNALS__.transformCallback(i,t)}((({message:i,id:r})=>{if(r===t(this,o,"f")){n(this,o,r+1),t(this,e,"f").call(this,i);const c=Object.keys(t(this,a,"f"));if(c.length>0){let i=r+1;for(const n of c.sort()){if(parseInt(n)!==i)break;{const o=t(this,a,"f")[n];delete t(this,a,"f")[n],t(this,e,"f").call(this,o),i+=1}}n(this,o,i)}}else t(this,a,"f")[r.toString()]=i}))}set onmessage(i){n(this,e,i)}get onmessage(){return t(this,e,"f")}toJSON(){return`__CHANNEL__:${this.id}`}}e=new WeakMap,o=new WeakMap,a=new WeakMap;class u{constructor(i,t,n){this.plugin=i,this.event=t,this.channelId=n}async unregister(){return d(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}}async function f(i,t,n){const e=new l;return e.onmessage=n,d(`plugin:${i}|register_listener`,{event:t,handler:e}).then((()=>new u(i,t,e.id)))}async function d(i,t={},n){return window.__TAURI_INTERNALS__.invoke(i,t,n)}i.ScheduleEvery=void 0,(r=i.ScheduleEvery||(i.ScheduleEvery={})).Year="year",r.Month="month",r.TwoWeeks="twoWeeks",r.Week="week",r.Day="day",r.Hour="hour",r.Minute="minute",r.Second="second";return i.Importance=void 0,(c=i.Importance||(i.Importance={}))[c.None=0]="None",c[c.Min=1]="Min",c[c.Low=2]="Low",c[c.Default=3]="Default",c[c.High=4]="High",i.Visibility=void 0,(s=i.Visibility||(i.Visibility={}))[s.Secret=-1]="Secret",s[s.Private=0]="Private",s[s.Public=1]="Public",i.Schedule=class{static at(i,t=!1,n=!1){return{at:{date:i,repeating:t,allowWhileIdle:n},interval:void 0,every:void 0}}static interval(i,t=!1){return{at:void 0,interval:{interval:i,allowWhileIdle:t},every:void 0}}static every(i,t,n=!1){return{at:void 0,interval:void 0,every:{interval:i,count:t,allowWhileIdle:n}}}},i.active=async function(){return await d("plugin:notification|get_active")},i.cancel=async function(i){await d("plugin:notification|cancel",{notifications:i})},i.cancelAll=async function(){await d("plugin:notification|cancel")},i.channels=async function(){return await d("plugin:notification|listChannels")},i.createChannel=async function(i){await d("plugin:notification|create_channel",{...i})},i.isPermissionGranted=async function(){return"default"!==window.Notification.permission?await Promise.resolve("granted"===window.Notification.permission):await d("plugin:notification|is_permission_granted")},i.onAction=async function(i){return await f("notification","actionPerformed",i)},i.onNotificationReceived=async function(i){return await f("notification","notification",i)},i.pending=async function(){return await d("plugin:notification|get_pending")},i.registerActionTypes=async function(i){await d("plugin:notification|register_action_types",{types:i})},i.removeActive=async function(i){await d("plugin:notification|remove_active",{notifications:i})},i.removeAllActive=async function(){await d("plugin:notification|remove_active")},i.removeChannel=async function(i){await d("plugin:notification|delete_channel",{id:i})},i.requestPermission=async function(){return await window.Notification.requestPermission()},i.sendNotification=function(i){"string"==typeof i?new window.Notification(i):new window.Notification(i.title,i)},i}({});Object.defineProperty(window.__TAURI__,"notification",{value:__TAURI_PLUGIN_NOTIFICATION__})} diff --git a/plugins/notification/guest-js/index.ts b/plugins/notification/guest-js/index.ts index b7bac7d70..f7ac9e910 100644 --- a/plugins/notification/guest-js/index.ts +++ b/plugins/notification/guest-js/index.ts @@ -11,7 +11,7 @@ import { invoke, - PluginListener, + type PluginListener, addPluginListener, } from "@tauri-apps/api/core"; @@ -103,7 +103,7 @@ interface Options { /** * Extra payload to store in the notification. */ - extra?: { [key: string]: unknown }; + extra?: Record; /** * If true, the notification cannot be dismissed by the user on Android. * @@ -130,7 +130,7 @@ interface Options { number?: number; } -type ScheduleInterval = { +interface ScheduleInterval { year?: number; month?: number; day?: number; @@ -147,7 +147,7 @@ type ScheduleInterval = { hour?: number; minute?: number; second?: number; -}; +} enum ScheduleEvery { Year = "year", @@ -171,12 +171,14 @@ class Schedule { allowWhileIdle: boolean; } | undefined; + interval: | { interval: ScheduleInterval; allowWhileIdle: boolean; } | undefined; + every: | { interval: ScheduleEvery; @@ -317,9 +319,9 @@ type Permission = "granted" | "denied" | "default"; */ async function isPermissionGranted(): Promise { if (window.Notification.permission !== "default") { - return Promise.resolve(window.Notification.permission === "granted"); + return await Promise.resolve(window.Notification.permission === "granted"); } - return invoke("plugin:notification|is_permission_granted"); + return await invoke("plugin:notification|is_permission_granted"); } /** @@ -339,7 +341,7 @@ async function isPermissionGranted(): Promise { * @since 2.0.0 */ async function requestPermission(): Promise { - return window.Notification.requestPermission(); + return await window.Notification.requestPermission(); } /** @@ -390,7 +392,7 @@ function sendNotification(options: Options | string): void { * @since 2.0.0 */ async function registerActionTypes(types: ActionType[]): Promise { - return invoke("plugin:notification|register_action_types", { types }); + await invoke("plugin:notification|register_action_types", { types }); } /** @@ -407,7 +409,7 @@ async function registerActionTypes(types: ActionType[]): Promise { * @since 2.0.0 */ async function pending(): Promise { - return invoke("plugin:notification|get_pending"); + return await invoke("plugin:notification|get_pending"); } /** @@ -424,7 +426,7 @@ async function pending(): Promise { * @since 2.0.0 */ async function cancel(notifications: number[]): Promise { - return invoke("plugin:notification|cancel", { notifications }); + await invoke("plugin:notification|cancel", { notifications }); } /** @@ -441,7 +443,7 @@ async function cancel(notifications: number[]): Promise { * @since 2.0.0 */ async function cancelAll(): Promise { - return invoke("plugin:notification|cancel"); + await invoke("plugin:notification|cancel"); } /** @@ -458,7 +460,7 @@ async function cancelAll(): Promise { * @since 2.0.0 */ async function active(): Promise { - return invoke("plugin:notification|get_active"); + return await invoke("plugin:notification|get_active"); } /** @@ -475,9 +477,9 @@ async function active(): Promise { * @since 2.0.0 */ async function removeActive( - notifications: { id: number; tag?: string }[], + notifications: Array<{ id: number; tag?: string }>, ): Promise { - return invoke("plugin:notification|remove_active", { notifications }); + await invoke("plugin:notification|remove_active", { notifications }); } /** @@ -494,7 +496,7 @@ async function removeActive( * @since 2.0.0 */ async function removeAllActive(): Promise { - return invoke("plugin:notification|remove_active"); + await invoke("plugin:notification|remove_active"); } /** @@ -518,7 +520,7 @@ async function removeAllActive(): Promise { * @since 2.0.0 */ async function createChannel(channel: Channel): Promise { - return invoke("plugin:notification|create_channel", { ...channel }); + await invoke("plugin:notification|create_channel", { ...channel }); } /** @@ -535,7 +537,7 @@ async function createChannel(channel: Channel): Promise { * @since 2.0.0 */ async function removeChannel(id: string): Promise { - return invoke("plugin:notification|delete_channel", { id }); + await invoke("plugin:notification|delete_channel", { id }); } /** @@ -552,19 +554,19 @@ async function removeChannel(id: string): Promise { * @since 2.0.0 */ async function channels(): Promise { - return invoke("plugin:notification|listChannels"); + return await invoke("plugin:notification|listChannels"); } async function onNotificationReceived( cb: (notification: Options) => void, ): Promise { - return addPluginListener("notification", "notification", cb); + return await addPluginListener("notification", "notification", cb); } async function onAction( cb: (notification: Options) => void, ): Promise { - return addPluginListener("notification", "actionPerformed", cb); + return await addPluginListener("notification", "actionPerformed", cb); } export type { diff --git a/plugins/notification/guest-js/init.ts b/plugins/notification/guest-js/init.ts index 85c593fc9..2ace24891 100644 --- a/plugins/notification/guest-js/init.ts +++ b/plugins/notification/guest-js/init.ts @@ -9,22 +9,28 @@ import type { Options } from "./index"; let permissionSettable = false; let permissionValue = "default"; - function isPermissionGranted() { + async function isPermissionGranted(): Promise { if (window.Notification.permission !== "default") { - return Promise.resolve(window.Notification.permission === "granted"); + return await Promise.resolve( + window.Notification.permission === "granted", + ); } - return invoke("plugin:notification|is_permission_granted"); + return await invoke("plugin:notification|is_permission_granted"); } - function setNotificationPermission(value: "granted" | "denied" | "default") { + function setNotificationPermission( + value: "granted" | "denied" | "default", + ): void { permissionSettable = true; // @ts-expect-error we can actually set this value on the webview window.Notification.permission = value; permissionSettable = false; } - function requestPermission() { - return invoke<"prompt" | "default" | "granted" | "denied">( + async function requestPermission(): Promise< + "default" | "denied" | "granted" | "prompt" + > { + return await invoke<"prompt" | "default" | "granted" | "denied">( "plugin:notification|request_permission", ).then((permission) => { setNotificationPermission( @@ -34,12 +40,12 @@ import type { Options } from "./index"; }); } - function sendNotification(options: string | Options) { + async function sendNotification(options: string | Options): Promise { if (typeof options === "object") { Object.freeze(options); } - return invoke("plugin:notification|notify", { + await invoke("plugin:notification|notify", { options: typeof options === "string" ? { @@ -51,8 +57,10 @@ import type { Options } from "./index"; // @ts-expect-error unfortunately we can't implement the whole type, so we overwrite it with our own version window.Notification = function (title, options) { + // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions const opts = options || {}; - sendNotification( + void sendNotification( + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument Object.assign(opts, { title, }), @@ -73,7 +81,7 @@ import type { Options } from "./index"; }, }); - isPermissionGranted().then(function (response) { + void isPermissionGranted().then(function (response) { if (response === null) { setNotificationPermission("default"); } else { diff --git a/plugins/notification/ios/Sources/NotificationCategory.swift b/plugins/notification/ios/Sources/NotificationCategory.swift index a5d4eea6b..f796e03aa 100644 --- a/plugins/notification/ios/Sources/NotificationCategory.swift +++ b/plugins/notification/ios/Sources/NotificationCategory.swift @@ -40,7 +40,7 @@ func makeActions(_ actions: [Action]) -> [UNNotificationAction] { for action in actions { var newAction: UNNotificationAction - if action.input { + if action.input ?? false { if action.inputButtonTitle != nil { newAction = UNTextInputNotificationAction( identifier: action.id, @@ -66,30 +66,30 @@ func makeActions(_ actions: [Action]) -> [UNNotificationAction] { } func makeActionOptions(_ action: Action) -> UNNotificationActionOptions { - if action.foreground { + if action.foreground ?? false { return .foreground } - if action.destructive { + if action.destructive ?? false { return .destructive } - if action.requiresAuthentication { + if action.requiresAuthentication ?? false { return .authenticationRequired } return UNNotificationActionOptions(rawValue: 0) } func makeCategoryOptions(_ type: ActionType) -> UNNotificationCategoryOptions { - if type.customDismissAction { + if type.customDismissAction ?? false { return .customDismissAction } - if type.allowInCarPlay { + if type.allowInCarPlay ?? false { return .allowInCarPlay } - if type.hiddenPreviewsShowTitle { + if type.hiddenPreviewsShowTitle ?? false { return .hiddenPreviewsShowTitle } - if type.hiddenPreviewsShowSubtitle { + if type.hiddenPreviewsShowSubtitle ?? false { return .hiddenPreviewsShowSubtitle } diff --git a/plugins/notification/ios/Sources/NotificationPlugin.swift b/plugins/notification/ios/Sources/NotificationPlugin.swift index 53c9788e0..c8974b369 100644 --- a/plugins/notification/ios/Sources/NotificationPlugin.swift +++ b/plugins/notification/ios/Sources/NotificationPlugin.swift @@ -64,9 +64,9 @@ struct NotificationAttachment: Codable { struct Notification: Decodable { let id: Int - var title: String = "" - var body: String = "" - var extra: [String: String] = [:] + var title: String + var body: String + var extra: [String: String]? let schedule: NotificationSchedule? let attachments: [NotificationAttachment]? let sound: String? @@ -126,10 +126,10 @@ struct CancelArgs: Decodable { struct Action: Decodable { let id: String let title: String - var requiresAuthentication: Bool = false - var foreground: Bool = false - var destructive: Bool = false - var input: Bool = false + var requiresAuthentication: Bool? + var foreground: Bool? + var destructive: Bool? + var input: Bool? let inputButtonTitle: String? let inputPlaceholder: String? } @@ -138,10 +138,10 @@ struct ActionType: Decodable { let id: String let actions: [Action] let hiddenPreviewsBodyPlaceholder: String? - var customDismissAction = false - var allowInCarPlay = false - var hiddenPreviewsShowTitle = false - var hiddenPreviewsShowSubtitle = false + var customDismissAction: Bool? + var allowInCarPlay: Bool? + var hiddenPreviewsShowTitle: Bool? + var hiddenPreviewsShowSubtitle: Bool? let hiddenBodyPlaceholder: String? } diff --git a/plugins/notification/package.json b/plugins/notification/package.json index ea0acd4b5..9182738b0 100644 --- a/plugins/notification/package.json +++ b/plugins/notification/package.json @@ -1,6 +1,6 @@ { "name": "@tauri-apps/plugin-notification", - "version": "2.0.0-beta.2", + "version": "2.0.0-beta.3", "license": "MIT or APACHE-2.0", "authors": [ "Tauri Programme within The Commons Conservancy" @@ -23,6 +23,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-beta.6" + "@tauri-apps/api": "2.0.0-beta.11" } } diff --git a/plugins/notification/src/init-iife.js b/plugins/notification/src/init-iife.js index b7e206b05..eddbeb05c 100644 --- a/plugins/notification/src/init-iife.js +++ b/plugins/notification/src/init-iife.js @@ -1 +1 @@ -!function(){"use strict";async function i(i,n={},t){return window.__TAURI_INTERNALS__.invoke(i,n,t)}"function"==typeof SuppressedError&&SuppressedError,function(){let n=!1,t="default";function o(i){n=!0,window.Notification.permission=i,n=!1}window.Notification=function(n,t){const o=t||{};!function(n){"object"==typeof n&&Object.freeze(n),i("plugin:notification|notify",{options:"string"==typeof n?{title:n}:n})}(Object.assign(o,{title:n}))},window.Notification.requestPermission=function(){return i("plugin:notification|request_permission").then((i=>(o("prompt"===i?"default":i),i)))},Object.defineProperty(window.Notification,"permission",{enumerable:!0,get:()=>t,set:i=>{if(!n)throw new Error("Readonly property");t=i}}),("default"!==window.Notification.permission?Promise.resolve("granted"===window.Notification.permission):i("plugin:notification|is_permission_granted")).then((function(i){o(null===i?"default":i?"granted":"denied")}))}()}(); +!function(){"use strict";async function i(i,n={},t){return window.__TAURI_INTERNALS__.invoke(i,n,t)}"function"==typeof SuppressedError&&SuppressedError,function(){let n=!1,t="default";function o(i){n=!0,window.Notification.permission=i,n=!1}window.Notification=function(n,t){const o=t||{};!async function(n){"object"==typeof n&&Object.freeze(n),await i("plugin:notification|notify",{options:"string"==typeof n?{title:n}:n})}(Object.assign(o,{title:n}))},window.Notification.requestPermission=async function(){return await i("plugin:notification|request_permission").then((i=>(o("prompt"===i?"default":i),i)))},Object.defineProperty(window.Notification,"permission",{enumerable:!0,get:()=>t,set:i=>{if(!n)throw new Error("Readonly property");t=i}}),async function(){return"default"!==window.Notification.permission?await Promise.resolve("granted"===window.Notification.permission):await i("plugin:notification|is_permission_granted")}().then((function(i){o(null===i?"default":i?"granted":"denied")}))}()}(); diff --git a/plugins/os/CHANGELOG.md b/plugins/os/CHANGELOG.md index 6f4e72797..d52f4f4e6 100644 --- a/plugins/os/CHANGELOG.md +++ b/plugins/os/CHANGELOG.md @@ -2,6 +2,10 @@ ## \[2.0.0-beta.3] +- [`bd1ed590`](https://github.com/tauri-apps/plugins-workspace/commit/bd1ed5903ffcce5500310dac1e59e8c67674ef1e)([#1237](https://github.com/tauri-apps/plugins-workspace/pull/1237)) Update to tauri beta.17. + +## \[2.0.0-beta.3] + - [`a04ea2f`](https://github.com/tauri-apps/plugins-workspace/commit/a04ea2f38294d5a3987578283badc8eec87a7752)([#1071](https://github.com/tauri-apps/plugins-workspace/pull/1071)) The global API script is now only added to the binary when the `withGlobalTauri` config is true. ## \[2.0.0-beta.2] diff --git a/plugins/os/Cargo.toml b/plugins/os/Cargo.toml index 0fe1726a0..e6311f2e1 100644 --- a/plugins/os/Cargo.toml +++ b/plugins/os/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tauri-plugin-os" -version = "2.0.0-beta.3" +version = "2.0.0-beta.4" description = "Read information about the operating system." edition = { workspace = true } authors = { workspace = true } @@ -10,11 +10,11 @@ repository = { 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"] } +tauri-plugin = { workspace = true, features = [ "build" ] } [dependencies] serde = { workspace = true } diff --git a/plugins/os/api-iife.js b/plugins/os/api-iife.js index ef02e2da3..80fb7d624 100644 --- a/plugins/os/api-iife.js +++ b/plugins/os/api-iife.js @@ -1 +1 @@ -if("__TAURI__"in window){var __TAURI_PLUGIN_OS__=function(n){"use strict";async function o(n,o={},e){return window.__TAURI_INTERNALS__.invoke(n,o,e)}return"function"==typeof SuppressedError&&SuppressedError,n.arch=async function(){return o("plugin:os|arch")},n.eol=function(){return window.__TAURI_OS_PLUGIN_INTERNALS__.eol},n.exeExtension=async function(){return o("plugin:os|exe_extension")},n.family=async function(){return o("plugin:os|family")},n.hostname=async function(){return o("plugin:os|hostname")},n.locale=async function(){return o("plugin:os|locale")},n.platform=async function(){return o("plugin:os|platform")},n.type=async function(){return o("plugin:os|os_type")},n.version=async function(){return o("plugin:os|version")},n}({});Object.defineProperty(window.__TAURI__,"os",{value:__TAURI_PLUGIN_OS__})} +if("__TAURI__"in window){var __TAURI_PLUGIN_OS__=function(n){"use strict";async function t(n,t={},i){return window.__TAURI_INTERNALS__.invoke(n,t,i)}return"function"==typeof SuppressedError&&SuppressedError,n.arch=async function(){return await t("plugin:os|arch")},n.eol=function(){return window.__TAURI_OS_PLUGIN_INTERNALS__.eol},n.exeExtension=async function(){return await t("plugin:os|exe_extension")},n.family=async function(){return await t("plugin:os|family")},n.hostname=async function(){return await t("plugin:os|hostname")},n.locale=async function(){return await t("plugin:os|locale")},n.platform=async function(){return await t("plugin:os|platform")},n.type=async function(){return await t("plugin:os|os_type")},n.version=async function(){return await t("plugin:os|version")},n}({});Object.defineProperty(window.__TAURI__,"os",{value:__TAURI_PLUGIN_OS__})} diff --git a/plugins/os/guest-js/index.ts b/plugins/os/guest-js/index.ts index 152d0f723..f7913e13f 100644 --- a/plugins/os/guest-js/index.ts +++ b/plugins/os/guest-js/index.ts @@ -53,7 +53,7 @@ type Arch = * * @since 2.0.0 * */ -function eol() { +function eol(): string { return window.__TAURI_OS_PLUGIN_INTERNALS__.eol; } @@ -71,7 +71,7 @@ function eol() { * */ async function platform(): Promise { - return invoke("plugin:os|platform"); + return await invoke("plugin:os|platform"); } /** @@ -85,7 +85,7 @@ async function platform(): Promise { * @since 2.0.0 */ async function version(): Promise { - return invoke("plugin:os|version"); + return await invoke("plugin:os|version"); } type Family = "unix" | "windows"; @@ -101,7 +101,7 @@ type Family = "unix" | "windows"; * @since 2.0.0 */ async function family(): Promise { - return invoke("plugin:os|family"); + return await invoke("plugin:os|family"); } /** @@ -115,7 +115,7 @@ async function family(): Promise { * @since 2.0.0 */ async function type(): Promise { - return invoke("plugin:os|os_type"); + return await invoke("plugin:os|os_type"); } /** @@ -130,7 +130,7 @@ async function type(): Promise { * @since 2.0.0 */ async function arch(): Promise { - return invoke("plugin:os|arch"); + return await invoke("plugin:os|arch"); } /** @@ -147,7 +147,7 @@ async function arch(): Promise { * @since 2.0.0 */ async function locale(): Promise { - return invoke("plugin:os|locale"); + return await invoke("plugin:os|locale"); } /** @@ -161,7 +161,7 @@ async function locale(): Promise { * @since 2.0.0 */ async function exeExtension(): Promise { - return invoke("plugin:os|exe_extension"); + return await invoke("plugin:os|exe_extension"); } /** @@ -173,7 +173,7 @@ async function exeExtension(): Promise { * ``` */ async function hostname(): Promise { - return invoke("plugin:os|hostname"); + return await invoke("plugin:os|hostname"); } export { diff --git a/plugins/os/package.json b/plugins/os/package.json index 8fc9917c3..354ab81ff 100644 --- a/plugins/os/package.json +++ b/plugins/os/package.json @@ -1,6 +1,6 @@ { "name": "@tauri-apps/plugin-os", - "version": "2.0.0-beta.2", + "version": "2.0.0-beta.3", "license": "MIT or APACHE-2.0", "authors": [ "Tauri Programme within The Commons Conservancy" @@ -23,6 +23,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-beta.6" + "@tauri-apps/api": "2.0.0-beta.11" } } diff --git a/plugins/persisted-scope/CHANGELOG.md b/plugins/persisted-scope/CHANGELOG.md index 749a366ef..3f253b2f7 100644 --- a/plugins/persisted-scope/CHANGELOG.md +++ b/plugins/persisted-scope/CHANGELOG.md @@ -1,5 +1,25 @@ # Changelog +## \[2.0.0-beta.7] + +- [`bd1ed590`](https://github.com/tauri-apps/plugins-workspace/commit/bd1ed5903ffcce5500310dac1e59e8c67674ef1e)([#1237](https://github.com/tauri-apps/plugins-workspace/pull/1237)) Update to tauri beta.17. + +### Dependencies + +- Upgraded to `fs@2.0.0-beta.7` + +## \[2.0.0-beta.6] + +### Dependencies + +- Upgraded to `fs@2.0.0-beta.6` + +## \[2.0.0-beta.5] + +### Dependencies + +- Upgraded to `fs@2.0.0-beta.5` + ## \[2.0.0-beta.4] ### Dependencies diff --git a/plugins/persisted-scope/Cargo.toml b/plugins/persisted-scope/Cargo.toml index 7361d3a6d..6b8b14f0b 100644 --- a/plugins/persisted-scope/Cargo.toml +++ b/plugins/persisted-scope/Cargo.toml @@ -1,12 +1,12 @@ [package] name = "tauri-plugin-persisted-scope" -version = "2.0.0-beta.4" +version = "2.0.0-beta.7" description = "Save filesystem and asset scopes and restore them when the app is reopened." authors = { workspace = true } license = { workspace = true } edition = { workspace = true } rust-version = { workspace = true } -repository = { workspace = true } +repository = { workspace = true } [package.metadata.docs.rs] rustc-args = [ "--cfg", "docsrs" ] @@ -20,7 +20,7 @@ log = { workspace = true } thiserror = { workspace = true } aho-corasick = "1" bincode = "1" -tauri-plugin-fs = { path = "../fs", version = "2.0.0-beta.4" } +tauri-plugin-fs = { path = "../fs", version = "2.0.0-beta.7" } [features] protocol-asset = [ "tauri/protocol-asset" ] diff --git a/plugins/positioner/CHANGELOG.md b/plugins/positioner/CHANGELOG.md index 36f497bb8..c7fe1b83c 100644 --- a/plugins/positioner/CHANGELOG.md +++ b/plugins/positioner/CHANGELOG.md @@ -2,6 +2,10 @@ ## \[2.0.0-beta.3] +- [`bd1ed590`](https://github.com/tauri-apps/plugins-workspace/commit/bd1ed5903ffcce5500310dac1e59e8c67674ef1e)([#1237](https://github.com/tauri-apps/plugins-workspace/pull/1237)) Update to tauri beta.17. + +## \[2.0.0-beta.3] + - [`a04ea2f`](https://github.com/tauri-apps/plugins-workspace/commit/a04ea2f38294d5a3987578283badc8eec87a7752)([#1071](https://github.com/tauri-apps/plugins-workspace/pull/1071)) The global API script is now only added to the binary when the `withGlobalTauri` config is true. ## \[2.0.0-beta.2] diff --git a/plugins/positioner/Cargo.toml b/plugins/positioner/Cargo.toml index 4e98fc811..74eeae929 100644 --- a/plugins/positioner/Cargo.toml +++ b/plugins/positioner/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tauri-plugin-positioner" -version = "2.0.0-beta.3" +version = "2.0.0-beta.4" description = "Position your windows at well-known locations." authors = { workspace = true } license = { workspace = true } @@ -10,11 +10,11 @@ repository = { 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"] } +tauri-plugin = { workspace = true, features = [ "build" ] } [dependencies] serde = { workspace = true } @@ -25,4 +25,4 @@ thiserror = { workspace = true } serde_repr = "0.1" [features] -tray-icon = ["tauri/tray-icon"] +tray-icon = [ "tauri/tray-icon" ] diff --git a/plugins/positioner/package.json b/plugins/positioner/package.json index ad62d8a18..2b53d4512 100644 --- a/plugins/positioner/package.json +++ b/plugins/positioner/package.json @@ -1,6 +1,6 @@ { "name": "@tauri-apps/plugin-positioner", - "version": "2.0.0-beta.2", + "version": "2.0.0-beta.3", "description": "Position your windows at well-known locations.", "license": "MIT or APACHE-2.0", "authors": [ @@ -24,6 +24,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-beta.6" + "@tauri-apps/api": "2.0.0-beta.11" } } diff --git a/plugins/positioner/src/ext.rs b/plugins/positioner/src/ext.rs index 36ec7f917..4688cd51c 100644 --- a/plugins/positioner/src/ext.rs +++ b/plugins/positioner/src/ext.rs @@ -8,7 +8,7 @@ use crate::Tray; use serde_repr::Deserialize_repr; #[cfg(feature = "tray-icon")] use tauri::Manager; -use tauri::{PhysicalPosition, PhysicalSize, Result, Runtime, Window}; +use tauri::{PhysicalPosition, PhysicalSize, Result, Runtime, WebviewWindow, Window}; /// Well known window positions. #[derive(Debug, Deserialize_repr)] @@ -45,6 +45,11 @@ pub trait WindowExt { fn move_window(&self, position: Position) -> Result<()>; } +impl WindowExt for WebviewWindow { + fn move_window(&self, pos: Position) -> Result<()> { + self.as_ref().window().move_window(pos) + } +} impl WindowExt for Window { fn move_window(&self, pos: Position) -> Result<()> { use Position::*; diff --git a/plugins/process/CHANGELOG.md b/plugins/process/CHANGELOG.md index 5b48ed78e..ab644c9fd 100644 --- a/plugins/process/CHANGELOG.md +++ b/plugins/process/CHANGELOG.md @@ -2,6 +2,10 @@ ## \[2.0.0-beta.3] +- [`bd1ed590`](https://github.com/tauri-apps/plugins-workspace/commit/bd1ed5903ffcce5500310dac1e59e8c67674ef1e)([#1237](https://github.com/tauri-apps/plugins-workspace/pull/1237)) Update to tauri beta.17. + +## \[2.0.0-beta.3] + - [`a04ea2f`](https://github.com/tauri-apps/plugins-workspace/commit/a04ea2f38294d5a3987578283badc8eec87a7752)([#1071](https://github.com/tauri-apps/plugins-workspace/pull/1071)) The global API script is now only added to the binary when the `withGlobalTauri` config is true. ## \[2.0.0-beta.2] diff --git a/plugins/process/Cargo.toml b/plugins/process/Cargo.toml index 316d2f452..7f3bc1124 100644 --- a/plugins/process/Cargo.toml +++ b/plugins/process/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tauri-plugin-process" -version = "2.0.0-beta.3" +version = "2.0.0-beta.4" description = "Access the current process of your Tauri application." edition = { workspace = true } authors = { workspace = true } @@ -10,11 +10,11 @@ repository = { 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"] } +tauri-plugin = { workspace = true, features = [ "build" ] } [dependencies] tauri = { workspace = true } diff --git a/plugins/process/api-iife.js b/plugins/process/api-iife.js index df87d8c9a..b214396ee 100644 --- a/plugins/process/api-iife.js +++ b/plugins/process/api-iife.js @@ -1 +1 @@ -if("__TAURI__"in window){var __TAURI_PLUGIN_PROCESS__=function(n){"use strict";async function r(n,r={},_){return window.__TAURI_INTERNALS__.invoke(n,r,_)}return"function"==typeof SuppressedError&&SuppressedError,n.exit=async function(n=0){return r("plugin:process|exit",{code:n})},n.relaunch=async function(){return r("plugin:process|restart")},n}({});Object.defineProperty(window.__TAURI__,"process",{value:__TAURI_PLUGIN_PROCESS__})} +if("__TAURI__"in window){var __TAURI_PLUGIN_PROCESS__=function(_){"use strict";async function n(_,n={},e){return window.__TAURI_INTERNALS__.invoke(_,n,e)}return"function"==typeof SuppressedError&&SuppressedError,_.exit=async function(_=0){await n("plugin:process|exit",{code:_})},_.relaunch=async function(){await n("plugin:process|restart")},_}({});Object.defineProperty(window.__TAURI__,"process",{value:__TAURI_PLUGIN_PROCESS__})} diff --git a/plugins/process/guest-js/index.ts b/plugins/process/guest-js/index.ts index 2d30b346c..e3c35eb4a 100644 --- a/plugins/process/guest-js/index.ts +++ b/plugins/process/guest-js/index.ts @@ -23,7 +23,7 @@ import { invoke } from "@tauri-apps/api/core"; * @since 2.0.0 */ async function exit(code = 0): Promise { - return invoke("plugin:process|exit", { code }); + await invoke("plugin:process|exit", { code }); } /** @@ -39,7 +39,7 @@ async function exit(code = 0): Promise { * @since 2.0.0 */ async function relaunch(): Promise { - return invoke("plugin:process|restart"); + await invoke("plugin:process|restart"); } export { exit, relaunch }; diff --git a/plugins/process/package.json b/plugins/process/package.json index 0e21d8000..0d884d3f6 100644 --- a/plugins/process/package.json +++ b/plugins/process/package.json @@ -1,6 +1,6 @@ { "name": "@tauri-apps/plugin-process", - "version": "2.0.0-beta.2", + "version": "2.0.0-beta.3", "license": "MIT or APACHE-2.0", "authors": [ "Tauri Programme within The Commons Conservancy" @@ -23,6 +23,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-beta.6" + "@tauri-apps/api": "2.0.0-beta.11" } } diff --git a/plugins/shell/CHANGELOG.md b/plugins/shell/CHANGELOG.md index 4c0d32b69..027140cc1 100644 --- a/plugins/shell/CHANGELOG.md +++ b/plugins/shell/CHANGELOG.md @@ -2,6 +2,10 @@ ## \[2.0.0-beta.3] +- [`bd1ed590`](https://github.com/tauri-apps/plugins-workspace/commit/bd1ed5903ffcce5500310dac1e59e8c67674ef1e)([#1237](https://github.com/tauri-apps/plugins-workspace/pull/1237)) Update to tauri beta.17. + +## \[2.0.0-beta.3] + - [`a04ea2f`](https://github.com/tauri-apps/plugins-workspace/commit/a04ea2f38294d5a3987578283badc8eec87a7752)([#1071](https://github.com/tauri-apps/plugins-workspace/pull/1071)) The global API script is now only added to the binary when the `withGlobalTauri` config is true. - [`040004a`](https://github.com/tauri-apps/plugins-workspace/commit/040004a6b9fbb89161d1b5764d79428dfe693776)([#1069](https://github.com/tauri-apps/plugins-workspace/pull/1069)) Change shell's schema property name `command` to `cmd`. diff --git a/plugins/shell/Cargo.toml b/plugins/shell/Cargo.toml index de34e23f4..66240fb44 100644 --- a/plugins/shell/Cargo.toml +++ b/plugins/shell/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tauri-plugin-shell" -version = "2.0.0-beta.3" +version = "2.0.0-beta.4" description = "Access the system shell. Allows you to spawn child processes and manage files and URLs using their default application." edition = { workspace = true } authors = { workspace = true } @@ -10,11 +10,11 @@ repository = { 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"] } +tauri-plugin = { workspace = true, features = [ "build" ] } schemars = { workspace = true } serde = { workspace = true } @@ -23,10 +23,11 @@ serde = { workspace = true } schemars = { workspace = true } serde_json = { workspace = true } tauri = { workspace = true } +tokio = { version = "1", features = [ "time" ] } log = { workspace = true } thiserror = { workspace = true } shared_child = "1" regex = "1" -open = { version = "5", features = ["shellexecute-on-windows"] } +open = { version = "5", features = [ "shellexecute-on-windows" ] } encoding_rs = "0.8" os_pipe = "1" diff --git a/plugins/shell/api-iife.js b/plugins/shell/api-iife.js index efd4706b8..40c33e380 100644 --- a/plugins/shell/api-iife.js +++ b/plugins/shell/api-iife.js @@ -1 +1 @@ -if("__TAURI__"in window){var __TAURI_PLUGIN_SHELL__=function(e){"use strict";function t(e,t,s,r){if("a"===s&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===s?r:"a"===s?r.call(e):r?r.value:t.get(e)}function s(e,t,s,r,n){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?n.call(e,s):n?n.value=s:t.set(e,s),s}var r,n,i;"function"==typeof SuppressedError&&SuppressedError;class o{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,r.set(this,(()=>{})),n.set(this,0),i.set(this,{}),this.id=function(e,t=!1){return window.__TAURI_INTERNALS__.transformCallback(e,t)}((({message:e,id:o})=>{if(o===t(this,n,"f")){s(this,n,o+1,"f"),t(this,r,"f").call(this,e);const a=Object.keys(t(this,i,"f"));if(a.length>0){let e=o+1;for(const s of a.sort()){if(parseInt(s)!==e)break;{const n=t(this,i,"f")[s];delete t(this,i,"f")[s],t(this,r,"f").call(this,n),e+=1}}}}else t(this,i,"f")[o.toString()]=e}))}set onmessage(e){s(this,r,e,"f")}get onmessage(){return t(this,r,"f")}toJSON(){return`__CHANNEL__:${this.id}`}}async function a(e,t={},s){return window.__TAURI_INTERNALS__.invoke(e,t,s)}r=new WeakMap,n=new WeakMap,i=new WeakMap;class h{constructor(){this.eventListeners=Object.create(null)}addListener(e,t){return this.on(e,t)}removeListener(e,t){return this.off(e,t)}on(e,t){return e in this.eventListeners?this.eventListeners[e].push(t):this.eventListeners[e]=[t],this}once(e,t){const s=r=>{this.removeListener(e,s),t(r)};return this.addListener(e,s)}off(e,t){return e in this.eventListeners&&(this.eventListeners[e]=this.eventListeners[e].filter((e=>e!==t))),this}removeAllListeners(e){return e?delete this.eventListeners[e]:this.eventListeners=Object.create(null),this}emit(e,t){if(e in this.eventListeners){const s=this.eventListeners[e];for(const e of s)e(t);return!0}return!1}listenerCount(e){return e in this.eventListeners?this.eventListeners[e].length:0}prependListener(e,t){return e in this.eventListeners?this.eventListeners[e].unshift(t):this.eventListeners[e]=[t],this}prependOnceListener(e,t){const s=r=>{this.removeListener(e,s),t(r)};return this.prependListener(e,s)}}class c{constructor(e){this.pid=e}async write(e){return a("plugin:shell|stdin_write",{pid:this.pid,buffer:"string"==typeof e?e:Array.from(e)})}async kill(){return a("plugin:shell|kill",{cmd:"killChild",pid:this.pid})}}class u extends h{constructor(e,t=[],s){super(),this.stdout=new h,this.stderr=new h,this.program=e,this.args="string"==typeof t?[t]:t,this.options=s??{}}static create(e,t=[],s){return new u(e,t,s)}static sidecar(e,t=[],s){const r=new u(e,t,s);return r.options.sidecar=!0,r}async spawn(){return async function(e,t,s=[],r){"object"==typeof s&&Object.freeze(s);const n=new o;return n.onmessage=e,a("plugin:shell|execute",{program:t,args:s,options:r,onEvent:n})}((e=>{switch(e.event){case"Error":this.emit("error",e.payload);break;case"Terminated":this.emit("close",e.payload);break;case"Stdout":this.stdout.emit("data",e.payload);break;case"Stderr":this.stderr.emit("data",e.payload)}}),this.program,this.args,this.options).then((e=>new c(e)))}async execute(){return new Promise(((e,t)=>{this.on("error",t);const s=[],r=[];this.stdout.on("data",(e=>{s.push(e)})),this.stderr.on("data",(e=>{r.push(e)})),this.on("close",(t=>{e({code:t.code,signal:t.signal,stdout:this.collectOutput(s),stderr:this.collectOutput(r)})})),this.spawn().catch(t)}))}collectOutput(e){return"raw"===this.options.encoding?e.reduce(((e,t)=>new Uint8Array([...e,...t,10])),new Uint8Array):e.join("\n")}}return e.Child=c,e.Command=u,e.EventEmitter=h,e.open=async function(e,t){return a("plugin:shell|open",{path:e,with:t})},e}({});Object.defineProperty(window.__TAURI__,"shell",{value:__TAURI_PLUGIN_SHELL__})} +if("__TAURI__"in window){var __TAURI_PLUGIN_SHELL__=function(e){"use strict";function t(e,t,s,n){if("a"===s&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===s?n:"a"===s?n.call(e):n?n.value:t.get(e)}function s(e,t,s,n,i){if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,s),s}var n,i,r;"function"==typeof SuppressedError&&SuppressedError;class o{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,n.set(this,(()=>{})),i.set(this,0),r.set(this,{}),this.id=function(e,t=!1){return window.__TAURI_INTERNALS__.transformCallback(e,t)}((({message:e,id:o})=>{if(o===t(this,i,"f")){s(this,i,o+1),t(this,n,"f").call(this,e);const a=Object.keys(t(this,r,"f"));if(a.length>0){let e=o+1;for(const s of a.sort()){if(parseInt(s)!==e)break;{const i=t(this,r,"f")[s];delete t(this,r,"f")[s],t(this,n,"f").call(this,i),e+=1}}s(this,i,e)}}else t(this,r,"f")[o.toString()]=e}))}set onmessage(e){s(this,n,e)}get onmessage(){return t(this,n,"f")}toJSON(){return`__CHANNEL__:${this.id}`}}async function a(e,t={},s){return window.__TAURI_INTERNALS__.invoke(e,t,s)}n=new WeakMap,i=new WeakMap,r=new WeakMap;class h{constructor(){this.eventListeners=Object.create(null)}addListener(e,t){return this.on(e,t)}removeListener(e,t){return this.off(e,t)}on(e,t){return e in this.eventListeners?this.eventListeners[e].push(t):this.eventListeners[e]=[t],this}once(e,t){const s=n=>{this.removeListener(e,s),t(n)};return this.addListener(e,s)}off(e,t){return e in this.eventListeners&&(this.eventListeners[e]=this.eventListeners[e].filter((e=>e!==t))),this}removeAllListeners(e){return e?delete this.eventListeners[e]:this.eventListeners=Object.create(null),this}emit(e,t){if(e in this.eventListeners){const s=this.eventListeners[e];for(const e of s)e(t);return!0}return!1}listenerCount(e){return e in this.eventListeners?this.eventListeners[e].length:0}prependListener(e,t){return e in this.eventListeners?this.eventListeners[e].unshift(t):this.eventListeners[e]=[t],this}prependOnceListener(e,t){const s=n=>{this.removeListener(e,s),t(n)};return this.prependListener(e,s)}}class c{constructor(e){this.pid=e}async write(e){await a("plugin:shell|stdin_write",{pid:this.pid,buffer:"string"==typeof e?e:Array.from(e)})}async kill(){await a("plugin:shell|kill",{cmd:"killChild",pid:this.pid})}}class l extends h{constructor(e,t=[],s){super(),this.stdout=new h,this.stderr=new h,this.program=e,this.args="string"==typeof t?[t]:t,this.options=s??{}}static create(e,t=[],s){return new l(e,t,s)}static sidecar(e,t=[],s){const n=new l(e,t,s);return n.options.sidecar=!0,n}async spawn(){const e=this.program,t=this.args,s=this.options;"object"==typeof t&&Object.freeze(t);const n=new o;return n.onmessage=e=>{switch(e.event){case"Error":this.emit("error",e.payload);break;case"Terminated":this.emit("close",e.payload);break;case"Stdout":this.stdout.emit("data",e.payload);break;case"Stderr":this.stderr.emit("data",e.payload)}},await a("plugin:shell|spawn",{program:e,args:t,options:s,onEvent:n}).then((e=>new c(e)))}async execute(){const e=this.program,t=this.args,s=this.options;return"object"==typeof t&&Object.freeze(t),await a("plugin:shell|execute",{program:e,args:t,options:s})}}return e.Child=c,e.Command=l,e.EventEmitter=h,e.open=async function(e,t){await a("plugin:shell|open",{path:e,with:t})},e}({});Object.defineProperty(window.__TAURI__,"shell",{value:__TAURI_PLUGIN_SHELL__})} diff --git a/plugins/shell/build.rs b/plugins/shell/build.rs index 6814fbbc7..6a7285700 100644 --- a/plugins/shell/build.rs +++ b/plugins/shell/build.rs @@ -5,7 +5,7 @@ #[path = "src/scope_entry.rs"] mod scope_entry; -const COMMANDS: &[&str] = &["execute", "stdin_write", "kill", "open"]; +const COMMANDS: &[&str] = &["execute", "spawn", "stdin_write", "kill", "open"]; fn main() { tauri_plugin::Builder::new(COMMANDS) diff --git a/plugins/shell/guest-js/index.ts b/plugins/shell/guest-js/index.ts index d532206b8..5772df649 100644 --- a/plugins/shell/guest-js/index.ts +++ b/plugins/shell/guest-js/index.ts @@ -99,39 +99,6 @@ interface ChildProcess { stderr: O; } -/** - * Spawns a process. - * - * @ignore - * @param program The name of the scoped command. - * @param onEventHandler Event handler. - * @param args Program arguments. - * @param options Configuration for the process spawn. - * @returns A promise resolving to the process id. - * - * @since 2.0.0 - */ -async function execute( - onEventHandler: (event: CommandEvent) => void, - program: string, - args: string | string[] = [], - options?: InternalSpawnOptions, -): Promise { - if (typeof args === "object") { - Object.freeze(args); - } - - const onEvent = new Channel>(); - onEvent.onmessage = onEventHandler; - - return invoke("plugin:shell|execute", { - program, - args, - options, - onEvent, - }); -} - /** * @since 2.0.0 */ @@ -237,6 +204,7 @@ class EventEmitter> { * @since 2.0.0 */ removeAllListeners(event?: N): this { + // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions if (event) { // eslint-disable-next-line @typescript-eslint/no-dynamic-delete,security/detect-object-injection delete this.eventListeners[event]; @@ -354,7 +322,7 @@ class Child { * @since 2.0.0 */ async write(data: IOPayload): Promise { - return invoke("plugin:shell|stdin_write", { + await invoke("plugin:shell|stdin_write", { pid: this.pid, // correctly serialize Uint8Arrays buffer: typeof data === "string" ? data : Array.from(data), @@ -369,7 +337,7 @@ class Child { * @since 2.0.0 */ async kill(): Promise { - return invoke("plugin:shell|kill", { + await invoke("plugin:shell|kill", { cmd: "killChild", pid: this.pid, }); @@ -512,27 +480,38 @@ class Command extends EventEmitter { * @since 2.0.0 */ async spawn(): Promise { - return execute( - (event) => { - switch (event.event) { - case "Error": - this.emit("error", event.payload); - break; - case "Terminated": - this.emit("close", event.payload); - break; - case "Stdout": - this.stdout.emit("data", event.payload); - break; - case "Stderr": - this.stderr.emit("data", event.payload); - break; - } - }, - this.program, - this.args, - this.options, - ).then((pid) => new Child(pid)); + const program = this.program; + const args = this.args; + const options = this.options; + + if (typeof args === "object") { + Object.freeze(args); + } + + const onEvent = new Channel>(); + onEvent.onmessage = (event) => { + switch (event.event) { + case "Error": + this.emit("error", event.payload); + break; + case "Terminated": + this.emit("close", event.payload); + break; + case "Stdout": + this.stdout.emit("data", event.payload); + break; + case "Stderr": + this.stderr.emit("data", event.payload); + break; + } + }; + + return await invoke("plugin:shell|spawn", { + program, + args, + options, + onEvent, + }).then((pid) => new Child(pid)); } /** @@ -552,40 +531,19 @@ class Command extends EventEmitter { * @since 2.0.0 */ async execute(): Promise> { - return new Promise((resolve, reject) => { - this.on("error", reject); - - const stdout: O[] = []; - const stderr: O[] = []; - this.stdout.on("data", (line: O) => { - stdout.push(line); - }); - this.stderr.on("data", (line: O) => { - stderr.push(line); - }); - - this.on("close", (payload: TerminatedPayload) => { - resolve({ - code: payload.code, - signal: payload.signal, - stdout: this.collectOutput(stdout) as O, - stderr: this.collectOutput(stderr) as O, - }); - }); - - this.spawn().catch(reject); - }); - } + const program = this.program; + const args = this.args; + const options = this.options; - /** @ignore */ - private collectOutput(events: O[]): string | Uint8Array { - if (this.options.encoding === "raw") { - return events.reduce((p, c) => { - return new Uint8Array([...p, ...(c as Uint8Array), 10]); - }, new Uint8Array()); - } else { - return events.join("\n"); + if (typeof args === "object") { + Object.freeze(args); } + + return await invoke>("plugin:shell|execute", { + program, + args, + options, + }); } } @@ -644,7 +602,7 @@ type CommandEvent = * @since 2.0.0 */ async function open(path: string, openWith?: string): Promise { - return invoke("plugin:shell|open", { + await invoke("plugin:shell|open", { path, with: openWith, }); diff --git a/plugins/shell/guest-js/init.ts b/plugins/shell/guest-js/init.ts index 4f6eea2e9..bdc5505ef 100644 --- a/plugins/shell/guest-js/init.ts +++ b/plugins/shell/guest-js/init.ts @@ -5,27 +5,27 @@ import { invoke } from "@tauri-apps/api/core"; // open links with the API -function openLinks() { +function openLinks(): void { document.querySelector("body")?.addEventListener("click", function (e) { - let target = e.target as HTMLElement; + let target: HTMLElement | null = e.target as HTMLElement; while (target != null) { if (target.matches("a")) { const t = target as HTMLAnchorElement; if ( - t.href && + t.href !== "" && ["http://", "https://", "mailto:", "tel:"].some((v) => t.href.startsWith(v), ) && t.target === "_blank" ) { - invoke("plugin:shell|open", { + void invoke("plugin:shell|open", { path: t.href, }); e.preventDefault(); } break; } - target = target.parentElement as HTMLElement; + target = target.parentElement; } }); } diff --git a/plugins/shell/package.json b/plugins/shell/package.json index 569b51381..971299f2c 100644 --- a/plugins/shell/package.json +++ b/plugins/shell/package.json @@ -1,6 +1,6 @@ { "name": "@tauri-apps/plugin-shell", - "version": "2.0.0-beta.2", + "version": "2.0.0-beta.3", "license": "MIT or APACHE-2.0", "authors": [ "Tauri Programme within The Commons Conservancy" @@ -23,6 +23,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-beta.6" + "@tauri-apps/api": "2.0.0-beta.11" } } diff --git a/plugins/shell/permissions/autogenerated/commands/spawn.toml b/plugins/shell/permissions/autogenerated/commands/spawn.toml new file mode 100644 index 000000000..a3802d2a2 --- /dev/null +++ b/plugins/shell/permissions/autogenerated/commands/spawn.toml @@ -0,0 +1,13 @@ +# Automatically generated - DO NOT EDIT! + +"$schema" = "../../schemas/schema.json" + +[[permission]] +identifier = "allow-spawn" +description = "Enables the spawn command without any pre-configured scope." +commands.allow = ["spawn"] + +[[permission]] +identifier = "deny-spawn" +description = "Denies the spawn command without any pre-configured scope." +commands.deny = ["spawn"] diff --git a/plugins/shell/permissions/autogenerated/reference.md b/plugins/shell/permissions/autogenerated/reference.md index 27a2ace7b..8138c686f 100644 --- a/plugins/shell/permissions/autogenerated/reference.md +++ b/plugins/shell/permissions/autogenerated/reference.md @@ -6,5 +6,7 @@ |`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-spawn`|Enables the spawn command without any pre-configured scope.| +|`deny-spawn`|Denies the spawn 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/permissions/schemas/schema.json b/plugins/shell/permissions/schemas/schema.json index 788f5fedd..3ad11a47d 100644 --- a/plugins/shell/permissions/schemas/schema.json +++ b/plugins/shell/permissions/schemas/schema.json @@ -336,6 +336,20 @@ "deny-open" ] }, + { + "description": "allow-spawn -> Enables the spawn command without any pre-configured scope.", + "type": "string", + "enum": [ + "allow-spawn" + ] + }, + { + "description": "deny-spawn -> Denies the spawn command without any pre-configured scope.", + "type": "string", + "enum": [ + "deny-spawn" + ] + }, { "description": "allow-stdin-write -> Enables the stdin_write command without any pre-configured scope.", "type": "string", diff --git a/plugins/shell/src/commands.rs b/plugins/shell/src/commands.rs index 050713a3a..77aee6998 100644 --- a/plugins/shell/src/commands.rs +++ b/plugins/shell/src/commands.rs @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT -use std::{collections::HashMap, path::PathBuf, string::FromUtf8Error}; +use std::{collections::HashMap, future::Future, path::PathBuf, pin::Pin, string::FromUtf8Error}; use encoding_rs::Encoding; use serde::{Deserialize, Serialize}; @@ -94,18 +94,15 @@ fn default_env() -> Option> { Some(HashMap::default()) } -#[allow(clippy::too_many_arguments)] -#[tauri::command] -pub fn execute( +#[inline(always)] +fn prepare_cmd( window: Window, - shell: State<'_, Shell>, program: String, args: ExecuteArgs, - on_event: Channel, options: CommandOptions, command_scope: CommandScope, global_scope: GlobalScope, -) -> crate::Result { +) -> crate::Result<(crate::process::Command, EncodingWrapper)> { let scope = crate::scope::ShellScope { scopes: command_scope .allows() @@ -151,10 +148,14 @@ pub fn execute( } else { command = command.env_clear(); } + let encoding = match options.encoding { Option::None => EncodingWrapper::Text(None), Some(encoding) => match encoding.as_str() { - "raw" => EncodingWrapper::Raw, + "raw" => { + command = command.set_raw_out(true); + EncodingWrapper::Raw + } _ => { if let Some(text_encoding) = Encoding::for_label(encoding.as_bytes()) { EncodingWrapper::Text(Some(text_encoding)) @@ -165,6 +166,82 @@ pub fn execute( }, }; + Ok((command, encoding)) +} + +#[derive(Serialize)] +enum Output { + String(String), + Raw(Vec), +} + +#[derive(Serialize)] +pub struct ChildProcessReturn { + code: Option, + signal: Option, + #[serde(flatten)] + stdout: Output, + #[serde(flatten)] + stderr: Output, +} + +#[allow(clippy::too_many_arguments)] +#[tauri::command] +pub fn execute( + window: Window, + program: String, + args: ExecuteArgs, + options: CommandOptions, + command_scope: CommandScope, + global_scope: GlobalScope, +) -> crate::Result { + let (command, encoding) = + prepare_cmd(window, program, args, options, command_scope, global_scope)?; + + let mut command: std::process::Command = command.into(); + let output = command.output()?; + + let (stdout, stderr) = match encoding { + EncodingWrapper::Text(Some(encoding)) => ( + Output::String(encoding.decode_with_bom_removal(&output.stdout).0.into()), + Output::String(encoding.decode_with_bom_removal(&output.stderr).0.into()), + ), + EncodingWrapper::Text(None) => ( + Output::String(String::from_utf8(output.stdout)?), + Output::String(String::from_utf8(output.stderr)?), + ), + EncodingWrapper::Raw => (Output::Raw(output.stdout), Output::Raw(output.stderr)), + }; + + #[cfg(unix)] + use std::os::unix::process::ExitStatusExt; + + Ok(ChildProcessReturn { + code: output.status.code(), + #[cfg(windows)] + signal: None, + #[cfg(unix)] + signal: output.status.signal(), + stdout, + stderr, + }) +} + +#[allow(clippy::too_many_arguments)] +#[tauri::command] +pub fn spawn( + window: Window, + shell: State<'_, Shell>, + program: String, + args: ExecuteArgs, + on_event: Channel, + options: CommandOptions, + command_scope: CommandScope, + global_scope: GlobalScope, +) -> crate::Result { + let (command, encoding) = + prepare_cmd(window, program, args, options, command_scope, global_scope)?; + let (mut rx, child) = command.spawn()?; let pid = child.pid(); @@ -177,7 +254,21 @@ pub fn execute( children.lock().unwrap().remove(&pid); }; let js_event = JSCommandEvent::new(event, encoding); - let _ = on_event.send(&js_event); + + if on_event.send(&js_event).is_err() { + fn send<'a>( + on_event: &'a Channel, + js_event: &'a JSCommandEvent, + ) -> Pin + Send + 'a>> { + Box::pin(async move { + tokio::time::sleep(std::time::Duration::from_millis(15)).await; + if on_event.send(js_event).is_err() { + send(on_event, js_event).await; + } + }) + } + send(&on_event, &js_event).await; + } } }); diff --git a/plugins/shell/src/error.rs b/plugins/shell/src/error.rs index c8af2343b..99b13cfd3 100644 --- a/plugins/shell/src/error.rs +++ b/plugins/shell/src/error.rs @@ -27,6 +27,9 @@ pub enum Error { /// JSON error. #[error(transparent)] Json(#[from] serde_json::Error), + /// Utf8 error. + #[error(transparent)] + Utf8(#[from] std::string::FromUtf8Error), } impl Serialize for Error { diff --git a/plugins/shell/src/init-iife.js b/plugins/shell/src/init-iife.js index abc8a15f7..0bd7eda3d 100644 --- a/plugins/shell/src/init-iife.js +++ b/plugins/shell/src/init-iife.js @@ -1 +1 @@ -!function(){"use strict";async function e(e,t={},n){return window.__TAURI_INTERNALS__.invoke(e,t,n)}function t(){document.querySelector("body")?.addEventListener("click",(function(t){let n=t.target;for(;null!=n;){if(n.matches("a")){const r=n;r.href&&["http://","https://","mailto:","tel:"].some((e=>r.href.startsWith(e)))&&"_blank"===r.target&&(e("plugin:shell|open",{path:r.href}),t.preventDefault());break}n=n.parentElement}}))}"function"==typeof SuppressedError&&SuppressedError,"complete"===document.readyState||"interactive"===document.readyState?t():window.addEventListener("DOMContentLoaded",t,!0)}(); +!function(){"use strict";async function e(e,t={},n){return window.__TAURI_INTERNALS__.invoke(e,t,n)}function t(){document.querySelector("body")?.addEventListener("click",(function(t){let n=t.target;for(;null!=n;){if(n.matches("a")){const r=n;""!==r.href&&["http://","https://","mailto:","tel:"].some((e=>r.href.startsWith(e)))&&"_blank"===r.target&&(e("plugin:shell|open",{path:r.href}),t.preventDefault());break}n=n.parentElement}}))}"function"==typeof SuppressedError&&SuppressedError,"complete"===document.readyState||"interactive"===document.readyState?t():window.addEventListener("DOMContentLoaded",t,!0)}(); diff --git a/plugins/shell/src/lib.rs b/plugins/shell/src/lib.rs index 012d9e96e..1f92c6ccd 100644 --- a/plugins/shell/src/lib.rs +++ b/plugins/shell/src/lib.rs @@ -81,6 +81,7 @@ pub fn init() -> TauriPlugin> { .js_init_script(include_str!("init-iife.js").to_string()) .invoke_handler(tauri::generate_handler![ commands::execute, + commands::spawn, commands::stdin_write, commands::kill, commands::open diff --git a/plugins/shell/src/process/mod.rs b/plugins/shell/src/process/mod.rs index fdb268970..44f037b01 100644 --- a/plugins/shell/src/process/mod.rs +++ b/plugins/shell/src/process/mod.rs @@ -4,7 +4,7 @@ use std::{ ffi::OsStr, - io::{BufReader, Write}, + io::{BufRead, BufReader, Write}, path::{Path, PathBuf}, process::{Command as StdCommand, Stdio}, sync::{Arc, RwLock}, @@ -41,11 +41,13 @@ pub struct TerminatedPayload { #[derive(Debug, Clone)] #[non_exhaustive] pub enum CommandEvent { - /// Stderr bytes until a newline (\n) or carriage return (\r) is found. + /// If configured for raw output, all bytes written to stderr. + /// Otherwise, bytes until a newline (\n) or carriage return (\r) is found. Stderr(Vec), - /// Stdout bytes until a newline (\n) or carriage return (\r) is found. + /// If configured for raw output, all bytes written to stdout. + /// Otherwise, bytes until a newline (\n) or carriage return (\r) is found. Stdout(Vec), - /// An error happened waiting for the command to finish or converting the stdout/stderr bytes to an UTF-8 string. + /// An error happened waiting for the command to finish or converting the stdout/stderr bytes to a UTF-8 string. Error(String), /// Command process terminated. Terminated(TerminatedPayload), @@ -53,7 +55,10 @@ pub enum CommandEvent { /// The type to spawn commands. #[derive(Debug)] -pub struct Command(StdCommand); +pub struct Command { + cmd: StdCommand, + raw_out: bool, +} /// Spawned child process. #[derive(Debug)] @@ -122,7 +127,7 @@ fn relative_command_path(command: &Path) -> crate::Result { impl From for StdCommand { fn from(cmd: Command) -> StdCommand { - cmd.0 + cmd.cmd } } @@ -136,7 +141,10 @@ impl Command { #[cfg(windows)] command.creation_flags(CREATE_NO_WINDOW); - Self(command) + Self { + cmd: command, + raw_out: false, + } } pub(crate) fn new_sidecar>(program: S) -> crate::Result { @@ -146,7 +154,7 @@ impl Command { /// Appends an argument to the command. #[must_use] pub fn arg>(mut self, arg: S) -> Self { - self.0.arg(arg); + self.cmd.arg(arg); self } @@ -157,14 +165,14 @@ impl Command { I: IntoIterator, S: AsRef, { - self.0.args(args); + self.cmd.args(args); self } /// Clears the entire environment map for the child process. #[must_use] pub fn env_clear(mut self) -> Self { - self.0.env_clear(); + self.cmd.env_clear(); self } @@ -175,7 +183,7 @@ impl Command { K: AsRef, V: AsRef, { - self.0.env(key, value); + self.cmd.env(key, value); self } @@ -187,14 +195,20 @@ impl Command { K: AsRef, V: AsRef, { - self.0.envs(envs); + self.cmd.envs(envs); self } /// Sets the working directory for the child process. #[must_use] pub fn current_dir>(mut self, current_dir: P) -> Self { - self.0.current_dir(current_dir); + self.cmd.current_dir(current_dir); + self + } + + /// Configures the reader to output bytes from the child process exactly as received + pub fn set_raw_out(mut self, raw_out: bool) -> Self { + self.raw_out = raw_out; self } @@ -229,6 +243,7 @@ impl Command { /// }); /// ``` pub fn spawn(self) -> crate::Result<(Receiver, CommandChild)> { + let raw = self.raw_out; let mut command: StdCommand = self.into(); let (stdout_reader, stdout_writer) = pipe()?; let (stderr_reader, stderr_writer) = pipe()?; @@ -249,12 +264,14 @@ impl Command { guard.clone(), stdout_reader, CommandEvent::Stdout, + raw, ); spawn_pipe_reader( tx.clone(), guard.clone(), stderr_reader, CommandEvent::Stderr, + raw, ); spawn(move || { @@ -359,35 +376,74 @@ impl Command { } } +fn read_raw_bytes) -> CommandEvent + Send + Copy + 'static>( + mut reader: BufReader, + tx: Sender, + wrapper: F, +) { + loop { + let result = reader.fill_buf(); + match result { + Ok(buf) => { + let length = buf.len(); + if length == 0 { + break; + } + let tx_ = tx.clone(); + let _ = block_on_task(async move { tx_.send(wrapper(buf.to_vec())).await }); + reader.consume(length); + } + Err(e) => { + let tx_ = tx.clone(); + let _ = block_on_task( + async move { tx_.send(CommandEvent::Error(e.to_string())).await }, + ); + } + } + } +} + +fn read_line) -> CommandEvent + Send + Copy + 'static>( + mut reader: BufReader, + tx: Sender, + wrapper: F, +) { + loop { + let mut buf = Vec::new(); + match tauri::utils::io::read_line(&mut reader, &mut buf) { + Ok(n) => { + if n == 0 { + break; + } + let tx_ = tx.clone(); + let _ = block_on_task(async move { tx_.send(wrapper(buf)).await }); + } + Err(e) => { + let tx_ = tx.clone(); + let _ = block_on_task( + async move { tx_.send(CommandEvent::Error(e.to_string())).await }, + ); + break; + } + } + } +} + fn spawn_pipe_reader) -> CommandEvent + Send + Copy + 'static>( tx: Sender, guard: Arc>, pipe_reader: PipeReader, wrapper: F, + raw_out: bool, ) { spawn(move || { let _lock = guard.read().unwrap(); - let mut reader = BufReader::new(pipe_reader); - - loop { - let mut buf = Vec::new(); - match tauri::utils::io::read_line(&mut reader, &mut buf) { - Ok(n) => { - if n == 0 { - break; - } - let tx_ = tx.clone(); - let _ = block_on_task(async move { tx_.send(wrapper(buf)).await }); - } - Err(e) => { - let tx_ = tx.clone(); - let _ = - block_on_task( - async move { tx_.send(CommandEvent::Error(e.to_string())).await }, - ); - break; - } - } + let reader = BufReader::new(pipe_reader); + + if raw_out { + read_raw_bytes(reader, tx, wrapper); + } else { + read_line(reader, tx, wrapper); } }); } diff --git a/plugins/single-instance/CHANGELOG.md b/plugins/single-instance/CHANGELOG.md index 93ec13b0a..1e264edf0 100644 --- a/plugins/single-instance/CHANGELOG.md +++ b/plugins/single-instance/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## \[2.0.0-beta.7] + +- [`bd1ed590`](https://github.com/tauri-apps/plugins-workspace/commit/bd1ed5903ffcce5500310dac1e59e8c67674ef1e)([#1237](https://github.com/tauri-apps/plugins-workspace/pull/1237)) Update to tauri beta.17. + +## \[2.0.0-beta.6] + +- [`ed46dca`](https://github.com/tauri-apps/plugins-workspace/commit/ed46dca74ff3947dbbcb26a7b571c129bf925698) Added the `semver` feature flag to make the single instance mechanism only trigger for semver compatible versions. + ## \[2.0.0-beta.5] - [`dabac0e`](https://github.com/tauri-apps/plugins-workspace/commit/dabac0eedfd6e6d192c6c5a214e708b3c0223f6f)([#1035](https://github.com/tauri-apps/plugins-workspace/pull/1035)) Added implementation for MacOS. diff --git a/plugins/single-instance/Cargo.toml b/plugins/single-instance/Cargo.toml index 585e174c9..2785e1b69 100644 --- a/plugins/single-instance/Cargo.toml +++ b/plugins/single-instance/Cargo.toml @@ -1,12 +1,12 @@ [package] name = "tauri-plugin-single-instance" -version = "2.0.0-beta.5" +version = "2.0.0-beta.7" description = "Ensure a single instance of your tauri app is running." authors = { workspace = true } license = { workspace = true } edition = { workspace = true } rust-version = { workspace = true } -repository = { workspace = true } +repository = { workspace = true } exclude = [ "/examples" ] [package.metadata.docs.rs] @@ -37,4 +37,4 @@ features = [ zbus = "4" [features] -semver = ["dep:semver"] +semver = [ "dep:semver" ] diff --git a/plugins/single-instance/examples/vanilla/package-lock.json b/plugins/single-instance/examples/vanilla/package-lock.json index 14980fb03..83bf383b2 100644 --- a/plugins/single-instance/examples/vanilla/package-lock.json +++ b/plugins/single-instance/examples/vanilla/package-lock.json @@ -9,13 +9,13 @@ "version": "1.0.0", "license": "MIT", "devDependencies": { - "@tauri-apps/cli": "2.0.0-beta.3" + "@tauri-apps/cli": "2.0.0-beta.16" } }, "node_modules/@tauri-apps/cli": { - "version": "2.0.0-beta.3", - "resolved": "https://registry.npmjs.org/@tauri-apps/cli/-/cli-2.0.0-beta.3.tgz", - "integrity": "sha512-xLAL2DNNUJWqHBKvanc3V9bG9kkwtFwc40X/DrfgEKnkajEm79wqnkaT8LUnmbe0WZ8bzBRO1fLIgKlOH6GiCA==", + "version": "2.0.0-beta.16", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli/-/cli-2.0.0-beta.16.tgz", + "integrity": "sha512-ELaPqTekAVfTU4lFf7k/Z422DKXk/uDWi7ppI8TuQOqcXjrxlXMvv/Y1eC2tem9vMeuOIU0Jg53pOhOu0w8JIQ==", "dev": true, "bin": { "tauri": "tauri.js" @@ -28,22 +28,22 @@ "url": "https://opencollective.com/tauri" }, "optionalDependencies": { - "@tauri-apps/cli-darwin-arm64": "2.0.0-beta.3", - "@tauri-apps/cli-darwin-x64": "2.0.0-beta.3", - "@tauri-apps/cli-linux-arm-gnueabihf": "2.0.0-beta.3", - "@tauri-apps/cli-linux-arm64-gnu": "2.0.0-beta.3", - "@tauri-apps/cli-linux-arm64-musl": "2.0.0-beta.3", - "@tauri-apps/cli-linux-x64-gnu": "2.0.0-beta.3", - "@tauri-apps/cli-linux-x64-musl": "2.0.0-beta.3", - "@tauri-apps/cli-win32-arm64-msvc": "2.0.0-beta.3", - "@tauri-apps/cli-win32-ia32-msvc": "2.0.0-beta.3", - "@tauri-apps/cli-win32-x64-msvc": "2.0.0-beta.3" + "@tauri-apps/cli-darwin-arm64": "2.0.0-beta.16", + "@tauri-apps/cli-darwin-x64": "2.0.0-beta.16", + "@tauri-apps/cli-linux-arm-gnueabihf": "2.0.0-beta.16", + "@tauri-apps/cli-linux-arm64-gnu": "2.0.0-beta.16", + "@tauri-apps/cli-linux-arm64-musl": "2.0.0-beta.16", + "@tauri-apps/cli-linux-x64-gnu": "2.0.0-beta.16", + "@tauri-apps/cli-linux-x64-musl": "2.0.0-beta.16", + "@tauri-apps/cli-win32-arm64-msvc": "2.0.0-beta.16", + "@tauri-apps/cli-win32-ia32-msvc": "2.0.0-beta.16", + "@tauri-apps/cli-win32-x64-msvc": "2.0.0-beta.16" } }, "node_modules/@tauri-apps/cli-darwin-arm64": { - "version": "2.0.0-beta.3", - "resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-arm64/-/cli-darwin-arm64-2.0.0-beta.3.tgz", - "integrity": "sha512-gHcn3jI/4MDXDIlK/4Zz0ftTosgN3OimWlKxEz777QrA1hldrQweYIhdZXkqE9KgoE+u6w80vWIcr0InHAf7Iw==", + "version": "2.0.0-beta.16", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-arm64/-/cli-darwin-arm64-2.0.0-beta.16.tgz", + "integrity": "sha512-5Gif4AvpJmnyLj3HO3AEl1RVrr4ast6mDQiXoLwe75bfWq1pj9VwsS5SuSrUKtB8YBSnnclcJwkqwa6soY/xkg==", "cpu": [ "arm64" ], @@ -57,9 +57,9 @@ } }, "node_modules/@tauri-apps/cli-darwin-x64": { - "version": "2.0.0-beta.3", - "resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-x64/-/cli-darwin-x64-2.0.0-beta.3.tgz", - "integrity": "sha512-kRCaukT2IAGMmNuAOUBhdZRlKujTy2lSsdNKmgGEMnzQLKJwWO9Gpq1NmPY7ZVqyXK/X8QnGHuasDEQsSO6B4w==", + "version": "2.0.0-beta.16", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-x64/-/cli-darwin-x64-2.0.0-beta.16.tgz", + "integrity": "sha512-6Cia8lGSroyoXKvfRI+Dv8Xinr27lptDzGZnd8mT9V0xPg73xcWxPKiTkuxPmLQTrQKVAurfsX3DwwgK8m9kSw==", "cpu": [ "x64" ], @@ -73,9 +73,9 @@ } }, "node_modules/@tauri-apps/cli-linux-arm-gnueabihf": { - "version": "2.0.0-beta.3", - "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm-gnueabihf/-/cli-linux-arm-gnueabihf-2.0.0-beta.3.tgz", - "integrity": "sha512-cpNZOQDotNSdjoZT16s1JtZvnkM0wgLwU39AhKhRCco4KEH3/8G1ngKF9JKalWUN8zDTcuCigEAr37gEv4mLAA==", + "version": "2.0.0-beta.16", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm-gnueabihf/-/cli-linux-arm-gnueabihf-2.0.0-beta.16.tgz", + "integrity": "sha512-1mQ0flIt0wrX4QLPwd8f1QFsuFjLPQtWuiObK63K0/YZmDS2yzKT6jnGqNCJsSiyXE2/36gKSyWh6OVpX8U7xg==", "cpu": [ "arm" ], @@ -89,9 +89,9 @@ } }, "node_modules/@tauri-apps/cli-linux-arm64-gnu": { - "version": "2.0.0-beta.3", - "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-gnu/-/cli-linux-arm64-gnu-2.0.0-beta.3.tgz", - "integrity": "sha512-8q86V6P9bkeoFcnvSsnvOwmKY6ijIN4ueRVXCj5cVpsw392VF9vud1Nq7/l+QDgn9OWbZNNVDl30iyoSuaykBA==", + "version": "2.0.0-beta.16", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-gnu/-/cli-linux-arm64-gnu-2.0.0-beta.16.tgz", + "integrity": "sha512-CjgwOvaslvy06m36faZ40noQaBu37gcXtD0HlCgAMofDZz7fUWQJn3xE7r8fegXmY0oMKZ9ah8dgwd5KSk+L+Q==", "cpu": [ "arm64" ], @@ -105,9 +105,9 @@ } }, "node_modules/@tauri-apps/cli-linux-arm64-musl": { - "version": "2.0.0-beta.3", - "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.0.0-beta.3.tgz", - "integrity": "sha512-L7fokh4aqyV6yDPoeKwFN3Yt0pCAuZMWeP5tOeSBiom1pU7ppKH+4KHeTekNEIecZG+Ah250DkVCdmWS+aRFTA==", + "version": "2.0.0-beta.16", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.0.0-beta.16.tgz", + "integrity": "sha512-JMtryDJckutFzNpwFgh98o9Z4Vw1pwImYmJIDLpCPSqYIfd+mrBgPZFTaGl11ZsQnllqt4FNXlYR8T+ey7ZpfQ==", "cpu": [ "arm64" ], @@ -121,9 +121,9 @@ } }, "node_modules/@tauri-apps/cli-linux-x64-gnu": { - "version": "2.0.0-beta.3", - "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-gnu/-/cli-linux-x64-gnu-2.0.0-beta.3.tgz", - "integrity": "sha512-/crp3K6PathqicVWPj8Kh1120NNVV7nagJ7oZW9OFch7nBS1tmDnSB5k5LgA4yYu+lDKNUREnATMWHL6i0gNeg==", + "version": "2.0.0-beta.16", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-gnu/-/cli-linux-x64-gnu-2.0.0-beta.16.tgz", + "integrity": "sha512-3dQGCKsbjaIzk4UM7Jf5FzBJpBJ1OfwBOwkVv2M4O7EDLNZi9brDR+I41eqyFhTabEcHJoLhtURLbD25dJuiug==", "cpu": [ "x64" ], @@ -137,9 +137,9 @@ } }, "node_modules/@tauri-apps/cli-linux-x64-musl": { - "version": "2.0.0-beta.3", - "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-musl/-/cli-linux-x64-musl-2.0.0-beta.3.tgz", - "integrity": "sha512-jX1ZT0UQwdBGbpCwlpv2bsLDO7KFMeDJQ/ZZVMfWyjuYrGBG5zhJ2NXwTMkHVnxfvE6BVmnybWcykeSqTATeOw==", + "version": "2.0.0-beta.16", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-musl/-/cli-linux-x64-musl-2.0.0-beta.16.tgz", + "integrity": "sha512-t+wdk/VCn8l9y1fhRQPfvZyz3Or7QEPTxXNobbUzbtckFsf/LqTxjaajOBmSGnZpoTDFvwVOmalDaylILxuM5g==", "cpu": [ "x64" ], @@ -153,9 +153,9 @@ } }, "node_modules/@tauri-apps/cli-win32-arm64-msvc": { - "version": "2.0.0-beta.3", - "resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-arm64-msvc/-/cli-win32-arm64-msvc-2.0.0-beta.3.tgz", - "integrity": "sha512-UCEZNKocENLX3HYKid4FEbrCMjCX9e58klBIvJKxT8HTjvpgFYDoKccswDNfszLhmineKMlkUvm7j7U0sMh8MQ==", + "version": "2.0.0-beta.16", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-arm64-msvc/-/cli-win32-arm64-msvc-2.0.0-beta.16.tgz", + "integrity": "sha512-ouP0iiRMTNaKyz6c06LucMR5P585r2XJ3/GlzNWtUfP4EaP8mZAENB0ro9VZl10++7Z658MdWxSAf4+Qmkj0jQ==", "cpu": [ "arm64" ], @@ -169,9 +169,9 @@ } }, "node_modules/@tauri-apps/cli-win32-ia32-msvc": { - "version": "2.0.0-beta.3", - "resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-ia32-msvc/-/cli-win32-ia32-msvc-2.0.0-beta.3.tgz", - "integrity": "sha512-O8syGXDHyKN/cv1ktD76dTcbkQ1nNEPhnT1Z+r0GKxNsw4/MyIVglzEcou3aPq0/1MQ0PEGVyG1x0JMaPw7oHQ==", + "version": "2.0.0-beta.16", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-ia32-msvc/-/cli-win32-ia32-msvc-2.0.0-beta.16.tgz", + "integrity": "sha512-BiBkv3IesPNGXVaampxpB+ub0tz2sGu+6OLzxSm1QTp+2ZSw/qeXi/icvJl5azmOyee4ZWBBiuBzdVY88QH+Vw==", "cpu": [ "ia32" ], @@ -185,9 +185,9 @@ } }, "node_modules/@tauri-apps/cli-win32-x64-msvc": { - "version": "2.0.0-beta.3", - "resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-x64-msvc/-/cli-win32-x64-msvc-2.0.0-beta.3.tgz", - "integrity": "sha512-YDdF3XWaptjKtKz33sZhC+uNAZwp6QtAmZSRCQQlC1W7uJwLD00/3QF4vO/c6Qm+BGFsazVh1+YmBF1p0kV0rg==", + "version": "2.0.0-beta.16", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-x64-msvc/-/cli-win32-x64-msvc-2.0.0-beta.16.tgz", + "integrity": "sha512-rrJeC7eAT6diQpnI3aaflhvtKyTryywbhHLG/c1QyPhdxA7Or6nflo5KzWLd6q3GQqKRbvz5dDtxwFn+XLo+rQ==", "cpu": [ "x64" ], diff --git a/plugins/single-instance/examples/vanilla/package.json b/plugins/single-instance/examples/vanilla/package.json index 1b7ea034c..68494aaa8 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-beta.9" + "@tauri-apps/cli": "2.0.0-beta.16" } } diff --git a/plugins/sql/CHANGELOG.md b/plugins/sql/CHANGELOG.md index 8252bf942..4b2ff18b6 100644 --- a/plugins/sql/CHANGELOG.md +++ b/plugins/sql/CHANGELOG.md @@ -2,6 +2,10 @@ ## \[2.0.0-beta.3] +- [`bd1ed590`](https://github.com/tauri-apps/plugins-workspace/commit/bd1ed5903ffcce5500310dac1e59e8c67674ef1e)([#1237](https://github.com/tauri-apps/plugins-workspace/pull/1237)) Update to tauri beta.17. + +## \[2.0.0-beta.3] + - [`a04ea2f`](https://github.com/tauri-apps/plugins-workspace/commit/a04ea2f38294d5a3987578283badc8eec87a7752)([#1071](https://github.com/tauri-apps/plugins-workspace/pull/1071)) The global API script is now only added to the binary when the `withGlobalTauri` config is true. ## \[2.0.0-beta.2] diff --git a/plugins/sql/Cargo.toml b/plugins/sql/Cargo.toml index 4f59bc805..3f8cbc43b 100644 --- a/plugins/sql/Cargo.toml +++ b/plugins/sql/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tauri-plugin-sql" -version = "2.0.0-beta.3" +version = "2.0.0-beta.4" description = "Interface with SQL databases." authors = { workspace = true } license = { workspace = true } @@ -10,12 +10,12 @@ repository = { 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"] } +tauri-plugin = { workspace = true, features = [ "build" ] } [dependencies] serde = { workspace = true } @@ -24,11 +24,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/guest-js/index.ts b/plugins/sql/guest-js/index.ts index 9e96f3db5..6cb475847 100644 --- a/plugins/sql/guest-js/index.ts +++ b/plugins/sql/guest-js/index.ts @@ -119,6 +119,7 @@ export default class Database { rowsAffected, }; } + /** * **select** * diff --git a/plugins/sql/package.json b/plugins/sql/package.json index b65e27b95..eabe4792c 100644 --- a/plugins/sql/package.json +++ b/plugins/sql/package.json @@ -1,6 +1,6 @@ { "name": "@tauri-apps/plugin-sql", - "version": "2.0.0-beta.2", + "version": "2.0.0-beta.3", "description": "Interface with SQL databases", "license": "MIT or APACHE-2.0", "authors": [ @@ -24,6 +24,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-beta.6" + "@tauri-apps/api": "2.0.0-beta.11" } } diff --git a/plugins/store/CHANGELOG.md b/plugins/store/CHANGELOG.md index 056125e59..cf369c114 100644 --- a/plugins/store/CHANGELOG.md +++ b/plugins/store/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## \[2.0.0-beta.3] + +- [`bd1ed590`](https://github.com/tauri-apps/plugins-workspace/commit/bd1ed5903ffcce5500310dac1e59e8c67674ef1e)([#1237](https://github.com/tauri-apps/plugins-workspace/pull/1237)) Update to tauri beta.17. + +## \[2.0.0-beta.5] + +- [`bb51a41`](https://github.com/tauri-apps/plugins-workspace/commit/bb51a41d67ebf989e8aedf10c4b1a7f9514d1bdf)([#1168](https://github.com/tauri-apps/plugins-workspace/pull/1168)) **Breaking Change:** All apis that return paths to the frontend will now remove the `\\?\` UNC prefix on Windows. + ## \[2.0.0-beta.4] - [`a04ea2f`](https://github.com/tauri-apps/plugins-workspace/commit/a04ea2f38294d5a3987578283badc8eec87a7752)([#1071](https://github.com/tauri-apps/plugins-workspace/pull/1071)) The global API script is now only added to the binary when the `withGlobalTauri` config is true. diff --git a/plugins/store/Cargo.toml b/plugins/store/Cargo.toml index 30b6c49da..b79a5992b 100644 --- a/plugins/store/Cargo.toml +++ b/plugins/store/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tauri-plugin-store" -version = "2.0.0-beta.4" +version = "2.0.0-beta.6" description = "Simple, persistent key-value store." authors = { workspace = true } license = { workspace = true } @@ -10,11 +10,11 @@ repository = { 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"] } +tauri-plugin = { workspace = true, features = [ "build" ] } [dependencies] serde = { workspace = true } @@ -22,3 +22,4 @@ serde_json = { workspace = true } tauri = { workspace = true } log = { workspace = true } thiserror = { workspace = true } +dunce = { workspace = true } diff --git a/plugins/store/api-iife.js b/plugins/store/api-iife.js index 15eaf7511..77bea5295 100644 --- a/plugins/store/api-iife.js +++ b/plugins/store/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){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.FILE_DROP="tauri://file-drop",t.FILE_DROP_HOVER="tauri://file-drop-hover",t.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=(void 0,{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.WINDOW_CREATED="tauri://window-created",t.WEBVIEW_CREATED="tauri://webview-created",t.DRAG="tauri://drag",t.DROP="tauri://drop",t.DROP_OVER="tauri://drop-over",t.DROP_CANCELLED="tauri://drag-cancelled"}(n||(n={}));return t.Store=class{constructor(t){this.path=t}async set(t,a){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(){await e("plugin:store|clear",{path:this.path})}async reset(){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(){await e("plugin:store|load",{path:this.path})}async save(){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/store/examples/AppSettingsManager/package.json b/plugins/store/examples/AppSettingsManager/package.json index 6a9371c2a..2d706792d 100644 --- a/plugins/store/examples/AppSettingsManager/package.json +++ b/plugins/store/examples/AppSettingsManager/package.json @@ -8,7 +8,7 @@ "tauri": "tauri" }, "devDependencies": { - "@tauri-apps/cli": "1.5.11", + "@tauri-apps/cli": "^2.0.0-beta.15", "vite": "^5.0.12", "typescript": "^5.3.3" } diff --git a/plugins/store/guest-js/index.ts b/plugins/store/guest-js/index.ts index e567f8ebf..043047396 100644 --- a/plugins/store/guest-js/index.ts +++ b/plugins/store/guest-js/index.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT -import { listen, UnlistenFn } from "@tauri-apps/api/event"; +import { listen, type UnlistenFn } from "@tauri-apps/api/event"; import { invoke } from "@tauri-apps/api/core"; @@ -29,7 +29,7 @@ export class Store { * @returns */ async set(key: string, value: unknown): Promise { - return await invoke("plugin:store|set", { + await invoke("plugin:store|set", { path: this.path, key, value, @@ -82,7 +82,7 @@ export class Store { * @returns */ async clear(): Promise { - return await invoke("plugin:store|clear", { + await invoke("plugin:store|clear", { path: this.path, }); } @@ -94,7 +94,7 @@ export class Store { * @returns */ async reset(): Promise { - return await invoke("plugin:store|reset", { + await invoke("plugin:store|reset", { path: this.path, }); } @@ -152,7 +152,7 @@ export class Store { * @returns */ async load(): Promise { - return await invoke("plugin:store|load", { + await invoke("plugin:store|load", { path: this.path, }); } @@ -165,7 +165,7 @@ export class Store { * @returns */ async save(): Promise { - return await invoke("plugin:store|save", { + await invoke("plugin:store|save", { path: this.path, }); } diff --git a/plugins/store/package.json b/plugins/store/package.json index 8be795e78..1d7f2ab17 100644 --- a/plugins/store/package.json +++ b/plugins/store/package.json @@ -1,6 +1,6 @@ { "name": "@tauri-apps/plugin-store", - "version": "2.0.0-beta.2", + "version": "2.0.0-beta.3", "description": "Simple, persistent key-value store.", "license": "MIT or APACHE-2.0", "authors": [ @@ -24,6 +24,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-beta.6" + "@tauri-apps/api": "2.0.0-beta.11" } } diff --git a/plugins/store/src/store.rs b/plugins/store/src/store.rs index 9437ada15..efd109846 100644 --- a/plugins/store/src/store.rs +++ b/plugins/store/src/store.rs @@ -58,7 +58,8 @@ impl StoreBuilder { /// ``` pub fn new>(path: P) -> Self { Self { - path: path.as_ref().to_path_buf(), + // Since Store.path is only exposed to the user in emit calls we may as well simplify it here already. + path: dunce::simplified(path.as_ref()).to_path_buf(), defaults: None, cache: Default::default(), serialize: default_serialize, diff --git a/plugins/stronghold/CHANGELOG.md b/plugins/stronghold/CHANGELOG.md index 335efd379..bb13ff210 100644 --- a/plugins/stronghold/CHANGELOG.md +++ b/plugins/stronghold/CHANGELOG.md @@ -2,6 +2,10 @@ ## \[2.0.0-beta.3] +- [`bd1ed590`](https://github.com/tauri-apps/plugins-workspace/commit/bd1ed5903ffcce5500310dac1e59e8c67674ef1e)([#1237](https://github.com/tauri-apps/plugins-workspace/pull/1237)) Update to tauri beta.17. + +## \[2.0.0-beta.3] + - [`a04ea2f`](https://github.com/tauri-apps/plugins-workspace/commit/a04ea2f38294d5a3987578283badc8eec87a7752)([#1071](https://github.com/tauri-apps/plugins-workspace/pull/1071)) The global API script is now only added to the binary when the `withGlobalTauri` config is true. ## \[2.0.0-beta.2] diff --git a/plugins/stronghold/Cargo.toml b/plugins/stronghold/Cargo.toml index 05c25c4e1..8747103d0 100644 --- a/plugins/stronghold/Cargo.toml +++ b/plugins/stronghold/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tauri-plugin-stronghold" -version = "2.0.0-beta.3" +version = "2.0.0-beta.4" description = "Store secrets and keys using the IOTA Stronghold encrypted database." authors = { workspace = true } license = { workspace = true } @@ -10,11 +10,11 @@ repository = { 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"] } +tauri-plugin = { workspace = true, features = [ "build" ] } [dependencies] serde = { workspace = true } @@ -25,15 +25,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/api-iife.js b/plugins/stronghold/api-iife.js index b8f95ec42..0fc9c8006 100644 --- a/plugins/stronghold/api-iife.js +++ b/plugins/stronghold/api-iife.js @@ -1 +1 @@ -if("__TAURI__"in window){var __TAURI_PLUGIN_STRONGHOLD__=function(t){"use strict";async function e(t,e={},r){return window.__TAURI_INTERNALS__.invoke(t,e,r)}function r(t){return"string"==typeof t?t:Array.from(t instanceof ArrayBuffer?new Uint8Array(t):t)}"function"==typeof SuppressedError&&SuppressedError;class n{constructor(t,e){this.type=t,this.payload=e}static generic(t,e){return new n("Generic",{vault:r(t),record:r(e)})}static counter(t,e){return new n("Counter",{vault:r(t),counter:e})}}class a{constructor(t){this.procedureArgs=t}async generateSLIP10Seed(t,r){return await e("plugin:stronghold|execute_procedure",{...this.procedureArgs,procedure:{type:"SLIP10Generate",payload:{output:t,sizeBytes:r}}}).then((t=>Uint8Array.from(t)))}async deriveSLIP10(t,r,n,a){return await e("plugin:stronghold|execute_procedure",{...this.procedureArgs,procedure:{type:"SLIP10Derive",payload:{chain:t,input:{type:r,payload:n},output:a}}}).then((t=>Uint8Array.from(t)))}async recoverBIP39(t,r,n){return await e("plugin:stronghold|execute_procedure",{...this.procedureArgs,procedure:{type:"BIP39Recover",payload:{mnemonic:t,passphrase:n,output:r}}}).then((t=>Uint8Array.from(t)))}async generateBIP39(t,r){return await e("plugin:stronghold|execute_procedure",{...this.procedureArgs,procedure:{type:"BIP39Generate",payload:{output:t,passphrase:r}}}).then((t=>Uint8Array.from(t)))}async getEd25519PublicKey(t){return await e("plugin:stronghold|execute_procedure",{...this.procedureArgs,procedure:{type:"PublicKey",payload:{type:"Ed25519",privateKey:t}}}).then((t=>Uint8Array.from(t)))}async signEd25519(t,r){return await e("plugin:stronghold|execute_procedure",{...this.procedureArgs,procedure:{type:"Ed25519Sign",payload:{privateKey:t,msg:r}}}).then((t=>Uint8Array.from(t)))}}class s{constructor(t,e){this.path=t,this.name=r(e)}getVault(t){return new i(this.path,this.name,r(t))}getStore(){return new o(this.path,this.name)}}class o{constructor(t,e){this.path=t,this.client=e}async get(t){return await e("plugin:stronghold|get_store_record",{snapshotPath:this.path,client:this.client,key:r(t)}).then((t=>null!=t?Uint8Array.from(t):null))}async insert(t,n,a){return await e("plugin:stronghold|save_store_record",{snapshotPath:this.path,client:this.client,key:r(t),value:n,lifetime:a})}async remove(t){return await e("plugin:stronghold|remove_store_record",{snapshotPath:this.path,client:this.client,key:r(t)}).then((t=>null!=t?Uint8Array.from(t):null))}}class i extends a{constructor(t,e,n){super({snapshotPath:t,client:e,vault:n}),this.path=t,this.client=r(e),this.name=r(n)}async insert(t,n){return await e("plugin:stronghold|save_secret",{snapshotPath:this.path,client:this.client,vault:this.name,recordPath:r(t),secret:n})}async remove(t){return await e("plugin:stronghold|remove_secret",{snapshotPath:this.path,client:this.client,vault:this.name,recordPath:t.payload.record})}}class h{constructor(t){this.path=t}static async load(t,r){return await e("plugin:stronghold|initialize",{snapshotPath:t,password:r}).then((()=>new h(t)))}async unload(){return await e("plugin:stronghold|destroy",{snapshotPath:this.path})}async loadClient(t){return await e("plugin:stronghold|load_client",{snapshotPath:this.path,client:r(t)}).then((()=>new s(this.path,t)))}async createClient(t){return await e("plugin:stronghold|create_client",{snapshotPath:this.path,client:r(t)}).then((()=>new s(this.path,t)))}async save(){return await e("plugin:stronghold|save",{snapshotPath:this.path})}}return t.Client=s,t.Location=n,t.Store=o,t.Stronghold=h,t.Vault=i,t}({});Object.defineProperty(window.__TAURI__,"stronghold",{value:__TAURI_PLUGIN_STRONGHOLD__})} +if("__TAURI__"in window){var __TAURI_PLUGIN_STRONGHOLD__=function(t){"use strict";async function e(t,e={},r){return window.__TAURI_INTERNALS__.invoke(t,e,r)}function r(t){return"string"==typeof t?t:Array.from(t instanceof ArrayBuffer?new Uint8Array(t):t)}"function"==typeof SuppressedError&&SuppressedError;class n{constructor(t,e){this.type=t,this.payload=e}static generic(t,e){return new n("Generic",{vault:r(t),record:r(e)})}static counter(t,e){return new n("Counter",{vault:r(t),counter:e})}}class a{constructor(t){this.procedureArgs=t}async generateSLIP10Seed(t,r){return await e("plugin:stronghold|execute_procedure",{...this.procedureArgs,procedure:{type:"SLIP10Generate",payload:{output:t,sizeBytes:r}}}).then((t=>Uint8Array.from(t)))}async deriveSLIP10(t,r,n,a){return await e("plugin:stronghold|execute_procedure",{...this.procedureArgs,procedure:{type:"SLIP10Derive",payload:{chain:t,input:{type:r,payload:n},output:a}}}).then((t=>Uint8Array.from(t)))}async recoverBIP39(t,r,n){return await e("plugin:stronghold|execute_procedure",{...this.procedureArgs,procedure:{type:"BIP39Recover",payload:{mnemonic:t,passphrase:n,output:r}}}).then((t=>Uint8Array.from(t)))}async generateBIP39(t,r){return await e("plugin:stronghold|execute_procedure",{...this.procedureArgs,procedure:{type:"BIP39Generate",payload:{output:t,passphrase:r}}}).then((t=>Uint8Array.from(t)))}async getEd25519PublicKey(t){return await e("plugin:stronghold|execute_procedure",{...this.procedureArgs,procedure:{type:"PublicKey",payload:{type:"Ed25519",privateKey:t}}}).then((t=>Uint8Array.from(t)))}async signEd25519(t,r){return await e("plugin:stronghold|execute_procedure",{...this.procedureArgs,procedure:{type:"Ed25519Sign",payload:{privateKey:t,msg:r}}}).then((t=>Uint8Array.from(t)))}}class s{constructor(t,e){this.path=t,this.name=r(e)}getVault(t){return new i(this.path,this.name,r(t))}getStore(){return new o(this.path,this.name)}}class o{constructor(t,e){this.path=t,this.client=e}async get(t){return await e("plugin:stronghold|get_store_record",{snapshotPath:this.path,client:this.client,key:r(t)}).then((t=>null!=t?Uint8Array.from(t):null))}async insert(t,n,a){await e("plugin:stronghold|save_store_record",{snapshotPath:this.path,client:this.client,key:r(t),value:n,lifetime:a})}async remove(t){return await e("plugin:stronghold|remove_store_record",{snapshotPath:this.path,client:this.client,key:r(t)}).then((t=>null!=t?Uint8Array.from(t):null))}}class i extends a{constructor(t,e,n){super({snapshotPath:t,client:e,vault:n}),this.path=t,this.client=r(e),this.name=r(n)}async insert(t,n){await e("plugin:stronghold|save_secret",{snapshotPath:this.path,client:this.client,vault:this.name,recordPath:r(t),secret:n})}async remove(t){await e("plugin:stronghold|remove_secret",{snapshotPath:this.path,client:this.client,vault:this.name,recordPath:t.payload.record})}}class h{constructor(t){this.path=t}static async load(t,r){return await e("plugin:stronghold|initialize",{snapshotPath:t,password:r}).then((()=>new h(t)))}async unload(){await e("plugin:stronghold|destroy",{snapshotPath:this.path})}async loadClient(t){return await e("plugin:stronghold|load_client",{snapshotPath:this.path,client:r(t)}).then((()=>new s(this.path,t)))}async createClient(t){return await e("plugin:stronghold|create_client",{snapshotPath:this.path,client:r(t)}).then((()=>new s(this.path,t)))}async save(){await e("plugin:stronghold|save",{snapshotPath:this.path})}}return t.Client=s,t.Location=n,t.Store=o,t.Stronghold=h,t.Vault=i,t}({});Object.defineProperty(window.__TAURI__,"stronghold",{value:__TAURI_PLUGIN_STRONGHOLD__})} diff --git a/plugins/stronghold/guest-js/index.ts b/plugins/stronghold/guest-js/index.ts index bf39420b3..a9fc90777 100644 --- a/plugins/stronghold/guest-js/index.ts +++ b/plugins/stronghold/guest-js/index.ts @@ -85,7 +85,7 @@ export interface NetworkConfig { export interface Duration { /** The number of whole seconds contained by this Duration. */ secs: number; - /** The fractional part of this Duration, in nanoseconds. Must be greater or equal to 0 and smaller than 1e+9 (the max number of nanoseoncds in a second)*/ + /** The fractional part of this Duration, in nanoseconds. Must be greater or equal to 0 and smaller than 1e+9 (the max number of nanoseoncds in a second) */ nanos: number; } @@ -314,7 +314,7 @@ export class Store { value: number[], lifetime?: Duration, ): Promise { - return await invoke("plugin:stronghold|save_store_record", { + await invoke("plugin:stronghold|save_store_record", { snapshotPath: this.path, client: this.client, key: toBytesDto(key), @@ -366,7 +366,7 @@ export class Vault extends ProcedureExecutor { * @returns */ async insert(recordPath: RecordPath, secret: number[]): Promise { - return await invoke("plugin:stronghold|save_secret", { + await invoke("plugin:stronghold|save_secret", { snapshotPath: this.path, client: this.client, vault: this.name, @@ -382,7 +382,7 @@ export class Vault extends ProcedureExecutor { * @returns */ async remove(location: Location): Promise { - return await invoke("plugin:stronghold|remove_secret", { + await invoke("plugin:stronghold|remove_secret", { snapshotPath: this.path, client: this.client, vault: this.name, @@ -423,7 +423,7 @@ export class Stronghold { * Remove this instance from the cache. */ async unload(): Promise { - return await invoke("plugin:stronghold|destroy", { + await invoke("plugin:stronghold|destroy", { snapshotPath: this.path, }); } @@ -447,7 +447,7 @@ export class Stronghold { * @returns */ async save(): Promise { - return await invoke("plugin:stronghold|save", { + await invoke("plugin:stronghold|save", { snapshotPath: this.path, }); } diff --git a/plugins/stronghold/package.json b/plugins/stronghold/package.json index faad8950f..100b0208b 100644 --- a/plugins/stronghold/package.json +++ b/plugins/stronghold/package.json @@ -1,6 +1,6 @@ { "name": "@tauri-apps/plugin-stronghold", - "version": "2.0.0-beta.2", + "version": "2.0.0-beta.3", "description": "Store secrets and keys using the IOTA Stronghold encrypted database.", "license": "MIT or APACHE-2.0", "authors": [ @@ -24,6 +24,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-beta.6" + "@tauri-apps/api": "2.0.0-beta.11" } } diff --git a/plugins/updater/CHANGELOG.md b/plugins/updater/CHANGELOG.md index 3e02a3a9c..cd33d4b3b 100644 --- a/plugins/updater/CHANGELOG.md +++ b/plugins/updater/CHANGELOG.md @@ -2,6 +2,18 @@ ## \[2.0.0-beta.3] +- [`bd1ed590`](https://github.com/tauri-apps/plugins-workspace/commit/bd1ed5903ffcce5500310dac1e59e8c67674ef1e)([#1237](https://github.com/tauri-apps/plugins-workspace/pull/1237)) Update to tauri beta.17. + +## \[2.0.0-beta.4] + +- [`293f363`](https://github.com/tauri-apps/plugins-workspace/commit/293f363c0dccc43e8403729fdc8cc2b4311c2d5b)([#1175](https://github.com/tauri-apps/plugins-workspace/pull/1175)) Add a `on_before_exit` hook for cleanup before spawning the updater on Windows, defaults to `app.cleanup_before_exit` when used through `UpdaterExt` +- [`293f363`](https://github.com/tauri-apps/plugins-workspace/commit/293f363c0dccc43e8403729fdc8cc2b4311c2d5b)([#1175](https://github.com/tauri-apps/plugins-workspace/pull/1175)) **Breaking change:** The `rustls-tls` feature flag is now enabled by default. +- [`e3d41f4`](https://github.com/tauri-apps/plugins-workspace/commit/e3d41f4011bd3ea3ce281bb38bbe31d3709f8e0f)([#1191](https://github.com/tauri-apps/plugins-workspace/pull/1191)) Internally use the webview scoped resources table instead of the app one, so other webviews can't access other webviews resources. +- [`7e2fcc5`](https://github.com/tauri-apps/plugins-workspace/commit/7e2fcc5e74df7c3c718e40f75bfb0eafc7d69d8d)([#1146](https://github.com/tauri-apps/plugins-workspace/pull/1146)) Update dependencies to align with tauri 2.0.0-beta.14. +- [`e3d41f4`](https://github.com/tauri-apps/plugins-workspace/commit/e3d41f4011bd3ea3ce281bb38bbe31d3709f8e0f)([#1191](https://github.com/tauri-apps/plugins-workspace/pull/1191)) Update for tauri 2.0.0-beta.15. + +## \[2.0.0-beta.3] + - [`4e37316`](https://github.com/tauri-apps/plugins-workspace/commit/4e37316af0d6532bf9a9bd0e712b5b14b0598285)([#1051](https://github.com/tauri-apps/plugins-workspace/pull/1051)) Fix deserialization of `windows > installerArgs` config field. - [`4e37316`](https://github.com/tauri-apps/plugins-workspace/commit/4e37316af0d6532bf9a9bd0e712b5b14b0598285)([#1051](https://github.com/tauri-apps/plugins-workspace/pull/1051)) On Windows, fallback to `passive` install mode when not defined in config. - [`a3b5396`](https://github.com/tauri-apps/plugins-workspace/commit/a3b5396113ca93912274f6890d9ef5b1a409587a)([#1054](https://github.com/tauri-apps/plugins-workspace/pull/1054)) Fix Windows powershell window flashing on update @@ -93,3 +105,5 @@ - [`717ae67`](https://github.com/tauri-apps/plugins-workspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! 717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! +92fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! + 717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! diff --git a/plugins/updater/Cargo.toml b/plugins/updater/Cargo.toml index b29c4f573..e88a1bae1 100644 --- a/plugins/updater/Cargo.toml +++ b/plugins/updater/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tauri-plugin-updater" -version = "2.0.0-beta.3" +version = "2.0.0-beta.5" description = "In-app updates for Tauri applications." edition = { workspace = true } authors = { workspace = true } @@ -10,11 +10,11 @@ repository = { 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"] } +tauri-plugin = { workspace = true, features = [ "build" ] } [dependencies] tauri = { workspace = true } @@ -22,35 +22,33 @@ serde = { workspace = true } serde_json = { workspace = true } thiserror = { workspace = true } tokio = "1" -reqwest = { version = "0.12", default-features = false, features = [ - "json", - "stream", -] } +reqwest = { version = "0.12", default-features = false, features = [ "json", "stream" ] } url = { workspace = true } http = "1" -dirs-next = "2" minisign-verify = "0.2" -time = { version = "0.3", features = ["parsing", "formatting"] } +time = { version = "0.3", features = [ "parsing", "formatting" ] } base64 = "0.22" -semver = { version = "1", features = ["serde"] } +semver = { version = "1", features = [ "serde" ] } futures-util = "0.3" tempfile = "3" -zip = "0.6" +infer = "0.15" [target."cfg(target_os = \"windows\")".dependencies] -windows-sys = { version = "0.52.0", features = [ - "Win32_Foundation", - "Win32_UI_WindowsAndMessaging", -] } +zip = { version = "0.6", optional = true } +windows-sys = { version = "0.52.0", features = [ "Win32_Foundation", "Win32_UI_WindowsAndMessaging" ] } + +[target."cfg(target_os = \"linux\")".dependencies] +dirs-next = "2" +tar = { version = "0.4", optional = true } +flate2 = { version = "1", optional = true } -[target."cfg(any(target_os = \"macos\", target_os = \"linux\"))".dependencies] +[target."cfg(target_os = \"macos\")".dependencies] tar = "0.4" flate2 = "1" -[dev-dependencies] -mockito = "0.31" - [features] -native-tls = ["reqwest/native-tls"] -native-tls-vendored = ["reqwest/native-tls-vendored"] -rustls-tls = ["reqwest/rustls-tls"] +default = [ "rustls-tls", "zip" ] +zip = [ "dep:zip", "dep:tar", "dep:flate2" ] +native-tls = [ "reqwest/native-tls" ] +native-tls-vendored = [ "reqwest/native-tls-vendored" ] +rustls-tls = [ "reqwest/rustls-tls" ] diff --git a/plugins/updater/api-iife.js b/plugins/updater/api-iife.js index 9688891ab..86e602948 100644 --- a/plugins/updater/api-iife.js +++ b/plugins/updater/api-iife.js @@ -1 +1 @@ -if("__TAURI__"in window){var __TAURI_PLUGIN_UPDATER__=function(e){"use strict";function t(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)}function r(e,t,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,r):n?n.value=r:t.set(e,r),r}var s,n,i,a;"function"==typeof SuppressedError&&SuppressedError;class o{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,s.set(this,(()=>{})),n.set(this,0),i.set(this,{}),this.id=function(e,t=!1){return window.__TAURI_INTERNALS__.transformCallback(e,t)}((({message:e,id:a})=>{if(a===t(this,n,"f")){r(this,n,a+1,"f"),t(this,s,"f").call(this,e);const o=Object.keys(t(this,i,"f"));if(o.length>0){let e=a+1;for(const r of o.sort()){if(parseInt(r)!==e)break;{const n=t(this,i,"f")[r];delete t(this,i,"f")[r],t(this,s,"f").call(this,n),e+=1}}}}else t(this,i,"f")[a.toString()]=e}))}set onmessage(e){r(this,s,e,"f")}get onmessage(){return t(this,s,"f")}toJSON(){return`__CHANNEL__:${this.id}`}}async function c(e,t={},r){return window.__TAURI_INTERNALS__.invoke(e,t,r)}s=new WeakMap,n=new WeakMap,i=new WeakMap;class d{get rid(){return t(this,a,"f")}constructor(e){a.set(this,void 0),r(this,a,e,"f")}async close(){return c("plugin:resources|close",{rid:this.rid})}}a=new WeakMap;class h extends d{constructor(e){super(e.rid),this.available=e.available,this.currentVersion=e.currentVersion,this.version=e.version,this.date=e.date,this.body=e.body}async downloadAndInstall(e){const t=new o;return e&&(t.onmessage=e),c("plugin:updater|download_and_install",{onEvent:t,rid:this.rid})}}return e.Update=h,e.check=async function(e){return e?.headers&&(e.headers=Array.from(new Headers(e.headers).entries())),c("plugin:updater|check",{...e}).then((e=>e.available?new h(e):null))},e}({});Object.defineProperty(window.__TAURI__,"updater",{value:__TAURI_PLUGIN_UPDATER__})} +if("__TAURI__"in window){var __TAURI_PLUGIN_UPDATER__=function(e){"use strict";function t(e,t,s,r){if("a"===s&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===s?r:"a"===s?r.call(e):r?r.value:t.get(e)}function s(e,t,s,r,n){if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,s),s}var r,n,i,a;"function"==typeof SuppressedError&&SuppressedError;class o{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,r.set(this,(()=>{})),n.set(this,0),i.set(this,{}),this.id=function(e,t=!1){return window.__TAURI_INTERNALS__.transformCallback(e,t)}((({message:e,id:a})=>{if(a===t(this,n,"f")){s(this,n,a+1),t(this,r,"f").call(this,e);const o=Object.keys(t(this,i,"f"));if(o.length>0){let e=a+1;for(const s of o.sort()){if(parseInt(s)!==e)break;{const n=t(this,i,"f")[s];delete t(this,i,"f")[s],t(this,r,"f").call(this,n),e+=1}}s(this,n,e)}}else t(this,i,"f")[a.toString()]=e}))}set onmessage(e){s(this,r,e)}get onmessage(){return t(this,r,"f")}toJSON(){return`__CHANNEL__:${this.id}`}}async function c(e,t={},s){return window.__TAURI_INTERNALS__.invoke(e,t,s)}r=new WeakMap,n=new WeakMap,i=new WeakMap;class d{get rid(){return t(this,a,"f")}constructor(e){a.set(this,void 0),s(this,a,e)}async close(){return c("plugin:resources|close",{rid:this.rid})}}a=new WeakMap;class h extends d{constructor(e){super(e.rid),this.available=e.available,this.currentVersion=e.currentVersion,this.version=e.version,this.date=e.date,this.body=e.body}async downloadAndInstall(e){const t=new o;null!=e&&(t.onmessage=e),await c("plugin:updater|download_and_install",{onEvent:t,rid:this.rid})}}return e.Update=h,e.check=async function(e){return null!=e?.headers&&(e.headers=Array.from(new Headers(e.headers).entries())),await c("plugin:updater|check",{...e}).then((e=>e.available?new h(e):null))},e}({});Object.defineProperty(window.__TAURI__,"updater",{value:__TAURI_PLUGIN_UPDATER__})} diff --git a/plugins/updater/guest-js/index.ts b/plugins/updater/guest-js/index.ts index e3f8ec29f..120ae8d8b 100644 --- a/plugins/updater/guest-js/index.ts +++ b/plugins/updater/guest-js/index.ts @@ -60,10 +60,10 @@ class Update extends Resource { onEvent?: (progress: DownloadEvent) => void, ): Promise { const channel = new Channel(); - if (onEvent) { + if (onEvent != null) { channel.onmessage = onEvent; } - return invoke("plugin:updater|download_and_install", { + await invoke("plugin:updater|download_and_install", { onEvent: channel, rid: this.rid, }); @@ -72,11 +72,11 @@ class Update extends Resource { /** Check for updates, resolves to `null` if no updates are available */ async function check(options?: CheckOptions): Promise { - if (options?.headers) { + if (options?.headers != null) { options.headers = Array.from(new Headers(options.headers).entries()); } - return invoke("plugin:updater|check", { + return await invoke("plugin:updater|check", { ...options, }).then((meta) => (meta.available ? new Update(meta) : null)); } diff --git a/plugins/updater/package.json b/plugins/updater/package.json index 9b3544797..7a0997d88 100644 --- a/plugins/updater/package.json +++ b/plugins/updater/package.json @@ -1,6 +1,6 @@ { "name": "@tauri-apps/plugin-updater", - "version": "2.0.0-beta.2", + "version": "2.0.0-beta.3", "license": "MIT or APACHE-2.0", "authors": [ "Tauri Programme within The Commons Conservancy" @@ -23,6 +23,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-beta.6" + "@tauri-apps/api": "2.0.0-beta.11" } } diff --git a/plugins/updater/src/commands.rs b/plugins/updater/src/commands.rs index 6d2668f24..db0f87db3 100644 --- a/plugins/updater/src/commands.rs +++ b/plugins/updater/src/commands.rs @@ -5,7 +5,7 @@ use crate::{Result, Update, UpdaterExt}; use serde::Serialize; -use tauri::{ipc::Channel, AppHandle, Manager, ResourceId, Runtime}; +use tauri::{ipc::Channel, Manager, ResourceId, Runtime, Webview}; use std::time::Duration; use url::Url; @@ -37,13 +37,13 @@ pub(crate) struct Metadata { #[tauri::command] pub(crate) async fn check( - app: AppHandle, + webview: Webview, headers: Option>, timeout: Option, proxy: Option, target: Option, ) -> Result { - let mut builder = app.updater_builder(); + let mut builder = webview.updater_builder(); if let Some(headers) = headers { for (k, v) in headers { builder = builder.header(k, v)?; @@ -69,7 +69,7 @@ pub(crate) async fn check( metadata.version = update.version.clone(); metadata.date = update.date.map(|d| d.to_string()); metadata.body = update.body.clone(); - metadata.rid = Some(app.resources_table().add(update)); + metadata.rid = Some(webview.resources_table().add(update)); } Ok(metadata) @@ -77,11 +77,11 @@ pub(crate) async fn check( #[tauri::command] pub(crate) async fn download_and_install( - app: AppHandle, + webview: Webview, rid: ResourceId, on_event: Channel, ) -> Result<()> { - let update = app.resources_table().get::(rid)?; + let update = webview.resources_table().get::(rid)?; let mut first_chunk = true; diff --git a/plugins/updater/src/error.rs b/plugins/updater/src/error.rs index 43c0d2cb6..2bfadc3f7 100644 --- a/plugins/updater/src/error.rs +++ b/plugins/updater/src/error.rs @@ -54,6 +54,7 @@ pub enum Error { /// UTF8 Errors in signature. #[error("The signature {0} could not be decoded, please check if it is a valid base64 string. The signature must be the contents of the `.sig` file generated by the Tauri bundler, as a string.")] SignatureUtf8(String), + #[cfg(all(target_os = "windows", feature = "zip"))] /// `zip` errors. #[error(transparent)] Extract(#[from] zip::result::ZipError), @@ -62,6 +63,8 @@ pub enum Error { TempDirNotOnSameMountPoint, #[error("binary for the current target not found in the archive")] BinaryNotFoundInArchive, + #[error("invalid updater binary format")] + InvalidUpdaterFormat, #[error(transparent)] Http(#[from] http::Error), #[error(transparent)] diff --git a/plugins/updater/src/updater.rs b/plugins/updater/src/updater.rs index 27749bc37..916a04d87 100644 --- a/plugins/updater/src/updater.rs +++ b/plugins/updater/src/updater.rs @@ -475,9 +475,8 @@ impl Update { let mut stream = response.bytes_stream(); while let Some(chunk) = stream.next().await { let chunk = chunk?; - let bytes = chunk.as_ref().to_vec(); - on_chunk(bytes.len(), content_length); - buffer.extend(bytes); + on_chunk(chunk.len(), content_length); + buffer.extend(chunk); } on_download_finish(); @@ -508,114 +507,167 @@ impl Update { fn install_inner(&self, _bytes: Vec) -> Result<()> { Ok(()) } +} + +#[cfg(windows)] +enum WindowsUpdaterType { + Nsis, + Msi, +} - // Windows - // - // ### Expected structure: - // ├── [AppName]_[version]_x64.msi.zip # ZIP generated by tauri-bundler - // │ └──[AppName]_[version]_x64.msi # Application MSI - // ├── [AppName]_[version]_x64-setup.exe.zip # ZIP generated by tauri-bundler - // │ └──[AppName]_[version]_x64-setup.exe # NSIS installer - // └── ... - // - // ## MSI - // Update server can provide a MSI for Windows. (Generated with tauri-bundler from *Wix*) - // To replace current version of the application. In later version we'll offer - // incremental update to push specific binaries. - // - // ## EXE - // Update server can provide a custom EXE (installer) who can run any task. - #[cfg(windows)] +#[cfg(windows)] +impl WindowsUpdaterType { + fn extension(&self) -> &str { + match self { + WindowsUpdaterType::Nsis => ".exe", + WindowsUpdaterType::Msi => ".msi", + } + } +} + +#[cfg(windows)] +impl Config { + fn install_mode(&self) -> crate::config::WindowsUpdateInstallMode { + self.windows + .as_ref() + .map(|w| w.install_mode.clone()) + .unwrap_or_default() + } +} + +/// Windows +#[cfg(windows)] +impl Update { + /// ### Expected structure: + /// ├── [AppName]_[version]_x64.msi # Application MSI + /// ├── [AppName]_[version]_x64-setup.exe # NSIS installer + /// ├── [AppName]_[version]_x64.msi.zip # ZIP generated by tauri-bundler + /// │ └──[AppName]_[version]_x64.msi # Application MSI + /// ├── [AppName]_[version]_x64-setup.exe.zip # ZIP generated by tauri-bundler + /// │ └──[AppName]_[version]_x64-setup.exe # NSIS installer + /// └── ... fn install_inner(&self, bytes: Vec) -> Result<()> { - use std::fs; use windows_sys::{ w, Win32::UI::{Shell::ShellExecuteW, WindowsAndMessaging::SW_SHOW}, }; - // FIXME: We need to create a memory buffer with the MSI and then run it. - // (instead of extracting the MSI to a temp path) - // - // The tricky part is the MSI need to be exposed and spawned so the memory allocation - // shouldn't drop but we should be able to pass the reference so we can drop it once the installation - // is done, otherwise we have a huge memory leak. + let (updater_type, path, _temp) = Self::extract(&bytes)?; - let tmp_dir = tempfile::Builder::new().tempdir()?.into_path(); - let archive = Cursor::new(bytes); - let mut extractor = zip::ZipArchive::new(archive)?; - extractor.extract(&tmp_dir)?; + let install_mode = self.config.install_mode(); + let mut installer_args = self.installer_args(); + match updater_type { + WindowsUpdaterType::Nsis => { + installer_args.extend(install_mode.nsis_args().iter().map(OsStr::new)); + } + WindowsUpdaterType::Msi => { + installer_args.extend(install_mode.msiexec_args().iter().map(OsStr::new)); + installer_args.push(OsStr::new("/promptrestart")); + } + }; - let paths = fs::read_dir(&tmp_dir)?; + if let Some(on_before_exit) = self.on_before_exit.as_ref() { + on_before_exit(); + } - let install_mode = self - .config - .windows - .as_ref() - .map(|w| w.install_mode.clone()) - .unwrap_or_default(); - let mut installer_args = self - .installer_args + let file = encode_wide(path); + let parameters = encode_wide(installer_args.join(OsStr::new(" "))); + unsafe { + ShellExecuteW( + 0, + w!("open"), + file.as_ptr(), + parameters.as_ptr(), + std::ptr::null(), + SW_SHOW, + ) + }; + + std::process::exit(0); + } + + fn installer_args(&self) -> Vec<&OsStr> { + self.installer_args .iter() .map(OsStr::new) - .collect::>(); + .collect::>() + } + + fn extract(bytes: &[u8]) -> Result<(WindowsUpdaterType, PathBuf, Option)> { + #[cfg(feature = "zip")] + if infer::archive::is_zip(bytes) { + return Self::extract_zip(bytes); + } + + Self::extract_exe(bytes) + } + + #[cfg(feature = "zip")] + fn extract_zip( + bytes: &[u8], + ) -> Result<(WindowsUpdaterType, PathBuf, Option)> { + let tmp_dir = tempfile::Builder::new().tempdir()?.into_path(); + + let archive = Cursor::new(bytes); + let mut extractor = zip::ZipArchive::new(archive)?; + extractor.extract(&tmp_dir)?; + let paths = std::fs::read_dir(&tmp_dir)?; for path in paths { let found_path = path?.path(); - // we support 2 type of files exe & msi for now - // If it's an `exe` we expect an NSIS installer. - if found_path.extension() == Some(OsStr::new("exe")) { - installer_args.extend(install_mode.nsis_args().iter().map(OsStr::new)); - } else if found_path.extension() == Some(OsStr::new("msi")) { - installer_args.extend(install_mode.msiexec_args().iter().map(OsStr::new)); - installer_args.push(OsStr::new("/promptrestart")); - } else { - continue; + let ext = found_path.extension(); + if ext == Some(OsStr::new("exe")) { + return Ok((WindowsUpdaterType::Nsis, found_path, None)); + } else if ext == Some(OsStr::new("msi")) { + return Ok((WindowsUpdaterType::Msi, found_path, None)); } + } - if let Some(on_before_exit) = self.on_before_exit.as_ref() { - on_before_exit(); - } + Err(crate::Error::BinaryNotFoundInArchive) + } - let file = encode_wide(found_path.as_os_str()); - let parameters = encode_wide(installer_args.join(OsStr::new(" ")).as_os_str()); - unsafe { - ShellExecuteW( - 0, - w!("open"), - file.as_ptr(), - parameters.as_ptr(), - std::ptr::null(), - SW_SHOW, - ) - }; + fn extract_exe( + bytes: &[u8], + ) -> Result<(WindowsUpdaterType, PathBuf, Option)> { + use std::io::Write; - std::process::exit(0); - } + let updater_type = if infer::app::is_exe(bytes) { + WindowsUpdaterType::Nsis + } else if infer::archive::is_msi(bytes) { + WindowsUpdaterType::Msi + } else { + return Err(crate::Error::InvalidUpdaterFormat); + }; - Ok(()) + let ext = updater_type.extension(); + + let mut temp_file = tempfile::Builder::new().suffix(ext).tempfile()?; + temp_file.write_all(bytes)?; + let temp_path = temp_file.into_temp_path(); + + Ok((updater_type, temp_path.to_path_buf(), Some(temp_path))) } +} - // Linux (AppImage) - // - // ### Expected structure: - // ├── [AppName]_[version]_amd64.AppImage.tar.gz # GZ generated by tauri-bundler - // │ └──[AppName]_[version]_amd64.AppImage # Application AppImage - // └── ... - // - // We should have an AppImage already installed to be able to copy and install - // the extract_path is the current AppImage path - // tmp_dir is where our new AppImage is found - #[cfg(any( - target_os = "linux", - target_os = "dragonfly", - target_os = "freebsd", - target_os = "netbsd", - target_os = "openbsd" - ))] +/// Linux (AppImage) +#[cfg(any( + target_os = "linux", + target_os = "dragonfly", + target_os = "freebsd", + target_os = "netbsd", + target_os = "openbsd" +))] +impl Update { + /// ### Expected structure: + /// ├── [AppName]_[version]_amd64.AppImage.tar.gz # GZ generated by tauri-bundler + /// │ └──[AppName]_[version]_amd64.AppImage # Application AppImage + /// └── ... + /// + /// We should have an AppImage already installed to be able to copy and install + /// the extract_path is the current AppImage path + /// tmp_dir is where our new AppImage is found fn install_inner(&self, bytes: Vec) -> Result<()> { - use flate2::read::GzDecoder; use std::os::unix::fs::{MetadataExt, PermissionsExt}; - let archive = Cursor::new(bytes); let extract_path_metadata = self.extract_path.metadata()?; let tmp_dir_locations = vec![ @@ -641,43 +693,56 @@ impl Update { // create a backup of our current app image std::fs::rename(&self.extract_path, tmp_app_image)?; - // extract the buffer to the tmp_dir - // we extract our signed archive into our final directory without any temp file - let decoder = GzDecoder::new(archive); - let mut archive = tar::Archive::new(decoder); - for mut entry in archive.entries()?.flatten() { - if let Ok(path) = entry.path() { - if path.extension() == Some(OsStr::new("AppImage")) { - // if something went wrong during the extraction, we should restore previous app - if let Err(err) = entry.unpack(&self.extract_path) { - std::fs::rename(tmp_app_image, &self.extract_path)?; - return Err(err.into()); + #[cfg(feature = "zip")] + if infer::archive::is_gz(&bytes) { + // extract the buffer to the tmp_dir + // we extract our signed archive into our final directory without any temp file + let archive = Cursor::new(bytes); + let decoder = flate2::read::GzDecoder::new(archive); + let mut archive = tar::Archive::new(decoder); + for mut entry in archive.entries()?.flatten() { + if let Ok(path) = entry.path() { + if path.extension() == Some(OsStr::new("AppImage")) { + // if something went wrong during the extraction, we should restore previous app + if let Err(err) = entry.unpack(&self.extract_path) { + std::fs::rename(tmp_app_image, &self.extract_path)?; + return Err(err.into()); + } + // early finish we have everything we need here + return Ok(()); } - // early finish we have everything we need here - return Ok(()); } } + // if we have not returned early we should restore the backup + std::fs::rename(tmp_app_image, &self.extract_path)?; + return Err(Error::BinaryNotFoundInArchive); } - // if we have not returned early we should restore the backup - std::fs::rename(tmp_app_image, &self.extract_path)?; - return Err(Error::BinaryNotFoundInArchive); + return match std::fs::write(&self.extract_path, bytes) { + Err(err) => { + // if something went wrong during the extraction, we should restore previous app + std::fs::rename(tmp_app_image, &self.extract_path)?; + Err(err.into()) + } + Ok(_) => Ok(()), + }; } } } Err(Error::TempDirNotOnSameMountPoint) } +} - // MacOS - // - // ### Expected structure: - // ├── [AppName]_[version]_x64.app.tar.gz # GZ generated by tauri-bundler - // │ └──[AppName].app # Main application - // │ └── Contents # Application contents... - // │ └── ... - // └── ... - #[cfg(target_os = "macos")] +/// MacOS +#[cfg(target_os = "macos")] +impl Update { + /// ### Expected structure: + /// ├── [AppName]_[version]_x64.app.tar.gz # GZ generated by tauri-bundler + /// │ └──[AppName].app # Main application + /// │ └── Contents # Application contents... + /// │ └── ... + /// └── ... fn install_inner(&self, bytes: Vec) -> Result<()> { use flate2::read::GzDecoder; @@ -889,7 +954,7 @@ fn base64_to_string(base64_string: &str) -> Result { Ok(result) } -#[cfg(target_os = "windows")] +#[cfg(windows)] fn encode_wide(string: impl AsRef) -> Vec { use std::os::windows::ffi::OsStrExt; diff --git a/plugins/updater/tests/app-updater/Cargo.toml b/plugins/updater/tests/app-updater/Cargo.toml index 195f3ab07..b03644076 100644 --- a/plugins/updater/tests/app-updater/Cargo.toml +++ b/plugins/updater/tests/app-updater/Cargo.toml @@ -11,7 +11,7 @@ tauri = { workspace = true } serde = { workspace = true } serde_json = { workspace = true } tauri-plugin-updater = { path = "../.." } -tiny_http = "0.11" +tiny_http = "0.12" time = { version = "0.3", features = ["formatting"] } [features] diff --git a/plugins/upload/CHANGELOG.md b/plugins/upload/CHANGELOG.md index 4a671e8b1..3011ad2d9 100644 --- a/plugins/upload/CHANGELOG.md +++ b/plugins/upload/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## \[2.0.0-beta.4] + +- [`bd1ed590`](https://github.com/tauri-apps/plugins-workspace/commit/bd1ed5903ffcce5500310dac1e59e8c67674ef1e)([#1237](https://github.com/tauri-apps/plugins-workspace/pull/1237)) Update to tauri beta.17. + +## \[2.0.0-beta.3] + +- [`4a5ab18`](https://github.com/tauri-apps/plugins-workspace/commit/4a5ab18a229b902314f242d656b3a2290a8b9065)([#976](https://github.com/tauri-apps/plugins-workspace/pull/976)) Return the upload response as a string and error out if the status code is not within 200-299. + ## \[2.0.0-beta.3] - [`a04ea2f`](https://github.com/tauri-apps/plugins-workspace/commit/a04ea2f38294d5a3987578283badc8eec87a7752)([#1071](https://github.com/tauri-apps/plugins-workspace/pull/1071)) The global API script is now only added to the binary when the `withGlobalTauri` config is true. @@ -51,3 +59,6 @@ 17ae67\`]\(https://github.com/tauri-apps/plugins-workspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! 67\`]\(https://github.com/tauri-apps/plugins-workspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! 717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! + s-workspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! + 67\`]\(https://github.com/tauri-apps/plugins-workspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! + 717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! diff --git a/plugins/upload/Cargo.toml b/plugins/upload/Cargo.toml index d4a1de715..700bb2d1c 100644 --- a/plugins/upload/Cargo.toml +++ b/plugins/upload/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tauri-plugin-upload" -version = "2.0.0-beta.3" +version = "2.0.0-beta.5" description = "Upload files from disk to a remote server over HTTP." authors = { workspace = true } license = { workspace = true } @@ -10,11 +10,11 @@ repository = { 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"] } +tauri-plugin = { workspace = true, features = [ "build" ] } [dependencies] serde = { workspace = true } @@ -22,16 +22,13 @@ 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.12", default-features = false, features = [ - "json", - "stream", -] } +tokio = { version = "1", features = [ "fs" ] } +tokio-util = { version = "0.7", features = [ "codec" ] } +reqwest = { version = "0.12", 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/api-iife.js b/plugins/upload/api-iife.js index 1c5089ae1..459beda90 100644 --- a/plugins/upload/api-iife.js +++ b/plugins/upload/api-iife.js @@ -1 +1 @@ -if("__TAURI__"in window){var __TAURI_PLUGIN_UPLOAD__=function(e){"use strict";function t(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function n(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n}var r,o,s;"function"==typeof SuppressedError&&SuppressedError;class a{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,r.set(this,(()=>{})),o.set(this,0),s.set(this,{}),this.id=function(e,t=!1){return window.__TAURI_INTERNALS__.transformCallback(e,t)}((({message:e,id:a})=>{if(a===t(this,o,"f")){n(this,o,a+1,"f"),t(this,r,"f").call(this,e);const i=Object.keys(t(this,s,"f"));if(i.length>0){let e=a+1;for(const n of i.sort()){if(parseInt(n)!==e)break;{const o=t(this,s,"f")[n];delete t(this,s,"f")[n],t(this,r,"f").call(this,o),e+=1}}}}else t(this,s,"f")[a.toString()]=e}))}set onmessage(e){n(this,r,e,"f")}get onmessage(){return t(this,r,"f")}toJSON(){return`__CHANNEL__:${this.id}`}}async function i(e,t={},n){return window.__TAURI_INTERNALS__.invoke(e,t,n)}return r=new WeakMap,o=new WeakMap,s=new WeakMap,e.download=async function(e,t,n,r){const o=new Uint32Array(1);window.crypto.getRandomValues(o);const s=o[0],c=new a;null!=n&&(c.onmessage=n),await i("plugin:upload|download",{id:s,url:e,filePath:t,headers:r??{},onProgress:c})},e.upload=async function(e,t,n,r){const o=new Uint32Array(1);window.crypto.getRandomValues(o);const s=o[0],c=new a;return null!=n&&(c.onmessage=n),await i("plugin:upload|upload",{id:s,url:e,filePath:t,headers:r??{},onProgress:c})},e}({});Object.defineProperty(window.__TAURI__,"upload",{value:__TAURI_PLUGIN_UPLOAD__})} +if("__TAURI__"in window){var __TAURI_PLUGIN_UPLOAD__=function(e){"use strict";function t(e,t,n,o){if("a"===n&&!o)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?o:"a"===n?o.call(e):o?o.value:t.get(e)}function n(e,t,n,o,s){if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}var o,s,r;"function"==typeof SuppressedError&&SuppressedError;class i{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,o.set(this,(()=>{})),s.set(this,0),r.set(this,{}),this.id=function(e,t=!1){return window.__TAURI_INTERNALS__.transformCallback(e,t)}((({message:e,id:i})=>{if(i===t(this,s,"f")){n(this,s,i+1),t(this,o,"f").call(this,e);const a=Object.keys(t(this,r,"f"));if(a.length>0){let e=i+1;for(const n of a.sort()){if(parseInt(n)!==e)break;{const s=t(this,r,"f")[n];delete t(this,r,"f")[n],t(this,o,"f").call(this,s),e+=1}}n(this,s,e)}}else t(this,r,"f")[i.toString()]=e}))}set onmessage(e){n(this,o,e)}get onmessage(){return t(this,o,"f")}toJSON(){return`__CHANNEL__:${this.id}`}}async function a(e,t={},n){return window.__TAURI_INTERNALS__.invoke(e,t,n)}return o=new WeakMap,s=new WeakMap,r=new WeakMap,e.download=async function(e,t,n,o){const s=new Uint32Array(1);window.crypto.getRandomValues(s);const r=s[0],c=new i;null!=n&&(c.onmessage=n),await a("plugin:upload|download",{id:r,url:e,filePath:t,headers:o??{},onProgress:c})},e.upload=async function(e,t,n,o){const s=new Uint32Array(1);window.crypto.getRandomValues(s);const r=s[0],c=new i;return null!=n&&(c.onmessage=n),await a("plugin:upload|upload",{id:r,url:e,filePath:t,headers:o??{},onProgress:c})},e}({});Object.defineProperty(window.__TAURI__,"upload",{value:__TAURI_PLUGIN_UPLOAD__})} diff --git a/plugins/upload/package.json b/plugins/upload/package.json index dd50727f8..5a3604c86 100644 --- a/plugins/upload/package.json +++ b/plugins/upload/package.json @@ -1,6 +1,6 @@ { "name": "@tauri-apps/plugin-upload", - "version": "2.0.0-beta.2", + "version": "2.0.0-beta.4", "description": "Upload files from disk to a remote server over HTTP.", "license": "MIT or APACHE-2.0", "authors": [ @@ -24,6 +24,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-beta.6" + "@tauri-apps/api": "2.0.0-beta.11" } } diff --git a/plugins/websocket/CHANGELOG.md b/plugins/websocket/CHANGELOG.md index 39f1394df..caea0f594 100644 --- a/plugins/websocket/CHANGELOG.md +++ b/plugins/websocket/CHANGELOG.md @@ -2,6 +2,14 @@ ## \[2.0.0-beta.3] +- [`bd1ed590`](https://github.com/tauri-apps/plugins-workspace/commit/bd1ed5903ffcce5500310dac1e59e8c67674ef1e)([#1237](https://github.com/tauri-apps/plugins-workspace/pull/1237)) Update to tauri beta.17. + +## \[2.0.0-beta.4] + +- [`ed46dca`](https://github.com/tauri-apps/plugins-workspace/commit/ed46dca74ff3947dbbcb26a7b571c129bf925698) **Breaking change:** Enable rustls by default and added a method to configure the TLS Connector for tungstenite. + +## \[2.0.0-beta.3] + - [`a04ea2f`](https://github.com/tauri-apps/plugins-workspace/commit/a04ea2f38294d5a3987578283badc8eec87a7752)([#1071](https://github.com/tauri-apps/plugins-workspace/pull/1071)) The global API script is now only added to the binary when the `withGlobalTauri` config is true. ## \[2.0.0-beta.2] diff --git a/plugins/websocket/Cargo.toml b/plugins/websocket/Cargo.toml index bfaca477f..5d31fd838 100644 --- a/plugins/websocket/Cargo.toml +++ b/plugins/websocket/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tauri-plugin-websocket" -version = "2.0.0-beta.3" +version = "2.0.0-beta.5" description = "Expose a WebSocket server to your Tauri frontend." authors = { workspace = true } license = { workspace = true } @@ -8,14 +8,14 @@ edition = { workspace = true } rust-version = { workspace = true } repository = { workspace = true } links = "tauri-plugin-websocket" -exclude = ["/examples"] +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"] } +tauri-plugin = { workspace = true, features = [ "build" ] } [dependencies] serde = { workspace = true } @@ -26,12 +26,12 @@ thiserror = { workspace = true } http = "1" rand = "0.8" futures-util = "0.3" -tokio = { version = "1", features = ["net", "sync"] } +tokio = { version = "1", features = [ "net", "sync" ] } tokio-tungstenite = { version = "0.21" } [features] -default = ["rustls-tls"] -native-tls = ["tokio-tungstenite/native-tls"] -native-tls-vendored = ["native-tls", "tokio-tungstenite/native-tls-vendored"] -rustls-tls = ["tokio-tungstenite/rustls-tls-webpki-roots"] -rustls-tls-native-roots = ["tokio-tungstenite/rustls-tls-native-roots"] +default = [ "rustls-tls" ] +native-tls = [ "tokio-tungstenite/native-tls" ] +native-tls-vendored = [ "native-tls", "tokio-tungstenite/native-tls-vendored" ] +rustls-tls = [ "tokio-tungstenite/rustls-tls-webpki-roots" ] +rustls-tls-native-roots = [ "tokio-tungstenite/rustls-tls-native-roots" ] diff --git a/plugins/websocket/api-iife.js b/plugins/websocket/api-iife.js index d24a7de97..944d7a61a 100644 --- a/plugins/websocket/api-iife.js +++ b/plugins/websocket/api-iife.js @@ -1 +1 @@ -if("__TAURI__"in window){var __TAURI_PLUGIN_WEBSOCKET__=function(){"use strict";function e(e,t,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)}function t(e,t,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,r):n?n.value=r:t.set(e,r),r}var r,s,n;"function"==typeof SuppressedError&&SuppressedError;class i{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,r.set(this,(()=>{})),s.set(this,0),n.set(this,{}),this.id=function(e,t=!1){return window.__TAURI_INTERNALS__.transformCallback(e,t)}((({message:i,id:a})=>{if(a===e(this,s,"f")){t(this,s,a+1,"f"),e(this,r,"f").call(this,i);const o=Object.keys(e(this,n,"f"));if(o.length>0){let t=a+1;for(const s of o.sort()){if(parseInt(s)!==t)break;{const i=e(this,n,"f")[s];delete e(this,n,"f")[s],e(this,r,"f").call(this,i),t+=1}}}}else e(this,n,"f")[a.toString()]=i}))}set onmessage(e){t(this,r,e,"f")}get onmessage(){return e(this,r,"f")}toJSON(){return`__CHANNEL__:${this.id}`}}async function a(e,t={},r){return window.__TAURI_INTERNALS__.invoke(e,t,r)}r=new WeakMap,s=new WeakMap,n=new WeakMap;class o{constructor(e,t){this.id=e,this.listeners=t}static async connect(e,t){const r=[],s=new i;return s.onmessage=e=>{r.forEach((t=>t(e)))},t?.headers&&(t.headers=Array.from(new Headers(t.headers).entries())),await a("plugin:websocket|connect",{url:e,onMessage:s,config:t}).then((e=>new o(e,r)))}addListener(e){this.listeners.push(e)}async send(e){let t;if("string"==typeof e)t={type:"Text",data:e};else if("object"==typeof e&&"type"in e)t=e;else{if(!Array.isArray(e))throw new Error("invalid `message` type, expected a `{ type: string, data: any }` object, a string or a numeric array");t={type:"Binary",data:e}}return await a("plugin:websocket|send",{id:this.id,message:t})}async disconnect(){return await this.send({type:"Close",data:{code:1e3,reason:"Disconnected by client"}})}}return o}();Object.defineProperty(window.__TAURI__,"websocket",{value:__TAURI_PLUGIN_WEBSOCKET__})} +if("__TAURI__"in window){var __TAURI_PLUGIN_WEBSOCKET__=function(){"use strict";function e(e,t,s,n){if("a"===s&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===s?n:"a"===s?n.call(e):n?n.value:t.get(e)}function t(e,t,s,n,r){if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,s),s}var s,n,r;"function"==typeof SuppressedError&&SuppressedError;class i{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,s.set(this,(()=>{})),n.set(this,0),r.set(this,{}),this.id=function(e,t=!1){return window.__TAURI_INTERNALS__.transformCallback(e,t)}((({message:i,id:a})=>{if(a===e(this,n,"f")){t(this,n,a+1),e(this,s,"f").call(this,i);const o=Object.keys(e(this,r,"f"));if(o.length>0){let i=a+1;for(const t of o.sort()){if(parseInt(t)!==i)break;{const n=e(this,r,"f")[t];delete e(this,r,"f")[t],e(this,s,"f").call(this,n),i+=1}}t(this,n,i)}}else e(this,r,"f")[a.toString()]=i}))}set onmessage(e){t(this,s,e)}get onmessage(){return e(this,s,"f")}toJSON(){return`__CHANNEL__:${this.id}`}}async function a(e,t={},s){return window.__TAURI_INTERNALS__.invoke(e,t,s)}s=new WeakMap,n=new WeakMap,r=new WeakMap;class o{constructor(e,t){this.id=e,this.listeners=t}static async connect(e,t){const s=[],n=new i;return n.onmessage=e=>{s.forEach((t=>{t(e)}))},null!=t?.headers&&(t.headers=Array.from(new Headers(t.headers).entries())),await a("plugin:websocket|connect",{url:e,onMessage:n,config:t}).then((e=>new o(e,s)))}addListener(e){this.listeners.push(e)}async send(e){let t;if("string"==typeof e)t={type:"Text",data:e};else if("object"==typeof e&&"type"in e)t=e;else{if(!Array.isArray(e))throw new Error("invalid `message` type, expected a `{ type: string, data: any }` object, a string or a numeric array");t={type:"Binary",data:e}}await a("plugin:websocket|send",{id:this.id,message:t})}async disconnect(){await this.send({type:"Close",data:{code:1e3,reason:"Disconnected by client"}})}}return o}();Object.defineProperty(window.__TAURI__,"websocket",{value:__TAURI_PLUGIN_WEBSOCKET__})} diff --git a/plugins/websocket/examples/tauri-app/package.json b/plugins/websocket/examples/tauri-app/package.json index a7b0e141d..04f6b295d 100644 --- a/plugins/websocket/examples/tauri-app/package.json +++ b/plugins/websocket/examples/tauri-app/package.json @@ -9,7 +9,7 @@ "preview": "vite preview" }, "devDependencies": { - "@tauri-apps/cli": "2.0.0-beta.9", + "@tauri-apps/cli": "2.0.0-beta.16", "typescript": "^5.3.3", "vite": "^5.0.13" }, diff --git a/plugins/websocket/examples/tauri-app/src-tauri/tauri.conf.json b/plugins/websocket/examples/tauri-app/src-tauri/tauri.conf.json index c4fe3f7fc..6647b5e63 100644 --- a/plugins/websocket/examples/tauri-app/src-tauri/tauri.conf.json +++ b/plugins/websocket/examples/tauri-app/src-tauri/tauri.conf.json @@ -2,7 +2,7 @@ "identifier": "com.tauri.dev", "build": { "devUrl": "http://localhost:5173/", - "frontendDist": "../build", + "frontendDist": "../dist", "beforeDevCommand": "pnpm dev", "beforeBuildCommand": "pnpm build" }, diff --git a/plugins/websocket/examples/tauri-app/src/main.ts b/plugins/websocket/examples/tauri-app/src/main.ts index 731fd60dd..834e39a9c 100644 --- a/plugins/websocket/examples/tauri-app/src/main.ts +++ b/plugins/websocket/examples/tauri-app/src/main.ts @@ -34,13 +34,17 @@ async function connect() { function send() { ws.send(document.querySelector("#msg-input")?.textContent || "") - .then(() => _updateResponse("Message sent")) + .then(() => { + _updateResponse("Message sent"); + }) .catch(_updateResponse); } function disconnect() { ws.disconnect() - .then(() => _updateResponse("Disconnected")) + .then(() => { + _updateResponse("Disconnected"); + }) .catch(_updateResponse); } diff --git a/plugins/websocket/guest-js/index.ts b/plugins/websocket/guest-js/index.ts index 5f5e24611..f4512a130 100644 --- a/plugins/websocket/guest-js/index.ts +++ b/plugins/websocket/guest-js/index.ts @@ -47,10 +47,12 @@ export default class WebSocket { const onMessage = new Channel(); onMessage.onmessage = (message: Message): void => { - listeners.forEach((l) => l(message)); + listeners.forEach((l) => { + l(message); + }); }; - if (config?.headers) { + if (config?.headers != null) { config.headers = Array.from(new Headers(config.headers).entries()); } @@ -78,14 +80,14 @@ export default class WebSocket { "invalid `message` type, expected a `{ type: string, data: any }` object, a string or a numeric array", ); } - return await invoke("plugin:websocket|send", { + await invoke("plugin:websocket|send", { id: this.id, message: m, }); } async disconnect(): Promise { - return await this.send({ + await this.send({ type: "Close", data: { code: 1000, diff --git a/plugins/websocket/package.json b/plugins/websocket/package.json index fd44fe9f2..75b5a5f46 100644 --- a/plugins/websocket/package.json +++ b/plugins/websocket/package.json @@ -1,6 +1,6 @@ { "name": "@tauri-apps/plugin-websocket", - "version": "2.0.0-beta.2", + "version": "2.0.0-beta.3", "license": "MIT or APACHE-2.0", "authors": [ "Tauri Programme within The Commons Conservancy" @@ -23,6 +23,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-beta.6" + "@tauri-apps/api": "2.0.0-beta.11" } } diff --git a/plugins/window-state/CHANGELOG.md b/plugins/window-state/CHANGELOG.md index 388bd7f9f..94ace40d2 100644 --- a/plugins/window-state/CHANGELOG.md +++ b/plugins/window-state/CHANGELOG.md @@ -2,6 +2,14 @@ ## \[2.0.0-beta.4] +- [`bd1ed590`](https://github.com/tauri-apps/plugins-workspace/commit/bd1ed5903ffcce5500310dac1e59e8c67674ef1e)([#1237](https://github.com/tauri-apps/plugins-workspace/pull/1237)) Update to tauri beta.17. + +## \[2.0.0-beta.3] + +- [`0e9541f`](https://github.com/tauri-apps/plugins-workspace/commit/0e9541fe8990395de7cc8887bc46b3f3665b44e1)([#1138](https://github.com/tauri-apps/plugins-workspace/pull/1138)) Add `Builder::with_filename` to support using a custom filename. Also add `AppHandleExt::file_name` and a similar function in JS, to retrieve it later. + +## \[2.0.0-beta.4] + - [`c013fa5`](https://github.com/tauri-apps/plugins-workspace/commit/c013fa52cd66885cf457a64e75373cb2066bc849)([#1078](https://github.com/tauri-apps/plugins-workspace/pull/1078)) **Breaking change**: Changed the format of the state file from bincode to json. Also changed the filename to from `.window-state` to `.window-state.json`. ## \[2.0.0-beta.3] @@ -68,3 +76,11 @@ - Fix restore maximization state only maximized on main monitor. - [70d9908](https://github.com/tauri-apps/plugins-workspace/commit/70d99086de3a58189d65c49954a3495972880725) fix(window-state): restore window position if the one of the window corners intersects with monitor ([#898](https://github.com/tauri-apps/plugins-workspace/pull/898)) on 2024-01-25 + sues with restoring positions: + +- Fix restoring window positions correctly when the top-left corner of the window was outside of the monitor. + +- Fix restore maximization state only maximized on main monitor. + +- [70d9908](https://github.com/tauri-apps/plugins-workspace/commit/70d99086de3a58189d65c49954a3495972880725) fix(window-state): restore window position if the one of the window corners intersects with monitor ([#898](https://github.com/tauri-apps/plugins-workspace/pull/898)) on 2024-01-25 +://github.com/tauri-apps/plugins-workspace/commit/70d99086de3a58189d65c49954a3495972880725) fix(window-state): restore window position if the one of the window corners intersects with monitor ([#898](https://github.com/tauri-apps/plugins-workspace/pull/898)) on 2024-01-25 diff --git a/plugins/window-state/Cargo.toml b/plugins/window-state/Cargo.toml index d39bc8365..e4b8222e1 100644 --- a/plugins/window-state/Cargo.toml +++ b/plugins/window-state/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tauri-plugin-window-state" -version = "2.0.0-beta.4" +version = "2.0.0-beta.6" description = "Save window positions and sizes and restore them when the app is reopened." authors = { workspace = true } license = { workspace = true } @@ -10,11 +10,11 @@ repository = { 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"] } +tauri-plugin = { workspace = true, features = [ "build" ] } [dependencies] serde = { workspace = true } diff --git a/plugins/window-state/api-iife.js b/plugins/window-state/api-iife.js index ceacc20ca..54090898c 100644 --- a/plugins/window-state/api-iife.js +++ b/plugins/window-state/api-iife.js @@ -1 +1 @@ -if("__TAURI__"in window){var __TAURI_PLUGIN_WINDOWSTATE__=function(e){"use strict";var t,i,n,a;function l(e,t=!1){return window.__TAURI_INTERNALS__.transformCallback(e,t)}async function s(e,t={},i){return window.__TAURI_INTERNALS__.invoke(e,t,i)}"function"==typeof SuppressedError&&SuppressedError;class r{get rid(){return function(e,t,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(e):n?n.value:t.get(e)}(this,t,"f")}constructor(e){t.set(this,void 0),function(e,t,i,n,a){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!a)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!a:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===n?a.call(e,i):a?a.value=i:t.set(e,i)}(this,t,e,"f")}async close(){return s("plugin:resources|close",{rid:this.rid})}}t=new WeakMap;class o{constructor(e,t){this.type="Logical",this.width=e,this.height=t}}class u{constructor(e,t){this.type="Physical",this.width=e,this.height=t}toLogical(e){return new o(this.width/e,this.height/e)}}class c{constructor(e,t){this.type="Logical",this.x=e,this.y=t}}class d{constructor(e,t){this.type="Physical",this.x=e,this.y=t}toLogical(e){return new c(this.x/e,this.y/e)}}async function h(e,t){await s("plugin:event|unlisten",{event:e,eventId:t})}async function w(e,t,i){const n="string"==typeof i?.target?{kind:"AnyLabel",label:i.target}:i?.target??{kind:"Any"};return s("plugin:event|listen",{event:e,target:n,handler:l(t)}).then((t=>async()=>h(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.FILE_DROP="tauri://file-drop",e.FILE_DROP_HOVER="tauri://file-drop-hover",e.FILE_DROP_CANCELLED="tauri://file-drop-cancelled"}(i||(i={}));class b extends r{constructor(e){super(e)}static async new(e,t,i){return s("plugin:image|new",{rgba:p(e),width:t,height:i}).then((e=>new b(e)))}static async fromBytes(e){return s("plugin:image|from_bytes",{bytes:p(e)}).then((e=>new b(e)))}static async fromPath(e){return s("plugin:image|from_path",{path:e}).then((e=>new b(e)))}async rgba(){return s("plugin:image|rgba",{rid:this.rid}).then((e=>new Uint8Array(e)))}async size(){return s("plugin:image|size",{rid:this.rid})}}function p(e){return null==e?null:"string"==typeof e?e:e instanceof Uint8Array?Array.from(e):e instanceof ArrayBuffer?Array.from(new Uint8Array(e)):e instanceof b?e.rid:e}!function(e){e[e.Critical=1]="Critical",e[e.Informational=2]="Informational"}(n||(n={}));class y{constructor(e){this._preventDefault=!1,this.event=e.event,this.id=e.id}preventDefault(){this._preventDefault=!0}isPreventDefault(){return this._preventDefault}}function g(){return new m(window.__TAURI_INTERNALS__.metadata.currentWindow.label,{skip:!0})}function _(){return window.__TAURI_INTERNALS__.metadata.windows.map((e=>new m(e.label,{skip:!0})))}!function(e){e.None="none",e.Normal="normal",e.Indeterminate="indeterminate",e.Paused="paused",e.Error="error"}(a||(a={}));const f=["tauri://created","tauri://error"];class m{constructor(e,t={}){this.label=e,this.listeners=Object.create(null),t?.skip||s("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 _().find((t=>t.label===e))??null}static getCurrent(){return g()}static getAll(){return _()}static async getFocusedWindow(){for(const e of _())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)})):w(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 w(e,(i=>{t(i),h(e,i.id).catch((()=>{}))}),i)}(e,t,{target:{kind:"Window",label:this.label}})}async emit(e,t){if(f.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 s("plugin:event|emit",{event:e,payload:t})}(e,t)}async emitTo(e,t,i){if(f.includes(t)){for(const e of this.listeners[t]||[])e({event:t,id:-1,payload:i});return Promise.resolve()}return async function(e,t,i){const n="string"==typeof e?{kind:"AnyLabel",label:e}:e;await s("plugin:event|emit_to",{target:n,event:t,payload:i})}(e,t,i)}_handleTauriEvent(e,t){return!!f.includes(e)&&(e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t],!0)}async scaleFactor(){return s("plugin:window|scale_factor",{label:this.label})}async innerPosition(){return s("plugin:window|inner_position",{label:this.label}).then((({x:e,y:t})=>new d(e,t)))}async outerPosition(){return s("plugin:window|outer_position",{label:this.label}).then((({x:e,y:t})=>new d(e,t)))}async innerSize(){return s("plugin:window|inner_size",{label:this.label}).then((({width:e,height:t})=>new u(e,t)))}async outerSize(){return s("plugin:window|outer_size",{label:this.label}).then((({width:e,height:t})=>new u(e,t)))}async isFullscreen(){return s("plugin:window|is_fullscreen",{label:this.label})}async isMinimized(){return s("plugin:window|is_minimized",{label:this.label})}async isMaximized(){return s("plugin:window|is_maximized",{label:this.label})}async isFocused(){return s("plugin:window|is_focused",{label:this.label})}async isDecorated(){return s("plugin:window|is_decorated",{label:this.label})}async isResizable(){return s("plugin:window|is_resizable",{label:this.label})}async isMaximizable(){return s("plugin:window|is_maximizable",{label:this.label})}async isMinimizable(){return s("plugin:window|is_minimizable",{label:this.label})}async isClosable(){return s("plugin:window|is_closable",{label:this.label})}async isVisible(){return s("plugin:window|is_visible",{label:this.label})}async title(){return s("plugin:window|title",{label:this.label})}async theme(){return s("plugin:window|theme",{label:this.label})}async center(){return s("plugin:window|center",{label:this.label})}async requestUserAttention(e){let t=null;return e&&(t=e===n.Critical?{type:"Critical"}:{type:"Informational"}),s("plugin:window|request_user_attention",{label:this.label,value:t})}async setResizable(e){return s("plugin:window|set_resizable",{label:this.label,value:e})}async setMaximizable(e){return s("plugin:window|set_maximizable",{label:this.label,value:e})}async setMinimizable(e){return s("plugin:window|set_minimizable",{label:this.label,value:e})}async setClosable(e){return s("plugin:window|set_closable",{label:this.label,value:e})}async setTitle(e){return s("plugin:window|set_title",{label:this.label,value:e})}async maximize(){return s("plugin:window|maximize",{label:this.label})}async unmaximize(){return s("plugin:window|unmaximize",{label:this.label})}async toggleMaximize(){return s("plugin:window|toggle_maximize",{label:this.label})}async minimize(){return s("plugin:window|minimize",{label:this.label})}async unminimize(){return s("plugin:window|unminimize",{label:this.label})}async show(){return s("plugin:window|show",{label:this.label})}async hide(){return s("plugin:window|hide",{label:this.label})}async close(){return s("plugin:window|close",{label:this.label})}async destroy(){return s("plugin:window|destroy",{label:this.label})}async setDecorations(e){return s("plugin:window|set_decorations",{label:this.label,value:e})}async setShadow(e){return s("plugin:window|set_shadow",{label:this.label,value:e})}async setEffects(e){return s("plugin:window|set_effects",{label:this.label,value:e})}async clearEffects(){return s("plugin:window|set_effects",{label:this.label,value:null})}async setAlwaysOnTop(e){return s("plugin:window|set_always_on_top",{label:this.label,value:e})}async setAlwaysOnBottom(e){return s("plugin:window|set_always_on_bottom",{label:this.label,value:e})}async setContentProtected(e){return s("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 s("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 s("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 s("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 s("plugin:window|set_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setFullscreen(e){return s("plugin:window|set_fullscreen",{label:this.label,value:e})}async setFocus(){return s("plugin:window|set_focus",{label:this.label})}async setIcon(e){return s("plugin:window|set_icon",{label:this.label,value:p(e)})}async setSkipTaskbar(e){return s("plugin:window|set_skip_taskbar",{label:this.label,value:e})}async setCursorGrab(e){return s("plugin:window|set_cursor_grab",{label:this.label,value:e})}async setCursorVisible(e){return s("plugin:window|set_cursor_visible",{label:this.label,value:e})}async setCursorIcon(e){return s("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 s("plugin:window|set_cursor_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setIgnoreCursorEvents(e){return s("plugin:window|set_ignore_cursor_events",{label:this.label,value:e})}async startDragging(){return s("plugin:window|start_dragging",{label:this.label})}async startResizeDragging(e){return s("plugin:window|start_resize_dragging",{label:this.label,value:e})}async setProgressBar(e){return s("plugin:window|set_progress_bar",{label:this.label,value:e})}async setVisibleOnAllWorkspaces(e){return s("plugin:window|set_visible_on_all_workspaces",{label:this.label,value:e})}async onResized(e){return this.listen(i.WINDOW_RESIZED,(t=>{var i;t.payload=(i=t.payload,new u(i.width,i.height)),e(t)}))}async onMoved(e){return this.listen(i.WINDOW_MOVED,(t=>{t.payload=D(t.payload),e(t)}))}async onCloseRequested(e){return this.listen(i.WINDOW_CLOSE_REQUESTED,(t=>{const i=new y(t);Promise.resolve(e(i)).then((()=>{if(!i.isPreventDefault())return this.destroy()}))}))}async onFileDropEvent(e){const t=await this.listen(i.FILE_DROP,(t=>{e({...t,payload:{type:"drop",paths:t.payload.paths,position:D(t.payload.position)}})})),n=await this.listen(i.FILE_DROP_HOVER,(t=>{e({...t,payload:{type:"hover",paths:t.payload.paths,position:D(t.payload.position)}})})),a=await this.listen(i.FILE_DROP_CANCELLED,(t=>{e({...t,payload:{type:"cancel"}})}));return()=>{t(),n(),a()}}async onFocusChanged(e){const t=await this.listen(i.WINDOW_FOCUS,(t=>{e({...t,payload:!0})})),n=await this.listen(i.WINDOW_BLUR,(t=>{e({...t,payload:!1})}));return()=>{t(),n()}}async onScaleChanged(e){return this.listen(i.WINDOW_SCALE_FACTOR_CHANGED,e)}async onThemeChanged(e){return this.listen(i.WINDOW_THEME_CHANGED,e)}}var v,E,I;function D(e){return new d(e.x,e.y)}async function S(e,t){return s("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"}(v||(v={})),function(e){e.FollowsWindowActiveState="followsWindowActiveState",e.Active="active",e.Inactive="inactive"}(E||(E={})),e.StateFlags=void 0,(I=e.StateFlags||(e.StateFlags={}))[I.SIZE=1]="SIZE",I[I.POSITION=2]="POSITION",I[I.MAXIMIZED=4]="MAXIMIZED",I[I.VISIBLE=8]="VISIBLE",I[I.DECORATIONS=16]="DECORATIONS",I[I.FULLSCREEN=32]="FULLSCREEN",I[I.ALL=63]="ALL",e.filename=async function(){return s("plugin:window-state|filename")},e.restoreState=S,e.restoreStateCurrent=async function(e){return S(g().label,e)},e.saveWindowState=async function(e){return s("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";var t,i,n,a;function l(e,t=!1){return window.__TAURI_INTERNALS__.transformCallback(e,t)}async function s(e,t={},i){return window.__TAURI_INTERNALS__.invoke(e,t,i)}"function"==typeof SuppressedError&&SuppressedError;class r{get rid(){return function(e,t,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(e):n?n.value:t.get(e)}(this,t,"f")}constructor(e){t.set(this,void 0),function(e,t,i,n,a){if("function"==typeof t?e!==t||!a:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");t.set(e,i)}(this,t,e)}async close(){return s("plugin:resources|close",{rid:this.rid})}}t=new WeakMap;class o{constructor(e,t){this.type="Logical",this.width=e,this.height=t}}class u{constructor(e,t){this.type="Physical",this.width=e,this.height=t}toLogical(e){return new o(this.width/e,this.height/e)}}class c{constructor(e,t){this.type="Logical",this.x=e,this.y=t}}class d{constructor(e,t){this.type="Physical",this.x=e,this.y=t}toLogical(e){return new c(this.x/e,this.y/e)}}async function w(e,t){await s("plugin:event|unlisten",{event:e,eventId:t})}async function h(e,t,i){var n;const a="string"==typeof(null==i?void 0:i.target)?{kind:"AnyLabel",label:i.target}:null!==(n=null==i?void 0:i.target)&&void 0!==n?n:{kind:"Any"};return s("plugin:event|listen",{event:e,target:a,handler:l(t)}).then((t=>async()=>w(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.WINDOW_CREATED="tauri://window-created",e.WEBVIEW_CREATED="tauri://webview-created",e.DRAG="tauri://drag",e.DROP="tauri://drop",e.DROP_OVER="tauri://drop-over",e.DROP_CANCELLED="tauri://drag-cancelled"}(i||(i={}));class b extends r{constructor(e){super(e)}static async new(e,t,i){return s("plugin:image|new",{rgba:p(e),width:t,height:i}).then((e=>new b(e)))}static async fromBytes(e){return s("plugin:image|from_bytes",{bytes:p(e)}).then((e=>new b(e)))}static async fromPath(e){return s("plugin:image|from_path",{path:e}).then((e=>new b(e)))}async rgba(){return s("plugin:image|rgba",{rid:this.rid}).then((e=>new Uint8Array(e)))}async size(){return s("plugin:image|size",{rid:this.rid})}}function p(e){return null==e?null:"string"==typeof e?e:e instanceof Uint8Array?Array.from(e):e instanceof ArrayBuffer?Array.from(new Uint8Array(e)):e instanceof b?e.rid:e}!function(e){e[e.Critical=1]="Critical",e[e.Informational=2]="Informational"}(n||(n={}));class y{constructor(e){this._preventDefault=!1,this.event=e.event,this.id=e.id}preventDefault(){this._preventDefault=!0}isPreventDefault(){return this._preventDefault}}function g(){return new f(window.__TAURI_INTERNALS__.metadata.currentWindow.label,{skip:!0})}function _(){return window.__TAURI_INTERNALS__.metadata.windows.map((e=>new f(e.label,{skip:!0})))}!function(e){e.None="none",e.Normal="normal",e.Indeterminate="indeterminate",e.Paused="paused",e.Error="error"}(a||(a={}));const m=["tauri://created","tauri://error"];class f{constructor(e,t={}){var i;this.label=e,this.listeners=Object.create(null),(null==t?void 0:t.skip)||s("plugin:window|create",{options:{...t,parent:"string"==typeof t.parent?t.parent:null===(i=t.parent)||void 0===i?void 0:i.label,label:e}}).then((async()=>this.emit("tauri://created"))).catch((async e=>this.emit("tauri://error",e)))}static getByLabel(e){var t;return null!==(t=_().find((t=>t.label===e)))&&void 0!==t?t:null}static getCurrent(){return g()}static getAll(){return _()}static async getFocusedWindow(){for(const e of _())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:{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 h(e,(i=>{t(i),w(e,i.id).catch((()=>{}))}),i)}(e,t,{target:{kind:"Window",label:this.label}})}async emit(e,t){if(m.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 s("plugin:event|emit",{event:e,payload:t})}(e,t)}async emitTo(e,t,i){if(m.includes(t)){for(const e of this.listeners[t]||[])e({event:t,id:-1,payload:i});return Promise.resolve()}return async function(e,t,i){const n="string"==typeof e?{kind:"AnyLabel",label:e}:e;await s("plugin:event|emit_to",{target:n,event:t,payload:i})}(e,t,i)}_handleTauriEvent(e,t){return!!m.includes(e)&&(e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t],!0)}async scaleFactor(){return s("plugin:window|scale_factor",{label:this.label})}async innerPosition(){return s("plugin:window|inner_position",{label:this.label}).then((({x:e,y:t})=>new d(e,t)))}async outerPosition(){return s("plugin:window|outer_position",{label:this.label}).then((({x:e,y:t})=>new d(e,t)))}async innerSize(){return s("plugin:window|inner_size",{label:this.label}).then((({width:e,height:t})=>new u(e,t)))}async outerSize(){return s("plugin:window|outer_size",{label:this.label}).then((({width:e,height:t})=>new u(e,t)))}async isFullscreen(){return s("plugin:window|is_fullscreen",{label:this.label})}async isMinimized(){return s("plugin:window|is_minimized",{label:this.label})}async isMaximized(){return s("plugin:window|is_maximized",{label:this.label})}async isFocused(){return s("plugin:window|is_focused",{label:this.label})}async isDecorated(){return s("plugin:window|is_decorated",{label:this.label})}async isResizable(){return s("plugin:window|is_resizable",{label:this.label})}async isMaximizable(){return s("plugin:window|is_maximizable",{label:this.label})}async isMinimizable(){return s("plugin:window|is_minimizable",{label:this.label})}async isClosable(){return s("plugin:window|is_closable",{label:this.label})}async isVisible(){return s("plugin:window|is_visible",{label:this.label})}async title(){return s("plugin:window|title",{label:this.label})}async theme(){return s("plugin:window|theme",{label:this.label})}async center(){return s("plugin:window|center",{label:this.label})}async requestUserAttention(e){let t=null;return e&&(t=e===n.Critical?{type:"Critical"}:{type:"Informational"}),s("plugin:window|request_user_attention",{label:this.label,value:t})}async setResizable(e){return s("plugin:window|set_resizable",{label:this.label,value:e})}async setMaximizable(e){return s("plugin:window|set_maximizable",{label:this.label,value:e})}async setMinimizable(e){return s("plugin:window|set_minimizable",{label:this.label,value:e})}async setClosable(e){return s("plugin:window|set_closable",{label:this.label,value:e})}async setTitle(e){return s("plugin:window|set_title",{label:this.label,value:e})}async maximize(){return s("plugin:window|maximize",{label:this.label})}async unmaximize(){return s("plugin:window|unmaximize",{label:this.label})}async toggleMaximize(){return s("plugin:window|toggle_maximize",{label:this.label})}async minimize(){return s("plugin:window|minimize",{label:this.label})}async unminimize(){return s("plugin:window|unminimize",{label:this.label})}async show(){return s("plugin:window|show",{label:this.label})}async hide(){return s("plugin:window|hide",{label:this.label})}async close(){return s("plugin:window|close",{label:this.label})}async destroy(){return s("plugin:window|destroy",{label:this.label})}async setDecorations(e){return s("plugin:window|set_decorations",{label:this.label,value:e})}async setShadow(e){return s("plugin:window|set_shadow",{label:this.label,value:e})}async setEffects(e){return s("plugin:window|set_effects",{label:this.label,value:e})}async clearEffects(){return s("plugin:window|set_effects",{label:this.label,value:null})}async setAlwaysOnTop(e){return s("plugin:window|set_always_on_top",{label:this.label,value:e})}async setAlwaysOnBottom(e){return s("plugin:window|set_always_on_bottom",{label:this.label,value:e})}async setContentProtected(e){return s("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");const t={};return t[`${e.type}`]={width:e.width,height:e.height},s("plugin:window|set_size",{label:this.label,value:t})}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");let t=null;return e&&(t={},t[`${e.type}`]={width:e.width,height:e.height}),s("plugin:window|set_min_size",{label:this.label,value:t})}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");let t=null;return e&&(t={},t[`${e.type}`]={width:e.width,height:e.height}),s("plugin:window|set_max_size",{label:this.label,value:t})}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");const t={};return t[`${e.type}`]={x:e.x,y:e.y},s("plugin:window|set_position",{label:this.label,value:t})}async setFullscreen(e){return s("plugin:window|set_fullscreen",{label:this.label,value:e})}async setFocus(){return s("plugin:window|set_focus",{label:this.label})}async setIcon(e){return s("plugin:window|set_icon",{label:this.label,value:p(e)})}async setSkipTaskbar(e){return s("plugin:window|set_skip_taskbar",{label:this.label,value:e})}async setCursorGrab(e){return s("plugin:window|set_cursor_grab",{label:this.label,value:e})}async setCursorVisible(e){return s("plugin:window|set_cursor_visible",{label:this.label,value:e})}async setCursorIcon(e){return s("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");const t={};return t[`${e.type}`]={x:e.x,y:e.y},s("plugin:window|set_cursor_position",{label:this.label,value:t})}async setIgnoreCursorEvents(e){return s("plugin:window|set_ignore_cursor_events",{label:this.label,value:e})}async startDragging(){return s("plugin:window|start_dragging",{label:this.label})}async startResizeDragging(e){return s("plugin:window|start_resize_dragging",{label:this.label,value:e})}async setProgressBar(e){return s("plugin:window|set_progress_bar",{label:this.label,value:e})}async setVisibleOnAllWorkspaces(e){return s("plugin:window|set_visible_on_all_workspaces",{label:this.label,value:e})}async onResized(e){return this.listen(i.WINDOW_RESIZED,(t=>{var i;t.payload=(i=t.payload,new u(i.width,i.height)),e(t)}))}async onMoved(e){return this.listen(i.WINDOW_MOVED,(t=>{t.payload=I(t.payload),e(t)}))}async onCloseRequested(e){return this.listen(i.WINDOW_CLOSE_REQUESTED,(t=>{const i=new y(t);Promise.resolve(e(i)).then((()=>{if(!i.isPreventDefault())return this.destroy()}))}))}async onDragDropEvent(e){const t=await this.listen(i.DRAG,(t=>{e({...t,payload:{type:"dragged",paths:t.payload.paths,position:I(t.payload.position)}})})),n=await this.listen(i.DROP,(t=>{e({...t,payload:{type:"dropped",paths:t.payload.paths,position:I(t.payload.position)}})})),a=await this.listen(i.DROP_OVER,(t=>{e({...t,payload:{type:"dragOver",position:I(t.payload.position)}})})),l=await this.listen(i.DROP_CANCELLED,(t=>{e({...t,payload:{type:"cancelled"}})}));return()=>{t(),n(),a(),l()}}async onFocusChanged(e){const t=await this.listen(i.WINDOW_FOCUS,(t=>{e({...t,payload:!0})})),n=await this.listen(i.WINDOW_BLUR,(t=>{e({...t,payload:!1})}));return()=>{t(),n()}}async onScaleChanged(e){return this.listen(i.WINDOW_SCALE_FACTOR_CHANGED,e)}async onThemeChanged(e){return this.listen(i.WINDOW_THEME_CHANGED,e)}}var v,E,D;function I(e){return new d(e.x,e.y)}async function S(e,t){await s("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"}(v||(v={})),function(e){e.FollowsWindowActiveState="followsWindowActiveState",e.Active="active",e.Inactive="inactive"}(E||(E={})),e.StateFlags=void 0,(D=e.StateFlags||(e.StateFlags={}))[D.SIZE=1]="SIZE",D[D.POSITION=2]="POSITION",D[D.MAXIMIZED=4]="MAXIMIZED",D[D.VISIBLE=8]="VISIBLE",D[D.DECORATIONS=16]="DECORATIONS",D[D.FULLSCREEN=32]="FULLSCREEN",D[D.ALL=63]="ALL",e.filename=async function(){return await s("plugin:window-state|filename")},e.restoreState=S,e.restoreStateCurrent=async function(e){await S(g().label,e)},e.saveWindowState=async function(e){await s("plugin:window-state|save_window_state",{flags:e})},e}({});Object.defineProperty(window.__TAURI__,"windowState",{value:__TAURI_PLUGIN_WINDOWSTATE__})} diff --git a/plugins/window-state/guest-js/index.ts b/plugins/window-state/guest-js/index.ts index c6577c12b..bd0d92b7a 100644 --- a/plugins/window-state/guest-js/index.ts +++ b/plugins/window-state/guest-js/index.ts @@ -3,7 +3,7 @@ // SPDX-License-Identifier: MIT import { invoke } from "@tauri-apps/api/core"; -import { WindowLabel, getCurrent } from "@tauri-apps/api/window"; +import { type WindowLabel, getCurrent } from "@tauri-apps/api/window"; export enum StateFlags { SIZE = 1 << 0, @@ -19,7 +19,7 @@ export enum StateFlags { * Save the state of all open windows to disk. */ async function saveWindowState(flags: StateFlags): Promise { - return invoke("plugin:window-state|save_window_state", { flags }); + await invoke("plugin:window-state|save_window_state", { flags }); } /** @@ -29,20 +29,20 @@ async function restoreState( label: WindowLabel, flags: StateFlags, ): Promise { - return invoke("plugin:window-state|restore_state", { label, flags }); + await invoke("plugin:window-state|restore_state", { label, flags }); } /** * Restore the state for the current window from disk. */ async function restoreStateCurrent(flags: StateFlags): Promise { - return restoreState(getCurrent().label, flags); + await restoreState(getCurrent().label, flags); } /** * Get the name of the file used to store window state. */ async function filename(): Promise { - return invoke("plugin:window-state|filename"); + return await invoke("plugin:window-state|filename"); } export { restoreState, restoreStateCurrent, saveWindowState, filename }; diff --git a/plugins/window-state/package.json b/plugins/window-state/package.json index a38b5f0a8..9ee2c81a2 100644 --- a/plugins/window-state/package.json +++ b/plugins/window-state/package.json @@ -1,6 +1,6 @@ { "name": "@tauri-apps/plugin-window-state", - "version": "2.0.0-beta.2", + "version": "2.0.0-beta.4", "description": "Save window positions and sizes and restore them when the app is reopened.", "license": "MIT or APACHE-2.0", "authors": [ @@ -24,6 +24,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-beta.6" + "@tauri-apps/api": "2.0.0-beta.11" } } diff --git a/plugins/window-state/src/cmd.rs b/plugins/window-state/src/cmd.rs index c88c95f35..99d41a828 100644 --- a/plugins/window-state/src/cmd.rs +++ b/plugins/window-state/src/cmd.rs @@ -26,8 +26,6 @@ pub async fn restore_state( .ok_or_else(|| format!("Invalid state flags bits: {}", flags))?; 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 7235a93ae..c71458312 100644 --- a/plugins/window-state/src/lib.rs +++ b/plugins/window-state/src/lib.rs @@ -16,8 +16,8 @@ use bitflags::bitflags; use serde::{Deserialize, Serialize}; use tauri::{ plugin::{Builder as PluginBuilder, TauriPlugin}, - LogicalSize, Manager, Monitor, PhysicalPosition, PhysicalSize, RunEvent, Runtime, Window, - WindowEvent, + LogicalSize, Manager, Monitor, PhysicalPosition, PhysicalSize, RunEvent, Runtime, + WebviewWindow, Window, WindowEvent, }; use std::{ @@ -118,7 +118,7 @@ impl AppHandleExt for tauri::AppHandle { let mut state = cache.0.lock().unwrap(); for (label, s) in state.iter_mut() { if let Some(window) = self.get_webview_window(label) { - window.as_ref().window().update_state(s, flags)?; + window.update_state(s, flags)?; } } @@ -141,6 +141,11 @@ pub trait WindowExt { fn restore_state(&self, flags: StateFlags) -> tauri::Result<()>; } +impl WindowExt for WebviewWindow { + fn restore_state(&self, flags: StateFlags) -> tauri::Result<()> { + self.as_ref().window().restore_state(flags) + } +} impl WindowExt for Window { fn restore_state(&self, flags: StateFlags) -> tauri::Result<()> { let cache = self.state::(); @@ -148,12 +153,10 @@ impl WindowExt for Window { let mut should_show = true; - if let Some(state) = c.get(self.label()) { - // avoid restoring the default zeroed state - if *state == WindowState::default() { - return Ok(()); - } - + if let Some(state) = c + .get(self.label()) + .filter(|state| state != &&WindowState::default()) + { if flags.contains(StateFlags::DECORATIONS) { self.set_decorations(state.decorated)?; } @@ -248,6 +251,12 @@ trait WindowExtInternal { fn update_state(&self, state: &mut WindowState, flags: StateFlags) -> tauri::Result<()>; } +impl WindowExtInternal for WebviewWindow { + fn update_state(&self, state: &mut WindowState, flags: StateFlags) -> tauri::Result<()> { + self.as_ref().window().update_state(state, flags) + } +} + impl WindowExtInternal for Window { fn update_state(&self, state: &mut WindowState, flags: StateFlags) -> tauri::Result<()> { let is_maximized = match flags.intersects(StateFlags::MAXIMIZED | StateFlags::SIZE) { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3d1a68ee1..ad36ea84f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -14,37 +14,37 @@ importers: devDependencies: '@rollup/plugin-node-resolve': specifier: 15.2.3 - version: 15.2.3(rollup@4.14.3) + version: 15.2.3(rollup@4.17.2) '@rollup/plugin-terser': specifier: 0.4.4 - version: 0.4.4(rollup@4.14.3) + version: 0.4.4(rollup@4.17.2) '@rollup/plugin-typescript': specifier: 11.1.6 - version: 11.1.6(rollup@4.14.3)(tslib@2.6.2)(typescript@5.4.5) + version: 11.1.6(rollup@4.17.2)(tslib@2.6.2)(typescript@5.4.5) '@typescript-eslint/eslint-plugin': - specifier: 7.7.0 - version: 7.7.0(@typescript-eslint/parser@7.7.0)(eslint@8.57.0)(typescript@5.4.5) + specifier: 7.8.0 + version: 7.8.0(@typescript-eslint/parser@7.8.0)(eslint@8.57.0)(typescript@5.4.5) '@typescript-eslint/parser': - specifier: 7.7.0 - version: 7.7.0(eslint@8.57.0)(typescript@5.4.5) + specifier: 7.8.0 + version: 7.8.0(eslint@8.57.0)(typescript@5.4.5) covector: specifier: ^0.10.2 version: 0.10.2(mocha@10.4.0) eslint: specifier: 8.57.0 version: 8.57.0 + eslint-config-love: + specifier: 47.0.0 + version: 47.0.0(@typescript-eslint/eslint-plugin@7.8.0)(eslint-plugin-import@2.29.1)(eslint-plugin-n@17.5.1)(eslint-plugin-promise@6.1.1)(eslint@8.57.0)(typescript@5.4.5) eslint-config-prettier: specifier: 9.1.0 version: 9.1.0(eslint@8.57.0) - eslint-config-standard-with-typescript: - specifier: 43.0.1 - version: 43.0.1(@typescript-eslint/eslint-plugin@7.7.0)(eslint-plugin-import@2.29.1)(eslint-plugin-n@17.2.1)(eslint-plugin-promise@6.1.1)(eslint@8.57.0)(typescript@5.4.5) eslint-plugin-import: specifier: 2.29.1 - version: 2.29.1(@typescript-eslint/parser@7.7.0)(eslint@8.57.0) + version: 2.29.1(@typescript-eslint/parser@7.8.0)(eslint@8.57.0) eslint-plugin-n: - specifier: 17.2.1 - version: 17.2.1(eslint@8.57.0) + specifier: 17.5.1 + version: 17.5.1(eslint@8.57.0) eslint-plugin-promise: specifier: 6.1.1 version: 6.1.1(eslint@8.57.0) @@ -55,8 +55,8 @@ importers: specifier: 3.2.5 version: 3.2.5 rollup: - specifier: 4.14.3 - version: 4.14.3 + specifier: 4.17.2 + version: 4.17.2 tslib: specifier: 2.6.2 version: 2.6.2 @@ -67,136 +67,136 @@ importers: examples/api: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.7 - version: 2.0.0-beta.7 + specifier: 2.0.0-beta.11 + version: 2.0.0-beta.11 '@tauri-apps/plugin-barcode-scanner': - specifier: 2.0.0-beta.2 + specifier: 2.0.0-beta.3 version: link:../../plugins/barcode-scanner '@tauri-apps/plugin-biometric': - specifier: 2.0.0-beta.2 + specifier: 2.0.0-beta.3 version: link:../../plugins/biometric '@tauri-apps/plugin-cli': - specifier: 2.0.0-beta.2 + specifier: 2.0.0-beta.3 version: link:../../plugins/cli '@tauri-apps/plugin-clipboard-manager': - specifier: 2.1.0-beta.0 + specifier: 2.1.0-beta.1 version: link:../../plugins/clipboard-manager '@tauri-apps/plugin-dialog': - specifier: 2.0.0-beta.2 + specifier: 2.0.0-beta.3 version: link:../../plugins/dialog '@tauri-apps/plugin-fs': - specifier: 2.0.0-beta.2 + specifier: 2.0.0-beta.3 version: link:../../plugins/fs '@tauri-apps/plugin-global-shortcut': - specifier: 2.0.0-beta.2 + specifier: 2.0.0-beta.3 version: link:../../plugins/global-shortcut '@tauri-apps/plugin-http': - specifier: 2.0.0-beta.2 + specifier: 2.0.0-beta.3 version: link:../../plugins/http '@tauri-apps/plugin-nfc': - specifier: 2.0.0-beta.2 + specifier: 2.0.0-beta.3 version: link:../../plugins/nfc '@tauri-apps/plugin-notification': - specifier: 2.0.0-beta.2 + specifier: 2.0.0-beta.3 version: link:../../plugins/notification '@tauri-apps/plugin-os': - specifier: 2.0.0-beta.2 + specifier: 2.0.0-beta.3 version: link:../../plugins/os '@tauri-apps/plugin-process': - specifier: 2.0.0-beta.2 + specifier: 2.0.0-beta.3 version: link:../../plugins/process '@tauri-apps/plugin-shell': - specifier: 2.0.0-beta.2 + specifier: 2.0.0-beta.3 version: link:../../plugins/shell '@tauri-apps/plugin-updater': - specifier: 2.0.0-beta.2 + specifier: 2.0.0-beta.3 version: link:../../plugins/updater '@zerodevx/svelte-json-view': specifier: 1.0.9 - version: 1.0.9(svelte@4.2.14) + version: 1.0.9(svelte@4.2.16) devDependencies: '@iconify-json/codicon': specifier: ^1.1.37 - version: 1.1.46 + version: 1.1.47 '@iconify-json/ph': specifier: ^1.1.8 - version: 1.1.12 + version: 1.1.13 '@sveltejs/vite-plugin-svelte': specifier: ^3.0.1 - version: 3.1.0(svelte@4.2.14)(vite@5.2.9) + version: 3.1.0(svelte@4.2.16)(vite@5.2.11) '@tauri-apps/cli': - specifier: 2.0.0-beta.12 - version: 2.0.0-beta.12 + specifier: 2.0.0-beta.16 + version: 2.0.0-beta.16 '@unocss/extractor-svelte': specifier: ^0.59.0 - version: 0.59.3 + version: 0.59.4 internal-ip: specifier: ^8.0.0 version: 8.0.0 svelte: specifier: ^4.2.8 - version: 4.2.14 + version: 4.2.16 unocss: specifier: ^0.59.0 - version: 0.59.3(postcss@8.4.38)(rollup@4.14.3)(vite@5.2.9) + version: 0.59.4(postcss@8.4.38)(rollup@4.17.2)(vite@5.2.11) vite: specifier: ^5.0.13 - version: 5.2.9 + version: 5.2.11 plugins/authenticator: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.6 - version: 2.0.0-beta.6 + specifier: 2.0.0-beta.11 + version: 2.0.0-beta.11 plugins/autostart: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.6 - version: 2.0.0-beta.6 + specifier: 2.0.0-beta.11 + version: 2.0.0-beta.11 plugins/barcode-scanner: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.6 - version: 2.0.0-beta.6 + specifier: 2.0.0-beta.11 + version: 2.0.0-beta.11 plugins/biometric: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.6 - version: 2.0.0-beta.6 + specifier: 2.0.0-beta.11 + version: 2.0.0-beta.11 plugins/cli: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.6 - version: 2.0.0-beta.6 + specifier: 2.0.0-beta.11 + version: 2.0.0-beta.11 plugins/clipboard-manager: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.6 - version: 2.0.0-beta.6 + specifier: 2.0.0-beta.11 + version: 2.0.0-beta.11 plugins/deep-link: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.6 - version: 2.0.0-beta.6 + specifier: 2.0.0-beta.11 + version: 2.0.0-beta.11 plugins/deep-link/examples/app: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.6 - version: 2.0.0-beta.6 + specifier: 2.0.0-beta.11 + version: 2.0.0-beta.11 '@tauri-apps/plugin-deep-link': - specifier: 2.0.0-beta.2 + specifier: 2.0.0-beta.3 version: link:../.. devDependencies: '@tauri-apps/cli': - specifier: 2.0.0-beta.9 - version: 2.0.0-beta.9 + specifier: 2.0.0-beta.16 + version: 2.0.0-beta.16 internal-ip: specifier: ^8.0.0 version: 8.0.0 @@ -205,127 +205,127 @@ importers: version: 5.4.5 vite: specifier: ^5.0.13 - version: 5.2.9 + version: 5.2.11 plugins/dialog: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.6 - version: 2.0.0-beta.6 + specifier: 2.0.0-beta.11 + version: 2.0.0-beta.11 plugins/fs: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.6 - version: 2.0.0-beta.6 + specifier: 2.0.0-beta.11 + version: 2.0.0-beta.11 plugins/global-shortcut: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.6 - version: 2.0.0-beta.6 + specifier: 2.0.0-beta.11 + version: 2.0.0-beta.11 plugins/http: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.6 - version: 2.0.0-beta.6 + specifier: 2.0.0-beta.11 + version: 2.0.0-beta.11 plugins/log: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.6 - version: 2.0.0-beta.6 + specifier: 2.0.0-beta.11 + version: 2.0.0-beta.11 plugins/nfc: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.6 - version: 2.0.0-beta.6 + specifier: 2.0.0-beta.11 + version: 2.0.0-beta.11 plugins/notification: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.6 - version: 2.0.0-beta.6 + specifier: 2.0.0-beta.11 + version: 2.0.0-beta.11 plugins/os: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.6 - version: 2.0.0-beta.6 + specifier: 2.0.0-beta.11 + version: 2.0.0-beta.11 plugins/positioner: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.6 - version: 2.0.0-beta.6 + specifier: 2.0.0-beta.11 + version: 2.0.0-beta.11 plugins/process: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.6 - version: 2.0.0-beta.6 + specifier: 2.0.0-beta.11 + version: 2.0.0-beta.11 plugins/shell: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.6 - version: 2.0.0-beta.6 + specifier: 2.0.0-beta.11 + version: 2.0.0-beta.11 plugins/single-instance/examples/vanilla: devDependencies: '@tauri-apps/cli': - specifier: 2.0.0-beta.9 - version: 2.0.0-beta.9 + specifier: 2.0.0-beta.16 + version: 2.0.0-beta.16 plugins/sql: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.6 - version: 2.0.0-beta.6 + specifier: 2.0.0-beta.11 + version: 2.0.0-beta.11 plugins/store: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.6 - version: 2.0.0-beta.6 + specifier: 2.0.0-beta.11 + version: 2.0.0-beta.11 plugins/store/examples/AppSettingsManager: devDependencies: '@tauri-apps/cli': - specifier: 1.5.11 - version: 1.5.11 + specifier: ^2.0.0-beta.15 + version: 2.0.0-beta.16 typescript: specifier: ^5.3.3 version: 5.4.5 vite: specifier: ^5.0.12 - version: 5.2.9 + version: 5.2.11 plugins/stronghold: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.6 - version: 2.0.0-beta.6 + specifier: 2.0.0-beta.11 + version: 2.0.0-beta.11 plugins/updater: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.6 - version: 2.0.0-beta.6 + specifier: 2.0.0-beta.11 + version: 2.0.0-beta.11 plugins/upload: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.6 - version: 2.0.0-beta.6 + specifier: 2.0.0-beta.11 + version: 2.0.0-beta.11 plugins/websocket: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.6 - version: 2.0.0-beta.6 + specifier: 2.0.0-beta.11 + version: 2.0.0-beta.11 plugins/websocket/examples/tauri-app: dependencies: @@ -334,20 +334,20 @@ importers: version: link:../.. devDependencies: '@tauri-apps/cli': - specifier: 2.0.0-beta.9 - version: 2.0.0-beta.9 + specifier: 2.0.0-beta.16 + version: 2.0.0-beta.16 typescript: specifier: ^5.3.3 version: 5.4.5 vite: specifier: ^5.0.13 - version: 5.2.9 + version: 5.2.11 plugins/window-state: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.6 - version: 2.0.0-beta.6 + specifier: 2.0.0-beta.11 + version: 2.0.0-beta.11 packages: @@ -382,8 +382,8 @@ packages: picocolors: 1.0.0 dev: true - /@babel/compat-data@7.23.5: - resolution: {integrity: sha512-uU27kfDRlhfKl+w1U6vp16IuvSLtjAxdArVXPa9BvLkrr7CYIsxH5adpHObeAGY/41+syctUWOZ140a2Rvkgjw==} + /@babel/compat-data@7.24.4: + resolution: {integrity: sha512-vg8Gih2MLK+kOkHJp4gBEIkyaIi00jgWot2D9QOmmfLC8jINSOzmCLta6Bvz/JSBCqnegV0L80jhxkol5GWNfQ==} engines: {node: '>=6.9.0'} dev: true @@ -405,7 +405,7 @@ packages: debug: 4.3.4(supports-color@8.1.1) gensync: 1.0.0-beta.2 json5: 2.2.3 - semver: 7.5.4 + semver: 7.6.0 transitivePeerDependencies: - supports-color dev: true @@ -431,11 +431,11 @@ packages: resolution: {integrity: sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ==} engines: {node: '>=6.9.0'} dependencies: - '@babel/compat-data': 7.23.5 + '@babel/compat-data': 7.24.4 '@babel/helper-validator-option': 7.23.5 - browserslist: 4.22.2 + browserslist: 4.23.0 lru-cache: 5.1.1 - semver: 7.5.4 + semver: 7.6.0 dev: true /@babel/helper-create-class-features-plugin@7.24.4(@babel/core@7.24.4): @@ -453,7 +453,7 @@ packages: '@babel/helper-replace-supers': 7.24.1(@babel/core@7.24.4) '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 '@babel/helper-split-export-declaration': 7.22.6 - semver: 7.5.4 + semver: 7.6.0 dev: true /@babel/helper-environment-visitor@7.22.20: @@ -483,8 +483,8 @@ packages: '@babel/types': 7.24.0 dev: true - /@babel/helper-module-imports@7.22.15: - resolution: {integrity: sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==} + /@babel/helper-module-imports@7.24.3: + resolution: {integrity: sha512-viKb0F9f2s0BCS22QSF308z/+1YWKV/76mwt61NBzS5izMzDPwdq1pTrzf+Li3npBWX9KdQbkeCt1jSAM7lZqg==} engines: {node: '>=6.9.0'} dependencies: '@babel/types': 7.24.0 @@ -498,7 +498,7 @@ packages: dependencies: '@babel/core': 7.24.4 '@babel/helper-environment-visitor': 7.22.20 - '@babel/helper-module-imports': 7.22.15 + '@babel/helper-module-imports': 7.24.3 '@babel/helper-simple-access': 7.22.5 '@babel/helper-split-export-declaration': 7.22.6 '@babel/helper-validator-identifier': 7.22.20 @@ -549,8 +549,8 @@ packages: '@babel/types': 7.24.0 dev: true - /@babel/helper-string-parser@7.23.4: - resolution: {integrity: sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==} + /@babel/helper-string-parser@7.24.1: + resolution: {integrity: sha512-2ofRCjnnA9y+wk8b9IAREroeUP02KHp431N2mhKniy2yKIDKpbrHv9eXwm8cBeWQYcJmzv5qKCu65P47eCF7CQ==} engines: {node: '>=6.9.0'} dev: true @@ -683,7 +683,7 @@ packages: resolution: {integrity: sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w==} engines: {node: '>=6.9.0'} dependencies: - '@babel/helper-string-parser': 7.23.4 + '@babel/helper-string-parser': 7.24.1 '@babel/helper-validator-identifier': 7.22.20 to-fast-properties: 2.0.0 dev: true @@ -700,7 +700,7 @@ packages: dependencies: '@covector/files': 0.7.1 effection: 2.0.8(mocha@10.4.0) - semver: 7.5.4 + semver: 7.6.0 transitivePeerDependencies: - encoding - mocha @@ -757,7 +757,7 @@ packages: '@tauri-apps/toml': 2.2.4 globby: 11.1.0 js-yaml: 4.1.0 - semver: 7.5.4 + semver: 7.6.0 zod: 3.22.4 zod-validation-error: 1.5.0(zod@3.22.4) dev: true @@ -1104,14 +1104,14 @@ packages: resolution: {integrity: sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg==} dev: true - /@iconify-json/codicon@1.1.46: - resolution: {integrity: sha512-efAc2tFRrLJguNktAWza8pLhLCYhwWjQzUm6CXzXzxU18uCW2Mqzn2rJ+WhdLl+VQVxLFtvXcMMg9Gq5UOw1jA==} + /@iconify-json/codicon@1.1.47: + resolution: {integrity: sha512-dsAtFbBBP3t9NhFIwxy3DhnunT3Shgpx5lK2eg2hOjuCVsIKT4XpClMsEQfQ11ZL81cVV/iIcxjCfcm8rY+fsg==} dependencies: '@iconify/types': 2.0.0 dev: true - /@iconify-json/ph@1.1.12: - resolution: {integrity: sha512-m+rXTW084YaQQHT+F8TxdkCoAh+i/5MWRoSuPmxCWPlxwMAaLT/QfyVsbEiV95HM5806U/jKpBV6F1b7Pmr3Vg==} + /@iconify-json/ph@1.1.13: + resolution: {integrity: sha512-xtM4JJ63HCKj09WRqrBswXiHrpliBlqboWSZH8odcmqYXbvIFceU9/Til4V+MQr6+MoUC+KB72cxhky2+A6r/g==} dependencies: '@iconify/types': 2.0.0 dev: true @@ -1184,14 +1184,14 @@ packages: engines: {node: '>= 8'} dependencies: '@nodelib/fs.scandir': 2.1.5 - fastq: 1.15.0 + fastq: 1.17.1 dev: true /@polka/url@1.0.0-next.25: resolution: {integrity: sha512-j7P6Rgr3mmtdkeDGTe0E/aYyWEWVtc5yFXtHCRHs28/jptDEWfaVOc5T7cblqy1XKPPfCxJc/8DwQ5YgLOZOVQ==} dev: true - /@rollup/plugin-node-resolve@15.2.3(rollup@4.14.3): + /@rollup/plugin-node-resolve@15.2.3(rollup@4.17.2): resolution: {integrity: sha512-j/lym8nf5E21LwBT4Df1VD6hRO2L2iwUeUmP7litikRsVp1H6NWx20NEp0Y7su+7XGc476GnXXc4kFeZNGmaSQ==} engines: {node: '>=14.0.0'} peerDependencies: @@ -1200,16 +1200,16 @@ packages: rollup: optional: true dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.14.3) + '@rollup/pluginutils': 5.1.0(rollup@4.17.2) '@types/resolve': 1.20.2 deepmerge: 4.3.1 is-builtin-module: 3.2.1 is-module: 1.0.0 resolve: 1.22.8 - rollup: 4.14.3 + rollup: 4.17.2 dev: true - /@rollup/plugin-terser@0.4.4(rollup@4.14.3): + /@rollup/plugin-terser@0.4.4(rollup@4.17.2): resolution: {integrity: sha512-XHeJC5Bgvs8LfukDwWZp7yeqin6ns8RTl2B9avbejt6tZqsqvVoWI7ZTQrcNsfKEDWBTnTxM8nMDkO2IFFbd0A==} engines: {node: '>=14.0.0'} peerDependencies: @@ -1218,13 +1218,13 @@ packages: rollup: optional: true dependencies: - rollup: 4.14.3 + rollup: 4.17.2 serialize-javascript: 6.0.1 smob: 1.4.1 terser: 5.25.0 dev: true - /@rollup/plugin-typescript@11.1.6(rollup@4.14.3)(tslib@2.6.2)(typescript@5.4.5): + /@rollup/plugin-typescript@11.1.6(rollup@4.17.2)(tslib@2.6.2)(typescript@5.4.5): resolution: {integrity: sha512-R92yOmIACgYdJ7dJ97p4K69I8gg6IEHt8M7dUBxN3W6nrO8uUxX5ixl0yU/N3aZTi8WhPuICvOHXQvF6FaykAA==} engines: {node: '>=14.0.0'} peerDependencies: @@ -1237,14 +1237,14 @@ packages: tslib: optional: true dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.14.3) + '@rollup/pluginutils': 5.1.0(rollup@4.17.2) resolve: 1.22.8 - rollup: 4.14.3 + rollup: 4.17.2 tslib: 2.6.2 typescript: 5.4.5 dev: true - /@rollup/pluginutils@5.1.0(rollup@4.14.3): + /@rollup/pluginutils@5.1.0(rollup@4.17.2): resolution: {integrity: sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==} engines: {node: '>=14.0.0'} peerDependencies: @@ -1256,138 +1256,138 @@ packages: '@types/estree': 1.0.5 estree-walker: 2.0.2 picomatch: 2.3.1 - rollup: 4.14.3 + rollup: 4.17.2 dev: true - /@rollup/rollup-android-arm-eabi@4.14.3: - resolution: {integrity: sha512-X9alQ3XM6I9IlSlmC8ddAvMSyG1WuHk5oUnXGw+yUBs3BFoTizmG1La/Gr8fVJvDWAq+zlYTZ9DBgrlKRVY06g==} + /@rollup/rollup-android-arm-eabi@4.17.2: + resolution: {integrity: sha512-NM0jFxY8bB8QLkoKxIQeObCaDlJKewVlIEkuyYKm5An1tdVZ966w2+MPQ2l8LBZLjR+SgyV+nRkTIunzOYBMLQ==} cpu: [arm] os: [android] requiresBuild: true dev: true optional: true - /@rollup/rollup-android-arm64@4.14.3: - resolution: {integrity: sha512-eQK5JIi+POhFpzk+LnjKIy4Ks+pwJ+NXmPxOCSvOKSNRPONzKuUvWE+P9JxGZVxrtzm6BAYMaL50FFuPe0oWMQ==} + /@rollup/rollup-android-arm64@4.17.2: + resolution: {integrity: sha512-yeX/Usk7daNIVwkq2uGoq2BYJKZY1JfyLTaHO/jaiSwi/lsf8fTFoQW/n6IdAsx5tx+iotu2zCJwz8MxI6D/Bw==} cpu: [arm64] os: [android] requiresBuild: true dev: true optional: true - /@rollup/rollup-darwin-arm64@4.14.3: - resolution: {integrity: sha512-Od4vE6f6CTT53yM1jgcLqNfItTsLt5zE46fdPaEmeFHvPs5SjZYlLpHrSiHEKR1+HdRfxuzXHjDOIxQyC3ptBA==} + /@rollup/rollup-darwin-arm64@4.17.2: + resolution: {integrity: sha512-kcMLpE6uCwls023+kknm71ug7MZOrtXo+y5p/tsg6jltpDtgQY1Eq5sGfHcQfb+lfuKwhBmEURDga9N0ol4YPw==} cpu: [arm64] os: [darwin] requiresBuild: true dev: true optional: true - /@rollup/rollup-darwin-x64@4.14.3: - resolution: {integrity: sha512-0IMAO21axJeNIrvS9lSe/PGthc8ZUS+zC53O0VhF5gMxfmcKAP4ESkKOCwEi6u2asUrt4mQv2rjY8QseIEb1aw==} + /@rollup/rollup-darwin-x64@4.17.2: + resolution: {integrity: sha512-AtKwD0VEx0zWkL0ZjixEkp5tbNLzX+FCqGG1SvOu993HnSz4qDI6S4kGzubrEJAljpVkhRSlg5bzpV//E6ysTQ==} cpu: [x64] os: [darwin] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-arm-gnueabihf@4.14.3: - resolution: {integrity: sha512-ge2DC7tHRHa3caVEoSbPRJpq7azhG+xYsd6u2MEnJ6XzPSzQsTKyXvh6iWjXRf7Rt9ykIUWHtl0Uz3T6yXPpKw==} + /@rollup/rollup-linux-arm-gnueabihf@4.17.2: + resolution: {integrity: sha512-3reX2fUHqN7sffBNqmEyMQVj/CKhIHZd4y631duy0hZqI8Qoqf6lTtmAKvJFYa6bhU95B1D0WgzHkmTg33In0A==} cpu: [arm] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-arm-musleabihf@4.14.3: - resolution: {integrity: sha512-ljcuiDI4V3ySuc7eSk4lQ9wU8J8r8KrOUvB2U+TtK0TiW6OFDmJ+DdIjjwZHIw9CNxzbmXY39wwpzYuFDwNXuw==} + /@rollup/rollup-linux-arm-musleabihf@4.17.2: + resolution: {integrity: sha512-uSqpsp91mheRgw96xtyAGP9FW5ChctTFEoXP0r5FAzj/3ZRv3Uxjtc7taRQSaQM/q85KEKjKsZuiZM3GyUivRg==} cpu: [arm] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-arm64-gnu@4.14.3: - resolution: {integrity: sha512-Eci2us9VTHm1eSyn5/eEpaC7eP/mp5n46gTRB3Aar3BgSvDQGJZuicyq6TsH4HngNBgVqC5sDYxOzTExSU+NjA==} + /@rollup/rollup-linux-arm64-gnu@4.17.2: + resolution: {integrity: sha512-EMMPHkiCRtE8Wdk3Qhtciq6BndLtstqZIroHiiGzB3C5LDJmIZcSzVtLRbwuXuUft1Cnv+9fxuDtDxz3k3EW2A==} cpu: [arm64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-arm64-musl@4.14.3: - resolution: {integrity: sha512-UrBoMLCq4E92/LCqlh+blpqMz5h1tJttPIniwUgOFJyjWI1qrtrDhhpHPuFxULlUmjFHfloWdixtDhSxJt5iKw==} + /@rollup/rollup-linux-arm64-musl@4.17.2: + resolution: {integrity: sha512-NMPylUUZ1i0z/xJUIx6VUhISZDRT+uTWpBcjdv0/zkp7b/bQDF+NfnfdzuTiB1G6HTodgoFa93hp0O1xl+/UbA==} cpu: [arm64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-powerpc64le-gnu@4.14.3: - resolution: {integrity: sha512-5aRjvsS8q1nWN8AoRfrq5+9IflC3P1leMoy4r2WjXyFqf3qcqsxRCfxtZIV58tCxd+Yv7WELPcO9mY9aeQyAmw==} + /@rollup/rollup-linux-powerpc64le-gnu@4.17.2: + resolution: {integrity: sha512-T19My13y8uYXPw/L/k0JYaX1fJKFT/PWdXiHr8mTbXWxjVF1t+8Xl31DgBBvEKclw+1b00Chg0hxE2O7bTG7GQ==} cpu: [ppc64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-riscv64-gnu@4.14.3: - resolution: {integrity: sha512-sk/Qh1j2/RJSX7FhEpJn8n0ndxy/uf0kI/9Zc4b1ELhqULVdTfN6HL31CDaTChiBAOgLcsJ1sgVZjWv8XNEsAQ==} + /@rollup/rollup-linux-riscv64-gnu@4.17.2: + resolution: {integrity: sha512-BOaNfthf3X3fOWAB+IJ9kxTgPmMqPPH5f5k2DcCsRrBIbWnaJCgX2ll77dV1TdSy9SaXTR5iDXRL8n7AnoP5cg==} cpu: [riscv64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-s390x-gnu@4.14.3: - resolution: {integrity: sha512-jOO/PEaDitOmY9TgkxF/TQIjXySQe5KVYB57H/8LRP/ux0ZoO8cSHCX17asMSv3ruwslXW/TLBcxyaUzGRHcqg==} + /@rollup/rollup-linux-s390x-gnu@4.17.2: + resolution: {integrity: sha512-W0UP/x7bnn3xN2eYMql2T/+wpASLE5SjObXILTMPUBDB/Fg/FxC+gX4nvCfPBCbNhz51C+HcqQp2qQ4u25ok6g==} cpu: [s390x] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-x64-gnu@4.14.3: - resolution: {integrity: sha512-8ybV4Xjy59xLMyWo3GCfEGqtKV5M5gCSrZlxkPGvEPCGDLNla7v48S662HSGwRd6/2cSneMQWiv+QzcttLrrOA==} + /@rollup/rollup-linux-x64-gnu@4.17.2: + resolution: {integrity: sha512-Hy7pLwByUOuyaFC6mAr7m+oMC+V7qyifzs/nW2OJfC8H4hbCzOX07Ov0VFk/zP3kBsELWNFi7rJtgbKYsav9QQ==} cpu: [x64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-x64-musl@4.14.3: - resolution: {integrity: sha512-s+xf1I46trOY10OqAtZ5Rm6lzHre/UiLA1J2uOhCFXWkbZrJRkYBPO6FhvGfHmdtQ3Bx793MNa7LvoWFAm93bg==} + /@rollup/rollup-linux-x64-musl@4.17.2: + resolution: {integrity: sha512-h1+yTWeYbRdAyJ/jMiVw0l6fOOm/0D1vNLui9iPuqgRGnXA0u21gAqOyB5iHjlM9MMfNOm9RHCQ7zLIzT0x11Q==} cpu: [x64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-win32-arm64-msvc@4.14.3: - resolution: {integrity: sha512-+4h2WrGOYsOumDQ5S2sYNyhVfrue+9tc9XcLWLh+Kw3UOxAvrfOrSMFon60KspcDdytkNDh7K2Vs6eMaYImAZg==} + /@rollup/rollup-win32-arm64-msvc@4.17.2: + resolution: {integrity: sha512-tmdtXMfKAjy5+IQsVtDiCfqbynAQE/TQRpWdVataHmhMb9DCoJxp9vLcCBjEQWMiUYxO1QprH/HbY9ragCEFLA==} cpu: [arm64] os: [win32] requiresBuild: true dev: true optional: true - /@rollup/rollup-win32-ia32-msvc@4.14.3: - resolution: {integrity: sha512-T1l7y/bCeL/kUwh9OD4PQT4aM7Bq43vX05htPJJ46RTI4r5KNt6qJRzAfNfM+OYMNEVBWQzR2Gyk+FXLZfogGw==} + /@rollup/rollup-win32-ia32-msvc@4.17.2: + resolution: {integrity: sha512-7II/QCSTAHuE5vdZaQEwJq2ZACkBpQDOmQsE6D6XUbnBHW8IAhm4eTufL6msLJorzrHDFv3CF8oCA/hSIRuZeQ==} cpu: [ia32] os: [win32] requiresBuild: true dev: true optional: true - /@rollup/rollup-win32-x64-msvc@4.14.3: - resolution: {integrity: sha512-/BypzV0H1y1HzgYpxqRaXGBRqfodgoBBCcsrujT6QRcakDQdfU+Lq9PENPh5jB4I44YWq+0C2eHsHya+nZY1sA==} + /@rollup/rollup-win32-x64-msvc@4.17.2: + resolution: {integrity: sha512-TGGO7v7qOq4CYmSBVEYpI1Y5xDuCEnbVC5Vth8mOsW0gDSzxNrVERPc790IGHsrT2dQSimgMr9Ub3Y1Jci5/8w==} cpu: [x64] os: [win32] requiresBuild: true dev: true optional: true - /@sveltejs/vite-plugin-svelte-inspector@2.1.0(@sveltejs/vite-plugin-svelte@3.1.0)(svelte@4.2.14)(vite@5.2.9): + /@sveltejs/vite-plugin-svelte-inspector@2.1.0(@sveltejs/vite-plugin-svelte@3.1.0)(svelte@4.2.16)(vite@5.2.11): resolution: {integrity: sha512-9QX28IymvBlSCqsCll5t0kQVxipsfhFFL+L2t3nTWfXnddYwxBuAEtTtlaVQpRz9c37BhJjltSeY4AJSC03SSg==} engines: {node: ^18.0.0 || >=20} peerDependencies: @@ -1395,55 +1395,41 @@ packages: svelte: ^4.0.0 || ^5.0.0-next.0 vite: ^5.0.0 dependencies: - '@sveltejs/vite-plugin-svelte': 3.1.0(svelte@4.2.14)(vite@5.2.9) + '@sveltejs/vite-plugin-svelte': 3.1.0(svelte@4.2.16)(vite@5.2.11) debug: 4.3.4(supports-color@8.1.1) - svelte: 4.2.14 - vite: 5.2.9 + svelte: 4.2.16 + vite: 5.2.11 transitivePeerDependencies: - supports-color dev: true - /@sveltejs/vite-plugin-svelte@3.1.0(svelte@4.2.14)(vite@5.2.9): + /@sveltejs/vite-plugin-svelte@3.1.0(svelte@4.2.16)(vite@5.2.11): resolution: {integrity: sha512-sY6ncCvg+O3njnzbZexcVtUqOBE3iYmQPJ9y+yXSkOwG576QI/xJrBnQSRXFLGwJNBa0T78JEKg5cIR0WOAuUw==} 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.1.0(@sveltejs/vite-plugin-svelte@3.1.0)(svelte@4.2.14)(vite@5.2.9) + '@sveltejs/vite-plugin-svelte-inspector': 2.1.0(@sveltejs/vite-plugin-svelte@3.1.0)(svelte@4.2.16)(vite@5.2.11) debug: 4.3.4(supports-color@8.1.1) deepmerge: 4.3.1 kleur: 4.1.5 - magic-string: 0.30.9 - svelte: 4.2.14 - svelte-hmr: 0.16.0(svelte@4.2.14) - vite: 5.2.9 - vitefu: 0.2.5(vite@5.2.9) + magic-string: 0.30.10 + svelte: 4.2.16 + svelte-hmr: 0.16.0(svelte@4.2.16) + vite: 5.2.11 + vitefu: 0.2.5(vite@5.2.11) transitivePeerDependencies: - supports-color dev: true - /@tauri-apps/api@2.0.0-beta.6: - resolution: {integrity: sha512-ay3kAXYQoqC3rX4Vr3y6uGwrBhRPM7UQqZ9wr1VYzN6lkcMIcu7+UBvytmcfXDlVctqFoMQJafn6+dK/Oqh8+Q==} + /@tauri-apps/api@2.0.0-beta.11: + resolution: {integrity: sha512-wJRY+fBUm3KpqZDHMIz5HRv+1vlnvRJ/dFxiyY3NlINTx2qXqDou5qWYcP1CuZXsd39InWVPV3FAZvno/kGCkA==} engines: {node: '>= 18', npm: '>= 6.6.0', yarn: '>= 1.19.1'} dev: false - /@tauri-apps/api@2.0.0-beta.7: - resolution: {integrity: sha512-cM7SJQP4DBkLLMOdybLFYUURWn/tng2FEdAnXlu42f3NhFxKL4KVeeQTkuwlgC7ePwwwvDSqiXGiF+dKOadY7w==} - engines: {node: '>= 18', npm: '>= 6.6.0', yarn: '>= 1.19.1'} - dev: false - - /@tauri-apps/cli-darwin-arm64@1.5.11: - resolution: {integrity: sha512-2NLSglDb5VfvTbMtmOKWyD+oaL/e8Z/ZZGovHtUFyUSFRabdXc6cZOlcD1BhFvYkHqm+TqGaz5qtPR5UbqDs8A==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [darwin] - requiresBuild: true - dev: true - optional: true - - /@tauri-apps/cli-darwin-arm64@2.0.0-beta.12: - resolution: {integrity: sha512-+Ksrxc4QQE1R62OreCybM8PNnF090qhf+ZeRZTZ9JxOujz4Tq/RiE1vC5nRlDu+Cd3pL63fZ2TsANj2PnpN+qw==} + /@tauri-apps/cli-darwin-arm64@2.0.0-beta.16: + resolution: {integrity: sha512-5Gif4AvpJmnyLj3HO3AEl1RVrr4ast6mDQiXoLwe75bfWq1pj9VwsS5SuSrUKtB8YBSnnclcJwkqwa6soY/xkg==} engines: {node: '>= 10'} cpu: [arm64] os: [darwin] @@ -1451,35 +1437,8 @@ packages: dev: true optional: true - /@tauri-apps/cli-darwin-arm64@2.0.0-beta.9: - resolution: {integrity: sha512-7OthLcko0Z2FUpP6fqJQhjaVKmxgXW6tWOi+X67HDjP1Iixquhh/vP5JqdSi7gYK8bphcegPp9UETuAgHx7MtA==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [darwin] - requiresBuild: true - dev: true - optional: true - - /@tauri-apps/cli-darwin-x64@1.5.11: - resolution: {integrity: sha512-/RQllHiJRH2fJOCudtZlaUIjofkHzP3zZgxi71ZUm7Fy80smU5TDfwpwOvB0wSVh0g/ciDjMArCSTo0MRvL+ag==} - engines: {node: '>= 10'} - cpu: [x64] - os: [darwin] - requiresBuild: true - dev: true - optional: true - - /@tauri-apps/cli-darwin-x64@2.0.0-beta.12: - resolution: {integrity: sha512-KEkcJp7jfWMEiRFTJ3/yJhy8EFwgJPNGnNYjKTD5CAba9wMexxs23U7YLAWdSNrbSgPAox0pBqXaSj6p2HH0Wg==} - engines: {node: '>= 10'} - cpu: [x64] - os: [darwin] - requiresBuild: true - dev: true - optional: true - - /@tauri-apps/cli-darwin-x64@2.0.0-beta.9: - resolution: {integrity: sha512-Pwf6GBGZuV9y7PEtaLQlzS3x91hFPkA0Ro8vaUxTirYkFiJFTgoigXDHjMsjfjy+E/8oAAHr7Z0zeA6ijR5t1w==} + /@tauri-apps/cli-darwin-x64@2.0.0-beta.16: + resolution: {integrity: sha512-6Cia8lGSroyoXKvfRI+Dv8Xinr27lptDzGZnd8mT9V0xPg73xcWxPKiTkuxPmLQTrQKVAurfsX3DwwgK8m9kSw==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] @@ -1487,17 +1446,8 @@ packages: dev: true optional: true - /@tauri-apps/cli-linux-arm-gnueabihf@1.5.11: - resolution: {integrity: sha512-IlBuBPKmMm+a5LLUEK6a21UGr9ZYd6zKuKLq6IGM4tVweQa8Sf2kP2Nqs74dMGIUrLmMs0vuqdURpykQg+z4NQ==} - engines: {node: '>= 10'} - cpu: [arm] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@tauri-apps/cli-linux-arm-gnueabihf@2.0.0-beta.12: - resolution: {integrity: sha512-EUDen1XNF/WfG5hjTZ6P/8IcpYPFm2Ox/FwlBPlePKZJrc+/3IveME/oyC3wrloscodV41yL2ise4SZuJtNAHA==} + /@tauri-apps/cli-linux-arm-gnueabihf@2.0.0-beta.16: + resolution: {integrity: sha512-1mQ0flIt0wrX4QLPwd8f1QFsuFjLPQtWuiObK63K0/YZmDS2yzKT6jnGqNCJsSiyXE2/36gKSyWh6OVpX8U7xg==} engines: {node: '>= 10'} cpu: [arm] os: [linux] @@ -1505,44 +1455,8 @@ packages: dev: true optional: true - /@tauri-apps/cli-linux-arm-gnueabihf@2.0.0-beta.9: - resolution: {integrity: sha512-daAXSac82vbYlwxbRT0DwFr4gP4v1XnHEwA72EeKRiKGw7GeHwzqoY/URVolBGY7sIBwwL+0qc1hqPde9dsm1g==} - engines: {node: '>= 10'} - cpu: [arm] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@tauri-apps/cli-linux-arm64-gnu@1.5.11: - resolution: {integrity: sha512-w+k1bNHCU/GbmXshtAhyTwqosThUDmCEFLU4Zkin1vl2fuAtQry2RN7thfcJFepblUGL/J7yh3Q/0+BCjtspKQ==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@tauri-apps/cli-linux-arm64-gnu@2.0.0-beta.12: - resolution: {integrity: sha512-VUhCBB6kaQmi7MyXTRccqemmz7s5n15Z718OIW1n6wI68oh0IsvC9KsrbDfgOLZVG6RXzmtzyXwnaIFQAgl+Cg==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@tauri-apps/cli-linux-arm64-gnu@2.0.0-beta.9: - resolution: {integrity: sha512-qHyACvFWIAbcl1C7cq64ciIXxaLOnZAgGXIEE48JLc5VeXkpYUF5sNLPjafidY/CxYoFoE453lh3dLc3DjNhuw==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@tauri-apps/cli-linux-arm64-musl@1.5.11: - resolution: {integrity: sha512-PN6/dl+OfYQ/qrAy4HRAfksJ2AyWQYn2IA/2Wwpaa7SDRz2+hzwTQkvajuvy0sQ5L2WCG7ymFYRYMbpC6Hk9Pg==} + /@tauri-apps/cli-linux-arm64-gnu@2.0.0-beta.16: + resolution: {integrity: sha512-CjgwOvaslvy06m36faZ40noQaBu37gcXtD0HlCgAMofDZz7fUWQJn3xE7r8fegXmY0oMKZ9ah8dgwd5KSk+L+Q==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] @@ -1550,8 +1464,8 @@ packages: dev: true optional: true - /@tauri-apps/cli-linux-arm64-musl@2.0.0-beta.12: - resolution: {integrity: sha512-eus/fGCQZPcvwEa2HH2TJh1Xb2FeeVrnxL6lQseLPkgD7Wcu5mWz07AlLCMDOreUobb5vyOmm0L7d1HMIPrvEQ==} + /@tauri-apps/cli-linux-arm64-musl@2.0.0-beta.16: + resolution: {integrity: sha512-JMtryDJckutFzNpwFgh98o9Z4Vw1pwImYmJIDLpCPSqYIfd+mrBgPZFTaGl11ZsQnllqt4FNXlYR8T+ey7ZpfQ==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] @@ -1559,44 +1473,8 @@ packages: dev: true optional: true - /@tauri-apps/cli-linux-arm64-musl@2.0.0-beta.9: - resolution: {integrity: sha512-DkrkxGKlQ1Sonvo4ltv6XqNxNuNxDyxfdZdvx3CEecKomMyFV6xTxp0/IcqF9fIRPL2Gp2PaPBWOuj+K8v95vw==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@tauri-apps/cli-linux-x64-gnu@1.5.11: - resolution: {integrity: sha512-MTVXLi89Nj7Apcvjezw92m7ZqIDKT5SFKZtVPCg6RoLUBTzko/BQoXYIRWmdoz2pgkHDUHgO2OMJ8oKzzddXbw==} - engines: {node: '>= 10'} - cpu: [x64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@tauri-apps/cli-linux-x64-gnu@2.0.0-beta.12: - resolution: {integrity: sha512-C4SkDnjuhFSdSgsK8KNRj2b/oe/j1vrvI8+ZxUj+/o1jK71A2eiCN8pJlyMZYCN8wZUksGazxaFz62g0jceAEg==} - engines: {node: '>= 10'} - cpu: [x64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@tauri-apps/cli-linux-x64-gnu@2.0.0-beta.9: - resolution: {integrity: sha512-pY0DOrWAwSkIkhw7UdRK0VNVFLwP+yltqCoQ+Zji5Vwk/x98mBo0L2bF3nSOLhYPAaW41v3AIOIZY1sBYWSq/w==} - engines: {node: '>= 10'} - cpu: [x64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@tauri-apps/cli-linux-x64-musl@1.5.11: - resolution: {integrity: sha512-kwzAjqFpz7rvTs7WGZLy/a5nS5t15QKr3E9FG95MNF0exTl3d29YoAUAe1Mn0mOSrTJ9Z+vYYAcI/QdcsGBP+w==} + /@tauri-apps/cli-linux-x64-gnu@2.0.0-beta.16: + resolution: {integrity: sha512-3dQGCKsbjaIzk4UM7Jf5FzBJpBJ1OfwBOwkVv2M4O7EDLNZi9brDR+I41eqyFhTabEcHJoLhtURLbD25dJuiug==} engines: {node: '>= 10'} cpu: [x64] os: [linux] @@ -1604,8 +1482,8 @@ packages: dev: true optional: true - /@tauri-apps/cli-linux-x64-musl@2.0.0-beta.12: - resolution: {integrity: sha512-V8NlJ8wgNcMfKTGOubgfjRyyJVQsZxpOZkGjdfn/YK0UNdOC6iLuqxIki47hbnoJMqvuxa37lr7Z1JVawOMUyw==} + /@tauri-apps/cli-linux-x64-musl@2.0.0-beta.16: + resolution: {integrity: sha512-t+wdk/VCn8l9y1fhRQPfvZyz3Or7QEPTxXNobbUzbtckFsf/LqTxjaajOBmSGnZpoTDFvwVOmalDaylILxuM5g==} engines: {node: '>= 10'} cpu: [x64] os: [linux] @@ -1613,26 +1491,8 @@ packages: dev: true optional: true - /@tauri-apps/cli-linux-x64-musl@2.0.0-beta.9: - resolution: {integrity: sha512-GYQy1bKWbrRyr4X2epbltq82k4Vhr9TzNFky/fflOyDXlMP36IqBOjQ6PEzvKTajNglciIdTPQfdoUKX4+PA/Q==} - engines: {node: '>= 10'} - cpu: [x64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@tauri-apps/cli-win32-arm64-msvc@1.5.11: - resolution: {integrity: sha512-L+5NZ/rHrSUrMxjj6YpFYCXp6wHnq8c8SfDTBOX8dO8x+5283/vftb4vvuGIsLS4UwUFXFnLt3XQr44n84E67Q==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [win32] - requiresBuild: true - dev: true - optional: true - - /@tauri-apps/cli-win32-arm64-msvc@2.0.0-beta.12: - resolution: {integrity: sha512-dIsE5U4JRoVImW0PX9K82/dMjwugqc3DmgKbFKLYXgTFmSNaTNdojI/5VOPmbOIMJ8BNGDF8sjS80I0PZuEqvw==} + /@tauri-apps/cli-win32-arm64-msvc@2.0.0-beta.16: + resolution: {integrity: sha512-ouP0iiRMTNaKyz6c06LucMR5P585r2XJ3/GlzNWtUfP4EaP8mZAENB0ro9VZl10++7Z658MdWxSAf4+Qmkj0jQ==} engines: {node: '>= 10'} cpu: [arm64] os: [win32] @@ -1640,26 +1500,8 @@ packages: dev: true optional: true - /@tauri-apps/cli-win32-arm64-msvc@2.0.0-beta.9: - resolution: {integrity: sha512-0DTM06N/x57+vV/itT3l/34ZHjXIxPc315OWHE9MmY+vE37t/QFp9FNZDN/VdveZ1ZgmEn3rSQNchqcMaMdD3w==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [win32] - requiresBuild: true - dev: true - optional: true - - /@tauri-apps/cli-win32-ia32-msvc@1.5.11: - resolution: {integrity: sha512-oVlD9IVewrY0lZzTdb71kNXkjdgMqFq+ohb67YsJb4Rf7o8A9DTlFds1XLCe3joqLMm4M+gvBKD7YnGIdxQ9vA==} - engines: {node: '>= 10'} - cpu: [ia32] - os: [win32] - requiresBuild: true - dev: true - optional: true - - /@tauri-apps/cli-win32-ia32-msvc@2.0.0-beta.12: - resolution: {integrity: sha512-vTNrGzVV/LclD+4u+IOOwl1Ia2CqwZYK6AmMLp0ROLzbSn/9ROJJYe47V5VAZrnMjThEdb9fRL0FPYPk9yDaNA==} + /@tauri-apps/cli-win32-ia32-msvc@2.0.0-beta.16: + resolution: {integrity: sha512-BiBkv3IesPNGXVaampxpB+ub0tz2sGu+6OLzxSm1QTp+2ZSw/qeXi/icvJl5azmOyee4ZWBBiuBzdVY88QH+Vw==} engines: {node: '>= 10'} cpu: [ia32] os: [win32] @@ -1667,35 +1509,8 @@ packages: dev: true optional: true - /@tauri-apps/cli-win32-ia32-msvc@2.0.0-beta.9: - resolution: {integrity: sha512-HxrSAVjYRjPGm97lf18BvuoirgrE5uyvpALvGO98m8ZO9Y9CHklEadYi19nCVlr5d4mmP2GUbxCCx1Mc8XRAuA==} - engines: {node: '>= 10'} - cpu: [ia32] - os: [win32] - requiresBuild: true - dev: true - optional: true - - /@tauri-apps/cli-win32-x64-msvc@1.5.11: - resolution: {integrity: sha512-1CexcqUFCis5ypUIMOKllxUBrna09McbftWENgvVXMfA+SP+yPDPAVb8fIvUcdTIwR/yHJwcIucmTB4anww4vg==} - engines: {node: '>= 10'} - cpu: [x64] - os: [win32] - requiresBuild: true - dev: true - optional: true - - /@tauri-apps/cli-win32-x64-msvc@2.0.0-beta.12: - resolution: {integrity: sha512-Z/++lJ1FraoN1ZaNxYuCynNm7SyEGC+yd/adYQvhaQyudZa5HW/8eFkLx8FRcIQkEkSqLBkHf9VpwjnTDBVlwQ==} - engines: {node: '>= 10'} - cpu: [x64] - os: [win32] - requiresBuild: true - dev: true - optional: true - - /@tauri-apps/cli-win32-x64-msvc@2.0.0-beta.9: - resolution: {integrity: sha512-abdCoiMjit9sSXziRCEf9VdEFbqqbEqg3ySOQmNAQTCsenr33iWjIoCMv/ThORtXKJ209yGyXlxBZY7Muxfi3A==} + /@tauri-apps/cli-win32-x64-msvc@2.0.0-beta.16: + resolution: {integrity: sha512-rrJeC7eAT6diQpnI3aaflhvtKyTryywbhHLG/c1QyPhdxA7Or6nflo5KzWLd6q3GQqKRbvz5dDtxwFn+XLo+rQ==} engines: {node: '>= 10'} cpu: [x64] os: [win32] @@ -1703,55 +1518,21 @@ packages: dev: true optional: true - /@tauri-apps/cli@1.5.11: - resolution: {integrity: sha512-B475D7phZrq5sZ3kDABH4g2mEoUIHtnIO+r4ZGAAfsjMbZCwXxR/jlMGTEL+VO3YzjpF7gQe38IzB4vLBbVppw==} - engines: {node: '>= 10'} - hasBin: true - optionalDependencies: - '@tauri-apps/cli-darwin-arm64': 1.5.11 - '@tauri-apps/cli-darwin-x64': 1.5.11 - '@tauri-apps/cli-linux-arm-gnueabihf': 1.5.11 - '@tauri-apps/cli-linux-arm64-gnu': 1.5.11 - '@tauri-apps/cli-linux-arm64-musl': 1.5.11 - '@tauri-apps/cli-linux-x64-gnu': 1.5.11 - '@tauri-apps/cli-linux-x64-musl': 1.5.11 - '@tauri-apps/cli-win32-arm64-msvc': 1.5.11 - '@tauri-apps/cli-win32-ia32-msvc': 1.5.11 - '@tauri-apps/cli-win32-x64-msvc': 1.5.11 - dev: true - - /@tauri-apps/cli@2.0.0-beta.12: - resolution: {integrity: sha512-MFh4Z093O+PXWI6KFR8E2zIOgpJ4zL8waDhFXVQgBpqiD4ieiqywjmbmNIWkVqYBGAia7ZI0juxpkZSyXT4f1A==} - engines: {node: '>= 10'} - hasBin: true - optionalDependencies: - '@tauri-apps/cli-darwin-arm64': 2.0.0-beta.12 - '@tauri-apps/cli-darwin-x64': 2.0.0-beta.12 - '@tauri-apps/cli-linux-arm-gnueabihf': 2.0.0-beta.12 - '@tauri-apps/cli-linux-arm64-gnu': 2.0.0-beta.12 - '@tauri-apps/cli-linux-arm64-musl': 2.0.0-beta.12 - '@tauri-apps/cli-linux-x64-gnu': 2.0.0-beta.12 - '@tauri-apps/cli-linux-x64-musl': 2.0.0-beta.12 - '@tauri-apps/cli-win32-arm64-msvc': 2.0.0-beta.12 - '@tauri-apps/cli-win32-ia32-msvc': 2.0.0-beta.12 - '@tauri-apps/cli-win32-x64-msvc': 2.0.0-beta.12 - dev: true - - /@tauri-apps/cli@2.0.0-beta.9: - resolution: {integrity: sha512-QYBuCAAdV10tGOTMWGLbt6d+2+Tq8K9bb4oiinChUV/JmCNe9SaTlG6VW1cCJDf+/F0AuGOTgjyBNw8DOiTrow==} + /@tauri-apps/cli@2.0.0-beta.16: + resolution: {integrity: sha512-ELaPqTekAVfTU4lFf7k/Z422DKXk/uDWi7ppI8TuQOqcXjrxlXMvv/Y1eC2tem9vMeuOIU0Jg53pOhOu0w8JIQ==} engines: {node: '>= 10'} hasBin: true optionalDependencies: - '@tauri-apps/cli-darwin-arm64': 2.0.0-beta.9 - '@tauri-apps/cli-darwin-x64': 2.0.0-beta.9 - '@tauri-apps/cli-linux-arm-gnueabihf': 2.0.0-beta.9 - '@tauri-apps/cli-linux-arm64-gnu': 2.0.0-beta.9 - '@tauri-apps/cli-linux-arm64-musl': 2.0.0-beta.9 - '@tauri-apps/cli-linux-x64-gnu': 2.0.0-beta.9 - '@tauri-apps/cli-linux-x64-musl': 2.0.0-beta.9 - '@tauri-apps/cli-win32-arm64-msvc': 2.0.0-beta.9 - '@tauri-apps/cli-win32-ia32-msvc': 2.0.0-beta.9 - '@tauri-apps/cli-win32-x64-msvc': 2.0.0-beta.9 + '@tauri-apps/cli-darwin-arm64': 2.0.0-beta.16 + '@tauri-apps/cli-darwin-x64': 2.0.0-beta.16 + '@tauri-apps/cli-linux-arm-gnueabihf': 2.0.0-beta.16 + '@tauri-apps/cli-linux-arm64-gnu': 2.0.0-beta.16 + '@tauri-apps/cli-linux-arm64-musl': 2.0.0-beta.16 + '@tauri-apps/cli-linux-x64-gnu': 2.0.0-beta.16 + '@tauri-apps/cli-linux-x64-musl': 2.0.0-beta.16 + '@tauri-apps/cli-win32-arm64-msvc': 2.0.0-beta.16 + '@tauri-apps/cli-win32-ia32-msvc': 2.0.0-beta.16 + '@tauri-apps/cli-win32-x64-msvc': 2.0.0-beta.16 dev: true /@tauri-apps/toml@2.2.4: @@ -1787,8 +1568,8 @@ packages: resolution: {integrity: sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==} dev: true - /@typescript-eslint/eslint-plugin@7.7.0(@typescript-eslint/parser@7.7.0)(eslint@8.57.0)(typescript@5.4.5): - resolution: {integrity: sha512-GJWR0YnfrKnsRoluVO3PRb9r5aMZriiMMM/RHj5nnTrBy1/wIgk76XCtCKcnXGjpZQJQRFtGV9/0JJ6n30uwpQ==} + /@typescript-eslint/eslint-plugin@7.8.0(@typescript-eslint/parser@7.8.0)(eslint@8.57.0)(typescript@5.4.5): + resolution: {integrity: sha512-gFTT+ezJmkwutUPmB0skOj3GZJtlEGnlssems4AjkVweUPGj7jRwwqg0Hhg7++kPGJqKtTYx+R05Ftww372aIg==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: '@typescript-eslint/parser': ^7.0.0 @@ -1799,46 +1580,25 @@ packages: optional: true dependencies: '@eslint-community/regexpp': 4.10.0 - '@typescript-eslint/parser': 7.7.0(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/scope-manager': 7.7.0 - '@typescript-eslint/type-utils': 7.7.0(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/utils': 7.7.0(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/visitor-keys': 7.7.0 + '@typescript-eslint/parser': 7.8.0(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/scope-manager': 7.8.0 + '@typescript-eslint/type-utils': 7.8.0(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/utils': 7.8.0(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/visitor-keys': 7.8.0 debug: 4.3.4(supports-color@8.1.1) eslint: 8.57.0 graphemer: 1.4.0 ignore: 5.3.1 natural-compare: 1.4.0 - semver: 7.5.4 + semver: 7.6.0 ts-api-utils: 1.3.0(typescript@5.4.5) typescript: 5.4.5 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/parser@6.20.0(eslint@8.57.0)(typescript@5.4.5): - resolution: {integrity: sha512-bYerPDF/H5v6V76MdMYhjwmwgMA+jlPVqjSDq2cRqMi8bP5sR3Z+RLOiOMad3nsnmDVmn2gAFCyNgh/dIrfP/w==} - engines: {node: ^16.0.0 || >=18.0.0} - peerDependencies: - eslint: ^7.0.0 || ^8.0.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@typescript-eslint/scope-manager': 6.20.0 - '@typescript-eslint/types': 6.20.0 - '@typescript-eslint/typescript-estree': 6.20.0(typescript@5.4.5) - '@typescript-eslint/visitor-keys': 6.20.0 - debug: 4.3.4(supports-color@8.1.1) - eslint: 8.57.0 - typescript: 5.4.5 - transitivePeerDependencies: - - supports-color - dev: true - - /@typescript-eslint/parser@7.7.0(eslint@8.57.0)(typescript@5.4.5): - resolution: {integrity: sha512-fNcDm3wSwVM8QYL4HKVBggdIPAy9Q41vcvC/GtDobw3c4ndVT3K6cqudUmjHPw8EAp4ufax0o58/xvWaP2FmTg==} + /@typescript-eslint/parser@7.8.0(eslint@8.57.0)(typescript@5.4.5): + resolution: {integrity: sha512-KgKQly1pv0l4ltcftP59uQZCi4HUYswCLbTqVZEJu7uLX8CTLyswqMLqLN+2QFz4jCptqWVV4SB7vdxcH2+0kQ==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 @@ -1847,10 +1607,10 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 7.7.0 - '@typescript-eslint/types': 7.7.0 - '@typescript-eslint/typescript-estree': 7.7.0(typescript@5.4.5) - '@typescript-eslint/visitor-keys': 7.7.0 + '@typescript-eslint/scope-manager': 7.8.0 + '@typescript-eslint/types': 7.8.0 + '@typescript-eslint/typescript-estree': 7.8.0(typescript@5.4.5) + '@typescript-eslint/visitor-keys': 7.8.0 debug: 4.3.4(supports-color@8.1.1) eslint: 8.57.0 typescript: 5.4.5 @@ -1858,24 +1618,16 @@ packages: - supports-color dev: true - /@typescript-eslint/scope-manager@6.20.0: - resolution: {integrity: sha512-p4rvHQRDTI1tGGMDFQm+GtxP1ZHyAh64WANVoyEcNMpaTFn3ox/3CcgtIlELnRfKzSs/DwYlDccJEtr3O6qBvA==} - engines: {node: ^16.0.0 || >=18.0.0} - dependencies: - '@typescript-eslint/types': 6.20.0 - '@typescript-eslint/visitor-keys': 6.20.0 - dev: true - - /@typescript-eslint/scope-manager@7.7.0: - resolution: {integrity: sha512-/8INDn0YLInbe9Wt7dK4cXLDYp0fNHP5xKLHvZl3mOT5X17rK/YShXaiNmorl+/U4VKCVIjJnx4Ri5b0y+HClw==} + /@typescript-eslint/scope-manager@7.8.0: + resolution: {integrity: sha512-viEmZ1LmwsGcnr85gIq+FCYI7nO90DVbE37/ll51hjv9aG+YZMb4WDE2fyWpUR4O/UrhGRpYXK/XajcGTk2B8g==} engines: {node: ^18.18.0 || >=20.0.0} dependencies: - '@typescript-eslint/types': 7.7.0 - '@typescript-eslint/visitor-keys': 7.7.0 + '@typescript-eslint/types': 7.8.0 + '@typescript-eslint/visitor-keys': 7.8.0 dev: true - /@typescript-eslint/type-utils@7.7.0(eslint@8.57.0)(typescript@5.4.5): - resolution: {integrity: sha512-bOp3ejoRYrhAlnT/bozNQi3nio9tIgv3U5C0mVDdZC7cpcQEDZXvq8inrHYghLVwuNABRqrMW5tzAv88Vy77Sg==} + /@typescript-eslint/type-utils@7.8.0(eslint@8.57.0)(typescript@5.4.5): + resolution: {integrity: sha512-H70R3AefQDQpz9mGv13Uhi121FNMh+WEaRqcXTX09YEDky21km4dV1ZXJIp8QjXc4ZaVkXVdohvWDzbnbHDS+A==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 @@ -1884,8 +1636,8 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 7.7.0(typescript@5.4.5) - '@typescript-eslint/utils': 7.7.0(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/typescript-estree': 7.8.0(typescript@5.4.5) + '@typescript-eslint/utils': 7.8.0(eslint@8.57.0)(typescript@5.4.5) debug: 4.3.4(supports-color@8.1.1) eslint: 8.57.0 ts-api-utils: 1.3.0(typescript@5.4.5) @@ -1894,40 +1646,13 @@ packages: - supports-color dev: true - /@typescript-eslint/types@6.20.0: - resolution: {integrity: sha512-MM9mfZMAhiN4cOEcUOEx+0HmuaW3WBfukBZPCfwSqFnQy0grXYtngKCqpQN339X3RrwtzspWJrpbrupKYUSBXQ==} - engines: {node: ^16.0.0 || >=18.0.0} - dev: true - - /@typescript-eslint/types@7.7.0: - resolution: {integrity: sha512-G01YPZ1Bd2hn+KPpIbrAhEWOn5lQBrjxkzHkWvP6NucMXFtfXoevK82hzQdpfuQYuhkvFDeQYbzXCjR1z9Z03w==} + /@typescript-eslint/types@7.8.0: + resolution: {integrity: sha512-wf0peJ+ZGlcH+2ZS23aJbOv+ztjeeP8uQ9GgwMJGVLx/Nj9CJt17GWgWWoSmoRVKAX2X+7fzEnAjxdvK2gqCLw==} engines: {node: ^18.18.0 || >=20.0.0} dev: true - /@typescript-eslint/typescript-estree@6.20.0(typescript@5.4.5): - resolution: {integrity: sha512-RnRya9q5m6YYSpBN7IzKu9FmLcYtErkDkc8/dKv81I9QiLLtVBHrjz+Ev/crAqgMNW2FCsoZF4g2QUylMnJz+g==} - engines: {node: ^16.0.0 || >=18.0.0} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@typescript-eslint/types': 6.20.0 - '@typescript-eslint/visitor-keys': 6.20.0 - debug: 4.3.4(supports-color@8.1.1) - globby: 11.1.0 - is-glob: 4.0.3 - minimatch: 9.0.3 - semver: 7.5.4 - ts-api-utils: 1.3.0(typescript@5.4.5) - typescript: 5.4.5 - transitivePeerDependencies: - - supports-color - dev: true - - /@typescript-eslint/typescript-estree@7.7.0(typescript@5.4.5): - resolution: {integrity: sha512-8p71HQPE6CbxIBy2kWHqM1KGrC07pk6RJn40n0DSc6bMOBBREZxSDJ+BmRzc8B5OdaMh1ty3mkuWRg4sCFiDQQ==} + /@typescript-eslint/typescript-estree@7.8.0(typescript@5.4.5): + resolution: {integrity: sha512-5pfUCOwK5yjPaJQNy44prjCwtr981dO8Qo9J9PwYXZ0MosgAbfEMB008dJ5sNo3+/BN6ytBPuSvXUg9SAqB0dg==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: typescript: '*' @@ -1935,21 +1660,21 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 7.7.0 - '@typescript-eslint/visitor-keys': 7.7.0 + '@typescript-eslint/types': 7.8.0 + '@typescript-eslint/visitor-keys': 7.8.0 debug: 4.3.4(supports-color@8.1.1) globby: 11.1.0 is-glob: 4.0.3 minimatch: 9.0.4 - semver: 7.5.4 + semver: 7.6.0 ts-api-utils: 1.3.0(typescript@5.4.5) typescript: 5.4.5 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/utils@7.7.0(eslint@8.57.0)(typescript@5.4.5): - resolution: {integrity: sha512-LKGAXMPQs8U/zMRFXDZOzmMKgFv3COlxUQ+2NMPhbqgVm6R1w+nU1i4836Pmxu9jZAuIeyySNrN/6Rc657ggig==} + /@typescript-eslint/utils@7.8.0(eslint@8.57.0)(typescript@5.4.5): + resolution: {integrity: sha512-L0yFqOCflVqXxiZyXrDr80lnahQfSOfc9ELAAZ75sqicqp2i36kEZZGuUymHNFoYOqxRT05up760b4iGsl02nQ==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 @@ -1957,29 +1682,21 @@ packages: '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) '@types/json-schema': 7.0.15 '@types/semver': 7.5.8 - '@typescript-eslint/scope-manager': 7.7.0 - '@typescript-eslint/types': 7.7.0 - '@typescript-eslint/typescript-estree': 7.7.0(typescript@5.4.5) + '@typescript-eslint/scope-manager': 7.8.0 + '@typescript-eslint/types': 7.8.0 + '@typescript-eslint/typescript-estree': 7.8.0(typescript@5.4.5) eslint: 8.57.0 - semver: 7.5.4 + semver: 7.6.0 transitivePeerDependencies: - supports-color - typescript dev: true - /@typescript-eslint/visitor-keys@6.20.0: - resolution: {integrity: sha512-E8Cp98kRe4gKHjJD4NExXKz/zOJ1A2hhZc+IMVD6i7w4yjIvh6VyuRI0gRtxAsXtoC35uGMaQ9rjI2zJaXDEAw==} - engines: {node: ^16.0.0 || >=18.0.0} - dependencies: - '@typescript-eslint/types': 6.20.0 - eslint-visitor-keys: 3.4.3 - dev: true - - /@typescript-eslint/visitor-keys@7.7.0: - resolution: {integrity: sha512-h0WHOj8MhdhY8YWkzIF30R379y0NqyOHExI9N9KCzvmu05EgG4FumeYa3ccfKUSphyWkWQE1ybVrgz/Pbam6YA==} + /@typescript-eslint/visitor-keys@7.8.0: + resolution: {integrity: sha512-q4/gibTNBQNA0lGyYQCmWRS5D15n8rXh4QjK3KV+MBPlTYHpfBUT3D3PaPR/HeNiI9W6R7FvlkcGhNyAoP+caA==} engines: {node: ^18.18.0 || >=20.0.0} dependencies: - '@typescript-eslint/types': 7.7.0 + '@typescript-eslint/types': 7.8.0 eslint-visitor-keys: 3.4.3 dev: true @@ -1987,230 +1704,230 @@ packages: resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} dev: true - /@unocss/astro@0.59.3(rollup@4.14.3)(vite@5.2.9): - resolution: {integrity: sha512-Q0eL9LLWTORWQYZYz4aoiT0SQhXqrCYJKK6+Z++d5ugsnVsRP2O/ovxf+0CueMHe6volW0O2EhgUt0yT20FdAA==} + /@unocss/astro@0.59.4(rollup@4.17.2)(vite@5.2.11): + resolution: {integrity: sha512-DU3OR5MMR1Uvvec4/wB9EetDASHRg19Moy6z/MiIhn8JWJ0QzWYgSeJcfUX8exomMYv6WUEQJL+CyLI34Wmn8w==} peerDependencies: vite: ^2.9.0 || ^3.0.0-0 || ^4.0.0 || ^5.0.0-0 peerDependenciesMeta: vite: optional: true dependencies: - '@unocss/core': 0.59.3 - '@unocss/reset': 0.59.3 - '@unocss/vite': 0.59.3(rollup@4.14.3)(vite@5.2.9) - vite: 5.2.9 + '@unocss/core': 0.59.4 + '@unocss/reset': 0.59.4 + '@unocss/vite': 0.59.4(rollup@4.17.2)(vite@5.2.11) + vite: 5.2.11 transitivePeerDependencies: - rollup dev: true - /@unocss/cli@0.59.3(rollup@4.14.3): - resolution: {integrity: sha512-BkDkNZYVJrTRWxtTUPxq3TvbaBJ5r5zy82csCv+RJbNmQLJaqBy7gt0qkLJ9H4C83HNgqOuYEupVM65Ts3g0MA==} + /@unocss/cli@0.59.4(rollup@4.17.2): + resolution: {integrity: sha512-TT+WKedSifhsRqnpoYD2LfyYipVzEbzIU4DDGIaDNeDxGXYOGpb876zzkPDcvZSpI37IJ/efkkV7PGYpPBcQBQ==} engines: {node: '>=14'} hasBin: true dependencies: '@ampproject/remapping': 2.3.0 - '@rollup/pluginutils': 5.1.0(rollup@4.14.3) - '@unocss/config': 0.59.3 - '@unocss/core': 0.59.3 - '@unocss/preset-uno': 0.59.3 + '@rollup/pluginutils': 5.1.0(rollup@4.17.2) + '@unocss/config': 0.59.4 + '@unocss/core': 0.59.4 + '@unocss/preset-uno': 0.59.4 cac: 6.7.14 chokidar: 3.6.0 colorette: 2.0.20 consola: 3.2.3 fast-glob: 3.3.2 - magic-string: 0.30.9 + magic-string: 0.30.10 pathe: 1.1.2 perfect-debounce: 1.0.0 transitivePeerDependencies: - rollup dev: true - /@unocss/config@0.59.3: - resolution: {integrity: sha512-40xSskRsPrIDIspE1mVRBW03cGdgwpxCpXltj0xZ3fSutj1L6mcQnswd0AzCdnRyYo623zfuPO1jskvTYuAiMw==} + /@unocss/config@0.59.4: + resolution: {integrity: sha512-h3yhj+D5Ygn5R7gbK4wMrtXZX6FF5DF6YD517sSSb0XB3lxHD9PhhT4HaV1hpHknvu0cMFU3460M45+TN1TI0Q==} engines: {node: '>=14'} dependencies: - '@unocss/core': 0.59.3 + '@unocss/core': 0.59.4 unconfig: 0.3.13 dev: true - /@unocss/core@0.59.3: - resolution: {integrity: sha512-G9+1pmQB65KnGj2tvshcMGYs1aqiaw9FWb8cxMRLvQyquuOU/JdULD9vuuchXQ+DLYPTZ4vgDmMJefBJT6JDVw==} + /@unocss/core@0.59.4: + resolution: {integrity: sha512-bBZ1sgcAtezQVZ1BST9IS3jqcsTLyqKNjiIf7FTnX3DHpfpYuMDFzSOtmkZDzBleOLO/CtcRWjT0HwTSQAmV0A==} dev: true - /@unocss/extractor-arbitrary-variants@0.59.3: - resolution: {integrity: sha512-f0G6bhgqCIIx7KjfhOVpJvJF0fpAhfai3fRYgEcxRrDrf5kpK+CqYxphqBqphBzugiY3YOrYlx7ccPIdypsXQw==} + /@unocss/extractor-arbitrary-variants@0.59.4: + resolution: {integrity: sha512-RDe4FgMGJQ+tp9GLvhPHni7Cc2O0lHBRMElVlN8LoXJAdODMICdbrEPGJlEfrc+7x/QgVFoR895KpYJh3hIgGA==} dependencies: - '@unocss/core': 0.59.3 + '@unocss/core': 0.59.4 dev: true - /@unocss/extractor-svelte@0.59.3: - resolution: {integrity: sha512-cnEgeygN3avKVQY+9FceBFw/NWZzBzbpBoQ59Q3zWZY6bKZG83F66oxectoPJDd/1fzfQcqERe5VZixl88aCYQ==} + /@unocss/extractor-svelte@0.59.4: + resolution: {integrity: sha512-aG6S78hDe216xbccM0dMidkN37+X4p5coytCdK0FbzWRELA2OcGIqNepAI/+foCHojXyGMxJb4D0Xd+oOjP6Ig==} dev: true - /@unocss/inspector@0.59.3: - resolution: {integrity: sha512-f33kQnLnfQSZTecSPe/spOJDNRQYX9DMbXywgMHi8IFu1qaE8dMRloQUWvUPD9sNQ1iR7kEhRtmOT9CQx9vJag==} + /@unocss/inspector@0.59.4: + resolution: {integrity: sha512-QczJFNDiggmekkJyNcbcZIUVwlhvxz7ZwjnSf0w7K4znxfjKkZ1hNUbqLviM1HumkTKOdT27VISW7saN/ysO4w==} dependencies: - '@unocss/core': 0.59.3 - '@unocss/rule-utils': 0.59.3 + '@unocss/core': 0.59.4 + '@unocss/rule-utils': 0.59.4 gzip-size: 6.0.0 sirv: 2.0.4 dev: true - /@unocss/postcss@0.59.3(postcss@8.4.38): - resolution: {integrity: sha512-lyRO8jHDYdAwL/pEdU6uSDfp/pps8pwYQfIh7OZN1BRASPv/ik7HVbRW4bsiMDaBHaxGkrvWATLXQ/W+iBkslw==} + /@unocss/postcss@0.59.4(postcss@8.4.38): + resolution: {integrity: sha512-KVz+AD7McHKp7VEWHbFahhyyVEo0oP/e1vnuNSuPlHthe+1V2zfH6lps+iJcvfL2072r5J+0PvD/1kOp5ryUSg==} engines: {node: '>=14'} peerDependencies: postcss: ^8.4.21 dependencies: - '@unocss/config': 0.59.3 - '@unocss/core': 0.59.3 - '@unocss/rule-utils': 0.59.3 + '@unocss/config': 0.59.4 + '@unocss/core': 0.59.4 + '@unocss/rule-utils': 0.59.4 css-tree: 2.3.1 fast-glob: 3.3.2 - magic-string: 0.30.9 + magic-string: 0.30.10 postcss: 8.4.38 dev: true - /@unocss/preset-attributify@0.59.3: - resolution: {integrity: sha512-WwfMNce44CtOve5H9iUjFYR+c/PjLoFsVztAF9Y2qWzllBK91SSXAA3nHylqpQnf8I+UBdO0TrSV58VyA3kLLg==} + /@unocss/preset-attributify@0.59.4: + resolution: {integrity: sha512-BeogWuYaIakC1gmOZFFCjFVWmu/m3AqEX8UYQS6tY6lAaK2L4Qf4AstYBlT2zAMxy9LNxPDxFQrvfSfFk5Klsg==} dependencies: - '@unocss/core': 0.59.3 + '@unocss/core': 0.59.4 dev: true - /@unocss/preset-icons@0.59.3: - resolution: {integrity: sha512-dY752nMzluvLR7SpWnNWEdppqezje4HRVMfPw1nSnPb6bnra7rippdaQNM9YXNa5xGmrtq4U2xDhgs9yHY1QGA==} + /@unocss/preset-icons@0.59.4: + resolution: {integrity: sha512-Afjwh5oC4KRE8TNZDUkRK6hvvV1wKLrS1e5trniE0B0AM9HK3PBolQaIU7QmzPv6WQrog+MZgIwafg1eqsPUCA==} dependencies: '@iconify/utils': 2.1.23 - '@unocss/core': 0.59.3 + '@unocss/core': 0.59.4 ofetch: 1.3.4 transitivePeerDependencies: - supports-color dev: true - /@unocss/preset-mini@0.59.3: - resolution: {integrity: sha512-cUUNgTh73LmpLU88Ozz1nqXzhN9/8wnJidlkvMYvcbhg0zwr/quPGesRoy0+8W6cD0qvBfJAMnE//yzwR2gjpw==} + /@unocss/preset-mini@0.59.4: + resolution: {integrity: sha512-ZLywGrXi1OCr4My5vX2rLUb5Xgx6ufR9WTQOvpQJGBdIV/jnZn/pyE5avCs476SnOq2K172lnd8mFmTK7/zArA==} dependencies: - '@unocss/core': 0.59.3 - '@unocss/extractor-arbitrary-variants': 0.59.3 - '@unocss/rule-utils': 0.59.3 + '@unocss/core': 0.59.4 + '@unocss/extractor-arbitrary-variants': 0.59.4 + '@unocss/rule-utils': 0.59.4 dev: true - /@unocss/preset-tagify@0.59.3: - resolution: {integrity: sha512-15SJ1zJSuwByxIxLNPX/MSqGpGe3dsObawkl7ducYSVkEK/+a893aGSmbeNsrti4qFe028Im5cYUOdJg/1XiCA==} + /@unocss/preset-tagify@0.59.4: + resolution: {integrity: sha512-vWMdTUoghOSmTbdmZtERssffmdUdOuhh4vUdl0R8Kv6KxB0PkvEFCu2FItn97nRJdSPlZSFxxDkaOIg9w+STNQ==} dependencies: - '@unocss/core': 0.59.3 + '@unocss/core': 0.59.4 dev: true - /@unocss/preset-typography@0.59.3: - resolution: {integrity: sha512-Lh4QWBmy70+9jE811okuJquyq04b96V6s8T2jc8FDadT6LLHnAwck0Zg+o283JB7JTP4Tv956yVy9HYR3igYUQ==} + /@unocss/preset-typography@0.59.4: + resolution: {integrity: sha512-ZX9bxZUqlXK1qEDzO5lkK96ICt9itR/oNyn/7mMc1JPqwj263LumQMn5silocgzoLSUXEeq//L6GylqYjkL8GA==} dependencies: - '@unocss/core': 0.59.3 - '@unocss/preset-mini': 0.59.3 + '@unocss/core': 0.59.4 + '@unocss/preset-mini': 0.59.4 dev: true - /@unocss/preset-uno@0.59.3: - resolution: {integrity: sha512-YDmHW1LDnyzb8eR7F/an7rk1Euit+YIxfAH7PkxNNdGX1+552DK8dKcJMtVdvmfGMChCbLJeyN8oYRat8m245w==} + /@unocss/preset-uno@0.59.4: + resolution: {integrity: sha512-G1f8ZluplvXZ3bERj+sM/8zzY//XD++nNOlAQNKOANSVht3qEoJebrfEiMClNpA5qW5VWOZhEhPkh0M7GsXtnA==} dependencies: - '@unocss/core': 0.59.3 - '@unocss/preset-mini': 0.59.3 - '@unocss/preset-wind': 0.59.3 - '@unocss/rule-utils': 0.59.3 + '@unocss/core': 0.59.4 + '@unocss/preset-mini': 0.59.4 + '@unocss/preset-wind': 0.59.4 + '@unocss/rule-utils': 0.59.4 dev: true - /@unocss/preset-web-fonts@0.59.3: - resolution: {integrity: sha512-pq29j+FkmY9OoQItypekOFKMEfN+9Vfv310thbHJ4tu/pD0X+KUvWya9hc2AOzY+5Dg79Ws/p2B5gZIZ9hY2aA==} + /@unocss/preset-web-fonts@0.59.4: + resolution: {integrity: sha512-ehutTjKHnf2KPmdatN42N9a8+y+glKSU3UlcBRNsVIIXVIlaBQuPVGZSPhnMtrKD17IgWylXq2K6RJK+ab0hZA==} dependencies: - '@unocss/core': 0.59.3 + '@unocss/core': 0.59.4 ofetch: 1.3.4 dev: true - /@unocss/preset-wind@0.59.3: - resolution: {integrity: sha512-yODaBxsZOGmEcxUcNu2g8J2ffya8B2YpZQmqN/Ock13QgwREEumn3oqCLIrkGkYN6Q/SELBS6C66RL1GFjjtqA==} + /@unocss/preset-wind@0.59.4: + resolution: {integrity: sha512-CNX6w0ZpSQg/i1oF0/WKWzto8PtLqoknC5h8JmmcGb7VsyBQeV0oNnhbURxpbuMEhbv1MWVIGvk8a+P6y0rFkQ==} dependencies: - '@unocss/core': 0.59.3 - '@unocss/preset-mini': 0.59.3 - '@unocss/rule-utils': 0.59.3 + '@unocss/core': 0.59.4 + '@unocss/preset-mini': 0.59.4 + '@unocss/rule-utils': 0.59.4 dev: true - /@unocss/reset@0.59.3: - resolution: {integrity: sha512-4m2p/TcOamf17w4b8w6YIx9p1VP3BPiMQ4WUx2FvsgQz7G3/w+FJEEQ0xoc2FIJ0UBggr9UJmrs2Y7SQ9Gmukg==} + /@unocss/reset@0.59.4: + resolution: {integrity: sha512-Upy4xzdWl4RChbLAXBq1BoR4WqxXMoIfjvtcwSZcZK2sylXCFAseSWnyzJFdSiXPqNfmMuNgPXgiSxiQB+cmNA==} dev: true - /@unocss/rule-utils@0.59.3: - resolution: {integrity: sha512-8FxGnnjvhYvit0L2wqIGOMSYBHKLoivpbwClgRSWTEpoxeJxgbULZO36VJ84Qe4rXtdUF7ZPB76k6SWLycsoLA==} + /@unocss/rule-utils@0.59.4: + resolution: {integrity: sha512-1qoLJlBWAkS4D4sg73990S1MT7E8E5md/YhopKjTQuEC9SyeVmEg+5pR/Xd8xhPKMqbcuBPl/DS8b6l/GQO56A==} engines: {node: '>=14'} dependencies: - '@unocss/core': 0.59.3 - magic-string: 0.30.9 + '@unocss/core': 0.59.4 + magic-string: 0.30.10 dev: true - /@unocss/scope@0.59.3: - resolution: {integrity: sha512-YHEtKLsgSNKzES8yiqef9qFJU1sXEGEUPKyw/Jt9WNIhNyDHJuJsPNhlkR6I3VTViu7jFknbK2dnLLHkp+LdNQ==} + /@unocss/scope@0.59.4: + resolution: {integrity: sha512-wBQJ39kw4Tfj4km7AoGvSIobPKVnRZVsgc0bema5Y0PL3g1NeVQ/LopBI2zEJWdpxGXUWxSDsXm7BZo6qVlD/A==} dev: true - /@unocss/transformer-attributify-jsx-babel@0.59.3: - resolution: {integrity: sha512-LH+PPnRJ3ex7ZAI2zmALo0xPU0TEsJV0upsbeA8yx4xjmdka2iwlSKCw5XZtIxVHUvbC+75myeMLSDK51oMxTw==} + /@unocss/transformer-attributify-jsx-babel@0.59.4: + resolution: {integrity: sha512-xtCRSgeTaDBiNJLVX7oOSFe63JiFB5nrdK23PHn3IlZM9O7Bxx4ZxI3MQJtFZFQNE+INFko+DVyY1WiFEm1p/Q==} dependencies: '@babel/core': 7.24.4 '@babel/plugin-syntax-jsx': 7.24.1(@babel/core@7.24.4) '@babel/preset-typescript': 7.24.1(@babel/core@7.24.4) - '@unocss/core': 0.59.3 + '@unocss/core': 0.59.4 transitivePeerDependencies: - supports-color dev: true - /@unocss/transformer-attributify-jsx@0.59.3: - resolution: {integrity: sha512-XTBZV2UfOKrAKxEsy34tty5wh38//sDtA/OXztMTpkrP+eJwtVfUPez/ZKADOO+8rcQXSt9eaF4bDzn5kbBEKA==} + /@unocss/transformer-attributify-jsx@0.59.4: + resolution: {integrity: sha512-m4b83utzKMfUQH/45V2QkjJoXd8Tu2pRP1nic91Xf7QRceyKDD+BxoTneo2JNC2K274cQu7HqqotnCm2aFfEGw==} dependencies: - '@unocss/core': 0.59.3 + '@unocss/core': 0.59.4 dev: true - /@unocss/transformer-compile-class@0.59.3: - resolution: {integrity: sha512-kaem8PdLiKx6fU8cOUurbD8/BV1qJC3yoc5jptQ7QjqPzl+zFHABwt9wpOQXmgOQsiZc1wilSBQ5HO0139jXpg==} + /@unocss/transformer-compile-class@0.59.4: + resolution: {integrity: sha512-Vgk2OCLPW0pU+Uzr1IgDtHVspSBb+gPrQFkV+5gxHk9ZdKi3oYKxLuufVWYDSwv7o9yfQGbYrMH9YLsjRsnA7Q==} dependencies: - '@unocss/core': 0.59.3 + '@unocss/core': 0.59.4 dev: true - /@unocss/transformer-directives@0.59.3: - resolution: {integrity: sha512-Bu2uK4+CIFurOYrFl/Gw03p075d3ATVmLrbM8sBDNfOYfiVWrrizO9J1HfN9/Yu9l3KVPXRfqxOvOWBBl3Jjbg==} + /@unocss/transformer-directives@0.59.4: + resolution: {integrity: sha512-nXUTEclUbs0vQ4KfLhKt4J/5SLSEq1az2FNlJmiXMmqmn75X89OrtCu2OJu9sGXhn+YyBApxgcSSdxmtpqMi1Q==} dependencies: - '@unocss/core': 0.59.3 - '@unocss/rule-utils': 0.59.3 + '@unocss/core': 0.59.4 + '@unocss/rule-utils': 0.59.4 css-tree: 2.3.1 dev: true - /@unocss/transformer-variant-group@0.59.3: - resolution: {integrity: sha512-n0AIY8GFpAxi/xd0RG49xKzRajZaiAmvD0b6WPOoEsB6dLJF7m97G4yhlmvyM7S26LUdqdtbLuE+XajiRDMyoQ==} + /@unocss/transformer-variant-group@0.59.4: + resolution: {integrity: sha512-9XLixxn1NRgP62Kj4R/NC/rpqhql5F2s6ulJ8CAMTEbd/NylVhEANluPGDVUGcLJ4cj6E02hFa8C1PLGSm7/xw==} dependencies: - '@unocss/core': 0.59.3 + '@unocss/core': 0.59.4 dev: true - /@unocss/vite@0.59.3(rollup@4.14.3)(vite@5.2.9): - resolution: {integrity: sha512-+K4kSEt3BvJfYlc8Tg3nmF53i14+OUTIasnzwUQF4JCF+B47jd47IVbNBm2izhTA5OrmZ+1xXBjHR7cXgDjDhg==} + /@unocss/vite@0.59.4(rollup@4.17.2)(vite@5.2.11): + resolution: {integrity: sha512-q7GN7vkQYn79n7vYIUlaa7gXGwc7pk0Qo3z3ZFwWGE43/DtZnn2Hwl5UjgBAgi9McA+xqHJEHRsJnI7HJPHUYA==} peerDependencies: vite: ^2.9.0 || ^3.0.0-0 || ^4.0.0 || ^5.0.0-0 dependencies: '@ampproject/remapping': 2.3.0 - '@rollup/pluginutils': 5.1.0(rollup@4.14.3) - '@unocss/config': 0.59.3 - '@unocss/core': 0.59.3 - '@unocss/inspector': 0.59.3 - '@unocss/scope': 0.59.3 - '@unocss/transformer-directives': 0.59.3 + '@rollup/pluginutils': 5.1.0(rollup@4.17.2) + '@unocss/config': 0.59.4 + '@unocss/core': 0.59.4 + '@unocss/inspector': 0.59.4 + '@unocss/scope': 0.59.4 + '@unocss/transformer-directives': 0.59.4 chokidar: 3.6.0 fast-glob: 3.3.2 - magic-string: 0.30.9 - vite: 5.2.9 + magic-string: 0.30.10 + vite: 5.2.11 transitivePeerDependencies: - rollup dev: true - /@zerodevx/svelte-json-view@1.0.9(svelte@4.2.14): + /@zerodevx/svelte-json-view@1.0.9(svelte@4.2.16): resolution: {integrity: sha512-2KKxBfDxEo7lM/kJSy+m1PdLAp5Q9c5nB6OYVBg7oWPdCLXB9JVH1Ytxn2hkqTn77m9MobqGI1fz9FFOTPONfA==} peerDependencies: svelte: ^3.57.0 || ^4.0.0 dependencies: - svelte: 4.2.14 + svelte: 4.2.16 dev: false /acorn-jsx@5.3.2(acorn@8.11.3): @@ -2372,8 +2089,8 @@ packages: resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} dev: true - /binary-extensions@2.2.0: - resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==} + /binary-extensions@2.3.0: + resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==} engines: {node: '>=8'} dev: true @@ -2409,15 +2126,15 @@ packages: resolution: {integrity: sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==} dev: true - /browserslist@4.22.2: - resolution: {integrity: sha512-0UgcrvQmBDvZHFGdYUehrCNIazki7/lUP3kkoi/r3YB2amZbFM9J43ZRkJTXBUZK4gmx56+Sqk9+Vs9mwZx9+A==} + /browserslist@4.23.0: + resolution: {integrity: sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true dependencies: - caniuse-lite: 1.0.30001566 - electron-to-chromium: 1.4.605 + caniuse-lite: 1.0.30001611 + electron-to-chromium: 1.4.740 node-releases: 2.0.14 - update-browserslist-db: 1.0.13(browserslist@4.22.2) + update-browserslist-db: 1.0.13(browserslist@4.23.0) dev: true /buffer-from@1.1.2: @@ -2459,8 +2176,8 @@ packages: engines: {node: '>=10'} dev: true - /caniuse-lite@1.0.30001566: - resolution: {integrity: sha512-ggIhCsTxmITBAMmK8yZjEhCO5/47jKXPu6Dha/wuCS4JePVL+3uiDEBuhu2aIoT+bqTOR8L76Ip1ARL9xYsEJA==} + /caniuse-lite@1.0.30001611: + resolution: {integrity: sha512-19NuN1/3PjA3QI8Eki55N8my4LzfkMCRLgCVfrl/slbSAchQfV0+GwjPrK3rq37As4UCLlM/DHajbKkAqbv92Q==} dev: true /chalk@2.4.2: @@ -2631,6 +2348,10 @@ packages: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} dev: true + /confbox@0.1.7: + resolution: {integrity: sha512-uJcB/FKZtBMCJpK8MQji6bJHgu1tixKPxRLeGkNzBoOZzpnZUJm0jm2/sBDWcuBx1dYgxV4JU+g5hmNxCyAmdA==} + dev: true + /consola@3.2.3: resolution: {integrity: sha512-I5qxpzLv+sJhTVEoLYNcTW+bThDCPsit0vLNKShZx6rLtpilNpmmeTPaeqJb9ZE9dV3DGaeby6Vuhrw38WjeyQ==} engines: {node: ^14.18.0 || >=16.10.0} @@ -2818,8 +2539,8 @@ packages: - mocha dev: true - /electron-to-chromium@1.4.605: - resolution: {integrity: sha512-V52j+P5z6cdRqTjPR/bYNxx7ETCHIkm5VIGuyCy3CMrfSnbEpIlLnk5oHmZo7gYvDfh2TfHeanB6rawyQ23ktg==} + /electron-to-chromium@1.4.740: + resolution: {integrity: sha512-Yvg5i+iyv7Xm18BRdVPVm8lc7kgxM3r6iwqCH2zB7QZy1kZRNmd0Zqm0zcD9XoFREE5/5rwIuIAOT+/mzGcnZg==} dev: true /emoji-regex@8.0.0: @@ -2958,51 +2679,34 @@ packages: eslint: 8.57.0 dev: true - /eslint-config-prettier@9.1.0(eslint@8.57.0): - resolution: {integrity: sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==} - hasBin: true - peerDependencies: - eslint: '>=7.0.0' - dependencies: - eslint: 8.57.0 - dev: true - - /eslint-config-standard-with-typescript@43.0.1(@typescript-eslint/eslint-plugin@7.7.0)(eslint-plugin-import@2.29.1)(eslint-plugin-n@17.2.1)(eslint-plugin-promise@6.1.1)(eslint@8.57.0)(typescript@5.4.5): - resolution: {integrity: sha512-WfZ986+qzIzX6dcr4yGUyVb/l9N3Z8wPXCc5z/70fljs3UbWhhV+WxrfgsqMToRzuuyX9MqZ974pq2UPhDTOcA==} - deprecated: Please use eslint-config-love, instead. + /eslint-config-love@47.0.0(@typescript-eslint/eslint-plugin@7.8.0)(eslint-plugin-import@2.29.1)(eslint-plugin-n@17.5.1)(eslint-plugin-promise@6.1.1)(eslint@8.57.0)(typescript@5.4.5): + resolution: {integrity: sha512-wIeJhb4/NF7nE5Ltppg1e9dp1Auxx0+ZPRysrXQ3uBKlW4Nj/UiTZu4r3sKWCxo6HGcRcI4MC1Q5421y3fny2w==} peerDependencies: - '@typescript-eslint/eslint-plugin': ^6.4.0 + '@typescript-eslint/eslint-plugin': ^7.0.1 eslint: ^8.0.1 eslint-plugin-import: ^2.25.2 eslint-plugin-n: '^15.0.0 || ^16.0.0 ' eslint-plugin-promise: ^6.0.0 typescript: '*' dependencies: - '@typescript-eslint/eslint-plugin': 7.7.0(@typescript-eslint/parser@7.7.0)(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/parser': 6.20.0(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/eslint-plugin': 7.8.0(@typescript-eslint/parser@7.8.0)(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/parser': 7.8.0(eslint@8.57.0)(typescript@5.4.5) eslint: 8.57.0 - eslint-config-standard: 17.1.0(eslint-plugin-import@2.29.1)(eslint-plugin-n@17.2.1)(eslint-plugin-promise@6.1.1)(eslint@8.57.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.7.0)(eslint@8.57.0) - eslint-plugin-n: 17.2.1(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.8.0)(eslint@8.57.0) + eslint-plugin-n: 17.5.1(eslint@8.57.0) eslint-plugin-promise: 6.1.1(eslint@8.57.0) typescript: 5.4.5 transitivePeerDependencies: - supports-color dev: true - /eslint-config-standard@17.1.0(eslint-plugin-import@2.29.1)(eslint-plugin-n@17.2.1)(eslint-plugin-promise@6.1.1)(eslint@8.57.0): - resolution: {integrity: sha512-IwHwmaBNtDK4zDHQukFDW5u/aTb8+meQWZvNFWkiGmbWjD6bqyuSSBxxXKkCftCUzc1zwCH2m/baCNDLGmuO5Q==} - engines: {node: '>=12.0.0'} + /eslint-config-prettier@9.1.0(eslint@8.57.0): + resolution: {integrity: sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==} + hasBin: true peerDependencies: - eslint: ^8.0.1 - eslint-plugin-import: ^2.25.2 - eslint-plugin-n: '^15.0.0 || ^16.0.0 ' - eslint-plugin-promise: ^6.0.0 + eslint: '>=7.0.0' dependencies: eslint: 8.57.0 - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.7.0)(eslint@8.57.0) - eslint-plugin-n: 17.2.1(eslint@8.57.0) - eslint-plugin-promise: 6.1.1(eslint@8.57.0) dev: true /eslint-import-resolver-node@0.3.9: @@ -3015,7 +2719,7 @@ packages: - supports-color dev: true - /eslint-module-utils@2.8.0(@typescript-eslint/parser@7.7.0)(eslint-import-resolver-node@0.3.9)(eslint@8.57.0): + /eslint-module-utils@2.8.0(@typescript-eslint/parser@7.8.0)(eslint-import-resolver-node@0.3.9)(eslint@8.57.0): resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==} engines: {node: '>=4'} peerDependencies: @@ -3036,7 +2740,7 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 7.7.0(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/parser': 7.8.0(eslint@8.57.0)(typescript@5.4.5) debug: 3.2.7 eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 @@ -3056,7 +2760,7 @@ packages: eslint-compat-utils: 0.1.2(eslint@8.57.0) dev: true - /eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.7.0)(eslint@8.57.0): + /eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.8.0)(eslint@8.57.0): resolution: {integrity: sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==} engines: {node: '>=4'} peerDependencies: @@ -3066,7 +2770,7 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 7.7.0(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/parser': 7.8.0(eslint@8.57.0)(typescript@5.4.5) array-includes: 3.1.7 array.prototype.findlastindex: 1.2.3 array.prototype.flat: 1.3.2 @@ -3075,7 +2779,7 @@ packages: doctrine: 2.1.0 eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@7.7.0)(eslint-import-resolver-node@0.3.9)(eslint@8.57.0) + eslint-module-utils: 2.8.0(@typescript-eslint/parser@7.8.0)(eslint-import-resolver-node@0.3.9)(eslint@8.57.0) hasown: 2.0.0 is-core-module: 2.13.1 is-glob: 4.0.3 @@ -3083,7 +2787,7 @@ packages: object.fromentries: 2.0.7 object.groupby: 1.0.1 object.values: 1.1.7 - semver: 7.5.4 + semver: 7.6.0 tsconfig-paths: 3.15.0 transitivePeerDependencies: - eslint-import-resolver-typescript @@ -3091,8 +2795,8 @@ packages: - supports-color dev: true - /eslint-plugin-n@17.2.1(eslint@8.57.0): - resolution: {integrity: sha512-uW1+df2bo06kR7ix6nB614RUlvjRPrYxlaX832O6e1MCJp4V7YozEdvMgCYuvn4ltnjPu1FVYhQ2KRrmTNoJfg==} + /eslint-plugin-n@17.5.1(eslint@8.57.0): + resolution: {integrity: sha512-+E242KoY16xtwqqBRgSsDCrZ3K40jg3Np9fOgQyakcHaqymK3bnxYB1F1oe8Ksts8TDDViROFgraoLzbWhfHVw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: '>=8.23.0' @@ -3102,10 +2806,10 @@ packages: eslint: 8.57.0 eslint-plugin-es-x: 7.5.0(eslint@8.57.0) get-tsconfig: 4.7.2 - globals: 14.0.0 + globals: 15.0.0 ignore: 5.3.1 minimatch: 9.0.4 - semver: 7.5.4 + semver: 7.6.0 dev: true /eslint-plugin-promise@6.1.1(eslint@8.57.0): @@ -3297,8 +3001,8 @@ packages: resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} dev: true - /fastq@1.15.0: - resolution: {integrity: sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==} + /fastq@1.17.1: + resolution: {integrity: sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==} dependencies: reusify: 1.0.4 dev: true @@ -3488,8 +3192,8 @@ packages: type-fest: 0.20.2 dev: true - /globals@14.0.0: - resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} + /globals@15.0.0: + resolution: {integrity: sha512-m/C/yR4mjO6pXDTm9/R/SpYTAIyaUB4EOzcaaMEl7mds7Mshct9GfejiJNQGjHHbdMPey13Kpu4TMbYi9ex1pw==} engines: {node: '>=18'} dev: true @@ -3711,7 +3415,7 @@ packages: resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} engines: {node: '>=8'} dependencies: - binary-extensions: 2.2.0 + binary-extensions: 2.3.0 dev: true /is-boolean-object@1.1.2: @@ -3942,10 +3646,6 @@ packages: hasBin: true dev: true - /jsonc-parser@3.2.0: - resolution: {integrity: sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==} - dev: true - /keyv@4.5.4: resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} dependencies: @@ -3974,7 +3674,7 @@ packages: engines: {node: '>=14'} dependencies: mlly: 1.6.1 - pkg-types: 1.0.3 + pkg-types: 1.1.0 dev: true /locate-character@3.0.0: @@ -4020,9 +3720,8 @@ packages: yallist: 4.0.0 dev: true - /magic-string@0.30.9: - resolution: {integrity: sha512-S1+hd+dIrC8EZqKyT9DstTH/0Z+f76kmmvZnkfQVmOpDEF9iVgdYif3Q/pIWHmCoo59bQVGW0kVL3e2nl+9+Sw==} - engines: {node: '>=12'} + /magic-string@0.30.10: + resolution: {integrity: sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==} dependencies: '@jridgewell/sourcemap-codec': 1.4.15 @@ -4117,13 +3816,6 @@ packages: brace-expansion: 2.0.1 dev: true - /minimatch@9.0.3: - resolution: {integrity: sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==} - engines: {node: '>=16 || 14 >=14.17'} - dependencies: - brace-expansion: 2.0.1 - dev: true - /minimatch@9.0.4: resolution: {integrity: sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==} engines: {node: '>=16 || 14 >=14.17'} @@ -4140,7 +3832,7 @@ packages: dependencies: acorn: 8.11.3 pathe: 1.1.2 - pkg-types: 1.0.3 + pkg-types: 1.1.0 ufo: 1.5.3 dev: true @@ -4440,10 +4132,10 @@ packages: engines: {node: '>=8.6'} dev: true - /pkg-types@1.0.3: - resolution: {integrity: sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A==} + /pkg-types@1.1.0: + resolution: {integrity: sha512-/RpmvKdxKf8uILTtoOhAgf30wYbP2Qw+L9p3Rvshx1JZVX+XQNZQFjlbmGHEGIm4CkVPlSn+NXmIM8+9oWQaSA==} dependencies: - jsonc-parser: 3.2.0 + confbox: 0.1.7 mlly: 1.6.1 pathe: 1.1.2 dev: true @@ -4582,29 +4274,29 @@ packages: glob: 7.2.3 dev: true - /rollup@4.14.3: - resolution: {integrity: sha512-ag5tTQKYsj1bhrFC9+OEWqb5O6VYgtQDO9hPDBMmIbePwhfSr+ExlcU741t8Dhw5DkPCQf6noz0jb36D6W9/hw==} + /rollup@4.17.2: + resolution: {integrity: sha512-/9ClTJPByC0U4zNLowV1tMBe8yMEAxewtR3cUNX5BoEpGH3dQEWpJLr6CLp0fPdYRF/fzVOgvDb1zXuakwF5kQ==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true dependencies: '@types/estree': 1.0.5 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.14.3 - '@rollup/rollup-android-arm64': 4.14.3 - '@rollup/rollup-darwin-arm64': 4.14.3 - '@rollup/rollup-darwin-x64': 4.14.3 - '@rollup/rollup-linux-arm-gnueabihf': 4.14.3 - '@rollup/rollup-linux-arm-musleabihf': 4.14.3 - '@rollup/rollup-linux-arm64-gnu': 4.14.3 - '@rollup/rollup-linux-arm64-musl': 4.14.3 - '@rollup/rollup-linux-powerpc64le-gnu': 4.14.3 - '@rollup/rollup-linux-riscv64-gnu': 4.14.3 - '@rollup/rollup-linux-s390x-gnu': 4.14.3 - '@rollup/rollup-linux-x64-gnu': 4.14.3 - '@rollup/rollup-linux-x64-musl': 4.14.3 - '@rollup/rollup-win32-arm64-msvc': 4.14.3 - '@rollup/rollup-win32-ia32-msvc': 4.14.3 - '@rollup/rollup-win32-x64-msvc': 4.14.3 + '@rollup/rollup-android-arm-eabi': 4.17.2 + '@rollup/rollup-android-arm64': 4.17.2 + '@rollup/rollup-darwin-arm64': 4.17.2 + '@rollup/rollup-darwin-x64': 4.17.2 + '@rollup/rollup-linux-arm-gnueabihf': 4.17.2 + '@rollup/rollup-linux-arm-musleabihf': 4.17.2 + '@rollup/rollup-linux-arm64-gnu': 4.17.2 + '@rollup/rollup-linux-arm64-musl': 4.17.2 + '@rollup/rollup-linux-powerpc64le-gnu': 4.17.2 + '@rollup/rollup-linux-riscv64-gnu': 4.17.2 + '@rollup/rollup-linux-s390x-gnu': 4.17.2 + '@rollup/rollup-linux-x64-gnu': 4.17.2 + '@rollup/rollup-linux-x64-musl': 4.17.2 + '@rollup/rollup-win32-arm64-msvc': 4.17.2 + '@rollup/rollup-win32-ia32-msvc': 4.17.2 + '@rollup/rollup-win32-x64-msvc': 4.17.2 fsevents: 2.3.3 dev: true @@ -4657,8 +4349,8 @@ packages: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} dev: true - /semver@7.5.4: - resolution: {integrity: sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==} + /semver@7.6.0: + resolution: {integrity: sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==} engines: {node: '>=10'} hasBin: true dependencies: @@ -4871,17 +4563,17 @@ packages: engines: {node: '>= 0.4'} dev: true - /svelte-hmr@0.16.0(svelte@4.2.14): + /svelte-hmr@0.16.0(svelte@4.2.16): resolution: {integrity: sha512-Gyc7cOS3VJzLlfj7wKS0ZnzDVdv3Pn2IuVeJPk9m2skfhcu5bq3wtIZyQGggr7/Iim5rH5cncyQft/kRLupcnA==} engines: {node: ^12.20 || ^14.13.1 || >= 16} peerDependencies: svelte: ^3.19.0 || ^4.0.0 dependencies: - svelte: 4.2.14 + svelte: 4.2.16 dev: true - /svelte@4.2.14: - resolution: {integrity: sha512-ry3+YlWqZpHxLy45MW4MZIxNdvB+Wl7p2nnstWKbOAewaJyNJuOtivSbRChcfIej6wFBjWqyKmf/NgK1uW2JAA==} + /svelte@4.2.16: + resolution: {integrity: sha512-mQwHpqHD2PmFcCyHaZ7XiTqposaLvJ75WpYcyY5/ce3qxbYtwQpZ+M7ZKP+2CG5U6kfnBZBpPLyofhlE6ROrnQ==} engines: {node: '>=16'} dependencies: '@ampproject/remapping': 2.3.0 @@ -4896,7 +4588,7 @@ packages: estree-walker: 3.0.3 is-reference: 3.0.2 locate-character: 3.0.0 - magic-string: 0.30.9 + magic-string: 0.30.10 periscopic: 3.1.0 /tapable@2.2.1: @@ -5089,11 +4781,11 @@ packages: '@types/unist': 2.0.10 dev: true - /unocss@0.59.3(postcss@8.4.38)(rollup@4.14.3)(vite@5.2.9): - resolution: {integrity: sha512-4Sos0FjDX5Ck/cV1wrTase0r2V/LI/bIncguisIGq9v7/akghsGEqU8LlxZNqoCug/vpcQICmzt/zclJVUT+GQ==} + /unocss@0.59.4(postcss@8.4.38)(rollup@4.17.2)(vite@5.2.11): + resolution: {integrity: sha512-QmCVjRObvVu/gsGrJGVt0NnrdhFFn314BUZn2WQyXV9rIvHLRmG5bIu0j5vibJkj7ZhFchTrnTM1pTFXP1xt5g==} engines: {node: '>=14'} peerDependencies: - '@unocss/webpack': 0.59.3 + '@unocss/webpack': 0.59.4 vite: ^2.9.0 || ^3.0.0-0 || ^4.0.0 || ^5.0.0-0 peerDependenciesMeta: '@unocss/webpack': @@ -5101,40 +4793,40 @@ packages: vite: optional: true dependencies: - '@unocss/astro': 0.59.3(rollup@4.14.3)(vite@5.2.9) - '@unocss/cli': 0.59.3(rollup@4.14.3) - '@unocss/core': 0.59.3 - '@unocss/extractor-arbitrary-variants': 0.59.3 - '@unocss/postcss': 0.59.3(postcss@8.4.38) - '@unocss/preset-attributify': 0.59.3 - '@unocss/preset-icons': 0.59.3 - '@unocss/preset-mini': 0.59.3 - '@unocss/preset-tagify': 0.59.3 - '@unocss/preset-typography': 0.59.3 - '@unocss/preset-uno': 0.59.3 - '@unocss/preset-web-fonts': 0.59.3 - '@unocss/preset-wind': 0.59.3 - '@unocss/reset': 0.59.3 - '@unocss/transformer-attributify-jsx': 0.59.3 - '@unocss/transformer-attributify-jsx-babel': 0.59.3 - '@unocss/transformer-compile-class': 0.59.3 - '@unocss/transformer-directives': 0.59.3 - '@unocss/transformer-variant-group': 0.59.3 - '@unocss/vite': 0.59.3(rollup@4.14.3)(vite@5.2.9) - vite: 5.2.9 + '@unocss/astro': 0.59.4(rollup@4.17.2)(vite@5.2.11) + '@unocss/cli': 0.59.4(rollup@4.17.2) + '@unocss/core': 0.59.4 + '@unocss/extractor-arbitrary-variants': 0.59.4 + '@unocss/postcss': 0.59.4(postcss@8.4.38) + '@unocss/preset-attributify': 0.59.4 + '@unocss/preset-icons': 0.59.4 + '@unocss/preset-mini': 0.59.4 + '@unocss/preset-tagify': 0.59.4 + '@unocss/preset-typography': 0.59.4 + '@unocss/preset-uno': 0.59.4 + '@unocss/preset-web-fonts': 0.59.4 + '@unocss/preset-wind': 0.59.4 + '@unocss/reset': 0.59.4 + '@unocss/transformer-attributify-jsx': 0.59.4 + '@unocss/transformer-attributify-jsx-babel': 0.59.4 + '@unocss/transformer-compile-class': 0.59.4 + '@unocss/transformer-directives': 0.59.4 + '@unocss/transformer-variant-group': 0.59.4 + '@unocss/vite': 0.59.4(rollup@4.17.2)(vite@5.2.11) + vite: 5.2.11 transitivePeerDependencies: - postcss - rollup - supports-color dev: true - /update-browserslist-db@1.0.13(browserslist@4.22.2): + /update-browserslist-db@1.0.13(browserslist@4.23.0): resolution: {integrity: sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==} hasBin: true peerDependencies: browserslist: '>= 4.21.0' dependencies: - browserslist: 4.22.2 + browserslist: 4.23.0 escalade: 3.1.2 picocolors: 1.0.0 dev: true @@ -5165,8 +4857,8 @@ packages: vfile-message: 2.0.4 dev: true - /vite@5.2.9: - resolution: {integrity: sha512-uOQWfuZBlc6Y3W/DTuQ1Sr+oIXWvqljLvS881SVmAj00d5RdgShLcuXWxseWPd4HXwiYBFW/vXHfKFeqj9uQnw==} + /vite@5.2.11: + resolution: {integrity: sha512-HndV31LWW05i1BLPMUCE1B9E9GFbOu1MbenhS58FuK6owSO5qHm7GiCotrNY1YE5rMeQSFBGmT5ZaLEjFizgiQ==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: @@ -5195,12 +4887,12 @@ packages: dependencies: esbuild: 0.20.2 postcss: 8.4.38 - rollup: 4.14.3 + rollup: 4.17.2 optionalDependencies: fsevents: 2.3.3 dev: true - /vitefu@0.2.5(vite@5.2.9): + /vitefu@0.2.5(vite@5.2.11): resolution: {integrity: sha512-SgHtMLoqaeeGnd2evZ849ZbACbnwQCIwRH57t18FxcXoZop0uQu0uzlIhJBlF/eWVzuce0sHeqPcDo+evVcg8Q==} peerDependencies: vite: ^3.0.0 || ^4.0.0 || ^5.0.0 @@ -5208,7 +4900,7 @@ packages: vite: optional: true dependencies: - vite: 5.2.9 + vite: 5.2.11 dev: true /wcwidth@1.0.1: diff --git a/renovate.json b/renovate.json index 43f4e81a2..1775faa08 100644 --- a/renovate.json +++ b/renovate.json @@ -2,6 +2,7 @@ "extends": ["config:base"], "enabledManagers": ["cargo", "npm"], "semanticCommitType": "chore", + "labels": ["dependencies"], "ignorePaths": [ "**/node_modules/**", "**/bower_components/**", @@ -17,6 +18,25 @@ "matchPackageNames": ["node", "pnpm"], "matchDepTypes": ["engines", "packageManager"], "enabled": false + }, + { + "description": "Prevent unwanted minor/patch Cargo.toml updates", + "matchManagers": ["cargo"], + "rangeStrategy": "update-lockfile" + }, + { + "description": "Prevent spammy minor/patch Cargo.lock updates", + "matchManagers": ["cargo"], + "matchUpdateTypes": ["minor", "patch"], + "matchCurrentVersion": "!/^0/", + "enabled": false + }, + { + "description": "Prevent spammy patch Cargo.lock updates for 0.x deps", + "matchManagers": ["cargo"], + "matchUpdateTypes": ["patch"], + "matchCurrentVersion": "/^0/", + "enabled": false } ], "postUpdateOptions": ["pnpmDedupe"] diff --git a/shared/template/package.json b/shared/template/package.json index bd5a2ff60..9e42fac93 100644 --- a/shared/template/package.json +++ b/shared/template/package.json @@ -23,6 +23,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-beta.6" + "@tauri-apps/api": "2.0.0-beta.11" } }