diff --git a/.yarn/cache/@tauri-apps-api-npm-2.0.0-beta.13-35c6738399-2716878ded.zip b/.yarn/cache/@tauri-apps-api-npm-2.0.0-beta.13-35c6738399-2716878ded.zip deleted file mode 100644 index 93e30a01..00000000 Binary files a/.yarn/cache/@tauri-apps-api-npm-2.0.0-beta.13-35c6738399-2716878ded.zip and /dev/null differ diff --git a/.yarn/cache/@tauri-apps-plugin-autostart-npm-2.0.0-083ca6f7c1-9cdbe185e8.zip b/.yarn/cache/@tauri-apps-plugin-autostart-npm-2.0.0-083ca6f7c1-9cdbe185e8.zip new file mode 100644 index 00000000..b2e48645 Binary files /dev/null and b/.yarn/cache/@tauri-apps-plugin-autostart-npm-2.0.0-083ca6f7c1-9cdbe185e8.zip differ diff --git a/.yarn/cache/tauri-plugin-autostart-api-https-c6435e9814-fc14978884.zip b/.yarn/cache/tauri-plugin-autostart-api-https-c6435e9814-fc14978884.zip deleted file mode 100644 index 647fc7e7..00000000 Binary files a/.yarn/cache/tauri-plugin-autostart-api-https-c6435e9814-fc14978884.zip and /dev/null differ diff --git a/.yarn/cache/tauri-plugin-log-api-https-9836fba7c6-bd78b4b447.zip b/.yarn/cache/tauri-plugin-log-api-https-9836fba7c6-bd78b4b447.zip deleted file mode 100644 index 0756e8b1..00000000 Binary files a/.yarn/cache/tauri-plugin-log-api-https-9836fba7c6-bd78b4b447.zip and /dev/null differ diff --git a/package.json b/package.json index 901dca1a..441d0f5e 100644 --- a/package.json +++ b/package.json @@ -21,8 +21,9 @@ "@mantine/notifications": "^6.0.22", "@tabler/icons-react": "^2.47.0", "@tauri-apps/api": "^2.0.2", + "@tauri-apps/plugin-autostart": "~2", "@tauri-apps/plugin-fs": "^2.0.0", - "@tauri-apps/plugin-log": "^2.0.0", + "@tauri-apps/plugin-log": "~2", "@tauri-apps/plugin-os": "~2.0.0", "@tauri-apps/plugin-process": "^2.0.0", "@tauri-apps/plugin-shell": "^2.0.0", @@ -30,7 +31,7 @@ "@tauri-apps/plugin-updater": "^2.0.0", "ag-grid-react": "^32.2.2", "classnames": "^2.5.1", - "highcharts": "^11.4.8", + "highcharts": "^11.4.6", "highcharts-react-official": "^3.2.1", "immer": "^10.1.1", "non.geist": "^1.0.4", @@ -43,8 +44,6 @@ "react-router-dom": "^6.27.0", "react-text-gradients": "^1.0.2", "styled-components": "^6.1.13", - "tauri-plugin-autostart-api": "https://github.com/tauri-apps/tauri-plugin-autostart#v2", - "tauri-plugin-log-api": "https://github.com/tauri-apps/tauri-plugin-log#v2", "zustand": "^4.5.5" }, "devDependencies": { diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index ed4e7ecb..a7d1eeea 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -5175,7 +5175,8 @@ dependencies = [ [[package]] name = "tauri-plugin-autostart" version = "2.0.1" -source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v2#00585835834c6ddbf89e8d159804211ceba4bcfb" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bba6bb936e0fd0a58ed958b49e2e423dd40949c9d9425cc991be996959e3838e" dependencies = [ "auto-launch", "log", @@ -5226,7 +5227,8 @@ dependencies = [ [[package]] name = "tauri-plugin-log" version = "2.0.1" -source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v2#00585835834c6ddbf89e8d159804211ceba4bcfb" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a49f2c05d15e6375ab7f7e528b3049150ba4dfafdf61f85e5178d0aef18e3f5" dependencies = [ "android_logger", "byte-unit", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 4fc00e19..f2077ebe 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -37,18 +37,19 @@ base64 = "0.22.1" anyhow = "1.0.86" tauri-plugin-decorum = "1.1.1" tauri-plugin-os = "2" -tauri-plugin-store = "2" -[target."cfg(not(any(target_os = \"android\", target_os = \"ios\")))".dependencies] -tauri-plugin-log = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" } -tauri-plugin-autostart = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" } + +[target."cfg(not(any(target_os = \"android\", target_os = \"ios\")))".dependencies] +tauri-plugin-store = "2" +tauri-plugin-log = "2" tauri-plugin-single-instance = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" } tauri-plugin-window-state = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" } tauri-plugin-fs = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" } tauri-plugin-updater = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" } tauri-plugin-process = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" } tauri-plugin-shell = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" } +tauri-plugin-autostart = "2" [target.'cfg(target_os = "macos")'.dependencies] diff --git a/src-tauri/capabilities/desktop.json b/src-tauri/capabilities/desktop.json new file mode 100644 index 00000000..6fd3b4d0 --- /dev/null +++ b/src-tauri/capabilities/desktop.json @@ -0,0 +1,11 @@ +{ + "identifier": "desktop-capability", + "platforms": [ + "macOS", + "windows", + "linux" + ], + "permissions": [ + "autostart:default" + ] +} \ No newline at end of file diff --git a/src-tauri/gen/schemas/capabilities.json b/src-tauri/gen/schemas/capabilities.json index 2791b955..0cbc261b 100644 --- a/src-tauri/gen/schemas/capabilities.json +++ b/src-tauri/gen/schemas/capabilities.json @@ -1 +1 @@ -{"main":{"identifier":"main","description":"permissions for pachtop","local":true,"windows":["main"],"permissions":["store:allow-get","store:allow-set","store:allow-save","store:default","store:allow-create-store","store:allow-clear","store:allow-delete","store:allow-entries","os:default","os:allow-arch","os:allow-hostname","os:allow-exe-extension","os:allow-family","os:allow-os-type","os:allow-platform","os:allow-version","core:window:allow-start-dragging","autostart:allow-enable","autostart:allow-disable","autostart:allow-is-enabled","updater:allow-check","updater:default","log:allow-log","log:default","shell:allow-spawn","core:menu:allow-new","core:menu:allow-popup","core:window:allow-close","core:window:allow-center","core:window:allow-minimize","core:window:allow-maximize","core:window:allow-set-size","core:window:allow-set-focus","core:window:allow-is-maximized","core:window:allow-start-dragging","core:window:allow-toggle-maximize","decorum:allow-show-snap-overlay",{"identifier":"shell:allow-execute","allow":[{"args":true,"cmd":"powershell","name":"powershell"}]},"fs:read-all","fs:read-files","fs:read-meta"]},"migrated":{"identifier":"migrated","description":"permissions that were migrated from v1","local":true,"windows":["main"],"permissions":["core:path:default","core:event:default","core:window:default","core:app:default","core:resources:default","core:menu:default","core:tray:default"]}} \ No newline at end of file +{"desktop-capability":{"identifier":"desktop-capability","description":"","local":true,"permissions":["autostart:default"],"platforms":["macOS","windows","linux"]},"main":{"identifier":"main","description":"permissions for pachtop","local":true,"windows":["main"],"permissions":["store:allow-get","store:allow-set","store:allow-save","store:default","store:allow-create-store","store:allow-clear","store:allow-delete","store:allow-entries","os:default","os:allow-arch","os:allow-hostname","os:allow-exe-extension","os:allow-family","os:allow-os-type","os:allow-platform","os:allow-version","core:window:allow-start-dragging","autostart:allow-enable","autostart:allow-disable","autostart:allow-is-enabled","updater:allow-check","updater:default","log:allow-log","log:default","shell:allow-spawn","core:menu:allow-new","core:menu:allow-popup","core:window:allow-close","core:window:allow-center","core:window:allow-minimize","core:window:allow-maximize","core:window:allow-set-size","core:window:allow-set-focus","core:window:allow-is-maximized","core:window:allow-start-dragging","core:window:allow-toggle-maximize","decorum:allow-show-snap-overlay",{"identifier":"shell:allow-execute","allow":[{"args":true,"cmd":"powershell","name":"powershell"}]},"fs:read-all","fs:read-files","fs:read-meta"]},"migrated":{"identifier":"migrated","description":"permissions that were migrated from v1","local":true,"windows":["main"],"permissions":["core:path:default","core:event:default","core:window:default","core:app:default","core:resources:default","core:menu:default","core:tray:default"]}} \ No newline at end of file diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index 95268537..6ab64130 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -23,6 +23,8 @@ use std::time::Duration; fn build_and_run_app(app: AppState) { tauri::Builder::default() + .plugin(tauri_plugin_log::Builder::new().build()) + .plugin(tauri_plugin_autostart::init()) .plugin(tauri_plugin_store::Builder::new().build()) .plugin(tauri_plugin_os::init()) .plugin(tauri_plugin_updater::Builder::new().build()) diff --git a/src/lib/autostart.ts b/src/lib/autostart.ts index 33cadd54..69db8878 100644 --- a/src/lib/autostart.ts +++ b/src/lib/autostart.ts @@ -1,4 +1,4 @@ -import { disable, enable, isEnabled } from 'tauri-plugin-autostart-api'; +import { disable, enable, isEnabled } from '@tauri-apps/plugin-autostart'; export const enableAutostart = async () => { if (await isEnabled()) { diff --git a/yarn.lock b/yarn.lock index 087cde3f..a7e9e10f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3107,13 +3107,6 @@ __metadata: languageName: node linkType: hard -"@tauri-apps/api@npm:2.0.0-beta.13": - version: 2.0.0-beta.13 - resolution: "@tauri-apps/api@npm:2.0.0-beta.13" - checksum: 2716878dedbae061740bde23b5ee9f5e8fffc6e4bf26d0b0babb3412a83ff295fe2fe4e22b4505de7ef845a0745d679bf15d7078b3dc26784002bd638abacff0 - languageName: node - linkType: hard - "@tauri-apps/api@npm:^2.0.0, @tauri-apps/api@npm:^2.0.2": version: 2.0.2 resolution: "@tauri-apps/api@npm:2.0.2" @@ -3232,6 +3225,15 @@ __metadata: languageName: node linkType: hard +"@tauri-apps/plugin-autostart@npm:~2": + version: 2.0.0 + resolution: "@tauri-apps/plugin-autostart@npm:2.0.0" + dependencies: + "@tauri-apps/api": ^2.0.0 + checksum: 9cdbe185e8da83e3831c31d016a0f65088fb32e93c809631088a051ac8f1c0c4a19f3bd06da062a145e5d734f69aa198cab5f222c5284e23e80014a7d17d8af4 + languageName: node + linkType: hard + "@tauri-apps/plugin-fs@npm:^2.0.0": version: 2.0.0 resolution: "@tauri-apps/plugin-fs@npm:2.0.0" @@ -3241,7 +3243,7 @@ __metadata: languageName: node linkType: hard -"@tauri-apps/plugin-log@npm:^2.0.0": +"@tauri-apps/plugin-log@npm:~2": version: 2.0.0 resolution: "@tauri-apps/plugin-log@npm:2.0.0" dependencies: @@ -5799,7 +5801,7 @@ __metadata: languageName: node linkType: hard -"highcharts@npm:^11.4.8": +"highcharts@npm:^11.4.6": version: 11.4.8 resolution: "highcharts@npm:11.4.8" checksum: 92d3563573502dbb3f6facef5608590e8f32dd839106febfb62635851bbbc8e66ba88bcc4c90b497a2150d268aa735d5549da7bf8f2a621394171f3d396777c5 @@ -6881,8 +6883,9 @@ __metadata: "@tabler/icons-react": ^2.47.0 "@tauri-apps/api": ^2.0.2 "@tauri-apps/cli": 2.0.3 + "@tauri-apps/plugin-autostart": ~2 "@tauri-apps/plugin-fs": ^2.0.0 - "@tauri-apps/plugin-log": ^2.0.0 + "@tauri-apps/plugin-log": ~2 "@tauri-apps/plugin-os": ~2.0.0 "@tauri-apps/plugin-process": ^2.0.0 "@tauri-apps/plugin-shell": ^2.0.0 @@ -6902,7 +6905,7 @@ __metadata: eslint-plugin-react: ^7.37.1 eslint-plugin-unused-imports: ^4.1.4 globals: ^15.11.0 - highcharts: ^11.4.8 + highcharts: ^11.4.6 highcharts-react-official: ^3.2.1 husky: ^9.1.6 immer: ^10.1.1 @@ -6916,8 +6919,6 @@ __metadata: react-router-dom: ^6.27.0 react-text-gradients: ^1.0.2 styled-components: ^6.1.13 - tauri-plugin-autostart-api: "https://github.com/tauri-apps/tauri-plugin-autostart#v2" - tauri-plugin-log-api: "https://github.com/tauri-apps/tauri-plugin-log#v2" typescript: ^5.6.3 typescript-eslint: ^7.18.0 vite: ^5.4.8 @@ -8060,24 +8061,6 @@ __metadata: languageName: node linkType: hard -"tauri-plugin-autostart-api@https://github.com/tauri-apps/tauri-plugin-autostart#v2": - version: 2.0.0-beta.5 - resolution: "tauri-plugin-autostart-api@https://github.com/tauri-apps/tauri-plugin-autostart.git#commit=41d58532b5741ebb0d155dd3a1bd276910cb20d1" - dependencies: - "@tauri-apps/api": 2.0.0-beta.13 - checksum: fc149788844a88c2a70cce8735757a538202f80941b4f9d8f8ab93a06c5df4058d43aeb1487c5a03a8ce712fb9fe26d0ce90f640c863551cf5ba5b0715c70d4f - languageName: node - linkType: hard - -"tauri-plugin-log-api@https://github.com/tauri-apps/tauri-plugin-log#v2": - version: 2.0.0-beta.6 - resolution: "tauri-plugin-log-api@https://github.com/tauri-apps/tauri-plugin-log.git#commit=ed1570339878d2fc8d36729dc581f3a18f8db3c3" - dependencies: - "@tauri-apps/api": 2.0.0-beta.13 - checksum: bd78b4b4474e058e6e1b7b3df4be68446c11fddcfdf416800551918017da164f2b126569321def825f99b420884f9dcb8e6d086cb86b099ba97ef66f02adbe39 - languageName: node - linkType: hard - "text-table@npm:^0.2.0": version: 0.2.0 resolution: "text-table@npm:0.2.0"