Commit Graph

41 Commits

Author SHA1 Message Date
Lucas Nogueira 8a8bdcac23 rename createOrLoad to newOrExisting 2024-10-15 10:28:22 -03:00
Lucas Nogueira 028d6661ca reintroduce "get existing store" behavior for create_or_load 2024-10-15 09:52:56 -03:00
Lucas Nogueira ff9bddd95c make api consistent with the JS implementation, add examples 2024-10-15 08:06:27 -03:00
Lucas Nogueira 083c165543 rename createOrExistingStore to createOrLoad 2024-10-15 07:31:54 -03:00
Tony 1c401f7cb0 Fix wrong jsdoc param 2024-10-14 22:35:54 +08:00
Tony 230e6bbdf3 Apply suggestions from code review 2024-10-10 13:59:07 +08:00
Tony dc5be009b7 Add create or existing 2024-10-05 16:21:27 +08:00
Tony 7faf8c31e0 Differentiate json null from no value for events 2024-10-04 17:09:41 +08:00
Tony 831105d7a8 Use undefined for empty value in get 2024-10-04 10:11:13 +08:00
Tony 4f13a03401 Fix js get and close store 2024-10-03 20:10:15 +08:00
Tony 718f5dc90d Allow js to use pre-stored (de)serialize functions 2024-10-03 16:46:06 +08:00
Tony a3bef84382 more docs 2024-10-03 16:22:07 +08:00
Tony d22de0257d Use absolute path for store 2024-10-03 16:11:53 +08:00
Tony 45b2af4cfe Docs 2024-10-03 15:23:22 +08:00
Tony 42c5a1cb56 try get first 2024-10-03 13:56:43 +08:00
Tony 3acf66ee57 Revert "Add get-or-create-store"
This reverts commit 7ffd769240.
2024-10-03 13:53:59 +08:00
Tony 7ffd769240 Add get-or-create-store 2024-10-03 13:34:38 +08:00
Tony bbd34b16f4 Add init to lazy store 2024-10-03 11:48:19 +08:00
Tony 79bc8d08f4 Add lazy store 2024-10-03 10:52:12 +08:00
Tony 4cb9d8de5e Add close store 2024-10-03 10:09:43 +08:00
Tony 8975d10bb7 Clean up 2024-10-03 09:44:46 +08:00
Tony 35b439f70f Enable auto save by default 2024-10-02 18:19:31 +08:00
Tony 9811756e6c refactor(store): more reworks 2024-10-02 18:02:44 +08:00
Tony f12d35609a feat(store)!: fully rework and add auto save (#1550)
* Add auto save to store plugin

* Put jsdoc at constructor instead of class level

* Clippy

* Use enum instead of bool

* Some(AutoSaveMessage::Cancel) | None

* from_millis

* u64

* Add change file

* Rename to emit_on_change

* should use Duration in `with_store`

* Add breaking change notice to change file

* Emit change event for inserts by reset

* Update readme example

* Update example

* Remove extra line

* Make description clear it only works with managed

* Fix links in docstring

* Fix doc string closing

* get_mut

* Proof of concept

* fmt

* Load store on create

* cargo fmt

* Fix merge conflits

* Format

* small cleanup

* update docs, use `impl Into<JsonValue>`

* fix doctests, further simplification of api

* add store options

---------

Co-authored-by: Tillmann <28728469+tweidinger@users.noreply.github.com>
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2024-10-01 15:10:40 -03:00
Amr Bashir cf4d7d4e6c chore: adjust prettier config, .gitignore and use taplo to format toml files (#1728)
* chore: adjust prettier config, .gitignore and use taplo to format toml files

This brings the plugins-workspace repository to the same code style of the main tauri repo

* format toml

* ignore examples gen dir

* add .vscode/extensions.json

* remove packageManager field

* fmt

* fix audit

* taplo ignore permissions autogenerated files

* remove create dummy dist

* fix prettier workflow

* install fmt in prettier workflow

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2024-09-04 08:54:23 -03:00
renovate[bot] faa89850d0 chore(deps): replace dependency eslint-config-standard-with-typescript with eslint-config-love 43.1.0 (#1228)
* chore(deps): replace dependency eslint-config-standard-with-typescript with eslint-config-love 43.1.0

* actually apply the rules lol

* rebuild

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: FabianLars <fabianlars@fabianlars.de>
2024-04-23 00:40:51 +02:00
Lucas Fernandes Nogueira 2cf8faa3e1 chore(deps): update to tauri alpha.20, @tauri-apps/api alpha.13 (#839)
* chore(deps): update to tauri alpha.20, @tauri-apps/api alpha.13

* fix lockfile
2023-12-20 00:18:05 +02:00
Lucas Fernandes Nogueira 5c137365c6 chore: update to tauri alpha.16, api alpha.9 (#673)
Co-authored-by: Amr Bashir <amr.bashir2015@gmail.com>
2023-10-20 13:50:18 -03:00
Fabian-Lars aba07c27b8 Merge v1 into v2 (#468)
Co-authored-by: Fabian-Lars <fabianlars@fabianlars.de>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: FabianLars <fabianlars@fabianlars.de>
Co-authored-by: FabianLars <FabianLars@users.noreply.github.com>
Co-authored-by: Alexandre Dang <124160233+vdang-crabnebula@users.noreply.github.com>
Co-authored-by: Ludea <ludovicw35@hotmail.com>
Co-authored-by: Amr Bashir <amr.bashir2015@gmail.com>
Co-authored-by: Duke Jones <104690+dukejones@users.noreply.github.com>
Co-authored-by: NaokiM03 <37442712+NaokiM03@users.noreply.github.com>
Co-authored-by: Thibault <thibault_poisson@orange.fr>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: David Blythe <49919035+writeDavid@users.noreply.github.com>
Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
fix(stronghold): change wrong argument name for `remove` (#422)
fix(window-state): correctly set decoration state if no saved state exists, fixes #421 (#424)
fix(stronghold): return null if there is no record (#129)
fix(window-state): propagate promise (#435)
closes #432
fix(window-state): manual default implentation (#425)
fix(window-state): manual default implentation, closes #421
fix(deps): update rust crate iota-crypto to 0.21 (#438)
fix readme example (#447)
fix: handle recursive directory correctly (#455)
fix(deps): update rust crate sqlx to 0.7. plugin-sql msrv is now 1.65 (#464)
fix(persisted-scope): separately save asset protocol patterns (#459)
fix(deps): update rust crate iota-crypto to 0.22 (#475)
fix(deps): update tauri monorepo to v1.4.0 (#482)
resolve to v15.1.0 (#489)
fix(deps): update rust crate iota-crypto to 0.23 (#495)
2023-07-19 14:50:43 -03:00
Lucas Fernandes Nogueira 9bf98f68e7 chore(api): update @since tag to 2.0.0 (#395) 2023-05-23 23:44:05 -03:00
Lucas Fernandes Nogueira b131bc8f7c feat(plugins): inject API on window.__TAURI__ (#383) 2023-05-23 14:20:14 -03:00
Lucas Fernandes Nogueira 5914fb9f36 chore: add license headers (#384)
* feat: check for license headers

* add headers

* format
2023-05-21 16:56:10 -03:00
Fabian-Lars 9b70a79b2c fix(store): Use event module instead of appWindow, fixes #282 (#283)
* fix(store): Use event module instead of appWindow, fixes #282

* fmt
2023-03-15 18:22:19 +01:00
Jonas Kruckenberg 4cced94332 chore: move package.json to plugin root 2023-01-05 17:06:00 +01:00
Jonas Kruckenberg 2ed0742b86 remove dist dirs from git 2023-01-05 13:48:04 +01:00
Jonas Kruckenberg 0060e06ee1 Merge branch 'dev' into sync-prs/store 2022-12-18 17:34:23 +01:00
Jonas Kruckenberg 063a3cfd54 enable type declarations 2022-12-18 17:05:10 +01:00
FabianLars 3025a0d1ac rebuild dist 2022-12-15 17:00:10 +01:00
FabianLars 16c955e8a5 fix(store): fix typings
Co-authored-by: Nelson Truran <nelson@truran.dev>
Co-authored-by: dkzlv <dkzlv@pm.me>
2022-12-15 16:50:52 +01:00
Jonas Kruckenberg 56eabd8b4f update package json 2022-12-14 19:10:46 +01:00
Jonas Kruckenberg eb3495fb72 copy plugin sources 2022-12-14 18:43:39 +01:00