From f0b9b019556a278bc3306cb7e9b90e0fd29880d8 Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Sat, 28 Oct 2023 15:28:01 -0300 Subject: [PATCH] update dependencies --- .changes/api-alpha.11.md | 27 ++ .changes/api-alpha.9.md | 2 +- .changes/fix-emit-all-usage.md | 2 +- Cargo.lock | 35 ++- Cargo.toml | 4 +- examples/api/package.json | 6 +- plugins/authenticator/CHANGELOG.md | 2 +- plugins/authenticator/package.json | 4 +- plugins/authenticator/src/api-iife.js | 2 +- plugins/autostart/CHANGELOG.md | 2 +- plugins/autostart/package.json | 4 +- plugins/autostart/src/api-iife.js | 2 +- plugins/barcode-scanner/CHANGELOG.md | 2 +- plugins/barcode-scanner/package.json | 4 +- plugins/barcode-scanner/src/api-iife.js | 2 +- plugins/cli/CHANGELOG.md | 2 +- plugins/cli/package.json | 4 +- plugins/cli/src/api-iife.js | 2 +- plugins/clipboard-manager/CHANGELOG.md | 2 +- plugins/clipboard-manager/package.json | 4 +- plugins/clipboard-manager/src/api-iife.js | 2 +- plugins/deep-link/CHANGELOG.md | 2 +- .../android/src/main/java/DeepLinkPlugin.kt | 3 +- plugins/deep-link/examples/app/package.json | 6 +- plugins/deep-link/package.json | 4 +- plugins/deep-link/src/api-iife.js | 2 +- plugins/dialog/CHANGELOG.md | 2 +- plugins/dialog/package.json | 4 +- plugins/dialog/src/api-iife.js | 2 +- plugins/dialog/src/init-iife.js | 2 +- plugins/fs/CHANGELOG.md | 2 +- plugins/fs/package.json | 4 +- plugins/fs/src/api-iife.js | 2 +- plugins/global-shortcut/CHANGELOG.md | 2 +- plugins/global-shortcut/package.json | 4 +- plugins/global-shortcut/src/api-iife.js | 2 +- plugins/http/CHANGELOG.md | 2 +- plugins/http/package.json | 4 +- plugins/http/src/api-iife.js | 2 +- plugins/log/CHANGELOG.md | 2 +- plugins/log/package.json | 4 +- plugins/log/src/api-iife.js | 2 +- plugins/notification/CHANGELOG.md | 2 +- .../src/main/java/NotificationPlugin.kt | 9 + plugins/notification/package.json | 4 +- plugins/notification/src/api-iife.js | 2 +- plugins/notification/src/init-iife.js | 2 +- plugins/os/CHANGELOG.md | 2 +- plugins/os/package.json | 4 +- plugins/os/src/api-iife.js | 2 +- plugins/positioner/CHANGELOG.md | 2 +- plugins/positioner/package.json | 4 +- plugins/positioner/src/api-iife.js | 2 +- plugins/process/CHANGELOG.md | 2 +- plugins/process/package.json | 4 +- plugins/process/src/api-iife.js | 2 +- plugins/shell/CHANGELOG.md | 2 +- plugins/shell/package.json | 4 +- plugins/shell/src/api-iife.js | 2 +- plugins/shell/src/init-iife.js | 2 +- .../examples/vanilla/package.json | 4 +- plugins/sql/CHANGELOG.md | 2 +- plugins/sql/package.json | 4 +- plugins/sql/src/api-iife.js | 2 +- plugins/store/CHANGELOG.md | 2 +- plugins/store/package.json | 4 +- plugins/store/src/api-iife.js | 2 +- plugins/stronghold/CHANGELOG.md | 2 +- plugins/stronghold/package.json | 4 +- plugins/stronghold/src/api-iife.js | 2 +- plugins/updater/CHANGELOG.md | 2 +- plugins/updater/package.json | 4 +- plugins/updater/src/api-iife.js | 2 +- plugins/upload/CHANGELOG.md | 2 +- plugins/upload/package.json | 4 +- plugins/upload/src/api-iife.js | 2 +- plugins/websocket/CHANGELOG.md | 2 +- .../examples/svelte-app/package.json | 4 +- plugins/websocket/package.json | 4 +- plugins/websocket/src/api-iife.js | 2 +- plugins/window-state/CHANGELOG.md | 2 +- plugins/window-state/package.json | 4 +- plugins/window-state/src/api-iife.js | 2 +- pnpm-lock.yaml | 262 ++++++++---------- shared/template/package.json | 4 +- 85 files changed, 287 insertions(+), 271 deletions(-) create mode 100644 .changes/api-alpha.11.md diff --git a/.changes/api-alpha.11.md b/.changes/api-alpha.11.md new file mode 100644 index 000000000..fc5e1ba58 --- /dev/null +++ b/.changes/api-alpha.11.md @@ -0,0 +1,27 @@ +--- +"authenticator-js": patch +"autostart-js": patch +"barcode-scanner-js": patch +"cli-js": patch +"clipboard-manager-js": patch +"deep-link-js": patch +"dialog-js": patch +"fs-js": patch +"global-shortcut-js": patch +"http-js": patch +"log-js": patch +"notification-js": patch +"os-js": patch +"positioner-js": patch +"process-js": patch +"shell-js": patch +"sql-js": patch +"store-js": patch +"stronghold-js": patch +"updater-js": patch +"upload-js": patch +"websocket-js": patch +"window-state-js": patch +--- + +Update to @tauri-apps/api v2.0.0-alpha.11. diff --git a/.changes/api-alpha.9.md b/.changes/api-alpha.9.md index b042bcf5b..e0267b08b 100644 --- a/.changes/api-alpha.9.md +++ b/.changes/api-alpha.9.md @@ -24,4 +24,4 @@ "window-state-js": patch --- -Update to @tauri-apps/api v2.0.0-alpha.16. +Update to @tauri-apps/api v2.0.0-alpha.9. diff --git a/.changes/fix-emit-all-usage.md b/.changes/fix-emit-all-usage.md index a18d755a7..30782cdf7 100644 --- a/.changes/fix-emit-all-usage.md +++ b/.changes/fix-emit-all-usage.md @@ -1,5 +1,5 @@ --- -"log": patch +"log-plugin": patch "deep-link": patch "store": patch --- diff --git a/Cargo.lock b/Cargo.lock index 8ba6daff8..c79a2d502 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5616,8 +5616,9 @@ checksum = "1d2faeef5759ab89935255b1a4cd98e0baf99d1085e37d36599c625dac49ae8e" [[package]] name = "tauri" -version = "2.0.0-alpha.16" -source = "git+https://github.com/tauri-apps/tauri?rev=0601d5dddbdc2331a431300c5a4e50f7882baeea#0601d5dddbdc2331a431300c5a4e50f7882baeea" +version = "2.0.0-alpha.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "892f45e7f10c9481488633f506496eeb3c69034c17fc71d5562d1e87b5442f78" dependencies = [ "anyhow", "bytes 1.4.0", @@ -5668,8 +5669,9 @@ dependencies = [ [[package]] name = "tauri-build" -version = "2.0.0-alpha.10" -source = "git+https://github.com/tauri-apps/tauri?rev=0601d5dddbdc2331a431300c5a4e50f7882baeea#0601d5dddbdc2331a431300c5a4e50f7882baeea" +version = "2.0.0-alpha.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d5f06f1cbb5507f4de803f8e1fab01c71cb9515297a90d3adba4fa6c06a194c" dependencies = [ "anyhow", "cargo_toml", @@ -5690,8 +5692,9 @@ dependencies = [ [[package]] name = "tauri-codegen" -version = "2.0.0-alpha.9" -source = "git+https://github.com/tauri-apps/tauri?rev=0601d5dddbdc2331a431300c5a4e50f7882baeea#0601d5dddbdc2331a431300c5a4e50f7882baeea" +version = "2.0.0-alpha.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28094b389b0981aba46eeba7dcda6216c23fdf7288b2e0414e69fbc55aa55676" dependencies = [ "base64 0.21.2", "brotli", @@ -5715,8 +5718,9 @@ dependencies = [ [[package]] name = "tauri-macros" -version = "2.0.0-alpha.9" -source = "git+https://github.com/tauri-apps/tauri?rev=0601d5dddbdc2331a431300c5a4e50f7882baeea#0601d5dddbdc2331a431300c5a4e50f7882baeea" +version = "2.0.0-alpha.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1df582259285a81324d4d38846433bfd3c0440c7a268f730acb7c29350f25cf" dependencies = [ "heck", "proc-macro2", @@ -6107,8 +6111,9 @@ dependencies = [ [[package]] name = "tauri-runtime" -version = "1.0.0-alpha.3" -source = "git+https://github.com/tauri-apps/tauri?rev=0601d5dddbdc2331a431300c5a4e50f7882baeea#0601d5dddbdc2331a431300c5a4e50f7882baeea" +version = "1.0.0-alpha.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f46889d91efc090ac4031c7c423c30c5280d6984cb071b729b748d643aa3df40" dependencies = [ "gtk", "http", @@ -6124,8 +6129,9 @@ dependencies = [ [[package]] name = "tauri-runtime-wry" -version = "1.0.0-alpha.4" -source = "git+https://github.com/tauri-apps/tauri?rev=0601d5dddbdc2331a431300c5a4e50f7882baeea#0601d5dddbdc2331a431300c5a4e50f7882baeea" +version = "1.0.0-alpha.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b083797e147019c318db883a51868014751b578ba0d1ef3aadd34199a3bbcf61" dependencies = [ "cocoa 0.24.1", "gtk", @@ -6143,8 +6149,9 @@ dependencies = [ [[package]] name = "tauri-utils" -version = "2.0.0-alpha.9" -source = "git+https://github.com/tauri-apps/tauri?rev=0601d5dddbdc2331a431300c5a4e50f7882baeea#0601d5dddbdc2331a431300c5a4e50f7882baeea" +version = "2.0.0-alpha.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68e138783ca404416a4afe34f22f804d533c28fb73f87870f365c6ecdcee6c23" dependencies = [ "aes-gcm 0.10.2", "brotli", diff --git a/Cargo.toml b/Cargo.toml index 44c34e9a8..6aba67f8b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,8 +5,8 @@ resolver = "2" [workspace.dependencies] serde = { version = "1", features = ["derive"] } log = "0.4" -tauri = { git = "https://github.com/tauri-apps/tauri", rev = "0601d5dddbdc2331a431300c5a4e50f7882baeea" } -tauri-build = { git = "https://github.com/tauri-apps/tauri", rev = "0601d5dddbdc2331a431300c5a4e50f7882baeea" } +tauri = "2.0.0-alpha.17" +tauri-build = "2.0.0-alpha.11" serde_json = "1" thiserror = "1" diff --git a/examples/api/package.json b/examples/api/package.json index 49b7c1722..b1b2d5dc4 100644 --- a/examples/api/package.json +++ b/examples/api/package.json @@ -9,7 +9,7 @@ "serve": "vite preview" }, "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.9", + "@tauri-apps/api": "2.0.0-alpha.11", "@tauri-apps/plugin-barcode-scanner": "2.0.0-alpha.1", "@tauri-apps/plugin-cli": "2.0.0-alpha.2", "@tauri-apps/plugin-clipboard-manager": "2.0.0-alpha.2", @@ -28,11 +28,11 @@ "@iconify-json/codicon": "^1.1.31", "@iconify-json/ph": "^1.1.6", "@sveltejs/vite-plugin-svelte": "^2.4.6", - "@tauri-apps/cli": "2.0.0-alpha.16", + "@tauri-apps/cli": "2.0.0-alpha.17", "@unocss/extractor-svelte": "^0.56.5", "internal-ip": "^8.0.0", "svelte": "^4.2.2", "unocss": "^0.56.5", "vite": "^4.5.0" } -} +} \ No newline at end of file diff --git a/plugins/authenticator/CHANGELOG.md b/plugins/authenticator/CHANGELOG.md index 35880572d..03ac852c1 100644 --- a/plugins/authenticator/CHANGELOG.md +++ b/plugins/authenticator/CHANGELOG.md @@ -2,7 +2,7 @@ ## \[2.0.0-alpha.2] -- [`5c13736`](https://github.com/tauri-apps/plugins-workspace/commit/5c137365c60790e8d4037d449e8237aa3fffdab0)([#673](https://github.com/tauri-apps/plugins-workspace/pull/673)) Update to @tauri-apps/api v2.0.0-alpha.16. +- [`5c13736`](https://github.com/tauri-apps/plugins-workspace/commit/5c137365c60790e8d4037d449e8237aa3fffdab0)([#673](https://github.com/tauri-apps/plugins-workspace/pull/673)) Update to @tauri-apps/api v2.0.0-alpha.9. ## \[2.0.0-alpha.2] diff --git a/plugins/authenticator/package.json b/plugins/authenticator/package.json index e9d24fc0b..c76aa5250 100644 --- a/plugins/authenticator/package.json +++ b/plugins/authenticator/package.json @@ -28,6 +28,6 @@ "tslib": "2.6.0" }, "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.9" + "@tauri-apps/api": "2.0.0-alpha.11" } -} +} \ No newline at end of file diff --git a/plugins/authenticator/src/api-iife.js b/plugins/authenticator/src/api-iife.js index c56017b87..42d197c3e 100644 --- a/plugins/authenticator/src/api-iife.js +++ b/plugins/authenticator/src/api-iife.js @@ -1 +1 @@ -if("__TAURI__"in window){var __TAURI_AUTHENTICATOR__=function(e){"use strict";var t=Object.defineProperty,n=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},i=(e,t,i)=>(n(e,t,"read from private field"),i?i.call(e):t.get(e));function a(e,t=!1){return window.__TAURI_INTERNALS__.transformCallback(e,t)}((e,n)=>{for(var i in n)t(e,i,{get:n[i],enumerable:!0})})({},{Channel:()=>s,PluginListener:()=>c,addPluginListener:()=>l,convertFileSrc:()=>u,invoke:()=>o,transformCallback:()=>a});var r,s=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,((e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)})(this,r,(()=>{})),this.id=a((e=>{i(this,r).call(this,e)}))}set onmessage(e){var t,i,a,s;a=e,n(t=this,i=r,"write to private field"),s?s.call(t,a):i.set(t,a)}get onmessage(){return i(this,r)}toJSON(){return`__CHANNEL__:${this.id}`}};r=new WeakMap;var c=class{constructor(e,t,n){this.plugin=e,this.event=t,this.channelId=n}async unregister(){return o(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function l(e,t,n){let i=new s;return i.onmessage=n,o(`plugin:${e}|register_listener`,{event:t,handler:i}).then((()=>new c(e,t,i.id)))}async function o(e,t={},n){return window.__TAURI_INTERNALS__.invoke(e,t,n)}function u(e,t="asset"){return window.__TAURI_INTERNALS__.convertFileSrc(e,t)}return e.Authenticator=class{async init(){return await o("plugin:authenticator|init_auth")}async register(e,t){return await o("plugin:authenticator|register",{timeout:1e4,challenge:e,application:t})}async verifyRegistration(e,t,n,i){return await o("plugin:authenticator|verify_registration",{challenge:e,application:t,registerData:n,clientData:i})}async sign(e,t,n){return await o("plugin:authenticator|sign",{timeout:1e4,challenge:e,application:t,keyHandle:n})}async verifySignature(e,t,n,i,a,r){return await o("plugin:authenticator|verify_signature",{challenge:e,application:t,signData:n,clientData:i,keyHandle:a,pubkey:r})}},e}({});Object.defineProperty(window.__TAURI__,"authenticator",{value:__TAURI_AUTHENTICATOR__})} +if("__TAURI__"in window){var __TAURI_AUTHENTICATOR__=function(t){"use strict";async function i(t,i={},a){return window.__TAURI_INTERNALS__.invoke(t,i,a)}"function"==typeof SuppressedError&&SuppressedError;return t.Authenticator=class{async init(){return await i("plugin:authenticator|init_auth")}async register(t,a){return await i("plugin:authenticator|register",{timeout:1e4,challenge:t,application:a})}async verifyRegistration(t,a,e,n){return await i("plugin:authenticator|verify_registration",{challenge:t,application:a,registerData:e,clientData:n})}async sign(t,a,e){return await i("plugin:authenticator|sign",{timeout:1e4,challenge:t,application:a,keyHandle:e})}async verifySignature(t,a,e,n,r,u){return await i("plugin:authenticator|verify_signature",{challenge:t,application:a,signData:e,clientData:n,keyHandle:r,pubkey:u})}},t}({});Object.defineProperty(window.__TAURI__,"authenticator",{value:__TAURI_AUTHENTICATOR__})} diff --git a/plugins/autostart/CHANGELOG.md b/plugins/autostart/CHANGELOG.md index 35880572d..03ac852c1 100644 --- a/plugins/autostart/CHANGELOG.md +++ b/plugins/autostart/CHANGELOG.md @@ -2,7 +2,7 @@ ## \[2.0.0-alpha.2] -- [`5c13736`](https://github.com/tauri-apps/plugins-workspace/commit/5c137365c60790e8d4037d449e8237aa3fffdab0)([#673](https://github.com/tauri-apps/plugins-workspace/pull/673)) Update to @tauri-apps/api v2.0.0-alpha.16. +- [`5c13736`](https://github.com/tauri-apps/plugins-workspace/commit/5c137365c60790e8d4037d449e8237aa3fffdab0)([#673](https://github.com/tauri-apps/plugins-workspace/pull/673)) Update to @tauri-apps/api v2.0.0-alpha.9. ## \[2.0.0-alpha.2] diff --git a/plugins/autostart/package.json b/plugins/autostart/package.json index 89f589178..55944831f 100644 --- a/plugins/autostart/package.json +++ b/plugins/autostart/package.json @@ -27,6 +27,6 @@ "tslib": "2.6.0" }, "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.9" + "@tauri-apps/api": "2.0.0-alpha.11" } -} +} \ No newline at end of file diff --git a/plugins/autostart/src/api-iife.js b/plugins/autostart/src/api-iife.js index 6d8798816..dad831483 100644 --- a/plugins/autostart/src/api-iife.js +++ b/plugins/autostart/src/api-iife.js @@ -1 +1 @@ -if("__TAURI__"in window){var __TAURI_AUTOSTART__=function(e){"use strict";var n=Object.defineProperty,t=(e,n,t)=>{if(!n.has(e))throw TypeError("Cannot "+t)},r=(e,n,r)=>(t(e,n,"read from private field"),r?r.call(e):n.get(e));function a(e,n=!1){return window.__TAURI_INTERNALS__.transformCallback(e,n)}((e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})})({},{Channel:()=>s,PluginListener:()=>o,addPluginListener:()=>_,convertFileSrc:()=>c,invoke:()=>l,transformCallback:()=>a});var i,s=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,((e,n,t)=>{if(n.has(e))throw TypeError("Cannot add the same private member more than once");n instanceof WeakSet?n.add(e):n.set(e,t)})(this,i,(()=>{})),this.id=a((e=>{r(this,i).call(this,e)}))}set onmessage(e){var n,r,a,s;a=e,t(n=this,r=i,"write to private field"),s?s.call(n,a):r.set(n,a)}get onmessage(){return r(this,i)}toJSON(){return`__CHANNEL__:${this.id}`}};i=new WeakMap;var o=class{constructor(e,n,t){this.plugin=e,this.event=n,this.channelId=t}async unregister(){return l(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function _(e,n,t){let r=new s;return r.onmessage=t,l(`plugin:${e}|register_listener`,{event:n,handler:r}).then((()=>new o(e,n,r.id)))}async function l(e,n={},t){return window.__TAURI_INTERNALS__.invoke(e,n,t)}function c(e,n="asset"){return window.__TAURI_INTERNALS__.convertFileSrc(e,n)}return e.disable=async function(){await l("plugin:autostart|disable")},e.enable=async function(){await l("plugin:autostart|enable")},e.isEnabled=async function(){return await l("plugin:autostart|is_enabled")},e}({});Object.defineProperty(window.__TAURI__,"autostart",{value:__TAURI_AUTOSTART__})} +if("__TAURI__"in window){var __TAURI_AUTOSTART__=function(n){"use strict";async function t(n,t={},a){return window.__TAURI_INTERNALS__.invoke(n,t,a)}return"function"==typeof SuppressedError&&SuppressedError,n.disable=async function(){await t("plugin:autostart|disable")},n.enable=async function(){await t("plugin:autostart|enable")},n.isEnabled=async function(){return await t("plugin:autostart|is_enabled")},n}({});Object.defineProperty(window.__TAURI__,"autostart",{value:__TAURI_AUTOSTART__})} diff --git a/plugins/barcode-scanner/CHANGELOG.md b/plugins/barcode-scanner/CHANGELOG.md index 32af83e44..cbf9a277f 100644 --- a/plugins/barcode-scanner/CHANGELOG.md +++ b/plugins/barcode-scanner/CHANGELOG.md @@ -2,7 +2,7 @@ ## \[2.0.0-alpha.1] -- [`5c13736`](https://github.com/tauri-apps/plugins-workspace/commit/5c137365c60790e8d4037d449e8237aa3fffdab0)([#673](https://github.com/tauri-apps/plugins-workspace/pull/673)) Update to @tauri-apps/api v2.0.0-alpha.16. +- [`5c13736`](https://github.com/tauri-apps/plugins-workspace/commit/5c137365c60790e8d4037d449e8237aa3fffdab0)([#673](https://github.com/tauri-apps/plugins-workspace/pull/673)) Update to @tauri-apps/api v2.0.0-alpha.9. ## \[2.0.0-alpha.0] diff --git a/plugins/barcode-scanner/package.json b/plugins/barcode-scanner/package.json index 7b2a6abee..9d30d1bb6 100644 --- a/plugins/barcode-scanner/package.json +++ b/plugins/barcode-scanner/package.json @@ -28,6 +28,6 @@ "tslib": "^2.5.0" }, "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.9" + "@tauri-apps/api": "2.0.0-alpha.11" } -} +} \ No newline at end of file diff --git a/plugins/barcode-scanner/src/api-iife.js b/plugins/barcode-scanner/src/api-iife.js index adbdc978e..ec3a507cb 100644 --- a/plugins/barcode-scanner/src/api-iife.js +++ b/plugins/barcode-scanner/src/api-iife.js @@ -1 +1 @@ -if("__TAURI__"in window){var __TAURI_BARCODESCANNER__=function(e){"use strict";var n=Object.defineProperty,t=(e,n,t)=>{if(!n.has(e))throw TypeError("Cannot "+t)},r=(e,n,r)=>(t(e,n,"read from private field"),r?r.call(e):n.get(e));function a(e,n=!1){return window.__TAURI_INTERNALS__.transformCallback(e,n)}((e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})})({},{Channel:()=>s,PluginListener:()=>o,addPluginListener:()=>_,convertFileSrc:()=>l,invoke:()=>u,transformCallback:()=>a});var i,s=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,((e,n,t)=>{if(n.has(e))throw TypeError("Cannot add the same private member more than once");n instanceof WeakSet?n.add(e):n.set(e,t)})(this,i,(()=>{})),this.id=a((e=>{r(this,i).call(this,e)}))}set onmessage(e){var n,r,a,s;a=e,t(n=this,r=i,"write to private field"),s?s.call(n,a):r.set(n,a)}get onmessage(){return r(this,i)}toJSON(){return`__CHANNEL__:${this.id}`}};i=new WeakMap;var c,o=class{constructor(e,n,t){this.plugin=e,this.event=n,this.channelId=t}async unregister(){return u(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function _(e,n,t){let r=new s;return r.onmessage=t,u(`plugin:${e}|register_listener`,{event:n,handler:r}).then((()=>new o(e,n,r.id)))}async function u(e,n={},t){return window.__TAURI_INTERNALS__.invoke(e,n,t)}function l(e,n="asset"){return window.__TAURI_INTERNALS__.convertFileSrc(e,n)}return e.Format=void 0,(c=e.Format||(e.Format={})).QRCode="QR_CODE",c.UPC_A="UPC_A",c.UPC_E="UPC_E",c.EAN8="EAN_8",c.EAN13="EAN_13",c.Code39="CODE_39",c.Code93="CODE_93",c.Code128="CODE_128",c.Codabar="CODABAR",c.ITF="ITF",c.Aztec="AZTEC",c.DataMatrix="DATA_MATRIX",c.PDF417="PDF_417",e.cancel=async function(){return await u("plugin:barcodeScanner|cancel")},e.checkPermissions=async function(){return await u("plugin:barcodeScanner|checkPermissions").then((e=>e.camera))},e.openAppSettings=async function(){return await u("plugin:barcodeScanner|openAppSettings")},e.requestPermissions=async function(){return await u("plugin:barcodeScanner|requestPermissions").then((e=>e.camera))},e.scan=async function(e){return await u("plugin:barcodeScanner|scan",{...e})},e}({});Object.defineProperty(window.__TAURI__,"barcodeScanner",{value:__TAURI_BARCODESCANNER__})} +if("__TAURI__"in window){var __TAURI_BARCODESCANNER__=function(n){"use strict";async function e(n,e={},r){return window.__TAURI_INTERNALS__.invoke(n,e,r)}var r;return"function"==typeof SuppressedError&&SuppressedError,n.Format=void 0,(r=n.Format||(n.Format={})).QRCode="QR_CODE",r.UPC_A="UPC_A",r.UPC_E="UPC_E",r.EAN8="EAN_8",r.EAN13="EAN_13",r.Code39="CODE_39",r.Code93="CODE_93",r.Code128="CODE_128",r.Codabar="CODABAR",r.ITF="ITF",r.Aztec="AZTEC",r.DataMatrix="DATA_MATRIX",r.PDF417="PDF_417",n.cancel=async function(){return await e("plugin:barcodeScanner|cancel")},n.checkPermissions=async function(){return await e("plugin:barcodeScanner|checkPermissions").then((n=>n.camera))},n.openAppSettings=async function(){return await e("plugin:barcodeScanner|openAppSettings")},n.requestPermissions=async function(){return await e("plugin:barcodeScanner|requestPermissions").then((n=>n.camera))},n.scan=async function(n){return await e("plugin:barcodeScanner|scan",{...n})},n}({});Object.defineProperty(window.__TAURI__,"barcodeScanner",{value:__TAURI_BARCODESCANNER__})} diff --git a/plugins/cli/CHANGELOG.md b/plugins/cli/CHANGELOG.md index 35880572d..03ac852c1 100644 --- a/plugins/cli/CHANGELOG.md +++ b/plugins/cli/CHANGELOG.md @@ -2,7 +2,7 @@ ## \[2.0.0-alpha.2] -- [`5c13736`](https://github.com/tauri-apps/plugins-workspace/commit/5c137365c60790e8d4037d449e8237aa3fffdab0)([#673](https://github.com/tauri-apps/plugins-workspace/pull/673)) Update to @tauri-apps/api v2.0.0-alpha.16. +- [`5c13736`](https://github.com/tauri-apps/plugins-workspace/commit/5c137365c60790e8d4037d449e8237aa3fffdab0)([#673](https://github.com/tauri-apps/plugins-workspace/pull/673)) Update to @tauri-apps/api v2.0.0-alpha.9. ## \[2.0.0-alpha.2] diff --git a/plugins/cli/package.json b/plugins/cli/package.json index d3eeec6ab..01319487d 100644 --- a/plugins/cli/package.json +++ b/plugins/cli/package.json @@ -27,6 +27,6 @@ "tslib": "^2.4.1" }, "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.9" + "@tauri-apps/api": "2.0.0-alpha.11" } -} +} \ No newline at end of file diff --git a/plugins/cli/src/api-iife.js b/plugins/cli/src/api-iife.js index 81e2042c1..270dfe803 100644 --- a/plugins/cli/src/api-iife.js +++ b/plugins/cli/src/api-iife.js @@ -1 +1 @@ -if("__TAURI__"in window){var __TAURI_CLI__=function(e){"use strict";var n=Object.defineProperty,t=(e,n,t)=>{if(!n.has(e))throw TypeError("Cannot "+t)},r=(e,n,r)=>(t(e,n,"read from private field"),r?r.call(e):n.get(e));function i(e,n=!1){return window.__TAURI_INTERNALS__.transformCallback(e,n)}((e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})})({},{Channel:()=>s,PluginListener:()=>_,addPluginListener:()=>o,convertFileSrc:()=>l,invoke:()=>c,transformCallback:()=>i});var a,s=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,((e,n,t)=>{if(n.has(e))throw TypeError("Cannot add the same private member more than once");n instanceof WeakSet?n.add(e):n.set(e,t)})(this,a,(()=>{})),this.id=i((e=>{r(this,a).call(this,e)}))}set onmessage(e){var n,r,i,s;i=e,t(n=this,r=a,"write to private field"),s?s.call(n,i):r.set(n,i)}get onmessage(){return r(this,a)}toJSON(){return`__CHANNEL__:${this.id}`}};a=new WeakMap;var _=class{constructor(e,n,t){this.plugin=e,this.event=n,this.channelId=t}async unregister(){return c(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function o(e,n,t){let r=new s;return r.onmessage=t,c(`plugin:${e}|register_listener`,{event:n,handler:r}).then((()=>new _(e,n,r.id)))}async function c(e,n={},t){return window.__TAURI_INTERNALS__.invoke(e,n,t)}function l(e,n="asset"){return window.__TAURI_INTERNALS__.convertFileSrc(e,n)}return e.getMatches=async function(){return await c("plugin:cli|cli_matches")},e}({});Object.defineProperty(window.__TAURI__,"cli",{value:__TAURI_CLI__})} +if("__TAURI__"in window){var __TAURI_CLI__=function(_){"use strict";return"function"==typeof SuppressedError&&SuppressedError,_.getMatches=async function(){return await async function(_,n={},e){return window.__TAURI_INTERNALS__.invoke(_,n,e)}("plugin:cli|cli_matches")},_}({});Object.defineProperty(window.__TAURI__,"cli",{value:__TAURI_CLI__})} diff --git a/plugins/clipboard-manager/CHANGELOG.md b/plugins/clipboard-manager/CHANGELOG.md index 35880572d..03ac852c1 100644 --- a/plugins/clipboard-manager/CHANGELOG.md +++ b/plugins/clipboard-manager/CHANGELOG.md @@ -2,7 +2,7 @@ ## \[2.0.0-alpha.2] -- [`5c13736`](https://github.com/tauri-apps/plugins-workspace/commit/5c137365c60790e8d4037d449e8237aa3fffdab0)([#673](https://github.com/tauri-apps/plugins-workspace/pull/673)) Update to @tauri-apps/api v2.0.0-alpha.16. +- [`5c13736`](https://github.com/tauri-apps/plugins-workspace/commit/5c137365c60790e8d4037d449e8237aa3fffdab0)([#673](https://github.com/tauri-apps/plugins-workspace/pull/673)) Update to @tauri-apps/api v2.0.0-alpha.9. ## \[2.0.0-alpha.2] diff --git a/plugins/clipboard-manager/package.json b/plugins/clipboard-manager/package.json index 98aba2cf9..ef3d71d3b 100644 --- a/plugins/clipboard-manager/package.json +++ b/plugins/clipboard-manager/package.json @@ -27,6 +27,6 @@ "tslib": "^2.4.1" }, "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.9" + "@tauri-apps/api": "2.0.0-alpha.11" } -} +} \ No newline at end of file diff --git a/plugins/clipboard-manager/src/api-iife.js b/plugins/clipboard-manager/src/api-iife.js index 81874e91c..b865ef294 100644 --- a/plugins/clipboard-manager/src/api-iife.js +++ b/plugins/clipboard-manager/src/api-iife.js @@ -1 +1 @@ -if("__TAURI__"in window){var __TAURI_CLIPBOARDMANAGER__=function(e){"use strict";var n=Object.defineProperty,t=(e,n,t)=>{if(!n.has(e))throw TypeError("Cannot "+t)},r=(e,n,r)=>(t(e,n,"read from private field"),r?r.call(e):n.get(e));function i(e,n=!1){return window.__TAURI_INTERNALS__.transformCallback(e,n)}((e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})})({},{Channel:()=>s,PluginListener:()=>l,addPluginListener:()=>o,convertFileSrc:()=>c,invoke:()=>_,transformCallback:()=>i});var a,s=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,((e,n,t)=>{if(n.has(e))throw TypeError("Cannot add the same private member more than once");n instanceof WeakSet?n.add(e):n.set(e,t)})(this,a,(()=>{})),this.id=i((e=>{r(this,a).call(this,e)}))}set onmessage(e){var n,r,i,s;i=e,t(n=this,r=a,"write to private field"),s?s.call(n,i):r.set(n,i)}get onmessage(){return r(this,a)}toJSON(){return`__CHANNEL__:${this.id}`}};a=new WeakMap;var l=class{constructor(e,n,t){this.plugin=e,this.event=n,this.channelId=t}async unregister(){return _(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function o(e,n,t){let r=new s;return r.onmessage=t,_(`plugin:${e}|register_listener`,{event:n,handler:r}).then((()=>new l(e,n,r.id)))}async function _(e,n={},t){return window.__TAURI_INTERNALS__.invoke(e,n,t)}function c(e,n="asset"){return window.__TAURI_INTERNALS__.convertFileSrc(e,n)}return e.readText=async function(){return(await _("plugin:clipboard|read")).plainText.text},e.writeText=async function(e,n){return _("plugin:clipboard|write",{data:{plainText:{label:null==n?void 0:n.label,text:e}}})},e}({});Object.defineProperty(window.__TAURI__,"clipboardManager",{value:__TAURI_CLIPBOARDMANAGER__})} +if("__TAURI__"in window){var __TAURI_CLIPBOARDMANAGER__=function(e){"use strict";async function n(e,n={},r){return window.__TAURI_INTERNALS__.invoke(e,n,r)}return"function"==typeof SuppressedError&&SuppressedError,e.readText=async function(){return(await n("plugin:clipboard|read")).plainText.text},e.writeText=async function(e,r){return n("plugin:clipboard|write",{data:{plainText:{label:null==r?void 0:r.label,text:e}}})},e}({});Object.defineProperty(window.__TAURI__,"clipboardManager",{value:__TAURI_CLIPBOARDMANAGER__})} diff --git a/plugins/deep-link/CHANGELOG.md b/plugins/deep-link/CHANGELOG.md index e8f2c06f7..09145db47 100644 --- a/plugins/deep-link/CHANGELOG.md +++ b/plugins/deep-link/CHANGELOG.md @@ -2,7 +2,7 @@ ## \[2.0.0-alpha.1] -- [`5c13736`](https://github.com/tauri-apps/plugins-workspace/commit/5c137365c60790e8d4037d449e8237aa3fffdab0)([#673](https://github.com/tauri-apps/plugins-workspace/pull/673)) Update to @tauri-apps/api v2.0.0-alpha.16. +- [`5c13736`](https://github.com/tauri-apps/plugins-workspace/commit/5c137365c60790e8d4037d449e8237aa3fffdab0)([#673](https://github.com/tauri-apps/plugins-workspace/pull/673)) Update to @tauri-apps/api v2.0.0-alpha.9. ## \[2.0.0-alpha.0] diff --git a/plugins/deep-link/android/src/main/java/DeepLinkPlugin.kt b/plugins/deep-link/android/src/main/java/DeepLinkPlugin.kt index 3a9a757ab..58bc70c74 100644 --- a/plugins/deep-link/android/src/main/java/DeepLinkPlugin.kt +++ b/plugins/deep-link/android/src/main/java/DeepLinkPlugin.kt @@ -6,6 +6,7 @@ package app.tauri.deep_link import android.app.Activity import android.content.Intent +import android.os.Bundle import android.webkit.WebView import app.tauri.Logger import app.tauri.annotation.InvokeArg @@ -49,7 +50,7 @@ class DeepLinkPlugin(private val activity: Activity): Plugin(activity) { override fun load(webView: WebView) { instance = this - var intent = activity.intent + val intent = activity.intent if (intent.action == Intent.ACTION_VIEW) { // TODO: check if it makes sense to split up init url and last url diff --git a/plugins/deep-link/examples/app/package.json b/plugins/deep-link/examples/app/package.json index c86ace99e..6db325592 100644 --- a/plugins/deep-link/examples/app/package.json +++ b/plugins/deep-link/examples/app/package.json @@ -10,13 +10,13 @@ "tauri": "tauri" }, "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.6", + "@tauri-apps/api": "2.0.0-alpha.11", "@tauri-apps/plugin-deep-link": "2.0.0-alpha.1" }, "devDependencies": { - "@tauri-apps/cli": "2.0.0-alpha.16", + "@tauri-apps/cli": "2.0.0-alpha.17", "internal-ip": "^8.0.0", "typescript": "^5.2.2", "vite": "^4.5.0" } -} +} \ No newline at end of file diff --git a/plugins/deep-link/package.json b/plugins/deep-link/package.json index bfc8d0ae8..4b6614e7b 100644 --- a/plugins/deep-link/package.json +++ b/plugins/deep-link/package.json @@ -28,6 +28,6 @@ "tslib": "^2.5.0" }, "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.9" + "@tauri-apps/api": "2.0.0-alpha.11" } -} +} \ No newline at end of file diff --git a/plugins/deep-link/src/api-iife.js b/plugins/deep-link/src/api-iife.js index ba2d5b233..2f427a575 100644 --- a/plugins/deep-link/src/api-iife.js +++ b/plugins/deep-link/src/api-iife.js @@ -1 +1 @@ -if("__TAURI__"in window){var __TAURI_DEEPLINK__=function(e){"use strict";var n=Object.defineProperty,t=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},r=(e,n,t)=>{if(!n.has(e))throw TypeError("Cannot "+t)},i=(e,n,t)=>(r(e,n,"read from private field"),t?t.call(e):n.get(e));function a(e,n=!1){return window.__TAURI_INTERNALS__.transformCallback(e,n)}t({},{Channel:()=>s,PluginListener:()=>u,addPluginListener:()=>o,convertFileSrc:()=>c,invoke:()=>l,transformCallback:()=>a});var _,s=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,((e,n,t)=>{if(n.has(e))throw TypeError("Cannot add the same private member more than once");n instanceof WeakSet?n.add(e):n.set(e,t)})(this,_,(()=>{})),this.id=a((e=>{i(this,_).call(this,e)}))}set onmessage(e){((e,n,t,i)=>{r(e,n,"write to private field"),i?i.call(e,t):n.set(e,t)})(this,_,e)}get onmessage(){return i(this,_)}toJSON(){return`__CHANNEL__:${this.id}`}};_=new WeakMap;var u=class{constructor(e,n,t){this.plugin=e,this.event=n,this.channelId=t}async unregister(){return l(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function o(e,n,t){let r=new s;return r.onmessage=t,l(`plugin:${e}|register_listener`,{event:n,handler:r}).then((()=>new u(e,n,r.id)))}async function l(e,n={},t){return window.__TAURI_INTERNALS__.invoke(e,n,t)}function c(e,n="asset"){return window.__TAURI_INTERNALS__.convertFileSrc(e,n)}t({},{TauriEvent:()=>d,emit:()=>v,listen:()=>h,once:()=>I});var d=(e=>(e.WINDOW_RESIZED="tauri://resize",e.WINDOW_MOVED="tauri://move",e.WINDOW_CLOSE_REQUESTED="tauri://close-requested",e.WINDOW_CREATED="tauri://window-created",e.WINDOW_DESTROYED="tauri://destroyed",e.WINDOW_FOCUS="tauri://focus",e.WINDOW_BLUR="tauri://blur",e.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",e.WINDOW_THEME_CHANGED="tauri://theme-changed",e.WINDOW_FILE_DROP="tauri://file-drop",e.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",e.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",e.MENU="tauri://menu",e))(d||{});async function E(e,n){await l("plugin:event|unlisten",{event:e,eventId:n})}async function h(e,n,t){return l("plugin:event|listen",{event:e,windowLabel:t?.target,handler:a(n)}).then((n=>async()=>E(e,n)))}async function I(e,n,t){return h(e,(t=>{n(t),E(e,t.id).catch((()=>{}))}),t)}async function v(e,n,t){await l("plugin:event|emit",{event:e,windowLabel:t?.target,payload:n})}async function N(){return await l("plugin:deep-link|get_current")}return e.getCurrent=N,e.onOpenUrl=async function(e){const n=await N();return null!=n&&e(n),await h("deep-link://new-url",(n=>e(n.payload)))},e}({});Object.defineProperty(window.__TAURI__,"deepLink",{value:__TAURI_DEEPLINK__})} +if("__TAURI__"in window){var __TAURI_DEEPLINK__=function(e){"use strict";function n(e,n=!1){return window.__TAURI_INTERNALS__.transformCallback(e,n)}async function r(e,n={},r){return window.__TAURI_INTERNALS__.invoke(e,n,r)}var t;async function _(e,t,_){return r("plugin:event|listen",{event:e,windowLabel:_?.target,handler:n(t)}).then((n=>async()=>async function(e,n){await r("plugin:event|unlisten",{event:e,eventId:n})}(e,n)))}async function i(){return await r("plugin:deep-link|get_current")}return"function"==typeof SuppressedError&&SuppressedError,function(e){e.WINDOW_RESIZED="tauri://resize",e.WINDOW_MOVED="tauri://move",e.WINDOW_CLOSE_REQUESTED="tauri://close-requested",e.WINDOW_CREATED="tauri://window-created",e.WINDOW_DESTROYED="tauri://destroyed",e.WINDOW_FOCUS="tauri://focus",e.WINDOW_BLUR="tauri://blur",e.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",e.WINDOW_THEME_CHANGED="tauri://theme-changed",e.WINDOW_FILE_DROP="tauri://file-drop",e.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",e.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",e.MENU="tauri://menu"}(t||(t={})),e.getCurrent=i,e.onOpenUrl=async function(e){const n=await i();return null!=n&&e(n),await _("deep-link://new-url",(n=>e(n.payload)))},e}({});Object.defineProperty(window.__TAURI__,"deepLink",{value:__TAURI_DEEPLINK__})} diff --git a/plugins/dialog/CHANGELOG.md b/plugins/dialog/CHANGELOG.md index 9c3d89c99..4299e9016 100644 --- a/plugins/dialog/CHANGELOG.md +++ b/plugins/dialog/CHANGELOG.md @@ -2,7 +2,7 @@ ## \[2.0.0-alpha.2] -- [`5c13736`](https://github.com/tauri-apps/plugins-workspace/commit/5c137365c60790e8d4037d449e8237aa3fffdab0)([#673](https://github.com/tauri-apps/plugins-workspace/pull/673)) Update to @tauri-apps/api v2.0.0-alpha.16. +- [`5c13736`](https://github.com/tauri-apps/plugins-workspace/commit/5c137365c60790e8d4037d449e8237aa3fffdab0)([#673](https://github.com/tauri-apps/plugins-workspace/pull/673)) Update to @tauri-apps/api v2.0.0-alpha.9. ## \[2.0.0-alpha.2] diff --git a/plugins/dialog/package.json b/plugins/dialog/package.json index 65d75346f..af5fd35e1 100644 --- a/plugins/dialog/package.json +++ b/plugins/dialog/package.json @@ -27,6 +27,6 @@ "tslib": "^2.4.1" }, "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.9" + "@tauri-apps/api": "2.0.0-alpha.11" } -} +} \ No newline at end of file diff --git a/plugins/dialog/src/api-iife.js b/plugins/dialog/src/api-iife.js index 5fa71c3cd..e8664e408 100644 --- a/plugins/dialog/src/api-iife.js +++ b/plugins/dialog/src/api-iife.js @@ -1 +1 @@ -if("__TAURI__"in window){var __TAURI_DIALOG__=function(n){"use strict";var t=Object.defineProperty,e=(n,t,e)=>{if(!t.has(n))throw TypeError("Cannot "+e)},i=(n,t,i)=>(e(n,t,"read from private field"),i?i.call(n):t.get(n));function o(n,t=!1){return window.__TAURI_INTERNALS__.transformCallback(n,t)}((n,e)=>{for(var i in e)t(n,i,{get:e[i],enumerable:!0})})({},{Channel:()=>r,PluginListener:()=>a,addPluginListener:()=>s,convertFileSrc:()=>d,invoke:()=>u,transformCallback:()=>o});var l,r=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,((n,t,e)=>{if(t.has(n))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(n):t.set(n,e)})(this,l,(()=>{})),this.id=o((n=>{i(this,l).call(this,n)}))}set onmessage(n){var t,i,o,r;o=n,e(t=this,i=l,"write to private field"),r?r.call(t,o):i.set(t,o)}get onmessage(){return i(this,l)}toJSON(){return`__CHANNEL__:${this.id}`}};l=new WeakMap;var a=class{constructor(n,t,e){this.plugin=n,this.event=t,this.channelId=e}async unregister(){return u(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function s(n,t,e){let i=new r;return i.onmessage=e,u(`plugin:${n}|register_listener`,{event:t,handler:i}).then((()=>new a(n,t,i.id)))}async function u(n,t={},e){return window.__TAURI_INTERNALS__.invoke(n,t,e)}function d(n,t="asset"){return window.__TAURI_INTERNALS__.convertFileSrc(n,t)}return n.ask=async function(n,t){var e,i,o,l,r;const a="string"==typeof t?{title:t}:t;return u("plugin:dialog|ask",{message:n.toString(),title:null===(e=null==a?void 0:a.title)||void 0===e?void 0:e.toString(),type_:null==a?void 0:a.type,okButtonLabel:null!==(o=null===(i=null==a?void 0:a.okLabel)||void 0===i?void 0:i.toString())&&void 0!==o?o:"Yes",cancelButtonLabel:null!==(r=null===(l=null==a?void 0:a.cancelLabel)||void 0===l?void 0:l.toString())&&void 0!==r?r:"No"})},n.confirm=async function(n,t){var e,i,o,l,r;const a="string"==typeof t?{title:t}:t;return u("plugin:dialog|confirm",{message:n.toString(),title:null===(e=null==a?void 0:a.title)||void 0===e?void 0:e.toString(),type_:null==a?void 0:a.type,okButtonLabel:null!==(o=null===(i=null==a?void 0:a.okLabel)||void 0===i?void 0:i.toString())&&void 0!==o?o:"Ok",cancelButtonLabel:null!==(r=null===(l=null==a?void 0:a.cancelLabel)||void 0===l?void 0:l.toString())&&void 0!==r?r:"Cancel"})},n.message=async function(n,t){var e,i;const o="string"==typeof t?{title:t}:t;return u("plugin:dialog|message",{message:n.toString(),title:null===(e=null==o?void 0:o.title)||void 0===e?void 0:e.toString(),type_:null==o?void 0:o.type,okButtonLabel:null===(i=null==o?void 0:o.okLabel)||void 0===i?void 0:i.toString()})},n.open=async function(n={}){return"object"==typeof n&&Object.freeze(n),u("plugin:dialog|open",{options:n})},n.save=async function(n={}){return"object"==typeof n&&Object.freeze(n),u("plugin:dialog|save",{options:n})},n}({});Object.defineProperty(window.__TAURI__,"dialog",{value:__TAURI_DIALOG__})} +if("__TAURI__"in window){var __TAURI_DIALOG__=function(n){"use strict";async function o(n,o={},t){return window.__TAURI_INTERNALS__.invoke(n,o,t)}return"function"==typeof SuppressedError&&SuppressedError,n.ask=async function(n,t){var i,l,e,u,r;const d="string"==typeof t?{title:t}:t;return o("plugin:dialog|ask",{message:n.toString(),title:null===(i=null==d?void 0:d.title)||void 0===i?void 0:i.toString(),type_:null==d?void 0:d.type,okButtonLabel:null!==(e=null===(l=null==d?void 0:d.okLabel)||void 0===l?void 0:l.toString())&&void 0!==e?e:"Yes",cancelButtonLabel:null!==(r=null===(u=null==d?void 0:d.cancelLabel)||void 0===u?void 0:u.toString())&&void 0!==r?r:"No"})},n.confirm=async function(n,t){var i,l,e,u,r;const d="string"==typeof t?{title:t}:t;return o("plugin:dialog|confirm",{message:n.toString(),title:null===(i=null==d?void 0:d.title)||void 0===i?void 0:i.toString(),type_:null==d?void 0:d.type,okButtonLabel:null!==(e=null===(l=null==d?void 0:d.okLabel)||void 0===l?void 0:l.toString())&&void 0!==e?e:"Ok",cancelButtonLabel:null!==(r=null===(u=null==d?void 0:d.cancelLabel)||void 0===u?void 0:u.toString())&&void 0!==r?r:"Cancel"})},n.message=async function(n,t){var i,l;const e="string"==typeof t?{title:t}:t;return o("plugin:dialog|message",{message:n.toString(),title:null===(i=null==e?void 0:e.title)||void 0===i?void 0:i.toString(),type_:null==e?void 0:e.type,okButtonLabel:null===(l=null==e?void 0:e.okLabel)||void 0===l?void 0:l.toString()})},n.open=async function(n={}){return"object"==typeof n&&Object.freeze(n),o("plugin:dialog|open",{options:n})},n.save=async function(n={}){return"object"==typeof n&&Object.freeze(n),o("plugin:dialog|save",{options:n})},n}({});Object.defineProperty(window.__TAURI__,"dialog",{value:__TAURI_DIALOG__})} diff --git a/plugins/dialog/src/init-iife.js b/plugins/dialog/src/init-iife.js index fcfd45ca1..f51830fd7 100644 --- a/plugins/dialog/src/init-iife.js +++ b/plugins/dialog/src/init-iife.js @@ -1 +1 @@ -!function(){"use strict";var e=Object.defineProperty,n=(e,n,t)=>{if(!n.has(e))throw TypeError("Cannot "+t)},t=(e,t,r)=>(n(e,t,"read from private field"),r?r.call(e):t.get(e));function r(e,n=!1){return window.__TAURI_INTERNALS__.transformCallback(e,n)}((n,t)=>{for(var r in t)e(n,r,{get:t[r],enumerable:!0})})({},{Channel:()=>s,PluginListener:()=>a,addPluginListener:()=>o,convertFileSrc:()=>c,invoke:()=>l,transformCallback:()=>r});var i,s=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,((e,n,t)=>{if(n.has(e))throw TypeError("Cannot add the same private member more than once");n instanceof WeakSet?n.add(e):n.set(e,t)})(this,i,(()=>{})),this.id=r((e=>{t(this,i).call(this,e)}))}set onmessage(e){var t,r,s,a;s=e,n(t=this,r=i,"write to private field"),a?a.call(t,s):r.set(t,s)}get onmessage(){return t(this,i)}toJSON(){return`__CHANNEL__:${this.id}`}};i=new WeakMap;var a=class{constructor(e,n,t){this.plugin=e,this.event=n,this.channelId=t}async unregister(){return l(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function o(e,n,t){let r=new s;return r.onmessage=t,l(`plugin:${e}|register_listener`,{event:n,handler:r}).then((()=>new a(e,n,r.id)))}async function l(e,n={},t){return window.__TAURI_INTERNALS__.invoke(e,n,t)}function c(e,n="asset"){return window.__TAURI_INTERNALS__.convertFileSrc(e,n)}window.alert=function(e){l("plugin:dialog|message",{message:e.toString()})},window.confirm=function(e){return l("plugin:dialog|confirm",{message:e.toString()})}}(); +!function(){"use strict";async function n(n,i={},o){return window.__TAURI_INTERNALS__.invoke(n,i,o)}"function"==typeof SuppressedError&&SuppressedError,window.alert=function(i){n("plugin:dialog|message",{message:i.toString()})},window.confirm=function(i){return n("plugin:dialog|confirm",{message:i.toString()})}}(); diff --git a/plugins/fs/CHANGELOG.md b/plugins/fs/CHANGELOG.md index 898e2aea1..16a4ddd9c 100644 --- a/plugins/fs/CHANGELOG.md +++ b/plugins/fs/CHANGELOG.md @@ -2,7 +2,7 @@ ## \[2.0.0-alpha.2] -- [`5c13736`](https://github.com/tauri-apps/plugins-workspace/commit/5c137365c60790e8d4037d449e8237aa3fffdab0)([#673](https://github.com/tauri-apps/plugins-workspace/pull/673)) Update to @tauri-apps/api v2.0.0-alpha.16. +- [`5c13736`](https://github.com/tauri-apps/plugins-workspace/commit/5c137365c60790e8d4037d449e8237aa3fffdab0)([#673](https://github.com/tauri-apps/plugins-workspace/pull/673)) Update to @tauri-apps/api v2.0.0-alpha.9. ## \[2.0.0-alpha.2] diff --git a/plugins/fs/package.json b/plugins/fs/package.json index 2b09606be..2ab0de75f 100644 --- a/plugins/fs/package.json +++ b/plugins/fs/package.json @@ -28,6 +28,6 @@ "tslib": "^2.4.1" }, "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.9" + "@tauri-apps/api": "2.0.0-alpha.11" } -} +} \ No newline at end of file diff --git a/plugins/fs/src/api-iife.js b/plugins/fs/src/api-iife.js index af959a33a..d4da6a73b 100644 --- a/plugins/fs/src/api-iife.js +++ b/plugins/fs/src/api-iife.js @@ -1 +1 @@ -if("__TAURI__"in window){var __TAURI_FS__=function(e){"use strict";var t=Object.defineProperty,n=(e,n)=>{for(var r in n)t(e,r,{get:n[r],enumerable:!0})},r=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},i=(e,t,n)=>(r(e,t,"read from private field"),n?n.call(e):t.get(e));function o(e,t=!1){return window.__TAURI_INTERNALS__.transformCallback(e,t)}n({},{Channel:()=>c,PluginListener:()=>s,addPluginListener:()=>u,convertFileSrc:()=>l,invoke:()=>p,transformCallback:()=>o});var a,c=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,((e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)})(this,a,(()=>{})),this.id=o((e=>{i(this,a).call(this,e)}))}set onmessage(e){((e,t,n,i)=>{r(e,t,"write to private field"),i?i.call(e,n):t.set(e,n)})(this,a,e)}get onmessage(){return i(this,a)}toJSON(){return`__CHANNEL__:${this.id}`}};a=new WeakMap;var s=class{constructor(e,t,n){this.plugin=e,this.event=t,this.channelId=n}async unregister(){return p(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function u(e,t,n){let r=new c;return r.onmessage=n,p(`plugin:${e}|register_listener`,{event:t,handler:r}).then((()=>new s(e,t,r.id)))}async function p(e,t={},n){return window.__TAURI_INTERNALS__.invoke(e,t,n)}function l(e,t="asset"){return window.__TAURI_INTERNALS__.convertFileSrc(e,t)}n({},{BaseDirectory:()=>y,appCacheDir:()=>_,appConfigDir:()=>d,appDataDir:()=>f,appLocalDataDir:()=>h,appLogDir:()=>S,audioDir:()=>g,basename:()=>V,cacheDir:()=>v,configDir:()=>m,dataDir:()=>D,delimiter:()=>O,desktopDir:()=>w,dirname:()=>H,documentDir:()=>A,downloadDir:()=>b,executableDir:()=>T,extname:()=>$,fontDir:()=>R,homeDir:()=>I,isAbsolute:()=>W,join:()=>M,localDataDir:()=>C,normalize:()=>B,pictureDir:()=>L,publicDir:()=>N,resolve:()=>z,resolveResource:()=>E,resourceDir:()=>F,runtimeDir:()=>j,sep:()=>k,tempDir:()=>P,templateDir:()=>x,videoDir:()=>U});var y=(e=>(e[e.Audio=1]="Audio",e[e.Cache=2]="Cache",e[e.Config=3]="Config",e[e.Data=4]="Data",e[e.LocalData=5]="LocalData",e[e.Document=6]="Document",e[e.Download=7]="Download",e[e.Picture=8]="Picture",e[e.Public=9]="Public",e[e.Video=10]="Video",e[e.Resource=11]="Resource",e[e.Temp=12]="Temp",e[e.AppConfig=13]="AppConfig",e[e.AppData=14]="AppData",e[e.AppLocalData=15]="AppLocalData",e[e.AppCache=16]="AppCache",e[e.AppLog=17]="AppLog",e[e.Desktop=18]="Desktop",e[e.Executable=19]="Executable",e[e.Font=20]="Font",e[e.Home=21]="Home",e[e.Runtime=22]="Runtime",e[e.Template=23]="Template",e))(y||{});async function d(){return p("plugin:path|resolve_directory",{directory:13})}async function f(){return p("plugin:path|resolve_directory",{directory:14})}async function h(){return p("plugin:path|resolve_directory",{directory:15})}async function _(){return p("plugin:path|resolve_directory",{directory:16})}async function g(){return p("plugin:path|resolve_directory",{directory:1})}async function v(){return p("plugin:path|resolve_directory",{directory:2})}async function m(){return p("plugin:path|resolve_directory",{directory:3})}async function D(){return p("plugin:path|resolve_directory",{directory:4})}async function w(){return p("plugin:path|resolve_directory",{directory:18})}async function A(){return p("plugin:path|resolve_directory",{directory:6})}async function b(){return p("plugin:path|resolve_directory",{directory:7})}async function T(){return p("plugin:path|resolve_directory",{directory:19})}async function R(){return p("plugin:path|resolve_directory",{directory:20})}async function I(){return p("plugin:path|resolve_directory",{directory:21})}async function C(){return p("plugin:path|resolve_directory",{directory:5})}async function L(){return p("plugin:path|resolve_directory",{directory:8})}async function N(){return p("plugin:path|resolve_directory",{directory:9})}async function F(){return p("plugin:path|resolve_directory",{directory:11})}async function E(e){return p("plugin:path|resolve_directory",{directory:11,path:e})}async function j(){return p("plugin:path|resolve_directory",{directory:22})}async function x(){return p("plugin:path|resolve_directory",{directory:23})}async function U(){return p("plugin:path|resolve_directory",{directory:10})}async function S(){return p("plugin:path|resolve_directory",{directory:17})}async function P(e){return p("plugin:path|resolve_directory",{directory:12})}function k(){return window.__TAURI_INTERNALS__.plugins.path.sep}function O(){return window.__TAURI_INTERNALS__.plugins.path.delimiter}async function z(...e){return p("plugin:path|resolve",{paths:e})}async function B(e){return p("plugin:path|normalize",{path:e})}async function M(...e){return p("plugin:path|join",{paths:e})}async function H(e){return p("plugin:path|dirname",{path:e})}async function $(e){return p("plugin:path|extname",{path:e})}async function V(e,t){return p("plugin:path|basename",{path:e,ext:t})}async function W(e){return p("plugin:path|isAbsolute",{path:e})}async function J(e,t,n){"object"==typeof n&&Object.freeze(n),"object"==typeof e&&Object.freeze(e);const r={path:"",contents:""};let i=n;return"string"==typeof e?r.path=e:(r.path=e.path,r.contents=e.contents),"string"==typeof t?r.contents=null!=t?t:"":i=t,await p("plugin:fs|write_file",{path:r.path,contents:Array.from((new TextEncoder).encode(r.contents)),options:i})}return e.BaseDirectory=y,e.Dir=y,e.copyFile=async function(e,t,n={}){return await p("plugin:fs|copy_file",{source:e,destination:t,options:n})},e.createDir=async function(e,t={}){return await p("plugin:fs|create_dir",{path:e,options:t})},e.exists=async function(e){return await p("plugin:fs|exists",{path:e})},e.metadata=async function(e){return await p("plugin:fs|metadata",{path:e}).then((e=>{const{accessedAtMs:t,createdAtMs:n,modifiedAtMs:r,...i}=e;return{accessedAt:new Date(t),createdAt:new Date(n),modifiedAt:new Date(r),...i}}))},e.readBinaryFile=async function(e,t={}){const n=await p("plugin:fs|read_file",{path:e,options:t});return Uint8Array.from(n)},e.readDir=async function(e,t={}){return await p("plugin:fs|read_dir",{path:e,options:t})},e.readTextFile=async function(e,t={}){return await p("plugin:fs|read_text_file",{path:e,options:t})},e.removeDir=async function(e,t={}){return await p("plugin:fs|remove_dir",{path:e,options:t})},e.removeFile=async function(e,t={}){return await p("plugin:fs|remove_file",{path:e,options:t})},e.renameFile=async function(e,t,n={}){return await p("plugin:fs|rename_file",{oldPath:e,newPath:t,options:n})},e.writeBinaryFile=async function(e,t,n){"object"==typeof n&&Object.freeze(n),"object"==typeof e&&Object.freeze(e);const r={path:"",contents:[]};let i=n;return"string"==typeof e?r.path=e:(r.path=e.path,r.contents=e.contents),t&&"dir"in t?i=t:"string"==typeof e&&(r.contents=null!=t?t:[]),await p("plugin:fs|write_file",{path:r.path,contents:Array.from(r.contents instanceof ArrayBuffer?new Uint8Array(r.contents):r.contents),options:i})},e.writeFile=J,e.writeTextFile=J,e}({});Object.defineProperty(window.__TAURI__,"fs",{value:__TAURI_FS__})} +if("__TAURI__"in window){var __TAURI_FS__=function(t){"use strict";async function e(t,e={},n){return window.__TAURI_INTERNALS__.invoke(t,e,n)}var n;async function a(t,n,a){"object"==typeof a&&Object.freeze(a),"object"==typeof t&&Object.freeze(t);const i={path:"",contents:""};let o=a;return"string"==typeof t?i.path=t:(i.path=t.path,i.contents=t.contents),"string"==typeof n?i.contents=null!=n?n:"":o=n,await e("plugin:fs|write_file",{path:i.path,contents:Array.from((new TextEncoder).encode(i.contents)),options:o})}return"function"==typeof SuppressedError&&SuppressedError,t.Dir=void 0,(n=t.Dir||(t.Dir={}))[n.Audio=1]="Audio",n[n.Cache=2]="Cache",n[n.Config=3]="Config",n[n.Data=4]="Data",n[n.LocalData=5]="LocalData",n[n.Document=6]="Document",n[n.Download=7]="Download",n[n.Picture=8]="Picture",n[n.Public=9]="Public",n[n.Video=10]="Video",n[n.Resource=11]="Resource",n[n.Temp=12]="Temp",n[n.AppConfig=13]="AppConfig",n[n.AppData=14]="AppData",n[n.AppLocalData=15]="AppLocalData",n[n.AppCache=16]="AppCache",n[n.AppLog=17]="AppLog",n[n.Desktop=18]="Desktop",n[n.Executable=19]="Executable",n[n.Font=20]="Font",n[n.Home=21]="Home",n[n.Runtime=22]="Runtime",n[n.Template=23]="Template",t.BaseDirectory=t.Dir,t.copyFile=async function(t,n,a={}){return await e("plugin:fs|copy_file",{source:t,destination:n,options:a})},t.createDir=async function(t,n={}){return await e("plugin:fs|create_dir",{path:t,options:n})},t.exists=async function(t){return await e("plugin:fs|exists",{path:t})},t.metadata=async function(t){return await e("plugin:fs|metadata",{path:t}).then((t=>{const{accessedAtMs:e,createdAtMs:n,modifiedAtMs:a,...i}=t;return{accessedAt:new Date(e),createdAt:new Date(n),modifiedAt:new Date(a),...i}}))},t.readBinaryFile=async function(t,n={}){const a=await e("plugin:fs|read_file",{path:t,options:n});return Uint8Array.from(a)},t.readDir=async function(t,n={}){return await e("plugin:fs|read_dir",{path:t,options:n})},t.readTextFile=async function(t,n={}){return await e("plugin:fs|read_text_file",{path:t,options:n})},t.removeDir=async function(t,n={}){return await e("plugin:fs|remove_dir",{path:t,options:n})},t.removeFile=async function(t,n={}){return await e("plugin:fs|remove_file",{path:t,options:n})},t.renameFile=async function(t,n,a={}){return await e("plugin:fs|rename_file",{oldPath:t,newPath:n,options:a})},t.writeBinaryFile=async function(t,n,a){"object"==typeof a&&Object.freeze(a),"object"==typeof t&&Object.freeze(t);const i={path:"",contents:[]};let o=a;return"string"==typeof t?i.path=t:(i.path=t.path,i.contents=t.contents),n&&"dir"in n?o=n:"string"==typeof t&&(i.contents=null!=n?n:[]),await e("plugin:fs|write_file",{path:i.path,contents:Array.from(i.contents instanceof ArrayBuffer?new Uint8Array(i.contents):i.contents),options:o})},t.writeFile=a,t.writeTextFile=a,t}({});Object.defineProperty(window.__TAURI__,"fs",{value:__TAURI_FS__})} diff --git a/plugins/global-shortcut/CHANGELOG.md b/plugins/global-shortcut/CHANGELOG.md index 318c3c377..1f8362aba 100644 --- a/plugins/global-shortcut/CHANGELOG.md +++ b/plugins/global-shortcut/CHANGELOG.md @@ -2,7 +2,7 @@ ## \[2.0.0-alpha.2] -- [`5c13736`](https://github.com/tauri-apps/plugins-workspace/commit/5c137365c60790e8d4037d449e8237aa3fffdab0)([#673](https://github.com/tauri-apps/plugins-workspace/pull/673)) Update to @tauri-apps/api v2.0.0-alpha.16. +- [`5c13736`](https://github.com/tauri-apps/plugins-workspace/commit/5c137365c60790e8d4037d449e8237aa3fffdab0)([#673](https://github.com/tauri-apps/plugins-workspace/pull/673)) Update to @tauri-apps/api v2.0.0-alpha.9. ## \[2.0.0-alpha.2] diff --git a/plugins/global-shortcut/package.json b/plugins/global-shortcut/package.json index 943c0483a..5602189dc 100644 --- a/plugins/global-shortcut/package.json +++ b/plugins/global-shortcut/package.json @@ -27,6 +27,6 @@ "tslib": "^2.4.1" }, "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.9" + "@tauri-apps/api": "2.0.0-alpha.11" } -} +} \ No newline at end of file diff --git a/plugins/global-shortcut/src/api-iife.js b/plugins/global-shortcut/src/api-iife.js index 3ff40c720..934749c67 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_GLOBALSHORTCUT__=function(e){"use strict";var t=Object.defineProperty,n=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},r=(e,t,r)=>(n(e,t,"read from private field"),r?r.call(e):t.get(e));function i(e,t=!1){return window.__TAURI_INTERNALS__.transformCallback(e,t)}((e,n)=>{for(var r in n)t(e,r,{get:n[r],enumerable:!0})})({},{Channel:()=>a,PluginListener:()=>o,addPluginListener:()=>l,convertFileSrc:()=>c,invoke:()=>u,transformCallback:()=>i});var s,a=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,((e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)})(this,s,(()=>{})),this.id=i((e=>{r(this,s).call(this,e)}))}set onmessage(e){var t,r,i,a;i=e,n(t=this,r=s,"write to private field"),a?a.call(t,i):r.set(t,i)}get onmessage(){return r(this,s)}toJSON(){return`__CHANNEL__:${this.id}`}};s=new WeakMap;var o=class{constructor(e,t,n){this.plugin=e,this.event=t,this.channelId=n}async unregister(){return u(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function l(e,t,n){let r=new a;return r.onmessage=n,u(`plugin:${e}|register_listener`,{event:t,handler:r}).then((()=>new o(e,t,r.id)))}async function u(e,t={},n){return window.__TAURI_INTERNALS__.invoke(e,t,n)}function c(e,t="asset"){return window.__TAURI_INTERNALS__.convertFileSrc(e,t)}return e.isRegistered=async function(e){return await u("plugin:globalShortcut|is_registered",{shortcut:e})},e.register=async function(e,t){const n=new a;return n.onmessage=t,await u("plugin:globalShortcut|register",{shortcut:e,handler:n})},e.registerAll=async function(e,t){const n=new a;return n.onmessage=t,await u("plugin:globalShortcut|register_all",{shortcuts:e,handler:n})},e.unregister=async function(e){return await u("plugin:globalShortcut|unregister",{shortcut:e})},e.unregisterAll=async function(){return await u("plugin:globalShortcut|unregister_all")},e}({});Object.defineProperty(window.__TAURI__,"globalShortcut",{value:__TAURI_GLOBALSHORTCUT__})} +if("__TAURI__"in window){var __TAURI_GLOBALSHORTCUT__=function(t){"use strict";function e(t,e,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(t):n?n.value:e.get(t)}var r;"function"==typeof SuppressedError&&SuppressedError;class n{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,r.set(this,(()=>{})),this.id=function(t,e=!1){return window.__TAURI_INTERNALS__.transformCallback(t,e)}((t=>{e(this,r,"f").call(this,t)}))}set onmessage(t){!function(t,e,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===n?o.call(t,r):o?o.value=r:e.set(t,r)}(this,r,t,"f")}get onmessage(){return e(this,r,"f")}toJSON(){return`__CHANNEL__:${this.id}`}}async function o(t,e={},r){return window.__TAURI_INTERNALS__.invoke(t,e,r)}return r=new WeakMap,t.isRegistered=async function(t){return await o("plugin:globalShortcut|is_registered",{shortcut:t})},t.register=async function(t,e){const r=new n;return r.onmessage=e,await o("plugin:globalShortcut|register",{shortcut:t,handler:r})},t.registerAll=async function(t,e){const r=new n;return r.onmessage=e,await o("plugin:globalShortcut|register_all",{shortcuts:t,handler:r})},t.unregister=async function(t){return await o("plugin:globalShortcut|unregister",{shortcut:t})},t.unregisterAll=async function(){return await o("plugin:globalShortcut|unregister_all")},t}({});Object.defineProperty(window.__TAURI__,"globalShortcut",{value:__TAURI_GLOBALSHORTCUT__})} diff --git a/plugins/http/CHANGELOG.md b/plugins/http/CHANGELOG.md index a8a356d03..23893ac0c 100644 --- a/plugins/http/CHANGELOG.md +++ b/plugins/http/CHANGELOG.md @@ -2,7 +2,7 @@ ## \[2.0.0-alpha.2] -- [`5c13736`](https://github.com/tauri-apps/plugins-workspace/commit/5c137365c60790e8d4037d449e8237aa3fffdab0)([#673](https://github.com/tauri-apps/plugins-workspace/pull/673)) Update to @tauri-apps/api v2.0.0-alpha.16. +- [`5c13736`](https://github.com/tauri-apps/plugins-workspace/commit/5c137365c60790e8d4037d449e8237aa3fffdab0)([#673](https://github.com/tauri-apps/plugins-workspace/pull/673)) Update to @tauri-apps/api v2.0.0-alpha.9. ## \[2.0.0-alpha.3] diff --git a/plugins/http/package.json b/plugins/http/package.json index 571532fa3..4b19a1380 100644 --- a/plugins/http/package.json +++ b/plugins/http/package.json @@ -27,6 +27,6 @@ "tslib": "^2.5.0" }, "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.9" + "@tauri-apps/api": "2.0.0-alpha.11" } -} +} \ No newline at end of file diff --git a/plugins/http/src/api-iife.js b/plugins/http/src/api-iife.js index e1d5d3c33..1f1aedcc2 100644 --- a/plugins/http/src/api-iife.js +++ b/plugins/http/src/api-iife.js @@ -1 +1 @@ -if("__TAURI__"in window){var __TAURI_HTTP__=function(e){"use strict";var t=Object.defineProperty,n=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},r=(e,t,r)=>(n(e,t,"read from private field"),r?r.call(e):t.get(e));function i(e,t=!1){return window.__TAURI_INTERNALS__.transformCallback(e,t)}((e,n)=>{for(var r in n)t(e,r,{get:n[r],enumerable:!0})})({},{Channel:()=>s,PluginListener:()=>o,addPluginListener:()=>c,convertFileSrc:()=>_,invoke:()=>l,transformCallback:()=>i});var a,s=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,((e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)})(this,a,(()=>{})),this.id=i((e=>{r(this,a).call(this,e)}))}set onmessage(e){var t,r,i,s;i=e,n(t=this,r=a,"write to private field"),s?s.call(t,i):r.set(t,i)}get onmessage(){return r(this,a)}toJSON(){return`__CHANNEL__:${this.id}`}};a=new WeakMap;var o=class{constructor(e,t,n){this.plugin=e,this.event=t,this.channelId=n}async unregister(){return l(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function c(e,t,n){let r=new s;return r.onmessage=n,l(`plugin:${e}|register_listener`,{event:t,handler:r}).then((()=>new o(e,t,r.id)))}async function l(e,t={},n){return window.__TAURI_INTERNALS__.invoke(e,t,n)}function _(e,t="asset"){return window.__TAURI_INTERNALS__.convertFileSrc(e,t)}return e.fetch=async function(e,t){const n=null==t?void 0:t.maxRedirections,r=null==t?void 0:t.maxRedirections;t&&(delete t.maxRedirections,delete t.connectTimeout);const i=new Request(e,t),a=await i.arrayBuffer(),s=a.byteLength?Array.from(new Uint8Array(a)):null,o=await l("plugin:http|fetch",{method:i.method,url:i.url,headers:Array.from(i.headers.entries()),data:s,maxRedirections:n,connectTimeout:r});i.signal.addEventListener("abort",(()=>{l("plugin:http|fetch_cancel",{rid:o})}));const{status:c,statusText:_,url:d,headers:u}=await l("plugin:http|fetch_send",{rid:o}),h=await l("plugin:http|fetch_read_body",{rid:o}),f=new Response(new Uint8Array(h),{headers:u,status:c,statusText:_});return Object.defineProperty(f,"url",{value:d}),f},e}({});Object.defineProperty(window.__TAURI__,"http",{value:__TAURI_HTTP__})} +if("__TAURI__"in window){var __TAURI_HTTP__=function(e){"use strict";async function t(e,t={},n){return window.__TAURI_INTERNALS__.invoke(e,t,n)}return"function"==typeof SuppressedError&&SuppressedError,e.fetch=async function(e,n){const r=null==n?void 0:n.maxRedirections,i=null==n?void 0:n.maxRedirections;n&&(delete n.maxRedirections,delete n.connectTimeout);const a=new Request(e,n),s=await a.arrayBuffer(),o=s.byteLength?Array.from(new Uint8Array(s)):null,u=await t("plugin:http|fetch",{method:a.method,url:a.url,headers:Array.from(a.headers.entries()),data:o,maxRedirections:r,connectTimeout:i});a.signal.addEventListener("abort",(()=>{t("plugin:http|fetch_cancel",{rid:u})}));const{status:d,statusText:c,url:_,headers:l}=await t("plugin:http|fetch_send",{rid:u}),f=await t("plugin:http|fetch_read_body",{rid:u}),h=new Response(new Uint8Array(f),{headers:l,status:d,statusText:c});return Object.defineProperty(h,"url",{value:_}),h},e}({});Object.defineProperty(window.__TAURI__,"http",{value:__TAURI_HTTP__})} diff --git a/plugins/log/CHANGELOG.md b/plugins/log/CHANGELOG.md index 6a984a6a5..77273b16e 100644 --- a/plugins/log/CHANGELOG.md +++ b/plugins/log/CHANGELOG.md @@ -2,7 +2,7 @@ ## \[2.0.0-alpha.2] -- [`5c13736`](https://github.com/tauri-apps/plugins-workspace/commit/5c137365c60790e8d4037d449e8237aa3fffdab0)([#673](https://github.com/tauri-apps/plugins-workspace/pull/673)) Update to @tauri-apps/api v2.0.0-alpha.16. +- [`5c13736`](https://github.com/tauri-apps/plugins-workspace/commit/5c137365c60790e8d4037d449e8237aa3fffdab0)([#673](https://github.com/tauri-apps/plugins-workspace/pull/673)) Update to @tauri-apps/api v2.0.0-alpha.9. ## \[2.0.0-alpha.2] diff --git a/plugins/log/package.json b/plugins/log/package.json index e71357c2b..de340e1ee 100644 --- a/plugins/log/package.json +++ b/plugins/log/package.json @@ -28,6 +28,6 @@ "tslib": "2.6.0" }, "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.9" + "@tauri-apps/api": "2.0.0-alpha.11" } -} +} \ No newline at end of file diff --git a/plugins/log/src/api-iife.js b/plugins/log/src/api-iife.js index 12b8c9e26..9ded0b4b7 100644 --- a/plugins/log/src/api-iife.js +++ b/plugins/log/src/api-iife.js @@ -1 +1 @@ -if("__TAURI__"in window){var __TAURI_LOG__=function(e){"use strict";var n=Object.defineProperty,t=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},r=(e,n,t)=>{if(!n.has(e))throw TypeError("Cannot "+t)},a=(e,n,t)=>(r(e,n,"read from private field"),t?t.call(e):n.get(e));function i(e,n=!1){return window.__TAURI_INTERNALS__.transformCallback(e,n)}t({},{Channel:()=>l,PluginListener:()=>s,addPluginListener:()=>c,convertFileSrc:()=>_,invoke:()=>u,transformCallback:()=>i});var o,l=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,((e,n,t)=>{if(n.has(e))throw TypeError("Cannot add the same private member more than once");n instanceof WeakSet?n.add(e):n.set(e,t)})(this,o,(()=>{})),this.id=i((e=>{a(this,o).call(this,e)}))}set onmessage(e){((e,n,t,a)=>{r(e,n,"write to private field"),a?a.call(e,t):n.set(e,t)})(this,o,e)}get onmessage(){return a(this,o)}toJSON(){return`__CHANNEL__:${this.id}`}};o=new WeakMap;var s=class{constructor(e,n,t){this.plugin=e,this.event=n,this.channelId=t}async unregister(){return u(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function c(e,n,t){let r=new l;return r.onmessage=t,u(`plugin:${e}|register_listener`,{event:n,handler:r}).then((()=>new s(e,n,r.id)))}async function u(e,n={},t){return window.__TAURI_INTERNALS__.invoke(e,n,t)}function _(e,n="asset"){return window.__TAURI_INTERNALS__.convertFileSrc(e,n)}t({},{TauriEvent:()=>f,emit:()=>E,listen:()=>w,once:()=>g});var d,f=(e=>(e.WINDOW_RESIZED="tauri://resize",e.WINDOW_MOVED="tauri://move",e.WINDOW_CLOSE_REQUESTED="tauri://close-requested",e.WINDOW_CREATED="tauri://window-created",e.WINDOW_DESTROYED="tauri://destroyed",e.WINDOW_FOCUS="tauri://focus",e.WINDOW_BLUR="tauri://blur",e.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",e.WINDOW_THEME_CHANGED="tauri://theme-changed",e.WINDOW_FILE_DROP="tauri://file-drop",e.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",e.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",e.MENU="tauri://menu",e))(f||{});async function v(e,n){await u("plugin:event|unlisten",{event:e,eventId:n})}async function w(e,n,t){return u("plugin:event|listen",{event:e,windowLabel:t?.target,handler:i(n)}).then((n=>async()=>v(e,n)))}async function g(e,n,t){return w(e,(t=>{n(t),v(e,t.id).catch((()=>{}))}),t)}async function E(e,n,t){await u("plugin:event|emit",{event:e,windowLabel:t?.target,payload:n})}async function h(e,n,t){var r,a;const i=null===(r=(new Error).stack)||void 0===r?void 0:r.split("\n").map((e=>e.split("@"))),o=null==i?void 0:i.filter((([e,n])=>e.length>0&&"[native code]"!==n)),{file:l,line:s,keyValues:c}=null!=t?t:{};let _=null===(a=null==o?void 0:o[0])||void 0===a?void 0:a.filter((e=>e.length>0)).join("@");"Error"===_&&(_="webview::unknown"),await u("plugin:log|log",{level:e,message:n,location:_,file:l,line:s,keyValues:c})}return function(e){e[e.Trace=1]="Trace",e[e.Debug=2]="Debug",e[e.Info=3]="Info",e[e.Warn=4]="Warn",e[e.Error=5]="Error"}(d||(d={})),e.attachConsole=async function(){return await w("log://log",(e=>{const n=e.payload,t=n.message.replace(/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g,"");switch(n.level){case d.Trace:console.log(t);break;case d.Debug:console.debug(t);break;case d.Info:console.info(t);break;case d.Warn:console.warn(t);break;case d.Error:console.error(t);break;default:throw new Error(`unknown log level ${n.level}`)}}))},e.debug=async function(e,n){await h(d.Debug,e,n)},e.error=async function(e,n){await h(d.Error,e,n)},e.info=async function(e,n){await h(d.Info,e,n)},e.trace=async function(e,n){await h(d.Trace,e,n)},e.warn=async function(e,n){await h(d.Warn,e,n)},e}({});Object.defineProperty(window.__TAURI__,"log",{value:__TAURI_LOG__})} +if("__TAURI__"in window){var __TAURI_LOG__=function(e){"use strict";function n(e,n=!1){return window.__TAURI_INTERNALS__.transformCallback(e,n)}async function r(e,n={},r){return window.__TAURI_INTERNALS__.invoke(e,n,r)}var a,o;async function t(e,a,o){return r("plugin:event|listen",{event:e,windowLabel:o?.target,handler:n(a)}).then((n=>async()=>async function(e,n){await r("plugin:event|unlisten",{event:e,eventId:n})}(e,n)))}async function i(e,n,a){var o,t;const i=null===(o=(new Error).stack)||void 0===o?void 0:o.split("\n").map((e=>e.split("@"))),l=null==i?void 0:i.filter((([e,n])=>e.length>0&&"[native code]"!==n)),{file:u,line:c,keyValues:s}=null!=a?a:{};let _=null===(t=null==l?void 0:l[0])||void 0===t?void 0:t.filter((e=>e.length>0)).join("@");"Error"===_&&(_="webview::unknown"),await r("plugin:log|log",{level:e,message:n,location:_,file:u,line:c,keyValues:s})}return"function"==typeof SuppressedError&&SuppressedError,function(e){e.WINDOW_RESIZED="tauri://resize",e.WINDOW_MOVED="tauri://move",e.WINDOW_CLOSE_REQUESTED="tauri://close-requested",e.WINDOW_CREATED="tauri://window-created",e.WINDOW_DESTROYED="tauri://destroyed",e.WINDOW_FOCUS="tauri://focus",e.WINDOW_BLUR="tauri://blur",e.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",e.WINDOW_THEME_CHANGED="tauri://theme-changed",e.WINDOW_FILE_DROP="tauri://file-drop",e.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",e.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",e.MENU="tauri://menu"}(a||(a={})),function(e){e[e.Trace=1]="Trace",e[e.Debug=2]="Debug",e[e.Info=3]="Info",e[e.Warn=4]="Warn",e[e.Error=5]="Error"}(o||(o={})),e.attachConsole=async function(){return await t("log://log",(e=>{const n=e.payload,r=n.message.replace(/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g,"");switch(n.level){case o.Trace:console.log(r);break;case o.Debug:console.debug(r);break;case o.Info:console.info(r);break;case o.Warn:console.warn(r);break;case o.Error:console.error(r);break;default:throw new Error(`unknown log level ${n.level}`)}}))},e.debug=async function(e,n){await i(o.Debug,e,n)},e.error=async function(e,n){await i(o.Error,e,n)},e.info=async function(e,n){await i(o.Info,e,n)},e.trace=async function(e,n){await i(o.Trace,e,n)},e.warn=async function(e,n){await i(o.Warn,e,n)},e}({});Object.defineProperty(window.__TAURI__,"log",{value:__TAURI_LOG__})} diff --git a/plugins/notification/CHANGELOG.md b/plugins/notification/CHANGELOG.md index 781ce6134..29dd92adf 100644 --- a/plugins/notification/CHANGELOG.md +++ b/plugins/notification/CHANGELOG.md @@ -2,7 +2,7 @@ ## \[2.0.0-alpha.2] -- [`5c13736`](https://github.com/tauri-apps/plugins-workspace/commit/5c137365c60790e8d4037d449e8237aa3fffdab0)([#673](https://github.com/tauri-apps/plugins-workspace/pull/673)) Update to @tauri-apps/api v2.0.0-alpha.16. +- [`5c13736`](https://github.com/tauri-apps/plugins-workspace/commit/5c137365c60790e8d4037d449e8237aa3fffdab0)([#673](https://github.com/tauri-apps/plugins-workspace/pull/673)) Update to @tauri-apps/api v2.0.0-alpha.9. ## \[2.0.0-alpha.3] diff --git a/plugins/notification/android/src/main/java/NotificationPlugin.kt b/plugins/notification/android/src/main/java/NotificationPlugin.kt index f8efac557..7253ec68a 100644 --- a/plugins/notification/android/src/main/java/NotificationPlugin.kt +++ b/plugins/notification/android/src/main/java/NotificationPlugin.kt @@ -109,10 +109,19 @@ class NotificationPlugin(private val activity: Activity): Plugin(activity) { this.manager = manager notificationManager = activity.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager + + val intent = activity.intent + intent?.let { + onIntent(it) + } } override fun onNewIntent(intent: Intent) { super.onNewIntent(intent) + onIntent(intent) + } + + fun onIntent(intent: Intent) { if (Intent.ACTION_MAIN != intent.action) { return } diff --git a/plugins/notification/package.json b/plugins/notification/package.json index e6421f71f..d761f61fc 100644 --- a/plugins/notification/package.json +++ b/plugins/notification/package.json @@ -27,6 +27,6 @@ "tslib": "^2.4.1" }, "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.9" + "@tauri-apps/api": "2.0.0-alpha.11" } -} +} \ No newline at end of file diff --git a/plugins/notification/src/api-iife.js b/plugins/notification/src/api-iife.js index 84d4bc567..b2ebe1e0c 100644 --- a/plugins/notification/src/api-iife.js +++ b/plugins/notification/src/api-iife.js @@ -1 +1 @@ -if("__TAURI__"in window){var __TAURI_NOTIFICATION__=function(n){"use strict";var i=Object.defineProperty,e=(n,i,e)=>{if(!i.has(n))throw TypeError("Cannot "+e)},t=(n,i,t)=>(e(n,i,"read from private field"),t?t.call(n):i.get(n));function o(n,i=!1){return window.__TAURI_INTERNALS__.transformCallback(n,i)}((n,e)=>{for(var t in e)i(n,t,{get:e[t],enumerable:!0})})({},{Channel:()=>a,PluginListener:()=>l,addPluginListener:()=>f,convertFileSrc:()=>d,invoke:()=>_,transformCallback:()=>o});var r,a=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,((n,i,e)=>{if(i.has(n))throw TypeError("Cannot add the same private member more than once");i instanceof WeakSet?i.add(n):i.set(n,e)})(this,r,(()=>{})),this.id=o((n=>{t(this,r).call(this,n)}))}set onmessage(n){var i,t,o,a;o=n,e(i=this,t=r,"write to private field"),a?a.call(i,o):t.set(i,o)}get onmessage(){return t(this,r)}toJSON(){return`__CHANNEL__:${this.id}`}};r=new WeakMap;var c,s,u,l=class{constructor(n,i,e){this.plugin=n,this.event=i,this.channelId=e}async unregister(){return _(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function f(n,i,e){let t=new a;return t.onmessage=e,_(`plugin:${n}|register_listener`,{event:i,handler:t}).then((()=>new l(n,i,t.id)))}async function _(n,i={},e){return window.__TAURI_INTERNALS__.invoke(n,i,e)}function d(n,i="asset"){return window.__TAURI_INTERNALS__.convertFileSrc(n,i)}return function(n){n.Year="year",n.Month="month",n.TwoWeeks="twoWeeks",n.Week="week",n.Day="day",n.Hour="hour",n.Minute="minute",n.Second="second"}(c||(c={})),n.Importance=void 0,(s=n.Importance||(n.Importance={}))[s.None=0]="None",s[s.Min=1]="Min",s[s.Low=2]="Low",s[s.Default=3]="Default",s[s.High=4]="High",n.Visibility=void 0,(u=n.Visibility||(n.Visibility={}))[u.Secret=-1]="Secret",u[u.Private=0]="Private",u[u.Public=1]="Public",n.active=async function(){return _("plugin:notification|get_active")},n.cancel=async function(n){return _("plugin:notification|cancel",{notifications:n})},n.cancelAll=async function(){return _("plugin:notification|cancel")},n.channels=async function(){return _("plugin:notification|listChannels")},n.createChannel=async function(n){return _("plugin:notification|create_channel",{...n})},n.isPermissionGranted=async function(){return"default"!==window.Notification.permission?Promise.resolve("granted"===window.Notification.permission):_("plugin:notification|is_permission_granted")},n.onAction=async function(n){return f("notification","actionPerformed",n)},n.onNotificationReceived=async function(n){return f("notification","notification",n)},n.pending=async function(){return _("plugin:notification|get_pending")},n.registerActionTypes=async function(n){return _("plugin:notification|register_action_types",{types:n})},n.removeActive=async function(n){return _("plugin:notification|remove_active",{notifications:n})},n.removeAllActive=async function(){return _("plugin:notification|remove_active")},n.removeChannel=async function(n){return _("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_NOTIFICATION__})} +if("__TAURI__"in window){var __TAURI_NOTIFICATION__=function(n){"use strict";function i(n,i,e,t){if("a"===e&&!t)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof i?n!==i||!t:!i.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===e?t:"a"===e?t.call(n):t?t.value:i.get(n)}var e,t,o,r;"function"==typeof SuppressedError&&SuppressedError;class c{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,e.set(this,(()=>{})),this.id=function(n,i=!1){return window.__TAURI_INTERNALS__.transformCallback(n,i)}((n=>{i(this,e,"f").call(this,n)}))}set onmessage(n){!function(n,i,e,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 i?n!==i||!o:!i.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===t?o.call(n,e):o?o.value=e:i.set(n,e)}(this,e,n,"f")}get onmessage(){return i(this,e,"f")}toJSON(){return`__CHANNEL__:${this.id}`}}e=new WeakMap;class a{constructor(n,i,e){this.plugin=n,this.event=i,this.channelId=e}async unregister(){return u(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}}async function s(n,i,e){const t=new c;return t.onmessage=e,u(`plugin:${n}|register_listener`,{event:i,handler:t}).then((()=>new a(n,i,t.id)))}async function u(n,i={},e){return window.__TAURI_INTERNALS__.invoke(n,i,e)}return function(n){n.Year="year",n.Month="month",n.TwoWeeks="twoWeeks",n.Week="week",n.Day="day",n.Hour="hour",n.Minute="minute",n.Second="second"}(t||(t={})),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.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_NOTIFICATION__})} diff --git a/plugins/notification/src/init-iife.js b/plugins/notification/src/init-iife.js index 8c9276747..b7e206b05 100644 --- a/plugins/notification/src/init-iife.js +++ b/plugins/notification/src/init-iife.js @@ -1 +1 @@ -!function(){"use strict";var e=Object.defineProperty,n=(e,n,t)=>{if(!n.has(e))throw TypeError("Cannot "+t)},t=(e,t,i)=>(n(e,t,"read from private field"),i?i.call(e):t.get(e));function i(e,n=!1){return window.__TAURI_INTERNALS__.transformCallback(e,n)}((n,t)=>{for(var i in t)e(n,i,{get:t[i],enumerable:!0})})({},{Channel:()=>o,PluginListener:()=>s,addPluginListener:()=>a,convertFileSrc:()=>l,invoke:()=>c,transformCallback:()=>i});var r,o=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,((e,n,t)=>{if(n.has(e))throw TypeError("Cannot add the same private member more than once");n instanceof WeakSet?n.add(e):n.set(e,t)})(this,r,(()=>{})),this.id=i((e=>{t(this,r).call(this,e)}))}set onmessage(e){var t,i,o,s;o=e,n(t=this,i=r,"write to private field"),s?s.call(t,o):i.set(t,o)}get onmessage(){return t(this,r)}toJSON(){return`__CHANNEL__:${this.id}`}};r=new WeakMap;var s=class{constructor(e,n,t){this.plugin=e,this.event=n,this.channelId=t}async unregister(){return c(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function a(e,n,t){let i=new o;return i.onmessage=t,c(`plugin:${e}|register_listener`,{event:n,handler:i}).then((()=>new s(e,n,i.id)))}async function c(e,n={},t){return window.__TAURI_INTERNALS__.invoke(e,n,t)}function l(e,n="asset"){return window.__TAURI_INTERNALS__.convertFileSrc(e,n)}!function(){let e=!1,n="default";function t(n){e=!0,window.Notification.permission=n,e=!1}window.Notification=function(e,n){const t=n||{};!function(e){"object"==typeof e&&Object.freeze(e),c("plugin:notification|notify",{options:"string"==typeof e?{title:e}:e})}(Object.assign(t,{title:e}))},window.Notification.requestPermission=function(){return c("plugin:notification|request_permission").then((e=>(t("prompt"===e?"default":e),e)))},Object.defineProperty(window.Notification,"permission",{enumerable:!0,get:()=>n,set:t=>{if(!e)throw new Error("Readonly property");n=t}}),("default"!==window.Notification.permission?Promise.resolve("granted"===window.Notification.permission):c("plugin:notification|is_permission_granted")).then((function(e){t(null===e?"default":e?"granted":"denied")}))}()}(); +!function(){"use strict";async function i(i,n={},t){return window.__TAURI_INTERNALS__.invoke(i,n,t)}"function"==typeof SuppressedError&&SuppressedError,function(){let n=!1,t="default";function o(i){n=!0,window.Notification.permission=i,n=!1}window.Notification=function(n,t){const o=t||{};!function(n){"object"==typeof n&&Object.freeze(n),i("plugin:notification|notify",{options:"string"==typeof n?{title:n}:n})}(Object.assign(o,{title:n}))},window.Notification.requestPermission=function(){return i("plugin:notification|request_permission").then((i=>(o("prompt"===i?"default":i),i)))},Object.defineProperty(window.Notification,"permission",{enumerable:!0,get:()=>t,set:i=>{if(!n)throw new Error("Readonly property");t=i}}),("default"!==window.Notification.permission?Promise.resolve("granted"===window.Notification.permission):i("plugin:notification|is_permission_granted")).then((function(i){o(null===i?"default":i?"granted":"denied")}))}()}(); diff --git a/plugins/os/CHANGELOG.md b/plugins/os/CHANGELOG.md index a10a8c6b2..594659216 100644 --- a/plugins/os/CHANGELOG.md +++ b/plugins/os/CHANGELOG.md @@ -2,7 +2,7 @@ ## \[2.0.0-alpha.3] -- [`5c13736`](https://github.com/tauri-apps/plugins-workspace/commit/5c137365c60790e8d4037d449e8237aa3fffdab0)([#673](https://github.com/tauri-apps/plugins-workspace/pull/673)) Update to @tauri-apps/api v2.0.0-alpha.16. +- [`5c13736`](https://github.com/tauri-apps/plugins-workspace/commit/5c137365c60790e8d4037d449e8237aa3fffdab0)([#673](https://github.com/tauri-apps/plugins-workspace/pull/673)) Update to @tauri-apps/api v2.0.0-alpha.9. ## \[2.0.0-alpha.2] diff --git a/plugins/os/package.json b/plugins/os/package.json index 569691046..5f612b823 100644 --- a/plugins/os/package.json +++ b/plugins/os/package.json @@ -27,6 +27,6 @@ "tslib": "2.6.0" }, "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.9" + "@tauri-apps/api": "2.0.0-alpha.11" } -} +} \ No newline at end of file diff --git a/plugins/os/src/api-iife.js b/plugins/os/src/api-iife.js index 8193db548..0adb2ae2f 100644 --- a/plugins/os/src/api-iife.js +++ b/plugins/os/src/api-iife.js @@ -1 +1 @@ -if("__TAURI__"in window){var __TAURI_OS__=function(n){"use strict";var e=Object.defineProperty,t=(n,e,t)=>{if(!e.has(n))throw TypeError("Cannot "+t)},r=(n,e,r)=>(t(n,e,"read from private field"),r?r.call(n):e.get(n));function i(n,e=!1){return window.__TAURI_INTERNALS__.transformCallback(n,e)}((n,t)=>{for(var r in t)e(n,r,{get:t[r],enumerable:!0})})({},{Channel:()=>o,PluginListener:()=>a,addPluginListener:()=>_,convertFileSrc:()=>u,invoke:()=>c,transformCallback:()=>i});var s,o=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,((n,e,t)=>{if(e.has(n))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(n):e.set(n,t)})(this,s,(()=>{})),this.id=i((n=>{r(this,s).call(this,n)}))}set onmessage(n){var e,r,i,o;i=n,t(e=this,r=s,"write to private field"),o?o.call(e,i):r.set(e,i)}get onmessage(){return r(this,s)}toJSON(){return`__CHANNEL__:${this.id}`}};s=new WeakMap;var a=class{constructor(n,e,t){this.plugin=n,this.event=e,this.channelId=t}async unregister(){return c(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function _(n,e,t){let r=new o;return r.onmessage=t,c(`plugin:${n}|register_listener`,{event:e,handler:r}).then((()=>new a(n,e,r.id)))}async function c(n,e={},t){return window.__TAURI_INTERNALS__.invoke(n,e,t)}function u(n,e="asset"){return window.__TAURI_INTERNALS__.convertFileSrc(n,e)}return n.arch=async function(){return c("plugin:os|arch")},n.eol=function(){return window.__TAURI__.os.__eol},n.exeExtension=async function(){return c("plugin:os|exe_extension")},n.family=async function(){return c("plugin:os|family")},n.hostname=async function(){return c("plugin:os|hostname")},n.locale=async function(){return c("plugin:os|locale")},n.platform=async function(){return c("plugin:os|platform")},n.type=async function(){return c("plugin:os|os_type")},n.version=async function(){return c("plugin:os|version")},n}({});Object.defineProperty(window.__TAURI__,"os",{value:__TAURI_OS__})} +if("__TAURI__"in window){var __TAURI_OS__=function(n){"use strict";async function o(n,o={},e){return window.__TAURI_INTERNALS__.invoke(n,o,e)}return"function"==typeof SuppressedError&&SuppressedError,n.arch=async function(){return o("plugin:os|arch")},n.eol=function(){return window.__TAURI__.os.__eol},n.exeExtension=async function(){return o("plugin:os|exe_extension")},n.family=async function(){return o("plugin:os|family")},n.hostname=async function(){return o("plugin:os|hostname")},n.locale=async function(){return o("plugin:os|locale")},n.platform=async function(){return o("plugin:os|platform")},n.type=async function(){return o("plugin:os|os_type")},n.version=async function(){return o("plugin:os|version")},n}({});Object.defineProperty(window.__TAURI__,"os",{value:__TAURI_OS__})} diff --git a/plugins/positioner/CHANGELOG.md b/plugins/positioner/CHANGELOG.md index 5f04b7971..f9f0560e6 100644 --- a/plugins/positioner/CHANGELOG.md +++ b/plugins/positioner/CHANGELOG.md @@ -2,7 +2,7 @@ ## \[2.0.0-alpha.2] -- [`5c13736`](https://github.com/tauri-apps/plugins-workspace/commit/5c137365c60790e8d4037d449e8237aa3fffdab0)([#673](https://github.com/tauri-apps/plugins-workspace/pull/673)) Update to @tauri-apps/api v2.0.0-alpha.16. +- [`5c13736`](https://github.com/tauri-apps/plugins-workspace/commit/5c137365c60790e8d4037d449e8237aa3fffdab0)([#673](https://github.com/tauri-apps/plugins-workspace/pull/673)) Update to @tauri-apps/api v2.0.0-alpha.9. ## \[2.0.0-alpha.2] diff --git a/plugins/positioner/package.json b/plugins/positioner/package.json index 7dfc7702f..6ff568858 100644 --- a/plugins/positioner/package.json +++ b/plugins/positioner/package.json @@ -28,6 +28,6 @@ "tslib": "2.6.0" }, "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.9" + "@tauri-apps/api": "2.0.0-alpha.11" } -} +} \ No newline at end of file diff --git a/plugins/positioner/src/api-iife.js b/plugins/positioner/src/api-iife.js index 6dce17438..fad6fc298 100644 --- a/plugins/positioner/src/api-iife.js +++ b/plugins/positioner/src/api-iife.js @@ -1 +1 @@ -if("__TAURI__"in window){var __TAURI_POSITIONER__=function(t){"use strict";var e=Object.defineProperty,n=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},r=(t,e,r)=>(n(t,e,"read from private field"),r?r.call(t):e.get(t));function o(t,e=!1){return window.__TAURI_INTERNALS__.transformCallback(t,e)}((t,n)=>{for(var r in n)e(t,r,{get:n[r],enumerable:!0})})({},{Channel:()=>a,PluginListener:()=>_,addPluginListener:()=>h,convertFileSrc:()=>l,invoke:()=>c,transformCallback:()=>o});var i,a=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,((t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)})(this,i,(()=>{})),this.id=o((t=>{r(this,i).call(this,t)}))}set onmessage(t){var e,r,o,a;o=t,n(e=this,r=i,"write to private field"),a?a.call(e,o):r.set(e,o)}get onmessage(){return r(this,i)}toJSON(){return`__CHANNEL__:${this.id}`}};i=new WeakMap;var s,_=class{constructor(t,e,n){this.plugin=t,this.event=e,this.channelId=n}async unregister(){return c(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function h(t,e,n){let r=new a;return r.onmessage=n,c(`plugin:${t}|register_listener`,{event:e,handler:r}).then((()=>new _(t,e,r.id)))}async function c(t,e={},n){return window.__TAURI_INTERNALS__.invoke(t,e,n)}function l(t,e="asset"){return window.__TAURI_INTERNALS__.convertFileSrc(t,e)}return t.Position=void 0,(s=t.Position||(t.Position={}))[s.TopLeft=0]="TopLeft",s[s.TopRight=1]="TopRight",s[s.BottomLeft=2]="BottomLeft",s[s.BottomRight=3]="BottomRight",s[s.TopCenter=4]="TopCenter",s[s.BottomCenter=5]="BottomCenter",s[s.LeftCenter=6]="LeftCenter",s[s.RightCenter=7]="RightCenter",s[s.Center=8]="Center",s[s.TrayLeft=9]="TrayLeft",s[s.TrayBottomLeft=10]="TrayBottomLeft",s[s.TrayRight=11]="TrayRight",s[s.TrayBottomRight=12]="TrayBottomRight",s[s.TrayCenter=13]="TrayCenter",s[s.TrayBottomCenter=14]="TrayBottomCenter",t.moveWindow=async function(t){await c("plugin:positioner|move_window",{position:t})},t}({});Object.defineProperty(window.__TAURI__,"positioner",{value:__TAURI_POSITIONER__})} +if("__TAURI__"in window){var __TAURI_POSITIONER__=function(t){"use strict";var o;return"function"==typeof SuppressedError&&SuppressedError,t.Position=void 0,(o=t.Position||(t.Position={}))[o.TopLeft=0]="TopLeft",o[o.TopRight=1]="TopRight",o[o.BottomLeft=2]="BottomLeft",o[o.BottomRight=3]="BottomRight",o[o.TopCenter=4]="TopCenter",o[o.BottomCenter=5]="BottomCenter",o[o.LeftCenter=6]="LeftCenter",o[o.RightCenter=7]="RightCenter",o[o.Center=8]="Center",o[o.TrayLeft=9]="TrayLeft",o[o.TrayBottomLeft=10]="TrayBottomLeft",o[o.TrayRight=11]="TrayRight",o[o.TrayBottomRight=12]="TrayBottomRight",o[o.TrayCenter=13]="TrayCenter",o[o.TrayBottomCenter=14]="TrayBottomCenter",t.moveWindow=async function(t){await async function(t,o={},e){return window.__TAURI_INTERNALS__.invoke(t,o,e)}("plugin:positioner|move_window",{position:t})},t}({});Object.defineProperty(window.__TAURI__,"positioner",{value:__TAURI_POSITIONER__})} diff --git a/plugins/process/CHANGELOG.md b/plugins/process/CHANGELOG.md index 35880572d..03ac852c1 100644 --- a/plugins/process/CHANGELOG.md +++ b/plugins/process/CHANGELOG.md @@ -2,7 +2,7 @@ ## \[2.0.0-alpha.2] -- [`5c13736`](https://github.com/tauri-apps/plugins-workspace/commit/5c137365c60790e8d4037d449e8237aa3fffdab0)([#673](https://github.com/tauri-apps/plugins-workspace/pull/673)) Update to @tauri-apps/api v2.0.0-alpha.16. +- [`5c13736`](https://github.com/tauri-apps/plugins-workspace/commit/5c137365c60790e8d4037d449e8237aa3fffdab0)([#673](https://github.com/tauri-apps/plugins-workspace/pull/673)) Update to @tauri-apps/api v2.0.0-alpha.9. ## \[2.0.0-alpha.2] diff --git a/plugins/process/package.json b/plugins/process/package.json index 6420dd499..1ccc59281 100644 --- a/plugins/process/package.json +++ b/plugins/process/package.json @@ -27,6 +27,6 @@ "tslib": "2.6.0" }, "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.9" + "@tauri-apps/api": "2.0.0-alpha.11" } -} +} \ No newline at end of file diff --git a/plugins/process/src/api-iife.js b/plugins/process/src/api-iife.js index 402f2154b..35dbaed1f 100644 --- a/plugins/process/src/api-iife.js +++ b/plugins/process/src/api-iife.js @@ -1 +1 @@ -if("__TAURI__"in window){var __TAURI_PROCESS__=function(e){"use strict";var n=Object.defineProperty,t=(e,n,t)=>{if(!n.has(e))throw TypeError("Cannot "+t)},r=(e,n,r)=>(t(e,n,"read from private field"),r?r.call(e):n.get(e));function i(e,n=!1){return window.__TAURI_INTERNALS__.transformCallback(e,n)}((e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})})({},{Channel:()=>a,PluginListener:()=>o,addPluginListener:()=>_,convertFileSrc:()=>l,invoke:()=>c,transformCallback:()=>i});var s,a=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,((e,n,t)=>{if(n.has(e))throw TypeError("Cannot add the same private member more than once");n instanceof WeakSet?n.add(e):n.set(e,t)})(this,s,(()=>{})),this.id=i((e=>{r(this,s).call(this,e)}))}set onmessage(e){var n,r,i,a;i=e,t(n=this,r=s,"write to private field"),a?a.call(n,i):r.set(n,i)}get onmessage(){return r(this,s)}toJSON(){return`__CHANNEL__:${this.id}`}};s=new WeakMap;var o=class{constructor(e,n,t){this.plugin=e,this.event=n,this.channelId=t}async unregister(){return c(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function _(e,n,t){let r=new a;return r.onmessage=t,c(`plugin:${e}|register_listener`,{event:n,handler:r}).then((()=>new o(e,n,r.id)))}async function c(e,n={},t){return window.__TAURI_INTERNALS__.invoke(e,n,t)}function l(e,n="asset"){return window.__TAURI_INTERNALS__.convertFileSrc(e,n)}return e.exit=async function(e=0){return c("plugin:process|exit",{code:e})},e.relaunch=async function(){return c("plugin:process|restart")},e}({});Object.defineProperty(window.__TAURI__,"process",{value:__TAURI_PROCESS__})} +if("__TAURI__"in window){var __TAURI_PROCESS__=function(n){"use strict";async function r(n,r={},e){return window.__TAURI_INTERNALS__.invoke(n,r,e)}return"function"==typeof SuppressedError&&SuppressedError,n.exit=async function(n=0){return r("plugin:process|exit",{code:n})},n.relaunch=async function(){return r("plugin:process|restart")},n}({});Object.defineProperty(window.__TAURI__,"process",{value:__TAURI_PROCESS__})} diff --git a/plugins/shell/CHANGELOG.md b/plugins/shell/CHANGELOG.md index a1644b0a1..30d962124 100644 --- a/plugins/shell/CHANGELOG.md +++ b/plugins/shell/CHANGELOG.md @@ -2,7 +2,7 @@ ## \[2.0.0-alpha.2] -- [`5c13736`](https://github.com/tauri-apps/plugins-workspace/commit/5c137365c60790e8d4037d449e8237aa3fffdab0)([#673](https://github.com/tauri-apps/plugins-workspace/pull/673)) Update to @tauri-apps/api v2.0.0-alpha.16. +- [`5c13736`](https://github.com/tauri-apps/plugins-workspace/commit/5c137365c60790e8d4037d449e8237aa3fffdab0)([#673](https://github.com/tauri-apps/plugins-workspace/pull/673)) Update to @tauri-apps/api v2.0.0-alpha.9. ## \[2.0.0-alpha.2] diff --git a/plugins/shell/package.json b/plugins/shell/package.json index c8f055fda..2635c3cf4 100644 --- a/plugins/shell/package.json +++ b/plugins/shell/package.json @@ -27,6 +27,6 @@ "tslib": "^2.4.1" }, "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.9" + "@tauri-apps/api": "2.0.0-alpha.11" } -} +} \ No newline at end of file diff --git a/plugins/shell/src/api-iife.js b/plugins/shell/src/api-iife.js index 1f62d77f3..6247a3f5c 100644 --- a/plugins/shell/src/api-iife.js +++ b/plugins/shell/src/api-iife.js @@ -1 +1 @@ -if("__TAURI__"in window){var __TAURI_SHELL__=function(e){"use strict";var t=Object.defineProperty,n=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},s=(e,t,s)=>(n(e,t,"read from private field"),s?s.call(e):t.get(e));function r(e,t=!1){return window.__TAURI_INTERNALS__.transformCallback(e,t)}((e,n)=>{for(var s in n)t(e,s,{get:n[s],enumerable:!0})})({},{Channel:()=>o,PluginListener:()=>a,addPluginListener:()=>h,convertFileSrc:()=>l,invoke:()=>c,transformCallback:()=>r});var i,o=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,((e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)})(this,i,(()=>{})),this.id=r((e=>{s(this,i).call(this,e)}))}set onmessage(e){var t,s,r,o;r=e,n(t=this,s=i,"write to private field"),o?o.call(t,r):s.set(t,r)}get onmessage(){return s(this,i)}toJSON(){return`__CHANNEL__:${this.id}`}};i=new WeakMap;var a=class{constructor(e,t,n){this.plugin=e,this.event=t,this.channelId=n}async unregister(){return c(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function h(e,t,n){let s=new o;return s.onmessage=n,c(`plugin:${e}|register_listener`,{event:t,handler:s}).then((()=>new a(e,t,s.id)))}async function c(e,t={},n){return window.__TAURI_INTERNALS__.invoke(e,t,n)}function l(e,t="asset"){return window.__TAURI_INTERNALS__.convertFileSrc(e,t)}class u{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 n=s=>{this.removeListener(e,n),t(s)};return this.addListener(e,n)}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 n=this.eventListeners[e];for(const e of n)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 n=s=>{this.removeListener(e,n),t(s)};return this.prependListener(e,n)}}class d{constructor(e){this.pid=e}async write(e){return c("plugin:shell|stdin_write",{pid:this.pid,buffer:"string"==typeof e?e:Array.from(e)})}async kill(){return c("plugin:shell|kill",{cmd:"killChild",pid:this.pid})}}class p extends u{constructor(e,t=[],n){super(),this.stdout=new u,this.stderr=new u,this.program=e,this.args="string"==typeof t?[t]:t,this.options=null!=n?n:{}}static create(e,t=[],n){return new p(e,t,n)}static sidecar(e,t=[],n){const s=new p(e,t,n);return s.options.sidecar=!0,s}async spawn(){return async function(e,t,n=[],s){"object"==typeof n&&Object.freeze(n);const r=new o;return r.onmessage=e,c("plugin:shell|execute",{program:t,args:n,options:s,onEvent:r})}((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 d(e)))}async execute(){return new Promise(((e,t)=>{this.on("error",t);const n=[],s=[];this.stdout.on("data",(e=>{n.push(e)})),this.stderr.on("data",(e=>{s.push(e)})),this.on("close",(t=>{e({code:t.code,signal:t.signal,stdout:this.collectOutput(n),stderr:this.collectOutput(s)})})),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=d,e.Command=p,e.EventEmitter=u,e.open=async function(e,t){return c("plugin:shell|open",{path:e,with:t})},e}({});Object.defineProperty(window.__TAURI__,"shell",{value:__TAURI_SHELL__})} +if("__TAURI__"in window){var __TAURI_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=null!=s?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_SHELL__})} diff --git a/plugins/shell/src/init-iife.js b/plugins/shell/src/init-iife.js index 6c32a6c7f..70e3dc1ae 100644 --- a/plugins/shell/src/init-iife.js +++ b/plugins/shell/src/init-iife.js @@ -1 +1 @@ -!function(){"use strict";var e=Object.defineProperty,t=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},n=(e,n,r)=>(t(e,n,"read from private field"),r?r.call(e):n.get(e));function r(e,t=!1){return window.__TAURI_INTERNALS__.transformCallback(e,t)}((t,n)=>{for(var r in n)e(t,r,{get:n[r],enumerable:!0})})({},{Channel:()=>i,PluginListener:()=>s,addPluginListener:()=>o,convertFileSrc:()=>c,invoke:()=>l,transformCallback:()=>r});var a,i=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,((e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)})(this,a,(()=>{})),this.id=r((e=>{n(this,a).call(this,e)}))}set onmessage(e){var n,r,i,s;i=e,t(n=this,r=a,"write to private field"),s?s.call(n,i):r.set(n,i)}get onmessage(){return n(this,a)}toJSON(){return`__CHANNEL__:${this.id}`}};a=new WeakMap;var s=class{constructor(e,t,n){this.plugin=e,this.event=t,this.channelId=n}async unregister(){return l(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function o(e,t,n){let r=new i;return r.onmessage=n,l(`plugin:${e}|register_listener`,{event:t,handler:r}).then((()=>new s(e,t,r.id)))}async function l(e,t={},n){return window.__TAURI_INTERNALS__.invoke(e,t,n)}function c(e,t="asset"){return window.__TAURI_INTERNALS__.convertFileSrc(e,t)}function h(){var e;null===(e=document.querySelector("body"))||void 0===e||e.addEventListener("click",(function(e){let t=e.target;for(;null!=t;){if(t.matches("a")){const n=t;n.href&&["http://","https://","mailto:","tel:"].some((e=>n.href.startsWith(e)))&&"_blank"===n.target&&(l("plugin:shell|open",{path:n.href}),e.preventDefault());break}t=t.parentElement}}))}"complete"===document.readyState||"interactive"===document.readyState?h():window.addEventListener("DOMContentLoaded",h,!0)}(); +!function(){"use strict";async function e(e,t={},n){return window.__TAURI_INTERNALS__.invoke(e,t,n)}function t(){var t;null===(t=document.querySelector("body"))||void 0===t||t.addEventListener("click",(function(t){let n=t.target;for(;null!=n;){if(n.matches("a")){const r=n;r.href&&["http://","https://","mailto:","tel:"].some((e=>r.href.startsWith(e)))&&"_blank"===r.target&&(e("plugin:shell|open",{path:r.href}),t.preventDefault());break}n=n.parentElement}}))}"function"==typeof SuppressedError&&SuppressedError,"complete"===document.readyState||"interactive"===document.readyState?t():window.addEventListener("DOMContentLoaded",t,!0)}(); diff --git a/plugins/single-instance/examples/vanilla/package.json b/plugins/single-instance/examples/vanilla/package.json index ebeb7b922..6f004c560 100644 --- a/plugins/single-instance/examples/vanilla/package.json +++ b/plugins/single-instance/examples/vanilla/package.json @@ -9,6 +9,6 @@ "author": "", "license": "MIT", "devDependencies": { - "@tauri-apps/cli": "2.0.0-alpha.16" + "@tauri-apps/cli": "2.0.0-alpha.17" } -} +} \ No newline at end of file diff --git a/plugins/sql/CHANGELOG.md b/plugins/sql/CHANGELOG.md index 35880572d..03ac852c1 100644 --- a/plugins/sql/CHANGELOG.md +++ b/plugins/sql/CHANGELOG.md @@ -2,7 +2,7 @@ ## \[2.0.0-alpha.2] -- [`5c13736`](https://github.com/tauri-apps/plugins-workspace/commit/5c137365c60790e8d4037d449e8237aa3fffdab0)([#673](https://github.com/tauri-apps/plugins-workspace/pull/673)) Update to @tauri-apps/api v2.0.0-alpha.16. +- [`5c13736`](https://github.com/tauri-apps/plugins-workspace/commit/5c137365c60790e8d4037d449e8237aa3fffdab0)([#673](https://github.com/tauri-apps/plugins-workspace/pull/673)) Update to @tauri-apps/api v2.0.0-alpha.9. ## \[2.0.0-alpha.2] diff --git a/plugins/sql/package.json b/plugins/sql/package.json index 236802c07..2fc996f3b 100644 --- a/plugins/sql/package.json +++ b/plugins/sql/package.json @@ -28,6 +28,6 @@ "tslib": "2.6.0" }, "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.9" + "@tauri-apps/api": "2.0.0-alpha.11" } -} +} \ No newline at end of file diff --git a/plugins/sql/src/api-iife.js b/plugins/sql/src/api-iife.js index 60ceb80a4..3ee9c447a 100644 --- a/plugins/sql/src/api-iife.js +++ b/plugins/sql/src/api-iife.js @@ -1 +1 @@ -if("__TAURI__"in window){var __TAURI_SQL__=function(){"use strict";var e=Object.defineProperty,t=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},n=(e,n,r)=>(t(e,n,"read from private field"),r?r.call(e):n.get(e));function r(e,t=!1){return window.__TAURI_INTERNALS__.transformCallback(e,t)}((t,n)=>{for(var r in n)e(t,r,{get:n[r],enumerable:!0})})({},{Channel:()=>a,PluginListener:()=>i,addPluginListener:()=>l,convertFileSrc:()=>o,invoke:()=>c,transformCallback:()=>r});var s,a=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,((e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)})(this,s,(()=>{})),this.id=r((e=>{n(this,s).call(this,e)}))}set onmessage(e){var n,r,a,i;a=e,t(n=this,r=s,"write to private field"),i?i.call(n,a):r.set(n,a)}get onmessage(){return n(this,s)}toJSON(){return`__CHANNEL__:${this.id}`}};s=new WeakMap;var i=class{constructor(e,t,n){this.plugin=e,this.event=t,this.channelId=n}async unregister(){return c(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function l(e,t,n){let r=new a;return r.onmessage=n,c(`plugin:${e}|register_listener`,{event:t,handler:r}).then((()=>new i(e,t,r.id)))}async function c(e,t={},n){return window.__TAURI_INTERNALS__.invoke(e,t,n)}function o(e,t="asset"){return window.__TAURI_INTERNALS__.convertFileSrc(e,t)}class _{constructor(e){this.path=e}static async load(e){const t=await c("plugin:sql|load",{db:e});return new _(t)}static get(e){return new _(e)}async execute(e,t){const[n,r]=await c("plugin:sql|execute",{db:this.path,query:e,values:null!=t?t:[]});return{lastInsertId:r,rowsAffected:n}}async select(e,t){return await c("plugin:sql|select",{db:this.path,query:e,values:null!=t?t:[]})}async close(e){return await c("plugin:sql|close",{db:e})}}return _}();Object.defineProperty(window.__TAURI__,"sql",{value:__TAURI_SQL__})} +if("__TAURI__"in window){var __TAURI_SQL__=function(){"use strict";async function e(e,t={},n){return window.__TAURI_INTERNALS__.invoke(e,t,n)}"function"==typeof SuppressedError&&SuppressedError;class t{constructor(e){this.path=e}static async load(n){const s=await e("plugin:sql|load",{db:n});return new t(s)}static get(e){return new t(e)}async execute(t,n){const[s,r]=await e("plugin:sql|execute",{db:this.path,query:t,values:null!=n?n:[]});return{lastInsertId:r,rowsAffected:s}}async select(t,n){return await e("plugin:sql|select",{db:this.path,query:t,values:null!=n?n:[]})}async close(t){return await e("plugin:sql|close",{db:t})}}return t}();Object.defineProperty(window.__TAURI__,"sql",{value:__TAURI_SQL__})} diff --git a/plugins/store/CHANGELOG.md b/plugins/store/CHANGELOG.md index 35880572d..03ac852c1 100644 --- a/plugins/store/CHANGELOG.md +++ b/plugins/store/CHANGELOG.md @@ -2,7 +2,7 @@ ## \[2.0.0-alpha.2] -- [`5c13736`](https://github.com/tauri-apps/plugins-workspace/commit/5c137365c60790e8d4037d449e8237aa3fffdab0)([#673](https://github.com/tauri-apps/plugins-workspace/pull/673)) Update to @tauri-apps/api v2.0.0-alpha.16. +- [`5c13736`](https://github.com/tauri-apps/plugins-workspace/commit/5c137365c60790e8d4037d449e8237aa3fffdab0)([#673](https://github.com/tauri-apps/plugins-workspace/pull/673)) Update to @tauri-apps/api v2.0.0-alpha.9. ## \[2.0.0-alpha.2] diff --git a/plugins/store/package.json b/plugins/store/package.json index 47c01f906..bdc8864fe 100644 --- a/plugins/store/package.json +++ b/plugins/store/package.json @@ -28,6 +28,6 @@ "tslib": "2.6.0" }, "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.9" + "@tauri-apps/api": "2.0.0-alpha.11" } -} +} \ No newline at end of file diff --git a/plugins/store/src/api-iife.js b/plugins/store/src/api-iife.js index 75c362244..c580c8c40 100644 --- a/plugins/store/src/api-iife.js +++ b/plugins/store/src/api-iife.js @@ -1 +1 @@ -if("__TAURI__"in window){var __TAURI_STORE__=function(t){"use strict";var e=Object.defineProperty,a=(t,a)=>{for(var n in a)e(t,n,{get:a[n],enumerable:!0})},n=(t,e,a)=>{if(!e.has(t))throw TypeError("Cannot "+a)},r=(t,e,a)=>(n(t,e,"read from private field"),a?a.call(t):e.get(t));function i(t,e=!1){return window.__TAURI_INTERNALS__.transformCallback(t,e)}a({},{Channel:()=>h,PluginListener:()=>u,addPluginListener:()=>o,convertFileSrc:()=>c,invoke:()=>l,transformCallback:()=>i});var s,h=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,((t,e,a)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,a)})(this,s,(()=>{})),this.id=i((t=>{r(this,s).call(this,t)}))}set onmessage(t){((t,e,a,r)=>{n(t,e,"write to private field"),r?r.call(t,a):e.set(t,a)})(this,s,t)}get onmessage(){return r(this,s)}toJSON(){return`__CHANNEL__:${this.id}`}};s=new WeakMap;var u=class{constructor(t,e,a){this.plugin=t,this.event=e,this.channelId=a}async unregister(){return l(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function o(t,e,a){let n=new h;return n.onmessage=a,l(`plugin:${t}|register_listener`,{event:e,handler:n}).then((()=>new u(t,e,n.id)))}async function l(t,e={},a){return window.__TAURI_INTERNALS__.invoke(t,e,a)}function c(t,e="asset"){return window.__TAURI_INTERNALS__.convertFileSrc(t,e)}a({},{TauriEvent:()=>p,emit:()=>g,listen:()=>d,once:()=>y});var p=(t=>(t.WINDOW_RESIZED="tauri://resize",t.WINDOW_MOVED="tauri://move",t.WINDOW_CLOSE_REQUESTED="tauri://close-requested",t.WINDOW_CREATED="tauri://window-created",t.WINDOW_DESTROYED="tauri://destroyed",t.WINDOW_FOCUS="tauri://focus",t.WINDOW_BLUR="tauri://blur",t.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",t.WINDOW_THEME_CHANGED="tauri://theme-changed",t.WINDOW_FILE_DROP="tauri://file-drop",t.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",t.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",t.MENU="tauri://menu",t))(p||{});async function _(t,e){await l("plugin:event|unlisten",{event:t,eventId:e})}async function d(t,e,a){return l("plugin:event|listen",{event:t,windowLabel:a?.target,handler:i(e)}).then((e=>async()=>_(t,e)))}async function y(t,e,a){return d(t,(a=>{e(a),_(t,a.id).catch((()=>{}))}),a)}async function g(t,e,a){await l("plugin:event|emit",{event:t,windowLabel:a?.target,payload:e})}return t.Store=class{constructor(t){this.path=t}async set(t,e){return await l("plugin:store|set",{path:this.path,key:t,value:e})}async get(t){return await l("plugin:store|get",{path:this.path,key:t})}async has(t){return await l("plugin:store|has",{path:this.path,key:t})}async delete(t){return await l("plugin:store|delete",{path:this.path,key:t})}async clear(){return await l("plugin:store|clear",{path:this.path})}async reset(){return await l("plugin:store|reset",{path:this.path})}async keys(){return await l("plugin:store|keys",{path:this.path})}async values(){return await l("plugin:store|values",{path:this.path})}async entries(){return await l("plugin:store|entries",{path:this.path})}async length(){return await l("plugin:store|length",{path:this.path})}async load(){return await l("plugin:store|load",{path:this.path})}async save(){return await l("plugin:store|save",{path:this.path})}async onKeyChange(t,e){return await d("store://change",(a=>{a.payload.path===this.path&&a.payload.key===t&&e(a.payload.value)}))}async onChange(t){return await d("store://change",(e=>{e.payload.path===this.path&&t(e.payload.key,e.payload.value)}))}},t}({});Object.defineProperty(window.__TAURI__,"store",{value:__TAURI_STORE__})} +if("__TAURI__"in window){var __TAURI_STORE__=function(t){"use strict";function a(t,a=!1){return window.__TAURI_INTERNALS__.transformCallback(t,a)}async function e(t,a={},e){return window.__TAURI_INTERNALS__.invoke(t,a,e)}var n;async function r(t,n,r){return e("plugin:event|listen",{event:t,windowLabel:r?.target,handler:a(n)}).then((a=>async()=>async function(t,a){await e("plugin:event|unlisten",{event:t,eventId:a})}(t,a)))}"function"==typeof SuppressedError&&SuppressedError,function(t){t.WINDOW_RESIZED="tauri://resize",t.WINDOW_MOVED="tauri://move",t.WINDOW_CLOSE_REQUESTED="tauri://close-requested",t.WINDOW_CREATED="tauri://window-created",t.WINDOW_DESTROYED="tauri://destroyed",t.WINDOW_FOCUS="tauri://focus",t.WINDOW_BLUR="tauri://blur",t.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",t.WINDOW_THEME_CHANGED="tauri://theme-changed",t.WINDOW_FILE_DROP="tauri://file-drop",t.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",t.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",t.MENU="tauri://menu"}(n||(n={}));return t.Store=class{constructor(t){this.path=t}async set(t,a){return await e("plugin:store|set",{path:this.path,key:t,value:a})}async get(t){return await e("plugin:store|get",{path:this.path,key:t})}async has(t){return await e("plugin:store|has",{path:this.path,key:t})}async delete(t){return await e("plugin:store|delete",{path:this.path,key:t})}async clear(){return await e("plugin:store|clear",{path:this.path})}async reset(){return await e("plugin:store|reset",{path:this.path})}async keys(){return await e("plugin:store|keys",{path:this.path})}async values(){return await e("plugin:store|values",{path:this.path})}async entries(){return await e("plugin:store|entries",{path:this.path})}async length(){return await e("plugin:store|length",{path:this.path})}async load(){return await e("plugin:store|load",{path:this.path})}async save(){return await e("plugin:store|save",{path:this.path})}async onKeyChange(t,a){return await r("store://change",(e=>{e.payload.path===this.path&&e.payload.key===t&&a(e.payload.value)}))}async onChange(t){return await r("store://change",(a=>{a.payload.path===this.path&&t(a.payload.key,a.payload.value)}))}},t}({});Object.defineProperty(window.__TAURI__,"store",{value:__TAURI_STORE__})} diff --git a/plugins/stronghold/CHANGELOG.md b/plugins/stronghold/CHANGELOG.md index 4a658d44c..e810bce08 100644 --- a/plugins/stronghold/CHANGELOG.md +++ b/plugins/stronghold/CHANGELOG.md @@ -2,7 +2,7 @@ ## \[2.0.0-alpha.3] -- [`5c13736`](https://github.com/tauri-apps/plugins-workspace/commit/5c137365c60790e8d4037d449e8237aa3fffdab0)([#673](https://github.com/tauri-apps/plugins-workspace/pull/673)) Update to @tauri-apps/api v2.0.0-alpha.16. +- [`5c13736`](https://github.com/tauri-apps/plugins-workspace/commit/5c137365c60790e8d4037d449e8237aa3fffdab0)([#673](https://github.com/tauri-apps/plugins-workspace/pull/673)) Update to @tauri-apps/api v2.0.0-alpha.9. ## \[2.0.0-alpha.2] diff --git a/plugins/stronghold/package.json b/plugins/stronghold/package.json index 4cb578f32..f056eec2d 100644 --- a/plugins/stronghold/package.json +++ b/plugins/stronghold/package.json @@ -28,6 +28,6 @@ "tslib": "2.6.0" }, "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.9" + "@tauri-apps/api": "2.0.0-alpha.11" } -} +} \ No newline at end of file diff --git a/plugins/stronghold/src/api-iife.js b/plugins/stronghold/src/api-iife.js index 8fba22ec6..ab414f34f 100644 --- a/plugins/stronghold/src/api-iife.js +++ b/plugins/stronghold/src/api-iife.js @@ -1 +1 @@ -if("__TAURI__"in window){var __TAURI_STRONGHOLD__=function(t){"use strict";var e=Object.defineProperty,r=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},n=(t,e,n)=>(r(t,e,"read from private field"),n?n.call(t):e.get(t));function a(t,e=!1){return window.__TAURI_INTERNALS__.transformCallback(t,e)}((t,r)=>{for(var n in r)e(t,n,{get:r[n],enumerable:!0})})({},{Channel:()=>i,PluginListener:()=>o,addPluginListener:()=>h,convertFileSrc:()=>l,invoke:()=>c,transformCallback:()=>a});var s,i=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,((t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)})(this,s,(()=>{})),this.id=a((t=>{n(this,s).call(this,t)}))}set onmessage(t){var e,n,a,i;a=t,r(e=this,n=s,"write to private field"),i?i.call(e,a):n.set(e,a)}get onmessage(){return n(this,s)}toJSON(){return`__CHANNEL__:${this.id}`}};s=new WeakMap;var o=class{constructor(t,e,r){this.plugin=t,this.event=e,this.channelId=r}async unregister(){return c(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function h(t,e,r){let n=new i;return n.onmessage=r,c(`plugin:${t}|register_listener`,{event:e,handler:n}).then((()=>new o(t,e,n.id)))}async function c(t,e={},r){return window.__TAURI_INTERNALS__.invoke(t,e,r)}function l(t,e="asset"){return window.__TAURI_INTERNALS__.convertFileSrc(t,e)}function u(t){return"string"==typeof t?t:Array.from(t instanceof ArrayBuffer?new Uint8Array(t):t)}class p{constructor(t,e){this.type=t,this.payload=e}static generic(t,e){return new p("Generic",{vault:u(t),record:u(e)})}static counter(t,e){return new p("Counter",{vault:u(t),counter:e})}}class d{constructor(t){this.procedureArgs=t}async generateSLIP10Seed(t,e){return await c("plugin:stronghold|execute_procedure",{...this.procedureArgs,procedure:{type:"SLIP10Generate",payload:{output:t,sizeBytes:e}}}).then((t=>Uint8Array.from(t)))}async deriveSLIP10(t,e,r,n){return await c("plugin:stronghold|execute_procedure",{...this.procedureArgs,procedure:{type:"SLIP10Derive",payload:{chain:t,input:{type:e,payload:r},output:n}}}).then((t=>Uint8Array.from(t)))}async recoverBIP39(t,e,r){return await c("plugin:stronghold|execute_procedure",{...this.procedureArgs,procedure:{type:"BIP39Recover",payload:{mnemonic:t,passphrase:r,output:e}}}).then((t=>Uint8Array.from(t)))}async generateBIP39(t,e){return await c("plugin:stronghold|execute_procedure",{...this.procedureArgs,procedure:{type:"BIP39Generate",payload:{output:t,passphrase:e}}}).then((t=>Uint8Array.from(t)))}async getEd25519PublicKey(t){return await c("plugin:stronghold|execute_procedure",{...this.procedureArgs,procedure:{type:"PublicKey",payload:{type:"Ed25519",privateKey:t}}}).then((t=>Uint8Array.from(t)))}async signEd25519(t,e){return await c("plugin:stronghold|execute_procedure",{...this.procedureArgs,procedure:{type:"Ed25519Sign",payload:{privateKey:t,msg:e}}}).then((t=>Uint8Array.from(t)))}}class g{constructor(t,e){this.path=t,this.name=u(e)}getVault(t){return new _(this.path,this.name,u(t))}getStore(){return new y(this.path,this.name)}}class y{constructor(t,e){this.path=t,this.client=e}async get(t){return await c("plugin:stronghold|get_store_record",{snapshotPath:this.path,client:this.client,key:u(t)}).then((t=>null!=t?Uint8Array.from(t):null))}async insert(t,e,r){return await c("plugin:stronghold|save_store_record",{snapshotPath:this.path,client:this.client,key:u(t),value:e,lifetime:r})}async remove(t){return await c("plugin:stronghold|remove_store_record",{snapshotPath:this.path,client:this.client,key:u(t)}).then((t=>null!=t?Uint8Array.from(t):null))}}class _ extends d{constructor(t,e,r){super({snapshotPath:t,client:e,vault:r}),this.path=t,this.client=u(e),this.name=u(r)}async insert(t,e){return await c("plugin:stronghold|save_secret",{snapshotPath:this.path,client:this.client,vault:this.name,recordPath:u(t),secret:e})}async remove(t){return await c("plugin:stronghold|remove_secret",{snapshotPath:this.path,client:this.client,vault:this.name,recordPath:t.payload.record})}}class w{constructor(t){this.path=t}static async load(t,e){return await c("plugin:stronghold|initialize",{snapshotPath:t,password:e}).then((()=>new w(t)))}async unload(){return await c("plugin:stronghold|destroy",{snapshotPath:this.path})}async loadClient(t){return await c("plugin:stronghold|load_client",{snapshotPath:this.path,client:u(t)}).then((()=>new g(this.path,t)))}async createClient(t){return await c("plugin:stronghold|create_client",{snapshotPath:this.path,client:u(t)}).then((()=>new g(this.path,t)))}async save(){return await c("plugin:stronghold|save",{snapshotPath:this.path})}}return t.Client=g,t.Location=p,t.Store=y,t.Stronghold=w,t.Vault=_,t}({});Object.defineProperty(window.__TAURI__,"stronghold",{value:__TAURI_STRONGHOLD__})} +if("__TAURI__"in window){var __TAURI_STRONGHOLD__=function(t){"use strict";async function e(t,e={},r){return window.__TAURI_INTERNALS__.invoke(t,e,r)}function r(t){return"string"==typeof t?t:Array.from(t instanceof ArrayBuffer?new Uint8Array(t):t)}"function"==typeof SuppressedError&&SuppressedError;class n{constructor(t,e){this.type=t,this.payload=e}static generic(t,e){return new n("Generic",{vault:r(t),record:r(e)})}static counter(t,e){return new n("Counter",{vault:r(t),counter:e})}}class a{constructor(t){this.procedureArgs=t}async generateSLIP10Seed(t,r){return await e("plugin:stronghold|execute_procedure",{...this.procedureArgs,procedure:{type:"SLIP10Generate",payload:{output:t,sizeBytes:r}}}).then((t=>Uint8Array.from(t)))}async deriveSLIP10(t,r,n,a){return await e("plugin:stronghold|execute_procedure",{...this.procedureArgs,procedure:{type:"SLIP10Derive",payload:{chain:t,input:{type:r,payload:n},output:a}}}).then((t=>Uint8Array.from(t)))}async recoverBIP39(t,r,n){return await e("plugin:stronghold|execute_procedure",{...this.procedureArgs,procedure:{type:"BIP39Recover",payload:{mnemonic:t,passphrase:n,output:r}}}).then((t=>Uint8Array.from(t)))}async generateBIP39(t,r){return await e("plugin:stronghold|execute_procedure",{...this.procedureArgs,procedure:{type:"BIP39Generate",payload:{output:t,passphrase:r}}}).then((t=>Uint8Array.from(t)))}async getEd25519PublicKey(t){return await e("plugin:stronghold|execute_procedure",{...this.procedureArgs,procedure:{type:"PublicKey",payload:{type:"Ed25519",privateKey:t}}}).then((t=>Uint8Array.from(t)))}async signEd25519(t,r){return await e("plugin:stronghold|execute_procedure",{...this.procedureArgs,procedure:{type:"Ed25519Sign",payload:{privateKey:t,msg:r}}}).then((t=>Uint8Array.from(t)))}}class s{constructor(t,e){this.path=t,this.name=r(e)}getVault(t){return new i(this.path,this.name,r(t))}getStore(){return new o(this.path,this.name)}}class o{constructor(t,e){this.path=t,this.client=e}async get(t){return await e("plugin:stronghold|get_store_record",{snapshotPath:this.path,client:this.client,key:r(t)}).then((t=>null!=t?Uint8Array.from(t):null))}async insert(t,n,a){return await e("plugin:stronghold|save_store_record",{snapshotPath:this.path,client:this.client,key:r(t),value:n,lifetime:a})}async remove(t){return await e("plugin:stronghold|remove_store_record",{snapshotPath:this.path,client:this.client,key:r(t)}).then((t=>null!=t?Uint8Array.from(t):null))}}class i extends a{constructor(t,e,n){super({snapshotPath:t,client:e,vault:n}),this.path=t,this.client=r(e),this.name=r(n)}async insert(t,n){return await e("plugin:stronghold|save_secret",{snapshotPath:this.path,client:this.client,vault:this.name,recordPath:r(t),secret:n})}async remove(t){return await e("plugin:stronghold|remove_secret",{snapshotPath:this.path,client:this.client,vault:this.name,recordPath:t.payload.record})}}class h{constructor(t){this.path=t}static async load(t,r){return await e("plugin:stronghold|initialize",{snapshotPath:t,password:r}).then((()=>new h(t)))}async unload(){return await e("plugin:stronghold|destroy",{snapshotPath:this.path})}async loadClient(t){return await e("plugin:stronghold|load_client",{snapshotPath:this.path,client:r(t)}).then((()=>new s(this.path,t)))}async createClient(t){return await e("plugin:stronghold|create_client",{snapshotPath:this.path,client:r(t)}).then((()=>new s(this.path,t)))}async save(){return await e("plugin:stronghold|save",{snapshotPath:this.path})}}return t.Client=s,t.Location=n,t.Store=o,t.Stronghold=h,t.Vault=i,t}({});Object.defineProperty(window.__TAURI__,"stronghold",{value:__TAURI_STRONGHOLD__})} diff --git a/plugins/updater/CHANGELOG.md b/plugins/updater/CHANGELOG.md index 0341115c0..f503bfeb3 100644 --- a/plugins/updater/CHANGELOG.md +++ b/plugins/updater/CHANGELOG.md @@ -2,7 +2,7 @@ ## \[2.0.0-alpha.2] -- [`5c13736`](https://github.com/tauri-apps/plugins-workspace/commit/5c137365c60790e8d4037d449e8237aa3fffdab0)([#673](https://github.com/tauri-apps/plugins-workspace/pull/673)) Update to @tauri-apps/api v2.0.0-alpha.16. +- [`5c13736`](https://github.com/tauri-apps/plugins-workspace/commit/5c137365c60790e8d4037d449e8237aa3fffdab0)([#673](https://github.com/tauri-apps/plugins-workspace/pull/673)) Update to @tauri-apps/api v2.0.0-alpha.9. ## \[2.0.0-alpha.2] diff --git a/plugins/updater/package.json b/plugins/updater/package.json index 8b1d29dd3..648924c7c 100644 --- a/plugins/updater/package.json +++ b/plugins/updater/package.json @@ -27,6 +27,6 @@ "tslib": "^2.5.0" }, "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.9" + "@tauri-apps/api": "2.0.0-alpha.11" } -} +} \ No newline at end of file diff --git a/plugins/updater/src/api-iife.js b/plugins/updater/src/api-iife.js index a12f444be..0732a9872 100644 --- a/plugins/updater/src/api-iife.js +++ b/plugins/updater/src/api-iife.js @@ -1 +1 @@ -if("__TAURI__"in window){var __TAURI_UPDATER__=function(e){"use strict";var n=Object.defineProperty,t=(e,n,t)=>{if(!n.has(e))throw TypeError("Cannot "+t)},r=(e,n,r)=>(t(e,n,"read from private field"),r?r.call(e):n.get(e));function i(e,n=!1){return window.__TAURI_INTERNALS__.transformCallback(e,n)}((e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})})({},{Channel:()=>s,PluginListener:()=>o,addPluginListener:()=>l,convertFileSrc:()=>c,invoke:()=>_,transformCallback:()=>i});var a,s=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,((e,n,t)=>{if(n.has(e))throw TypeError("Cannot add the same private member more than once");n instanceof WeakSet?n.add(e):n.set(e,t)})(this,a,(()=>{})),this.id=i((e=>{r(this,a).call(this,e)}))}set onmessage(e){var n,r,i,s;i=e,t(n=this,r=a,"write to private field"),s?s.call(n,i):r.set(n,i)}get onmessage(){return r(this,a)}toJSON(){return`__CHANNEL__:${this.id}`}};a=new WeakMap;var o=class{constructor(e,n,t){this.plugin=e,this.event=n,this.channelId=t}async unregister(){return _(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function l(e,n,t){let r=new s;return r.onmessage=t,_(`plugin:${e}|register_listener`,{event:n,handler:r}).then((()=>new o(e,n,r.id)))}async function _(e,n={},t){return window.__TAURI_INTERNALS__.invoke(e,n,t)}function c(e,n="asset"){return window.__TAURI_INTERNALS__.convertFileSrc(e,n)}class d{constructor(e){this.currentVersion=e.currentVersion,this.version=e.version,this.date=e.date,this.body=e.body}async downloadAndInstall(e){const n=new s;return null!=e&&(n.onmessage=e),_("plugin:updater|download_and_install",{onEvent:n})}}return e.Update=d,e.check=async function(e){return(null==e?void 0:e.headers)&&(e.headers=Array.from(new Headers(e.headers).entries())),_("plugin:updater|check",{...e}).then((e=>e.available?new d(e):null))},e}({});Object.defineProperty(window.__TAURI__,"updater",{value:__TAURI_UPDATER__})} +if("__TAURI__"in window){var __TAURI_UPDATER__=function(e){"use strict";function t(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 r;"function"==typeof SuppressedError&&SuppressedError;class n{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,r.set(this,(()=>{})),this.id=function(e,t=!1){return window.__TAURI_INTERNALS__.transformCallback(e,t)}((e=>{t(this,r,"f").call(this,e)}))}set onmessage(e){!function(e,t,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 t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===n?o.call(e,r):o?o.value=r:t.set(e,r)}(this,r,e,"f")}get onmessage(){return t(this,r,"f")}toJSON(){return`__CHANNEL__:${this.id}`}}async function o(e,t={},r){return window.__TAURI_INTERNALS__.invoke(e,t,r)}r=new WeakMap;class a{constructor(e){this.currentVersion=e.currentVersion,this.version=e.version,this.date=e.date,this.body=e.body}async downloadAndInstall(e){const t=new n;return null!=e&&(t.onmessage=e),o("plugin:updater|download_and_install",{onEvent:t})}}return e.Update=a,e.check=async function(e){return(null==e?void 0:e.headers)&&(e.headers=Array.from(new Headers(e.headers).entries())),o("plugin:updater|check",{...e}).then((e=>e.available?new a(e):null))},e}({});Object.defineProperty(window.__TAURI__,"updater",{value:__TAURI_UPDATER__})} diff --git a/plugins/upload/CHANGELOG.md b/plugins/upload/CHANGELOG.md index 35880572d..03ac852c1 100644 --- a/plugins/upload/CHANGELOG.md +++ b/plugins/upload/CHANGELOG.md @@ -2,7 +2,7 @@ ## \[2.0.0-alpha.2] -- [`5c13736`](https://github.com/tauri-apps/plugins-workspace/commit/5c137365c60790e8d4037d449e8237aa3fffdab0)([#673](https://github.com/tauri-apps/plugins-workspace/pull/673)) Update to @tauri-apps/api v2.0.0-alpha.16. +- [`5c13736`](https://github.com/tauri-apps/plugins-workspace/commit/5c137365c60790e8d4037d449e8237aa3fffdab0)([#673](https://github.com/tauri-apps/plugins-workspace/pull/673)) Update to @tauri-apps/api v2.0.0-alpha.9. ## \[2.0.0-alpha.2] diff --git a/plugins/upload/package.json b/plugins/upload/package.json index 08bfb0c21..4792c2323 100644 --- a/plugins/upload/package.json +++ b/plugins/upload/package.json @@ -28,6 +28,6 @@ "tslib": "2.6.0" }, "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.9" + "@tauri-apps/api": "2.0.0-alpha.11" } -} +} \ No newline at end of file diff --git a/plugins/upload/src/api-iife.js b/plugins/upload/src/api-iife.js index 64b3b89d5..2b9053374 100644 --- a/plugins/upload/src/api-iife.js +++ b/plugins/upload/src/api-iife.js @@ -1 +1 @@ -if("__TAURI__"in window){var __TAURI_UPLOAD__=function(e){"use strict";var n=Object.defineProperty,t=(e,n,t)=>{if(!n.has(e))throw TypeError("Cannot "+t)},r=(e,n,r)=>(t(e,n,"read from private field"),r?r.call(e):n.get(e));function a(e,n=!1){return window.__TAURI_INTERNALS__.transformCallback(e,n)}((e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})})({},{Channel:()=>o,PluginListener:()=>s,addPluginListener:()=>l,convertFileSrc:()=>u,invoke:()=>_,transformCallback:()=>a});var i,o=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,((e,n,t)=>{if(n.has(e))throw TypeError("Cannot add the same private member more than once");n instanceof WeakSet?n.add(e):n.set(e,t)})(this,i,(()=>{})),this.id=a((e=>{r(this,i).call(this,e)}))}set onmessage(e){var n,r,a,o;a=e,t(n=this,r=i,"write to private field"),o?o.call(n,a):r.set(n,a)}get onmessage(){return r(this,i)}toJSON(){return`__CHANNEL__:${this.id}`}};i=new WeakMap;var s=class{constructor(e,n,t){this.plugin=e,this.event=n,this.channelId=t}async unregister(){return _(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function l(e,n,t){let r=new o;return r.onmessage=t,_(`plugin:${e}|register_listener`,{event:n,handler:r}).then((()=>new s(e,n,r.id)))}async function _(e,n={},t){return window.__TAURI_INTERNALS__.invoke(e,n,t)}function u(e,n="asset"){return window.__TAURI_INTERNALS__.convertFileSrc(e,n)}return e.download=async function(e,n,t,r){const a=new Uint32Array(1);window.crypto.getRandomValues(a);const i=a[0],s=new o;null!=t&&(s.onmessage=t),await _("plugin:upload|download",{id:i,url:e,filePath:n,headers:null!=r?r:{},onProgress:s})},e.upload=async function(e,n,t,r){const a=new Uint32Array(1);window.crypto.getRandomValues(a);const i=a[0],s=new o;null!=t&&(s.onmessage=t),await _("plugin:upload|upload",{id:i,url:e,filePath:n,headers:null!=r?r:{},onProgress:s})},e}({});Object.defineProperty(window.__TAURI__,"upload",{value:__TAURI_UPLOAD__})} +if("__TAURI__"in window){var __TAURI_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],l=new r;null!=n&&(l.onmessage=n),await o("plugin:upload|download",{id:s,url:e,filePath:t,headers:null!=a?a:{},onProgress:l})},e.upload=async function(e,t,n,a){const i=new Uint32Array(1);window.crypto.getRandomValues(i);const s=i[0],l=new r;null!=n&&(l.onmessage=n),await o("plugin:upload|upload",{id:s,url:e,filePath:t,headers:null!=a?a:{},onProgress:l})},e}({});Object.defineProperty(window.__TAURI__,"upload",{value:__TAURI_UPLOAD__})} diff --git a/plugins/websocket/CHANGELOG.md b/plugins/websocket/CHANGELOG.md index 57551842f..2292d26f9 100644 --- a/plugins/websocket/CHANGELOG.md +++ b/plugins/websocket/CHANGELOG.md @@ -2,7 +2,7 @@ ## \[2.0.0-alpha.2] -- [`5c13736`](https://github.com/tauri-apps/plugins-workspace/commit/5c137365c60790e8d4037d449e8237aa3fffdab0)([#673](https://github.com/tauri-apps/plugins-workspace/pull/673)) Update to @tauri-apps/api v2.0.0-alpha.16. +- [`5c13736`](https://github.com/tauri-apps/plugins-workspace/commit/5c137365c60790e8d4037d449e8237aa3fffdab0)([#673](https://github.com/tauri-apps/plugins-workspace/pull/673)) Update to @tauri-apps/api v2.0.0-alpha.9. ## \[2.0.0-alpha.2] diff --git a/plugins/websocket/examples/svelte-app/package.json b/plugins/websocket/examples/svelte-app/package.json index 66d842e4e..a7f8d8627 100644 --- a/plugins/websocket/examples/svelte-app/package.json +++ b/plugins/websocket/examples/svelte-app/package.json @@ -13,7 +13,7 @@ "devDependencies": { "@sveltejs/adapter-static": "2.0.3", "@sveltejs/kit": "1.26.0", - "@tauri-apps/cli": "2.0.0-alpha.16", + "@tauri-apps/cli": "2.0.0-alpha.17", "svelte": "4.2.2", "svelte-check": "3.5.2", "tslib": "2.6.2", @@ -24,4 +24,4 @@ "@tauri-apps/plugin-websocket": "link:../../" }, "type": "module" -} +} \ No newline at end of file diff --git a/plugins/websocket/package.json b/plugins/websocket/package.json index 1af406f85..2fa31e57c 100644 --- a/plugins/websocket/package.json +++ b/plugins/websocket/package.json @@ -27,6 +27,6 @@ "tslib": "2.6.0" }, "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.9" + "@tauri-apps/api": "2.0.0-alpha.11" } -} +} \ No newline at end of file diff --git a/plugins/websocket/src/api-iife.js b/plugins/websocket/src/api-iife.js index 1e89a84f7..5f4eb9810 100644 --- a/plugins/websocket/src/api-iife.js +++ b/plugins/websocket/src/api-iife.js @@ -1 +1 @@ -if("__TAURI__"in window){var __TAURI_WEBSOCKET__=function(){"use strict";var e=Object.defineProperty,t=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},n=(e,n,r)=>(t(e,n,"read from private field"),r?r.call(e):n.get(e));function r(e,t=!1){return window.__TAURI_INTERNALS__.transformCallback(e,t)}((t,n)=>{for(var r in n)e(t,r,{get:n[r],enumerable:!0})})({},{Channel:()=>s,PluginListener:()=>a,addPluginListener:()=>o,convertFileSrc:()=>_,invoke:()=>c,transformCallback:()=>r});var i,s=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,((e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)})(this,i,(()=>{})),this.id=r((e=>{n(this,i).call(this,e)}))}set onmessage(e){var n,r,s,a;s=e,t(n=this,r=i,"write to private field"),a?a.call(n,s):r.set(n,s)}get onmessage(){return n(this,i)}toJSON(){return`__CHANNEL__:${this.id}`}};i=new WeakMap;var a=class{constructor(e,t,n){this.plugin=e,this.event=t,this.channelId=n}async unregister(){return c(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function o(e,t,n){let r=new s;return r.onmessage=n,c(`plugin:${e}|register_listener`,{event:t,handler:r}).then((()=>new a(e,t,r.id)))}async function c(e,t={},n){return window.__TAURI_INTERNALS__.invoke(e,t,n)}function _(e,t="asset"){return window.__TAURI_INTERNALS__.convertFileSrc(e,t)}class l{constructor(e,t){this.id=e,this.listeners=t}static async connect(e,t){const n=[],r=new s;return r.onmessage=e=>{n.forEach((t=>t(e)))},await c("plugin:websocket|connect",{url:e,onMessage:r,config:t}).then((e=>new l(e,n)))}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 c("plugin:websocket|send",{id:this.id,message:t})}async disconnect(){return await this.send({type:"Close",data:{code:1e3,reason:"Disconnected by client"}})}}return l}();Object.defineProperty(window.__TAURI__,"websocket",{value:__TAURI_WEBSOCKET__})} +if("__TAURI__"in window){var __TAURI_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 i=[],a=new r;return a.onmessage=e=>{i.forEach((t=>t(e)))},await n("plugin:websocket|connect",{url:e,onMessage:a,config:t}).then((e=>new s(e,i)))}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_WEBSOCKET__})} diff --git a/plugins/window-state/CHANGELOG.md b/plugins/window-state/CHANGELOG.md index 79f53e6e9..9c29e93fe 100644 --- a/plugins/window-state/CHANGELOG.md +++ b/plugins/window-state/CHANGELOG.md @@ -2,7 +2,7 @@ ## \[2.0.0-alpha.2] -- [`5c13736`](https://github.com/tauri-apps/plugins-workspace/commit/5c137365c60790e8d4037d449e8237aa3fffdab0)([#673](https://github.com/tauri-apps/plugins-workspace/pull/673)) Update to @tauri-apps/api v2.0.0-alpha.16. +- [`5c13736`](https://github.com/tauri-apps/plugins-workspace/commit/5c137365c60790e8d4037d449e8237aa3fffdab0)([#673](https://github.com/tauri-apps/plugins-workspace/pull/673)) Update to @tauri-apps/api v2.0.0-alpha.9. - [`beb6b13`](https://github.com/tauri-apps/plugins-workspace/commit/beb6b139eb669dc0346b3de919aed024f649b9d2)([#675](https://github.com/tauri-apps/plugins-workspace/pull/675)) Fix usage of no longer available `__TAURI_METADATA__` API. ## \[2.0.0-alpha.2] diff --git a/plugins/window-state/package.json b/plugins/window-state/package.json index e5892c801..7cc6490c7 100644 --- a/plugins/window-state/package.json +++ b/plugins/window-state/package.json @@ -28,6 +28,6 @@ "tslib": "2.6.0" }, "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.9" + "@tauri-apps/api": "2.0.0-alpha.11" } -} +} \ No newline at end of file diff --git a/plugins/window-state/src/api-iife.js b/plugins/window-state/src/api-iife.js index 680f61cd4..15012bf4f 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_WINDOWSTATE__=function(e){"use strict";var t=Object.defineProperty,i=(e,i)=>{for(var n in i)t(e,n,{get:i[n],enumerable:!0})},n=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},a=(e,t,i)=>(n(e,t,"read from private field"),i?i.call(e):t.get(e));function l(e,t=!1){return window.__TAURI_INTERNALS__.transformCallback(e,t)}i({},{Channel:()=>r,PluginListener:()=>o,addPluginListener:()=>u,convertFileSrc:()=>h,invoke:()=>c,transformCallback:()=>l});var s,r=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,((e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)})(this,s,(()=>{})),this.id=l((e=>{a(this,s).call(this,e)}))}set onmessage(e){((e,t,i,a)=>{n(e,t,"write to private field"),a?a.call(e,i):t.set(e,i)})(this,s,e)}get onmessage(){return a(this,s)}toJSON(){return`__CHANNEL__:${this.id}`}};s=new WeakMap;var o=class{constructor(e,t,i){this.plugin=e,this.event=t,this.channelId=i}async unregister(){return c(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function u(e,t,i){let n=new r;return n.onmessage=i,c(`plugin:${e}|register_listener`,{event:t,handler:n}).then((()=>new o(e,t,n.id)))}async function c(e,t={},i){return window.__TAURI_INTERNALS__.invoke(e,t,i)}function h(e,t="asset"){return window.__TAURI_INTERNALS__.convertFileSrc(e,t)}i({},{LogicalPosition:()=>b,LogicalSize:()=>d,PhysicalPosition:()=>p,PhysicalSize:()=>w});var d=class{constructor(e,t){this.type="Logical",this.width=e,this.height=t}},w=class{constructor(e,t){this.type="Physical",this.width=e,this.height=t}toLogical(e){return new d(this.width/e,this.height/e)}},b=class{constructor(e,t){this.type="Logical",this.x=e,this.y=t}},p=class{constructor(e,t){this.type="Physical",this.x=e,this.y=t}toLogical(e){return new b(this.x/e,this.y/e)}};i({},{TauriEvent:()=>g,emit:()=>v,listen:()=>_,once:()=>m});var g=(e=>(e.WINDOW_RESIZED="tauri://resize",e.WINDOW_MOVED="tauri://move",e.WINDOW_CLOSE_REQUESTED="tauri://close-requested",e.WINDOW_CREATED="tauri://window-created",e.WINDOW_DESTROYED="tauri://destroyed",e.WINDOW_FOCUS="tauri://focus",e.WINDOW_BLUR="tauri://blur",e.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",e.WINDOW_THEME_CHANGED="tauri://theme-changed",e.WINDOW_FILE_DROP="tauri://file-drop",e.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",e.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",e.MENU="tauri://menu",e))(g||{});async function y(e,t){await c("plugin:event|unlisten",{event:e,eventId:t})}async function _(e,t,i){return c("plugin:event|listen",{event:e,windowLabel:i?.target,handler:l(t)}).then((t=>async()=>y(e,t)))}async function m(e,t,i){return _(e,(i=>{t(i),y(e,i.id).catch((()=>{}))}),i)}async function v(e,t,i){await c("plugin:event|emit",{event:e,windowLabel:i?.target,payload:t})}i({},{CloseRequestedEvent:()=>I,Effect:()=>C,EffectState:()=>N,LogicalPosition:()=>b,LogicalSize:()=>d,PhysicalPosition:()=>p,PhysicalSize:()=>w,ProgressBarStatus:()=>S,UserAttentionType:()=>E,Window:()=>T,availableMonitors:()=>M,currentMonitor:()=>k,getAll:()=>z,getCurrent:()=>L,primaryMonitor:()=>x});var f,E=((f=E||{})[f.Critical=1]="Critical",f[f.Informational=2]="Informational",f),I=class{constructor(e){this._preventDefault=!1,this.event=e.event,this.windowLabel=e.windowLabel,this.id=e.id}preventDefault(){this._preventDefault=!0}isPreventDefault(){return this._preventDefault}},S=(e=>(e.None="none",e.Normal="normal",e.Indeterminate="indeterminate",e.Paused="paused",e.Error="error",e))(S||{});function L(){return new T(window.__TAURI_INTERNALS__.metadata.currentWindow.label,{skip:!0})}function z(){return window.__TAURI_INTERNALS__.metadata.windows.map((e=>new T(e.label,{skip:!0})))}var P,D,A=["tauri://created","tauri://error"],T=class e{constructor(e,t={}){this.label=e,this.listeners=Object.create(null),t?.skip||c("plugin:window|create",{options:{...t,label:e}}).then((async()=>this.emit("tauri://created"))).catch((async e=>this.emit("tauri://error",e)))}static getByLabel(t){return z().some((e=>e.label===t))?new e(t,{skip:!0}):null}static getCurrent(){return L()}static getAll(){return z()}static async getFocusedWindow(){for(let e of z())if(await e.isFocused())return e;return null}async listen(e,t){return this._handleTauriEvent(e,t)?Promise.resolve((()=>{let i=this.listeners[e];i.splice(i.indexOf(t),1)})):_(e,t,{target:this.label})}async once(e,t){return this._handleTauriEvent(e,t)?Promise.resolve((()=>{let i=this.listeners[e];i.splice(i.indexOf(t),1)})):m(e,t,{target:this.label})}async emit(e,t){if(A.includes(e)){for(let i of this.listeners[e]||[])i({event:e,id:-1,windowLabel:this.label,payload:t});return Promise.resolve()}return v(e,t,{target:this.label})}_handleTauriEvent(e,t){return!!A.includes(e)&&(e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t],!0)}async scaleFactor(){return c("plugin:window|scale_factor",{label:this.label})}async innerPosition(){return c("plugin:window|inner_position",{label:this.label}).then((({x:e,y:t})=>new p(e,t)))}async outerPosition(){return c("plugin:window|outer_position",{label:this.label}).then((({x:e,y:t})=>new p(e,t)))}async innerSize(){return c("plugin:window|inner_size",{label:this.label}).then((({width:e,height:t})=>new w(e,t)))}async outerSize(){return c("plugin:window|outer_size",{label:this.label}).then((({width:e,height:t})=>new w(e,t)))}async isFullscreen(){return c("plugin:window|is_fullscreen",{label:this.label})}async isMinimized(){return c("plugin:window|is_minimized",{label:this.label})}async isMaximized(){return c("plugin:window|is_maximized",{label:this.label})}async isFocused(){return c("plugin:window|is_focused",{label:this.label})}async isDecorated(){return c("plugin:window|is_decorated",{label:this.label})}async isResizable(){return c("plugin:window|is_resizable",{label:this.label})}async isMaximizable(){return c("plugin:window|is_maximizable",{label:this.label})}async isMinimizable(){return c("plugin:window|is_minimizable",{label:this.label})}async isClosable(){return c("plugin:window|is_closable",{label:this.label})}async isVisible(){return c("plugin:window|is_visible",{label:this.label})}async title(){return c("plugin:window|title",{label:this.label})}async theme(){return c("plugin:window|theme",{label:this.label})}async center(){return c("plugin:window|center",{label:this.label})}async requestUserAttention(e){let t=null;return e&&(t=1===e?{type:"Critical"}:{type:"Informational"}),c("plugin:window|request_user_attention",{label:this.label,value:t})}async setResizable(e){return c("plugin:window|set_resizable",{label:this.label,value:e})}async setMaximizable(e){return c("plugin:window|set_maximizable",{label:this.label,value:e})}async setMinimizable(e){return c("plugin:window|set_minimizable",{label:this.label,value:e})}async setClosable(e){return c("plugin:window|set_closable",{label:this.label,value:e})}async setTitle(e){return c("plugin:window|set_title",{label:this.label,value:e})}async maximize(){return c("plugin:window|maximize",{label:this.label})}async unmaximize(){return c("plugin:window|unmaximize",{label:this.label})}async toggleMaximize(){return c("plugin:window|toggle_maximize",{label:this.label})}async minimize(){return c("plugin:window|minimize",{label:this.label})}async unminimize(){return c("plugin:window|unminimize",{label:this.label})}async show(){return c("plugin:window|show",{label:this.label})}async hide(){return c("plugin:window|hide",{label:this.label})}async close(){return c("plugin:window|close",{label:this.label})}async setDecorations(e){return c("plugin:window|set_decorations",{label:this.label,value:e})}async setShadow(e){return c("plugin:window|set_shadow",{label:this.label,value:e})}async setEffects(e){return c("plugin:window|set_effects",{label:this.label,value:e})}async clearEffects(){return c("plugin:window|set_effects",{label:this.label,value:null})}async setAlwaysOnTop(e){return c("plugin:window|set_always_on_top",{label:this.label,value:e})}async setAlwaysOnBottom(e){return c("plugin:window|set_always_on_bottom",{label:this.label,value:e})}async setContentProtected(e){return c("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 c("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 c("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 c("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 c("plugin:window|set_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setFullscreen(e){return c("plugin:window|set_fullscreen",{label:this.label,value:e})}async setFocus(){return c("plugin:window|set_focus",{label:this.label})}async setIcon(e){return c("plugin:window|set_icon",{label:this.label,value:"string"==typeof e?e:Array.from(e)})}async setSkipTaskbar(e){return c("plugin:window|set_skip_taskbar",{label:this.label,value:e})}async setCursorGrab(e){return c("plugin:window|set_cursor_grab",{label:this.label,value:e})}async setCursorVisible(e){return c("plugin:window|set_cursor_visible",{label:this.label,value:e})}async setCursorIcon(e){return c("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 c("plugin:window|set_cursor_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setIgnoreCursorEvents(e){return c("plugin:window|set_ignore_cursor_events",{label:this.label,value:e})}async startDragging(){return c("plugin:window|start_dragging",{label:this.label})}async setProgressBar(e){return c("plugin:window|set_progress_bar",{label:this.label,value:e})}async onResized(e){return this.listen("tauri://resize",(t=>{t.payload=R(t.payload),e(t)}))}async onMoved(e){return this.listen("tauri://move",(t=>{t.payload=O(t.payload),e(t)}))}async onCloseRequested(e){return this.listen("tauri://close-requested",(t=>{let i=new I(t);Promise.resolve(e(i)).then((()=>{if(!i.isPreventDefault())return this.close()}))}))}async onFocusChanged(e){let t=await this.listen("tauri://focus",(t=>{e({...t,payload:!0})})),i=await this.listen("tauri://blur",(t=>{e({...t,payload:!1})}));return()=>{t(),i()}}async onScaleChanged(e){return this.listen("tauri://scale-change",e)}async onMenuClicked(e){return this.listen("tauri://menu",e)}async onFileDropEvent(e){let t=await this.listen("tauri://file-drop",(t=>{e({...t,payload:{type:"drop",paths:t.payload}})})),i=await this.listen("tauri://file-drop-hover",(t=>{e({...t,payload:{type:"hover",paths:t.payload}})})),n=await this.listen("tauri://file-drop-cancelled",(t=>{e({...t,payload:{type:"cancel"}})}));return()=>{t(),i(),n()}}async onThemeChanged(e){return this.listen("tauri://theme-changed",e)}},C=(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",e))(C||{}),N=((P=N||{}).FollowsWindowActiveState="followsWindowActiveState",P.Active="active",P.Inactive="inactive",P);function W(e){return null===e?null:{name:e.name,scaleFactor:e.scaleFactor,position:O(e.position),size:R(e.size)}}function O(e){return new p(e.x,e.y)}function R(e){return new w(e.width,e.height)}async function k(){return c("plugin:window|current_monitor").then(W)}async function x(){return c("plugin:window|primary_monitor").then(W)}async function M(){return c("plugin:window|available_monitors").then((e=>e.map(W)))}async function F(e,t){return c("plugin:window-state|restore_state",{label:e,flags:t})}return e.StateFlags=void 0,(D=e.StateFlags||(e.StateFlags={}))[D.SIZE=1]="SIZE",D[D.POSITION=2]="POSITION",D[D.MAXIMIZED=4]="MAXIMIZED",D[D.VISIBLE=8]="VISIBLE",D[D.DECORATIONS=16]="DECORATIONS",D[D.FULLSCREEN=32]="FULLSCREEN",D[D.ALL=63]="ALL",e.restoreState=F,e.restoreStateCurrent=async function(e){return F(L().label,e)},e.saveWindowState=async function(e){return c("plugin:window-state|save_window_state",{flags:e})},e}({});Object.defineProperty(window.__TAURI__,"windowState",{value:__TAURI_WINDOWSTATE__})} +if("__TAURI__"in window){var __TAURI_WINDOWSTATE__=function(e){"use strict";function t(e,t=!1){return window.__TAURI_INTERNALS__.transformCallback(e,t)}async function i(e,t={},i){return window.__TAURI_INTERNALS__.invoke(e,t,i)}"function"==typeof SuppressedError&&SuppressedError;class n{constructor(e,t){this.type="Logical",this.width=e,this.height=t}}class a{constructor(e,t){this.type="Physical",this.width=e,this.height=t}toLogical(e){return new n(this.width/e,this.height/e)}}class l{constructor(e,t){this.type="Logical",this.x=e,this.y=t}}class s{constructor(e,t){this.type="Physical",this.x=e,this.y=t}toLogical(e){return new l(this.x/e,this.y/e)}}var r,o,u;async function c(e,t){await i("plugin:event|unlisten",{event:e,eventId:t})}async function h(e,n,a){return i("plugin:event|listen",{event:e,windowLabel:a?.target,handler:t(n)}).then((t=>async()=>c(e,t)))}!function(e){e.WINDOW_RESIZED="tauri://resize",e.WINDOW_MOVED="tauri://move",e.WINDOW_CLOSE_REQUESTED="tauri://close-requested",e.WINDOW_CREATED="tauri://window-created",e.WINDOW_DESTROYED="tauri://destroyed",e.WINDOW_FOCUS="tauri://focus",e.WINDOW_BLUR="tauri://blur",e.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",e.WINDOW_THEME_CHANGED="tauri://theme-changed",e.WINDOW_FILE_DROP="tauri://file-drop",e.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",e.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",e.MENU="tauri://menu"}(r||(r={})),function(e){e[e.Critical=1]="Critical",e[e.Informational=2]="Informational"}(o||(o={}));class w{constructor(e){this._preventDefault=!1,this.event=e.event,this.windowLabel=e.windowLabel,this.id=e.id}preventDefault(){this._preventDefault=!0}isPreventDefault(){return this._preventDefault}}function d(){return new p(window.__TAURI_INTERNALS__.metadata.currentWindow.label,{skip:!0})}function b(){return window.__TAURI_INTERNALS__.metadata.windows.map((e=>new p(e.label,{skip:!0})))}!function(e){e.None="none",e.Normal="normal",e.Indeterminate="indeterminate",e.Paused="paused",e.Error="error"}(u||(u={}));const y=["tauri://created","tauri://error"];class p{constructor(e,t={}){this.label=e,this.listeners=Object.create(null),t?.skip||i("plugin:window|create",{options:{...t,label:e}}).then((async()=>this.emit("tauri://created"))).catch((async e=>this.emit("tauri://error",e)))}static getByLabel(e){return b().some((t=>t.label===e))?new p(e,{skip:!0}):null}static getCurrent(){return d()}static getAll(){return b()}static async getFocusedWindow(){for(const e of b())if(await e.isFocused())return e;return null}async listen(e,t){return this._handleTauriEvent(e,t)?Promise.resolve((()=>{const i=this.listeners[e];i.splice(i.indexOf(t),1)})):h(e,t,{target:this.label})}async once(e,t){return this._handleTauriEvent(e,t)?Promise.resolve((()=>{const i=this.listeners[e];i.splice(i.indexOf(t),1)})):async function(e,t,i){return h(e,(i=>{t(i),c(e,i.id).catch((()=>{}))}),i)}(e,t,{target:this.label})}async emit(e,t){if(y.includes(e)){for(const i of this.listeners[e]||[])i({event:e,id:-1,windowLabel:this.label,payload:t});return Promise.resolve()}return async function(e,t,n){await i("plugin:event|emit",{event:e,windowLabel:n?.target,payload:t})}(e,t,{target:this.label})}_handleTauriEvent(e,t){return!!y.includes(e)&&(e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t],!0)}async scaleFactor(){return i("plugin:window|scale_factor",{label:this.label})}async innerPosition(){return i("plugin:window|inner_position",{label:this.label}).then((({x:e,y:t})=>new s(e,t)))}async outerPosition(){return i("plugin:window|outer_position",{label:this.label}).then((({x:e,y:t})=>new s(e,t)))}async innerSize(){return i("plugin:window|inner_size",{label:this.label}).then((({width:e,height:t})=>new a(e,t)))}async outerSize(){return i("plugin:window|outer_size",{label:this.label}).then((({width:e,height:t})=>new a(e,t)))}async isFullscreen(){return i("plugin:window|is_fullscreen",{label:this.label})}async isMinimized(){return i("plugin:window|is_minimized",{label:this.label})}async isMaximized(){return i("plugin:window|is_maximized",{label:this.label})}async isFocused(){return i("plugin:window|is_focused",{label:this.label})}async isDecorated(){return i("plugin:window|is_decorated",{label:this.label})}async isResizable(){return i("plugin:window|is_resizable",{label:this.label})}async isMaximizable(){return i("plugin:window|is_maximizable",{label:this.label})}async isMinimizable(){return i("plugin:window|is_minimizable",{label:this.label})}async isClosable(){return i("plugin:window|is_closable",{label:this.label})}async isVisible(){return i("plugin:window|is_visible",{label:this.label})}async title(){return i("plugin:window|title",{label:this.label})}async theme(){return i("plugin:window|theme",{label:this.label})}async center(){return i("plugin:window|center",{label:this.label})}async requestUserAttention(e){let t=null;return e&&(t=e===o.Critical?{type:"Critical"}:{type:"Informational"}),i("plugin:window|request_user_attention",{label:this.label,value:t})}async setResizable(e){return i("plugin:window|set_resizable",{label:this.label,value:e})}async setMaximizable(e){return i("plugin:window|set_maximizable",{label:this.label,value:e})}async setMinimizable(e){return i("plugin:window|set_minimizable",{label:this.label,value:e})}async setClosable(e){return i("plugin:window|set_closable",{label:this.label,value:e})}async setTitle(e){return i("plugin:window|set_title",{label:this.label,value:e})}async maximize(){return i("plugin:window|maximize",{label:this.label})}async unmaximize(){return i("plugin:window|unmaximize",{label:this.label})}async toggleMaximize(){return i("plugin:window|toggle_maximize",{label:this.label})}async minimize(){return i("plugin:window|minimize",{label:this.label})}async unminimize(){return i("plugin:window|unminimize",{label:this.label})}async show(){return i("plugin:window|show",{label:this.label})}async hide(){return i("plugin:window|hide",{label:this.label})}async close(){return i("plugin:window|close",{label:this.label})}async setDecorations(e){return i("plugin:window|set_decorations",{label:this.label,value:e})}async setShadow(e){return i("plugin:window|set_shadow",{label:this.label,value:e})}async setEffects(e){return i("plugin:window|set_effects",{label:this.label,value:e})}async clearEffects(){return i("plugin:window|set_effects",{label:this.label,value:null})}async setAlwaysOnTop(e){return i("plugin:window|set_always_on_top",{label:this.label,value:e})}async setAlwaysOnBottom(e){return i("plugin:window|set_always_on_bottom",{label:this.label,value:e})}async setContentProtected(e){return i("plugin:window|set_content_protected",{label:this.label,value:e})}async setSize(e){if(!e||"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return i("plugin:window|set_size",{label:this.label,value:{type:e.type,data:{width:e.width,height:e.height}}})}async setMinSize(e){if(e&&"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return i("plugin:window|set_min_size",{label:this.label,value:e?{type:e.type,data:{width:e.width,height:e.height}}:null})}async setMaxSize(e){if(e&&"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return i("plugin:window|set_max_size",{label:this.label,value:e?{type:e.type,data:{width:e.width,height:e.height}}:null})}async setPosition(e){if(!e||"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return i("plugin:window|set_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setFullscreen(e){return i("plugin:window|set_fullscreen",{label:this.label,value:e})}async setFocus(){return i("plugin:window|set_focus",{label:this.label})}async setIcon(e){return i("plugin:window|set_icon",{label:this.label,value:"string"==typeof e?e:Array.from(e)})}async setSkipTaskbar(e){return i("plugin:window|set_skip_taskbar",{label:this.label,value:e})}async setCursorGrab(e){return i("plugin:window|set_cursor_grab",{label:this.label,value:e})}async setCursorVisible(e){return i("plugin:window|set_cursor_visible",{label:this.label,value:e})}async setCursorIcon(e){return i("plugin:window|set_cursor_icon",{label:this.label,value:e})}async setCursorPosition(e){if(!e||"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return i("plugin:window|set_cursor_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setIgnoreCursorEvents(e){return i("plugin:window|set_ignore_cursor_events",{label:this.label,value:e})}async startDragging(){return i("plugin:window|start_dragging",{label:this.label})}async setProgressBar(e){return i("plugin:window|set_progress_bar",{label:this.label,value:e})}async onResized(e){return this.listen(r.WINDOW_RESIZED,(t=>{var i;t.payload=(i=t.payload,new a(i.width,i.height)),e(t)}))}async onMoved(e){return this.listen(r.WINDOW_MOVED,(t=>{var i;t.payload=(i=t.payload,new s(i.x,i.y)),e(t)}))}async onCloseRequested(e){return this.listen(r.WINDOW_CLOSE_REQUESTED,(t=>{const i=new w(t);Promise.resolve(e(i)).then((()=>{if(!i.isPreventDefault())return this.close()}))}))}async onFocusChanged(e){const t=await this.listen(r.WINDOW_FOCUS,(t=>{e({...t,payload:!0})})),i=await this.listen(r.WINDOW_BLUR,(t=>{e({...t,payload:!1})}));return()=>{t(),i()}}async onScaleChanged(e){return this.listen(r.WINDOW_SCALE_FACTOR_CHANGED,e)}async onMenuClicked(e){return this.listen(r.MENU,e)}async onFileDropEvent(e){const t=await this.listen(r.WINDOW_FILE_DROP,(t=>{e({...t,payload:{type:"drop",paths:t.payload}})})),i=await this.listen(r.WINDOW_FILE_DROP_HOVER,(t=>{e({...t,payload:{type:"hover",paths:t.payload}})})),n=await this.listen(r.WINDOW_FILE_DROP_CANCELLED,(t=>{e({...t,payload:{type:"cancel"}})}));return()=>{t(),i(),n()}}async onThemeChanged(e){return this.listen(r.WINDOW_THEME_CHANGED,e)}}var _,g,m;async function v(e,t){return i("plugin:window-state|restore_state",{label:e,flags:t})}return function(e){e.AppearanceBased="appearanceBased",e.Light="light",e.Dark="dark",e.MediumLight="mediumLight",e.UltraDark="ultraDark",e.Titlebar="titlebar",e.Selection="selection",e.Menu="menu",e.Popover="popover",e.Sidebar="sidebar",e.HeaderView="headerView",e.Sheet="sheet",e.WindowBackground="windowBackground",e.HudWindow="hudWindow",e.FullScreenUI="fullScreenUI",e.Tooltip="tooltip",e.ContentBackground="contentBackground",e.UnderWindowBackground="underWindowBackground",e.UnderPageBackground="underPageBackground",e.Mica="mica",e.Blur="blur",e.Acrylic="acrylic",e.Tabbed="tabbed",e.TabbedDark="tabbedDark",e.TabbedLight="tabbedLight"}(_||(_={})),function(e){e.FollowsWindowActiveState="followsWindowActiveState",e.Active="active",e.Inactive="inactive"}(g||(g={})),e.StateFlags=void 0,(m=e.StateFlags||(e.StateFlags={}))[m.SIZE=1]="SIZE",m[m.POSITION=2]="POSITION",m[m.MAXIMIZED=4]="MAXIMIZED",m[m.VISIBLE=8]="VISIBLE",m[m.DECORATIONS=16]="DECORATIONS",m[m.FULLSCREEN=32]="FULLSCREEN",m[m.ALL=63]="ALL",e.restoreState=v,e.restoreStateCurrent=async function(e){return v(d().label,e)},e.saveWindowState=async function(e){return i("plugin:window-state|save_window_state",{flags:e})},e}({});Object.defineProperty(window.__TAURI__,"windowState",{value:__TAURI_WINDOWSTATE__})} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a22a5f447..6d979b3d1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -64,8 +64,8 @@ importers: examples/api: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.9 - version: 2.0.0-alpha.9 + specifier: 2.0.0-alpha.11 + version: 2.0.0-alpha.11 '@tauri-apps/plugin-barcode-scanner': specifier: 2.0.0-alpha.1 version: link:../../plugins/barcode-scanner @@ -116,8 +116,8 @@ importers: specifier: ^2.4.6 version: 2.4.6(svelte@4.2.2)(vite@4.5.0) '@tauri-apps/cli': - specifier: 2.0.0-alpha.16 - version: 2.0.0-alpha.16 + specifier: 2.0.0-alpha.17 + version: 2.0.0-alpha.17 '@unocss/extractor-svelte': specifier: ^0.56.5 version: 0.56.5 @@ -129,7 +129,7 @@ importers: version: 4.2.2 unocss: specifier: ^0.56.5 - version: 0.56.5(postcss@8.4.31)(vite@4.5.0) + version: 0.56.5(postcss@8.4.31)(rollup@4.1.4)(vite@4.5.0) vite: specifier: ^4.5.0 version: 4.5.0 @@ -137,8 +137,8 @@ importers: plugins/authenticator: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.9 - version: 2.0.0-alpha.9 + specifier: 2.0.0-alpha.11 + version: 2.0.0-alpha.11 devDependencies: tslib: specifier: 2.6.0 @@ -147,8 +147,8 @@ importers: plugins/autostart: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.9 - version: 2.0.0-alpha.9 + specifier: 2.0.0-alpha.11 + version: 2.0.0-alpha.11 devDependencies: tslib: specifier: 2.6.0 @@ -157,8 +157,8 @@ importers: plugins/barcode-scanner: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.9 - version: 2.0.0-alpha.9 + specifier: 2.0.0-alpha.11 + version: 2.0.0-alpha.11 devDependencies: tslib: specifier: ^2.5.0 @@ -167,8 +167,8 @@ importers: plugins/cli: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.9 - version: 2.0.0-alpha.9 + specifier: 2.0.0-alpha.11 + version: 2.0.0-alpha.11 devDependencies: tslib: specifier: ^2.4.1 @@ -177,8 +177,8 @@ importers: plugins/clipboard-manager: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.9 - version: 2.0.0-alpha.9 + specifier: 2.0.0-alpha.11 + version: 2.0.0-alpha.11 devDependencies: tslib: specifier: ^2.4.1 @@ -187,8 +187,8 @@ importers: plugins/deep-link: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.9 - version: 2.0.0-alpha.9 + specifier: 2.0.0-alpha.11 + version: 2.0.0-alpha.11 devDependencies: tslib: specifier: ^2.5.0 @@ -197,15 +197,15 @@ importers: plugins/deep-link/examples/app: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.6 - version: 2.0.0-alpha.6 + specifier: 2.0.0-alpha.11 + version: 2.0.0-alpha.11 '@tauri-apps/plugin-deep-link': specifier: 2.0.0-alpha.1 version: link:../.. devDependencies: '@tauri-apps/cli': - specifier: 2.0.0-alpha.16 - version: 2.0.0-alpha.16 + specifier: 2.0.0-alpha.17 + version: 2.0.0-alpha.17 internal-ip: specifier: ^8.0.0 version: 8.0.0 @@ -219,8 +219,8 @@ importers: plugins/dialog: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.9 - version: 2.0.0-alpha.9 + specifier: 2.0.0-alpha.11 + version: 2.0.0-alpha.11 devDependencies: tslib: specifier: ^2.4.1 @@ -229,8 +229,8 @@ importers: plugins/fs: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.9 - version: 2.0.0-alpha.9 + specifier: 2.0.0-alpha.11 + version: 2.0.0-alpha.11 devDependencies: tslib: specifier: ^2.4.1 @@ -239,8 +239,8 @@ importers: plugins/global-shortcut: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.9 - version: 2.0.0-alpha.9 + specifier: 2.0.0-alpha.11 + version: 2.0.0-alpha.11 devDependencies: tslib: specifier: ^2.4.1 @@ -249,8 +249,8 @@ importers: plugins/http: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.9 - version: 2.0.0-alpha.9 + specifier: 2.0.0-alpha.11 + version: 2.0.0-alpha.11 devDependencies: tslib: specifier: ^2.5.0 @@ -259,8 +259,8 @@ importers: plugins/log: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.9 - version: 2.0.0-alpha.9 + specifier: 2.0.0-alpha.11 + version: 2.0.0-alpha.11 devDependencies: tslib: specifier: 2.6.0 @@ -269,8 +269,8 @@ importers: plugins/notification: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.9 - version: 2.0.0-alpha.9 + specifier: 2.0.0-alpha.11 + version: 2.0.0-alpha.11 devDependencies: tslib: specifier: ^2.4.1 @@ -279,8 +279,8 @@ importers: plugins/os: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.9 - version: 2.0.0-alpha.9 + specifier: 2.0.0-alpha.11 + version: 2.0.0-alpha.11 devDependencies: tslib: specifier: 2.6.0 @@ -289,8 +289,8 @@ importers: plugins/positioner: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.9 - version: 2.0.0-alpha.9 + specifier: 2.0.0-alpha.11 + version: 2.0.0-alpha.11 devDependencies: tslib: specifier: 2.6.0 @@ -299,8 +299,8 @@ importers: plugins/process: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.9 - version: 2.0.0-alpha.9 + specifier: 2.0.0-alpha.11 + version: 2.0.0-alpha.11 devDependencies: tslib: specifier: 2.6.0 @@ -309,8 +309,8 @@ importers: plugins/shell: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.9 - version: 2.0.0-alpha.9 + specifier: 2.0.0-alpha.11 + version: 2.0.0-alpha.11 devDependencies: tslib: specifier: ^2.4.1 @@ -319,14 +319,14 @@ importers: plugins/single-instance/examples/vanilla: devDependencies: '@tauri-apps/cli': - specifier: 2.0.0-alpha.16 - version: 2.0.0-alpha.16 + specifier: 2.0.0-alpha.17 + version: 2.0.0-alpha.17 plugins/sql: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.9 - version: 2.0.0-alpha.9 + specifier: 2.0.0-alpha.11 + version: 2.0.0-alpha.11 devDependencies: tslib: specifier: 2.6.0 @@ -335,8 +335,8 @@ importers: plugins/store: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.9 - version: 2.0.0-alpha.9 + specifier: 2.0.0-alpha.11 + version: 2.0.0-alpha.11 devDependencies: tslib: specifier: 2.6.0 @@ -345,8 +345,8 @@ importers: plugins/stronghold: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.9 - version: 2.0.0-alpha.9 + specifier: 2.0.0-alpha.11 + version: 2.0.0-alpha.11 devDependencies: tslib: specifier: 2.6.0 @@ -355,8 +355,8 @@ importers: plugins/updater: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.9 - version: 2.0.0-alpha.9 + specifier: 2.0.0-alpha.11 + version: 2.0.0-alpha.11 devDependencies: tslib: specifier: ^2.5.0 @@ -365,8 +365,8 @@ importers: plugins/upload: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.9 - version: 2.0.0-alpha.9 + specifier: 2.0.0-alpha.11 + version: 2.0.0-alpha.11 devDependencies: tslib: specifier: 2.6.0 @@ -375,8 +375,8 @@ importers: plugins/websocket: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.9 - version: 2.0.0-alpha.9 + specifier: 2.0.0-alpha.11 + version: 2.0.0-alpha.11 devDependencies: tslib: specifier: 2.6.0 @@ -395,8 +395,8 @@ importers: specifier: 1.26.0 version: 1.26.0(svelte@4.2.2)(vite@4.5.0) '@tauri-apps/cli': - specifier: 2.0.0-alpha.16 - version: 2.0.0-alpha.16 + specifier: 2.0.0-alpha.17 + version: 2.0.0-alpha.17 svelte: specifier: 4.2.2 version: 4.2.2 @@ -416,8 +416,8 @@ importers: plugins/window-state: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.9 - version: 2.0.0-alpha.9 + specifier: 2.0.0-alpha.11 + version: 2.0.0-alpha.11 devDependencies: tslib: specifier: 2.6.0 @@ -571,7 +571,7 @@ packages: peerDependencies: mocha: ^10.0.0 dependencies: - effection: 2.0.7 + effection: 2.0.7(mocha@10.2.0) mocha: 10.2.0 dev: true @@ -823,7 +823,7 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: ajv: 6.12.6 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) espree: 9.6.1 globals: 13.20.0 ignore: 5.2.4 @@ -850,7 +850,7 @@ packages: engines: {node: '>=10.10.0'} dependencies: '@humanwhocodes/object-schema': 2.0.0 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) minimatch: 3.1.2 transitivePeerDependencies: - supports-color @@ -891,7 +891,7 @@ packages: '@antfu/install-pkg': 0.1.1 '@antfu/utils': 0.7.5 '@iconify/types': 2.0.0 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) kolorist: 1.8.0 local-pkg: 0.4.3 transitivePeerDependencies: @@ -1025,7 +1025,7 @@ packages: rollup: 4.1.4 dev: true - /@rollup/pluginutils@5.0.5: + /@rollup/pluginutils@5.0.5(rollup@4.1.4): resolution: {integrity: sha512-6aEYR910NyP73oHiJglti74iRyOwgFU4x3meH/H8OJx6Ry0j6cOVZ5X/wTvub7G7Ao6qaHBEaNsV3GLJkSsF+Q==} engines: {node: '>=14.0.0'} peerDependencies: @@ -1037,6 +1037,7 @@ packages: '@types/estree': 1.0.1 estree-walker: 2.0.2 picomatch: 2.3.1 + rollup: 4.1.4 dev: true /@rollup/rollup-android-arm-eabi@4.1.4: @@ -1180,7 +1181,7 @@ packages: vite: ^4.0.0 dependencies: '@sveltejs/vite-plugin-svelte': 2.4.6(svelte@4.2.2)(vite@4.5.0) - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) svelte: 4.2.2 vite: 4.5.0 transitivePeerDependencies: @@ -1195,7 +1196,7 @@ packages: vite: ^4.0.0 dependencies: '@sveltejs/vite-plugin-svelte-inspector': 1.0.4(@sveltejs/vite-plugin-svelte@2.4.6)(svelte@4.2.2)(vite@4.5.0) - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) deepmerge: 4.3.1 kleur: 4.1.5 magic-string: 0.30.5 @@ -1207,18 +1208,13 @@ packages: - supports-color dev: true - /@tauri-apps/api@2.0.0-alpha.6: - resolution: {integrity: sha512-ZMOc3eu9amwvkC6M69h3hWt4/EsFaAXmtkiw4xd2LN59/lTb4ZQiVfq2QKlRcu1rj3n/Tcr7U30ZopvHwXBGIg==} - engines: {node: '>= 14.6.0', npm: '>= 6.6.0', yarn: '>= 1.19.1'} - dev: false - - /@tauri-apps/api@2.0.0-alpha.9: - resolution: {integrity: sha512-Q5BiIQa2ToICdaJSYZdmtwbKSfdk+uQbQ7xMnbWI5C5C3frEVFlT92kVXgZFKIwrTLZBWHfiowkPR6rbFqAHIg==} + /@tauri-apps/api@2.0.0-alpha.11: + resolution: {integrity: sha512-aw7jic+MQAe/LH4fYhbd3bwx3YjXhDIwqKJIn5QO4yKmGdVURIhZSFcyeKkSe4P6Itdto0Pcz99vLfkgBwdQKw==} engines: {node: '>= 18', npm: '>= 6.6.0', yarn: '>= 1.19.1'} dev: false - /@tauri-apps/cli-darwin-arm64@2.0.0-alpha.16: - resolution: {integrity: sha512-T/yu8+m4XrI1Ja5aVnsv4v5aGqIvwz1egHarMgh4LXrlMioJ60BoxDPfenaUokO6NVee212woFSmH6p4S7V8PA==} + /@tauri-apps/cli-darwin-arm64@2.0.0-alpha.17: + resolution: {integrity: sha512-WDqekRiVwMu/hKsf/xBHcfi/YZ7X9o6Piy4Qolt+YYyfi4wh5ZYZnom+7kIZBlSCc32gtXGViBXEivhcKzFQ3w==} engines: {node: '>= 10'} cpu: [arm64] os: [darwin] @@ -1226,8 +1222,8 @@ packages: dev: true optional: true - /@tauri-apps/cli-darwin-x64@2.0.0-alpha.16: - resolution: {integrity: sha512-mhYB/UPeyn++GI0Tt8y90WmHU75Fh9yZ7cBtRCrF94kOOEldQGYqS26dwhsRrSgnNYB7vYvVPhHzQsKWziParQ==} + /@tauri-apps/cli-darwin-x64@2.0.0-alpha.17: + resolution: {integrity: sha512-WcQ+iSIaxr80gpa+ji+4e7dD0w/s3VCo29DU3wT/uQBKrCfkJUwmUAqEwyrR7INWcOurLF0IizR71In3NrYJiw==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] @@ -1235,8 +1231,8 @@ packages: dev: true optional: true - /@tauri-apps/cli-linux-arm-gnueabihf@2.0.0-alpha.16: - resolution: {integrity: sha512-YP+4BSNN2ESgPnoIO37nw5tOi2k2rrU2eoeJHxQpOmRrQakjBrcZFP1HGjY3cOturexIKUALH69Ol9K6WzrJIQ==} + /@tauri-apps/cli-linux-arm-gnueabihf@2.0.0-alpha.17: + resolution: {integrity: sha512-xgVc3Pv0Wf7aWqi0eH1iEemi9uQJJfMCVqBjPrK65Bm1LsBmMw99QS5YH8XPCMfB01Jfdzf3Ty9ZCW8/vjqz3w==} engines: {node: '>= 10'} cpu: [arm] os: [linux] @@ -1244,8 +1240,8 @@ packages: dev: true optional: true - /@tauri-apps/cli-linux-arm64-gnu@2.0.0-alpha.16: - resolution: {integrity: sha512-mP/I6AdlRnrbZBUMKJWo4JsZStYD+7szh/1oo4zmDfWx0z6HUzgN6gxL+CR0pLex4kCJGUNeo1aZCGBJKzEdHg==} + /@tauri-apps/cli-linux-arm64-gnu@2.0.0-alpha.17: + resolution: {integrity: sha512-QEx92085i+I4lOdboJ0PK+DSrlHq613HTqiSO4YteD5uCXsq2R9uAcFXM08quQYpRl4b9GeG99vig5GDOZMOkw==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] @@ -1253,8 +1249,8 @@ packages: dev: true optional: true - /@tauri-apps/cli-linux-arm64-musl@2.0.0-alpha.16: - resolution: {integrity: sha512-i58pTClYkn9BBhMShNycRUJD+cfxHs+PV5PPHhBJdi3+zpL0zHNTlZAjTMpO/o4hmTYhw1rbk+kPzXEaiAnt0w==} + /@tauri-apps/cli-linux-arm64-musl@2.0.0-alpha.17: + resolution: {integrity: sha512-Iq0YHtg1yOvx3xxne6aHRS46SG6o6aQPACORGcJneGL6UjOQ7M34zKI9fX2tOWB5YEcVZBOvtNEZQOUeG2bw7g==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] @@ -1262,8 +1258,8 @@ packages: dev: true optional: true - /@tauri-apps/cli-linux-x64-gnu@2.0.0-alpha.16: - resolution: {integrity: sha512-GLb0+MvoC6/7l5HXhF3Ii1Uodg6K6l8tfSaQ7H8qplp9oVgMvNi8yd9myRT8SYApjsC1pViXTib+5n2pp3VS0A==} + /@tauri-apps/cli-linux-x64-gnu@2.0.0-alpha.17: + resolution: {integrity: sha512-CAdd2EhGsFWu3nr0o650dfTLOJhICRoqETKmAgSEpQNtpXuJwrqxA3XrIa1sUkgWZacf3dgQwyNNlvB8oYOHKg==} engines: {node: '>= 10'} cpu: [x64] os: [linux] @@ -1271,8 +1267,8 @@ packages: dev: true optional: true - /@tauri-apps/cli-linux-x64-musl@2.0.0-alpha.16: - resolution: {integrity: sha512-pZXuwVQpInzW8YjmhJsDPx3ovfVFbKJkUnXTgmVe8RvQSh6BxCSLyq8z4WG6zBRBdpjg8L5jVM8/MWf/QhdCVg==} + /@tauri-apps/cli-linux-x64-musl@2.0.0-alpha.17: + resolution: {integrity: sha512-xMhqAvcD0+b7creRhf7XnMTeoMAmmp1FvtNfosWCdWl7o9YHkqyNlkSp9rn96lhP2DG/Ew2CHxKOZaPql9gnlw==} engines: {node: '>= 10'} cpu: [x64] os: [linux] @@ -1280,8 +1276,8 @@ packages: dev: true optional: true - /@tauri-apps/cli-win32-arm64-msvc@2.0.0-alpha.16: - resolution: {integrity: sha512-YB1urpcOfSMRhKi+0Cj8I2T+dlU2Vqqc/ao+8O4wiHibGFyGIcuL/DJfC/7nHyFUngac7Shyz8/VRKgvd/jEvw==} + /@tauri-apps/cli-win32-arm64-msvc@2.0.0-alpha.17: + resolution: {integrity: sha512-j8Q6JkDGW1N8brMjg74/AkVwyg14VVfQUFoai9Ocbf8q9gGNE5IRr7KvbWjqDntUihbc7MURwcXjcsJ4duYe/A==} engines: {node: '>= 10'} cpu: [arm64] os: [win32] @@ -1289,8 +1285,8 @@ packages: dev: true optional: true - /@tauri-apps/cli-win32-ia32-msvc@2.0.0-alpha.16: - resolution: {integrity: sha512-IdODN3LwzwCaJOv1muiOhy0yD3IAIdu2UGacEukM9gnJ1VsK/JqU9ufH0SAFQkxKTWc6wpKykEAfuSNRlMIa5A==} + /@tauri-apps/cli-win32-ia32-msvc@2.0.0-alpha.17: + resolution: {integrity: sha512-YIdSHH2Y9Rcg8Z5WoRUTlEi1DZj/Okrz4q0b+z8xwJQFSGsxUhpc3U81iBW1yw/7AtXiLtzr8AiBrLAw4ZYGHA==} engines: {node: '>= 10'} cpu: [ia32] os: [win32] @@ -1298,8 +1294,8 @@ packages: dev: true optional: true - /@tauri-apps/cli-win32-x64-msvc@2.0.0-alpha.16: - resolution: {integrity: sha512-T2kg6o3Ca5cC2i5BdjsGCym0yZ64c9BGO5cmtCCrIardMTYB3hUHDvekOmKviBfqQbIsBHGZfnLDDbmjnwTLvA==} + /@tauri-apps/cli-win32-x64-msvc@2.0.0-alpha.17: + resolution: {integrity: sha512-+1stlGdRdiuyU+q1AlqieZhD2WpdLuP8EZxv2KbbjifLDt6fg1FUrcocmpIa8qsrXue7vg2sTrWNuy4aq/v4bw==} engines: {node: '>= 10'} cpu: [x64] os: [win32] @@ -1307,21 +1303,21 @@ packages: dev: true optional: true - /@tauri-apps/cli@2.0.0-alpha.16: - resolution: {integrity: sha512-zh2psjmHLkoHZkzUN1aPqcOE4KTLRTRJdd+K8CsD/y5nbQdek8qjc8ToohV2FNHDkBq0O/yETsPmPPLgQfhVhg==} + /@tauri-apps/cli@2.0.0-alpha.17: + resolution: {integrity: sha512-fXz1KQzolqHY40bmNa/mzrdid4zlIaI/catXN8iqSO/1aNXNpLhg+6PWrwW5foiD7kJ6lgLlCtICW/1jRE5BZg==} engines: {node: '>= 10'} hasBin: true optionalDependencies: - '@tauri-apps/cli-darwin-arm64': 2.0.0-alpha.16 - '@tauri-apps/cli-darwin-x64': 2.0.0-alpha.16 - '@tauri-apps/cli-linux-arm-gnueabihf': 2.0.0-alpha.16 - '@tauri-apps/cli-linux-arm64-gnu': 2.0.0-alpha.16 - '@tauri-apps/cli-linux-arm64-musl': 2.0.0-alpha.16 - '@tauri-apps/cli-linux-x64-gnu': 2.0.0-alpha.16 - '@tauri-apps/cli-linux-x64-musl': 2.0.0-alpha.16 - '@tauri-apps/cli-win32-arm64-msvc': 2.0.0-alpha.16 - '@tauri-apps/cli-win32-ia32-msvc': 2.0.0-alpha.16 - '@tauri-apps/cli-win32-x64-msvc': 2.0.0-alpha.16 + '@tauri-apps/cli-darwin-arm64': 2.0.0-alpha.17 + '@tauri-apps/cli-darwin-x64': 2.0.0-alpha.17 + '@tauri-apps/cli-linux-arm-gnueabihf': 2.0.0-alpha.17 + '@tauri-apps/cli-linux-arm64-gnu': 2.0.0-alpha.17 + '@tauri-apps/cli-linux-arm64-musl': 2.0.0-alpha.17 + '@tauri-apps/cli-linux-x64-gnu': 2.0.0-alpha.17 + '@tauri-apps/cli-linux-x64-musl': 2.0.0-alpha.17 + '@tauri-apps/cli-win32-arm64-msvc': 2.0.0-alpha.17 + '@tauri-apps/cli-win32-ia32-msvc': 2.0.0-alpha.17 + '@tauri-apps/cli-win32-x64-msvc': 2.0.0-alpha.17 dev: true /@tauri-apps/toml@2.2.4: @@ -1382,7 +1378,7 @@ packages: '@typescript-eslint/type-utils': 6.8.0(eslint@8.51.0)(typescript@5.2.2) '@typescript-eslint/utils': 6.8.0(eslint@8.51.0)(typescript@5.2.2) '@typescript-eslint/visitor-keys': 6.8.0 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) eslint: 8.51.0 graphemer: 1.4.0 ignore: 5.2.4 @@ -1408,7 +1404,7 @@ packages: '@typescript-eslint/types': 6.8.0 '@typescript-eslint/typescript-estree': 6.8.0(typescript@5.2.2) '@typescript-eslint/visitor-keys': 6.8.0 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) eslint: 8.51.0 typescript: 5.2.2 transitivePeerDependencies: @@ -1435,7 +1431,7 @@ packages: dependencies: '@typescript-eslint/typescript-estree': 6.8.0(typescript@5.2.2) '@typescript-eslint/utils': 6.8.0(eslint@8.51.0)(typescript@5.2.2) - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) eslint: 8.51.0 ts-api-utils: 1.0.1(typescript@5.2.2) typescript: 5.2.2 @@ -1459,7 +1455,7 @@ packages: dependencies: '@typescript-eslint/types': 6.8.0 '@typescript-eslint/visitor-keys': 6.8.0 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) globby: 11.1.0 is-glob: 4.0.3 semver: 7.5.4 @@ -1496,7 +1492,7 @@ packages: eslint-visitor-keys: 3.4.1 dev: true - /@unocss/astro@0.56.5(vite@4.5.0): + /@unocss/astro@0.56.5(rollup@4.1.4)(vite@4.5.0): resolution: {integrity: sha512-nkxyGV9mA7DZ5LEr4Gap/SggM60MFNUfn56ngpxCqjQHJOMRJrAcR99hCVn+78vZ9xuZl9HxdIwgZLzn41thMw==} peerDependencies: vite: ^2.9.0 || ^3.0.0-0 || ^4.0.0 @@ -1506,19 +1502,19 @@ packages: dependencies: '@unocss/core': 0.56.5 '@unocss/reset': 0.56.5 - '@unocss/vite': 0.56.5(vite@4.5.0) + '@unocss/vite': 0.56.5(rollup@4.1.4)(vite@4.5.0) vite: 4.5.0 transitivePeerDependencies: - rollup dev: true - /@unocss/cli@0.56.5: + /@unocss/cli@0.56.5(rollup@4.1.4): resolution: {integrity: sha512-VYaqu7Dr1n9ebFFdQM+9Jyg/o9BVKRShlV8bQsBS58gkXiWsA/uAl1Uy2vzpLSrT0F6uGyDmYUF6p4DaUnUO+w==} engines: {node: '>=14'} hasBin: true dependencies: '@ampproject/remapping': 2.2.1 - '@rollup/pluginutils': 5.0.5 + '@rollup/pluginutils': 5.0.5(rollup@4.1.4) '@unocss/config': 0.56.5 '@unocss/core': 0.56.5 '@unocss/preset-uno': 0.56.5 @@ -1687,13 +1683,13 @@ packages: '@unocss/core': 0.56.5 dev: true - /@unocss/vite@0.56.5(vite@4.5.0): + /@unocss/vite@0.56.5(rollup@4.1.4)(vite@4.5.0): resolution: {integrity: sha512-X4nvIukXTH//d+Oc97nJogK04sVGw4fc5LhVV1DjHQVmAOAmhTJCG6SxWGoSeqqUMx5X3gI9fVILK+5O8yl5EA==} peerDependencies: vite: ^2.9.0 || ^3.0.0-0 || ^4.0.0 dependencies: '@ampproject/remapping': 2.2.1 - '@rollup/pluginutils': 5.0.5 + '@rollup/pluginutils': 5.0.5(rollup@4.1.4) '@unocss/config': 0.56.5 '@unocss/core': 0.56.5 '@unocss/inspector': 0.56.5 @@ -2158,18 +2154,6 @@ packages: ms: 2.1.3 dev: true - /debug@4.3.4: - resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} - engines: {node: '>=6.0'} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - dependencies: - ms: 2.1.2 - dev: true - /debug@4.3.4(supports-color@8.1.1): resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} engines: {node: '>=6.0'} @@ -2269,18 +2253,6 @@ packages: resolution: {integrity: sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==} dev: true - /effection@2.0.7: - resolution: {integrity: sha512-I9ndFvtByvHbvOHwMp1NM7vlLDT0RBOu1YlIfBece46VASSot0oPnAfoGdc1YKoQShQLjigvHZ6OqZYUAxUcXg==} - dependencies: - '@effection/channel': 2.0.5 - '@effection/core': 2.2.2 - '@effection/events': 2.0.5 - '@effection/fetch': 2.0.6(mocha@10.2.0) - '@effection/main': 2.1.2 - '@effection/stream': 2.0.5 - '@effection/subscription': 2.0.5 - dev: true - /effection@2.0.7(mocha@10.2.0): resolution: {integrity: sha512-I9ndFvtByvHbvOHwMp1NM7vlLDT0RBOu1YlIfBece46VASSot0oPnAfoGdc1YKoQShQLjigvHZ6OqZYUAxUcXg==} dependencies: @@ -2615,7 +2587,7 @@ packages: ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) doctrine: 3.0.0 escape-string-regexp: 4.0.0 eslint-scope: 7.2.2 @@ -3522,7 +3494,7 @@ packages: /micromark@2.11.4: resolution: {integrity: sha512-+WoovN/ppKolQOFIAajxi7Lu9kInbPxFuTBVEavFcL8eAfVstoc5MocPmqBeAdBOJV00uaVjegzH4+MA0DN/uA==} dependencies: - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) parse-entities: 2.0.0 transitivePeerDependencies: - supports-color @@ -4639,7 +4611,7 @@ packages: '@types/unist': 2.0.7 dev: true - /unocss@0.56.5(postcss@8.4.31)(vite@4.5.0): + /unocss@0.56.5(postcss@8.4.31)(rollup@4.1.4)(vite@4.5.0): resolution: {integrity: sha512-tO+9St4CntSjHpLXZqBo0/etS06MtvFF1NEny/qFJCL9sCopWwmDKuzW6/LIb4wfqZLdMpVFoEACMNv8nP849A==} engines: {node: '>=14'} peerDependencies: @@ -4651,8 +4623,8 @@ packages: vite: optional: true dependencies: - '@unocss/astro': 0.56.5(vite@4.5.0) - '@unocss/cli': 0.56.5 + '@unocss/astro': 0.56.5(rollup@4.1.4)(vite@4.5.0) + '@unocss/cli': 0.56.5(rollup@4.1.4) '@unocss/core': 0.56.5 '@unocss/extractor-arbitrary-variants': 0.56.5 '@unocss/postcss': 0.56.5(postcss@8.4.31) @@ -4670,7 +4642,7 @@ packages: '@unocss/transformer-compile-class': 0.56.5 '@unocss/transformer-directives': 0.56.5 '@unocss/transformer-variant-group': 0.56.5 - '@unocss/vite': 0.56.5(vite@4.5.0) + '@unocss/vite': 0.56.5(rollup@4.1.4)(vite@4.5.0) vite: 4.5.0 transitivePeerDependencies: - postcss diff --git a/shared/template/package.json b/shared/template/package.json index 76ba8ee27..0552b51fe 100644 --- a/shared/template/package.json +++ b/shared/template/package.json @@ -27,6 +27,6 @@ "tslib": "2.6.0" }, "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.9" + "@tauri-apps/api": "2.0.0-alpha.11" } -} +} \ No newline at end of file