diff --git a/Cargo.toml b/Cargo.toml index be4338d..5999e3e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,17 +12,17 @@ exclude = ["/examples", "/webview-dist", "/webview-src", "/node_modules"] links = "tauri-plugin-aptabase" [dependencies] -tauri = "2.2.5" -tokio = "1.43.0" +tauri = "2.7.0" +tokio = "1.47.1" futures = "0.3.31" -serde = "1.0.217" -serde_json = "1.0.138" -reqwest = { version = "0.12.12", features = ["json"] } -time = { version = "0.3.37", features = ["formatting"] } -os_info = "3.9.2" -rand = "0.9.0" -log = "0.4.25" +serde = "1.0.219" +serde_json = "1.0.142" +reqwest = { version = "0.12.22", features = ["json"] } +time = { version = "0.3.41", features = ["formatting"] } +os_info = "3.12.0" +rand = "0.9.2" +log = "0.4.27" sys-locale = "0.3.2" [build-dependencies] -tauri-plugin = { version = "2.0.4", features = ["build"] } +tauri-plugin = { version = "2.3.1", features = ["build"] } diff --git a/examples/helloworld/package.json b/examples/helloworld/package.json index 2c6fd20..4016268 100644 --- a/examples/helloworld/package.json +++ b/examples/helloworld/package.json @@ -11,14 +11,14 @@ "tauri": "tauri" }, "dependencies": { - "@tauri-apps/api": "^2.1.1", + "@tauri-apps/api": "^2.7.0", "@aptabase/tauri": "file:../../" }, "devDependencies": { - "@sveltejs/vite-plugin-svelte": "^1.0.1", - "internal-ip": "^7.0.0", - "svelte": "^3.49.0", - "vite": "^3.0.2", - "@tauri-apps/cli": "^2.1.0" + "@sveltejs/vite-plugin-svelte": "^4.0.0", + "internal-ip": "^8.0.0", + "svelte": "^5.14.0", + "vite": "^5.4.0", + "@tauri-apps/cli": "^2.7.0" } } diff --git a/examples/helloworld/src-tauri/Cargo.toml b/examples/helloworld/src-tauri/Cargo.toml index 619e34e..c5f600a 100644 --- a/examples/helloworld/src-tauri/Cargo.toml +++ b/examples/helloworld/src-tauri/Cargo.toml @@ -18,7 +18,7 @@ crate-type = ["staticlib", "cdylib", "rlib"] tauri-build = { version = "2.0", default-features = false, features = [] } [dependencies] -tauri = { version = "2.1", features = [] } +tauri = { version = "2.7", features = [] } tauri-plugin-aptabase = { path = "../../../" } serde_json = "1.0" serde = { version = "1.0", features = ["derive"] } diff --git a/package.json b/package.json index 2c16439..379e4cb 100644 --- a/package.json +++ b/package.json @@ -29,14 +29,14 @@ "package.json" ], "devDependencies": { - "@rollup/plugin-node-resolve": "^15.3.0", + "@rollup/plugin-node-resolve": "^16.0.1", "@rollup/plugin-typescript": "^12.1.1", "@rollup/plugin-terser": "^0.4.4", "rollup": "^4.27.4", "typescript": "^5.7.2" }, "dependencies": { - "@tauri-apps/api": "^2.1.1", + "@tauri-apps/api": "^2.7.0", "tslib": "^2.8.1" } } diff --git a/permissions/autogenerated/reference.md b/permissions/autogenerated/reference.md index 3c0486b..652ec58 100644 --- a/permissions/autogenerated/reference.md +++ b/permissions/autogenerated/reference.md @@ -1,4 +1,3 @@ - ## Permission Table diff --git a/permissions/schemas/schema.json b/permissions/schemas/schema.json index f13b11b..4c0ac2b 100644 --- a/permissions/schemas/schema.json +++ b/permissions/schemas/schema.json @@ -49,7 +49,7 @@ "minimum": 1.0 }, "description": { - "description": "Human-readable description of what the permission does. Tauri convention is to use

headings in markdown content for Tauri documentation generation purposes.", + "description": "Human-readable description of what the permission does. Tauri convention is to use `

` headings in markdown content for Tauri documentation generation purposes.", "type": [ "string", "null" @@ -111,7 +111,7 @@ "type": "string" }, "description": { - "description": "Human-readable description of what the permission does. Tauri internal convention is to use

headings in markdown content for Tauri documentation generation purposes.", + "description": "Human-readable description of what the permission does. Tauri internal convention is to use `

` headings in markdown content for Tauri documentation generation purposes.", "type": [ "string", "null" @@ -297,12 +297,14 @@ { "description": "Enables the track_event command without any pre-configured scope.", "type": "string", - "const": "allow-track-event" + "const": "allow-track-event", + "markdownDescription": "Enables the track_event command without any pre-configured scope." }, { "description": "Denies the track_event command without any pre-configured scope.", "type": "string", - "const": "deny-track-event" + "const": "deny-track-event", + "markdownDescription": "Denies the track_event command without any pre-configured scope." } ] } diff --git a/src/client.rs b/src/client.rs index da9d905..39bcfb7 100644 --- a/src/client.rs +++ b/src/client.rs @@ -75,12 +75,12 @@ impl AptabaseClient { pub(crate) fn start_polling(&self, interval: Duration) { let dispatcher = self.dispatcher.clone(); - tokio::spawn(async move { + tauri::async_runtime::spawn(async move { loop { tokio::time::sleep(interval).await; dispatcher.flush().await; } - }); + }); } /// Returns the current session ID, creating a new one if necessary. diff --git a/src/lib.rs b/src/lib.rs index a2b747c..824a794 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -4,7 +4,7 @@ mod config; mod dispatcher; mod sys; -use std::{panic::PanicInfo, sync::Arc, time::Duration}; +use std::{panic::PanicHookInfo, sync::Arc, time::Duration}; use client::AptabaseClient; use config::Config; @@ -28,9 +28,9 @@ pub struct Builder { } pub type PanicHook = - Box, String) + 'static + Sync + Send>; + Box, String) + 'static + Sync + Send>; -fn get_panic_message(info: &PanicInfo) -> String { +fn get_panic_message(info: &PanicHookInfo) -> String { let payload = info.payload(); if let Some(s) = payload.downcast_ref::<&str>() { return s.to_string(); diff --git a/webview-dist/index.js b/webview-dist/index.js index 5f0290a..b957d7f 100644 --- a/webview-dist/index.js +++ b/webview-dist/index.js @@ -1 +1 @@ -function n(n,e,r,t){return new(r||(r=Promise))((function(o,u){function i(n){try{p(t.next(n))}catch(n){u(n)}}function c(n){try{p(t.throw(n))}catch(n){u(n)}}function p(n){var e;n.done?o(n.value):(e=n.value,e instanceof r?e:new r((function(n){n(e)}))).then(i,c)}p((t=t.apply(n,e||[])).next())}))}function e(e,r){return n(this,void 0,void 0,(function*(){yield async function(n,e={},r){return window.__TAURI_INTERNALS__.invoke(n,e,r)}("plugin:aptabase|track_event",{name:e,props:r})}))}"function"==typeof SuppressedError&&SuppressedError,"function"==typeof SuppressedError&&SuppressedError;export{e as trackEvent}; +function n(n,e,r,t){return new(r||(r=Promise))(function(o,u){function i(n){try{p(t.next(n))}catch(n){u(n)}}function c(n){try{p(t.throw(n))}catch(n){u(n)}}function p(n){var e;n.done?o(n.value):(e=n.value,e instanceof r?e:new r(function(n){n(e)})).then(i,c)}p((t=t.apply(n,e||[])).next())})}function e(e,r){return n(this,void 0,void 0,function*(){yield async function(n,e={},r){return window.__TAURI_INTERNALS__.invoke(n,e,r)}("plugin:aptabase|track_event",{name:e,props:r})})}"function"==typeof SuppressedError&&SuppressedError,"function"==typeof SuppressedError&&SuppressedError;export{e as trackEvent};