mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-04-23 11:36:13 +02:00
8c67d44aef
* refactor(store): more reworks * Enable auto save by default * Store to resource table by default * Remove share store * Clean up * Add close store * Add store function * Add lazy store * Add init to lazy store * refresh cache in example * Add get-or-create-store * Revert "Add get-or-create-store" This reverts commit7ffd769240. * try get first * Docs * Use absolute path for store * more docs * Allow js to use pre-stored (de)serialize functions * Fix js get and close store * Show case how to use pretty json * Update readme * Use store instead of `store_builder` in example * Build * Fix example * More docs for StoreBuilder::build * Add default (de)serialize fn * Use pretty json by default * Use `undefined` for empty value in get * Change files * Differentiate json null from no value for events * Add create or existing * Build * Rename inner store's inset method to set * Update readme * Apply suggestions from code review * Use close instead * Update breaking changes * Return result in resolve_store_path * Change to close_resource and take &self * Clean up * Apply suggestions from code review Co-authored-by: Amr Bashir <amr.bashir2015@gmail.com> * Remove unused pub(crate) * Update change file * Expose resolve_store_path * Remove with_store * Remove StoreInner from pub and expose is_empty * Fix wrong jsdoc param * Update readme * rename createOrExistingStore to createOrLoad * make api consistent with the JS implementation, add examples * fmt * reintroduce "get existing store" behavior for create_or_load * rename createOrLoad to newOrExisting * keep store lock throughout whole new_or_existing_inner * Remove load * Missed if load * Don't make StoreState public * Remove R: Runtime from Builder * rename newOrExisting to load, load to reload * update docs * rename missing reload fn * rename builder fn to build() * fix default permission * Fix description and create_new logic * Clippy * Update docs * Update docs * remove create_store command * remove close_store command since we extend from Resource * Revert "remove close_store command since we extend from Resource" This reverts commit4a29fc8990. * Reapply "remove close_store command since we extend from Resource" This reverts commit70a1830e7d. --------- Co-authored-by: Amr Bashir <amr.bashir2015@gmail.com> Co-authored-by: Lucas Nogueira <lucas@tauri.app>
85 lines
1.9 KiB
JSON
85 lines
1.9 KiB
JSON
{
|
|
"$schema": "../gen/schemas/desktop-schema.json",
|
|
"identifier": "run-app-base",
|
|
"description": "Base permissions to run the app",
|
|
"windows": ["main"],
|
|
"permissions": [
|
|
"log:default",
|
|
{
|
|
"identifier": "http:default",
|
|
"allow": [
|
|
"https://tauri.app",
|
|
{
|
|
"url": "http://localhost:3003"
|
|
}
|
|
]
|
|
},
|
|
"core:default",
|
|
"fs:default",
|
|
"core:window:allow-minimize",
|
|
"core:window:allow-maximize",
|
|
"core:window:allow-unmaximize",
|
|
"core:window:allow-close",
|
|
"core:window:allow-start-dragging",
|
|
"notification:default",
|
|
"os:allow-platform",
|
|
"dialog:allow-open",
|
|
"dialog:allow-ask",
|
|
"dialog:allow-save",
|
|
"dialog:allow-confirm",
|
|
"dialog:allow-message",
|
|
{
|
|
"identifier": "shell:allow-spawn",
|
|
"allow": [
|
|
{
|
|
"name": "sh",
|
|
"cmd": "sh",
|
|
"args": [
|
|
"-c",
|
|
{
|
|
"validator": ".+"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "cmd",
|
|
"cmd": "cmd",
|
|
"args": [
|
|
"/C",
|
|
{
|
|
"validator": ".+"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"shell:allow-kill",
|
|
"shell:allow-stdin-write",
|
|
"process:allow-exit",
|
|
"process:allow-restart",
|
|
"clipboard-manager:allow-read-text",
|
|
"clipboard-manager:allow-write-text",
|
|
"clipboard-manager:allow-read-image",
|
|
"clipboard-manager:allow-write-image",
|
|
"fs:allow-open",
|
|
"fs:allow-write",
|
|
"fs:allow-read",
|
|
"fs:allow-rename",
|
|
"fs:allow-mkdir",
|
|
"fs:allow-remove",
|
|
"fs:allow-write-text-file",
|
|
"fs:scope-download-recursive",
|
|
"fs:scope-resource-recursive",
|
|
{
|
|
"identifier": "fs:scope-appdata-recursive",
|
|
"allow": [
|
|
{
|
|
"path": "$APPDATA/db/**"
|
|
}
|
|
],
|
|
"deny": ["$APPDATA/db/*.stronghold"]
|
|
},
|
|
"store:default"
|
|
]
|
|
}
|