From 285451fe4393b8a305677117bc729807640aa66a Mon Sep 17 00:00:00 2001 From: Nikola Hristov Date: Tue, 8 Oct 2024 15:10:02 +0300 Subject: [PATCH] --- CHANGELOG.md | 181 ------------------ README.md | 100 ---------- SECURITY.md | 49 ----- {src => Source}/commands.rs | 0 {src => Source}/config.rs | 0 {src => Source}/desktop.rs | 0 {src => Source}/error.rs | 0 {src => Source}/file_path.rs | 0 {src => Source}/lib.rs | 0 {src => Source}/mobile.rs | 0 {src => Source}/models.rs | 0 {src => Source}/scope.rs | 0 {src => Source}/watcher.rs | 0 .../java/ExampleInstrumentedTest.kt | 0 .../{src => Source}/main/AndroidManifest.xml | 0 android/{src => Source}/main/java/FsPlugin.kt | 0 android/src/test/java/ExampleUnitTest.kt | 21 -- package.json | 52 +++-- 18 files changed, 24 insertions(+), 379 deletions(-) delete mode 100644 CHANGELOG.md delete mode 100644 README.md delete mode 100644 SECURITY.md rename {src => Source}/commands.rs (100%) rename {src => Source}/config.rs (100%) rename {src => Source}/desktop.rs (100%) rename {src => Source}/error.rs (100%) rename {src => Source}/file_path.rs (100%) rename {src => Source}/lib.rs (100%) rename {src => Source}/mobile.rs (100%) rename {src => Source}/models.rs (100%) rename {src => Source}/scope.rs (100%) rename {src => Source}/watcher.rs (100%) rename android/{src => Source}/androidTest/java/ExampleInstrumentedTest.kt (100%) rename android/{src => Source}/main/AndroidManifest.xml (100%) rename android/{src => Source}/main/java/FsPlugin.kt (100%) delete mode 100644 android/src/test/java/ExampleUnitTest.kt diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 41e6411..0000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,181 +0,0 @@ -# Changelog - -## \[2.0.1] - -- [`a1a82208`](https://github.com/tauri-apps/plugins-workspace/commit/a1a82208ed4ab87f83310be0dc95428aec9ab241) ([#1873](https://github.com/tauri-apps/plugins-workspace/pull/1873) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Downgrade MSRV to 1.77.2 to support Windows 7. - -## \[2.0.0] - -- [`e2c4dfb6`](https://github.com/tauri-apps/plugins-workspace/commit/e2c4dfb6af43e5dd8d9ceba232c315f5febd55c1) Update to tauri v2 stable release. - -## \[2.0.0-rc.6] - -- [`fc9b189e`](https://github.com/tauri-apps/plugins-workspace/commit/fc9b189e83a29bd750714ec6336133c6eabdfa20) ([#1837](https://github.com/tauri-apps/plugins-workspace/pull/1837) by [@FabianLars](https://github.com/tauri-apps/plugins-workspace/../../FabianLars)) Fix failing to deserialize capability file when using an OS specific path in the scope that is not available on the current OS. - -## \[2.0.0-rc.5] - -- [`cc03ccf5`](https://github.com/tauri-apps/plugins-workspace/commit/cc03ccf5e0e4be8bbf50bbdebe957c84be7f779b) ([#1774](https://github.com/tauri-apps/plugins-workspace/pull/1774)) Fix `scope-app`, `scope-app-recursive` and `scope-index` not properly enabling the application paths. - -## \[2.0.0-rc.4] - -- [`9291e4d2`](https://github.com/tauri-apps/plugins-workspace/commit/9291e4d2caa31c883c71e55f2193bd8754d72f03) ([#1640](https://github.com/tauri-apps/plugins-workspace/pull/1640) by [@SRutile](https://github.com/tauri-apps/plugins-workspace/../../SRutile)) Support any UTF-8 character in the writeFile API. - -## \[2.0.0-rc.3] - -- [`a2fe5551`](https://github.com/tauri-apps/plugins-workspace/commit/a2fe55512f908dd11c814ce021d164f01677572a) ([#1727](https://github.com/tauri-apps/plugins-workspace/pull/1727) by [@amrbashir](https://github.com/tauri-apps/plugins-workspace/../../amrbashir)) Add utility methods on `FilePath` and `SafeFilePath` enums which are: - - - `path` - - `simplified` - - `into_path` -- [`a2fe5551`](https://github.com/tauri-apps/plugins-workspace/commit/a2fe55512f908dd11c814ce021d164f01677572a) ([#1727](https://github.com/tauri-apps/plugins-workspace/pull/1727) by [@amrbashir](https://github.com/tauri-apps/plugins-workspace/../../amrbashir)) Implement `Serialize`, `Deserialize`, `From`, `TryFrom` and `FromStr` traits for `FilePath` and `SafeFilePath` enums. -- [`a2fe5551`](https://github.com/tauri-apps/plugins-workspace/commit/a2fe55512f908dd11c814ce021d164f01677572a) ([#1727](https://github.com/tauri-apps/plugins-workspace/pull/1727) by [@amrbashir](https://github.com/tauri-apps/plugins-workspace/../../amrbashir)) Mark `Error` enum as `#[non_exhuastive]`. -- [`a2fe5551`](https://github.com/tauri-apps/plugins-workspace/commit/a2fe55512f908dd11c814ce021d164f01677572a) ([#1727](https://github.com/tauri-apps/plugins-workspace/pull/1727) by [@amrbashir](https://github.com/tauri-apps/plugins-workspace/../../amrbashir)) Add `SafeFilePath` enum. - -## \[2.0.0-rc.2] - -- [`f7280c88`](https://github.com/tauri-apps/plugins-workspace/commit/f7280c88309cdf1f2330574fec31e26e01e9cdbd) ([#1710](https://github.com/tauri-apps/plugins-workspace/pull/1710) by [@Legend-Master](https://github.com/tauri-apps/plugins-workspace/../../Legend-Master)) Fix can't use Windows paths like `C:/Users/UserName/file.txt` - -### bug - -- [`51819c60`](https://github.com/tauri-apps/plugins-workspace/commit/51819c601f863cbfbd11809a1c4cf9df5a20b1e0) ([#1708](https://github.com/tauri-apps/plugins-workspace/pull/1708) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Fixes `writeFile` command implementation on Android. - -## \[2.0.0-rc.2] - -- [`e2e97db5`](https://github.com/tauri-apps/plugins-workspace/commit/e2e97db51983267f5be84d4f6f0278d58834d1f5) ([#1701](https://github.com/tauri-apps/plugins-workspace/pull/1701) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Update to tauri 2.0.0-rc.8 - -## \[2.0.0-rc.1] - -- [`5f689902`](https://github.com/tauri-apps/plugins-workspace/commit/5f68990297f2cefac4220649a469adb7fa94fe1b) ([#1645](https://github.com/tauri-apps/plugins-workspace/pull/1645) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Update documentation. - -## \[2.0.0-rc.0] - -- [`9887d1`](https://github.com/tauri-apps/plugins-workspace/commit/9887d14bd0e971c4c0f5c1188fc4005d3fc2e29e) Update to tauri RC. - -## \[2.0.0-beta.8] - -- [`99d6ac0f`](https://github.com/tauri-apps/plugins-workspace/commit/99d6ac0f9506a6a4a1aa59c728157190a7441af6) ([#1606](https://github.com/tauri-apps/plugins-workspace/pull/1606) by [@FabianLars](https://github.com/tauri-apps/plugins-workspace/../../FabianLars)) The JS packages now specify the *minimum* `@tauri-apps/api` version instead of a single exact version. -- [`6de87966`](https://github.com/tauri-apps/plugins-workspace/commit/6de87966ecc00ad9d91c25be452f1f46bd2b7e1f) ([#1597](https://github.com/tauri-apps/plugins-workspace/pull/1597) by [@Legend-Master](https://github.com/tauri-apps/plugins-workspace/../../Legend-Master)) Update to tauri beta.25. - -## \[2.0.0-beta.7] - -- [`22a17980`](https://github.com/tauri-apps/plugins-workspace/commit/22a17980ff4f6f8c40adb1b8f4ffc6dae2fe7e30) ([#1537](https://github.com/tauri-apps/plugins-workspace/pull/1537) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Update to tauri beta.24. - -## \[2.0.0-beta.6] - -- [`76daee7a`](https://github.com/tauri-apps/plugins-workspace/commit/76daee7aafece34de3092c86e531cf9eb1138989) ([#1512](https://github.com/tauri-apps/plugins-workspace/pull/1512) by [@renovate](https://github.com/tauri-apps/plugins-workspace/../../renovate)) Update to tauri beta.23. - -## \[2.0.0-beta.5] - -- [`9013854f`](https://github.com/tauri-apps/plugins-workspace/commit/9013854f42a49a230b9dbb9d02774765528a923f)([#1382](https://github.com/tauri-apps/plugins-workspace/pull/1382)) Update to tauri beta.22. - -## \[2.0.0-beta.4] - -- [`430bd6f4`](https://github.com/tauri-apps/plugins-workspace/commit/430bd6f4f379bee5d232ae6b098ae131db7f178a)([#1363](https://github.com/tauri-apps/plugins-workspace/pull/1363)) Update to tauri beta.20. - -## \[2.0.0-beta.3] - -- [`bd1ed590`](https://github.com/tauri-apps/plugins-workspace/commit/bd1ed5903ffcce5500310dac1e59e8c67674ef1e)([#1237](https://github.com/tauri-apps/plugins-workspace/pull/1237)) Update to tauri beta.17. - -## \[2.0.0-beta.6] - -- [`b115fd22`](https://github.com/tauri-apps/plugins-workspace/commit/b115fd22e0da073f5d758c13474ec2106cf78163)([#1221](https://github.com/tauri-apps/plugins-workspace/pull/1221)) Fixes an issue that caused the app to freeze when the `dialog`, `fs`, and `persisted-scope` plugins were used together. - -## \[2.0.0-beta.5] - -- [`bb51a41`](https://github.com/tauri-apps/plugins-workspace/commit/bb51a41d67ebf989e8aedf10c4b1a7f9514d1bdf)([#1168](https://github.com/tauri-apps/plugins-workspace/pull/1168)) **Breaking Change:** All apis that return paths to the frontend will now remove the `\\?\` UNC prefix on Windows. -- [`e3d41f4`](https://github.com/tauri-apps/plugins-workspace/commit/e3d41f4011bd3ea3ce281bb38bbe31d3709f8e0f)([#1191](https://github.com/tauri-apps/plugins-workspace/pull/1191)) Internally use the webview scoped resources table instead of the app one, so other webviews can't access other webviews resources. -- [`e3d41f4`](https://github.com/tauri-apps/plugins-workspace/commit/e3d41f4011bd3ea3ce281bb38bbe31d3709f8e0f)([#1191](https://github.com/tauri-apps/plugins-workspace/pull/1191)) Update for tauri 2.0.0-beta.15. - -## \[2.0.0-beta.4] - -- [`9c2fb93`](https://github.com/tauri-apps/plugins-workspace/commit/9c2fb9306ecd3936a2aef56b3c012899036db098) Enhance the scope type to also allow a plain string representing the path to allow or deny. -- [`772f2bc`](https://github.com/tauri-apps/plugins-workspace/commit/772f2bc3495a4f83f1c3e538cbac6d29cbd7d5ef)([#1136](https://github.com/tauri-apps/plugins-workspace/pull/1136)) Update for tauri 2.0.0-beta.14. - -## \[2.0.0-beta.3] - -- [`cb96aa0`](https://github.com/tauri-apps/plugins-workspace/commit/cb96aa06277f7b864952827ec9fb1e74c8a1f761)([#1082](https://github.com/tauri-apps/plugins-workspace/pull/1082)) Fixes `watch` and `watchImmediate` which previously ignored the `baseDir` parameter. -- [`a04ea2f`](https://github.com/tauri-apps/plugins-workspace/commit/a04ea2f38294d5a3987578283badc8eec87a7752)([#1071](https://github.com/tauri-apps/plugins-workspace/pull/1071)) The global API script is now only added to the binary when the `withGlobalTauri` config is true. - -## \[2.0.0-beta.2] - -- [`7358102`](https://github.com/tauri-apps/plugins-workspace/commit/735810237e21504a027a65a7b3c25fd7e594288a)([#1029](https://github.com/tauri-apps/plugins-workspace/pull/1029)) Fix infinite loop on cargo build operations -- [`99bea25`](https://github.com/tauri-apps/plugins-workspace/commit/99bea2559c2c0648c2519c50a18cd124dacef57b)([#1005](https://github.com/tauri-apps/plugins-workspace/pull/1005)) Update to tauri beta.8. - -## \[2.0.0-beta.1] - -- [`569defb`](https://github.com/tauri-apps/plugins-workspace/commit/569defbe9492e38938554bb7bdc1be9151456d21) Update to tauri beta.4. - -## \[2.0.0-beta.0] - -- [`d198c01`](https://github.com/tauri-apps/plugins-workspace/commit/d198c014863ee260cb0de88a14b7fc4356ef7474)([#862](https://github.com/tauri-apps/plugins-workspace/pull/862)) Update to tauri beta. -- [`ea8eadc`](https://github.com/tauri-apps/plugins-workspace/commit/ea8eadce85b2e3e8eb7eb1a779fc3aa6c1201fa3)([#865](https://github.com/tauri-apps/plugins-workspace/pull/865)) Fix incorrect `create` option default value for `writeFile` and `writeTextFile` which didn't match documentation. -- [`61edbbe`](https://github.com/tauri-apps/plugins-workspace/commit/61edbbec0acda4213ed8684f75a973e8be123a52)([#885](https://github.com/tauri-apps/plugins-workspace/pull/885)) Replace `notify-debouncer-mini` with `notify-debouncer-full`. [(plugins-workspace#885)](https://github.com/tauri-apps/plugins-workspace/pull/885) - -## \[2.0.0-alpha.6] - -- [`85f8419`](https://github.com/tauri-apps/plugins-workspace/commit/85f841968200316958d707db0c39bb115f762471)([#848](https://github.com/tauri-apps/plugins-workspace/pull/848)) Fix `DebouncedEvent` type to correctly represent the actual type. -- [`c601230`](https://github.com/tauri-apps/plugins-workspace/commit/c60123093ddf725af7228494182fed697ff8b021)([#847](https://github.com/tauri-apps/plugins-workspace/pull/847)) Add `createNew` option for `writeFile` and `writeTextFile` to create the file if doesn't exist and fail if it does. -- [`c601230`](https://github.com/tauri-apps/plugins-workspace/commit/c60123093ddf725af7228494182fed697ff8b021)([#847](https://github.com/tauri-apps/plugins-workspace/pull/847)) Truncate files when using `writeFile` and `writeTextFile` with `append: false`. -- [`2e2fc8d`](https://github.com/tauri-apps/plugins-workspace/commit/2e2fc8de69dd8d282b66ec81561d57d8af802dc5)([#857](https://github.com/tauri-apps/plugins-workspace/pull/857)) Fix `invalid args id for command unwatch` error when trying to unwatch a previously watched file or directory. -- [`c601230`](https://github.com/tauri-apps/plugins-workspace/commit/c60123093ddf725af7228494182fed697ff8b021)([#847](https://github.com/tauri-apps/plugins-workspace/pull/847)) Fix panic when using `writeFile` or `writeTextFile` without passing an option object. - -## \[2.0.0-alpha.5] - -- [`387c2f9`](https://github.com/tauri-apps/plugins-workspace/commit/387c2f9e0ce4c75c07ffa3fd76391a25b58f5daf)([#802](https://github.com/tauri-apps/plugins-workspace/pull/802)) Update to @tauri-apps/api v2.0.0-alpha.13. -- [`69a1fa0`](https://github.com/tauri-apps/plugins-workspace/commit/69a1fa099c3143b6e426492f1c9d9cfbe56d2209)([#751](https://github.com/tauri-apps/plugins-workspace/pull/751)) The `fs` plugin received a major overhaul to add new APIs and changed existing APIs to be closer to Node.js and Deno APIs. - -## \[2.0.0-alpha.4] - -- [`387c2f9`](https://github.com/tauri-apps/plugins-workspace/commit/387c2f9e0ce4c75c07ffa3fd76391a25b58f5daf)([#802](https://github.com/tauri-apps/plugins-workspace/pull/802)) Update to @tauri-apps/api v2.0.0-alpha.12. -- [`88d260d`](https://github.com/tauri-apps/plugins-workspace/commit/88d260d90130f9df4b9ce00c1ad1bf1e4b30b1c0)([#744](https://github.com/tauri-apps/plugins-workspace/pull/744)) Add second argument to `exists` function to specify base directory. - -## \[2.0.0-alpha.3] - -- [`e438e0a`](https://github.com/tauri-apps/plugins-workspace/commit/e438e0a62d4b430a5159f05f13ecd397dd891a0d)([#676](https://github.com/tauri-apps/plugins-workspace/pull/676)) Update to @tauri-apps/api v2.0.0-alpha.11. - -## \[2.0.0-alpha.2] - -- [`5c13736`](https://github.com/tauri-apps/plugins-workspace/commit/5c137365c60790e8d4037d449e8237aa3fffdab0)([#673](https://github.com/tauri-apps/plugins-workspace/pull/673)) Update to @tauri-apps/api v2.0.0-alpha.9. - -## \[2.0.0-alpha.2] - -- [`4e2cef9`](https://github.com/tauri-apps/plugins-workspace/commit/4e2cef9b702bbbb9cf4ee17de50791cb21f1b2a4)([#593](https://github.com/tauri-apps/plugins-workspace/pull/593)) Update to alpha.12. - -## \[2.0.0-alpha.1] - -- [`0bba693`](https://github.com/tauri-apps/plugins-workspace/commit/0bba6932c09da5267a9dbf75ba52252e39458420)([#454](https://github.com/tauri-apps/plugins-workspace/pull/454)) Fix `writeBinaryFile` crashing with `command 'write_binary_file' not found` -- [`d74fc0a`](https://github.com/tauri-apps/plugins-workspace/commit/d74fc0a097996e90a37be8f57d50b7d1f6ca616f)([#555](https://github.com/tauri-apps/plugins-workspace/pull/555)) Update to alpha.11. - -## \[2.0.0-alpha.0] - -- [`717ae67`](https://github.com/tauri-apps/plugins-workspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! - /pull/454)) Fix `writeBinaryFile` crashing with `command 'write_binary_file' not found` -- [`d74fc0a`](https://github.com/tauri-apps/plugins-workspace/commit/d74fc0a097996e90a37be8f57d50b7d1f6ca616f)([#555](https://github.com/tauri-apps/plugins-workspace/pull/555)) Update to alpha.11. - -## \[2.0.0-alpha.0] - -- [`717ae67`](https://github.com/tauri-apps/plugins-workspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! - ae67\`]\(https://github.com/tauri-apps/plugins-workspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! - 717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! - .com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! - 717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! - ac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! - .com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! - 717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! - s/plugins-workspace/pull/371)) First v2 alpha release! - ac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! - .com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! - 717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! - kspace/pull/371)) First v2 alpha release! - s/plugins-workspace/pull/371)) First v2 alpha release! - ac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! - .com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! - 717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! - uri-apps/plugins-workspace/pull/371)) First v2 alpha release! - .com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! - 717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! - kspace/pull/371)) First v2 alpha release! - s/plugins-workspace/pull/371)) First v2 alpha release! - ac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! - .com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! - 717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release! diff --git a/README.md b/README.md deleted file mode 100644 index af5c63a..0000000 --- a/README.md +++ /dev/null @@ -1,100 +0,0 @@ -![plugin-fs](https://github.com/tauri-apps/plugins-workspace/raw/v2/plugins/fs/banner.png) - -Access the file system. - -| Platform | Supported | -| -------- | --------- | -| Linux | ✓ | -| Windows | ✓ | -| macOS | ✓ | -| Android | ✓ | -| iOS | ✓ | - -## Install - -_This plugin requires a Rust version of at least **1.77.2**_ - -There are three general methods of installation that we can recommend. - -1. Use crates.io and npm (easiest, and requires you to trust that our publishing pipeline worked) -2. Pull sources directly from Github using git tags / revision hashes (most secure) -3. Git submodule install this repo in your tauri project and then use file protocol to ingest the source (most secure, but inconvenient to use) - -Install the Core plugin by adding the following to your `Cargo.toml` file: - -`src-tauri/Cargo.toml` - -```toml -[dependencies] -tauri-plugin-fs = "2.0.0" -# alternatively with Git: -tauri-plugin-fs = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" } -``` - -You can install the JavaScript Guest bindings using your preferred JavaScript package manager: - -> Note: Since most JavaScript package managers are unable to install packages from git monorepos we provide read-only mirrors of each plugin. This makes installation option 2 more ergonomic to use. - -```sh -pnpm add @tauri-apps/plugin-fs -# or -npm add @tauri-apps/plugin-fs -# or -yarn add @tauri-apps/plugin-fs - -# alternatively with Git: -pnpm add https://github.com/tauri-apps/tauri-plugin-fs#v2 -# or -npm add https://github.com/tauri-apps/tauri-plugin-fs#v2 -# or -yarn add https://github.com/tauri-apps/tauri-plugin-fs#v2 -``` - -## Usage - -First you need to register the core plugin with Tauri: - -`src-tauri/src/main.rs` - -```rust -fn main() { - tauri::Builder::default() - .plugin(tauri_plugin_fs::init()) - .run(tauri::generate_context!()) - .expect("error while running tauri application"); -} -``` - -Afterwards all the plugin's APIs are available through the JavaScript guest bindings: - -```javascript -import { metadata } from '@tauri-apps/plugin-fs' - -await metadata('/path/to/file') -``` - -## Contributing - -PRs accepted. Please make sure to read the Contributing Guide before making a pull request. - -## Partners - - - - - - - -
- - CrabNebula - -
- -For the complete list of sponsors please visit our [website](https://tauri.app#sponsors) and [Open Collective](https://opencollective.com/tauri). - -## License - -Code: (c) 2015 - Present - The Tauri Programme within The Commons Conservancy. - -MIT or MIT/Apache 2.0 where applicable. diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 838ed67..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,49 +0,0 @@ -# Security Policy - -**Do not report security vulnerabilities through public GitHub issues.** - -**Please use the [Private Vulnerability Disclosure](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability#privately-reporting-a-security-vulnerability) feature of GitHub.** - -Include as much of the following information: - -- Type of issue (e.g. improper input parsing, privilege escalation, etc.) -- The location of the affected source code (tag/branch/commit or direct URL) -- Any special configuration required to reproduce the issue -- The distribution affected or used to help us with reproduction of the issue -- Step-by-step instructions to reproduce the issue -- Ideally a reproduction repository -- Impact of the issue, including how an attacker might exploit the issue - -We prefer to receive reports in English. - -## Contact - -Please disclose a vulnerability or security relevant issue here: [https://github.com/tauri-apps/plugins-workspace/security/advisories/new](https://github.com/tauri-apps/plugins-workspace/security/advisories/new). - -Alternatively, you can also contact us by email via [security@tauri.app](mailto:security@tauri.app). - -## Threat Model - -This plugin possibly allows access to the full filesystem available to the application process. -Depending on the operating system the access is already confined (android/ios) to only certain locations. -In other operating systems like Linux/MacOS/Windows it depends on the installation and packaging method but in most cases full -access is granted. - -To prevent exposure of sensitive locations and data this plugin can be scoped to only allow certain base directories -or only access to specific files or subdirectories. -This scoping effectively affects only calls made from the webviews/frontend code and calls made from rust can always circumvent -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 -- The operating system filesystem access confinment works as documented -- 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 -- Exploits in the underlying rust `std::fs` library diff --git a/src/commands.rs b/Source/commands.rs similarity index 100% rename from src/commands.rs rename to Source/commands.rs diff --git a/src/config.rs b/Source/config.rs similarity index 100% rename from src/config.rs rename to Source/config.rs diff --git a/src/desktop.rs b/Source/desktop.rs similarity index 100% rename from src/desktop.rs rename to Source/desktop.rs diff --git a/src/error.rs b/Source/error.rs similarity index 100% rename from src/error.rs rename to Source/error.rs diff --git a/src/file_path.rs b/Source/file_path.rs similarity index 100% rename from src/file_path.rs rename to Source/file_path.rs diff --git a/src/lib.rs b/Source/lib.rs similarity index 100% rename from src/lib.rs rename to Source/lib.rs diff --git a/src/mobile.rs b/Source/mobile.rs similarity index 100% rename from src/mobile.rs rename to Source/mobile.rs diff --git a/src/models.rs b/Source/models.rs similarity index 100% rename from src/models.rs rename to Source/models.rs diff --git a/src/scope.rs b/Source/scope.rs similarity index 100% rename from src/scope.rs rename to Source/scope.rs diff --git a/src/watcher.rs b/Source/watcher.rs similarity index 100% rename from src/watcher.rs rename to Source/watcher.rs diff --git a/android/src/androidTest/java/ExampleInstrumentedTest.kt b/android/Source/androidTest/java/ExampleInstrumentedTest.kt similarity index 100% rename from android/src/androidTest/java/ExampleInstrumentedTest.kt rename to android/Source/androidTest/java/ExampleInstrumentedTest.kt diff --git a/android/src/main/AndroidManifest.xml b/android/Source/main/AndroidManifest.xml similarity index 100% rename from android/src/main/AndroidManifest.xml rename to android/Source/main/AndroidManifest.xml diff --git a/android/src/main/java/FsPlugin.kt b/android/Source/main/java/FsPlugin.kt similarity index 100% rename from android/src/main/java/FsPlugin.kt rename to android/Source/main/java/FsPlugin.kt diff --git a/android/src/test/java/ExampleUnitTest.kt b/android/src/test/java/ExampleUnitTest.kt deleted file mode 100644 index 340839a..0000000 --- a/android/src/test/java/ExampleUnitTest.kt +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2019-2023 Tauri Programme within The Commons Conservancy -// SPDX-License-Identifier: Apache-2.0 -// SPDX-License-Identifier: MIT - -package com.plugin.fs - -import org.junit.Test - -import org.junit.Assert.* - -/** - * Example local unit test, which will execute on the development machine (host). - * - * See [testing documentation](http://d.android.com/tools/testing). - */ -class ExampleUnitTest { - @Test - fun addition_isCorrect() { - assertEquals(4, 2 + 2) - } -} diff --git a/package.json b/package.json index 7a6cf52..4c2a0c1 100644 --- a/package.json +++ b/package.json @@ -1,30 +1,26 @@ { - "name": "@tauri-apps/plugin-fs", - "version": "2.0.0", - "description": "Access the file system.", - "license": "MIT OR Apache-2.0", - "authors": [ - "Tauri Programme within The Commons Conservancy" - ], - "repository": "https://github.com/tauri-apps/plugins-workspace", - "type": "module", - "types": "./dist-js/index.d.ts", - "main": "./dist-js/index.cjs", - "module": "./dist-js/index.js", - "exports": { - "types": "./dist-js/index.d.ts", - "import": "./dist-js/index.js", - "require": "./dist-js/index.cjs" - }, - "scripts": { - "build": "rollup -c" - }, - "files": [ - "dist-js", - "README.md", - "LICENSE" - ], - "dependencies": { - "@tauri-apps/api": "^2.0.0" - } + "authors": [ + "Tauri Programme within The Commons Conservancy" + ], + "dependencies": { + "@tauri-apps/api": "^2.0.0" + }, + "description": "Access the file system.", + "exports": { + "import": "./dist-js/index.js", + "require": "./dist-js/index.cjs", + "types": "./dist-js/index.d.ts" + }, + "files": [ + "dist-js", + "README.md", + "LICENSE" + ], + "main": "./dist-js/index.cjs", + "module": "./dist-js/index.js", + "name": "@tauri-apps/plugin-fs", + "scripts": { + "build": "rollup -c" + }, + "types": "./dist-js/index.d.ts" }