Skip to content

Commit 63649d8

Browse files
authored
fix(core/acl): fix core:default schema generation (#10971)
* remove dbg! in resources test * use methods from `fs` and `env` qualified * share `ACL_MANIFESTS_FILE_NAME` and `CAPABILITIES_FILE_NAME` consts across crates * simplifiy `Manifest::new` code for better readability * move reading global api scripts logic next to the function that defines it * [tauri-build] move acl logic from lib.rs to acl.rs * use const value for schema instead of enum value with a single variant * remove unnecessary info from permissions hover * move related functions next to each other & improve readability of others * use methods from `fs` and `env` qualified * fix warning, unused return in test * document some functions * improve generated schema for better scope schema completion, simplify, reorganize and document the logic previously if you had `fs` and `http` plugins added in a project and then try to write an extended permission for `fs:allow-app-meta` ```json { "identifier": "fs:allow-app-meta", "allow": [ <here> ] } ``` and even though identifier is from `fs` plugin, the JSON schema suggests `path` and `url`. Now it will only suggest relevant field which is `path` * resolve permissions from other plugins, generate `core:default` as a normal set instead of special logic * move `PERMISSION_SCHEMAS_FOLDER_NAME` to acl module * use gneric trait because of MSRV * ensure `gen/schemas` dir is created * clippy
1 parent a1e88d2 commit 63649d8

File tree

18 files changed

+1097
-832
lines changed

18 files changed

+1097
-832
lines changed

.changes/core-default-schema.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"tauri": "patch:bug"
3+
---
4+
5+
Fix schema generation for `core:default` set.

0 commit comments

Comments
 (0)