diff --git a/.changes/dialog-linux-freeze.md b/.changes/dialog-linux-freeze.md new file mode 100644 index 00000000..5b9be9f9 --- /dev/null +++ b/.changes/dialog-linux-freeze.md @@ -0,0 +1,5 @@ +--- +"dialog": "patch" +--- + +Fixed an issue where dialogs would not spawn but instead freeze the whole app. diff --git a/.changes/enhance-http-scope.md b/.changes/enhance-http-scope.md new file mode 100644 index 00000000..791bf176 --- /dev/null +++ b/.changes/enhance-http-scope.md @@ -0,0 +1,5 @@ +--- +"http": patch +--- + +The scope URL now follows the URL pattern standard instead of a simple glob pattern. diff --git a/.changes/file-autogen-fix.md b/.changes/file-autogen-fix.md new file mode 100644 index 00000000..0a870509 --- /dev/null +++ b/.changes/file-autogen-fix.md @@ -0,0 +1,6 @@ +--- +"fs": patch +"fs-js": patch +--- + +Fix infinite loop on cargo build operations \ No newline at end of file diff --git a/.changes/pre.json b/.changes/pre.json index f9896471..b7b5906e 100644 --- a/.changes/pre.json +++ b/.changes/pre.json @@ -2,8 +2,18 @@ "tag": "beta", "changes": [ ".changes/beta.md", + ".changes/clipboard-html.md", + ".changes/dialog-can-create-directories.md", + ".changes/dialog-linux-freeze.md", + ".changes/enhance-http-scope.md", + ".changes/file-autogen-fix.md", + ".changes/fix-shutdown-timing.md", ".changes/fix-zbus-import.md", + ".changes/http-user-agent.md", ".changes/msrv-1.75.md", - ".changes/tauri-beta-4.md" + ".changes/shell-shellexcute.md", + ".changes/tauri-beta-4.md", + ".changes/tauri-beta-8.md", + ".changes/tauri-beta-9.md" ] } diff --git a/.changes/tauri-beta-9.md b/.changes/tauri-beta-9.md new file mode 100644 index 00000000..cad2b115 --- /dev/null +++ b/.changes/tauri-beta-9.md @@ -0,0 +1,7 @@ +--- +"fs": patch +"http": patch +"shell": patch +--- + +Update to tauri beta.9. diff --git a/Cargo.lock b/Cargo.lock index ca97ee3b..59c41093 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -626,6 +626,12 @@ version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" +[[package]] +name = "base64" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9475866fec1451be56a3c2400fd081ff546538961565ccb5b7142cbd22bc7a51" + [[package]] name = "base64ct" version = "1.6.0" @@ -1659,7 +1665,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412" dependencies = [ - "libloading 0.7.4", + "libloading 0.8.1", ] [[package]] @@ -3534,9 +3540,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.20" +version = "0.4.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" dependencies = [ "value-bag", ] @@ -6261,9 +6267,9 @@ checksum = "69758bda2e78f098e4ccb393021a0963bb3442eac05f135c30f61b7370bbafae" [[package]] name = "tauri" -version = "2.0.0-beta.8" +version = "2.0.0-beta.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2bd3d5ccf5316833c0f71c645c25585bddf997a16bea652bf3eab8114273cff" +checksum = "353a521566bd41164a05887f40fe93b375c82b82000726f63c66237955dfb4f5" dependencies = [ "anyhow", "bytes", @@ -6294,7 +6300,6 @@ dependencies = [ "serde_repr", "serialize-to-javascript", "state", - "static_assertions", "swift-rs", "tauri-build", "tauri-macros", @@ -6314,9 +6319,9 @@ dependencies = [ [[package]] name = "tauri-build" -version = "2.0.0-beta.6" +version = "2.0.0-beta.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ca30dbed856449b41abed13a5a46655ea2196075e09e99e22fe8ed0958b6aee" +checksum = "50887f06d343b6ede0260d29abb4edd57f40d8aac538f6e34d801c9a4fa1c6b8" dependencies = [ "anyhow", "cargo_toml", @@ -6338,11 +6343,11 @@ dependencies = [ [[package]] name = "tauri-codegen" -version = "2.0.0-beta.6" +version = "2.0.0-beta.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4ed45a0d2a1723ef4ea71d1aa5809c4a8bcaa92de77f6c9a8f4d4f28c5d86a" +checksum = "10c676621ba42f97d349ee1a835cfac8a268d8843c8b81fa7663ebac2854786a" dependencies = [ - "base64 0.21.7", + "base64 0.22.0", "brotli", "ico", "json-patch", @@ -6365,9 +6370,9 @@ dependencies = [ [[package]] name = "tauri-macros" -version = "2.0.0-beta.6" +version = "2.0.0-beta.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0a75661fb86b350141e78ad54ce9c60346149afc5cbf41de2ca60a1ebc252b3" +checksum = "dd5e87dc692a359ee99662616639fe35681e3ce9929e1ec2447b2e3853b6bda6" dependencies = [ "heck", "proc-macro2", @@ -6379,9 +6384,9 @@ dependencies = [ [[package]] name = "tauri-plugin" -version = "2.0.0-beta.6" +version = "2.0.0-beta.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9530f0f0d809e77ff9a93da5ff2483faf8fef2cb8ed125ca7b0172cb92685d4" +checksum = "b84ccc2181a81c66f2b203775b6b67590cc357bc477c57f0fac844c31dd5c474" dependencies = [ "anyhow", "glob", @@ -6546,8 +6551,8 @@ name = "tauri-plugin-http" version = "2.0.0-beta.1" dependencies = [ "data-url", - "glob", "http 0.2.11", + "regex", "reqwest", "schemars", "serde", @@ -6557,6 +6562,7 @@ dependencies = [ "tauri-plugin-fs", "thiserror", "url", + "urlpattern", ] [[package]] @@ -6840,9 +6846,9 @@ dependencies = [ [[package]] name = "tauri-runtime" -version = "2.0.0-beta.6" +version = "2.0.0-beta.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0381b4b96e1f4f39a24ca6472c9b016151b103a54b1425233007fdbc26cf20a8" +checksum = "3fc1ebe2a720c1b62a9980ebf44f27db4f8a475e1465917959ce3940d6903307" dependencies = [ "gtk", "http 0.2.11", @@ -6858,14 +6864,15 @@ dependencies = [ [[package]] name = "tauri-runtime-wry" -version = "2.0.0-beta.6" +version = "2.0.0-beta.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eef6a8373c9936b33a58c1bdbdd76fe4603d00ebe72304c0777bf0674e455aa" +checksum = "d0e853c02137e908589e9f0c684f10bb49d0dedf9e86ad734a18e42ce9bbd2ab" dependencies = [ "cocoa 0.25.0", "gtk", "http 0.2.11", "jni", + "log", "percent-encoding", "raw-window-handle 0.6.0", "softbuffer", @@ -6881,9 +6888,9 @@ dependencies = [ [[package]] name = "tauri-utils" -version = "2.0.0-beta.6" +version = "2.0.0-beta.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92e35e2f9a5ee8539d00dde621f176647747736a388a07c3083a0cc1b96ba6d7" +checksum = "e1973b15065cb63868f5fba789d54ef04232d7e0229fb2230d1f557480a5ceea" dependencies = [ "aes-gcm 0.10.3", "brotli", @@ -7450,6 +7457,47 @@ dependencies = [ "winapi", ] +[[package]] +name = "unic-char-property" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8c57a407d9b6fa02b4795eb81c5b6652060a15a7903ea981f3d723e6c0be221" +dependencies = [ + "unic-char-range", +] + +[[package]] +name = "unic-char-range" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0398022d5f700414f6b899e10b8348231abf9173fa93144cbc1a43b9793c1fbc" + +[[package]] +name = "unic-common" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80d7ff825a6a654ee85a63e80f92f054f904f21e7d12da4e22f9834a4aaa35bc" + +[[package]] +name = "unic-ucd-ident" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e230a37c0381caa9219d67cf063aa3a375ffed5bf541a452db16e744bdab6987" +dependencies = [ + "unic-char-property", + "unic-char-range", + "unic-ucd-version", +] + +[[package]] +name = "unic-ucd-version" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96bd2f2237fe450fcd0a1d2f5f4e91711124f7857ba2e964247776ebeeb7b0c4" +dependencies = [ + "unic-common", +] + [[package]] name = "unicase" version = "2.7.0" @@ -7542,6 +7590,19 @@ version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" +[[package]] +name = "urlpattern" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9bd5ff03aea02fa45b13a7980151fe45009af1980ba69f651ec367121a31609" +dependencies = [ + "derive_more", + "regex", + "serde", + "unic-ucd-ident", + "url", +] + [[package]] name = "utf-8" version = "0.7.6" diff --git a/Cargo.toml b/Cargo.toml index 63a7acb8..5f2dae3b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,9 +10,9 @@ resolver = "2" [workspace.dependencies] serde = { version = "1", features = ["derive"] } log = "0.4" -tauri = "2.0.0-beta.8" -tauri-build = "2.0.0-beta.6" -tauri-plugin = "2.0.0-beta.6" +tauri = "2.0.0-beta.9" +tauri-build = "2.0.0-beta.7" +tauri-plugin = "2.0.0-beta.7" serde_json = "1" thiserror = "1" url = "2" diff --git a/examples/api/CHANGELOG.md b/examples/api/CHANGELOG.md index 97bab4e7..a5799d0c 100644 --- a/examples/api/CHANGELOG.md +++ b/examples/api/CHANGELOG.md @@ -1,5 +1,25 @@ # Changelog +## \[2.0.0-beta.2] + +### Dependencies + +- Upgraded to `clipboard-manager-js@2.0.0-beta.2` +- Upgraded to `dialog-js@2.0.0-beta.2` +- Upgraded to `fs-js@2.0.0-beta.2` +- Upgraded to `http-js@2.0.0-beta.2` +- Upgraded to `shell-js@2.0.0-beta.2` +- Upgraded to `barcode-scanner-js@2.0.0-beta.2` +- Upgraded to `biometric-js@2.0.0-beta.2` +- Upgraded to `cli-js@2.0.0-beta.2` +- Upgraded to `global-shortcut-js@2.0.0-beta.2` +- Upgraded to `log-js@2.0.0-beta.2` +- Upgraded to `nfc-js@2.0.0-beta.2` +- Upgraded to `notification-js@2.0.0-beta.2` +- Upgraded to `os-js@2.0.0-beta.2` +- Upgraded to `process-js@2.0.0-beta.2` +- Upgraded to `updater-js@2.0.0-beta.2` + ## \[2.0.0-beta.1] ### Dependencies diff --git a/examples/api/package.json b/examples/api/package.json index c14ca3f1..10858549 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.1", + "version": "2.0.0-beta.2", "type": "module", "scripts": { "dev": "vite --clearScreen false", @@ -9,28 +9,28 @@ "serve": "vite preview" }, "dependencies": { - "@tauri-apps/api": "2.0.0-beta.3", - "@tauri-apps/plugin-barcode-scanner": "2.0.0-beta.1", - "@tauri-apps/plugin-biometric": "2.0.0-beta.1", - "@tauri-apps/plugin-cli": "2.0.0-beta.1", - "@tauri-apps/plugin-clipboard-manager": "2.0.0-beta.1", - "@tauri-apps/plugin-dialog": "2.0.0-beta.1", - "@tauri-apps/plugin-fs": "2.0.0-beta.1", - "@tauri-apps/plugin-global-shortcut": "2.0.0-beta.1", - "@tauri-apps/plugin-http": "2.0.0-beta.1", - "@tauri-apps/plugin-nfc": "2.0.0-beta.1", - "@tauri-apps/plugin-notification": "2.0.0-beta.1", - "@tauri-apps/plugin-os": "2.0.0-beta.1", - "@tauri-apps/plugin-process": "2.0.0-beta.1", - "@tauri-apps/plugin-shell": "2.0.0-beta.1", - "@tauri-apps/plugin-updater": "2.0.0-beta.1", + "@tauri-apps/api": "2.0.0-beta.4", + "@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.0.0-beta.2", + "@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", "@zerodevx/svelte-json-view": "1.0.7" }, "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.6", + "@tauri-apps/cli": "2.0.0-beta.7", "@unocss/extractor-svelte": "^0.58.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 20364e9a..900dd75c 100644 --- a/examples/api/src-tauri/CHANGELOG.md +++ b/examples/api/src-tauri/CHANGELOG.md @@ -1,5 +1,25 @@ # Changelog +## \[2.0.0-beta.2] + +### Dependencies + +- Upgraded to `clipboard-manager@2.0.0-beta.2` +- Upgraded to `dialog@2.0.0-beta.2` +- Upgraded to `http@2.0.0-beta.2` +- Upgraded to `fs@2.0.0-beta.2` +- Upgraded to `shell@2.0.0-beta.2` +- Upgraded to `barcode-scanner@2.0.0-beta.2` +- Upgraded to `biometric@2.0.0-beta.2` +- Upgraded to `cli@2.0.0-beta.2` +- Upgraded to `global-shortcut@2.0.0-beta.2` +- Upgraded to `log-plugin@2.0.0-beta.2` +- Upgraded to `nfc@2.0.0-beta.2` +- Upgraded to `notification@2.0.0-beta.2` +- Upgraded to `os@2.0.0-beta.2` +- Upgraded to `process@2.0.0-beta.2` +- Upgraded to `updater@2.0.0-beta.2` + ## \[2.0.0-beta.1] ### Dependencies diff --git a/examples/api/src-tauri/Cargo.toml b/examples/api/src-tauri/Cargo.toml index 9b0891c2..b93ad33e 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.1" +version = "2.0.0-beta.2" description = "An example Tauri Application showcasing the api" edition = "2021" rust-version = { workspace = true } @@ -19,21 +19,21 @@ serde_json = { workspace = true } serde = { workspace = true } tiny_http = "0.11" log = { workspace = true } -tauri-plugin-log = { path = "../../../plugins/log", version = "2.0.0-beta.1" } -tauri-plugin-fs = { path = "../../../plugins/fs", version = "2.0.0-beta.1", features = [ "watch" ] } -tauri-plugin-clipboard-manager = { path = "../../../plugins/clipboard-manager", version = "2.0.0-beta.1" } -tauri-plugin-dialog = { path = "../../../plugins/dialog", version = "2.0.0-beta.1" } -tauri-plugin-http = { path = "../../../plugins/http", features = [ "multipart" ], version = "2.0.0-beta.1" } -tauri-plugin-notification = { path = "../../../plugins/notification", version = "2.0.0-beta.1", features = [ "windows7-compat" ] } -tauri-plugin-os = { path = "../../../plugins/os", version = "2.0.0-beta.1" } -tauri-plugin-process = { path = "../../../plugins/process", version = "2.0.0-beta.1" } -tauri-plugin-shell = { path = "../../../plugins/shell", version = "2.0.0-beta.1" } +tauri-plugin-log = { path = "../../../plugins/log", version = "2.0.0-beta.2" } +tauri-plugin-fs = { path = "../../../plugins/fs", version = "2.0.0-beta.2", features = [ "watch" ] } +tauri-plugin-clipboard-manager = { path = "../../../plugins/clipboard-manager", version = "2.0.0-beta.2" } +tauri-plugin-dialog = { path = "../../../plugins/dialog", version = "2.0.0-beta.2" } +tauri-plugin-http = { path = "../../../plugins/http", features = [ "multipart" ], version = "2.0.0-beta.2" } +tauri-plugin-notification = { path = "../../../plugins/notification", version = "2.0.0-beta.2", features = [ "windows7-compat" ] } +tauri-plugin-os = { path = "../../../plugins/os", version = "2.0.0-beta.2" } +tauri-plugin-process = { path = "../../../plugins/process", version = "2.0.0-beta.2" } +tauri-plugin-shell = { path = "../../../plugins/shell", version = "2.0.0-beta.2" } [dependencies.tauri] workspace = true features = [ - "icon-ico", - "icon-png", + "image-ico", + "image-png", "isolation", "macos-private-api", "tray-icon", @@ -41,17 +41,17 @@ tauri-plugin-shell = { path = "../../../plugins/shell", version = "2.0.0-beta.1" ] [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.1" } -tauri-plugin-global-shortcut = { path = "../../../plugins/global-shortcut", version = "2.0.0-beta.1" } -tauri-plugin-updater = { path = "../../../plugins/updater", version = "2.0.0-beta.1" } +tauri-plugin-cli = { path = "../../../plugins/cli", version = "2.0.0-beta.2" } +tauri-plugin-global-shortcut = { path = "../../../plugins/global-shortcut", version = "2.0.0-beta.2" } +tauri-plugin-updater = { path = "../../../plugins/updater", version = "2.0.0-beta.2" } [target."cfg(any(target_os = \"android\", target_os = \"ios\"))".dependencies] -tauri-plugin-barcode-scanner = { path = "../../../plugins/barcode-scanner/", version = "2.0.0-beta.1" } -tauri-plugin-nfc = { path = "../../../plugins/nfc", version = "2.0.0-beta.1" } -tauri-plugin-biometric = { path = "../../../plugins/biometric/", version = "2.0.0-beta.1" } +tauri-plugin-barcode-scanner = { path = "../../../plugins/barcode-scanner/", version = "2.0.0-beta.2" } +tauri-plugin-nfc = { path = "../../../plugins/nfc", version = "2.0.0-beta.2" } +tauri-plugin-biometric = { path = "../../../plugins/biometric/", version = "2.0.0-beta.2" } [target."cfg(target_os = \"windows\")".dependencies] window-shadows = "0.2" [features] -custom-protocol = [ "tauri/custom-protocol" ] +prod = [ "tauri/custom-protocol" ] diff --git a/examples/api/src-tauri/gen/schemas/desktop-schema.json b/examples/api/src-tauri/gen/schemas/desktop-schema.json index 2d283f77..52ed8e22 100644 --- a/examples/api/src-tauri/gen/schemas/desktop-schema.json +++ b/examples/api/src-tauri/gen/schemas/desktop-schema.json @@ -11,6 +11,13 @@ } ] }, + { + "description": "A list of capabilities.", + "type": "array", + "items": { + "$ref": "#/definitions/Capability" + } + }, { "description": "A list of capabilities.", "type": "object", @@ -2236,32 +2243,48 @@ "items": { "title": "ScopeEntry", "description": "HTTP scope entry object definition.", - "type": "object", - "required": [ - "url" - ], - "properties": { - "url": { - "description": "A URL that can be accessed by the webview when using the HTTP APIs. The scoped URL is matched against the request URL using a glob pattern.\n\nExamples:\n\n- \"https://*\" or \"https://**\" : allows all HTTPS urls\n\n- \"https://*.github.com/tauri-apps/tauri\": allows any subdomain of \"github.com\" with the \"tauri-apps/api\" path\n\n- \"https://myapi.service.com/users/*\": allows access to any URLs that begins with \"https://myapi.service.com/users/\"", + "anyOf": [ + { + "description": "A URL that can be accessed by the webview when using the HTTP APIs. Wildcards can be used following the URL pattern standard.\n\nSee [the URL Pattern spec](https://urlpattern.spec.whatwg.org/) for more information.\n\nExamples:\n\n- \"https://*\" : allows all HTTPS origin on port 443\n\n- \"https://*:*\" : allows all HTTPS origin on any port\n\n- \"https://*.github.com/tauri-apps/tauri\": allows any subdomain of \"github.com\" with the \"tauri-apps/api\" path\n\n- \"https://myapi.service.com/users/*\": allows access to any URLs that begins with \"https://myapi.service.com/users/\"", "type": "string" + }, + { + "type": "object", + "required": [ + "url" + ], + "properties": { + "url": { + "description": "A URL that can be accessed by the webview when using the HTTP APIs. Wildcards can be used following the URL pattern standard.\n\nSee [the URL Pattern spec](https://urlpattern.spec.whatwg.org/) for more information.\n\nExamples:\n\n- \"https://*\" : allows all HTTPS origin on port 443\n\n- \"https://*:*\" : allows all HTTPS origin on any port\n\n- \"https://*.github.com/tauri-apps/tauri\": allows any subdomain of \"github.com\" with the \"tauri-apps/api\" path\n\n- \"https://myapi.service.com/users/*\": allows access to any URLs that begins with \"https://myapi.service.com/users/\"", + "type": "string" + } + } } - } + ] } }, "deny": { "items": { "title": "ScopeEntry", "description": "HTTP scope entry object definition.", - "type": "object", - "required": [ - "url" - ], - "properties": { - "url": { - "description": "A URL that can be accessed by the webview when using the HTTP APIs. The scoped URL is matched against the request URL using a glob pattern.\n\nExamples:\n\n- \"https://*\" or \"https://**\" : allows all HTTPS urls\n\n- \"https://*.github.com/tauri-apps/tauri\": allows any subdomain of \"github.com\" with the \"tauri-apps/api\" path\n\n- \"https://myapi.service.com/users/*\": allows access to any URLs that begins with \"https://myapi.service.com/users/\"", + "anyOf": [ + { + "description": "A URL that can be accessed by the webview when using the HTTP APIs. Wildcards can be used following the URL pattern standard.\n\nSee [the URL Pattern spec](https://urlpattern.spec.whatwg.org/) for more information.\n\nExamples:\n\n- \"https://*\" : allows all HTTPS origin on port 443\n\n- \"https://*:*\" : allows all HTTPS origin on any port\n\n- \"https://*.github.com/tauri-apps/tauri\": allows any subdomain of \"github.com\" with the \"tauri-apps/api\" path\n\n- \"https://myapi.service.com/users/*\": allows access to any URLs that begins with \"https://myapi.service.com/users/\"", "type": "string" + }, + { + "type": "object", + "required": [ + "url" + ], + "properties": { + "url": { + "description": "A URL that can be accessed by the webview when using the HTTP APIs. Wildcards can be used following the URL pattern standard.\n\nSee [the URL Pattern spec](https://urlpattern.spec.whatwg.org/) for more information.\n\nExamples:\n\n- \"https://*\" : allows all HTTPS origin on port 443\n\n- \"https://*:*\" : allows all HTTPS origin on any port\n\n- \"https://*.github.com/tauri-apps/tauri\": allows any subdomain of \"github.com\" with the \"tauri-apps/api\" path\n\n- \"https://myapi.service.com/users/*\": allows access to any URLs that begins with \"https://myapi.service.com/users/\"", + "type": "string" + } + } } - } + ] } } } @@ -4790,6 +4813,125 @@ "http:deny-fetch-send" ] }, + { + "description": "image:default -> Default permissions for the plugin.", + "type": "string", + "enum": [ + "image:default" + ] + }, + { + "description": "image:allow-from-bytes -> Enables the from_bytes command without any pre-configured scope.", + "type": "string", + "enum": [ + "image:allow-from-bytes" + ] + }, + { + "description": "image:allow-from-ico-bytes -> Enables the from_ico_bytes command without any pre-configured scope.", + "type": "string", + "enum": [ + "image:allow-from-ico-bytes" + ] + }, + { + "description": "image:allow-from-path -> Enables the from_path command without any pre-configured scope.", + "type": "string", + "enum": [ + "image:allow-from-path" + ] + }, + { + "description": "image:allow-from-png-bytes -> Enables the from_png_bytes command without any pre-configured scope.", + "type": "string", + "enum": [ + "image:allow-from-png-bytes" + ] + }, + { + "description": "image:allow-height -> Enables the height command without any pre-configured scope.", + "type": "string", + "enum": [ + "image:allow-height" + ] + }, + { + "description": "image:allow-new -> Enables the new command without any pre-configured scope.", + "type": "string", + "enum": [ + "image:allow-new" + ] + }, + { + "description": "image:allow-rgba -> Enables the rgba command without any pre-configured scope.", + "type": "string", + "enum": [ + "image:allow-rgba" + ] + }, + { + "description": "image:allow-width -> Enables the width command without any pre-configured scope.", + "type": "string", + "enum": [ + "image:allow-width" + ] + }, + { + "description": "image:deny-from-bytes -> Denies the from_bytes command without any pre-configured scope.", + "type": "string", + "enum": [ + "image:deny-from-bytes" + ] + }, + { + "description": "image:deny-from-ico-bytes -> Denies the from_ico_bytes command without any pre-configured scope.", + "type": "string", + "enum": [ + "image:deny-from-ico-bytes" + ] + }, + { + "description": "image:deny-from-path -> Denies the from_path command without any pre-configured scope.", + "type": "string", + "enum": [ + "image:deny-from-path" + ] + }, + { + "description": "image:deny-from-png-bytes -> Denies the from_png_bytes command without any pre-configured scope.", + "type": "string", + "enum": [ + "image:deny-from-png-bytes" + ] + }, + { + "description": "image:deny-height -> Denies the height command without any pre-configured scope.", + "type": "string", + "enum": [ + "image:deny-height" + ] + }, + { + "description": "image:deny-new -> Denies the new command without any pre-configured scope.", + "type": "string", + "enum": [ + "image:deny-new" + ] + }, + { + "description": "image:deny-rgba -> Denies the rgba command without any pre-configured scope.", + "type": "string", + "enum": [ + "image:deny-rgba" + ] + }, + { + "description": "image:deny-width -> Denies the width command without any pre-configured scope.", + "type": "string", + "enum": [ + "image:deny-width" + ] + }, { "description": "log:default -> Allows the log command", "type": "string", diff --git a/examples/api/src-tauri/gen/schemas/mobile-schema.json b/examples/api/src-tauri/gen/schemas/mobile-schema.json index 884d268f..6262fabb 100644 --- a/examples/api/src-tauri/gen/schemas/mobile-schema.json +++ b/examples/api/src-tauri/gen/schemas/mobile-schema.json @@ -47,15 +47,22 @@ "default": "", "type": "string" }, - "context": { - "description": "Execution context of the capability.\n\nAt runtime, Tauri filters the IPC command together with the context to determine whether it is allowed or not and its scope.", - "default": "local", - "allOf": [ + "remote": { + "description": "Configure remote URLs that can use the capability permissions.", + "anyOf": [ + { + "$ref": "#/definitions/CapabilityRemote" + }, { - "$ref": "#/definitions/CapabilityContext" + "type": "null" } ] }, + "local": { + "description": "Whether this capability is enabled for local app URLs or not. Defaults to `true`.", + "default": true, + "type": "boolean" + }, "windows": { "description": "List of windows that uses this capability. Can be a glob pattern.\n\nOn multiwebview windows, prefer [`Self::webviews`] for a fine grained access control.", "type": "array", @@ -78,7 +85,7 @@ } }, "platforms": { - "description": "Target platforms this capability applies. By default all platforms applies.", + "description": "Target platforms this capability applies. By default all platforms are affected by this capability.", "default": [ "linux", "macOS", @@ -93,42 +100,21 @@ } } }, - "CapabilityContext": { - "description": "Context of the capability.", - "oneOf": [ - { - "description": "Capability refers to local URL usage.", - "type": "string", - "enum": [ - "local" - ] - }, - { - "description": "Capability refers to remote usage.", - "type": "object", - "required": [ - "remote" - ], - "properties": { - "remote": { - "type": "object", - "required": [ - "urls" - ], - "properties": { - "urls": { - "description": "Remote domains this capability refers to. Can use glob patterns.", - "type": "array", - "items": { - "type": "string" - } - } - } - } - }, - "additionalProperties": false + "CapabilityRemote": { + "description": "Configuration for remote URLs that are associated with the capability.", + "type": "object", + "required": [ + "urls" + ], + "properties": { + "urls": { + "description": "Remote domains this capability refers to. Can use glob patterns.", + "type": "array", + "items": { + "type": "string" + } } - ] + } }, "PermissionEntry": { "description": "An entry for a permission value in a [`Capability`] can be either a raw permission [`Identifier`] or an object that references a permission and extends its scope.", @@ -2250,32 +2236,48 @@ "items": { "title": "ScopeEntry", "description": "HTTP scope entry object definition.", - "type": "object", - "required": [ - "url" - ], - "properties": { - "url": { - "description": "A URL that can be accessed by the webview when using the HTTP APIs. The scoped URL is matched against the request URL using a glob pattern.\n\nExamples:\n\n- \"https://*\" or \"https://**\" : allows all HTTPS urls\n\n- \"https://*.github.com/tauri-apps/tauri\": allows any subdomain of \"github.com\" with the \"tauri-apps/api\" path\n\n- \"https://myapi.service.com/users/*\": allows access to any URLs that begins with \"https://myapi.service.com/users/\"", + "anyOf": [ + { + "description": "A URL that can be accessed by the webview when using the HTTP APIs. Wildcards can be used following the URL pattern standard.\n\nSee [the URL Pattern spec](https://urlpattern.spec.whatwg.org/) for more information.\n\nExamples:\n\n- \"https://*\" : allows all HTTPS origin on port 443\n\n- \"https://*:*\" : allows all HTTPS origin on any port\n\n- \"https://*.github.com/tauri-apps/tauri\": allows any subdomain of \"github.com\" with the \"tauri-apps/api\" path\n\n- \"https://myapi.service.com/users/*\": allows access to any URLs that begins with \"https://myapi.service.com/users/\"", "type": "string" + }, + { + "type": "object", + "required": [ + "url" + ], + "properties": { + "url": { + "description": "A URL that can be accessed by the webview when using the HTTP APIs. Wildcards can be used following the URL pattern standard.\n\nSee [the URL Pattern spec](https://urlpattern.spec.whatwg.org/) for more information.\n\nExamples:\n\n- \"https://*\" : allows all HTTPS origin on port 443\n\n- \"https://*:*\" : allows all HTTPS origin on any port\n\n- \"https://*.github.com/tauri-apps/tauri\": allows any subdomain of \"github.com\" with the \"tauri-apps/api\" path\n\n- \"https://myapi.service.com/users/*\": allows access to any URLs that begins with \"https://myapi.service.com/users/\"", + "type": "string" + } + } } - } + ] } }, "deny": { "items": { "title": "ScopeEntry", "description": "HTTP scope entry object definition.", - "type": "object", - "required": [ - "url" - ], - "properties": { - "url": { - "description": "A URL that can be accessed by the webview when using the HTTP APIs. The scoped URL is matched against the request URL using a glob pattern.\n\nExamples:\n\n- \"https://*\" or \"https://**\" : allows all HTTPS urls\n\n- \"https://*.github.com/tauri-apps/tauri\": allows any subdomain of \"github.com\" with the \"tauri-apps/api\" path\n\n- \"https://myapi.service.com/users/*\": allows access to any URLs that begins with \"https://myapi.service.com/users/\"", + "anyOf": [ + { + "description": "A URL that can be accessed by the webview when using the HTTP APIs. Wildcards can be used following the URL pattern standard.\n\nSee [the URL Pattern spec](https://urlpattern.spec.whatwg.org/) for more information.\n\nExamples:\n\n- \"https://*\" : allows all HTTPS origin on port 443\n\n- \"https://*:*\" : allows all HTTPS origin on any port\n\n- \"https://*.github.com/tauri-apps/tauri\": allows any subdomain of \"github.com\" with the \"tauri-apps/api\" path\n\n- \"https://myapi.service.com/users/*\": allows access to any URLs that begins with \"https://myapi.service.com/users/\"", "type": "string" + }, + { + "type": "object", + "required": [ + "url" + ], + "properties": { + "url": { + "description": "A URL that can be accessed by the webview when using the HTTP APIs. Wildcards can be used following the URL pattern standard.\n\nSee [the URL Pattern spec](https://urlpattern.spec.whatwg.org/) for more information.\n\nExamples:\n\n- \"https://*\" : allows all HTTPS origin on port 443\n\n- \"https://*:*\" : allows all HTTPS origin on any port\n\n- \"https://*.github.com/tauri-apps/tauri\": allows any subdomain of \"github.com\" with the \"tauri-apps/api\" path\n\n- \"https://myapi.service.com/users/*\": allows access to any URLs that begins with \"https://myapi.service.com/users/\"", + "type": "string" + } + } } - } + ] } } } @@ -5756,6 +5758,13 @@ "webview:allow-print" ] }, + { + "description": "webview:allow-reparent -> Enables the reparent command without any pre-configured scope.", + "type": "string", + "enum": [ + "webview:allow-reparent" + ] + }, { "description": "webview:allow-set-webview-focus -> Enables the set_webview_focus command without any pre-configured scope.", "type": "string", @@ -5826,6 +5835,13 @@ "webview:deny-print" ] }, + { + "description": "webview:deny-reparent -> Denies the reparent command without any pre-configured scope.", + "type": "string", + "enum": [ + "webview:deny-reparent" + ] + }, { "description": "webview:deny-set-webview-focus -> Denies the set_webview_focus command without any pre-configured scope.", "type": "string", diff --git a/examples/api/src-tauri/src/lib.rs b/examples/api/src-tauri/src/lib.rs index bacdcf1b..91c34113 100644 --- a/examples/api/src-tauri/src/lib.rs +++ b/examples/api/src-tauri/src/lib.rs @@ -7,7 +7,10 @@ mod cmd; mod tray; use serde::Serialize; -use tauri::{webview::WebviewWindowBuilder, App, AppHandle, Manager, RunEvent, WebviewUrl}; +use tauri::{ + webview::{PageLoadEvent, WebviewWindowBuilder}, + App, AppHandle, Manager, RunEvent, WebviewUrl, +}; #[derive(Clone, Serialize)] struct Reply { @@ -107,18 +110,20 @@ pub fn run() { Ok(()) }) - .on_page_load(|webview, _| { - let webview_ = webview.clone(); - webview.listen("js-event", move |event| { - println!("got js-event with message '{:?}'", event.payload()); - let reply = Reply { - data: "something else".to_string(), - }; - - webview_ - .emit("rust-event", Some(reply)) - .expect("failed to emit"); - }); + .on_page_load(|webview, payload| { + if payload.event() == PageLoadEvent::Finished { + let webview_ = webview.clone(); + webview.listen("js-event", move |event| { + println!("got js-event with message '{:?}'", event.payload()); + let reply = Reply { + data: "something else".to_string(), + }; + + webview_ + .emit("rust-event", Some(reply)) + .expect("failed to emit"); + }); + } }); #[cfg(target_os = "macos")] diff --git a/examples/api/src-tauri/src/tray.rs b/examples/api/src-tauri/src/tray.rs index 470764f8..74863c0a 100644 --- a/examples/api/src-tauri/src/tray.rs +++ b/examples/api/src-tauri/src/tray.rs @@ -79,11 +79,14 @@ pub fn create_tray(app: &tauri::AppHandle) -> tauri::Result<()> { } i @ "icon-1" | i @ "icon-2" => { if let Some(tray) = app.tray_by_id("tray-1") { - let _ = tray.set_icon(Some(tauri::Icon::Raw(if i == "icon-1" { - include_bytes!("../icons/icon.ico").to_vec() + let _ = tray.set_icon(Some(if i == "icon-1" { + tauri::Image::from_ico_bytes(include_bytes!("../icons/icon.ico")).unwrap() } else { - include_bytes!("../icons/tray_icon_with_transparency.png").to_vec() - }))); + tauri::Image::from_png_bytes(include_bytes!( + "../icons/tray_icon_with_transparency.png" + )) + .unwrap() + })); } } "switch-menu" => { diff --git a/examples/api/src/views/Communication.svelte b/examples/api/src/views/Communication.svelte index a9f4826f..859d7c54 100644 --- a/examples/api/src/views/Communication.svelte +++ b/examples/api/src/views/Communication.svelte @@ -1,15 +1,15 @@ diff --git a/examples/api/src/views/Http.svelte b/examples/api/src/views/Http.svelte index 842816b8..e1848803 100644 --- a/examples/api/src/views/Http.svelte +++ b/examples/api/src/views/Http.svelte @@ -53,7 +53,7 @@ const form = new FormData(); form.append("foo", foo); form.append("bar", bar); - const response = await tauriFetch("http://localhost:3003", { + const response = await tauriFetch("http://localhost:3003/tauri", { method: "POST", body: form, }); diff --git a/plugins/authenticator/CHANGELOG.md b/plugins/authenticator/CHANGELOG.md index 84b71e6f..03f3c39b 100644 --- a/plugins/authenticator/CHANGELOG.md +++ b/plugins/authenticator/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## \[2.0.0-beta.2] + +- [`99bea25`](https://github.com/tauri-apps/plugins-workspace/commit/99bea2559c2c0648c2519c50a18cd124dacef57b)([#1005](https://github.com/tauri-apps/plugins-workspace/pull/1005)) Update to tauri beta.8. + ## \[2.0.0-beta.1] - [`569defb`](https://github.com/tauri-apps/plugins-workspace/commit/569defbe9492e38938554bb7bdc1be9151456d21) Update to tauri beta.4. @@ -41,4 +45,4 @@ - [`717ae67`](https://github.com/tauri-apps/plugins-workspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! ae67\`]\(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! + 717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! diff --git a/plugins/authenticator/Cargo.toml b/plugins/authenticator/Cargo.toml index 9963b63e..e33fcd15 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.1" +version = "2.0.0-beta.2" description = "Use hardware security-keys in your Tauri App." authors = { workspace = true } license = { workspace = true } diff --git a/plugins/authenticator/package.json b/plugins/authenticator/package.json index 7e57c456..bae1a983 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.1", + "version": "2.0.0-beta.2", "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.2" + "@tauri-apps/api": "2.0.0-beta.4" } } diff --git a/plugins/autostart/CHANGELOG.md b/plugins/autostart/CHANGELOG.md index 84b71e6f..03f3c39b 100644 --- a/plugins/autostart/CHANGELOG.md +++ b/plugins/autostart/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## \[2.0.0-beta.2] + +- [`99bea25`](https://github.com/tauri-apps/plugins-workspace/commit/99bea2559c2c0648c2519c50a18cd124dacef57b)([#1005](https://github.com/tauri-apps/plugins-workspace/pull/1005)) Update to tauri beta.8. + ## \[2.0.0-beta.1] - [`569defb`](https://github.com/tauri-apps/plugins-workspace/commit/569defbe9492e38938554bb7bdc1be9151456d21) Update to tauri beta.4. @@ -41,4 +45,4 @@ - [`717ae67`](https://github.com/tauri-apps/plugins-workspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! ae67\`]\(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! + 717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! diff --git a/plugins/autostart/Cargo.toml b/plugins/autostart/Cargo.toml index f9c4fc86..c8238a8d 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.1" +version = "2.0.0-beta.2" description = "Automatically launch your application at startup." authors = { workspace = true } license = { workspace = true } diff --git a/plugins/autostart/package.json b/plugins/autostart/package.json index ad33dd84..59adcd91 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.1", + "version": "2.0.0-beta.2", "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.2" + "@tauri-apps/api": "2.0.0-beta.4" } } diff --git a/plugins/barcode-scanner/CHANGELOG.md b/plugins/barcode-scanner/CHANGELOG.md index 01a59b61..8627e3b4 100644 --- a/plugins/barcode-scanner/CHANGELOG.md +++ b/plugins/barcode-scanner/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## \[2.0.0-beta.2] + +- [`99bea25`](https://github.com/tauri-apps/plugins-workspace/commit/99bea2559c2c0648c2519c50a18cd124dacef57b)([#1005](https://github.com/tauri-apps/plugins-workspace/pull/1005)) Update to tauri beta.8. + ## \[2.0.0-beta.1] - [`569defb`](https://github.com/tauri-apps/plugins-workspace/commit/569defbe9492e38938554bb7bdc1be9151456d21) Update to tauri beta.4. @@ -28,4 +32,4 @@ ## \[2.0.0-alpha.0] - [`454428c`](https://github.com/tauri-apps/plugins-workspace/commit/454428cd50ce4962f0bad8e355aebc68af8cc61f)([#536](https://github.com/tauri-apps/plugins-workspace/pull/536)) Initial release. -commit/454428cd50ce4962f0bad8e355aebc68af8cc61f)([#536](https://github.com/tauri-apps/plugins-workspace/pull/536)) Initial release. + commit/454428cd50ce4962f0bad8e355aebc68af8cc61f)([#536](https://github.com/tauri-apps/plugins-workspace/pull/536)) Initial release. diff --git a/plugins/barcode-scanner/Cargo.toml b/plugins/barcode-scanner/Cargo.toml index 81f8e4f1..5b0fcbae 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.1" +version = "2.0.0-beta.2" description = "Scan QR codes, EAN-13 and other kinds of barcodes on Android and iOS" edition = { workspace = true } authors = { workspace = true } diff --git a/plugins/barcode-scanner/package.json b/plugins/barcode-scanner/package.json index e1fe29bd..376787c4 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.1", + "version": "2.0.0-beta.2", "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.2" + "@tauri-apps/api": "2.0.0-beta.4" } } diff --git a/plugins/biometric/CHANGELOG.md b/plugins/biometric/CHANGELOG.md index 67aa19f9..4b57f6d6 100644 --- a/plugins/biometric/CHANGELOG.md +++ b/plugins/biometric/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## \[2.0.0-beta.2] + +- [`99bea25`](https://github.com/tauri-apps/plugins-workspace/commit/99bea2559c2c0648c2519c50a18cd124dacef57b)([#1005](https://github.com/tauri-apps/plugins-workspace/pull/1005)) Update to tauri beta.8. + ## \[2.0.0-beta.1] - [`569defb`](https://github.com/tauri-apps/plugins-workspace/commit/569defbe9492e38938554bb7bdc1be9151456d21) Update to tauri beta.4. @@ -12,4 +16,4 @@ - [`8df28a9`](https://github.com/tauri-apps/plugins-workspace/commit/8df28a987519ecfa03dcb8635443025f8d010362)([#829](https://github.com/tauri-apps/plugins-workspace/pull/829)) Initial release. - [`8df28a9`](https://github.com/tauri-apps/plugins-workspace/commit/8df28a987519ecfa03dcb8635443025f8d010362)([#829](https://github.com/tauri-apps/plugins-workspace/pull/829)) Initial release. -commit/8df28a987519ecfa03dcb8635443025f8d010362)([#829](https://github.com/tauri-apps/plugins-workspace/pull/829)) Initial release. + commit/8df28a987519ecfa03dcb8635443025f8d010362)([#829](https://github.com/tauri-apps/plugins-workspace/pull/829)) Initial release. diff --git a/plugins/biometric/Cargo.toml b/plugins/biometric/Cargo.toml index c1699fd4..dbf99dc0 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.1" +version = "2.0.0-beta.2" description = "Prompt the user for biometric authentication on Android and iOS." edition = { workspace = true } authors = { workspace = true } diff --git a/plugins/biometric/package.json b/plugins/biometric/package.json index 82578b0a..df6dac90 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.1", + "version": "2.0.0-beta.2", "license": "MIT or APACHE-2.0", "authors": [ "Tauri Programme within The Commons Conservancy" @@ -27,6 +27,6 @@ "tslib": "2.6.0" }, "dependencies": { - "@tauri-apps/api": "2.0.0-beta.2" + "@tauri-apps/api": "2.0.0-beta.4" } } diff --git a/plugins/cli/CHANGELOG.md b/plugins/cli/CHANGELOG.md index 84b71e6f..03f3c39b 100644 --- a/plugins/cli/CHANGELOG.md +++ b/plugins/cli/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## \[2.0.0-beta.2] + +- [`99bea25`](https://github.com/tauri-apps/plugins-workspace/commit/99bea2559c2c0648c2519c50a18cd124dacef57b)([#1005](https://github.com/tauri-apps/plugins-workspace/pull/1005)) Update to tauri beta.8. + ## \[2.0.0-beta.1] - [`569defb`](https://github.com/tauri-apps/plugins-workspace/commit/569defbe9492e38938554bb7bdc1be9151456d21) Update to tauri beta.4. @@ -41,4 +45,4 @@ - [`717ae67`](https://github.com/tauri-apps/plugins-workspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! ae67\`]\(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! + 717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! diff --git a/plugins/cli/Cargo.toml b/plugins/cli/Cargo.toml index 478d6b47..5562a559 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.1" +version = "2.0.0-beta.2" description = "Parse arguments from your Tauri application's command line interface." edition = { workspace = true } authors = { workspace = true } diff --git a/plugins/cli/package.json b/plugins/cli/package.json index be8cebba..a716a830 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.1", + "version": "2.0.0-beta.2", "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.2" + "@tauri-apps/api": "2.0.0-beta.4" } } diff --git a/plugins/clipboard-manager/CHANGELOG.md b/plugins/clipboard-manager/CHANGELOG.md index 46f2509a..f24e7e10 100644 --- a/plugins/clipboard-manager/CHANGELOG.md +++ b/plugins/clipboard-manager/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## \[2.0.0-beta.2] + +- [`dc6d332`](https://github.com/tauri-apps/plugins-workspace/commit/dc6d3321e5305fa8b7250553bd179cbee995998a)([#977](https://github.com/tauri-apps/plugins-workspace/pull/977)) Add support for writing HTML content to the clipboard. +- [`99bea25`](https://github.com/tauri-apps/plugins-workspace/commit/99bea2559c2c0648c2519c50a18cd124dacef57b)([#1005](https://github.com/tauri-apps/plugins-workspace/pull/1005)) Update to tauri beta.8. + ## \[2.0.0-beta.1] - [`569defb`](https://github.com/tauri-apps/plugins-workspace/commit/569defbe9492e38938554bb7bdc1be9151456d21) Update to tauri beta.4. @@ -41,4 +46,4 @@ ## \[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! + 717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! diff --git a/plugins/clipboard-manager/Cargo.toml b/plugins/clipboard-manager/Cargo.toml index cd032ac1..9a3c51e3 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.0.0-beta.1" +version = "2.0.0-beta.2" description = "Read and write to the system clipboard." edition = { workspace = true } authors = { workspace = true } diff --git a/plugins/clipboard-manager/package.json b/plugins/clipboard-manager/package.json index 038613cc..33a4c269 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.0.0-beta.1", + "version": "2.0.0-beta.2", "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.2" + "@tauri-apps/api": "2.0.0-beta.4" } } diff --git a/plugins/deep-link/CHANGELOG.md b/plugins/deep-link/CHANGELOG.md index 3f711d80..33e79dbd 100644 --- a/plugins/deep-link/CHANGELOG.md +++ b/plugins/deep-link/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## \[2.0.0-beta.2] + +- [`99bea25`](https://github.com/tauri-apps/plugins-workspace/commit/99bea2559c2c0648c2519c50a18cd124dacef57b)([#1005](https://github.com/tauri-apps/plugins-workspace/pull/1005)) Update to tauri beta.8. + ## \[2.0.0-beta.1] - [`569defb`](https://github.com/tauri-apps/plugins-workspace/commit/569defbe9492e38938554bb7bdc1be9151456d21) Update to tauri beta.4. @@ -36,4 +40,4 @@ - [`eccd6f9`](https://github.com/tauri-apps/plugins-workspace/commit/eccd6f977af7629255b6f5a5205666c9079a86ed)([#504](https://github.com/tauri-apps/plugins-workspace/pull/504)) Initial release. - [`eccd6f9`](https://github.com/tauri-apps/plugins-workspace/commit/eccd6f977af7629255b6f5a5205666c9079a86ed)([#504](https://github.com/tauri-apps/plugins-workspace/pull/504)) Initial release. -commit/eccd6f977af7629255b6f5a5205666c9079a86ed)([#504](https://github.com/tauri-apps/plugins-workspace/pull/504)) Initial release. + commit/eccd6f977af7629255b6f5a5205666c9079a86ed)([#504](https://github.com/tauri-apps/plugins-workspace/pull/504)) Initial release. diff --git a/plugins/deep-link/Cargo.toml b/plugins/deep-link/Cargo.toml index 95c49557..0f9d251d 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.1" +version = "2.0.0-beta.2" description = "Set your Tauri application as the default handler for an URL" authors = { workspace = true } license = { workspace = true } diff --git a/plugins/deep-link/examples/app/CHANGELOG.md b/plugins/deep-link/examples/app/CHANGELOG.md index 7277d85a..a8578b6b 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.2] + +### Dependencies + +- Upgraded to `deep-link-js@2.0.0-beta.2` + ## \[2.0.0-beta.1] ### Dependencies diff --git a/plugins/deep-link/examples/app/package.json b/plugins/deep-link/examples/app/package.json index d9d4ea34..208fd9dc 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.1", + "version": "2.0.0-beta.2", "type": "module", "scripts": { "dev": "vite", @@ -10,11 +10,11 @@ "tauri": "tauri" }, "dependencies": { - "@tauri-apps/api": "2.0.0-beta.2", - "@tauri-apps/plugin-deep-link": "2.0.0-beta.1" + "@tauri-apps/api": "2.0.0-beta.4", + "@tauri-apps/plugin-deep-link": "2.0.0-beta.2" }, "devDependencies": { - "@tauri-apps/cli": "2.0.0-beta.3", + "@tauri-apps/cli": "2.0.0-beta.7", "internal-ip": "^8.0.0", "typescript": "^5.2.2", "vite": "^5.0.12" diff --git a/plugins/deep-link/examples/app/src-tauri/Cargo.toml b/plugins/deep-link/examples/app/src-tauri/Cargo.toml index 9d1eb501..24e4d6ca 100644 --- a/plugins/deep-link/examples/app/src-tauri/Cargo.toml +++ b/plugins/deep-link/examples/app/src-tauri/Cargo.toml @@ -26,4 +26,4 @@ tauri-plugin-deep-link = { path = "../../../" } # this feature is used for production builds or when `devUrl` points to the filesystem and the built-in dev server is disabled. # If you use cargo directly instead of tauri's cli you can use this feature flag to switch between tauri's `dev` and `build` modes. # DO NOT REMOVE!! -custom-protocol = [ "tauri/custom-protocol" ] +prod = ["tauri/custom-protocol"] diff --git a/plugins/deep-link/package.json b/plugins/deep-link/package.json index f1e57422..02e81a12 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.1", + "version": "2.0.0-beta.2", "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.2" + "@tauri-apps/api": "2.0.0-beta.4" } } diff --git a/plugins/dialog/CHANGELOG.md b/plugins/dialog/CHANGELOG.md index 39b3bbf3..eb032c14 100644 --- a/plugins/dialog/CHANGELOG.md +++ b/plugins/dialog/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## \[2.0.0-beta.2] + +- [`aa25c91`](https://github.com/tauri-apps/plugins-workspace/commit/aa25c91bb01e957872fb2b606a3acaf2f2c4ef3a)([#978](https://github.com/tauri-apps/plugins-workspace/pull/978)) Allow configuring `canCreateDirectories` for open and save dialogs on macOS, if not configured, it will be set to `true` by default. +- [`99bea25`](https://github.com/tauri-apps/plugins-workspace/commit/99bea2559c2c0648c2519c50a18cd124dacef57b)([#1005](https://github.com/tauri-apps/plugins-workspace/pull/1005)) Update to tauri beta.8. + ## \[2.0.0-beta.1] - [`569defb`](https://github.com/tauri-apps/plugins-workspace/commit/569defbe9492e38938554bb7bdc1be9151456d21) Update to tauri beta.4. @@ -87,5 +92,9 @@ - [`717ae67`](https://github.com/tauri-apps/plugins-workspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! pull/371)) First v2 alpha release! -kspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/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! +71](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! + 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! diff --git a/plugins/dialog/Cargo.toml b/plugins/dialog/Cargo.toml index eb40f6a1..5d1aba6a 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.1" +version = "2.0.0-beta.2" description = "Native system dialogs for opening and saving files along with message dialogs on your Tauri application." edition = { workspace = true } authors = { workspace = true } @@ -22,7 +22,7 @@ serde_json = { workspace = true } tauri = { workspace = true } log = { workspace = true } thiserror = { workspace = true } -tauri-plugin-fs = { path = "../fs", version = "2.0.0-beta.1" } +tauri-plugin-fs = { path = "../fs", version = "2.0.0-beta.2" } [target."cfg(any(target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies] glib = "0.16" diff --git a/plugins/dialog/package.json b/plugins/dialog/package.json index 76ec3b1e..c0991378 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.1", + "version": "2.0.0-beta.2", "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.2" + "@tauri-apps/api": "2.0.0-beta.4" } } diff --git a/plugins/dialog/src/desktop.rs b/plugins/dialog/src/desktop.rs index 7843f3b5..5d98952d 100644 --- a/plugins/dialog/src/desktop.rs +++ b/plugins/dialog/src/desktop.rs @@ -11,6 +11,7 @@ use std::path::PathBuf; use raw_window_handle::{HasWindowHandle, RawWindowHandle}; +use rfd::{AsyncFileDialog, AsyncMessageDialog}; use serde::de::DeserializeOwned; use tauri::{plugin::PluginApi, AppHandle, Runtime}; @@ -18,16 +19,6 @@ use crate::{models::*, FileDialogBuilder, MessageDialogBuilder}; const OK: &str = "Ok"; -#[cfg(target_os = "linux")] -type FileDialog = rfd::FileDialog; -#[cfg(not(target_os = "linux"))] -type FileDialog = rfd::AsyncFileDialog; - -#[cfg(target_os = "linux")] -type MessageDialog = rfd::MessageDialog; -#[cfg(not(target_os = "linux"))] -type MessageDialog = rfd::AsyncMessageDialog; - pub fn init( app: &AppHandle, _api: PluginApi, @@ -51,40 +42,18 @@ impl Dialog { } } -#[cfg(not(target_os = "linux"))] macro_rules! run_dialog { ($e:expr, $h: expr) => {{ std::thread::spawn(move || $h(tauri::async_runtime::block_on($e))); }}; } -#[cfg(target_os = "linux")] -macro_rules! run_dialog { - ($e:expr, $h: ident) => {{ - std::thread::spawn(move || { - let context = glib::MainContext::default(); - context.invoke_with_priority(glib::PRIORITY_HIGH, move || $h($e)); - }); - }}; -} - -#[cfg(not(target_os = "linux"))] macro_rules! run_file_dialog { ($e:expr, $h: ident) => {{ std::thread::spawn(move || $h(tauri::async_runtime::block_on($e))); }}; } -#[cfg(target_os = "linux")] -macro_rules! run_file_dialog { - ($e:expr, $h: ident) => {{ - std::thread::spawn(move || { - let context = glib::MainContext::default(); - context.invoke_with_priority(glib::PRIORITY_HIGH, move || $h($e)); - }); - }}; -} - impl From for rfd::MessageLevel { fn from(kind: MessageDialogKind) -> Self { match kind { @@ -105,9 +74,9 @@ impl HasWindowHandle for WindowHandle { } } -impl From> for FileDialog { +impl From> for AsyncFileDialog { fn from(d: FileDialogBuilder) -> Self { - let mut builder = FileDialog::new(); + let mut builder = AsyncFileDialog::new(); if let Some(title) = d.title { builder = builder.set_title(title); @@ -133,9 +102,9 @@ impl From> for FileDialog { } } -impl From> for MessageDialog { +impl From> for AsyncMessageDialog { fn from(d: MessageDialogBuilder) -> Self { - let mut dialog = MessageDialog::new() + let mut dialog = AsyncMessageDialog::new() .set_title(&d.title) .set_description(&d.message) .set_level(d.kind.into()); @@ -162,49 +131,44 @@ pub fn pick_file) + Send + 'static>( dialog: FileDialogBuilder, f: F, ) { - #[cfg(not(target_os = "linux"))] let f = |path: Option| f(path.map(|p| p.path().to_path_buf())); - run_file_dialog!(FileDialog::from(dialog).pick_file(), f) + run_file_dialog!(AsyncFileDialog::from(dialog).pick_file(), f) } pub fn pick_files>) + Send + 'static>( dialog: FileDialogBuilder, f: F, ) { - #[cfg(not(target_os = "linux"))] let f = |paths: Option>| { f(paths.map(|list| list.into_iter().map(|p| p.path().to_path_buf()).collect())) }; - run_file_dialog!(FileDialog::from(dialog).pick_files(), f) + run_file_dialog!(AsyncFileDialog::from(dialog).pick_files(), f) } pub fn pick_folder) + Send + 'static>( dialog: FileDialogBuilder, f: F, ) { - #[cfg(not(target_os = "linux"))] let f = |path: Option| f(path.map(|p| p.path().to_path_buf())); - run_file_dialog!(FileDialog::from(dialog).pick_folder(), f) + run_file_dialog!(AsyncFileDialog::from(dialog).pick_folder(), f) } pub fn pick_folders>) + Send + 'static>( dialog: FileDialogBuilder, f: F, ) { - #[cfg(not(target_os = "linux"))] let f = |paths: Option>| { f(paths.map(|list| list.into_iter().map(|p| p.path().to_path_buf()).collect())) }; - run_file_dialog!(FileDialog::from(dialog).pick_folders(), f) + run_file_dialog!(AsyncFileDialog::from(dialog).pick_folders(), f) } pub fn save_file) + Send + 'static>( dialog: FileDialogBuilder, f: F, ) { - #[cfg(not(target_os = "linux"))] let f = |path: Option| f(path.map(|p| p.path().to_path_buf())); - run_file_dialog!(FileDialog::from(dialog).save_file(), f) + run_file_dialog!(AsyncFileDialog::from(dialog).save_file(), f) } /// Shows a message dialog @@ -223,5 +187,5 @@ pub fn show_message_dialog( }); }; - run_dialog!(MessageDialog::from(dialog).show(), f); + run_dialog!(AsyncMessageDialog::from(dialog).show(), f); } diff --git a/plugins/fs/CHANGELOG.md b/plugins/fs/CHANGELOG.md index c4e8e6d3..ed82af7c 100644 --- a/plugins/fs/CHANGELOG.md +++ b/plugins/fs/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## \[2.0.0-beta.2] + +- [`7358102`](https://github.com/tauri-apps/plugins-workspace/commit/735810237e21504a027a65a7b3c25fd7e594288a)([#1029](https://github.com/tauri-apps/plugins-workspace/pull/1029)) Fix infinite loop on cargo build operations +- [`99bea25`](https://github.com/tauri-apps/plugins-workspace/commit/99bea2559c2c0648c2519c50a18cd124dacef57b)([#1005](https://github.com/tauri-apps/plugins-workspace/pull/1005)) Update to tauri beta.8. + ## \[2.0.0-beta.1] - [`569defb`](https://github.com/tauri-apps/plugins-workspace/commit/569defbe9492e38938554bb7bdc1be9151456d21) Update to tauri beta.4. @@ -55,4 +60,6 @@ - [`717ae67`](https://github.com/tauri-apps/plugins-workspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! ae67\`]\(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! + 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! diff --git a/plugins/fs/Cargo.toml b/plugins/fs/Cargo.toml index 3f7cdbf7..01cb2440 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.1" +version = "2.0.0-beta.2" description = "Access the file system." authors = { workspace = true } license = { workspace = true } diff --git a/plugins/fs/build.rs b/plugins/fs/build.rs index 1901f3a4..dcfefd29 100644 --- a/plugins/fs/build.rs +++ b/plugins/fs/build.rs @@ -154,8 +154,11 @@ permissions = [ ]"### ); - std::fs::write(base_dirs.join(format!("{lower}.toml")), toml) - .unwrap_or_else(|e| panic!("unable to autogenerate ${upper}: {e}")); + let permission_path = base_dirs.join(format!("{lower}.toml")); + if toml != std::fs::read_to_string(&permission_path).unwrap_or_default() { + std::fs::write(permission_path, toml) + .unwrap_or_else(|e| panic!("unable to autogenerate ${lower}: {e}")); + } } tauri_plugin::Builder::new(COMMANDS) diff --git a/plugins/fs/package.json b/plugins/fs/package.json index 1dc2a0da..0c5c6af2 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.1", + "version": "2.0.0-beta.2", "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.2" + "@tauri-apps/api": "2.0.0-beta.4" } } diff --git a/plugins/fs/src/api-iife.js b/plugins/fs/src/api-iife.js index f380ba77..079ccde1 100644 --- a/plugins/fs/src/api-iife.js +++ b/plugins/fs/src/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,a;"function"==typeof SuppressedError&&SuppressedError;class s{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,i.set(this,(()=>{})),this.id=function(t,e=!1){return window.__TAURI_INTERNALS__.transformCallback(t,e)}((t=>{e(this,i,"f").call(this,t)}))}set onmessage(t){n(this,i,t,"f")}get onmessage(){return e(this,i,"f")}toJSON(){return`__CHANNEL__:${this.id}`}}async function c(t,e={},n){return window.__TAURI_INTERNALS__.invoke(t,e,n)}i=new WeakMap;class f{get rid(){return e(this,o,"f")}constructor(t){o.set(this,void 0),n(this,o,t,"f")}async close(){return c("plugin:resources|close",{rid:this.rid})}}function l(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}}o=new WeakMap,t.BaseDirectory=void 0,(r=t.BaseDirectory||(t.BaseDirectory={}))[r.Audio=1]="Audio",r[r.Cache=2]="Cache",r[r.Config=3]="Config",r[r.Data=4]="Data",r[r.LocalData=5]="LocalData",r[r.Document=6]="Document",r[r.Download=7]="Download",r[r.Picture=8]="Picture",r[r.Public=9]="Public",r[r.Video=10]="Video",r[r.Resource=11]="Resource",r[r.Temp=12]="Temp",r[r.AppConfig=13]="AppConfig",r[r.AppData=14]="AppData",r[r.AppLocalData=15]="AppLocalData",r[r.AppCache=16]="AppCache",r[r.AppLog=17]="AppLog",r[r.Desktop=18]="Desktop",r[r.Executable=19]="Executable",r[r.Font=20]="Font",r[r.Home=21]="Home",r[r.Runtime=22]="Runtime",r[r.Template=23]="Template",t.SeekMode=void 0,(a=t.SeekMode||(t.SeekMode={}))[a.Start=0]="Start",a[a.Current=1]="Current",a[a.End=2]="End";class u extends f{constructor(t){super(t)}async read(t){if(0===t.byteLength)return 0;const[e,n]=await c("plugin:fs|read",{rid:this.rid,len:t.byteLength});return t.set(e),0===n?null:n}async seek(t,e){return c("plugin:fs|seek",{rid:this.rid,offset:t,whence:e})}async stat(){return l(await c("plugin:fs|fstat",{rid:this.rid}))}async truncate(t){return c("plugin:fs|ftruncate",{rid:this.rid,len:t})}async write(t){return c("plugin:fs|write",{rid:this.rid,data:Array.from(t)})}}async function p(t){await c("plugin:fs|unwatch",{rid:t})}return t.FileHandle=u,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 c("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 c("plugin:fs|create",{path:t instanceof URL?t.toString():t,options:e});return new u(n)},t.exists=async function(t,e){if(t instanceof URL&&"file:"!==t.protocol)throw new TypeError("Must be a file URL.");return c("plugin:fs|exists",{path:t instanceof URL?t.toString():t,options:e})},t.lstat=async function(t,e){return l(await c("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 c("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 c("plugin:fs|open",{path:t instanceof URL?t.toString():t,options:e});return new u(n)},t.readDir=async function(t,e){if(t instanceof URL&&"file:"!==t.protocol)throw new TypeError("Must be a file URL.");return c("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 c("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 c("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 c("plugin:fs|read_text_file_lines",{path:n,options:e}));const[t,i]=await c("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 c("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 c("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 l(await c("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 c("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 s;r.onmessage=e;const a=await c("plugin:fs|watch",{paths:o.map((t=>t instanceof URL?t.toString():t)),options:i,onEvent:r});return()=>{p(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 s;r.onmessage=e;const a=await c("plugin:fs|watch",{paths:o.map((t=>t instanceof URL?t.toString():t)),options:i,onEvent:r});return()=>{p(a)}},t.writeFile=async function(t,e,n){if(t instanceof URL&&"file:"!==t.protocol)throw new TypeError("Must be a file URL.");return c("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 c("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("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__})} diff --git a/plugins/fs/src/commands.rs b/plugins/fs/src/commands.rs index fe49d15c..e9e747fc 100644 --- a/plugins/fs/src/commands.rs +++ b/plugins/fs/src/commands.rs @@ -809,9 +809,7 @@ pub fn resolve_path( ) -> CommandResult { let path = file_url_to_safe_pathbuf(path)?; let path = if let Some(base_dir) = base_dir { - app.path() - .resolve(&path, base_dir) - .map_err(Error::CannotResolvePath)? + app.path().resolve(&path, base_dir)? } else { path.as_ref().to_path_buf() }; diff --git a/plugins/fs/src/error.rs b/plugins/fs/src/error.rs index 212714ef..2d12b5ee 100644 --- a/plugins/fs/src/error.rs +++ b/plugins/fs/src/error.rs @@ -16,8 +16,6 @@ pub enum Error { Io(#[from] std::io::Error), #[error("forbidden path: {0}")] PathForbidden(PathBuf), - #[error("failed to resolve path: {0}")] - CannotResolvePath(tauri::path::Error), /// Invalid glob pattern. #[error("invalid glob pattern: {0}")] GlobPattern(#[from] glob::PatternError), diff --git a/plugins/global-shortcut/CHANGELOG.md b/plugins/global-shortcut/CHANGELOG.md index fd670851..3d113bca 100644 --- a/plugins/global-shortcut/CHANGELOG.md +++ b/plugins/global-shortcut/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## \[2.0.0-beta.2] + +- [`99bea25`](https://github.com/tauri-apps/plugins-workspace/commit/99bea2559c2c0648c2519c50a18cd124dacef57b)([#1005](https://github.com/tauri-apps/plugins-workspace/pull/1005)) Update to tauri beta.8. + ## \[2.0.0-beta.1] - [`569defb`](https://github.com/tauri-apps/plugins-workspace/commit/569defbe9492e38938554bb7bdc1be9151456d21) Update to tauri beta.4. @@ -47,4 +51,4 @@ ## \[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! + 717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! diff --git a/plugins/global-shortcut/Cargo.toml b/plugins/global-shortcut/Cargo.toml index 90cbaa58..5c306faa 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.1" +version = "2.0.0-beta.2" description = "Register global hotkeys listeners on your Tauri application." edition = { workspace = true } authors = { workspace = true } diff --git a/plugins/global-shortcut/package.json b/plugins/global-shortcut/package.json index 3bfdf0b2..9f02df12 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.1", + "version": "2.0.0-beta.2", "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.2" + "@tauri-apps/api": "2.0.0-beta.4" } } diff --git a/plugins/global-shortcut/src/api-iife.js b/plugins/global-shortcut/src/api-iife.js index 54da2b59..e0e8833a 100644 --- a/plugins/global-shortcut/src/api-iife.js +++ b/plugins/global-shortcut/src/api-iife.js @@ -1 +1 @@ -if("__TAURI__"in window){var __TAURI_PLUGIN_GLOBALSHORTCUT__=function(t){"use strict";function e(t,e,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(t):n?n.value:e.get(t)}var r;"function"==typeof SuppressedError&&SuppressedError;class n{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,r.set(this,(()=>{})),this.id=function(t,e=!1){return window.__TAURI_INTERNALS__.transformCallback(t,e)}((t=>{e(this,r,"f").call(this,t)}))}set onmessage(t){!function(t,e,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===n?o.call(t,r):o?o.value=r:e.set(t,r)}(this,r,t,"f")}get onmessage(){return e(this,r,"f")}toJSON(){return`__CHANNEL__:${this.id}`}}async function o(t,e={},r){return window.__TAURI_INTERNALS__.invoke(t,e,r)}return r=new WeakMap,t.isRegistered=async function(t){return await o("plugin:global-shortcut|is_registered",{shortcut:t})},t.register=async function(t,e){const r=new n;return r.onmessage=e,await o("plugin:global-shortcut|register",{shortcut:t,handler:r})},t.registerAll=async function(t,e){const r=new n;return r.onmessage=e,await o("plugin:global-shortcut|register_all",{shortcuts:t,handler:r})},t.unregister=async function(t){return await o("plugin:global-shortcut|unregister",{shortcut:t})},t.unregisterAll=async function(){return await o("plugin:global-shortcut|unregister_all")},t}({});Object.defineProperty(window.__TAURI__,"globalShortcut",{value:__TAURI_PLUGIN_GLOBALSHORTCUT__})} +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__})} diff --git a/plugins/http/CHANGELOG.md b/plugins/http/CHANGELOG.md index 31e0250f..d956de0d 100644 --- a/plugins/http/CHANGELOG.md +++ b/plugins/http/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## \[2.0.0-beta.2] + +- [`ae56b13`](https://github.com/tauri-apps/plugins-workspace/commit/ae56b13a4d49dbf922b8a0fbb0d557bb63c1d72b)([#983](https://github.com/tauri-apps/plugins-workspace/pull/983)) Allow `User-Agent` header to be set. +- [`99bea25`](https://github.com/tauri-apps/plugins-workspace/commit/99bea2559c2c0648c2519c50a18cd124dacef57b)([#1005](https://github.com/tauri-apps/plugins-workspace/pull/1005)) Update to tauri beta.8. + ## \[2.0.0-beta.1] - [`569defb`](https://github.com/tauri-apps/plugins-workspace/commit/569defbe9492e38938554bb7bdc1be9151456d21) Update to tauri beta.4. @@ -72,7 +77,26 @@ 371\)) First v2 alpha release! ! 371\)) First v2 alpha release! -ace/pull/371)) First v2 alpha release! + ace/pull/371)) First v2 alpha release! + 371\)) First v2 alpha release! + ! + 371\)) First v2 alpha release! + ! + 371\)) First v2 alpha release! + ! + 371\)) First v2 alpha release! +2 alpha release! + ! + 371\)) First v2 alpha release! + /717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! + 371\)) First v2 alpha release! + ! + 371\)) First v2 alpha release! + ! + 371\)) First v2 alpha release! + ! + 371\)) First v2 alpha release! + ace/pull/371)) First v2 alpha release! 371\)) First v2 alpha release! ! 371\)) First v2 alpha release! diff --git a/plugins/http/Cargo.toml b/plugins/http/Cargo.toml index 3b06c2a2..a35c1401 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.1" +version = "2.0.0-beta.2" description = "Access an HTTP client written in Rust." edition = { workspace = true } authors = { workspace = true } @@ -17,15 +17,17 @@ tauri-plugin = { workspace = true, features = [ "build" ] } schemars = { workspace = true } serde = { workspace = true } url = { workspace = true } -glob = "0.3" +urlpattern = "0.2" +regex = "1" [dependencies] serde = { workspace = true } serde_json = { workspace = true } tauri = { workspace = true } thiserror = { workspace = true } -tauri-plugin-fs = { path = "../fs", version = "2.0.0-beta.1" } -glob = "0.3" +tauri-plugin-fs = { path = "../fs", version = "2.0.0-beta.2" } +urlpattern = "0.2" +regex = "1" http = "0.2" reqwest = { version = "0.11", default-features = false } url = { workspace = true } diff --git a/plugins/http/build.rs b/plugins/http/build.rs index 2eaf72ba..7811cffc 100644 --- a/plugins/http/build.rs +++ b/plugins/http/build.rs @@ -9,26 +9,59 @@ mod scope; const COMMANDS: &[&str] = &["fetch", "fetch_cancel", "fetch_send", "fetch_read_body"]; /// HTTP scope entry object definition. +#[allow(unused)] #[derive(schemars::JsonSchema)] -struct ScopeEntry { +#[serde(untagged)] +enum ScopeEntry { /// A URL that can be accessed by the webview when using the HTTP APIs. - /// The scoped URL is matched against the request URL using a glob pattern. + /// Wildcards can be used following the URL pattern standard. + /// + /// See [the URL Pattern spec](https://urlpattern.spec.whatwg.org/) for more information. /// /// Examples: /// - /// - "https://*" or "https://**" : allows all HTTPS urls + /// - "https://*" : allows all HTTPS origin on port 443 + /// + /// - "https://*:*" : allows all HTTPS origin on any port /// /// - "https://*.github.com/tauri-apps/tauri": allows any subdomain of "github.com" with the "tauri-apps/api" path /// /// - "https://myapi.service.com/users/*": allows access to any URLs that begins with "https://myapi.service.com/users/" - url: String, + Value(String), + + Object { + /// A URL that can be accessed by the webview when using the HTTP APIs. + /// Wildcards can be used following the URL pattern standard. + /// + /// See [the URL Pattern spec](https://urlpattern.spec.whatwg.org/) for more information. + /// + /// Examples: + /// + /// - "https://*" : allows all HTTPS origin on port 443 + /// + /// - "https://*:*" : allows all HTTPS origin on any port + /// + /// - "https://*.github.com/tauri-apps/tauri": allows any subdomain of "github.com" with the "tauri-apps/api" path + /// + /// - "https://myapi.service.com/users/*": allows access to any URLs that begins with "https://myapi.service.com/users/" + url: String, + }, } // ensure scope entry is up to date impl From for scope::Entry { fn from(value: ScopeEntry) -> Self { + let url = match value { + ScopeEntry::Value(url) => url, + ScopeEntry::Object { url } => url, + }; + scope::Entry { - url: value.url.parse().unwrap(), + url: urlpattern::UrlPattern::parse( + urlpattern::UrlPatternInit::parse_constructor_string::(&url, None) + .unwrap(), + ) + .unwrap(), } } } diff --git a/plugins/http/package.json b/plugins/http/package.json index ef615036..ddd70e6a 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.1", + "version": "2.0.0-beta.2", "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.2" + "@tauri-apps/api": "2.0.0-beta.4" } } diff --git a/plugins/http/src/scope.rs b/plugins/http/src/scope.rs index d80a55fb..9067f406 100644 --- a/plugins/http/src/scope.rs +++ b/plugins/http/src/scope.rs @@ -2,13 +2,21 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT +use std::sync::Arc; + use serde::{Deserialize, Deserializer}; use url::Url; +use urlpattern::{UrlPattern, UrlPatternInit, UrlPatternMatchInput}; #[allow(rustdoc::bare_urls)] #[derive(Debug)] pub struct Entry { - pub url: glob::Pattern, + pub url: UrlPattern, +} + +fn parse_url_pattern(s: &str) -> Result { + let init = UrlPatternInit::parse_constructor_string::(s, None)?; + UrlPattern::parse(init) } impl<'de> Deserialize<'de> for Entry { @@ -17,17 +25,20 @@ impl<'de> Deserialize<'de> for Entry { D: Deserializer<'de>, { #[derive(Deserialize)] - struct EntryRaw { - url: String, + #[serde(untagged)] + enum EntryRaw { + Value(String), + Object { url: String }, } EntryRaw::deserialize(deserializer).and_then(|raw| { + let url = match raw { + EntryRaw::Value(url) => url, + EntryRaw::Object { url } => url, + }; Ok(Entry { - url: glob::Pattern::new(&raw.url).map_err(|e| { - serde::de::Error::custom(format!( - "URL `{}` is not a valid glob pattern: {e}", - raw.url - )) + url: parse_url_pattern(&url).map_err(|e| { + serde::de::Error::custom(format!("`{}` is not a valid URL pattern: {e}", url)) })?, }) }) @@ -37,32 +48,32 @@ impl<'de> Deserialize<'de> for Entry { /// Scope for filesystem access. #[derive(Debug)] pub struct Scope<'a> { - allowed: Vec<&'a Entry>, - denied: Vec<&'a Entry>, + allowed: Vec<&'a Arc>, + denied: Vec<&'a Arc>, } impl<'a> Scope<'a> { /// Creates a new scope from the scope configuration. - pub(crate) fn new(allowed: Vec<&'a Entry>, denied: Vec<&'a Entry>) -> Self { + pub(crate) fn new(allowed: Vec<&'a Arc>, denied: Vec<&'a Arc>) -> Self { Self { allowed, denied } } /// Determines if the given URL is allowed on this scope. pub fn is_allowed(&self, url: &Url) -> bool { let denied = self.denied.iter().any(|entry| { - entry.url.matches(url.as_str()) - || entry - .url - .matches(url.as_str().strip_suffix('/').unwrap_or_default()) + entry + .url + .test(UrlPatternMatchInput::Url(url.clone())) + .unwrap_or_default() }); if denied { false } else { self.allowed.iter().any(|entry| { - entry.url.matches(url.as_str()) - || entry - .url - .matches(url.as_str().strip_suffix('/').unwrap_or_default()) + entry + .url + .test(UrlPatternMatchInput::Url(url.clone())) + .unwrap_or_default() }) } } @@ -70,23 +81,31 @@ impl<'a> Scope<'a> { #[cfg(test)] mod tests { - use std::str::FromStr; + use std::{str::FromStr, sync::Arc}; use super::Entry; impl FromStr for Entry { - type Err = glob::PatternError; + type Err = urlpattern::quirks::Error; fn from_str(s: &str) -> Result { - let pattern = s.parse()?; + let pattern = super::parse_url_pattern(s)?; Ok(Self { url: pattern }) } } #[test] - fn is_allowed() { + fn denied_takes_precedence() { + let allow = Arc::new("http://localhost:8080/file.png".parse().unwrap()); + let deny = Arc::new("http://localhost:8080/*".parse().unwrap()); + let scope = super::Scope::new(vec![&allow], vec![&deny]); + assert!(!scope.is_allowed(&"http://localhost:8080/file.png".parse().unwrap())); + } + + #[test] + fn fixed_url() { // plain URL - let entry = "http://localhost:8080".parse().unwrap(); + let entry = Arc::new("http://localhost:8080".parse().unwrap()); let scope = super::Scope::new(vec![&entry], Vec::new()); assert!(scope.is_allowed(&"http://localhost:8080".parse().unwrap())); assert!(scope.is_allowed(&"http://localhost:8080/".parse().unwrap())); @@ -96,15 +115,12 @@ mod tests { assert!(!scope.is_allowed(&"https://localhost:8080".parse().unwrap())); assert!(!scope.is_allowed(&"http://localhost:8081".parse().unwrap())); assert!(!scope.is_allowed(&"http://local:8080".parse().unwrap())); + } - // deny takes precedence - let allow = "http://localhost:8080/file.png".parse().unwrap(); - let deny = "http://localhost:8080/*".parse().unwrap(); - let scope = super::Scope::new(vec![&allow], vec![&deny]); - assert!(!scope.is_allowed(&"http://localhost:8080/file.png".parse().unwrap())); - + #[test] + fn fixed_path() { // URL with fixed path - let entry = "http://localhost:8080/file.png".parse().unwrap(); + let entry = Arc::new("http://localhost:8080/file.png".parse().unwrap()); let scope = super::Scope::new(vec![&entry], Vec::new()); assert!(scope.is_allowed(&"http://localhost:8080/file.png".parse().unwrap())); @@ -112,27 +128,52 @@ mod tests { assert!(!scope.is_allowed(&"http://localhost:8080".parse().unwrap())); assert!(!scope.is_allowed(&"http://localhost:8080/file".parse().unwrap())); assert!(!scope.is_allowed(&"http://localhost:8080/file.png/other.jpg".parse().unwrap())); + } - // URL with glob pattern - let entry = "http://localhost:8080/*.png".parse().unwrap(); + #[test] + fn pattern_wildcard() { + let entry = Arc::new("http://localhost:8080/*.png".parse().unwrap()); let scope = super::Scope::new(vec![&entry], Vec::new()); assert!(scope.is_allowed(&"http://localhost:8080/file.png".parse().unwrap())); assert!(scope.is_allowed(&"http://localhost:8080/assets/file.png".parse().unwrap())); assert!(!scope.is_allowed(&"http://localhost:8080/file.jpeg".parse().unwrap())); + } - let entry = "http://*".parse().unwrap(); + #[test] + fn domain_wildcard() { + let entry = Arc::new("http://*".parse().unwrap()); let scope = super::Scope::new(vec![&entry], Vec::new()); assert!(scope.is_allowed(&"http://something.else".parse().unwrap())); - assert!(scope.is_allowed(&"http://something.else/path/to/file".parse().unwrap())); + assert!(!scope.is_allowed(&"http://something.else/path/to/file".parse().unwrap())); assert!(!scope.is_allowed(&"https://something.else".parse().unwrap())); - let entry = "http://**".parse().unwrap(); + let entry = Arc::new("http://*/*".parse().unwrap()); + let scope = super::Scope::new(vec![&entry], Vec::new()); + + assert!(scope.is_allowed(&"http://something.else".parse().unwrap())); + assert!(scope.is_allowed(&"http://something.else/path/to/file".parse().unwrap())); + } + + #[test] + fn scheme_wildcard() { + let entry = Arc::new("*://*".parse().unwrap()); + let scope = super::Scope::new(vec![&entry], Vec::new()); + + assert!(scope.is_allowed(&"http://something.else".parse().unwrap())); + assert!(!scope.is_allowed(&"http://something.else/path/to/file".parse().unwrap())); + assert!(scope.is_allowed(&"file://path".parse().unwrap())); + assert!(!scope.is_allowed(&"file://path/to/file".parse().unwrap())); + assert!(scope.is_allowed(&"https://something.else".parse().unwrap())); + + let entry = Arc::new("*://*/*".parse().unwrap()); let scope = super::Scope::new(vec![&entry], Vec::new()); assert!(scope.is_allowed(&"http://something.else".parse().unwrap())); assert!(scope.is_allowed(&"http://something.else/path/to/file".parse().unwrap())); + assert!(scope.is_allowed(&"file://path/to/file".parse().unwrap())); + assert!(scope.is_allowed(&"https://something.else".parse().unwrap())); } } diff --git a/plugins/localhost/CHANGELOG.md b/plugins/localhost/CHANGELOG.md index d69e3727..2578d639 100644 --- a/plugins/localhost/CHANGELOG.md +++ b/plugins/localhost/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## \[2.0.0-beta.2] + +- [`99bea25`](https://github.com/tauri-apps/plugins-workspace/commit/99bea2559c2c0648c2519c50a18cd124dacef57b)([#1005](https://github.com/tauri-apps/plugins-workspace/pull/1005)) Update to tauri beta.8. + ## \[2.0.0-beta.1] - [`14f381a`](https://github.com/tauri-apps/plugins-workspace/commit/14f381acf8fe690acecc676922c6f05939b95734) Update MSRV to 1.75. diff --git a/plugins/localhost/Cargo.toml b/plugins/localhost/Cargo.toml index e23343dc..c571e4fa 100644 --- a/plugins/localhost/Cargo.toml +++ b/plugins/localhost/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tauri-plugin-localhost" -version = "2.0.0-beta.1" +version = "2.0.0-beta.2" description = "Expose your apps assets through a localhost server instead of the default custom protocol." authors = { workspace = true } license = { workspace = true } diff --git a/plugins/log/CHANGELOG.md b/plugins/log/CHANGELOG.md index 2978fe21..f3b4c5e0 100644 --- a/plugins/log/CHANGELOG.md +++ b/plugins/log/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## \[2.0.0-beta.2] + +- [`99bea25`](https://github.com/tauri-apps/plugins-workspace/commit/99bea2559c2c0648c2519c50a18cd124dacef57b)([#1005](https://github.com/tauri-apps/plugins-workspace/pull/1005)) Update to tauri beta.8. + ## \[2.0.0-beta.1] - [`569defb`](https://github.com/tauri-apps/plugins-workspace/commit/569defbe9492e38938554bb7bdc1be9151456d21) Update to tauri beta.4. @@ -45,4 +49,4 @@ https://github.com/tauri-apps/plugins-workspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! ase! 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! + 717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! diff --git a/plugins/log/Cargo.toml b/plugins/log/Cargo.toml index 309431c7..bb8f35e8 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.1" +version = "2.0.0-beta.2" description = "Configurable logging for your Tauri app." authors = { workspace = true } license = { workspace = true } diff --git a/plugins/log/package.json b/plugins/log/package.json index 7f071e03..17d96936 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.1", + "version": "2.0.0-beta.2", "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.2" + "@tauri-apps/api": "2.0.0-beta.4" } } diff --git a/plugins/nfc/CHANGELOG.md b/plugins/nfc/CHANGELOG.md index 0350c5d7..eb51853b 100644 --- a/plugins/nfc/CHANGELOG.md +++ b/plugins/nfc/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## \[2.0.0-beta.2] + +- [`99bea25`](https://github.com/tauri-apps/plugins-workspace/commit/99bea2559c2c0648c2519c50a18cd124dacef57b)([#1005](https://github.com/tauri-apps/plugins-workspace/pull/1005)) Update to tauri beta.8. + ## \[2.0.0-beta.1] - [`569defb`](https://github.com/tauri-apps/plugins-workspace/commit/569defbe9492e38938554bb7bdc1be9151456d21) Update to tauri beta.4. @@ -12,4 +16,4 @@ ## \[2.0.0-alpha.0] - [`fe79adb`](https://github.com/tauri-apps/plugins-workspace/commit/fe79adb5c7febd0e912efb5581264d671709fbb0)([#830](https://github.com/tauri-apps/plugins-workspace/pull/830)) Initial release. -commit/fe79adb5c7febd0e912efb5581264d671709fbb0)([#830](https://github.com/tauri-apps/plugins-workspace/pull/830)) Initial release. + commit/fe79adb5c7febd0e912efb5581264d671709fbb0)([#830](https://github.com/tauri-apps/plugins-workspace/pull/830)) Initial release. diff --git a/plugins/nfc/Cargo.toml b/plugins/nfc/Cargo.toml index 507fc519..fd8d5445 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.1" +version = "2.0.0-beta.2" description = "Read and write NFC tags on Android and iOS." edition = { workspace = true } authors = { workspace = true } diff --git a/plugins/nfc/package.json b/plugins/nfc/package.json index aeb4ac2d..021b1342 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.1", + "version": "2.0.0-beta.2", "license": "MIT or APACHE-2.0", "authors": [ "Tauri Programme within The Commons Conservancy" @@ -27,6 +27,6 @@ "tslib": "2.6.0" }, "dependencies": { - "@tauri-apps/api": "2.0.0-beta.2" + "@tauri-apps/api": "2.0.0-beta.4" } } diff --git a/plugins/notification/CHANGELOG.md b/plugins/notification/CHANGELOG.md index 0e8731dc..aad236e3 100644 --- a/plugins/notification/CHANGELOG.md +++ b/plugins/notification/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## \[2.0.0-beta.2] + +- [`99bea25`](https://github.com/tauri-apps/plugins-workspace/commit/99bea2559c2c0648c2519c50a18cd124dacef57b)([#1005](https://github.com/tauri-apps/plugins-workspace/pull/1005)) Update to tauri beta.8. + ## \[2.0.0-beta.1] - [`569defb`](https://github.com/tauri-apps/plugins-workspace/commit/569defbe9492e38938554bb7bdc1be9151456d21) Update to tauri beta.4. @@ -53,4 +57,4 @@ - [`717ae67`](https://github.com/tauri-apps/plugins-workspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! ithub.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! + 717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! diff --git a/plugins/notification/Cargo.toml b/plugins/notification/Cargo.toml index eb5e6a86..c9addf08 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.1" +version = "2.0.0-beta.2" description = "Send desktop and mobile notifications on your Tauri application." edition = { workspace = true } authors = { workspace = true } diff --git a/plugins/notification/package.json b/plugins/notification/package.json index cc16ce62..1115719e 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.1", + "version": "2.0.0-beta.2", "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.2" + "@tauri-apps/api": "2.0.0-beta.4" } } diff --git a/plugins/notification/src/api-iife.js b/plugins/notification/src/api-iife.js index 3d8c020a..5a3bcb32 100644 --- a/plugins/notification/src/api-iife.js +++ b/plugins/notification/src/api-iife.js @@ -1 +1 @@ -if("__TAURI__"in window){var __TAURI_PLUGIN_NOTIFICATION__=function(n){"use strict";function e(n,e,i,t){if("a"===i&&!t)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?n!==e||!t:!e.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?t:"a"===i?t.call(n):t?t.value:e.get(n)}var i,t,o,r;"function"==typeof SuppressedError&&SuppressedError;class a{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,i.set(this,(()=>{})),this.id=function(n,e=!1){return window.__TAURI_INTERNALS__.transformCallback(n,e)}((n=>{e(this,i,"f").call(this,n)}))}set onmessage(n){!function(n,e,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 e?n!==e||!o:!e.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===t?o.call(n,i):o?o.value=i:e.set(n,i)}(this,i,n,"f")}get onmessage(){return e(this,i,"f")}toJSON(){return`__CHANNEL__:${this.id}`}}i=new WeakMap;class c{constructor(n,e,i){this.plugin=n,this.event=e,this.channelId=i}async unregister(){return u(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}}async function s(n,e,i){const t=new a;return t.onmessage=i,u(`plugin:${n}|register_listener`,{event:e,handler:t}).then((()=>new c(n,e,t.id)))}async function u(n,e={},i){return window.__TAURI_INTERNALS__.invoke(n,e,i)}n.ScheduleEvery=void 0,(t=n.ScheduleEvery||(n.ScheduleEvery={})).Year="year",t.Month="month",t.TwoWeeks="twoWeeks",t.Week="week",t.Day="day",t.Hour="hour",t.Minute="minute",t.Second="second";return n.Importance=void 0,(o=n.Importance||(n.Importance={}))[o.None=0]="None",o[o.Min=1]="Min",o[o.Low=2]="Low",o[o.Default=3]="Default",o[o.High=4]="High",n.Visibility=void 0,(r=n.Visibility||(n.Visibility={}))[r.Secret=-1]="Secret",r[r.Private=0]="Private",r[r.Public=1]="Public",n.Schedule=class{static at(n,e=!1,i=!1){return{at:{date:n,repeating:e,allowWhileIdle:i},interval:void 0,every:void 0}}static interval(n,e=!1){return{at:void 0,interval:{interval:n,allowWhileIdle:e},every:void 0}}static every(n,e,i=!1){return{at:void 0,interval:void 0,every:{interval:n,count:e,allowWhileIdle:i}}}},n.active=async function(){return u("plugin:notification|get_active")},n.cancel=async function(n){return u("plugin:notification|cancel",{notifications:n})},n.cancelAll=async function(){return u("plugin:notification|cancel")},n.channels=async function(){return u("plugin:notification|listChannels")},n.createChannel=async function(n){return u("plugin:notification|create_channel",{...n})},n.isPermissionGranted=async function(){return"default"!==window.Notification.permission?Promise.resolve("granted"===window.Notification.permission):u("plugin:notification|is_permission_granted")},n.onAction=async function(n){return s("notification","actionPerformed",n)},n.onNotificationReceived=async function(n){return s("notification","notification",n)},n.pending=async function(){return u("plugin:notification|get_pending")},n.registerActionTypes=async function(n){return u("plugin:notification|register_action_types",{types:n})},n.removeActive=async function(n){return u("plugin:notification|remove_active",{notifications:n})},n.removeAllActive=async function(){return u("plugin:notification|remove_active")},n.removeChannel=async function(n){return u("plugin:notification|delete_channel",{id:n})},n.requestPermission=async function(){return window.Notification.requestPermission()},n.sendNotification=function(n){"string"==typeof n?new window.Notification(n):new window.Notification(n.title,n)},n}({});Object.defineProperty(window.__TAURI__,"notification",{value:__TAURI_PLUGIN_NOTIFICATION__})} +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__})} diff --git a/plugins/notification/src/desktop.rs b/plugins/notification/src/desktop.rs index be3c348e..5abd0d23 100644 --- a/plugins/notification/src/desktop.rs +++ b/plugins/notification/src/desktop.rs @@ -247,9 +247,8 @@ mod imp { #[cfg(all(windows, feature = "windows7-compat"))] fn notify_win7(self, app: &tauri::AppHandle) -> crate::Result<()> { - let app = app.clone(); - let default_window_icon = app.default_window_icon().cloned(); - let _ = app.run_on_main_thread(move || { + let app_ = app.clone(); + let _ = app.clone().run_on_main_thread(move || { let mut notification = win7_notifications::Notification::new(); if let Some(body) = self.body { notification.body(&body); @@ -257,13 +256,8 @@ mod imp { if let Some(title) = self.title { notification.summary(&title); } - if let Some(tauri::Icon::Rgba { - rgba, - width, - height, - }) = default_window_icon - { - notification.icon(rgba, width, height); + if let Some(icon) = app_.default_window_icon() { + notification.icon(icon.rgba().to_vec(), icon.width(), icon.height()); } let _ = notification.show(); }); diff --git a/plugins/os/CHANGELOG.md b/plugins/os/CHANGELOG.md index 6355fe2e..8a0c3fae 100644 --- a/plugins/os/CHANGELOG.md +++ b/plugins/os/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## \[2.0.0-beta.2] + +- [`99bea25`](https://github.com/tauri-apps/plugins-workspace/commit/99bea2559c2c0648c2519c50a18cd124dacef57b)([#1005](https://github.com/tauri-apps/plugins-workspace/pull/1005)) Update to tauri beta.8. + ## \[2.0.0-beta.1] - [`569defb`](https://github.com/tauri-apps/plugins-workspace/commit/569defbe9492e38938554bb7bdc1be9151456d21) Update to tauri beta.4. @@ -53,4 +57,4 @@ - [`717ae67`](https://github.com/tauri-apps/plugins-workspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! ae67\`]\(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! + 717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! diff --git a/plugins/os/Cargo.toml b/plugins/os/Cargo.toml index 5be5846f..1e6b71ea 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.1" +version = "2.0.0-beta.2" description = "Read information about the operating system." edition = { workspace = true } authors = { workspace = true } diff --git a/plugins/os/package.json b/plugins/os/package.json index 53fbd680..b4293840 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.1", + "version": "2.0.0-beta.2", "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.2" + "@tauri-apps/api": "2.0.0-beta.4" } } diff --git a/plugins/persisted-scope/CHANGELOG.md b/plugins/persisted-scope/CHANGELOG.md index 6d5c6514..96409e4e 100644 --- a/plugins/persisted-scope/CHANGELOG.md +++ b/plugins/persisted-scope/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## \[2.0.0-beta.2] + +- [`99bea25`](https://github.com/tauri-apps/plugins-workspace/commit/99bea2559c2c0648c2519c50a18cd124dacef57b)([#1005](https://github.com/tauri-apps/plugins-workspace/pull/1005)) Update to tauri beta.8. + +### Dependencies + +- Upgraded to `fs@2.0.0-beta.2` + ## \[2.0.0-beta.1] - [`14f381a`](https://github.com/tauri-apps/plugins-workspace/commit/14f381acf8fe690acecc676922c6f05939b95734) Update MSRV to 1.75. diff --git a/plugins/persisted-scope/Cargo.toml b/plugins/persisted-scope/Cargo.toml index c8f75f0f..afa9d736 100644 --- a/plugins/persisted-scope/Cargo.toml +++ b/plugins/persisted-scope/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tauri-plugin-persisted-scope" -version = "2.0.0-beta.1" +version = "2.0.0-beta.2" description = "Save filesystem and asset scopes and restore them when the app is reopened." authors = { workspace = true } license = { workspace = true } @@ -19,7 +19,7 @@ log = { workspace = true } thiserror = { workspace = true } aho-corasick = "1" bincode = "1" -tauri-plugin-fs = { path = "../fs", version = "2.0.0-beta.1" } +tauri-plugin-fs = { path = "../fs", version = "2.0.0-beta.2" } [features] protocol-asset = [ "tauri/protocol-asset" ] diff --git a/plugins/positioner/CHANGELOG.md b/plugins/positioner/CHANGELOG.md index ebf02bd3..e1c92761 100644 --- a/plugins/positioner/CHANGELOG.md +++ b/plugins/positioner/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## \[2.0.0-beta.2] + +- [`99bea25`](https://github.com/tauri-apps/plugins-workspace/commit/99bea2559c2c0648c2519c50a18cd124dacef57b)([#1005](https://github.com/tauri-apps/plugins-workspace/pull/1005)) Update to tauri beta.8. + ## \[2.0.0-beta.1] - [`569defb`](https://github.com/tauri-apps/plugins-workspace/commit/569defbe9492e38938554bb7bdc1be9151456d21) Update to tauri beta.4. @@ -101,4 +105,4 @@ \-19 data on 2021-11-19 - [39e517c](https://www.github.com/JonasKruckenberg/tauri-plugin-positioner/commit/39e517c145a4a901839ae9b46e296370ce6ababf) Update update-metadata.md on 2021-11-19 -m/JonasKruckenberg/tauri-plugin-positioner/commit/39e517c145a4a901839ae9b46e296370ce6ababf) Update update-metadata.md on 2021-11-19 + m/JonasKruckenberg/tauri-plugin-positioner/commit/39e517c145a4a901839ae9b46e296370ce6ababf) Update update-metadata.md on 2021-11-19 diff --git a/plugins/positioner/Cargo.toml b/plugins/positioner/Cargo.toml index 1e4b5730..1f6fc080 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.1" +version = "2.0.0-beta.2" description = "Position your windows at well-known locations." authors = { workspace = true } license = { workspace = true } diff --git a/plugins/positioner/package.json b/plugins/positioner/package.json index d1ed0729..320e69d4 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.1", + "version": "2.0.0-beta.2", "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.2" + "@tauri-apps/api": "2.0.0-beta.4" } } diff --git a/plugins/process/CHANGELOG.md b/plugins/process/CHANGELOG.md index 84b71e6f..03f3c39b 100644 --- a/plugins/process/CHANGELOG.md +++ b/plugins/process/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## \[2.0.0-beta.2] + +- [`99bea25`](https://github.com/tauri-apps/plugins-workspace/commit/99bea2559c2c0648c2519c50a18cd124dacef57b)([#1005](https://github.com/tauri-apps/plugins-workspace/pull/1005)) Update to tauri beta.8. + ## \[2.0.0-beta.1] - [`569defb`](https://github.com/tauri-apps/plugins-workspace/commit/569defbe9492e38938554bb7bdc1be9151456d21) Update to tauri beta.4. @@ -41,4 +45,4 @@ - [`717ae67`](https://github.com/tauri-apps/plugins-workspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! ae67\`]\(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! + 717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! diff --git a/plugins/process/Cargo.toml b/plugins/process/Cargo.toml index 5d1b2e1a..f8066f79 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.1" +version = "2.0.0-beta.2" description = "Access the current process of your Tauri application." edition = { workspace = true } authors = { workspace = true } diff --git a/plugins/process/package.json b/plugins/process/package.json index eb7a8af5..2e9ff28e 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.1", + "version": "2.0.0-beta.2", "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.2" + "@tauri-apps/api": "2.0.0-beta.4" } } diff --git a/plugins/shell/CHANGELOG.md b/plugins/shell/CHANGELOG.md index 13d76c86..70ff8287 100644 --- a/plugins/shell/CHANGELOG.md +++ b/plugins/shell/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## \[2.0.0-beta.2] + +- [`9586eab`](https://github.com/tauri-apps/plugins-workspace/commit/9586eabd5a96673e4d976757777f470ae358d68a)([#1021](https://github.com/tauri-apps/plugins-workspace/pull/1021)) On Windows, fix `open` can't open file if the file is being used by a program. +- [`99bea25`](https://github.com/tauri-apps/plugins-workspace/commit/99bea2559c2c0648c2519c50a18cd124dacef57b)([#1005](https://github.com/tauri-apps/plugins-workspace/pull/1005)) Update to tauri beta.8. + ## \[2.0.0-beta.1] - [`569defb`](https://github.com/tauri-apps/plugins-workspace/commit/569defbe9492e38938554bb7bdc1be9151456d21) Update to tauri beta.4. @@ -49,4 +54,6 @@ - [`717ae67`](https://github.com/tauri-apps/plugins-workspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! .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! + 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! diff --git a/plugins/shell/Cargo.toml b/plugins/shell/Cargo.toml index 89dfd1aa..97812318 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.1" +version = "2.0.0-beta.2" 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 } diff --git a/plugins/shell/package.json b/plugins/shell/package.json index fbaecb14..22d4ff24 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.1", + "version": "2.0.0-beta.2", "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.2" + "@tauri-apps/api": "2.0.0-beta.4" } } diff --git a/plugins/shell/src/api-iife.js b/plugins/shell/src/api-iife.js index a64b8710..efd4706b 100644 --- a/plugins/shell/src/api-iife.js +++ b/plugins/shell/src/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)}var s;"function"==typeof SuppressedError&&SuppressedError;class r{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,s.set(this,(()=>{})),this.id=function(e,t=!1){return window.__TAURI_INTERNALS__.transformCallback(e,t)}((e=>{t(this,s,"f").call(this,e)}))}set onmessage(e){!function(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");"a"===r?n.call(e,s):n?n.value=s:t.set(e,s)}(this,s,e,"f")}get onmessage(){return t(this,s,"f")}toJSON(){return`__CHANNEL__:${this.id}`}}async function n(e,t={},s){return window.__TAURI_INTERNALS__.invoke(e,t,s)}s=new WeakMap;class i{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 o{constructor(e){this.pid=e}async write(e){return n("plugin:shell|stdin_write",{pid:this.pid,buffer:"string"==typeof e?e:Array.from(e)})}async kill(){return n("plugin:shell|kill",{cmd:"killChild",pid:this.pid})}}class a extends i{constructor(e,t=[],s){super(),this.stdout=new i,this.stderr=new i,this.program=e,this.args="string"==typeof t?[t]:t,this.options=s??{}}static create(e,t=[],s){return new a(e,t,s)}static sidecar(e,t=[],s){const r=new a(e,t,s);return r.options.sidecar=!0,r}async spawn(){return async function(e,t,s=[],i){"object"==typeof s&&Object.freeze(s);const o=new r;return o.onmessage=e,n("plugin:shell|execute",{program:t,args:s,options:i,onEvent:o})}((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 o(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=o,e.Command=a,e.EventEmitter=i,e.open=async function(e,t){return n("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,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__})} diff --git a/plugins/shell/src/scope.rs b/plugins/shell/src/scope.rs index 6351196b..5f59fd7a 100644 --- a/plugins/shell/src/scope.rs +++ b/plugins/shell/src/scope.rs @@ -2,6 +2,8 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT +use std::sync::Arc; + use crate::open::Program; use crate::process::Command; @@ -141,7 +143,7 @@ pub struct OpenScope { #[derive(Clone)] pub struct ShellScope<'a> { /// All allowed commands, using their unique command name as the keys. - pub scopes: Vec<&'a ScopeAllowedCommand>, + pub scopes: Vec<&'a Arc>, } /// All errors that can happen while validating a scoped command. diff --git a/plugins/single-instance/CHANGELOG.md b/plugins/single-instance/CHANGELOG.md index f25e89a6..efcb3386 100644 --- a/plugins/single-instance/CHANGELOG.md +++ b/plugins/single-instance/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## \[2.0.0-beta.3] + +- [`2397ec5`](https://github.com/tauri-apps/plugins-workspace/commit/2397ec5937e594397e533925ccd257cae30b4cd1)([#1019](https://github.com/tauri-apps/plugins-workspace/pull/1019)) Fix doesn't shutdown immediately. +- [`99bea25`](https://github.com/tauri-apps/plugins-workspace/commit/99bea2559c2c0648c2519c50a18cd124dacef57b)([#1005](https://github.com/tauri-apps/plugins-workspace/pull/1005)) Update to tauri beta.8. + ## \[2.0.0-beta.2] - [`6d1e621`](https://github.com/tauri-apps/plugins-workspace/commit/6d1e6218b5877ef91f589f790f7251acda9c9605)([#981](https://github.com/tauri-apps/plugins-workspace/pull/981)) Fix `zbus::blocking::connection::Builder` import. diff --git a/plugins/single-instance/Cargo.toml b/plugins/single-instance/Cargo.toml index 7a5fb072..3635c1c4 100644 --- a/plugins/single-instance/Cargo.toml +++ b/plugins/single-instance/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tauri-plugin-single-instance" -version = "2.0.0-beta.2" +version = "2.0.0-beta.3" description = "Ensure a single instance of your tauri app is running." authors = { workspace = true } license = { workspace = true } diff --git a/plugins/single-instance/examples/vanilla/package.json b/plugins/single-instance/examples/vanilla/package.json index 0a0e8683..0c42201c 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.3" + "@tauri-apps/cli": "2.0.0-beta.7" } } diff --git a/plugins/single-instance/examples/vanilla/src-tauri/Cargo.toml b/plugins/single-instance/examples/vanilla/src-tauri/Cargo.toml index 13da3100..badede36 100644 --- a/plugins/single-instance/examples/vanilla/src-tauri/Cargo.toml +++ b/plugins/single-instance/examples/vanilla/src-tauri/Cargo.toml @@ -2,7 +2,7 @@ name = "single-instance-example" version = "0.1.0" description = "A Tauri App" -authors = [ "You" ] +authors = ["You"] repository = "" edition = "2021" rust-version = "1.75" @@ -17,4 +17,4 @@ tauri-plugin-single-instance = { path = "../../../" } tauri-build = { workspace = true } [features] -custom-protocol = [ "tauri/custom-protocol" ] +prod = ["tauri/custom-protocol"] diff --git a/plugins/sql/CHANGELOG.md b/plugins/sql/CHANGELOG.md index 57dc46dd..f82a1ddd 100644 --- a/plugins/sql/CHANGELOG.md +++ b/plugins/sql/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## \[2.0.0-beta.2] + +- [`99bea25`](https://github.com/tauri-apps/plugins-workspace/commit/99bea2559c2c0648c2519c50a18cd124dacef57b)([#1005](https://github.com/tauri-apps/plugins-workspace/pull/1005)) Update to tauri beta.8. + ## \[2.0.0-beta.1] - [`569defb`](https://github.com/tauri-apps/plugins-workspace/commit/569defbe9492e38938554bb7bdc1be9151456d21) Update to tauri beta.4. @@ -51,4 +55,4 @@ - [`717ae67`](https://github.com/tauri-apps/plugins-workspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! ae67\`]\(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! + 717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! diff --git a/plugins/sql/Cargo.toml b/plugins/sql/Cargo.toml index d74c3f86..ada300ce 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.1" +version = "2.0.0-beta.2" description = "Interface with SQL databases." authors = { workspace = true } license = { workspace = true } diff --git a/plugins/sql/package.json b/plugins/sql/package.json index 211988bc..b7d32a61 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.1", + "version": "2.0.0-beta.2", "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.2" + "@tauri-apps/api": "2.0.0-beta.4" } } diff --git a/plugins/store/CHANGELOG.md b/plugins/store/CHANGELOG.md index c71ad4c8..1a94cc62 100644 --- a/plugins/store/CHANGELOG.md +++ b/plugins/store/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## \[2.0.0-beta.2] + +- [`99bea25`](https://github.com/tauri-apps/plugins-workspace/commit/99bea2559c2c0648c2519c50a18cd124dacef57b)([#1005](https://github.com/tauri-apps/plugins-workspace/pull/1005)) Update to tauri beta.8. + ## \[2.0.0-beta.1] - [`569defb`](https://github.com/tauri-apps/plugins-workspace/commit/569defbe9492e38938554bb7bdc1be9151456d21) Update to tauri beta.4. @@ -44,4 +48,4 @@ - [`717ae67`](https://github.com/tauri-apps/plugins-workspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! ae67\`]\(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! + 717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! diff --git a/plugins/store/Cargo.toml b/plugins/store/Cargo.toml index a91d96e4..04e7fdf6 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.1" +version = "2.0.0-beta.2" description = "Simple, persistent key-value store." authors = { workspace = true } license = { workspace = true } diff --git a/plugins/store/README.md b/plugins/store/README.md index ad746854..5b766c38 100644 --- a/plugins/store/README.md +++ b/plugins/store/README.md @@ -69,19 +69,30 @@ await store.set("some-key", { value: 5 }); const val = await store.get("some-key"); assert(val, { value: 5 }); -await store.save(); // this manually saves the store, otherwise the store is only saved when your app is closed +// This manually saves the store. +await store.save(); ``` -### Persisting values +### Persisting Values -Values added to the store are not persisted between application loads unless: +As seen above, values added to the store are not persisted between application loads unless the application is closed gracefully. -1. The application is closed gracefully (plugin automatically saves) -2. The store is manually saved (using `store.save()`) +You can manually save a store with: + +```javascript +await store.save(); +``` + +Stores are loaded automatically when used from the JavaScript bindings. +However, you can also load them manually later like so: + +```javascript +await store.load(); +``` ## Usage from Rust -You can also access Stores from Rust, you can create new stores: +You can also create `Store` instances directly in Rust: ```rust use tauri_plugin_store::StoreBuilder; @@ -91,23 +102,52 @@ fn main() { tauri::Builder::default() .plugin(tauri_plugin_store::Builder::default().build()) .setup(|app| { - let mut store = StoreBuilder::new(app.handle(), "path/to/store.bin".parse()?).build(); + let mut store = StoreBuilder::new("app_data.bin").build(app.handle().clone()); + + // Attempt to load the store, if it's saved already. + store.load().expect("Failed to load store from disk"); + + // Note that values must be serde_json::Value instances, + // otherwise, they will not be compatible with the JavaScript bindings. + store.insert("a".to_string(), json!("b")); - store.insert("a".to_string(), json!("b")) // note that values must be serd_json::Value to be compatible with JS + // You can manually save the store after making changes. + // Otherwise, it will save upon graceful exit as described above. + store.save() }) .run(tauri::generate_context!()) .expect("error while running tauri application"); } ``` -As you may have noticed, the Store crated above isn't accessible to the frontend. To interoperate with stores created by JS use the exported `with_store` method: +### Loading Gracefully + +If you call `load` on a `Store` that hasn't yet been written to the desk, it will return an error. You must handle this error if you want to gracefully continue and use the default store until you save it to the disk. The example above shows how to do this. + +For example, this would cause a panic if the store has not yet been created: + +```rust +store.load().unwrap(); +``` + +Rather than silently continuing like you may expect. + +You should always handle the error appropriately rather than unwrapping, or you may experience unexpected app crashes: + +```rust +store.load().expect("Failed to load store from disk"); +``` + +### Frontend Interoperability + +As you may have noticed, the `Store` crated above isn't accessible to the frontend. To interoperate with stores created by JavaScript use the exported `with_store` method: ```rust use tauri::Wry; use tauri_plugin_store::with_store; let stores = app.state::>(); -let path = PathBuf::from("path/to/the/storefile"); +let path = PathBuf::from("app_data.bin"); with_store(app_handle, stores, path, |store| store.insert("a".to_string(), json!("b"))) ``` diff --git a/plugins/store/package.json b/plugins/store/package.json index 3f92f163..fcb7c1f9 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.1", + "version": "2.0.0-beta.2", "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.2" + "@tauri-apps/api": "2.0.0-beta.4" } } diff --git a/plugins/stronghold/CHANGELOG.md b/plugins/stronghold/CHANGELOG.md index 32977003..59f0d0c5 100644 --- a/plugins/stronghold/CHANGELOG.md +++ b/plugins/stronghold/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## \[2.0.0-beta.2] + +- [`99bea25`](https://github.com/tauri-apps/plugins-workspace/commit/99bea2559c2c0648c2519c50a18cd124dacef57b)([#1005](https://github.com/tauri-apps/plugins-workspace/pull/1005)) Update to tauri beta.8. + ## \[2.0.0-beta.1] - [`569defb`](https://github.com/tauri-apps/plugins-workspace/commit/569defbe9492e38938554bb7bdc1be9151456d21) Update to tauri beta.4. @@ -42,4 +46,4 @@ - [`717ae67`](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! \`]\(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! + 717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! diff --git a/plugins/stronghold/Cargo.toml b/plugins/stronghold/Cargo.toml index 8fb6f4a4..ab434818 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.1" +version = "2.0.0-beta.2" description = "Store secrets and keys using the IOTA Stronghold encrypted database." authors = { workspace = true } license = { workspace = true } diff --git a/plugins/stronghold/package.json b/plugins/stronghold/package.json index 9f519ace..e843ed02 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.1", + "version": "2.0.0-beta.2", "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.2" + "@tauri-apps/api": "2.0.0-beta.4" } } diff --git a/plugins/updater/CHANGELOG.md b/plugins/updater/CHANGELOG.md index 16ffe235..7f0e2a88 100644 --- a/plugins/updater/CHANGELOG.md +++ b/plugins/updater/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## \[2.0.0-beta.2] + +- [`99bea25`](https://github.com/tauri-apps/plugins-workspace/commit/99bea2559c2c0648c2519c50a18cd124dacef57b)([#1005](https://github.com/tauri-apps/plugins-workspace/pull/1005)) Update to tauri beta.8. + ## \[2.0.0-beta.1] - [`569defb`](https://github.com/tauri-apps/plugins-workspace/commit/569defbe9492e38938554bb7bdc1be9151456d21) Update to tauri beta.4. @@ -81,4 +85,4 @@ ## \[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! + 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 e30345c9..2440a6ec 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.1" +version = "2.0.0-beta.2" description = "In-app updates for Tauri applications." edition = { workspace = true } authors = { workspace = true } diff --git a/plugins/updater/package.json b/plugins/updater/package.json index 15a8cf63..38814ca6 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.1", + "version": "2.0.0-beta.2", "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.2" + "@tauri-apps/api": "2.0.0-beta.4" } } diff --git a/plugins/updater/src/api-iife.js b/plugins/updater/src/api-iife.js index 2e443929..9688891a 100644 --- a/plugins/updater/src/api-iife.js +++ b/plugins/updater/src/api-iife.js @@ -1 +1 @@ -if("__TAURI__"in window){var __TAURI_PLUGIN_UPDATER__=function(e){"use strict";function r(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)}function t(e,r,t,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 r?e!==r||!s:!r.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?s.call(e,t):s?s.value=t:r.set(e,t),t}var n,s;"function"==typeof SuppressedError&&SuppressedError;class i{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,n.set(this,(()=>{})),this.id=function(e,r=!1){return window.__TAURI_INTERNALS__.transformCallback(e,r)}((e=>{r(this,n,"f").call(this,e)}))}set onmessage(e){t(this,n,e,"f")}get onmessage(){return r(this,n,"f")}toJSON(){return`__CHANNEL__:${this.id}`}}async function a(e,r={},t){return window.__TAURI_INTERNALS__.invoke(e,r,t)}n=new WeakMap;class o{get rid(){return r(this,s,"f")}constructor(e){s.set(this,void 0),t(this,s,e,"f")}async close(){return a("plugin:resources|close",{rid:this.rid})}}s=new WeakMap;class c extends o{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 r=new i;return e&&(r.onmessage=e),a("plugin:updater|download_and_install",{onEvent:r,rid:this.rid})}}return e.Update=c,e.check=async function(e){return e?.headers&&(e.headers=Array.from(new Headers(e.headers).entries())),a("plugin:updater|check",{...e}).then((e=>e.available?new c(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,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__})} diff --git a/plugins/updater/tests/app-updater/Cargo.toml b/plugins/updater/tests/app-updater/Cargo.toml index c80ac920..195f3ab0 100644 --- a/plugins/updater/tests/app-updater/Cargo.toml +++ b/plugins/updater/tests/app-updater/Cargo.toml @@ -15,4 +15,4 @@ tiny_http = "0.11" time = { version = "0.3", features = ["formatting"] } [features] -custom-protocol = ["tauri/custom-protocol"] +prod = ["tauri/custom-protocol"] diff --git a/plugins/updater/tests/app-updater/tauri.conf.json b/plugins/updater/tests/app-updater/tauri.conf.json index 5eb96954..6eb919ef 100644 --- a/plugins/updater/tests/app-updater/tauri.conf.json +++ b/plugins/updater/tests/app-updater/tauri.conf.json @@ -3,7 +3,7 @@ "plugins": { "updater": { "endpoints": ["http://localhost:3007"], - "pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IEMwNjY1MEExMTFBMDU5RTUKUldUbFdhQVJvVkJtd09sZ1ROT25yVGFhU2o0ZnUyd1FlT0ZTQ2ZXamN3SXk4SjZLZmNwRnV5dTMK", + "pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IEUwNDRGMjkwRjg2MDhCRDAKUldUUWkyRDRrUEpFNEQ4SmdwcU5PaXl6R2ZRUUNvUnhIaVkwVUltV0NMaEx6VTkrWVhpT0ZqeEEK", "windows": { "installMode": "quiet" } diff --git a/plugins/updater/tests/app-updater/tests/update.rs b/plugins/updater/tests/app-updater/tests/update.rs index 797be1f8..9b6b520e 100644 --- a/plugins/updater/tests/app-updater/tests/update.rs +++ b/plugins/updater/tests/app-updater/tests/update.rs @@ -13,7 +13,7 @@ use std::{ use serde::Serialize; -const UPDATER_PRIVATE_KEY: &str = "dW50cnVzdGVkIGNvbW1lbnQ6IHJzaWduIGVuY3J5cHRlZCBzZWNyZXQga2V5ClJXUlRZMEl5Qm9uUXIyeEM2YkczeGMwZDFENmw1WHEzaFk5aDlOOXNyTWRxRnY4UUpzZ0FBQkFBQUFBQUFBQUFBQUlBQUFBQTVWbWdFYUZRWnNDZmdyUW9ibWExVEFTY0pVTWpVS2xlOHdhR1I3Q3hpd2FTNjg1MXZENEQyZWxnVE5PbnJUYWFTajRmdTJ3UWVPRlNDZldqY3dJeThKNktmY3BGdXl1M1BPdHgwOFhIQzJLSnpqS0Z2cVdmaEs2WWRmK3d4SHVCMlpHVGduaVAzclU9Cg=="; +const UPDATER_PRIVATE_KEY: &str = "dW50cnVzdGVkIGNvbW1lbnQ6IHJzaWduIGVuY3J5cHRlZCBzZWNyZXQga2V5ClJXUlRZMEl5TlFOMFpXYzJFOUdjeHJEVXY4WE1TMUxGNDJVUjNrMmk1WlR3UVJVUWwva0FBQkFBQUFBQUFBQUFBQUlBQUFBQUpVK3ZkM3R3eWhyN3hiUXhQb2hvWFVzUW9FbEs3NlNWYjVkK1F2VGFRU1FEaGxuRUtlell5U0gxYS9DbVRrS0YyZVJGblhjeXJibmpZeGJjS0ZKSUYwYndYc2FCNXpHalM3MHcrODMwN3kwUG9SOWpFNVhCSUd6L0E4TGRUT096TEtLR1JwT1JEVFU9Cg=="; #[derive(Serialize)] struct Config { diff --git a/plugins/upload/CHANGELOG.md b/plugins/upload/CHANGELOG.md index fab00b13..f25f9bf5 100644 --- a/plugins/upload/CHANGELOG.md +++ b/plugins/upload/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## \[2.0.0-beta.2] + +- [`99bea25`](https://github.com/tauri-apps/plugins-workspace/commit/99bea2559c2c0648c2519c50a18cd124dacef57b)([#1005](https://github.com/tauri-apps/plugins-workspace/pull/1005)) Update to tauri beta.8. + ## \[2.0.0-beta.1] - [`569defb`](https://github.com/tauri-apps/plugins-workspace/commit/569defbe9492e38938554bb7bdc1be9151456d21) Update to tauri beta.4. @@ -42,4 +46,4 @@ - [`717ae67`](https://github.com/tauri-apps/plugins-workspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! 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! + 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 2db3ac15..e8c3a9f2 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.1" +version = "2.0.0-beta.2" description = "Upload files from disk to a remote server over HTTP." authors = { workspace = true } license = { workspace = true } diff --git a/plugins/upload/package.json b/plugins/upload/package.json index 21756994..94d41c95 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.1", + "version": "2.0.0-beta.2", "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.2" + "@tauri-apps/api": "2.0.0-beta.4" } } diff --git a/plugins/upload/src/api-iife.js b/plugins/upload/src/api-iife.js index d81c4d17..2cfe2d5a 100644 --- a/plugins/upload/src/api-iife.js +++ b/plugins/upload/src/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)}var n;"function"==typeof SuppressedError&&SuppressedError;class r{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,n.set(this,(()=>{})),this.id=function(e,t=!1){return window.__TAURI_INTERNALS__.transformCallback(e,t)}((e=>{t(this,n,"f").call(this,e)}))}set onmessage(e){!function(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");"a"===r?o.call(e,n):o?o.value=n:t.set(e,n)}(this,n,e,"f")}get onmessage(){return t(this,n,"f")}toJSON(){return`__CHANNEL__:${this.id}`}}async function o(e,t={},n){return window.__TAURI_INTERNALS__.invoke(e,t,n)}return n=new WeakMap,e.download=async function(e,t,n,a){const i=new Uint32Array(1);window.crypto.getRandomValues(i);const s=i[0],_=new r;null!=n&&(_.onmessage=n),await o("plugin:upload|download",{id:s,url:e,filePath:t,headers:a??{},onProgress:_})},e.upload=async function(e,t,n,a){const i=new Uint32Array(1);window.crypto.getRandomValues(i);const s=i[0],_=new r;null!=n&&(_.onmessage=n),await o("plugin:upload|upload",{id:s,url:e,filePath:t,headers:a??{},onProgress:_})},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,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;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__})} diff --git a/plugins/websocket/CHANGELOG.md b/plugins/websocket/CHANGELOG.md index f8865a01..8b323a32 100644 --- a/plugins/websocket/CHANGELOG.md +++ b/plugins/websocket/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## \[2.0.0-beta.2] + +- [`99bea25`](https://github.com/tauri-apps/plugins-workspace/commit/99bea2559c2c0648c2519c50a18cd124dacef57b)([#1005](https://github.com/tauri-apps/plugins-workspace/pull/1005)) Update to tauri beta.8. + ## \[2.0.0-beta.1] - [`569defb`](https://github.com/tauri-apps/plugins-workspace/commit/569defbe9492e38938554bb7bdc1be9151456d21) Update to tauri beta.4. @@ -47,4 +51,4 @@ - [`717ae67`](https://github.com/tauri-apps/plugins-workspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! ae67\`]\(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! + 717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! diff --git a/plugins/websocket/Cargo.toml b/plugins/websocket/Cargo.toml index ab3beff2..8d4d042e 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.1" +version = "2.0.0-beta.2" description = "Expose a WebSocket server to your Tauri frontend." authors = { workspace = true } license = { workspace = true } diff --git a/plugins/websocket/examples/tauri-app/package.json b/plugins/websocket/examples/tauri-app/package.json index dc916a38..83fc03d7 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.3", + "@tauri-apps/cli": "2.0.0-beta.7", "typescript": "^5.3.3", "vite": "^5.0.12" }, diff --git a/plugins/websocket/examples/tauri-app/src-tauri/Cargo.toml b/plugins/websocket/examples/tauri-app/src-tauri/Cargo.toml index fb3b862c..88e4efd6 100644 --- a/plugins/websocket/examples/tauri-app/src-tauri/Cargo.toml +++ b/plugins/websocket/examples/tauri-app/src-tauri/Cargo.toml @@ -17,4 +17,4 @@ tokio-tungstenite = "0.21" tauri-build = { workspace = true } [features] -custom-protocol = [ "tauri/custom-protocol" ] +prod = ["tauri/custom-protocol"] diff --git a/plugins/websocket/package.json b/plugins/websocket/package.json index a2fddbdd..421297ca 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.1", + "version": "2.0.0-beta.2", "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.2" + "@tauri-apps/api": "2.0.0-beta.4" } } diff --git a/plugins/websocket/src/api-iife.js b/plugins/websocket/src/api-iife.js index 12fc8534..d24a7de9 100644 --- a/plugins/websocket/src/api-iife.js +++ b/plugins/websocket/src/api-iife.js @@ -1 +1 @@ -if("__TAURI__"in window){var __TAURI_PLUGIN_WEBSOCKET__=function(){"use strict";function e(e,t,r,n){if("a"===r&&!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"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}var t;"function"==typeof SuppressedError&&SuppressedError;class r{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,t.set(this,(()=>{})),this.id=function(e,t=!1){return window.__TAURI_INTERNALS__.transformCallback(e,t)}((r=>{e(this,t,"f").call(this,r)}))}set onmessage(e){!function(e,t,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 t?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===n?s.call(e,r):s?s.value=r:t.set(e,r)}(this,t,e,"f")}get onmessage(){return e(this,t,"f")}toJSON(){return`__CHANNEL__:${this.id}`}}async function n(e,t={},r){return window.__TAURI_INTERNALS__.invoke(e,t,r)}t=new WeakMap;class s{constructor(e,t){this.id=e,this.listeners=t}static async connect(e,t){const a=[],i=new r;return i.onmessage=e=>{a.forEach((t=>t(e)))},t?.headers&&(t.headers=Array.from(new Headers(t.headers).entries())),await n("plugin:websocket|connect",{url:e,onMessage:i,config:t}).then((e=>new s(e,a)))}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 n("plugin:websocket|send",{id:this.id,message:t})}async disconnect(){return await this.send({type:"Close",data:{code:1e3,reason:"Disconnected by client"}})}}return s}();Object.defineProperty(window.__TAURI__,"websocket",{value:__TAURI_PLUGIN_WEBSOCKET__})} +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__})} diff --git a/plugins/window-state/CHANGELOG.md b/plugins/window-state/CHANGELOG.md index 7a380c03..99cfb82a 100644 --- a/plugins/window-state/CHANGELOG.md +++ b/plugins/window-state/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## \[2.0.0-beta.2] + +- [`99bea25`](https://github.com/tauri-apps/plugins-workspace/commit/99bea2559c2c0648c2519c50a18cd124dacef57b)([#1005](https://github.com/tauri-apps/plugins-workspace/pull/1005)) Update to tauri beta.8. + ## \[2.0.0-beta.1] - [`569defb`](https://github.com/tauri-apps/plugins-workspace/commit/569defbe9492e38938554bb7bdc1be9151456d21) Update to tauri beta.4. @@ -45,4 +49,4 @@ lugins-workspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! /pull/371)) First v2 alpha release! lugins-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! + 717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! diff --git a/plugins/window-state/Cargo.toml b/plugins/window-state/Cargo.toml index 60c03781..e7b5904c 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.1" +version = "2.0.0-beta.2" description = "Save window positions and sizes and restore them when the app is reopened." authors = { workspace = true } license = { workspace = true } diff --git a/plugins/window-state/package.json b/plugins/window-state/package.json index 2fe3d414..0b0f4455 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.1", + "version": "2.0.0-beta.2", "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.2" + "@tauri-apps/api": "2.0.0-beta.4" } } diff --git a/plugins/window-state/src/api-iife.js b/plugins/window-state/src/api-iife.js index 47212356..fc339c62 100644 --- a/plugins/window-state/src/api-iife.js +++ b/plugins/window-state/src/api-iife.js @@ -1 +1 @@ -if("__TAURI__"in window){var __TAURI_PLUGIN_WINDOWSTATE__=function(e){"use strict";function t(e,t=!1){return window.__TAURI_INTERNALS__.transformCallback(e,t)}async function i(e,t={},i){return window.__TAURI_INTERNALS__.invoke(e,t,i)}"function"==typeof SuppressedError&&SuppressedError;class n{constructor(e,t){this.type="Logical",this.width=e,this.height=t}}class a{constructor(e,t){this.type="Physical",this.width=e,this.height=t}toLogical(e){return new n(this.width/e,this.height/e)}}class l{constructor(e,t){this.type="Logical",this.x=e,this.y=t}}class s{constructor(e,t){this.type="Physical",this.x=e,this.y=t}toLogical(e){return new l(this.x/e,this.y/e)}}var r,o,u;async function c(e,t){await i("plugin:event|unlisten",{event:e,eventId:t})}async function d(e,n,a){const l="string"==typeof a?.target?{kind:"AnyLabel",label:a.target}:a?.target??{kind:"Any"};return i("plugin:event|listen",{event:e,target:l,handler:t(n)}).then((t=>async()=>c(e,t)))}!function(e){e.WINDOW_RESIZED="tauri://resize",e.WINDOW_MOVED="tauri://move",e.WINDOW_CLOSE_REQUESTED="tauri://close-requested",e.WINDOW_DESTROYED="tauri://destroyed",e.WINDOW_FOCUS="tauri://focus",e.WINDOW_BLUR="tauri://blur",e.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",e.WINDOW_THEME_CHANGED="tauri://theme-changed",e.WEBVIEW_CREATED="tauri://webview-created",e.FILE_DROP="tauri://file-drop",e.FILE_DROP_HOVER="tauri://file-drop-hover",e.FILE_DROP_CANCELLED="tauri://file-drop-cancelled"}(r||(r={})),function(e){e[e.Critical=1]="Critical",e[e.Informational=2]="Informational"}(o||(o={}));class h{constructor(e){this._preventDefault=!1,this.event=e.event,this.id=e.id}preventDefault(){this._preventDefault=!0}isPreventDefault(){return this._preventDefault}}function w(){return new y(window.__TAURI_INTERNALS__.metadata.currentWindow.label,{skip:!0})}function b(){return window.__TAURI_INTERNALS__.metadata.windows.map((e=>new y(e.label,{skip:!0})))}!function(e){e.None="none",e.Normal="normal",e.Indeterminate="indeterminate",e.Paused="paused",e.Error="error"}(u||(u={}));const p=["tauri://created","tauri://error"];class y{constructor(e,t={}){this.label=e,this.listeners=Object.create(null),t?.skip||i("plugin:window|create",{options:{...t,parent:"string"==typeof t.parent?t.parent:t.parent?.label,label:e}}).then((async()=>this.emit("tauri://created"))).catch((async e=>this.emit("tauri://error",e)))}static getByLabel(e){return b().find((t=>t.label===e))??null}static getCurrent(){return w()}static getAll(){return b()}static async getFocusedWindow(){for(const e of b())if(await e.isFocused())return e;return null}async listen(e,t){return this._handleTauriEvent(e,t)?Promise.resolve((()=>{const i=this.listeners[e];i.splice(i.indexOf(t),1)})):d(e,t,{target:{kind:"Window",label:this.label}})}async once(e,t){return this._handleTauriEvent(e,t)?Promise.resolve((()=>{const i=this.listeners[e];i.splice(i.indexOf(t),1)})):async function(e,t,i){return d(e,(i=>{t(i),c(e,i.id).catch((()=>{}))}),i)}(e,t,{target:{kind:"Window",label:this.label}})}async emit(e,t){if(p.includes(e)){for(const i of this.listeners[e]||[])i({event:e,id:-1,payload:t});return Promise.resolve()}return async function(e,t){await i("plugin:event|emit",{event:e,payload:t})}(e,t)}async emitTo(e,t,n){if(p.includes(t)){for(const e of this.listeners[t]||[])e({event:t,id:-1,payload:n});return Promise.resolve()}return async function(e,t,n){const a="string"==typeof e?{kind:"AnyLabel",label:e}:e;await i("plugin:event|emit_to",{target:a,event:t,payload:n})}(e,t,n)}_handleTauriEvent(e,t){return!!p.includes(e)&&(e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t],!0)}async scaleFactor(){return i("plugin:window|scale_factor",{label:this.label})}async innerPosition(){return i("plugin:window|inner_position",{label:this.label}).then((({x:e,y:t})=>new s(e,t)))}async outerPosition(){return i("plugin:window|outer_position",{label:this.label}).then((({x:e,y:t})=>new s(e,t)))}async innerSize(){return i("plugin:window|inner_size",{label:this.label}).then((({width:e,height:t})=>new a(e,t)))}async outerSize(){return i("plugin:window|outer_size",{label:this.label}).then((({width:e,height:t})=>new a(e,t)))}async isFullscreen(){return i("plugin:window|is_fullscreen",{label:this.label})}async isMinimized(){return i("plugin:window|is_minimized",{label:this.label})}async isMaximized(){return i("plugin:window|is_maximized",{label:this.label})}async isFocused(){return i("plugin:window|is_focused",{label:this.label})}async isDecorated(){return i("plugin:window|is_decorated",{label:this.label})}async isResizable(){return i("plugin:window|is_resizable",{label:this.label})}async isMaximizable(){return i("plugin:window|is_maximizable",{label:this.label})}async isMinimizable(){return i("plugin:window|is_minimizable",{label:this.label})}async isClosable(){return i("plugin:window|is_closable",{label:this.label})}async isVisible(){return i("plugin:window|is_visible",{label:this.label})}async title(){return i("plugin:window|title",{label:this.label})}async theme(){return i("plugin:window|theme",{label:this.label})}async center(){return i("plugin:window|center",{label:this.label})}async requestUserAttention(e){let t=null;return e&&(t=e===o.Critical?{type:"Critical"}:{type:"Informational"}),i("plugin:window|request_user_attention",{label:this.label,value:t})}async setResizable(e){return i("plugin:window|set_resizable",{label:this.label,value:e})}async setMaximizable(e){return i("plugin:window|set_maximizable",{label:this.label,value:e})}async setMinimizable(e){return i("plugin:window|set_minimizable",{label:this.label,value:e})}async setClosable(e){return i("plugin:window|set_closable",{label:this.label,value:e})}async setTitle(e){return i("plugin:window|set_title",{label:this.label,value:e})}async maximize(){return i("plugin:window|maximize",{label:this.label})}async unmaximize(){return i("plugin:window|unmaximize",{label:this.label})}async toggleMaximize(){return i("plugin:window|toggle_maximize",{label:this.label})}async minimize(){return i("plugin:window|minimize",{label:this.label})}async unminimize(){return i("plugin:window|unminimize",{label:this.label})}async show(){return i("plugin:window|show",{label:this.label})}async hide(){return i("plugin:window|hide",{label:this.label})}async close(){return i("plugin:window|close",{label:this.label})}async destroy(){return i("plugin:window|destroy",{label:this.label})}async setDecorations(e){return i("plugin:window|set_decorations",{label:this.label,value:e})}async setShadow(e){return i("plugin:window|set_shadow",{label:this.label,value:e})}async setEffects(e){return i("plugin:window|set_effects",{label:this.label,value:e})}async clearEffects(){return i("plugin:window|set_effects",{label:this.label,value:null})}async setAlwaysOnTop(e){return i("plugin:window|set_always_on_top",{label:this.label,value:e})}async setAlwaysOnBottom(e){return i("plugin:window|set_always_on_bottom",{label:this.label,value:e})}async setContentProtected(e){return i("plugin:window|set_content_protected",{label:this.label,value:e})}async setSize(e){if(!e||"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return i("plugin:window|set_size",{label:this.label,value:{type:e.type,data:{width:e.width,height:e.height}}})}async setMinSize(e){if(e&&"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return i("plugin:window|set_min_size",{label:this.label,value:e?{type:e.type,data:{width:e.width,height:e.height}}:null})}async setMaxSize(e){if(e&&"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return i("plugin:window|set_max_size",{label:this.label,value:e?{type:e.type,data:{width:e.width,height:e.height}}:null})}async setPosition(e){if(!e||"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return i("plugin:window|set_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setFullscreen(e){return i("plugin:window|set_fullscreen",{label:this.label,value:e})}async setFocus(){return i("plugin:window|set_focus",{label:this.label})}async setIcon(e){return i("plugin:window|set_icon",{label:this.label,value:"string"==typeof e?e:Array.from(e)})}async setSkipTaskbar(e){return i("plugin:window|set_skip_taskbar",{label:this.label,value:e})}async setCursorGrab(e){return i("plugin:window|set_cursor_grab",{label:this.label,value:e})}async setCursorVisible(e){return i("plugin:window|set_cursor_visible",{label:this.label,value:e})}async setCursorIcon(e){return i("plugin:window|set_cursor_icon",{label:this.label,value:e})}async setCursorPosition(e){if(!e||"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return i("plugin:window|set_cursor_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setIgnoreCursorEvents(e){return i("plugin:window|set_ignore_cursor_events",{label:this.label,value:e})}async startDragging(){return i("plugin:window|start_dragging",{label:this.label})}async startResizeDragging(e){return i("plugin:window|start_resize_dragging",{label:this.label,value:e})}async setProgressBar(e){return i("plugin:window|set_progress_bar",{label:this.label,value:e})}async setVisibleOnAllWorkspaces(e){return i("plugin:window|set_visible_on_all_workspaces",{label:this.label,value:e})}async onResized(e){return this.listen(r.WINDOW_RESIZED,(t=>{var i;t.payload=(i=t.payload,new a(i.width,i.height)),e(t)}))}async onMoved(e){return this.listen(r.WINDOW_MOVED,(t=>{t.payload=v(t.payload),e(t)}))}async onCloseRequested(e){return this.listen(r.WINDOW_CLOSE_REQUESTED,(t=>{const i=new h(t);Promise.resolve(e(i)).then((()=>{if(!i.isPreventDefault())return this.destroy()}))}))}async onFileDropEvent(e){const t=await this.listen(r.FILE_DROP,(t=>{e({...t,payload:{type:"drop",paths:t.payload.paths,position:v(t.payload.position)}})})),i=await this.listen(r.FILE_DROP_HOVER,(t=>{e({...t,payload:{type:"hover",paths:t.payload.paths,position:v(t.payload.position)}})})),n=await this.listen(r.FILE_DROP_CANCELLED,(t=>{e({...t,payload:{type:"cancel"}})}));return()=>{t(),i(),n()}}async onFocusChanged(e){const t=await this.listen(r.WINDOW_FOCUS,(t=>{e({...t,payload:!0})})),i=await this.listen(r.WINDOW_BLUR,(t=>{e({...t,payload:!1})}));return()=>{t(),i()}}async onScaleChanged(e){return this.listen(r.WINDOW_SCALE_FACTOR_CHANGED,e)}async onThemeChanged(e){return this.listen(r.WINDOW_THEME_CHANGED,e)}}var g,_,m;function v(e){return new s(e.x,e.y)}async function f(e,t){return i("plugin:window-state|restore_state",{label:e,flags:t})}return function(e){e.AppearanceBased="appearanceBased",e.Light="light",e.Dark="dark",e.MediumLight="mediumLight",e.UltraDark="ultraDark",e.Titlebar="titlebar",e.Selection="selection",e.Menu="menu",e.Popover="popover",e.Sidebar="sidebar",e.HeaderView="headerView",e.Sheet="sheet",e.WindowBackground="windowBackground",e.HudWindow="hudWindow",e.FullScreenUI="fullScreenUI",e.Tooltip="tooltip",e.ContentBackground="contentBackground",e.UnderWindowBackground="underWindowBackground",e.UnderPageBackground="underPageBackground",e.Mica="mica",e.Blur="blur",e.Acrylic="acrylic",e.Tabbed="tabbed",e.TabbedDark="tabbedDark",e.TabbedLight="tabbedLight"}(g||(g={})),function(e){e.FollowsWindowActiveState="followsWindowActiveState",e.Active="active",e.Inactive="inactive"}(_||(_={})),e.StateFlags=void 0,(m=e.StateFlags||(e.StateFlags={}))[m.SIZE=1]="SIZE",m[m.POSITION=2]="POSITION",m[m.MAXIMIZED=4]="MAXIMIZED",m[m.VISIBLE=8]="VISIBLE",m[m.DECORATIONS=16]="DECORATIONS",m[m.FULLSCREEN=32]="FULLSCREEN",m[m.ALL=63]="ALL",e.restoreState=f,e.restoreStateCurrent=async function(e){return f(w().label,e)},e.saveWindowState=async function(e){return i("plugin:window-state|save_window_state",{flags:e})},e}({});Object.defineProperty(window.__TAURI__,"windowState",{value:__TAURI_PLUGIN_WINDOWSTATE__})} +if("__TAURI__"in window){var __TAURI_PLUGIN_WINDOWSTATE__=function(e){"use strict";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 h{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 d(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()=>d(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:y(e),width:t,height:i}).then((e=>new b(e)))}static async fromBytes(e){return s("plugin:image|from_bytes",{bytes:y(e)}).then((e=>new b(e)))}static async fromPngBytes(e){return s("plugin:image|from_png_bytes",{bytes:y(e)}).then((e=>new b(e)))}static async fromIcoBytes(e){return s("plugin:image|from_ico_bytes",{bytes:y(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})}async width(){return s("plugin:image|width",{rid:this.rid})}async height(){return s("plugin:image|height",{rid:this.rid})}}function y(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 p{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={}){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),d(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 h(e,t)))}async outerPosition(){return s("plugin:window|outer_position",{label:this.label}).then((({x:e,y:t})=>new h(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:y(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 p(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 h(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.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__})} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 229ac6a6..b8cc145e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -64,49 +64,49 @@ importers: examples/api: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.3 - version: 2.0.0-beta.3 + specifier: 2.0.0-beta.4 + version: 2.0.0-beta.4 '@tauri-apps/plugin-barcode-scanner': - specifier: 2.0.0-beta.1 + specifier: 2.0.0-beta.2 version: link:../../plugins/barcode-scanner '@tauri-apps/plugin-biometric': - specifier: 2.0.0-beta.1 + specifier: 2.0.0-beta.2 version: link:../../plugins/biometric '@tauri-apps/plugin-cli': - specifier: 2.0.0-beta.1 + specifier: 2.0.0-beta.2 version: link:../../plugins/cli '@tauri-apps/plugin-clipboard-manager': - specifier: 2.0.0-beta.1 + specifier: 2.0.0-beta.2 version: link:../../plugins/clipboard-manager '@tauri-apps/plugin-dialog': - specifier: 2.0.0-beta.1 + specifier: 2.0.0-beta.2 version: link:../../plugins/dialog '@tauri-apps/plugin-fs': - specifier: 2.0.0-beta.1 + specifier: 2.0.0-beta.2 version: link:../../plugins/fs '@tauri-apps/plugin-global-shortcut': - specifier: 2.0.0-beta.1 + specifier: 2.0.0-beta.2 version: link:../../plugins/global-shortcut '@tauri-apps/plugin-http': - specifier: 2.0.0-beta.1 + specifier: 2.0.0-beta.2 version: link:../../plugins/http '@tauri-apps/plugin-nfc': - specifier: 2.0.0-beta.1 + specifier: 2.0.0-beta.2 version: link:../../plugins/nfc '@tauri-apps/plugin-notification': - specifier: 2.0.0-beta.1 + specifier: 2.0.0-beta.2 version: link:../../plugins/notification '@tauri-apps/plugin-os': - specifier: 2.0.0-beta.1 + specifier: 2.0.0-beta.2 version: link:../../plugins/os '@tauri-apps/plugin-process': - specifier: 2.0.0-beta.1 + specifier: 2.0.0-beta.2 version: link:../../plugins/process '@tauri-apps/plugin-shell': - specifier: 2.0.0-beta.1 + specifier: 2.0.0-beta.2 version: link:../../plugins/shell '@tauri-apps/plugin-updater': - specifier: 2.0.0-beta.1 + specifier: 2.0.0-beta.2 version: link:../../plugins/updater '@zerodevx/svelte-json-view': specifier: 1.0.7 @@ -122,8 +122,8 @@ importers: specifier: ^3.0.1 version: 3.0.1(svelte@4.2.8)(vite@5.0.12) '@tauri-apps/cli': - specifier: 2.0.0-beta.6 - version: 2.0.0-beta.6 + specifier: 2.0.0-beta.7 + version: 2.0.0-beta.7 '@unocss/extractor-svelte': specifier: ^0.58.0 version: 0.58.0 @@ -135,7 +135,7 @@ importers: version: 4.2.8 unocss: specifier: ^0.58.0 - version: 0.58.0(postcss@8.4.32)(rollup@4.9.6)(vite@5.0.12) + version: 0.58.0(postcss@8.4.32)(vite@5.0.12) vite: specifier: ^5.0.12 version: 5.0.12 @@ -143,26 +143,26 @@ importers: plugins/authenticator: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.2 - version: 2.0.0-beta.2 + specifier: 2.0.0-beta.4 + version: 2.0.0-beta.4 plugins/autostart: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.2 - version: 2.0.0-beta.2 + specifier: 2.0.0-beta.4 + version: 2.0.0-beta.4 plugins/barcode-scanner: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.2 - version: 2.0.0-beta.2 + specifier: 2.0.0-beta.4 + version: 2.0.0-beta.4 plugins/biometric: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.2 - version: 2.0.0-beta.2 + specifier: 2.0.0-beta.4 + version: 2.0.0-beta.4 devDependencies: tslib: specifier: 2.6.0 @@ -171,33 +171,33 @@ importers: plugins/cli: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.2 - version: 2.0.0-beta.2 + specifier: 2.0.0-beta.4 + version: 2.0.0-beta.4 plugins/clipboard-manager: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.2 - version: 2.0.0-beta.2 + specifier: 2.0.0-beta.4 + version: 2.0.0-beta.4 plugins/deep-link: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.2 - version: 2.0.0-beta.2 + specifier: 2.0.0-beta.4 + version: 2.0.0-beta.4 plugins/deep-link/examples/app: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.2 - version: 2.0.0-beta.2 + specifier: 2.0.0-beta.4 + version: 2.0.0-beta.4 '@tauri-apps/plugin-deep-link': - specifier: 2.0.0-beta.1 + specifier: 2.0.0-beta.2 version: link:../.. devDependencies: '@tauri-apps/cli': - specifier: 2.0.0-beta.3 - version: 2.0.0-beta.3 + specifier: 2.0.0-beta.7 + version: 2.0.0-beta.7 internal-ip: specifier: ^8.0.0 version: 8.0.0 @@ -211,38 +211,38 @@ importers: plugins/dialog: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.2 - version: 2.0.0-beta.2 + specifier: 2.0.0-beta.4 + version: 2.0.0-beta.4 plugins/fs: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.2 - version: 2.0.0-beta.2 + specifier: 2.0.0-beta.4 + version: 2.0.0-beta.4 plugins/global-shortcut: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.2 - version: 2.0.0-beta.2 + specifier: 2.0.0-beta.4 + version: 2.0.0-beta.4 plugins/http: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.2 - version: 2.0.0-beta.2 + specifier: 2.0.0-beta.4 + version: 2.0.0-beta.4 plugins/log: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.2 - version: 2.0.0-beta.2 + specifier: 2.0.0-beta.4 + version: 2.0.0-beta.4 plugins/nfc: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.2 - version: 2.0.0-beta.2 + specifier: 2.0.0-beta.4 + version: 2.0.0-beta.4 devDependencies: tslib: specifier: 2.6.0 @@ -251,74 +251,74 @@ importers: plugins/notification: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.2 - version: 2.0.0-beta.2 + specifier: 2.0.0-beta.4 + version: 2.0.0-beta.4 plugins/os: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.2 - version: 2.0.0-beta.2 + specifier: 2.0.0-beta.4 + version: 2.0.0-beta.4 plugins/positioner: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.2 - version: 2.0.0-beta.2 + specifier: 2.0.0-beta.4 + version: 2.0.0-beta.4 plugins/process: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.2 - version: 2.0.0-beta.2 + specifier: 2.0.0-beta.4 + version: 2.0.0-beta.4 plugins/shell: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.2 - version: 2.0.0-beta.2 + specifier: 2.0.0-beta.4 + version: 2.0.0-beta.4 plugins/single-instance/examples/vanilla: devDependencies: '@tauri-apps/cli': - specifier: 2.0.0-beta.3 - version: 2.0.0-beta.3 + specifier: 2.0.0-beta.7 + version: 2.0.0-beta.7 plugins/sql: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.2 - version: 2.0.0-beta.2 + specifier: 2.0.0-beta.4 + version: 2.0.0-beta.4 plugins/store: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.2 - version: 2.0.0-beta.2 + specifier: 2.0.0-beta.4 + version: 2.0.0-beta.4 plugins/stronghold: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.2 - version: 2.0.0-beta.2 + specifier: 2.0.0-beta.4 + version: 2.0.0-beta.4 plugins/updater: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.2 - version: 2.0.0-beta.2 + specifier: 2.0.0-beta.4 + version: 2.0.0-beta.4 plugins/upload: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.2 - version: 2.0.0-beta.2 + specifier: 2.0.0-beta.4 + version: 2.0.0-beta.4 plugins/websocket: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.2 - version: 2.0.0-beta.2 + specifier: 2.0.0-beta.4 + version: 2.0.0-beta.4 plugins/websocket/examples/tauri-app: dependencies: @@ -327,8 +327,8 @@ importers: version: link:../.. devDependencies: '@tauri-apps/cli': - specifier: 2.0.0-beta.3 - version: 2.0.0-beta.3 + specifier: 2.0.0-beta.7 + version: 2.0.0-beta.7 typescript: specifier: ^5.3.3 version: 5.3.3 @@ -339,8 +339,8 @@ importers: plugins/window-state: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.2 - version: 2.0.0-beta.2 + specifier: 2.0.0-beta.4 + version: 2.0.0-beta.4 packages: @@ -395,7 +395,7 @@ packages: '@babel/traverse': 7.23.5 '@babel/types': 7.23.5 convert-source-map: 2.0.0 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4 gensync: 1.0.0-beta.2 json5: 2.2.3 semver: 7.5.4 @@ -665,7 +665,7 @@ packages: '@babel/helper-split-export-declaration': 7.22.6 '@babel/parser': 7.23.5 '@babel/types': 7.23.5 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4 globals: 11.12.0 transitivePeerDependencies: - supports-color @@ -799,7 +799,7 @@ packages: peerDependencies: mocha: ^10.0.0 dependencies: - effection: 2.0.8(mocha@10.2.0) + effection: 2.0.8 mocha: 10.2.0 dev: true @@ -1046,7 +1046,7 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: ajv: 6.12.6 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4 espree: 9.6.1 globals: 13.23.0 ignore: 5.3.0 @@ -1068,7 +1068,7 @@ packages: engines: {node: '>=10.10.0'} dependencies: '@humanwhocodes/object-schema': 2.0.1 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4 minimatch: 3.1.2 transitivePeerDependencies: - supports-color @@ -1109,7 +1109,7 @@ packages: '@antfu/install-pkg': 0.1.1 '@antfu/utils': 0.7.6 '@iconify/types': 2.0.0 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4 kolorist: 1.8.0 local-pkg: 0.4.3 transitivePeerDependencies: @@ -1225,6 +1225,20 @@ packages: typescript: 5.3.3 dev: true + /@rollup/pluginutils@5.1.0: + resolution: {integrity: sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + dependencies: + '@types/estree': 1.0.5 + estree-walker: 2.0.2 + picomatch: 2.3.1 + dev: true + /@rollup/pluginutils@5.1.0(rollup@4.9.6): resolution: {integrity: sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==} engines: {node: '>=14.0.0'} @@ -1449,7 +1463,7 @@ packages: vite: ^5.0.0 dependencies: '@sveltejs/vite-plugin-svelte': 3.0.1(svelte@4.2.8)(vite@5.0.12) - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4 svelte: 4.2.8 vite: 5.0.12 transitivePeerDependencies: @@ -1464,7 +1478,7 @@ packages: vite: ^5.0.0 dependencies: '@sveltejs/vite-plugin-svelte-inspector': 2.0.0(@sveltejs/vite-plugin-svelte@3.0.1)(svelte@4.2.8)(vite@5.0.12) - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4 deepmerge: 4.3.1 kleur: 4.1.5 magic-string: 0.30.5 @@ -1476,18 +1490,13 @@ packages: - supports-color dev: true - /@tauri-apps/api@2.0.0-beta.2: - resolution: {integrity: sha512-4r1r6kgttzIWxJ3HxkZQH+b7EiUtKhdUCPbi0KSalD+2T3j6klw+v8VyxhKwEdjM/eo60NE+J33v1E/Urq8puw==} - engines: {node: '>= 18', npm: '>= 6.6.0', yarn: '>= 1.19.1'} - dev: false - - /@tauri-apps/api@2.0.0-beta.3: - resolution: {integrity: sha512-gDSJzKpBs6efXw2ZWqjl9QVNImY5GR5qygXqB7JK4y7prcQInxnTj2ARFR0vD4wuzkrUHGrlIKraiJJPHWJ9vg==} + /@tauri-apps/api@2.0.0-beta.4: + resolution: {integrity: sha512-Nxtj28NYUo5iwYkpYslxmOPkdI2WkELU2e3UH9nbJm9Ydki2CQwJVGQxx4EANtdZcMNsEsUzRqaDTvEUYH1l6w==} engines: {node: '>= 18', npm: '>= 6.6.0', yarn: '>= 1.19.1'} dev: false - /@tauri-apps/cli-darwin-arm64@2.0.0-beta.3: - resolution: {integrity: sha512-gHcn3jI/4MDXDIlK/4Zz0ftTosgN3OimWlKxEz777QrA1hldrQweYIhdZXkqE9KgoE+u6w80vWIcr0InHAf7Iw==} + /@tauri-apps/cli-darwin-arm64@2.0.0-beta.7: + resolution: {integrity: sha512-pwPkYEmIKRWbjxTCzPob67ecH8BrdYuE40chTRKudKCOgSahxW3oRHXnF8f7MU1pd34XpMG0vjwbETc0NA4DJw==} engines: {node: '>= 10'} cpu: [arm64] os: [darwin] @@ -1495,17 +1504,8 @@ packages: dev: true optional: true - /@tauri-apps/cli-darwin-arm64@2.0.0-beta.6: - resolution: {integrity: sha512-G1KJhWB8SgITE2iwWmOoyMhykljz7sGxQL5BnNLHLeyNvc6DwkgQ0AObkmFTz2JLnstWQ/kKyg/uoQNMNA/wyQ==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [darwin] - requiresBuild: true - dev: true - optional: true - - /@tauri-apps/cli-darwin-x64@2.0.0-beta.3: - resolution: {integrity: sha512-kRCaukT2IAGMmNuAOUBhdZRlKujTy2lSsdNKmgGEMnzQLKJwWO9Gpq1NmPY7ZVqyXK/X8QnGHuasDEQsSO6B4w==} + /@tauri-apps/cli-darwin-x64@2.0.0-beta.7: + resolution: {integrity: sha512-GP0u+CQxS9bRzxECtiFpAaEmhxibyCKRNhXVzbUwKkqbYtPKHnL5ZkppaQGZ+72aU+ezN2wyUGJM2JywGO6WrA==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] @@ -1513,26 +1513,8 @@ packages: dev: true optional: true - /@tauri-apps/cli-darwin-x64@2.0.0-beta.6: - resolution: {integrity: sha512-Dju4V53dO7KVvmMqXZeNp2tfMOEVDCORf40ZnP9zrE58mvqoEHbri4F+m+UN+fSdEOzic12nSGXDO/nilqs+aA==} - engines: {node: '>= 10'} - cpu: [x64] - os: [darwin] - requiresBuild: true - dev: true - optional: true - - /@tauri-apps/cli-linux-arm-gnueabihf@2.0.0-beta.3: - resolution: {integrity: sha512-cpNZOQDotNSdjoZT16s1JtZvnkM0wgLwU39AhKhRCco4KEH3/8G1ngKF9JKalWUN8zDTcuCigEAr37gEv4mLAA==} - engines: {node: '>= 10'} - cpu: [arm] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@tauri-apps/cli-linux-arm-gnueabihf@2.0.0-beta.6: - resolution: {integrity: sha512-w4dmL9VZD2UaDYRE6XRmIPxg2XJDT5Zn+76NGVFiZjsZniEh2c0KP0Ytd0nA1jn1cphgn0RDJkRqtPvT5nGQoA==} + /@tauri-apps/cli-linux-arm-gnueabihf@2.0.0-beta.7: + resolution: {integrity: sha512-oFMPnELZaXav3BzJimezP7gNxH44MHdBn2uOO1GkS8aV5P3GRBdu2xqwz2jr1awxfu0MAqTFj2ed9MsjiDDLhw==} engines: {node: '>= 10'} cpu: [arm] os: [linux] @@ -1540,8 +1522,8 @@ packages: dev: true optional: true - /@tauri-apps/cli-linux-arm64-gnu@2.0.0-beta.3: - resolution: {integrity: sha512-8q86V6P9bkeoFcnvSsnvOwmKY6ijIN4ueRVXCj5cVpsw392VF9vud1Nq7/l+QDgn9OWbZNNVDl30iyoSuaykBA==} + /@tauri-apps/cli-linux-arm64-gnu@2.0.0-beta.7: + resolution: {integrity: sha512-89MoAIRlIA8+qMpOEZZQ2+Q4LBUY1kwMGNS3mg5OJDU0+vSfNUkLr17Zvjwqizd/tVUp/vTWNWtSPthm8wliHQ==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] @@ -1549,8 +1531,8 @@ packages: dev: true optional: true - /@tauri-apps/cli-linux-arm64-gnu@2.0.0-beta.6: - resolution: {integrity: sha512-0oVOSUg1wtoy+qOLjF3uQRxgtUFoqrRpb6cSebTfe4NaHHfF6qKGtZdK/Po0+jQ6RItz3iUV2bgy7Evx3lVFMw==} + /@tauri-apps/cli-linux-arm64-musl@2.0.0-beta.7: + resolution: {integrity: sha512-3TM4YapftA+VU555CQ8xxZhkcGDCGuJ+2X3qaHY4XEgC2viyke7MybbA6duHhb1HY64rZhSx6y5cqi9SE/AsSg==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] @@ -1558,35 +1540,8 @@ packages: dev: true optional: true - /@tauri-apps/cli-linux-arm64-musl@2.0.0-beta.3: - resolution: {integrity: sha512-L7fokh4aqyV6yDPoeKwFN3Yt0pCAuZMWeP5tOeSBiom1pU7ppKH+4KHeTekNEIecZG+Ah250DkVCdmWS+aRFTA==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@tauri-apps/cli-linux-arm64-musl@2.0.0-beta.6: - resolution: {integrity: sha512-l0sH61OysOK17lL9Je/AS+Bs1a2zafg2te/G7WVi4Z1uFuSirMjPzCFJBT4/vY53AeyuRNja+XhszLdf0ud0BQ==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@tauri-apps/cli-linux-x64-gnu@2.0.0-beta.3: - resolution: {integrity: sha512-/crp3K6PathqicVWPj8Kh1120NNVV7nagJ7oZW9OFch7nBS1tmDnSB5k5LgA4yYu+lDKNUREnATMWHL6i0gNeg==} - engines: {node: '>= 10'} - cpu: [x64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@tauri-apps/cli-linux-x64-gnu@2.0.0-beta.6: - resolution: {integrity: sha512-RkDhQQv34Qr5xrjoaRclTpHFf/YQdH6ftSTaUKhEdaVDEJPUbVZUxj70f58b1bV6kuokvT3r5whb9I4lfCBZZw==} + /@tauri-apps/cli-linux-x64-gnu@2.0.0-beta.7: + resolution: {integrity: sha512-+NbQOJheRZGTm5EF8h0y7JB1sW5qi1kTwqSCVeePJJStQX8QG2RmWdDbo44/PGLOwy8iJlGH/Tlo+ZaHuWtV9A==} engines: {node: '>= 10'} cpu: [x64] os: [linux] @@ -1594,8 +1549,8 @@ packages: dev: true optional: true - /@tauri-apps/cli-linux-x64-musl@2.0.0-beta.3: - resolution: {integrity: sha512-jX1ZT0UQwdBGbpCwlpv2bsLDO7KFMeDJQ/ZZVMfWyjuYrGBG5zhJ2NXwTMkHVnxfvE6BVmnybWcykeSqTATeOw==} + /@tauri-apps/cli-linux-x64-musl@2.0.0-beta.7: + resolution: {integrity: sha512-1uDMC3Uh8yFWsKRkwrwLWY9pQ1uQ008lAimNedlGnuSJ3dW3SViNGbhdmvKw/lrXL24183ppGv2z/B6c/DydBg==} engines: {node: '>= 10'} cpu: [x64] os: [linux] @@ -1603,17 +1558,8 @@ packages: dev: true optional: true - /@tauri-apps/cli-linux-x64-musl@2.0.0-beta.6: - resolution: {integrity: sha512-d2s7uTjejf44VmGEmbSeERB1cbIkx3o7lyzPBnwLcluxi21xEVIa8SLKDR8iLZdovdWkJEre+nz/ViaBQw8nHA==} - engines: {node: '>= 10'} - cpu: [x64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@tauri-apps/cli-win32-arm64-msvc@2.0.0-beta.3: - resolution: {integrity: sha512-UCEZNKocENLX3HYKid4FEbrCMjCX9e58klBIvJKxT8HTjvpgFYDoKccswDNfszLhmineKMlkUvm7j7U0sMh8MQ==} + /@tauri-apps/cli-win32-arm64-msvc@2.0.0-beta.7: + resolution: {integrity: sha512-166jg+BfgFw22Hj0oZgU1ujWb5Gzf0+4p8L9Vuzu0Ne7U8flHfvlFpFKdf6uCa61cxS0sfmEnAi5r2Fh8VOA4w==} engines: {node: '>= 10'} cpu: [arm64] os: [win32] @@ -1621,26 +1567,8 @@ packages: dev: true optional: true - /@tauri-apps/cli-win32-arm64-msvc@2.0.0-beta.6: - resolution: {integrity: sha512-KZ+ByWOr46YR7j2C/EsJObjmUnMw3y9rzm3UU0DLE84ty8x7/TSVrIoV6W7DsgduLf7kKyy9dQTyFUNK+A5d7Q==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [win32] - requiresBuild: true - dev: true - optional: true - - /@tauri-apps/cli-win32-ia32-msvc@2.0.0-beta.3: - resolution: {integrity: sha512-O8syGXDHyKN/cv1ktD76dTcbkQ1nNEPhnT1Z+r0GKxNsw4/MyIVglzEcou3aPq0/1MQ0PEGVyG1x0JMaPw7oHQ==} - engines: {node: '>= 10'} - cpu: [ia32] - os: [win32] - requiresBuild: true - dev: true - optional: true - - /@tauri-apps/cli-win32-ia32-msvc@2.0.0-beta.6: - resolution: {integrity: sha512-CPCAxMZ8XtWsZ875/YQAnFCrkeFnGqw5on2D4PHmkZRhrOyoFCa0R65Q0cWCHzX6M/fmo40QkSJiASR87RCRJg==} + /@tauri-apps/cli-win32-ia32-msvc@2.0.0-beta.7: + resolution: {integrity: sha512-NuR1AkZlNwcu/Jv9qRKA0yguvJIW4aLEhZG6sWssMGhJGRzxZssZfHiBVfDCDQgfprbtOXXnshy7rFjNe0IEgA==} engines: {node: '>= 10'} cpu: [ia32] os: [win32] @@ -1648,8 +1576,8 @@ packages: dev: true optional: true - /@tauri-apps/cli-win32-x64-msvc@2.0.0-beta.3: - resolution: {integrity: sha512-YDdF3XWaptjKtKz33sZhC+uNAZwp6QtAmZSRCQQlC1W7uJwLD00/3QF4vO/c6Qm+BGFsazVh1+YmBF1p0kV0rg==} + /@tauri-apps/cli-win32-x64-msvc@2.0.0-beta.7: + resolution: {integrity: sha512-BVlwb6fRRCOaQPZWYIee8Z37NEHkceVmFDSQhrmLhF9E60/M09UCTrj0J5IOrDSj7t5/h5aWlYmDTASaJJRzKg==} engines: {node: '>= 10'} cpu: [x64] os: [win32] @@ -1657,47 +1585,21 @@ packages: dev: true optional: true - /@tauri-apps/cli-win32-x64-msvc@2.0.0-beta.6: - resolution: {integrity: sha512-YcfbicO3DQcJEd5eOJ4ydwzHwaF3KlWhH+yZZbhnpzdfl+BK/PlEs6sGUoBW2h1RJ9lLlDK51RNMZGq9O0QaYg==} - engines: {node: '>= 10'} - cpu: [x64] - os: [win32] - requiresBuild: true - dev: true - optional: true - - /@tauri-apps/cli@2.0.0-beta.3: - resolution: {integrity: sha512-xLAL2DNNUJWqHBKvanc3V9bG9kkwtFwc40X/DrfgEKnkajEm79wqnkaT8LUnmbe0WZ8bzBRO1fLIgKlOH6GiCA==} + /@tauri-apps/cli@2.0.0-beta.7: + resolution: {integrity: sha512-ZaXvF46H+bSkP31C3ygFMhH3RAkdUnmxsGe5YKPublOnsWkyEvj9OLafBt2rTedF5Ko6HsIFqtgp4MqT9K9mHg==} engines: {node: '>= 10'} hasBin: true 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 - dev: true - - /@tauri-apps/cli@2.0.0-beta.6: - resolution: {integrity: sha512-4DwhpXI51NnAYkDlROMvCJ7S+M7efuaA5zqcBStodr0NaKyB4buuf8zkCSpqdMW4gXBXDHDwi1Mbm9G1L7LyDA==} - engines: {node: '>= 10'} - hasBin: true - optionalDependencies: - '@tauri-apps/cli-darwin-arm64': 2.0.0-beta.6 - '@tauri-apps/cli-darwin-x64': 2.0.0-beta.6 - '@tauri-apps/cli-linux-arm-gnueabihf': 2.0.0-beta.6 - '@tauri-apps/cli-linux-arm64-gnu': 2.0.0-beta.6 - '@tauri-apps/cli-linux-arm64-musl': 2.0.0-beta.6 - '@tauri-apps/cli-linux-x64-gnu': 2.0.0-beta.6 - '@tauri-apps/cli-linux-x64-musl': 2.0.0-beta.6 - '@tauri-apps/cli-win32-arm64-msvc': 2.0.0-beta.6 - '@tauri-apps/cli-win32-ia32-msvc': 2.0.0-beta.6 - '@tauri-apps/cli-win32-x64-msvc': 2.0.0-beta.6 + '@tauri-apps/cli-darwin-arm64': 2.0.0-beta.7 + '@tauri-apps/cli-darwin-x64': 2.0.0-beta.7 + '@tauri-apps/cli-linux-arm-gnueabihf': 2.0.0-beta.7 + '@tauri-apps/cli-linux-arm64-gnu': 2.0.0-beta.7 + '@tauri-apps/cli-linux-arm64-musl': 2.0.0-beta.7 + '@tauri-apps/cli-linux-x64-gnu': 2.0.0-beta.7 + '@tauri-apps/cli-linux-x64-musl': 2.0.0-beta.7 + '@tauri-apps/cli-win32-arm64-msvc': 2.0.0-beta.7 + '@tauri-apps/cli-win32-ia32-msvc': 2.0.0-beta.7 + '@tauri-apps/cli-win32-x64-msvc': 2.0.0-beta.7 dev: true /@tauri-apps/toml@2.2.4: @@ -1750,7 +1652,7 @@ packages: '@typescript-eslint/type-utils': 6.20.0(eslint@8.56.0)(typescript@5.3.3) '@typescript-eslint/utils': 6.20.0(eslint@8.56.0)(typescript@5.3.3) '@typescript-eslint/visitor-keys': 6.20.0 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4 eslint: 8.56.0 graphemer: 1.4.0 ignore: 5.3.0 @@ -1776,7 +1678,7 @@ packages: '@typescript-eslint/types': 6.20.0 '@typescript-eslint/typescript-estree': 6.20.0(typescript@5.3.3) '@typescript-eslint/visitor-keys': 6.20.0 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4 eslint: 8.56.0 typescript: 5.3.3 transitivePeerDependencies: @@ -1803,7 +1705,7 @@ packages: dependencies: '@typescript-eslint/typescript-estree': 6.20.0(typescript@5.3.3) '@typescript-eslint/utils': 6.20.0(eslint@8.56.0)(typescript@5.3.3) - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4 eslint: 8.56.0 ts-api-utils: 1.0.3(typescript@5.3.3) typescript: 5.3.3 @@ -1827,7 +1729,7 @@ packages: dependencies: '@typescript-eslint/types': 6.20.0 '@typescript-eslint/visitor-keys': 6.20.0 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 minimatch: 9.0.3 @@ -1869,7 +1771,7 @@ packages: resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} dev: true - /@unocss/astro@0.58.0(rollup@4.9.6)(vite@5.0.12): + /@unocss/astro@0.58.0(vite@5.0.12): resolution: {integrity: sha512-df+tEFO5eKXjQOwSWQhS9IdjD0sfLHLtn8U09sEKR2Nmh5CvpwyBxmvLQgOCilPou7ehmyKfsyGRLZg7IMp+Ew==} peerDependencies: vite: ^2.9.0 || ^3.0.0-0 || ^4.0.0 || ^5.0.0-0 @@ -1879,19 +1781,19 @@ packages: dependencies: '@unocss/core': 0.58.0 '@unocss/reset': 0.58.0 - '@unocss/vite': 0.58.0(rollup@4.9.6)(vite@5.0.12) + '@unocss/vite': 0.58.0(vite@5.0.12) vite: 5.0.12 transitivePeerDependencies: - rollup dev: true - /@unocss/cli@0.58.0(rollup@4.9.6): + /@unocss/cli@0.58.0: resolution: {integrity: sha512-rhsrDBxAVueygMcAbMkbuvsHbBL2rG6N96LllYwHn16FLgOE3Sf4JW1/LlNjQje3BtwMMtbSCCAeu2SryFhzbw==} engines: {node: '>=14'} hasBin: true dependencies: '@ampproject/remapping': 2.2.1 - '@rollup/pluginutils': 5.1.0(rollup@4.9.6) + '@rollup/pluginutils': 5.1.0 '@unocss/config': 0.58.0 '@unocss/core': 0.58.0 '@unocss/preset-uno': 0.58.0 @@ -2067,13 +1969,13 @@ packages: '@unocss/core': 0.58.0 dev: true - /@unocss/vite@0.58.0(rollup@4.9.6)(vite@5.0.12): + /@unocss/vite@0.58.0(vite@5.0.12): resolution: {integrity: sha512-OCUOLMSOBEtXOEyBbAvMI3/xdR175BWRzmvV9Wc34ANZclEvCdVH8+WU725ibjY4VT0gVIuX68b13fhXdHV41A==} peerDependencies: vite: ^2.9.0 || ^3.0.0-0 || ^4.0.0 || ^5.0.0-0 dependencies: '@ampproject/remapping': 2.2.1 - '@rollup/pluginutils': 5.1.0(rollup@4.9.6) + '@rollup/pluginutils': 5.1.0 '@unocss/config': 0.58.0 '@unocss/core': 0.58.0 '@unocss/inspector': 0.58.0 @@ -2576,6 +2478,18 @@ packages: ms: 2.1.3 dev: true + /debug@4.3.4: + resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + dependencies: + ms: 2.1.2 + dev: true + /debug@4.3.4(supports-color@8.1.1): resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} engines: {node: '>=6.0'} @@ -2676,6 +2590,18 @@ packages: resolution: {integrity: sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==} dev: true + /effection@2.0.8: + resolution: {integrity: sha512-/v7cbPIXGGylInQgHHjJutzqUn6VIfcP13hh2X0hXf04wwAlSI+lVjUBKpr5TX3+v9dXV/JLHO/pqQ9Cp1QAnQ==} + dependencies: + '@effection/channel': 2.0.6 + '@effection/core': 2.2.3 + '@effection/events': 2.0.6 + '@effection/fetch': 2.0.7(mocha@10.2.0) + '@effection/main': 2.1.2 + '@effection/stream': 2.0.6 + '@effection/subscription': 2.0.6 + dev: true + /effection@2.0.8(mocha@10.2.0): resolution: {integrity: sha512-/v7cbPIXGGylInQgHHjJutzqUn6VIfcP13hh2X0hXf04wwAlSI+lVjUBKpr5TX3+v9dXV/JLHO/pqQ9Cp1QAnQ==} dependencies: @@ -3018,7 +2944,7 @@ packages: ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4 doctrine: 3.0.0 escape-string-regexp: 4.0.0 eslint-scope: 7.2.2 @@ -3940,7 +3866,7 @@ packages: /micromark@2.11.4: resolution: {integrity: sha512-+WoovN/ppKolQOFIAajxi7Lu9kInbPxFuTBVEavFcL8eAfVstoc5MocPmqBeAdBOJV00uaVjegzH4+MA0DN/uA==} dependencies: - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4 parse-entities: 2.0.0 transitivePeerDependencies: - supports-color @@ -4967,7 +4893,7 @@ packages: '@types/unist': 2.0.10 dev: true - /unocss@0.58.0(postcss@8.4.32)(rollup@4.9.6)(vite@5.0.12): + /unocss@0.58.0(postcss@8.4.32)(vite@5.0.12): resolution: {integrity: sha512-MSPRHxBqWN+1AHGV+J5uUy4//e6ZBK6O+ISzD0qrXcCD/GNtxk1+lYjOK2ltkUiKX539+/KF91vNxzhhwEf+xA==} engines: {node: '>=14'} peerDependencies: @@ -4979,8 +4905,8 @@ packages: vite: optional: true dependencies: - '@unocss/astro': 0.58.0(rollup@4.9.6)(vite@5.0.12) - '@unocss/cli': 0.58.0(rollup@4.9.6) + '@unocss/astro': 0.58.0(vite@5.0.12) + '@unocss/cli': 0.58.0 '@unocss/core': 0.58.0 '@unocss/extractor-arbitrary-variants': 0.58.0 '@unocss/postcss': 0.58.0(postcss@8.4.32) @@ -4998,7 +4924,7 @@ packages: '@unocss/transformer-compile-class': 0.58.0 '@unocss/transformer-directives': 0.58.0 '@unocss/transformer-variant-group': 0.58.0 - '@unocss/vite': 0.58.0(rollup@4.9.6)(vite@5.0.12) + '@unocss/vite': 0.58.0(vite@5.0.12) vite: 5.0.12 transitivePeerDependencies: - postcss diff --git a/shared/template/package.json b/shared/template/package.json index 60cf5e26..caf348a4 100644 --- a/shared/template/package.json +++ b/shared/template/package.json @@ -23,6 +23,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-beta.2" + "@tauri-apps/api": "2.0.0-beta.4" } }