-
Notifications
You must be signed in to change notification settings - Fork 286
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <[email protected]> Co-authored-by: Lucas Nogueira <[email protected]>
- Loading branch information
1 parent
44273b9
commit f12d356
Showing
16 changed files
with
603 additions
and
363 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"store-js": patch | ||
--- | ||
|
||
**Breaking change**: Removed the `Store` constructor and added the `createStore` API. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
"store": patch | ||
--- | ||
|
||
Add a setting `auto_save` to enable a store to debounce save on modification (on calls like set, clear, delete, reset) | ||
|
||
**Breaking change**: Removed the `with_store` API and added `StoreExt::store_builder`. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
plugins/store/permissions/autogenerated/commands/create_store.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Automatically generated - DO NOT EDIT! | ||
|
||
"$schema" = "../../schemas/schema.json" | ||
|
||
[[permission]] | ||
identifier = "allow-create-store" | ||
description = "Enables the create_store command without any pre-configured scope." | ||
commands.allow = ["create_store"] | ||
|
||
[[permission]] | ||
identifier = "deny-create-store" | ||
description = "Denies the create_store command without any pre-configured scope." | ||
commands.deny = ["create_store"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.