Update dependencies and integrate @tauri-store/svelte

- Added `bon` and `bon-macros` packages to Cargo.lock.
- Upgraded `tauri-plugin-svelte`, `tauri-store`, and related packages to their latest versions.
- Updated `@tauri-store/svelte` integration in the desktop app, including changes to app configuration and layout handling.
- Adjusted pnpm-lock.yaml to reflect updated package versions and added new dependencies.
- Introduced a new app configuration file for development.
This commit is contained in:
Huakun Shen 2025-03-28 05:28:54 -04:00
parent 7375122d40
commit 36bb080e89
No known key found for this signature in database
8 changed files with 100 additions and 53 deletions

46
Cargo.lock generated
View File

@ -824,6 +824,31 @@ dependencies = [
"piper",
]
[[package]]
name = "bon"
version = "3.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "65268237be94042665b92034f979c42d431d2fd998b49809543afe3e66abad1c"
dependencies = [
"bon-macros",
"rustversion",
]
[[package]]
name = "bon-macros"
version = "3.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "803c95b2ecf650eb10b5f87dda6b9f6a1b758cee53245e2b7b825c9b3803a443"
dependencies = [
"darling",
"ident_case",
"prettyplease",
"proc-macro2",
"quote",
"rustversion",
"syn 2.0.87",
]
[[package]]
name = "borsh"
version = "1.3.0"
@ -8003,9 +8028,9 @@ dependencies = [
[[package]]
name = "tauri-plugin-svelte"
version = "1.2.1"
version = "2.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dab0a4d739af1108c6572e6249113190135c66a45586d0f8f93b3ee532e6176f"
checksum = "17e96f88b3c614b98cea3afb5de6e2661d32f82c70423ae125c56a25d62017e6"
dependencies = [
"serde",
"tauri",
@ -8136,9 +8161,9 @@ dependencies = [
[[package]]
name = "tauri-store"
version = "0.8.1"
version = "0.10.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cb4e7c0776d9f8b54fd4788f4e471ce83b4c6cf62079799830a3735582a51fc4"
checksum = "5a33c8afdf92c1b177296c0299f6d20116cbce0fa1e2264819fea8c80fd31774"
dependencies = [
"dashmap",
"futures",
@ -8155,9 +8180,9 @@ dependencies = [
[[package]]
name = "tauri-store-macros"
version = "0.8.1"
version = "0.10.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fabed02238bc887f75887b315c6a14d9571ab463c1a188cc27ec2f7e917b06c3"
checksum = "c8857e4240cf6dbabb15fc2d595e92abba404f0a5cce0f3abbfe9316cac4aa99"
dependencies = [
"proc-macro2",
"quote",
@ -8166,11 +8191,14 @@ dependencies = [
[[package]]
name = "tauri-store-utils"
version = "0.2.2"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b983a259b22d622ce74b957140efa161bd75c6bfd47b7bf621c98dd05b1a2474"
checksum = "14376c237a6632663991634d51a31f128b6b381b94d65e747db2419a513ae6d8"
dependencies = [
"futures",
"bon",
"semver",
"serde",
"serde_json",
"tauri",
"thiserror 2.0.3",
"tokio",

View File

@ -28,6 +28,7 @@
"@tauri-apps/plugin-autostart": "^2.2.0",
"@tauri-apps/plugin-shell": "^2.2.0",
"@tauri-apps/plugin-stronghold": "^2.2.0",
"@tauri-store/svelte": "^2.1.1",
"dompurify": "^3.2.4",
"eslint": "^9.21.0",
"fuse.js": "^7.1.0",

View File

@ -71,4 +71,4 @@ tauri-plugin-cli = "2"
tauri-plugin-global-shortcut = "2.0.1"
tauri-plugin-single-instance = { version = "2", features = ["deep-link"] }
tauri-plugin-updater = "2.0.2"
tauri-plugin-svelte = "1.2.1"
tauri-plugin-svelte = "2.1.1"

View File

@ -0,0 +1 @@
{"language":"en","hideOnBlur":false,"triggerHotkey":null,"devExtensionPath":null,"onBoarded":true,"platform":"macos","showInTray":true,"appSearchPaths":[],"extensionAutoUpgrade":true,"developerMode":false,"extensionsInstallDir":"/Users/hk/Library/Application Support/sh.kunkun.desktop/extensions","loadingAnimation":"kunkun-dancing","isInitialized":true,"joinBetaProgram":false,"hmr":false,"theme":{"lightMode":"auto","radius":0.5,"theme":"zinc"}}

View File

@ -27,7 +27,7 @@ use utils::server::tauri_file_server;
pub fn run() {
let context = tauri::generate_context!();
let mut builder = tauri::Builder::default();
// let app_data_path = tauri::path::PathResolver::app_data_dir().unwrap();
// let db_key = if cfg!(debug_assertions) {
// None
// } else {

View File

@ -7,7 +7,7 @@ import * as os from "@tauri-apps/plugin-os"
import { load } from "@tauri-apps/plugin-store"
import { toast } from "svelte-sonner"
import { get, writable } from "svelte/store"
import { Store } from "tauri-plugin-svelte"
import { Store } from "@tauri-store/svelte"
import * as v from "valibot"
export const defaultAppConfig: AppConfigState = {

View File

@ -1,7 +1,11 @@
import { getExtensionsFolder, IS_IN_TAURI } from "@/constants"
import { error } from "@tauri-apps/plugin-log"
import type { LayoutLoad } from "./$types"
import { setStoreCollectionPath } from '@tauri-store/svelte';
import * as path from "@tauri-apps/api/path";
export const load: LayoutLoad = async () => {
return { extsInstallDir: IS_IN_TAURI ? await getExtensionsFolder() : "" }
const appDataPath = await path.appDataDir()
await setStoreCollectionPath(await path.join(appDataPath, "kk-config"))
return { extsInstallDir: IS_IN_TAURI ? await getExtensionsFolder() : "", appDataPath }
}

93
pnpm-lock.yaml generated
View File

@ -150,7 +150,7 @@ importers:
devDependencies:
'@types/bun':
specifier: latest
version: 1.2.6
version: 1.2.8
'@types/debug':
specifier: ^4.1.12
version: 4.1.12
@ -190,7 +190,7 @@ importers:
devDependencies:
'@types/bun':
specifier: latest
version: 1.2.6
version: 1.2.8
'@types/fs-extra':
specifier: ^11.0.4
version: 11.0.4
@ -245,6 +245,9 @@ importers:
'@tauri-apps/plugin-stronghold':
specifier: ^2.2.0
version: 2.2.0
'@tauri-store/svelte':
specifier: ^2.1.1
version: 2.1.1
dompurify:
specifier: ^3.2.4
version: 3.2.4
@ -329,7 +332,7 @@ importers:
version: 2.3.1
'@types/bun':
specifier: latest
version: 1.2.6
version: 1.2.8
'@types/semver':
specifier: ^7.5.8
version: 7.5.8
@ -480,7 +483,7 @@ importers:
devDependencies:
'@types/bun':
specifier: latest
version: 1.2.6
version: 1.2.8
'@types/lodash':
specifier: ^4.17.14
version: 4.17.14
@ -520,7 +523,7 @@ importers:
version: link:../typescript-config
'@types/bun':
specifier: latest
version: 1.2.6
version: 1.2.8
packages/config-eslint:
dependencies:
@ -563,7 +566,7 @@ importers:
devDependencies:
'@types/bun':
specifier: latest
version: 1.2.6
version: 1.2.8
'@types/semver':
specifier: ^7.5.8
version: 7.5.8
@ -594,7 +597,7 @@ importers:
version: 11.1.6(rollup@4.34.2)(tslib@2.8.1)(typescript@5.7.3)
'@types/bun':
specifier: latest
version: 1.2.6
version: 1.2.8
rollup-plugin-visualizer:
specifier: ^5.12.0
version: 5.12.0(rollup@4.34.2)
@ -701,7 +704,7 @@ importers:
devDependencies:
'@types/bun':
specifier: latest
version: 1.2.6
version: 1.2.8
packages/grpc:
dependencies:
@ -720,7 +723,7 @@ importers:
version: 0.7.13
'@types/bun':
specifier: latest
version: 1.2.6
version: 1.2.8
'@types/google-protobuf':
specifier: ^3.15.12
version: 3.15.12
@ -748,7 +751,7 @@ importers:
devDependencies:
'@types/bun':
specifier: latest
version: 1.2.6
version: 1.2.8
verify-package-export:
specifier: ^0.0.3
version: 0.0.3(typescript@5.7.3)
@ -773,7 +776,7 @@ importers:
version: 2.48.0
'@types/bun':
specifier: latest
version: 1.2.6
version: 1.2.8
'@valibot/to-json-schema':
specifier: 1.0.0
version: 1.0.0(valibot@1.0.0(typescript@5.7.3))
@ -786,7 +789,7 @@ importers:
devDependencies:
'@types/bun':
specifier: latest
version: 1.2.6
version: 1.2.8
packages/tauri-plugins/jarvis:
dependencies:
@ -802,7 +805,7 @@ importers:
version: 2.48.0
'@types/bun':
specifier: latest
version: 1.2.6
version: 1.2.8
packages/templates/template-ext-headless:
dependencies:
@ -821,7 +824,7 @@ importers:
devDependencies:
'@types/bun':
specifier: latest
version: 1.2.6
version: 1.2.8
packages/templates/template-ext-next:
dependencies:
@ -1173,7 +1176,7 @@ importers:
devDependencies:
'@types/bun':
specifier: latest
version: 1.2.6
version: 1.2.8
packages/types:
dependencies:
@ -1183,7 +1186,7 @@ importers:
devDependencies:
'@types/bun':
specifier: latest
version: 1.2.6
version: 1.2.8
packages/typescript-config: {}
@ -1279,7 +1282,7 @@ importers:
version: 0.1.15(lucide-svelte@0.471.0(svelte@5.20.5))(svelte-sonner@0.3.28(svelte@5.20.5))(svelte@5.20.5)(sveltekit-superforms@2.22.1(@sveltejs/kit@2.17.3(@sveltejs/vite-plugin-svelte@5.0.3(svelte@5.20.5)(vite@6.2.0(@types/node@22.13.1)(jiti@2.4.0)(terser@5.36.0)(yaml@2.6.1)))(svelte@5.20.5)(vite@6.2.0(@types/node@22.13.1)(jiti@2.4.0)(terser@5.36.0)(yaml@2.6.1)))(@types/json-schema@7.0.15)(svelte@5.20.5)(typescript@5.7.3))(typescript@5.7.3)
'@types/bun':
specifier: latest
version: 1.2.6
version: 1.2.8
'@typescript-eslint/eslint-plugin':
specifier: ^8.20.0
version: 8.20.0(@typescript-eslint/parser@8.20.0(eslint@9.21.0(jiti@2.4.0))(typescript@5.7.3))(eslint@9.21.0(jiti@2.4.0))(typescript@5.7.3)
@ -1361,7 +1364,7 @@ importers:
devDependencies:
'@types/bun':
specifier: latest
version: 1.2.6
version: 1.2.8
vendors/tauri-plugin-keyring:
dependencies:
@ -1391,7 +1394,7 @@ importers:
specifier: ^2.1.1
version: 2.1.1
valibot:
specifier: ^1.0.0-beta.10
specifier: ^1.0.0
version: 1.0.0(typescript@5.6.3)
devDependencies:
'@rollup/plugin-typescript':
@ -1457,8 +1460,8 @@ importers:
specifier: ^5.3.3
version: 5.6.3
valibot:
specifier: 1.0.0-beta.9
version: 1.0.0-beta.9(typescript@5.6.3)
specifier: 1.0.0
version: 1.0.0(typescript@5.6.3)
packages:
@ -5301,6 +5304,12 @@ packages:
'@tauri-store/shared@0.6.0':
resolution: {integrity: sha512-2KBezqqkw68HvvXHEtbbpxyQHDjymBUZl10YuAsNRI8DHFIA0n18WE7NRyQ93+H7IzDP1/B41m2/rcMDHBSiKw==}
'@tauri-store/shared@0.7.2':
resolution: {integrity: sha512-42nprNNeU+tjpCvYnaBsu3kYwAy8gP6KyXX9zeaIvpMys1tIhQdEiUAXo3KChHq/jCkSralXRLN4zfjCfBJFrw==}
'@tauri-store/svelte@2.1.1':
resolution: {integrity: sha512-exGvgEM6zcXZq6KRnG2b2JDXogyarRaJdjrblD27Q4IU1vhSTY8TxvDMCPGfD31kbOcf/aR4A6zT8OX0DFuxjg==}
'@trysound/sax@0.2.0':
resolution: {integrity: sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==}
engines: {node: '>=10.13.0'}
@ -5342,8 +5351,8 @@ packages:
'@types/btoa-lite@1.0.2':
resolution: {integrity: sha512-ZYbcE2x7yrvNFJiU7xJGrpF/ihpkM7zKgw8bha3LNJSesvTtUNxbpzaT7WXBIryf6jovisrxTBvymxMeLLj1Mg==}
'@types/bun@1.2.6':
resolution: {integrity: sha512-fY9CAmTdJH1Llx7rugB0FpgWK2RKuHCs3g2cFDYXUutIy1QGiPQxKkGY8owhfZ4MXWNfxwIbQLChgH5gDsY7vw==}
'@types/bun@1.2.8':
resolution: {integrity: sha512-t8L1RvJVUghW5V+M/fL3Thbxcs0HwNsXsnTEBEfEVqGteiJToOlZ/fyOEaR1kZsNqnu+3XA4RI/qmnX4w6+S+w==}
'@types/cookie@0.6.0':
resolution: {integrity: sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==}
@ -6409,8 +6418,8 @@ packages:
buffer@6.0.3:
resolution: {integrity: sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==}
bun-types@1.2.6:
resolution: {integrity: sha512-FbCKyr5KDiPULUzN/nm5oqQs9nXCHD8dVc64BArxJadCvbNzAI6lUWGh9fSJZWeDIRD38ikceBU8Kj/Uh+53oQ==}
bun-types@1.2.7:
resolution: {integrity: sha512-P4hHhk7kjF99acXqKvltyuMQ2kf/rzIw3ylEDpCxDS9Xa0X0Yp/gJu/vDCucmWpiur5qJ0lwB2bWzOXa2GlHqA==}
bundle-name@4.1.0:
resolution: {integrity: sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q==}
@ -7449,6 +7458,9 @@ packages:
resolution: {integrity: sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==}
engines: {node: '>= 0.4'}
es-toolkit@1.34.1:
resolution: {integrity: sha512-OA6cd94fJV9bm8dWhIySkWq4xV+rAQnBZUr2dnpXam0QJ8c+hurLbKA8/QooL9Mx4WCAxvIDsiEkid5KPQ5xgQ==}
esbuild-runner@2.2.2:
resolution: {integrity: sha512-fRFVXcmYVmSmtYm2mL8RlUASt2TDkGh3uRcvHFOKNr/T58VrfVeKD9uT9nlgxk96u0LS0ehS/GY7Da/bXWKkhw==}
hasBin: true
@ -11934,14 +11946,6 @@ packages:
typescript:
optional: true
valibot@1.0.0-beta.9:
resolution: {integrity: sha512-yEX8gMAZ2R1yI2uwOO4NCtVnJQx36zn3vD0omzzj9FhcoblvPukENIiRZXKZwCnqSeV80bMm8wNiGhQ0S8fiww==}
peerDependencies:
typescript: '>=5'
peerDependenciesMeta:
typescript:
optional: true
validate-npm-package-name@5.0.1:
resolution: {integrity: sha512-OljLrQ9SQdOUqTaQxqL5dEfZWrXExyyWsozYlAWFawPVNuD83igl7uJD2RTkNMbniIYgt8l81eCJGIdQF7avLQ==}
engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0}
@ -17422,6 +17426,17 @@ snapshots:
dependencies:
'@tauri-apps/api': 2.3.0
'@tauri-store/shared@0.7.2':
dependencies:
'@tauri-apps/api': 2.3.0
es-toolkit: 1.34.1
'@tauri-store/svelte@2.1.1':
dependencies:
'@tauri-apps/api': 2.3.0
'@tauri-store/shared': 0.7.2
svelte: 5.20.5
'@trysound/sax@0.2.0': {}
'@ts-graphviz/adapter@2.0.5':
@ -17466,9 +17481,9 @@ snapshots:
'@types/btoa-lite@1.0.2': {}
'@types/bun@1.2.6':
'@types/bun@1.2.8':
dependencies:
bun-types: 1.2.6
bun-types: 1.2.7
'@types/cookie@0.6.0': {}
@ -19010,7 +19025,7 @@ snapshots:
base64-js: 1.5.1
ieee754: 1.2.1
bun-types@1.2.6:
bun-types@1.2.7:
dependencies:
'@types/node': 22.13.1
'@types/ws': 8.5.14
@ -20085,6 +20100,8 @@ snapshots:
is-date-object: 1.0.5
is-symbol: 1.0.4
es-toolkit@1.34.1: {}
esbuild-runner@2.2.2(esbuild@0.24.2):
dependencies:
esbuild: 0.24.2
@ -25765,10 +25782,6 @@ snapshots:
optionalDependencies:
typescript: 5.7.3
valibot@1.0.0-beta.9(typescript@5.6.3):
optionalDependencies:
typescript: 5.6.3
validate-npm-package-name@5.0.1: {}
validator@13.12.0: