From 860ac47921feba7d4f82c5a7dc6f50b760d79de4 Mon Sep 17 00:00:00 2001 From: Prayag Prajapati Date: Tue, 14 Feb 2023 10:22:46 +0530 Subject: [PATCH] Start adding tauri_store for data storage --- package-lock.json | 35 +++++++++++++++++++++++++++++++++++ package.json | 1 + src-tauri/Cargo.toml | 1 + src-tauri/src/main.rs | 1 + 4 files changed, 38 insertions(+) diff --git a/package-lock.json b/package-lock.json index 1faad8b..568bd14 100644 --- a/package-lock.json +++ b/package-lock.json @@ -29,6 +29,7 @@ "react-multi-carousel": "^2.8.2", "react-router-dom": "^6.4.3", "sort-by": "^1.2.0", + "tauri-plugin-store-api": "github:tauri-apps/tauri-plugin-store", "uuid": "^9.0.0", "vite-plugin-svgr": "^2.2.2" }, @@ -1258,6 +1259,20 @@ "@svgr/core": "^6.0.0" } }, + "node_modules/@tauri-apps/api": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@tauri-apps/api/-/api-1.2.0.tgz", + "integrity": "sha512-lsI54KI6HGf7VImuf/T9pnoejfgkNoXveP14pVV7XarrQ46rOejIVJLFqHI9sRReJMGdh2YuCoI3cc/yCWCsrw==", + "engines": { + "node": ">= 14.6.0", + "npm": ">= 6.6.0", + "yarn": ">= 1.19.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/tauri" + } + }, "node_modules/@tauri-apps/cli": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/@tauri-apps/cli/-/cli-1.2.3.tgz", @@ -3077,6 +3092,14 @@ "resolved": "https://registry.npmjs.org/svg-parser/-/svg-parser-2.0.4.tgz", "integrity": "sha512-e4hG1hRwoOdRb37cIMSgzNsxyzKfayW6VOflrwvR+/bzrkyxY/31WkbgnQpgtrNp1SdpJvpUAGTa/ZoiPNDuRQ==" }, + "node_modules/tauri-plugin-store-api": { + "version": "0.0.0", + "resolved": "git+ssh://git@github.com/tauri-apps/tauri-plugin-store.git#c71665bf5dcf48ae70a88d622eb38b2548b60a5d", + "license": "MIT or APACHE-2.0", + "dependencies": { + "@tauri-apps/api": "^1.2.0" + } + }, "node_modules/to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", @@ -3973,6 +3996,11 @@ "svg-parser": "^2.0.4" } }, + "@tauri-apps/api": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@tauri-apps/api/-/api-1.2.0.tgz", + "integrity": "sha512-lsI54KI6HGf7VImuf/T9pnoejfgkNoXveP14pVV7XarrQ46rOejIVJLFqHI9sRReJMGdh2YuCoI3cc/yCWCsrw==" + }, "@tauri-apps/cli": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/@tauri-apps/cli/-/cli-1.2.3.tgz", @@ -5158,6 +5186,13 @@ "resolved": "https://registry.npmjs.org/svg-parser/-/svg-parser-2.0.4.tgz", "integrity": "sha512-e4hG1hRwoOdRb37cIMSgzNsxyzKfayW6VOflrwvR+/bzrkyxY/31WkbgnQpgtrNp1SdpJvpUAGTa/ZoiPNDuRQ==" }, + "tauri-plugin-store-api": { + "version": "git+ssh://git@github.com/tauri-apps/tauri-plugin-store.git#c71665bf5dcf48ae70a88d622eb38b2548b60a5d", + "from": "tauri-plugin-store-api@https://github.com/tauri-apps/tauri-plugin-store", + "requires": { + "@tauri-apps/api": "^1.2.0" + } + }, "to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", diff --git a/package.json b/package.json index 58d1544..6ae41b5 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,7 @@ "react-multi-carousel": "^2.8.2", "react-router-dom": "^6.4.3", "sort-by": "^1.2.0", + "tauri-plugin-store-api": "github:tauri-apps/tauri-plugin-store", "uuid": "^9.0.0", "vite-plugin-svgr": "^2.2.2" }, diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index e713211..59747ac 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -18,6 +18,7 @@ tauri-build = { version = "1.2.1", features = [] } serde_json = "1.0" serde = { version = "1.0", features = ["derive"] } tauri = { version = "1.2.2", features = [] } +tauri-plugin-store = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "dev" } [features] # by default Tauri runs in production mode diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index e994ea4..9502de4 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -5,6 +5,7 @@ fn main() { tauri::Builder::default() + .plugin(tauri_plugin_store::Builder::default().build()) .run(tauri::generate_context!()) .expect("error while running tauri application"); }