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>
This commit is contained in:
Amr Bashir
2024-09-04 14:54:23 +03:00
committed by GitHub
parent 72c2ce82c1
commit cf4d7d4e6c
227 changed files with 2534 additions and 2505 deletions
-1
View File
@@ -1 +0,0 @@
node_modules
+3 -3
View File
@@ -10,11 +10,11 @@ repository = { workspace = true }
links = "tauri-plugin-fs"
[package.metadata.docs.rs]
rustc-args = [ "--cfg", "docsrs" ]
rustdoc-args = [ "--cfg", "docsrs" ]
rustc-args = ["--cfg", "docsrs"]
rustdoc-args = ["--cfg", "docsrs"]
[build-dependencies]
tauri-plugin = { workspace = true, features = [ "build" ] }
tauri-plugin = { workspace = true, features = ["build"] }
schemars = { workspace = true }
serde = { workspace = true }
+2 -2
View File
@@ -60,9 +60,9 @@ fn main() {
Afterwards all the plugin's APIs are available through the JavaScript guest bindings:
```javascript
import { metadata } from "@tauri-apps/plugin-fs";
import { metadata } from '@tauri-apps/plugin-fs'
await metadata("/path/to/file");
await metadata('/path/to/file')
```
## Contributing
-2
View File
@@ -36,7 +36,6 @@ the restrictions imposed by the scope.
The scope is defined at compile time in the used permissions but the user or application developer can grant or revoke access to specific files or folders at runtime by modifying the scope state through the runtime authority, if configured during plugin initialization.
### Security Assumptions
- The filesystem access is limited by user permissions
@@ -44,7 +43,6 @@ The scope is defined at compile time in the used permissions but the user or app
- The scoping mechanism of the Tauri `fs` commands work as intended and has no bypasses
- The user or application developer can grant or revoke access to specific files at runtime by modifying the scope
#### Out Of Scope
- Exploits in underlying filesystems
File diff suppressed because it is too large Load Diff
@@ -20,4 +20,4 @@ path = "$APPLOCALDATA"
path = "$APPCACHE"
[[permission.scope.allow]]
path = "$APPLOG"
path = "$APPLOG"
+3 -3
View File
@@ -28,7 +28,7 @@ On Windows the webview data folder access is denied.
"""
permissions = [
"create-app-specific-dirs",
"read-app-specific-dirs-recursive",
"deny-default",
"create-app-specific-dirs",
"read-app-specific-dirs-recursive",
"deny-default",
]
+14 -14
View File
@@ -4,18 +4,18 @@
identifier = "read-all"
description = "This enables all read related commands without any pre-configured accessible paths."
commands.allow = [
"read_dir",
"read_file",
"read",
"open",
"read_text_file",
"read_text_file_lines",
"read_text_file_lines_next",
"seek",
"stat",
"lstat",
"fstat",
"exists",
"watch",
"unwatch",
"read_dir",
"read_file",
"read",
"open",
"read_text_file",
"read_text_file_lines",
"read_text_file_lines_next",
"seek",
"stat",
"lstat",
"fstat",
"exists",
"watch",
"unwatch",
]
@@ -7,12 +7,12 @@ This permission allows recursive read functionality on the application
specific base directories.
"""
commands.allow = [
"read_dir",
"read_file",
"read_text_file",
"read_text_file_lines",
"read_text_file_lines_next",
"exists",
"read_dir",
"read_file",
"read_text_file",
"read_text_file_lines",
"read_text_file_lines_next",
"exists",
]
[[permission.scope.allow]]
@@ -28,4 +28,4 @@ path = "$APPLOCALDATA/**"
path = "$APPCACHE/**"
[[permission.scope.allow]]
path = "$APPLOG/**"
path = "$APPLOG/**"
+11 -11
View File
@@ -4,16 +4,16 @@
identifier = "read-files"
description = "This enables file read related commands without any pre-configured accessible paths."
commands.allow = [
"read_file",
"read",
"open",
"read_text_file",
"read_text_file_lines",
"read_text_file_lines_next",
"seek",
"stat",
"lstat",
"fstat",
"exists",
"read_file",
"read",
"open",
"read_text_file",
"read_text_file_lines",
"read_text_file_lines_next",
"seek",
"stat",
"lstat",
"fstat",
"exists",
]
+10 -10
View File
@@ -4,14 +4,14 @@
identifier = "write-all"
description = "This enables all write related commands without any pre-configured accessible paths."
commands.allow = [
"mkdir",
"create",
"copy_file",
"remove",
"rename",
"truncate",
"ftruncate",
"write",
"write_file",
"write_text_file",
"mkdir",
"create",
"copy_file",
"remove",
"rename",
"truncate",
"ftruncate",
"write",
"write_file",
"write_text_file",
]
+9 -9
View File
@@ -4,13 +4,13 @@
identifier = "write-files"
description = "This enables all file write related commands without any pre-configured accessible paths."
commands.allow = [
"create",
"copy_file",
"remove",
"rename",
"truncate",
"ftruncate",
"write",
"write_file",
"write_text_file",
"create",
"copy_file",
"remove",
"rename",
"truncate",
"ftruncate",
"write",
"write_file",
"write_text_file",
]
+2 -2
View File
@@ -2,6 +2,6 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
import { createConfig } from "../../shared/rollup.config.js";
import { createConfig } from '../../shared/rollup.config.js'
export default createConfig();
export default createConfig()