Compare commits

...

76 Commits

Author SHA1 Message Date
Lucas Nogueira 8049700614 chore: update to tauri 3.0.0-alpha.9
autogenerated commands format changed, needed FS plugin small change
2026-06-18 17:29:56 -03:00
Lucas Nogueira b7dab55a2e chore: update tauri 2026-06-17 12:12:03 -03:00
Lucas Nogueira bc005c44b0 Merge remote-tracking branch 'origin/v2' into feat/cef 2026-05-15 15:33:59 -03:00
周诚 e919bab3eb fix(upload): wrong progress callback parameter names in README (#3406)
* Update progress callback parameter names in README

Signed-off-by: zhoucheng <zhoucheng133@outlook.com>

* formatting

Signed-off-by: zhoucheng <zhoucheng133@outlook.com>

* Fixed the misssing braces

Co-authored-by: Tony <68118705+Legend-Master@users.noreply.github.com>
Signed-off-by: zhoucheng <zhoucheng133@outlook.com>

* docs(readme): fix remaining destructuring syntax in examples

Signed-off-by: zhoucheng <zhoucheng133@outlook.com>

---------

Signed-off-by: zhoucheng <zhoucheng133@outlook.com>
Co-authored-by: Tony <68118705+Legend-Master@users.noreply.github.com>
2026-05-15 18:14:17 +08:00
renovate[bot] 95c9291cee chore(deps): update dependency svelte to v5.55.7 [security] (#3422)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-05-15 10:03:55 +08:00
renovate[bot] 114e902537 chore(deps): update dependency rollup to v4.60.3 (#3358)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-05-09 15:16:49 +02:00
renovate[bot] 6972acdca6 chore(deps): update dependency @tauri-apps/cli to v2.11.1 (#3417)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-05-09 14:47:31 +02:00
Lucas Nogueira 06af78ae51 fix: add cef-dll-sys patch for Windows 2026-05-07 09:30:14 -03:00
Lucas Nogueira 77efbab515 Merge remote-tracking branch 'origin/v2' into feat/cef 2026-05-07 08:45:55 -03:00
renovate[bot] 8bbc7a0d1d chore(deps): update rust crate tauri to v2.11.1 [security] (#3413)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-05-06 21:23:19 +02:00
dependabot[bot] 2d013294ef chore(deps): bump openssl from 0.10.78 to 0.10.79 in /plugins/updater/tests/updater-migration/v1-app (#3412)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-06 21:20:11 +02:00
github-actions[bot] 5c7668b6bb publish new versions (#3397)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-02 19:37:51 +08:00
renovate[bot] ec0540138b chore(deps): update rust crate toml to v1 (#3323)
* chore(deps): update rust crate toml to v1

* downgrade to 1.0.x in lockfile

* Add change file

* Downgrade indexmap

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Tony <legendmastertony@gmail.com>
2026-05-01 18:09:41 +08:00
Tony b86e999beb chore(deps): update tauri packages to 2.11 (#3407)
* chore(deps): update tauri packages to 2.11

* Downgrade derive_more

* Fix audit

* Update tauri-plugin
2026-05-01 16:39:43 +08:00
Fabian-Lars c463d8ab14 chore(deps): update rustls-webpki in lockfile, ignore core2 in audit (#3405) 2026-04-23 17:48:22 +02:00
dependabot[bot] 1bb7beb307 chore(deps): bump openssl (#3402)
Bumps [openssl](https://github.com/rust-openssl/rust-openssl) from 0.10.72 to 0.10.78.
- [Release notes](https://github.com/rust-openssl/rust-openssl/releases)
- [Commits](https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.72...openssl-v0.10.78)

---
updated-dependencies:
- dependency-name: openssl
  dependency-version: 0.10.78
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-23 11:52:55 +08:00
Fabian-Lars 3412fa2741 docs(readme): fix platform support matrix (opener supports mobile) 2026-04-22 11:40:46 +02:00
Fabian-Lars af81fdac98 docs(readme): fix platform support matrix (mobile is supported) 2026-04-22 11:39:26 +02:00
Tony c1fd33b3a2 fix(opener): allow open network share locations (#3343)
* fix(opener): allow open network share locations

* Clippy

* Move to a seperate file

* Add license header

* test(opener): add unit tests for shell_parent_path and absolute functions (#1)

* Keep `absolute` non pub in `windows_shell_path`

* Add change file

---------

Co-authored-by: Mark Gandolfo <mark@gandolfo.com.au>
2026-04-18 19:02:09 +08:00
renovate[bot] 250857b7b7 chore(deps): update dependency typescript to v6 (#3363)
* chore(deps): update dependency typescript to v6

* Use 6.0.3

* Fix eslint

* Add `rootDir` since it's no longer inferred
  > https://github.com/microsoft/TypeScript/issues/62508#issuecomment-3348659946

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Tony <legendmastertony@gmail.com>
2026-04-18 18:57:41 +08:00
Tony 964e13f124 fix(store): dead lock trying to set while exiting (#3395)
* fix(store): dead lock trying to set while exiting

* Add change file
2026-04-18 00:45:16 +08:00
Tony e6cdc9f52e fix(deep-link): inverted is app link filter (#3396)
Fix #3392, regression from #3143
2026-04-17 22:15:07 +08:00
renovate[bot] 9228419e13 chore(deps): update dependency eslint to v10.2.0 (#3381)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-14 12:49:27 +02:00
renovate[bot] 04d92139c8 chore(deps): update dependency typescript-eslint to v8.58.1 (#3364)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-14 10:55:45 +02:00
renovate[bot] 5260fc90b0 chore(deps): update rust crate tokio-tungstenite to 0.29 (#3354)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-14 10:09:04 +02:00
renovate[bot] ea5c70060b chore(deps): update rust crate rand to v0.9.3 [security] (#3388)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-14 12:12:42 +08:00
renovate[bot] d016a8ab1e chore(deps): update dependency vite to v8.0.5 [security] (#3380)
* chore(deps): update dependency vite to v8.0.5 [security]

* Fix audit
2026-04-07 12:03:37 +08:00
github-actions[bot] d6a3898001 Publish New Versions (v2) (#3268)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-04-04 18:47:18 +02:00
Tony 2e5bcdf202 chore(deps): fix audits (#3373) 2026-03-31 18:28:05 +08:00
Fabian-Lars 4374b4fc1a chore(notification): remove unused dev-deps (#3372) 2026-03-31 10:33:38 +02:00
Tony f75d21db33 chore(deps): remove used of tauri-utils build feature (#3360) 2026-03-25 22:22:30 +08:00
renovate[bot] 4b95f5e079 chore(deps): update dependency eslint to v10.1.0 (#3357)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-23 22:00:32 +01:00
dependabot[bot] 99c3e37b54 chore(deps): bump tar in /plugins/updater/tests/updater-migration/v1-app (#3352)
Bumps [tar](https://github.com/alexcrichton/tar-rs) from 0.4.41 to 0.4.45.
- [Commits](https://github.com/alexcrichton/tar-rs/compare/0.4.41...0.4.45)

---
updated-dependencies:
- dependency-name: tar
  dependency-version: 0.4.45
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-21 11:07:40 +08:00
renovate[bot] eaac19a5b7 chore(deps): update rust crate tar to v0.4.45 [security] (#3353)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-21 10:07:39 +08:00
renovate[bot] 5183e314cb chore(deps): update dependency typescript-eslint to v8.57.1 (#3344)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-20 20:32:54 +08:00
renovate[bot] 2c0883e64e chore(deps): update dependency vite to v8 (#3346)
* chore(deps): update dependency vite to v8

* `pnpm update --recursive`

* Regenerate api-iife

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Tony <legendmastertony@gmail.com>
2026-03-20 20:05:30 +08:00
Josh 024ec0c29c fix(deep-link): ChromeOS deep link calls filtered and ignored by plugin (fix #3207) (#3214) 2026-03-12 23:02:08 +01:00
FabianLars 35aad24773 chore(deps): update quinn-proto in Cargo.lock, closes #3341 2026-03-10 14:11:28 +01:00
Minkin Aleksei ab037b70d6 fix(nfc): remove extra lambda brackets (fix #3338) (#3339)
Co-authored-by: Minkin Aleksei <minkinaleksei@minkins-dev-center.local>
Co-authored-by: Fabian-Lars <30730186+FabianLars@users.noreply.github.com>
2026-03-10 10:55:47 +01:00
renovate[bot] 1198ad4fb0 chore(deps): update dependency eslint to v10.0.3 (#3342)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-10 09:47:29 +01:00
Tony ea033fe3b8 Add AI tool policy to contributing guide (#3336) 2026-03-09 19:35:41 +08:00
FabianLars c6561ab6b4 revert to draft07 schema 2026-03-09 12:32:45 +01:00
FabianLars 8d6a6d6d31 Merge remote-tracking branch 'origin/v2' into feat/cef 2026-03-09 12:31:03 +01:00
Fabian-Lars 2e432f70c9 chore(deps): remove covector from package.json (#3334) 2026-03-08 11:39:12 +01:00
renovate[bot] b19dcd25cb chore(deps): update dependency @rollup/plugin-terser to v1 (#3333)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-08 10:52:07 +01:00
renovate[bot] 995e76436f chore(deps): update dependency @tauri-apps/cli to v2.10.1 (#3332)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-07 21:56:47 +08:00
Mike 1dc3612862 fix(sql): add SQL support for Postgres NUMERIC and custom data types (fix: #3158) (#3275) 2026-03-05 13:31:20 +01:00
Lucas Fernandes Nogueira f5f68063e4 feat(fs): access security scoped resources on iOS (#3185)
Co-authored-by: FabianLars <30730186+FabianLars@users.noreply.github.com>
2026-03-04 13:59:03 +01:00
Tony 36d3d19247 fix(ci): bump rustsec/audit-check to v2 (#3329) 2026-03-04 18:28:32 +08:00
hrzlgnm 31ab6f8d24 fix(updater): preserve file extension of updater package (fix: #3283) (#3285)
* fix: preserve file extension of updated package (fix: #3283)

Otherwise users may get confused when seing a sudo dialog
which suggests a `rpm` package is installed using `dpkg -i`

* pass on package extension more thoroughly

* add changes file

Update the updater package to preserve file extension, clarifying installation prompts for users.

* Apply suggestion from @hrzlgnm

* Apply suggestion from @hrzlgnm

* Apply suggestion from @Legend-Master

* More rpm and log `pkg_path` instead

---------

Co-authored-by: Tony <68118705+Legend-Master@users.noreply.github.com>
Co-authored-by: Tony <legendmastertony@gmail.com>
2026-03-03 13:53:48 +08:00
renovate[bot] 21ae430ea3 chore(deps): update rust crate cookie_store to 0.22.0 (#3308)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: FabianLars <30730186+FabianLars@users.noreply.github.com>
2026-03-02 17:36:16 +01:00
Lucas Fernandes Nogueira 015e817cf2 feat(deep-link): validate new intent URLs against configured deep links (#3186) 2026-03-02 14:33:21 +01:00
dependabot[bot] 2a6d4b42bb chore(deps): bump time in fixture (#3261)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-02 09:34:50 +01:00
Tony 550d137c64 chore(deps): disable renovate bot on v1 (#3305) 2026-03-02 16:29:31 +08:00
Tony 3f21f39584 refactor(dialog): handle okLabel in js side (#3295)
* refactor(dialog): handle `okLabel` in js side

* Allow unused instead of `cfg(desktop)`
2026-03-01 23:22:25 +08:00
renovate[bot] 759c22758e chore(deps): update eslint monorepo to v10 (v2) (#3293)
* chore(deps): update eslint monorepo to v9.39.3

* Update to eslint 10
2026-03-01 11:25:21 +08:00
renovate[bot] 6816dd1960 chore(deps): update dependency rollup to v4.59.0 [security] (v2) (#3291)
* chore(deps): update dependency rollup to v4.59.0 [security]

* Update svelte

* pnpm dedupe

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Tony <legendmastertony@gmail.com>
2026-03-01 11:11:05 +08:00
Tony 24154472a6 refactor(dialog): reuse message command for confirm (#3287)
* chore(dialog): reuse `message` command for confirm

* Add change file

* Remove ask and confirm from default permissions

* Format

* Remove extra `toString`

* Point `allow-confirm` to `allow-message`
2026-03-01 10:55:33 +08:00
Thibault Tisserand 2574ec89e7 refactor(store-example): replace load_from_store with TryFrom impl in example (#3277) 2026-02-19 00:22:25 +01:00
Lucas Nogueira 352381c6c6 update to latest tauri feat/cef (schemars v1) 2026-02-18 12:45:33 -03:00
Lucas Nogueira e2840a7b52 Merge branch 'v2' into feat/cef 2026-02-18 12:43:41 -03:00
Niklas Volcz 2971289252 fix(http): correct Response header initialization to support cloning (fix #14892) (#3252)
Previously, headers were patched onto the Response object after construction, which bypassed the internal header list and caused `response.clone().headers` to be empty. This change passes the headers directly to the Response constructor, ensuring they are properly stored and clonable.
2026-02-16 16:35:09 +02:00
aiueo13 6c3da6d290 fix(fs): use correct line detection for encodings in readTextFileLines (#3273)
Co-authored-by: OkaYu <aiueo13>
2026-02-13 03:41:43 +02:00
Seiji Okuda e97a4dedab feat(fs): #3243 add encoding option to readTextFile functions (#3244)
* feat(fs): #3243 add encoding option to readFile and readTextFile functions

* feat(fs): add encoding option to ReadFileOptions and update readTextFileLines functions

* add change file
2026-02-09 16:08:26 +02:00
Lucas Nogueira 93ac4cb59b fix mobile build 2026-02-05 17:29:29 -03:00
github-actions[bot] 05045f9a72 publish new versions (#3249)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-05 18:13:33 +01:00
Fabian-Lars 4f53e36a50 fix(single-instance): append version at the end 2026-02-05 18:08:35 +01:00
Lucas Nogueira ad8ec1b6b8 feat(deep-link): handle RunEvent::Opened on Linux for CEF support 2026-02-05 12:32:26 -03:00
Lucas Fernandes Nogueira 8374e997b8 fix(deep-link): runtime register on Linux when app path has spaces (#3258) 2026-02-05 12:30:29 -03:00
Lucas Nogueira 35aa52f45e fix(single-instance): dbus_path should start with /, can't include - 2026-02-05 10:28:58 -03:00
renovate[bot] bbc177150f chore(deps): update dependency prettier to v3.8.1 (#3235)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-04 23:37:55 +08:00
renovate[bot] e6e2edca11 chore(deps): update dependency typescript-eslint to v8.54.0 (#3232)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-04 23:08:54 +08:00
renovate[bot] 7ecd19da51 chore(deps): update dependency rollup to v4.57.1 (#3230)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-04 23:08:24 +08:00
dependabot[bot] a0b6c8ff3b chore(deps): bump bytes (#3248)
Bumps [bytes](https://github.com/tokio-rs/bytes) from 1.7.1 to 1.11.1.
- [Release notes](https://github.com/tokio-rs/bytes/releases)
- [Changelog](https://github.com/tokio-rs/bytes/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tokio-rs/bytes/compare/v1.7.1...v1.11.1)

---
updated-dependencies:
- dependency-name: bytes
  dependency-version: 1.11.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-04 23:07:49 +08:00
renovate[bot] c12ea9306a chore(deps): update rust crate bytes to v1.11.1 [security] (#3247)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-03 23:53:44 +01:00
Demir Yerli 98e2c11eef fix(single-instance): unconventional dbus names (fixes #3184) (#3194)
Co-authored-by: FabianLars <github@fabianlars.de>
Co-authored-by: Amr Bashir <github@amrbashir.me>
2026-02-03 23:36:48 +01:00
379 changed files with 5948 additions and 10399 deletions
+4 -8
View File
@@ -1,11 +1,7 @@
[advisories] [advisories]
ignore = [ ignore = [
# time 0.1 # time crate can't be updated in the repo because of MSRV, users are unaffected
"RUSTSEC-2020-0071", "RUSTSEC-2026-0009",
# needs sqlx 0.7 (still in alpha) # libflate crates can't be updated in the repo because of MSRV, users are unaffected
"RUSTSEC-2022-0090", "RUSTSEC-2026-0105",
# wry needs kuchiki on Android
"RUSTSEC-2023-0019",
# atty is only used when the `colored` feature is enabled on tauri-plugin-log
"RUSTSEC-2021-0145",
] ]
+11
View File
@@ -5,6 +5,7 @@ Hi! We, the maintainers, are really excited that you are interested in contribut
- [Issue Reporting Guidelines](#issue-reporting-guidelines) - [Issue Reporting Guidelines](#issue-reporting-guidelines)
- [Pull Request Guidelines](#pull-request-guidelines) - [Pull Request Guidelines](#pull-request-guidelines)
- [Development Guide](#development-guide) - [Development Guide](#development-guide)
- [AI Tool Policy](#ai-tool-policy)
## Issue Reporting Guidelines ## Issue Reporting Guidelines
@@ -60,3 +61,13 @@ The easiest way to test your changes is to use the [example app](https://github.
To test local changes against your own application simply point the plugin create to your local repository, for example: To test local changes against your own application simply point the plugin create to your local repository, for example:
`tauri-plugin-sample = { path = "path/to/local/tauri-plugin-sample/" }` `tauri-plugin-sample = { path = "path/to/local/tauri-plugin-sample/" }`
## AI Tool Policy
It takes a lot of time to review a Pull Request while it's very easy to make a nonsensical but plausible looking one using AI tools.
It is unfair for other contributors and the reviewers to spend much of the time dealing with this, hence these rules:
1. Review and test all LLM-generated content before submitting, you're the one responsible for it, not the AI.
2. Don't use AI to respond to review comments (except for translations).
We will close the Pull Request with a `ai-slop` tag if you failed to do so.
+1 -1
View File
@@ -34,7 +34,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: rustsec/audit-check@v1 - uses: rustsec/audit-check@v2
with: with:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
# https://github.com/tauri-apps/plugins-workspace/issues/774 # https://github.com/tauri-apps/plugins-workspace/issues/774
+1
View File
@@ -21,6 +21,7 @@ target/
package-lock.json package-lock.json
yarn.lock yarn.lock
bun.lockb bun.lockb
bun.lock
# rust compiled folders # rust compiled folders
target/ target/
Generated
+830 -305
View File
File diff suppressed because it is too large Load Diff
+7 -1
View File
@@ -19,7 +19,7 @@ tauri-utils = "2.8"
serde_json = "1" serde_json = "1"
thiserror = "2" thiserror = "2"
url = "2" url = "2"
schemars = "0.8" schemars = "1"
dunce = "1" dunce = "1"
specta = "^2.0.0-rc.16" specta = "^2.0.0-rc.16"
glob = "0.3" glob = "0.3"
@@ -39,3 +39,9 @@ codegen-units = 1
lto = true lto = true
incremental = false incremental = false
opt-level = "s" opt-level = "s"
[patch.crates-io]
tauri = { git = "https://github.com/tauri-apps/tauri.git", tag = "tauri-cef-v3.0.0-alpha.9" }
tauri-utils = { git = "https://github.com/tauri-apps/tauri.git", tag = "tauri-cef-v3.0.0-alpha.9" }
tauri-plugin = { git = "https://github.com/tauri-apps/tauri.git", tag = "tauri-cef-v3.0.0-alpha.9" }
tauri-build = { git = "https://github.com/tauri-apps/tauri.git", tag = "tauri-cef-v3.0.0-alpha.9" }
+1 -1
View File
@@ -22,7 +22,7 @@ This repo and all plugins require a Rust version of at least **1.77.2**
| [log](plugins/log) | Configurable logging. | ✅ | ✅ | ✅ | ✅ | ✅ | | [log](plugins/log) | Configurable logging. | ✅ | ✅ | ✅ | ✅ | ✅ |
| [nfc](plugins/nfc) | Read and write NFC tags on Android and iOS. | ? | ? | ? | ✅ | ✅ | | [nfc](plugins/nfc) | Read and write NFC tags on Android and iOS. | ? | ? | ? | ✅ | ✅ |
| [notification](plugins/notification) | Send message notifications (brief auto-expiring OS window element) to your user. Can also be used with the Notification Web API. | ✅ | ✅ | ✅ | ✅ | ✅ | | [notification](plugins/notification) | Send message notifications (brief auto-expiring OS window element) to your user. Can also be used with the Notification Web API. | ✅ | ✅ | ✅ | ✅ | ✅ |
| [opener](plugins/opener) | Open files and URLs using their default application. | ✅ | ✅ | ✅ | ? | ? | | [opener](plugins/opener) | Open files and URLs using their default application. | ✅ | ✅ | ✅ | | |
| [os](plugins/os) | Read information about the operating system. | ✅ | ✅ | ✅ | ✅ | ✅ | | [os](plugins/os) | Read information about the operating system. | ✅ | ✅ | ✅ | ✅ | ✅ |
| [persisted-scope](plugins/persisted-scope) | Persist runtime scope changes on the filesystem. | ✅ | ✅ | ✅ | ? | ? | | [persisted-scope](plugins/persisted-scope) | Persist runtime scope changes on the filesystem. | ✅ | ✅ | ✅ | ? | ? |
| [positioner](plugins/positioner) | Move windows to common locations. | ✅ | ✅ | ✅ | ❌ | ❌ | | [positioner](plugins/positioner) | Move windows to common locations. | ✅ | ✅ | ✅ | ❌ | ❌ |
+20
View File
@@ -1,5 +1,25 @@
# Changelog # Changelog
## \[2.0.39]
### Dependencies
- Upgraded to `fs-js@2.5.1`
- Upgraded to `opener-js@2.5.4`
- Upgraded to `store-js@2.4.3`
- Upgraded to `dialog-js@2.7.1`
- Upgraded to `http-js@2.5.9`
## \[2.0.38]
### Dependencies
- Upgraded to `fs-js@2.5.0`
- Upgraded to `http-js@2.5.8`
- Upgraded to `updater-js@2.10.1`
- Upgraded to `nfc-js@2.3.5`
- Upgraded to `dialog-js@2.7.0`
## \[2.0.37] ## \[2.0.37]
### Dependencies ### Dependencies
+19 -19
View File
@@ -1,7 +1,7 @@
{ {
"name": "api", "name": "api",
"private": true, "private": true,
"version": "2.0.37", "version": "2.0.39",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite --clearScreen false", "dev": "vite --clearScreen false",
@@ -10,36 +10,36 @@
"tauri": "tauri" "tauri": "tauri"
}, },
"dependencies": { "dependencies": {
"@tauri-apps/api": "^2.10.1", "@tauri-apps/api": "^2.11.0",
"@tauri-apps/plugin-barcode-scanner": "^2.4.4", "@tauri-apps/plugin-barcode-scanner": "^2.4.4",
"@tauri-apps/plugin-biometric": "^2.3.2", "@tauri-apps/plugin-biometric": "^2.3.2",
"@tauri-apps/plugin-cli": "^2.4.1", "@tauri-apps/plugin-cli": "^2.4.1",
"@tauri-apps/plugin-clipboard-manager": "^2.3.2", "@tauri-apps/plugin-clipboard-manager": "^2.3.2",
"@tauri-apps/plugin-dialog": "^2.6.0", "@tauri-apps/plugin-dialog": "^2.7.1",
"@tauri-apps/plugin-fs": "^2.4.5", "@tauri-apps/plugin-fs": "^2.5.1",
"@tauri-apps/plugin-geolocation": "^2.2.0", "@tauri-apps/plugin-geolocation": "^2.3.2",
"@tauri-apps/plugin-global-shortcut": "^2.3.1", "@tauri-apps/plugin-global-shortcut": "^2.3.1",
"@tauri-apps/plugin-haptics": "^2.2.0", "@tauri-apps/plugin-haptics": "^2.3.2",
"@tauri-apps/plugin-http": "^2.5.7", "@tauri-apps/plugin-http": "^2.5.9",
"@tauri-apps/plugin-nfc": "^2.3.4", "@tauri-apps/plugin-nfc": "^2.3.5",
"@tauri-apps/plugin-notification": "^2.3.3", "@tauri-apps/plugin-notification": "^2.3.3",
"@tauri-apps/plugin-opener": "^2.5.3", "@tauri-apps/plugin-opener": "^2.5.4",
"@tauri-apps/plugin-os": "^2.3.2", "@tauri-apps/plugin-os": "^2.3.2",
"@tauri-apps/plugin-process": "^2.3.1", "@tauri-apps/plugin-process": "^2.3.1",
"@tauri-apps/plugin-shell": "^2.3.5", "@tauri-apps/plugin-shell": "^2.3.5",
"@tauri-apps/plugin-store": "^2.4.2", "@tauri-apps/plugin-store": "^2.4.3",
"@tauri-apps/plugin-updater": "^2.10.0", "@tauri-apps/plugin-updater": "^2.10.1",
"@tauri-apps/plugin-upload": "^2.3.0", "@tauri-apps/plugin-upload": "^2.4.0",
"@zerodevx/svelte-json-view": "1.0.11" "@zerodevx/svelte-json-view": "1.0.11"
}, },
"devDependencies": { "devDependencies": {
"@iconify-json/codicon": "^1.2.12", "@iconify-json/codicon": "^1.2.49",
"@iconify-json/ph": "^1.2.2", "@iconify-json/ph": "^1.2.2",
"@sveltejs/vite-plugin-svelte": "^6.0.0", "@sveltejs/vite-plugin-svelte": "^7.0.0",
"@tauri-apps/cli": "2.10.0", "@tauri-apps/cli-cef": "3.0.0-alpha.5",
"@unocss/extractor-svelte": "^66.3.3", "@unocss/extractor-svelte": "^66.6.7",
"svelte": "^5.20.4", "svelte": "^5.54.0",
"unocss": "^66.3.3", "unocss": "^66.6.7",
"vite": "^7.0.7" "vite": "^8.0.1"
} }
} }
+20
View File
@@ -1,5 +1,25 @@
# Changelog # Changelog
## \[2.0.43]
### Dependencies
- Upgraded to `fs@2.5.1`
- Upgraded to `opener@2.5.4`
- Upgraded to `store@2.4.3`
- Upgraded to `dialog@2.7.1`
- Upgraded to `http@2.5.9`
## \[2.0.42]
### Dependencies
- Upgraded to `fs@2.5.0`
- Upgraded to `http@2.5.8`
- Upgraded to `updater@2.10.1`
- Upgraded to `nfc@2.3.5`
- Upgraded to `dialog@2.7.0`
## \[2.0.41] ## \[2.0.41]
### Dependencies ### Dependencies
+8 -8
View File
@@ -1,7 +1,7 @@
[package] [package]
name = "api" name = "api"
publish = false publish = false
version = "2.0.41" version = "2.0.43"
description = "An example Tauri Application showcasing the api" description = "An example Tauri Application showcasing the api"
edition = "2021" edition = "2021"
rust-version = { workspace = true } rust-version = { workspace = true }
@@ -21,23 +21,23 @@ tiny_http = "0.12"
time = "0.3" time = "0.3"
log = { workspace = true } log = { workspace = true }
tauri-plugin-log = { path = "../../../plugins/log", version = "2.8.0" } tauri-plugin-log = { path = "../../../plugins/log", version = "2.8.0" }
tauri-plugin-fs = { path = "../../../plugins/fs", version = "2.4.5", features = [ tauri-plugin-fs = { path = "../../../plugins/fs", version = "2.5.1", features = [
"watch", "watch",
] } ] }
tauri-plugin-clipboard-manager = { path = "../../../plugins/clipboard-manager", version = "2.3.2" } tauri-plugin-clipboard-manager = { path = "../../../plugins/clipboard-manager", version = "2.3.2" }
tauri-plugin-dialog = { path = "../../../plugins/dialog", version = "2.6.0" } tauri-plugin-dialog = { path = "../../../plugins/dialog", version = "2.7.1" }
tauri-plugin-http = { path = "../../../plugins/http", features = [ tauri-plugin-http = { path = "../../../plugins/http", features = [
"multipart", "multipart",
"cookies", "cookies",
], version = "2.5.7" } ], version = "2.5.9" }
tauri-plugin-notification = { path = "../../../plugins/notification", version = "2.3.3", features = [ tauri-plugin-notification = { path = "../../../plugins/notification", version = "2.3.3", features = [
"windows7-compat", "windows7-compat",
] } ] }
tauri-plugin-os = { path = "../../../plugins/os", version = "2.3.2" } tauri-plugin-os = { path = "../../../plugins/os", version = "2.3.2" }
tauri-plugin-process = { path = "../../../plugins/process", version = "2.3.1" } tauri-plugin-process = { path = "../../../plugins/process", version = "2.3.1" }
tauri-plugin-opener = { path = "../../../plugins/opener", version = "2.5.3" } tauri-plugin-opener = { path = "../../../plugins/opener", version = "2.5.4" }
tauri-plugin-shell = { path = "../../../plugins/shell", version = "2.3.5" } tauri-plugin-shell = { path = "../../../plugins/shell", version = "2.3.5" }
tauri-plugin-store = { path = "../../../plugins/store", version = "2.4.2" } tauri-plugin-store = { path = "../../../plugins/store", version = "2.4.3" }
tauri-plugin-upload = { path = "../../../plugins/upload", version = "2.3.0" } tauri-plugin-upload = { path = "../../../plugins/upload", version = "2.3.0" }
[dependencies.tauri] [dependencies.tauri]
@@ -57,12 +57,12 @@ features = [
[target."cfg(any(target_os = \"macos\", windows, target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies] [target."cfg(any(target_os = \"macos\", windows, target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies]
tauri-plugin-cli = { path = "../../../plugins/cli", version = "2.4.1" } tauri-plugin-cli = { path = "../../../plugins/cli", version = "2.4.1" }
tauri-plugin-global-shortcut = { path = "../../../plugins/global-shortcut", version = "2.3.1" } tauri-plugin-global-shortcut = { path = "../../../plugins/global-shortcut", version = "2.3.1" }
tauri-plugin-updater = { path = "../../../plugins/updater", version = "2.10.0" } tauri-plugin-updater = { path = "../../../plugins/updater", version = "2.10.1" }
tauri-plugin-window-state = { path = "../../../plugins/window-state", version = "2.2.0" } tauri-plugin-window-state = { path = "../../../plugins/window-state", version = "2.2.0" }
[target."cfg(any(target_os = \"android\", target_os = \"ios\"))".dependencies] [target."cfg(any(target_os = \"android\", target_os = \"ios\"))".dependencies]
tauri-plugin-barcode-scanner = { path = "../../../plugins/barcode-scanner/", version = "2.4.4" } tauri-plugin-barcode-scanner = { path = "../../../plugins/barcode-scanner/", version = "2.4.4" }
tauri-plugin-nfc = { path = "../../../plugins/nfc", version = "2.3.4" } tauri-plugin-nfc = { path = "../../../plugins/nfc", version = "2.3.5" }
tauri-plugin-biometric = { path = "../../../plugins/biometric/", version = "2.3.2" } tauri-plugin-biometric = { path = "../../../plugins/biometric/", version = "2.3.2" }
tauri-plugin-geolocation = { path = "../../../plugins/geolocation/", version = "2.3.2" } tauri-plugin-geolocation = { path = "../../../plugins/geolocation/", version = "2.3.2" }
tauri-plugin-haptics = { path = "../../../plugins/haptics/", version = "2.3.2" } tauri-plugin-haptics = { path = "../../../plugins/haptics/", version = "2.3.2" }
@@ -23,11 +23,7 @@
"core:window:allow-start-dragging", "core:window:allow-start-dragging",
"notification:default", "notification:default",
"os:allow-platform", "os:allow-platform",
"dialog:allow-open", "dialog:default",
"dialog:allow-ask",
"dialog:allow-save",
"dialog:allow-confirm",
"dialog:allow-message",
{ {
"identifier": "shell:allow-spawn", "identifier": "shell:allow-spawn",
"allow": [ "allow": [
+1 -1
View File
@@ -43,7 +43,7 @@
} }
async function msg() { async function msg() {
await message("Tauri is awesome!"); await message("Tauri is awesome!").then((res) => onMessage(res));
} }
async function msgCustom(result) { async function msgCustom(result) {
+9 -11
View File
@@ -11,25 +11,23 @@
"example:api:dev": "pnpm run --filter \"api\" tauri dev" "example:api:dev": "pnpm run --filter \"api\" tauri dev"
}, },
"devDependencies": { "devDependencies": {
"@eslint/js": "9.39.2", "@eslint/js": "10.0.1",
"@rollup/plugin-node-resolve": "16.0.3", "@rollup/plugin-node-resolve": "16.0.3",
"@rollup/plugin-terser": "0.4.4", "@rollup/plugin-terser": "1.0.0",
"@rollup/plugin-typescript": "12.3.0", "@rollup/plugin-typescript": "12.3.0",
"covector": "^0.12.4", "eslint": "10.2.0",
"eslint": "9.39.2",
"eslint-config-prettier": "10.1.8", "eslint-config-prettier": "10.1.8",
"eslint-plugin-security": "3.0.1", "eslint-plugin-security": "4.0.0",
"prettier": "3.8.0", "prettier": "3.8.1",
"rollup": "4.55.1", "rollup": "4.60.3",
"tslib": "2.8.1", "tslib": "2.8.1",
"typescript": "5.9.3", "typescript": "6.0.3",
"typescript-eslint": "8.53.0" "typescript-eslint": "8.58.2"
}, },
"minimumReleaseAge": 4320, "minimumReleaseAge": 4320,
"pnpm": { "pnpm": {
"overrides": { "overrides": {
"esbuild@<0.25.0": ">=0.25.0", "esbuild@<0.25.0": ">=0.25.0"
"lodash@>=4.0.0 <=4.17.22": ">=4.17.23"
}, },
"onlyBuiltDependencies": [ "onlyBuiltDependencies": [
"esbuild" "esbuild"
+1 -1
View File
@@ -24,6 +24,6 @@
"LICENSE" "LICENSE"
], ],
"dependencies": { "dependencies": {
"@tauri-apps/api": "^2.10.1" "@tauri-apps/api": "^2.11.0"
} }
} }
@@ -0,0 +1,5 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
commands = ["enable","disable","is_enabled"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-disable"
description = "Enables the disable command without any pre-configured scope."
commands.allow = ["disable"]
[[permission]]
identifier = "deny-disable"
description = "Denies the disable command without any pre-configured scope."
commands.deny = ["disable"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-enable"
description = "Enables the enable command without any pre-configured scope."
commands.allow = ["enable"]
[[permission]]
identifier = "deny-enable"
description = "Denies the enable command without any pre-configured scope."
commands.deny = ["enable"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-is-enabled"
description = "Enables the is_enabled command without any pre-configured scope."
commands.allow = ["is_enabled"]
[[permission]]
identifier = "deny-is-enabled"
description = "Denies the is_enabled command without any pre-configured scope."
commands.deny = ["is_enabled"]
@@ -24,10 +24,17 @@
}, },
"permission": { "permission": {
"description": "A list of inlined permissions", "description": "A list of inlined permissions",
"default": [],
"type": "array", "type": "array",
"items": { "items": {
"$ref": "#/definitions/Permission" "$ref": "#/definitions/Permission"
},
"default": []
},
"commands": {
"description": "A list of command names that get `allow-$command` and `deny-$command` permissions\nautogenerated on demand instead of being stored as explicit permissions.\n\nSee [`Manifest::command_permission`] and the ACL resolver for how these are expanded.",
"type": "array",
"items": {
"type": "string"
} }
} }
}, },
@@ -35,9 +42,6 @@
"DefaultPermission": { "DefaultPermission": {
"description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.", "description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.",
"type": "object", "type": "object",
"required": [
"permissions"
],
"properties": { "properties": {
"version": { "version": {
"description": "The version of the permission.", "description": "The version of the permission.",
@@ -46,10 +50,10 @@
"null" "null"
], ],
"format": "uint64", "format": "uint64",
"minimum": 1.0 "minimum": 1
}, },
"description": { "description": {
"description": "Human-readable description of what the permission does. Tauri convention is to use `<h4>` headings in markdown content for Tauri documentation generation purposes.", "description": "Human-readable description of what the permission does.\nTauri convention is to use `<h4>` headings in markdown content\nfor Tauri documentation generation purposes.",
"type": [ "type": [
"string", "string",
"null" "null"
@@ -62,16 +66,14 @@
"type": "string" "type": "string"
} }
} }
} },
"required": [
"permissions"
]
}, },
"PermissionSet": { "PermissionSet": {
"description": "A set of direct permissions grouped together under a new name.", "description": "A set of direct permissions grouped together under a new name.",
"type": "object", "type": "object",
"required": [
"description",
"identifier",
"permissions"
],
"properties": { "properties": {
"identifier": { "identifier": {
"description": "A unique identifier for the permission.", "description": "A unique identifier for the permission.",
@@ -85,17 +87,19 @@
"description": "All permissions this set contains.", "description": "All permissions this set contains.",
"type": "array", "type": "array",
"items": { "items": {
"$ref": "#/definitions/PermissionKind" "type": "string"
} }
} }
} },
"required": [
"identifier",
"description",
"permissions"
]
}, },
"Permission": { "Permission": {
"description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.", "description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.",
"type": "object", "type": "object",
"required": [
"identifier"
],
"properties": { "properties": {
"version": { "version": {
"description": "The version of the permission.", "description": "The version of the permission.",
@@ -104,14 +108,14 @@
"null" "null"
], ],
"format": "uint64", "format": "uint64",
"minimum": 1.0 "minimum": 1
}, },
"identifier": { "identifier": {
"description": "A unique identifier for the permission.", "description": "A unique identifier for the permission.",
"type": "string" "type": "string"
}, },
"description": { "description": {
"description": "Human-readable description of what the permission does. Tauri internal convention is to use `<h4>` headings in markdown content for Tauri documentation generation purposes.", "description": "Human-readable description of what the permission does.\nTauri internal convention is to use `<h4>` headings in markdown content\nfor Tauri documentation generation purposes.",
"type": [ "type": [
"string", "string",
"null" "null"
@@ -147,7 +151,10 @@
"$ref": "#/definitions/Target" "$ref": "#/definitions/Target"
} }
} }
} },
"required": [
"identifier"
]
}, },
"Commands": { "Commands": {
"description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.", "description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.",
@@ -155,24 +162,24 @@
"properties": { "properties": {
"allow": { "allow": {
"description": "Allowed command.", "description": "Allowed command.",
"default": [],
"type": "array", "type": "array",
"items": { "items": {
"type": "string" "type": "string"
} },
"default": []
}, },
"deny": { "deny": {
"description": "Denied command, which takes priority.", "description": "Denied command, which takes priority.",
"default": [],
"type": "array", "type": "array",
"items": { "items": {
"type": "string" "type": "string"
} },
"default": []
} }
} }
}, },
"Scopes": { "Scopes": {
"description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command. The configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json { \"allow\": [{ \"path\": \"$HOME/**\" }], \"deny\": [{ \"path\": \"$HOME/secret.txt\" }] } ```", "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command.\nThe configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json\n{\n \"allow\": [{ \"path\": \"$HOME/**\" }],\n \"deny\": [{ \"path\": \"$HOME/secret.txt\" }]\n}\n```",
"type": "object", "type": "object",
"properties": { "properties": {
"allow": { "allow": {
@@ -257,84 +264,27 @@
{ {
"description": "MacOS.", "description": "MacOS.",
"type": "string", "type": "string",
"enum": [ "const": "macOS"
"macOS"
]
}, },
{ {
"description": "Windows.", "description": "Windows.",
"type": "string", "type": "string",
"enum": [ "const": "windows"
"windows"
]
}, },
{ {
"description": "Linux.", "description": "Linux.",
"type": "string", "type": "string",
"enum": [ "const": "linux"
"linux"
]
}, },
{ {
"description": "Android.", "description": "Android.",
"type": "string", "type": "string",
"enum": [ "const": "android"
"android"
]
}, },
{ {
"description": "iOS.", "description": "iOS.",
"type": "string", "type": "string",
"enum": [ "const": "iOS"
"iOS"
]
}
]
},
"PermissionKind": {
"type": "string",
"oneOf": [
{
"description": "Enables the disable command without any pre-configured scope.",
"type": "string",
"const": "allow-disable",
"markdownDescription": "Enables the disable command without any pre-configured scope."
},
{
"description": "Denies the disable command without any pre-configured scope.",
"type": "string",
"const": "deny-disable",
"markdownDescription": "Denies the disable command without any pre-configured scope."
},
{
"description": "Enables the enable command without any pre-configured scope.",
"type": "string",
"const": "allow-enable",
"markdownDescription": "Enables the enable command without any pre-configured scope."
},
{
"description": "Denies the enable command without any pre-configured scope.",
"type": "string",
"const": "deny-enable",
"markdownDescription": "Denies the enable command without any pre-configured scope."
},
{
"description": "Enables the is_enabled command without any pre-configured scope.",
"type": "string",
"const": "allow-is-enabled",
"markdownDescription": "Enables the is_enabled command without any pre-configured scope."
},
{
"description": "Denies the is_enabled command without any pre-configured scope.",
"type": "string",
"const": "deny-is-enabled",
"markdownDescription": "Denies the is_enabled command without any pre-configured scope."
},
{
"description": "This permission set configures if your\napplication can enable or disable auto\nstarting the application on boot.\n\n#### Granted Permissions\n\nIt allows all to check, enable and\ndisable the automatic start on boot.\n\n\n#### This default permission set includes:\n\n- `allow-enable`\n- `allow-disable`\n- `allow-is-enabled`",
"type": "string",
"const": "default",
"markdownDescription": "This permission set configures if your\napplication can enable or disable auto\nstarting the application on boot.\n\n#### Granted Permissions\n\nIt allows all to check, enable and\ndisable the automatic start on boot.\n\n\n#### This default permission set includes:\n\n- `allow-enable`\n- `allow-disable`\n- `allow-is-enabled`"
} }
] ]
} }
+3
View File
@@ -1,4 +1,7 @@
{ {
"extends": "../../tsconfig.base.json", "extends": "../../tsconfig.base.json",
"compilerOptions": {
"rootDir": "guest-js"
},
"include": ["guest-js/*.ts"] "include": ["guest-js/*.ts"]
} }
+1 -1
View File
@@ -1 +1 @@
if("__TAURI__"in window){var __TAURI_PLUGIN_BARCODE_SCANNER__=function(n){"use strict";async function a(n,a={},e){return window.__TAURI_INTERNALS__.invoke(n,a,e)}var e;return"function"==typeof SuppressedError&&SuppressedError,n.Format=void 0,(e=n.Format||(n.Format={})).QRCode="QR_CODE",e.UPC_A="UPC_A",e.UPC_E="UPC_E",e.EAN8="EAN_8",e.EAN13="EAN_13",e.Code39="CODE_39",e.Code93="CODE_93",e.Code128="CODE_128",e.Codabar="CODABAR",e.ITF="ITF",e.Aztec="AZTEC",e.DataMatrix="DATA_MATRIX",e.PDF417="PDF_417",e.GS1DataBar="GS1_DATA_BAR",e.GS1DataBarLimited="GS1_DATA_BAR_LIMITED",e.GS1DataBarExpanded="GS1_DATA_BAR_EXPANDED",n.cancel=async function(){await a("plugin:barcode-scanner|cancel")},n.checkPermissions=async function(){return await async function(n){return a(`plugin:${n}|check_permissions`)}("barcode-scanner").then((n=>n.camera))},n.openAppSettings=async function(){await a("plugin:barcode-scanner|open_app_settings")},n.requestPermissions=async function(){return await async function(n){return a(`plugin:${n}|request_permissions`)}("barcode-scanner").then((n=>n.camera))},n.scan=async function(n){return await a("plugin:barcode-scanner|scan",{...n})},n}({});Object.defineProperty(window.__TAURI__,"barcodeScanner",{value:__TAURI_PLUGIN_BARCODE_SCANNER__})} if("__TAURI__"in window){var __TAURI_PLUGIN_BARCODE_SCANNER__=function(n){"use strict";async function a(n,a={},e){return window.__TAURI_INTERNALS__.invoke(n,a,e)}var e;return"function"==typeof SuppressedError&&SuppressedError,n.Format=void 0,(e=n.Format||(n.Format={})).QRCode="QR_CODE",e.UPC_A="UPC_A",e.UPC_E="UPC_E",e.EAN8="EAN_8",e.EAN13="EAN_13",e.Code39="CODE_39",e.Code93="CODE_93",e.Code128="CODE_128",e.Codabar="CODABAR",e.ITF="ITF",e.Aztec="AZTEC",e.DataMatrix="DATA_MATRIX",e.PDF417="PDF_417",e.GS1DataBar="GS1_DATA_BAR",e.GS1DataBarLimited="GS1_DATA_BAR_LIMITED",e.GS1DataBarExpanded="GS1_DATA_BAR_EXPANDED",n.cancel=async function(){await a("plugin:barcode-scanner|cancel")},n.checkPermissions=async function(){return await async function(n){return a(`plugin:${n}|check_permissions`)}("barcode-scanner").then(n=>n.camera)},n.openAppSettings=async function(){await a("plugin:barcode-scanner|open_app_settings")},n.requestPermissions=async function(){return await async function(n){return a(`plugin:${n}|request_permissions`)}("barcode-scanner").then(n=>n.camera)},n.scan=async function(n){return await a("plugin:barcode-scanner|scan",{...n})},n}({});Object.defineProperty(window.__TAURI__,"barcodeScanner",{value:__TAURI_PLUGIN_BARCODE_SCANNER__})}
+1 -1
View File
@@ -25,6 +25,6 @@
"LICENSE" "LICENSE"
], ],
"dependencies": { "dependencies": {
"@tauri-apps/api": "^2.10.1" "@tauri-apps/api": "^2.11.0"
} }
} }
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-cancel"
description = "Enables the cancel command without any pre-configured scope."
commands.allow = ["cancel"]
[[permission]]
identifier = "deny-cancel"
description = "Denies the cancel command without any pre-configured scope."
commands.deny = ["cancel"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-check-permissions"
description = "Enables the check_permissions command without any pre-configured scope."
commands.allow = ["check_permissions"]
[[permission]]
identifier = "deny-check-permissions"
description = "Denies the check_permissions command without any pre-configured scope."
commands.deny = ["check_permissions"]
@@ -0,0 +1,5 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
commands = ["scan","cancel","request_permissions","check_permissions","open_app_settings","vibrate"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-open-app-settings"
description = "Enables the open_app_settings command without any pre-configured scope."
commands.allow = ["open_app_settings"]
[[permission]]
identifier = "deny-open-app-settings"
description = "Denies the open_app_settings command without any pre-configured scope."
commands.deny = ["open_app_settings"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-request-permissions"
description = "Enables the request_permissions command without any pre-configured scope."
commands.allow = ["request_permissions"]
[[permission]]
identifier = "deny-request-permissions"
description = "Denies the request_permissions command without any pre-configured scope."
commands.deny = ["request_permissions"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-scan"
description = "Enables the scan command without any pre-configured scope."
commands.allow = ["scan"]
[[permission]]
identifier = "deny-scan"
description = "Denies the scan command without any pre-configured scope."
commands.deny = ["scan"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-vibrate"
description = "Enables the vibrate command without any pre-configured scope."
commands.allow = ["vibrate"]
[[permission]]
identifier = "deny-vibrate"
description = "Denies the vibrate command without any pre-configured scope."
commands.deny = ["vibrate"]
@@ -24,10 +24,17 @@
}, },
"permission": { "permission": {
"description": "A list of inlined permissions", "description": "A list of inlined permissions",
"default": [],
"type": "array", "type": "array",
"items": { "items": {
"$ref": "#/definitions/Permission" "$ref": "#/definitions/Permission"
},
"default": []
},
"commands": {
"description": "A list of command names that get `allow-$command` and `deny-$command` permissions\nautogenerated on demand instead of being stored as explicit permissions.\n\nSee [`Manifest::command_permission`] and the ACL resolver for how these are expanded.",
"type": "array",
"items": {
"type": "string"
} }
} }
}, },
@@ -35,9 +42,6 @@
"DefaultPermission": { "DefaultPermission": {
"description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.", "description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.",
"type": "object", "type": "object",
"required": [
"permissions"
],
"properties": { "properties": {
"version": { "version": {
"description": "The version of the permission.", "description": "The version of the permission.",
@@ -46,10 +50,10 @@
"null" "null"
], ],
"format": "uint64", "format": "uint64",
"minimum": 1.0 "minimum": 1
}, },
"description": { "description": {
"description": "Human-readable description of what the permission does. Tauri convention is to use `<h4>` headings in markdown content for Tauri documentation generation purposes.", "description": "Human-readable description of what the permission does.\nTauri convention is to use `<h4>` headings in markdown content\nfor Tauri documentation generation purposes.",
"type": [ "type": [
"string", "string",
"null" "null"
@@ -62,16 +66,14 @@
"type": "string" "type": "string"
} }
} }
} },
"required": [
"permissions"
]
}, },
"PermissionSet": { "PermissionSet": {
"description": "A set of direct permissions grouped together under a new name.", "description": "A set of direct permissions grouped together under a new name.",
"type": "object", "type": "object",
"required": [
"description",
"identifier",
"permissions"
],
"properties": { "properties": {
"identifier": { "identifier": {
"description": "A unique identifier for the permission.", "description": "A unique identifier for the permission.",
@@ -85,17 +87,19 @@
"description": "All permissions this set contains.", "description": "All permissions this set contains.",
"type": "array", "type": "array",
"items": { "items": {
"$ref": "#/definitions/PermissionKind" "type": "string"
} }
} }
} },
"required": [
"identifier",
"description",
"permissions"
]
}, },
"Permission": { "Permission": {
"description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.", "description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.",
"type": "object", "type": "object",
"required": [
"identifier"
],
"properties": { "properties": {
"version": { "version": {
"description": "The version of the permission.", "description": "The version of the permission.",
@@ -104,14 +108,14 @@
"null" "null"
], ],
"format": "uint64", "format": "uint64",
"minimum": 1.0 "minimum": 1
}, },
"identifier": { "identifier": {
"description": "A unique identifier for the permission.", "description": "A unique identifier for the permission.",
"type": "string" "type": "string"
}, },
"description": { "description": {
"description": "Human-readable description of what the permission does. Tauri internal convention is to use `<h4>` headings in markdown content for Tauri documentation generation purposes.", "description": "Human-readable description of what the permission does.\nTauri internal convention is to use `<h4>` headings in markdown content\nfor Tauri documentation generation purposes.",
"type": [ "type": [
"string", "string",
"null" "null"
@@ -147,7 +151,10 @@
"$ref": "#/definitions/Target" "$ref": "#/definitions/Target"
} }
} }
} },
"required": [
"identifier"
]
}, },
"Commands": { "Commands": {
"description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.", "description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.",
@@ -155,24 +162,24 @@
"properties": { "properties": {
"allow": { "allow": {
"description": "Allowed command.", "description": "Allowed command.",
"default": [],
"type": "array", "type": "array",
"items": { "items": {
"type": "string" "type": "string"
} },
"default": []
}, },
"deny": { "deny": {
"description": "Denied command, which takes priority.", "description": "Denied command, which takes priority.",
"default": [],
"type": "array", "type": "array",
"items": { "items": {
"type": "string" "type": "string"
} },
"default": []
} }
} }
}, },
"Scopes": { "Scopes": {
"description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command. The configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json { \"allow\": [{ \"path\": \"$HOME/**\" }], \"deny\": [{ \"path\": \"$HOME/secret.txt\" }] } ```", "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command.\nThe configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json\n{\n \"allow\": [{ \"path\": \"$HOME/**\" }],\n \"deny\": [{ \"path\": \"$HOME/secret.txt\" }]\n}\n```",
"type": "object", "type": "object",
"properties": { "properties": {
"allow": { "allow": {
@@ -257,120 +264,27 @@
{ {
"description": "MacOS.", "description": "MacOS.",
"type": "string", "type": "string",
"enum": [ "const": "macOS"
"macOS"
]
}, },
{ {
"description": "Windows.", "description": "Windows.",
"type": "string", "type": "string",
"enum": [ "const": "windows"
"windows"
]
}, },
{ {
"description": "Linux.", "description": "Linux.",
"type": "string", "type": "string",
"enum": [ "const": "linux"
"linux"
]
}, },
{ {
"description": "Android.", "description": "Android.",
"type": "string", "type": "string",
"enum": [ "const": "android"
"android"
]
}, },
{ {
"description": "iOS.", "description": "iOS.",
"type": "string", "type": "string",
"enum": [ "const": "iOS"
"iOS"
]
}
]
},
"PermissionKind": {
"type": "string",
"oneOf": [
{
"description": "Enables the cancel command without any pre-configured scope.",
"type": "string",
"const": "allow-cancel",
"markdownDescription": "Enables the cancel command without any pre-configured scope."
},
{
"description": "Denies the cancel command without any pre-configured scope.",
"type": "string",
"const": "deny-cancel",
"markdownDescription": "Denies the cancel command without any pre-configured scope."
},
{
"description": "Enables the check_permissions command without any pre-configured scope.",
"type": "string",
"const": "allow-check-permissions",
"markdownDescription": "Enables the check_permissions command without any pre-configured scope."
},
{
"description": "Denies the check_permissions command without any pre-configured scope.",
"type": "string",
"const": "deny-check-permissions",
"markdownDescription": "Denies the check_permissions command without any pre-configured scope."
},
{
"description": "Enables the open_app_settings command without any pre-configured scope.",
"type": "string",
"const": "allow-open-app-settings",
"markdownDescription": "Enables the open_app_settings command without any pre-configured scope."
},
{
"description": "Denies the open_app_settings command without any pre-configured scope.",
"type": "string",
"const": "deny-open-app-settings",
"markdownDescription": "Denies the open_app_settings command without any pre-configured scope."
},
{
"description": "Enables the request_permissions command without any pre-configured scope.",
"type": "string",
"const": "allow-request-permissions",
"markdownDescription": "Enables the request_permissions command without any pre-configured scope."
},
{
"description": "Denies the request_permissions command without any pre-configured scope.",
"type": "string",
"const": "deny-request-permissions",
"markdownDescription": "Denies the request_permissions command without any pre-configured scope."
},
{
"description": "Enables the scan command without any pre-configured scope.",
"type": "string",
"const": "allow-scan",
"markdownDescription": "Enables the scan command without any pre-configured scope."
},
{
"description": "Denies the scan command without any pre-configured scope.",
"type": "string",
"const": "deny-scan",
"markdownDescription": "Denies the scan command without any pre-configured scope."
},
{
"description": "Enables the vibrate command without any pre-configured scope.",
"type": "string",
"const": "allow-vibrate",
"markdownDescription": "Enables the vibrate command without any pre-configured scope."
},
{
"description": "Denies the vibrate command without any pre-configured scope.",
"type": "string",
"const": "deny-vibrate",
"markdownDescription": "Denies the vibrate command without any pre-configured scope."
},
{
"description": "This permission set configures which\nbarcode scanning features are by default exposed.\n\n#### Granted Permissions\n\nIt allows all barcode related features.\n\n\n#### This default permission set includes:\n\n- `allow-cancel`\n- `allow-check-permissions`\n- `allow-open-app-settings`\n- `allow-request-permissions`\n- `allow-scan`\n- `allow-vibrate`",
"type": "string",
"const": "default",
"markdownDescription": "This permission set configures which\nbarcode scanning features are by default exposed.\n\n#### Granted Permissions\n\nIt allows all barcode related features.\n\n\n#### This default permission set includes:\n\n- `allow-cancel`\n- `allow-check-permissions`\n- `allow-open-app-settings`\n- `allow-request-permissions`\n- `allow-scan`\n- `allow-vibrate`"
} }
] ]
} }
+3
View File
@@ -1,4 +1,7 @@
{ {
"extends": "../../tsconfig.base.json", "extends": "../../tsconfig.base.json",
"compilerOptions": {
"rootDir": "guest-js"
},
"include": ["guest-js/*.ts"] "include": ["guest-js/*.ts"]
} }
+1 -1
View File
@@ -25,6 +25,6 @@
"LICENSE" "LICENSE"
], ],
"dependencies": { "dependencies": {
"@tauri-apps/api": "^2.10.1" "@tauri-apps/api": "^2.11.0"
} }
} }
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-authenticate"
description = "Enables the authenticate command without any pre-configured scope."
commands.allow = ["authenticate"]
[[permission]]
identifier = "deny-authenticate"
description = "Denies the authenticate command without any pre-configured scope."
commands.deny = ["authenticate"]
@@ -0,0 +1,5 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
commands = ["authenticate","status"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-status"
description = "Enables the status command without any pre-configured scope."
commands.allow = ["status"]
[[permission]]
identifier = "deny-status"
description = "Denies the status command without any pre-configured scope."
commands.deny = ["status"]
@@ -24,10 +24,17 @@
}, },
"permission": { "permission": {
"description": "A list of inlined permissions", "description": "A list of inlined permissions",
"default": [],
"type": "array", "type": "array",
"items": { "items": {
"$ref": "#/definitions/Permission" "$ref": "#/definitions/Permission"
},
"default": []
},
"commands": {
"description": "A list of command names that get `allow-$command` and `deny-$command` permissions\nautogenerated on demand instead of being stored as explicit permissions.\n\nSee [`Manifest::command_permission`] and the ACL resolver for how these are expanded.",
"type": "array",
"items": {
"type": "string"
} }
} }
}, },
@@ -35,9 +42,6 @@
"DefaultPermission": { "DefaultPermission": {
"description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.", "description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.",
"type": "object", "type": "object",
"required": [
"permissions"
],
"properties": { "properties": {
"version": { "version": {
"description": "The version of the permission.", "description": "The version of the permission.",
@@ -46,10 +50,10 @@
"null" "null"
], ],
"format": "uint64", "format": "uint64",
"minimum": 1.0 "minimum": 1
}, },
"description": { "description": {
"description": "Human-readable description of what the permission does. Tauri convention is to use `<h4>` headings in markdown content for Tauri documentation generation purposes.", "description": "Human-readable description of what the permission does.\nTauri convention is to use `<h4>` headings in markdown content\nfor Tauri documentation generation purposes.",
"type": [ "type": [
"string", "string",
"null" "null"
@@ -62,16 +66,14 @@
"type": "string" "type": "string"
} }
} }
} },
"required": [
"permissions"
]
}, },
"PermissionSet": { "PermissionSet": {
"description": "A set of direct permissions grouped together under a new name.", "description": "A set of direct permissions grouped together under a new name.",
"type": "object", "type": "object",
"required": [
"description",
"identifier",
"permissions"
],
"properties": { "properties": {
"identifier": { "identifier": {
"description": "A unique identifier for the permission.", "description": "A unique identifier for the permission.",
@@ -85,17 +87,19 @@
"description": "All permissions this set contains.", "description": "All permissions this set contains.",
"type": "array", "type": "array",
"items": { "items": {
"$ref": "#/definitions/PermissionKind" "type": "string"
} }
} }
} },
"required": [
"identifier",
"description",
"permissions"
]
}, },
"Permission": { "Permission": {
"description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.", "description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.",
"type": "object", "type": "object",
"required": [
"identifier"
],
"properties": { "properties": {
"version": { "version": {
"description": "The version of the permission.", "description": "The version of the permission.",
@@ -104,14 +108,14 @@
"null" "null"
], ],
"format": "uint64", "format": "uint64",
"minimum": 1.0 "minimum": 1
}, },
"identifier": { "identifier": {
"description": "A unique identifier for the permission.", "description": "A unique identifier for the permission.",
"type": "string" "type": "string"
}, },
"description": { "description": {
"description": "Human-readable description of what the permission does. Tauri internal convention is to use `<h4>` headings in markdown content for Tauri documentation generation purposes.", "description": "Human-readable description of what the permission does.\nTauri internal convention is to use `<h4>` headings in markdown content\nfor Tauri documentation generation purposes.",
"type": [ "type": [
"string", "string",
"null" "null"
@@ -147,7 +151,10 @@
"$ref": "#/definitions/Target" "$ref": "#/definitions/Target"
} }
} }
} },
"required": [
"identifier"
]
}, },
"Commands": { "Commands": {
"description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.", "description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.",
@@ -155,24 +162,24 @@
"properties": { "properties": {
"allow": { "allow": {
"description": "Allowed command.", "description": "Allowed command.",
"default": [],
"type": "array", "type": "array",
"items": { "items": {
"type": "string" "type": "string"
} },
"default": []
}, },
"deny": { "deny": {
"description": "Denied command, which takes priority.", "description": "Denied command, which takes priority.",
"default": [],
"type": "array", "type": "array",
"items": { "items": {
"type": "string" "type": "string"
} },
"default": []
} }
} }
}, },
"Scopes": { "Scopes": {
"description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command. The configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json { \"allow\": [{ \"path\": \"$HOME/**\" }], \"deny\": [{ \"path\": \"$HOME/secret.txt\" }] } ```", "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command.\nThe configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json\n{\n \"allow\": [{ \"path\": \"$HOME/**\" }],\n \"deny\": [{ \"path\": \"$HOME/secret.txt\" }]\n}\n```",
"type": "object", "type": "object",
"properties": { "properties": {
"allow": { "allow": {
@@ -257,72 +264,27 @@
{ {
"description": "MacOS.", "description": "MacOS.",
"type": "string", "type": "string",
"enum": [ "const": "macOS"
"macOS"
]
}, },
{ {
"description": "Windows.", "description": "Windows.",
"type": "string", "type": "string",
"enum": [ "const": "windows"
"windows"
]
}, },
{ {
"description": "Linux.", "description": "Linux.",
"type": "string", "type": "string",
"enum": [ "const": "linux"
"linux"
]
}, },
{ {
"description": "Android.", "description": "Android.",
"type": "string", "type": "string",
"enum": [ "const": "android"
"android"
]
}, },
{ {
"description": "iOS.", "description": "iOS.",
"type": "string", "type": "string",
"enum": [ "const": "iOS"
"iOS"
]
}
]
},
"PermissionKind": {
"type": "string",
"oneOf": [
{
"description": "Enables the authenticate command without any pre-configured scope.",
"type": "string",
"const": "allow-authenticate",
"markdownDescription": "Enables the authenticate command without any pre-configured scope."
},
{
"description": "Denies the authenticate command without any pre-configured scope.",
"type": "string",
"const": "deny-authenticate",
"markdownDescription": "Denies the authenticate command without any pre-configured scope."
},
{
"description": "Enables the status command without any pre-configured scope.",
"type": "string",
"const": "allow-status",
"markdownDescription": "Enables the status command without any pre-configured scope."
},
{
"description": "Denies the status command without any pre-configured scope.",
"type": "string",
"const": "deny-status",
"markdownDescription": "Denies the status command without any pre-configured scope."
},
{
"description": "This permission set configures which\nbiometric features are by default exposed.\n\n#### Granted Permissions\n\nIt allows acccess to all biometric commands.\n\n\n#### This default permission set includes:\n\n- `allow-authenticate`\n- `allow-status`",
"type": "string",
"const": "default",
"markdownDescription": "This permission set configures which\nbiometric features are by default exposed.\n\n#### Granted Permissions\n\nIt allows acccess to all biometric commands.\n\n\n#### This default permission set includes:\n\n- `allow-authenticate`\n- `allow-status`"
} }
] ]
} }
+3
View File
@@ -1,4 +1,7 @@
{ {
"extends": "../../tsconfig.base.json", "extends": "../../tsconfig.base.json",
"compilerOptions": {
"rootDir": "guest-js"
},
"include": ["guest-js/*.ts"] "include": ["guest-js/*.ts"]
} }
+1 -1
View File
@@ -24,6 +24,6 @@
"LICENSE" "LICENSE"
], ],
"dependencies": { "dependencies": {
"@tauri-apps/api": "^2.10.1" "@tauri-apps/api": "^2.11.0"
} }
} }
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-cli-matches"
description = "Enables the cli_matches command without any pre-configured scope."
commands.allow = ["cli_matches"]
[[permission]]
identifier = "deny-cli-matches"
description = "Denies the cli_matches command without any pre-configured scope."
commands.deny = ["cli_matches"]
@@ -0,0 +1,5 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
commands = ["cli_matches"]
+37 -63
View File
@@ -24,10 +24,17 @@
}, },
"permission": { "permission": {
"description": "A list of inlined permissions", "description": "A list of inlined permissions",
"default": [],
"type": "array", "type": "array",
"items": { "items": {
"$ref": "#/definitions/Permission" "$ref": "#/definitions/Permission"
},
"default": []
},
"commands": {
"description": "A list of command names that get `allow-$command` and `deny-$command` permissions\nautogenerated on demand instead of being stored as explicit permissions.\n\nSee [`Manifest::command_permission`] and the ACL resolver for how these are expanded.",
"type": "array",
"items": {
"type": "string"
} }
} }
}, },
@@ -35,9 +42,6 @@
"DefaultPermission": { "DefaultPermission": {
"description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.", "description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.",
"type": "object", "type": "object",
"required": [
"permissions"
],
"properties": { "properties": {
"version": { "version": {
"description": "The version of the permission.", "description": "The version of the permission.",
@@ -46,10 +50,10 @@
"null" "null"
], ],
"format": "uint64", "format": "uint64",
"minimum": 1.0 "minimum": 1
}, },
"description": { "description": {
"description": "Human-readable description of what the permission does. Tauri convention is to use `<h4>` headings in markdown content for Tauri documentation generation purposes.", "description": "Human-readable description of what the permission does.\nTauri convention is to use `<h4>` headings in markdown content\nfor Tauri documentation generation purposes.",
"type": [ "type": [
"string", "string",
"null" "null"
@@ -62,16 +66,14 @@
"type": "string" "type": "string"
} }
} }
} },
"required": [
"permissions"
]
}, },
"PermissionSet": { "PermissionSet": {
"description": "A set of direct permissions grouped together under a new name.", "description": "A set of direct permissions grouped together under a new name.",
"type": "object", "type": "object",
"required": [
"description",
"identifier",
"permissions"
],
"properties": { "properties": {
"identifier": { "identifier": {
"description": "A unique identifier for the permission.", "description": "A unique identifier for the permission.",
@@ -85,17 +87,19 @@
"description": "All permissions this set contains.", "description": "All permissions this set contains.",
"type": "array", "type": "array",
"items": { "items": {
"$ref": "#/definitions/PermissionKind" "type": "string"
} }
} }
} },
"required": [
"identifier",
"description",
"permissions"
]
}, },
"Permission": { "Permission": {
"description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.", "description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.",
"type": "object", "type": "object",
"required": [
"identifier"
],
"properties": { "properties": {
"version": { "version": {
"description": "The version of the permission.", "description": "The version of the permission.",
@@ -104,14 +108,14 @@
"null" "null"
], ],
"format": "uint64", "format": "uint64",
"minimum": 1.0 "minimum": 1
}, },
"identifier": { "identifier": {
"description": "A unique identifier for the permission.", "description": "A unique identifier for the permission.",
"type": "string" "type": "string"
}, },
"description": { "description": {
"description": "Human-readable description of what the permission does. Tauri internal convention is to use `<h4>` headings in markdown content for Tauri documentation generation purposes.", "description": "Human-readable description of what the permission does.\nTauri internal convention is to use `<h4>` headings in markdown content\nfor Tauri documentation generation purposes.",
"type": [ "type": [
"string", "string",
"null" "null"
@@ -147,7 +151,10 @@
"$ref": "#/definitions/Target" "$ref": "#/definitions/Target"
} }
} }
} },
"required": [
"identifier"
]
}, },
"Commands": { "Commands": {
"description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.", "description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.",
@@ -155,24 +162,24 @@
"properties": { "properties": {
"allow": { "allow": {
"description": "Allowed command.", "description": "Allowed command.",
"default": [],
"type": "array", "type": "array",
"items": { "items": {
"type": "string" "type": "string"
} },
"default": []
}, },
"deny": { "deny": {
"description": "Denied command, which takes priority.", "description": "Denied command, which takes priority.",
"default": [],
"type": "array", "type": "array",
"items": { "items": {
"type": "string" "type": "string"
} },
"default": []
} }
} }
}, },
"Scopes": { "Scopes": {
"description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command. The configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json { \"allow\": [{ \"path\": \"$HOME/**\" }], \"deny\": [{ \"path\": \"$HOME/secret.txt\" }] } ```", "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command.\nThe configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json\n{\n \"allow\": [{ \"path\": \"$HOME/**\" }],\n \"deny\": [{ \"path\": \"$HOME/secret.txt\" }]\n}\n```",
"type": "object", "type": "object",
"properties": { "properties": {
"allow": { "allow": {
@@ -257,60 +264,27 @@
{ {
"description": "MacOS.", "description": "MacOS.",
"type": "string", "type": "string",
"enum": [ "const": "macOS"
"macOS"
]
}, },
{ {
"description": "Windows.", "description": "Windows.",
"type": "string", "type": "string",
"enum": [ "const": "windows"
"windows"
]
}, },
{ {
"description": "Linux.", "description": "Linux.",
"type": "string", "type": "string",
"enum": [ "const": "linux"
"linux"
]
}, },
{ {
"description": "Android.", "description": "Android.",
"type": "string", "type": "string",
"enum": [ "const": "android"
"android"
]
}, },
{ {
"description": "iOS.", "description": "iOS.",
"type": "string", "type": "string",
"enum": [ "const": "iOS"
"iOS"
]
}
]
},
"PermissionKind": {
"type": "string",
"oneOf": [
{
"description": "Enables the cli_matches command without any pre-configured scope.",
"type": "string",
"const": "allow-cli-matches",
"markdownDescription": "Enables the cli_matches command without any pre-configured scope."
},
{
"description": "Denies the cli_matches command without any pre-configured scope.",
"type": "string",
"const": "deny-cli-matches",
"markdownDescription": "Denies the cli_matches command without any pre-configured scope."
},
{
"description": "Allows reading the CLI matches\n#### This default permission set includes:\n\n- `allow-cli-matches`",
"type": "string",
"const": "default",
"markdownDescription": "Allows reading the CLI matches\n#### This default permission set includes:\n\n- `allow-cli-matches`"
} }
] ]
} }
+3
View File
@@ -1,4 +1,7 @@
{ {
"extends": "../../tsconfig.base.json", "extends": "../../tsconfig.base.json",
"compilerOptions": {
"rootDir": "guest-js"
},
"include": ["guest-js/*.ts"] "include": ["guest-js/*.ts"]
} }
+1 -1
View File
@@ -1 +1 @@
if("__TAURI__"in window){var __TAURI_PLUGIN_CLIPBOARD_MANAGER__=function(e){"use strict";var n;async function t(e,n={},t){return window.__TAURI_INTERNALS__.invoke(e,n,t)}"function"==typeof SuppressedError&&SuppressedError;class r{get rid(){return function(e,n,t,r){if("function"==typeof n?e!==n||!r:!n.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===t?r:"a"===t?r.call(e):r?r.value:n.get(e)}(this,n,"f")}constructor(e){n.set(this,void 0),function(e,n,t){if("function"==typeof n||!n.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");n.set(e,t)}(this,n,e)}async close(){return t("plugin:resources|close",{rid:this.rid})}}n=new WeakMap;class a extends r{constructor(e){super(e)}static async new(e,n,r){return t("plugin:image|new",{rgba:i(e),width:n,height:r}).then((e=>new a(e)))}static async fromBytes(e){return t("plugin:image|from_bytes",{bytes:i(e)}).then((e=>new a(e)))}static async fromPath(e){return t("plugin:image|from_path",{path:e}).then((e=>new a(e)))}async rgba(){return t("plugin:image|rgba",{rid:this.rid}).then((e=>new Uint8Array(e)))}async size(){return t("plugin:image|size",{rid:this.rid})}}function i(e){return null==e?null:"string"==typeof e?e:e instanceof a?e.rid:e}return e.clear=async function(){await t("plugin:clipboard-manager|clear")},e.readImage=async function(){return await t("plugin:clipboard-manager|read_image").then((e=>new a(e)))},e.readText=async function(){return await t("plugin:clipboard-manager|read_text")},e.writeHtml=async function(e,n){await t("plugin:clipboard-manager|write_html",{html:e,altText:n})},e.writeImage=async function(e){await t("plugin:clipboard-manager|write_image",{image:i(e)})},e.writeText=async function(e,n){await t("plugin:clipboard-manager|write_text",{label:n?.label,text:e})},e}({});Object.defineProperty(window.__TAURI__,"clipboardManager",{value:__TAURI_PLUGIN_CLIPBOARD_MANAGER__})} if("__TAURI__"in window){var __TAURI_PLUGIN_CLIPBOARD_MANAGER__=function(e){"use strict";var n;async function t(e,n={},t){return window.__TAURI_INTERNALS__.invoke(e,n,t)}"function"==typeof SuppressedError&&SuppressedError;class r{get rid(){return function(e,n,t,r){if("function"==typeof n?e!==n||!r:!n.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===t?r:"a"===t?r.call(e):r?r.value:n.get(e)}(this,n,"f")}constructor(e){n.set(this,void 0),function(e,n,t){if("function"==typeof n||!n.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");n.set(e,t)}(this,n,e)}async close(){return t("plugin:resources|close",{rid:this.rid})}}n=new WeakMap;class a extends r{constructor(e){super(e)}static async new(e,n,r){return t("plugin:image|new",{rgba:i(e),width:n,height:r}).then(e=>new a(e))}static async fromBytes(e){return t("plugin:image|from_bytes",{bytes:i(e)}).then(e=>new a(e))}static async fromPath(e){return t("plugin:image|from_path",{path:e}).then(e=>new a(e))}async rgba(){return t("plugin:image|rgba",{rid:this.rid}).then(e=>new Uint8Array(e))}async size(){return t("plugin:image|size",{rid:this.rid})}}function i(e){return null==e?null:"string"==typeof e?e:e instanceof a?e.rid:e}return e.clear=async function(){await t("plugin:clipboard-manager|clear")},e.readImage=async function(){return await t("plugin:clipboard-manager|read_image").then(e=>new a(e))},e.readText=async function(){return await t("plugin:clipboard-manager|read_text")},e.writeHtml=async function(e,n){await t("plugin:clipboard-manager|write_html",{html:e,altText:n})},e.writeImage=async function(e){await t("plugin:clipboard-manager|write_image",{image:i(e)})},e.writeText=async function(e,n){await t("plugin:clipboard-manager|write_text",{label:n?.label,text:e})},e}({});Object.defineProperty(window.__TAURI__,"clipboardManager",{value:__TAURI_PLUGIN_CLIPBOARD_MANAGER__})}
+1 -1
View File
@@ -24,6 +24,6 @@
"LICENSE" "LICENSE"
], ],
"dependencies": { "dependencies": {
"@tauri-apps/api": "^2.10.1" "@tauri-apps/api": "^2.11.0"
} }
} }
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-clear"
description = "Enables the clear command without any pre-configured scope."
commands.allow = ["clear"]
[[permission]]
identifier = "deny-clear"
description = "Denies the clear command without any pre-configured scope."
commands.deny = ["clear"]
@@ -0,0 +1,5 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
commands = ["write_text","read_text","write_image","read_image","write_html","clear"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-read-image"
description = "Enables the read_image command without any pre-configured scope."
commands.allow = ["read_image"]
[[permission]]
identifier = "deny-read-image"
description = "Denies the read_image command without any pre-configured scope."
commands.deny = ["read_image"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-read-text"
description = "Enables the read_text command without any pre-configured scope."
commands.allow = ["read_text"]
[[permission]]
identifier = "deny-read-text"
description = "Denies the read_text command without any pre-configured scope."
commands.deny = ["read_text"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-write-html"
description = "Enables the write_html command without any pre-configured scope."
commands.allow = ["write_html"]
[[permission]]
identifier = "deny-write-html"
description = "Denies the write_html command without any pre-configured scope."
commands.deny = ["write_html"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-write-image"
description = "Enables the write_image command without any pre-configured scope."
commands.allow = ["write_image"]
[[permission]]
identifier = "deny-write-image"
description = "Denies the write_image command without any pre-configured scope."
commands.deny = ["write_image"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-write-text"
description = "Enables the write_text command without any pre-configured scope."
commands.allow = ["write_text"]
[[permission]]
identifier = "deny-write-text"
description = "Denies the write_text command without any pre-configured scope."
commands.deny = ["write_text"]
@@ -24,10 +24,17 @@
}, },
"permission": { "permission": {
"description": "A list of inlined permissions", "description": "A list of inlined permissions",
"default": [],
"type": "array", "type": "array",
"items": { "items": {
"$ref": "#/definitions/Permission" "$ref": "#/definitions/Permission"
},
"default": []
},
"commands": {
"description": "A list of command names that get `allow-$command` and `deny-$command` permissions\nautogenerated on demand instead of being stored as explicit permissions.\n\nSee [`Manifest::command_permission`] and the ACL resolver for how these are expanded.",
"type": "array",
"items": {
"type": "string"
} }
} }
}, },
@@ -35,9 +42,6 @@
"DefaultPermission": { "DefaultPermission": {
"description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.", "description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.",
"type": "object", "type": "object",
"required": [
"permissions"
],
"properties": { "properties": {
"version": { "version": {
"description": "The version of the permission.", "description": "The version of the permission.",
@@ -46,10 +50,10 @@
"null" "null"
], ],
"format": "uint64", "format": "uint64",
"minimum": 1.0 "minimum": 1
}, },
"description": { "description": {
"description": "Human-readable description of what the permission does. Tauri convention is to use `<h4>` headings in markdown content for Tauri documentation generation purposes.", "description": "Human-readable description of what the permission does.\nTauri convention is to use `<h4>` headings in markdown content\nfor Tauri documentation generation purposes.",
"type": [ "type": [
"string", "string",
"null" "null"
@@ -62,16 +66,14 @@
"type": "string" "type": "string"
} }
} }
} },
"required": [
"permissions"
]
}, },
"PermissionSet": { "PermissionSet": {
"description": "A set of direct permissions grouped together under a new name.", "description": "A set of direct permissions grouped together under a new name.",
"type": "object", "type": "object",
"required": [
"description",
"identifier",
"permissions"
],
"properties": { "properties": {
"identifier": { "identifier": {
"description": "A unique identifier for the permission.", "description": "A unique identifier for the permission.",
@@ -85,17 +87,19 @@
"description": "All permissions this set contains.", "description": "All permissions this set contains.",
"type": "array", "type": "array",
"items": { "items": {
"$ref": "#/definitions/PermissionKind" "type": "string"
} }
} }
} },
"required": [
"identifier",
"description",
"permissions"
]
}, },
"Permission": { "Permission": {
"description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.", "description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.",
"type": "object", "type": "object",
"required": [
"identifier"
],
"properties": { "properties": {
"version": { "version": {
"description": "The version of the permission.", "description": "The version of the permission.",
@@ -104,14 +108,14 @@
"null" "null"
], ],
"format": "uint64", "format": "uint64",
"minimum": 1.0 "minimum": 1
}, },
"identifier": { "identifier": {
"description": "A unique identifier for the permission.", "description": "A unique identifier for the permission.",
"type": "string" "type": "string"
}, },
"description": { "description": {
"description": "Human-readable description of what the permission does. Tauri internal convention is to use `<h4>` headings in markdown content for Tauri documentation generation purposes.", "description": "Human-readable description of what the permission does.\nTauri internal convention is to use `<h4>` headings in markdown content\nfor Tauri documentation generation purposes.",
"type": [ "type": [
"string", "string",
"null" "null"
@@ -147,7 +151,10 @@
"$ref": "#/definitions/Target" "$ref": "#/definitions/Target"
} }
} }
} },
"required": [
"identifier"
]
}, },
"Commands": { "Commands": {
"description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.", "description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.",
@@ -155,24 +162,24 @@
"properties": { "properties": {
"allow": { "allow": {
"description": "Allowed command.", "description": "Allowed command.",
"default": [],
"type": "array", "type": "array",
"items": { "items": {
"type": "string" "type": "string"
} },
"default": []
}, },
"deny": { "deny": {
"description": "Denied command, which takes priority.", "description": "Denied command, which takes priority.",
"default": [],
"type": "array", "type": "array",
"items": { "items": {
"type": "string" "type": "string"
} },
"default": []
} }
} }
}, },
"Scopes": { "Scopes": {
"description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command. The configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json { \"allow\": [{ \"path\": \"$HOME/**\" }], \"deny\": [{ \"path\": \"$HOME/secret.txt\" }] } ```", "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command.\nThe configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json\n{\n \"allow\": [{ \"path\": \"$HOME/**\" }],\n \"deny\": [{ \"path\": \"$HOME/secret.txt\" }]\n}\n```",
"type": "object", "type": "object",
"properties": { "properties": {
"allow": { "allow": {
@@ -257,120 +264,27 @@
{ {
"description": "MacOS.", "description": "MacOS.",
"type": "string", "type": "string",
"enum": [ "const": "macOS"
"macOS"
]
}, },
{ {
"description": "Windows.", "description": "Windows.",
"type": "string", "type": "string",
"enum": [ "const": "windows"
"windows"
]
}, },
{ {
"description": "Linux.", "description": "Linux.",
"type": "string", "type": "string",
"enum": [ "const": "linux"
"linux"
]
}, },
{ {
"description": "Android.", "description": "Android.",
"type": "string", "type": "string",
"enum": [ "const": "android"
"android"
]
}, },
{ {
"description": "iOS.", "description": "iOS.",
"type": "string", "type": "string",
"enum": [ "const": "iOS"
"iOS"
]
}
]
},
"PermissionKind": {
"type": "string",
"oneOf": [
{
"description": "Enables the clear command without any pre-configured scope.",
"type": "string",
"const": "allow-clear",
"markdownDescription": "Enables the clear command without any pre-configured scope."
},
{
"description": "Denies the clear command without any pre-configured scope.",
"type": "string",
"const": "deny-clear",
"markdownDescription": "Denies the clear command without any pre-configured scope."
},
{
"description": "Enables the read_image command without any pre-configured scope.",
"type": "string",
"const": "allow-read-image",
"markdownDescription": "Enables the read_image command without any pre-configured scope."
},
{
"description": "Denies the read_image command without any pre-configured scope.",
"type": "string",
"const": "deny-read-image",
"markdownDescription": "Denies the read_image command without any pre-configured scope."
},
{
"description": "Enables the read_text command without any pre-configured scope.",
"type": "string",
"const": "allow-read-text",
"markdownDescription": "Enables the read_text command without any pre-configured scope."
},
{
"description": "Denies the read_text command without any pre-configured scope.",
"type": "string",
"const": "deny-read-text",
"markdownDescription": "Denies the read_text command without any pre-configured scope."
},
{
"description": "Enables the write_html command without any pre-configured scope.",
"type": "string",
"const": "allow-write-html",
"markdownDescription": "Enables the write_html command without any pre-configured scope."
},
{
"description": "Denies the write_html command without any pre-configured scope.",
"type": "string",
"const": "deny-write-html",
"markdownDescription": "Denies the write_html command without any pre-configured scope."
},
{
"description": "Enables the write_image command without any pre-configured scope.",
"type": "string",
"const": "allow-write-image",
"markdownDescription": "Enables the write_image command without any pre-configured scope."
},
{
"description": "Denies the write_image command without any pre-configured scope.",
"type": "string",
"const": "deny-write-image",
"markdownDescription": "Denies the write_image command without any pre-configured scope."
},
{
"description": "Enables the write_text command without any pre-configured scope.",
"type": "string",
"const": "allow-write-text",
"markdownDescription": "Enables the write_text command without any pre-configured scope."
},
{
"description": "Denies the write_text command without any pre-configured scope.",
"type": "string",
"const": "deny-write-text",
"markdownDescription": "Denies the write_text command without any pre-configured scope."
},
{
"description": "No features are enabled by default, as we believe\nthe clipboard can be inherently dangerous and it is \napplication specific if read and/or write access is needed.\n\nClipboard interaction needs to be explicitly enabled.\n",
"type": "string",
"const": "default",
"markdownDescription": "No features are enabled by default, as we believe\nthe clipboard can be inherently dangerous and it is \napplication specific if read and/or write access is needed.\n\nClipboard interaction needs to be explicitly enabled.\n"
} }
] ]
} }
+3
View File
@@ -1,4 +1,7 @@
{ {
"extends": "../../tsconfig.base.json", "extends": "../../tsconfig.base.json",
"compilerOptions": {
"rootDir": "guest-js"
},
"include": ["guest-js/*.ts"] "include": ["guest-js/*.ts"]
} }
+13
View File
@@ -1,5 +1,18 @@
# Changelog # Changelog
## \[2.4.9]
- [`e6cdc9f5`](https://github.com/tauri-apps/plugins-workspace/commit/e6cdc9f52e2cd975b11b8e4c12879d597f1f76c3) ([#3396](https://github.com/tauri-apps/plugins-workspace/pull/3396) by [@Legend-Master](https://github.com/tauri-apps/plugins-workspace/../../Legend-Master)) Fix broken iOS custom URL schemes
## \[2.4.8]
- [`024ec0c2`](https://github.com/tauri-apps/plugins-workspace/commit/024ec0c29c20cf94579dab9b79d6be0da61a8daa) ([#3214](https://github.com/tauri-apps/plugins-workspace/pull/3214) by [@joshIsCoding](https://github.com/tauri-apps/plugins-workspace/../../joshIsCoding)) Account for differing Android VIEW intent in ChromeOS, fixing deep-link behaviour on Chromium platforms.
- [`015e817c`](https://github.com/tauri-apps/plugins-workspace/commit/015e817cf2d7f66c1b9268606af8318dfe0bc4ee) ([#3186](https://github.com/tauri-apps/plugins-workspace/pull/3186) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Validate Android new intent is actually a deep link before triggering the onOpenUrl event.
## \[2.4.7]
- [`8374e997`](https://github.com/tauri-apps/plugins-workspace/commit/8374e997b82c95516fc0c1f6d665d9fc3b52edf8) ([#3258](https://github.com/tauri-apps/plugins-workspace/pull/3258) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Fix runtime deep link registration failing on Linux when the app path has spaces.
## \[2.4.6] ## \[2.4.6]
- [`28048039`](https://github.com/tauri-apps/plugins-workspace/commit/28048039496e84b46847c008416d341f1349e30e) ([#3143](https://github.com/tauri-apps/plugins-workspace/pull/3143) by [@Tunglies](https://github.com/tauri-apps/plugins-workspace/../../Tunglies)) Fix clippy warnings. No user facing changes. - [`28048039`](https://github.com/tauri-apps/plugins-workspace/commit/28048039496e84b46847c008416d341f1349e30e) ([#3143](https://github.com/tauri-apps/plugins-workspace/pull/3143) by [@Tunglies](https://github.com/tauri-apps/plugins-workspace/../../Tunglies)) Fix clippy warnings. No user facing changes.
+1 -1
View File
@@ -1,6 +1,6 @@
[package] [package]
name = "tauri-plugin-deep-link" name = "tauri-plugin-deep-link"
version = "2.4.6" version = "2.4.9"
description = "Set your Tauri application as the default handler for an URL" description = "Set your Tauri application as the default handler for an URL"
authors = { workspace = true } authors = { workspace = true }
license = { workspace = true } license = { workspace = true }
@@ -6,9 +6,8 @@ package app.tauri.deep_link
import android.app.Activity import android.app.Activity
import android.content.Intent import android.content.Intent
import android.os.Bundle import android.os.PatternMatcher
import android.webkit.WebView import android.webkit.WebView
import app.tauri.Logger
import app.tauri.annotation.InvokeArg import app.tauri.annotation.InvokeArg
import app.tauri.annotation.Command import app.tauri.annotation.Command
import app.tauri.annotation.TauriPlugin import app.tauri.annotation.TauriPlugin
@@ -16,23 +15,43 @@ import app.tauri.plugin.Channel
import app.tauri.plugin.JSObject import app.tauri.plugin.JSObject
import app.tauri.plugin.Plugin import app.tauri.plugin.Plugin
import app.tauri.plugin.Invoke import app.tauri.plugin.Invoke
import androidx.core.net.toUri
@InvokeArg @InvokeArg
class SetEventHandlerArgs { class SetEventHandlerArgs {
lateinit var handler: Channel lateinit var handler: Channel
} }
@InvokeArg
class AssociatedDomain {
var scheme: List<String> = listOf("https", "http")
var host: String? = null
var path: List<String> = listOf()
var pathPattern: List<String> = listOf()
var pathPrefix: List<String> = listOf()
var pathSuffix: List<String> = listOf()
}
@InvokeArg
class PluginConfig {
var mobile: List<AssociatedDomain> = listOf()
}
@TauriPlugin @TauriPlugin
class DeepLinkPlugin(private val activity: Activity): Plugin(activity) { class DeepLinkPlugin(private val activity: Activity): Plugin(activity) {
//private val implementation = Example() //private val implementation = Example()
private var webView: WebView? = null private var webView: WebView? = null
private var currentUrl: String? = null private var currentUrl: String? = null
private var channel: Channel? = null private var channel: Channel? = null
private var config: PluginConfig? = null
companion object { companion object {
var instance: DeepLinkPlugin? = null var instance: DeepLinkPlugin? = null
} }
private fun isViewIntent(action: String?): Boolean {
return action == Intent.ACTION_VIEW || action == "org.chromium.arc.intent.action.VIEW"
}
@Command @Command
fun getCurrent(invoke: Invoke) { fun getCurrent(invoke: Invoke) {
val ret = JSObject() val ret = JSObject()
@@ -51,27 +70,105 @@ class DeepLinkPlugin(private val activity: Activity): Plugin(activity) {
override fun load(webView: WebView) { override fun load(webView: WebView) {
instance = this instance = this
config = getConfig(PluginConfig::class.java)
val intent = activity.intent
if (intent.action == Intent.ACTION_VIEW) {
// TODO: check if it makes sense to split up init url and last url
this.currentUrl = intent.data.toString()
val event = JSObject()
event.put("url", this.currentUrl)
this.channel?.send(event)
}
super.load(webView) super.load(webView)
this.webView = webView this.webView = webView
val intent = activity.intent
if (isViewIntent(intent.action) && intent.data != null) {
val url = intent.data.toString()
if (isDeepLink(url)) {
// TODO: check if it makes sense to split up init url and last url
this.currentUrl = url
val event = JSObject()
event.put("url", this.currentUrl)
this.channel?.send(event)
}
}
} }
override fun onNewIntent(intent: Intent) { override fun onNewIntent(intent: Intent) {
if (intent.action == Intent.ACTION_VIEW) { if (isViewIntent(intent.action) && intent.data != null) {
this.currentUrl = intent.data.toString() val url = intent.data.toString()
val event = JSObject() if (isDeepLink(url)) {
event.put("url", this.currentUrl) this.currentUrl = url
this.channel?.send(event) val event = JSObject()
event.put("url", this.currentUrl)
this.channel?.send(event)
}
} }
} }
private fun isDeepLink(url: String): Boolean {
val config = this.config ?: return false
if (config.mobile.isEmpty()) {
return false
}
val uri = try {
url.toUri()
} catch (_: Exception) {
// not a URL
return false
}
val scheme = uri.scheme ?: return false
val host = uri.host
val path = uri.path ?: ""
// Check if URL matches any configured mobile deep link
for (domain in config.mobile) {
// Check scheme
if (!domain.scheme.any { it.equals(scheme, ignoreCase = true) }) {
continue
}
// Check host (if configured)
if (domain.host != null) {
if (!host.equals(domain.host, ignoreCase = true)) {
continue
}
}
// Check path constraints
// According to Android docs:
// - path: exact match, must begin with /
// - pathPrefix: matches initial part of path
// - pathSuffix: matches ending part, doesn't need to begin with /
// - pathPattern: simple glob pattern (., *, .*)
val pathMatches = when {
// Exact path match (must begin with /)
domain.path.isNotEmpty() && domain.path.any { it == path } -> true
// Path pattern match (simple glob: ., *, .*)
domain.pathPattern.isNotEmpty() && domain.pathPattern.any { pattern ->
try {
PatternMatcher(pattern, PatternMatcher.PATTERN_SIMPLE_GLOB).match(path)
} catch (e: Exception) {
false
}
} -> true
// Path prefix match
domain.pathPrefix.isNotEmpty() && domain.pathPrefix.any { prefix ->
path.startsWith(prefix)
} -> true
// Path suffix match
domain.pathSuffix.isNotEmpty() && domain.pathSuffix.any { suffix ->
path.endsWith(suffix)
} -> true
// If no path constraints, any path is allowed
domain.path.isEmpty() && domain.pathPattern.isEmpty() &&
domain.pathPrefix.isEmpty() && domain.pathSuffix.isEmpty() -> true
else -> false
}
if (pathMatches) {
return true
}
}
return false
}
} }
+1 -1
View File
@@ -1 +1 @@
if("__TAURI__"in window){var __TAURI_PLUGIN_DEEP_LINK__=function(e){"use strict";function n(e,n=!1){return window.__TAURI_INTERNALS__.transformCallback(e,n)}async function r(e,n={},r){return window.__TAURI_INTERNALS__.invoke(e,n,r)}var t;async function i(e,t,i){const _={kind:"Any"};return r("plugin:event|listen",{event:e,target:_,handler:n(t)}).then((n=>async()=>async function(e,n){window.__TAURI_EVENT_PLUGIN_INTERNALS__.unregisterListener(e,n),await r("plugin:event|unlisten",{event:e,eventId:n})}(e,n)))}return"function"==typeof SuppressedError&&SuppressedError,function(e){e.WINDOW_RESIZED="tauri://resize",e.WINDOW_MOVED="tauri://move",e.WINDOW_CLOSE_REQUESTED="tauri://close-requested",e.WINDOW_DESTROYED="tauri://destroyed",e.WINDOW_FOCUS="tauri://focus",e.WINDOW_BLUR="tauri://blur",e.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",e.WINDOW_THEME_CHANGED="tauri://theme-changed",e.WINDOW_CREATED="tauri://window-created",e.WEBVIEW_CREATED="tauri://webview-created",e.DRAG_ENTER="tauri://drag-enter",e.DRAG_OVER="tauri://drag-over",e.DRAG_DROP="tauri://drag-drop",e.DRAG_LEAVE="tauri://drag-leave"}(t||(t={})),e.getCurrent=async function(){return await r("plugin:deep-link|get_current")},e.isRegistered=async function(e){return await r("plugin:deep-link|is_registered",{protocol:e})},e.onOpenUrl=async function(e){return await i("deep-link://new-url",(n=>{e(n.payload)}))},e.register=async function(e){return await r("plugin:deep-link|register",{protocol:e})},e.unregister=async function(e){return await r("plugin:deep-link|unregister",{protocol:e})},e}({});Object.defineProperty(window.__TAURI__,"deepLink",{value:__TAURI_PLUGIN_DEEP_LINK__})} if("__TAURI__"in window){var __TAURI_PLUGIN_DEEP_LINK__=function(e){"use strict";function n(e,n=!1){return window.__TAURI_INTERNALS__.transformCallback(e,n)}async function r(e,n={},r){return window.__TAURI_INTERNALS__.invoke(e,n,r)}var t;async function i(e,t,i){const _={kind:"Any"};return r("plugin:event|listen",{event:e,target:_,handler:n(t)}).then(n=>async()=>async function(e,n){window.__TAURI_EVENT_PLUGIN_INTERNALS__.unregisterListener(e,n),await r("plugin:event|unlisten",{event:e,eventId:n})}(e,n))}return"function"==typeof SuppressedError&&SuppressedError,function(e){e.WINDOW_RESIZED="tauri://resize",e.WINDOW_MOVED="tauri://move",e.WINDOW_CLOSE_REQUESTED="tauri://close-requested",e.WINDOW_DESTROYED="tauri://destroyed",e.WINDOW_FOCUS="tauri://focus",e.WINDOW_BLUR="tauri://blur",e.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",e.WINDOW_THEME_CHANGED="tauri://theme-changed",e.WINDOW_CREATED="tauri://window-created",e.WINDOW_SUSPENDED="tauri://suspended",e.WINDOW_RESUMED="tauri://resumed",e.WEBVIEW_CREATED="tauri://webview-created",e.DRAG_ENTER="tauri://drag-enter",e.DRAG_OVER="tauri://drag-over",e.DRAG_DROP="tauri://drag-drop",e.DRAG_LEAVE="tauri://drag-leave"}(t||(t={})),e.getCurrent=async function(){return await r("plugin:deep-link|get_current")},e.isRegistered=async function(e){return await r("plugin:deep-link|is_registered",{protocol:e})},e.onOpenUrl=async function(e){return await i("deep-link://new-url",n=>{e(n.payload)})},e.register=async function(e){return await r("plugin:deep-link|register",{protocol:e})},e.unregister=async function(e){return await r("plugin:deep-link|unregister",{protocol:e})},e}({});Object.defineProperty(window.__TAURI__,"deepLink",{value:__TAURI_PLUGIN_DEEP_LINK__})}
+3 -1
View File
@@ -25,6 +25,8 @@ fn intent_filter(domain: &AssociatedDomain) -> String {
format!( format!(
r#"<intent-filter {auto_verify}> r#"<intent-filter {auto_verify}>
<action android:name="android.intent.action.VIEW" /> <action android:name="android.intent.action.VIEW" />
<!-- ChromeOS ARC++ uses a different action for deep links -->
<action android:name="org.chromium.arc.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" /> <category android:name="android.intent.category.BROWSABLE" />
{schemes} {schemes}
@@ -137,7 +139,7 @@ fn main() {
let deep_link_domains = config let deep_link_domains = config
.mobile .mobile
.iter() .iter()
.filter(|domain| domain.is_app_link()) .filter(|domain| !domain.is_app_link())
.collect::<Vec<_>>(); .collect::<Vec<_>>();
if deep_link_domains.is_empty() { if deep_link_domains.is_empty() {
@@ -1,5 +1,23 @@
# Changelog # Changelog
## \[2.2.12]
### Dependencies
- Upgraded to `deep-link-js@2.4.9`
## \[2.2.11]
### Dependencies
- Upgraded to `deep-link-js@2.4.8`
## \[2.2.10]
### Dependencies
- Upgraded to `deep-link-js@2.4.7`
## \[2.2.9] ## \[2.2.9]
### Dependencies ### Dependencies
+6 -6
View File
@@ -1,7 +1,7 @@
{ {
"name": "deep-link-example", "name": "deep-link-example",
"private": true, "private": true,
"version": "2.2.9", "version": "2.2.12",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",
@@ -10,12 +10,12 @@
"tauri": "tauri" "tauri": "tauri"
}, },
"dependencies": { "dependencies": {
"@tauri-apps/api": "^2.10.1", "@tauri-apps/api": "^2.11.0",
"@tauri-apps/plugin-deep-link": "2.4.6" "@tauri-apps/plugin-deep-link": "2.4.9"
}, },
"devDependencies": { "devDependencies": {
"@tauri-apps/cli": "2.10.0", "@tauri-apps/cli-cef": "3.0.0-alpha.5",
"typescript": "^5.7.3", "typescript": "^6.0.0",
"vite": "^7.3.1" "vite": "^8.0.1"
} }
} }
+3 -3
View File
@@ -1,6 +1,6 @@
{ {
"name": "@tauri-apps/plugin-deep-link", "name": "@tauri-apps/plugin-deep-link",
"version": "2.4.6", "version": "2.4.9",
"description": "Set your Tauri application as the default handler for an URL", "description": "Set your Tauri application as the default handler for an URL",
"license": "MIT OR Apache-2.0", "license": "MIT OR Apache-2.0",
"authors": [ "authors": [
@@ -25,9 +25,9 @@
"LICENSE" "LICENSE"
], ],
"dependencies": { "dependencies": {
"@tauri-apps/api": "^2.10.1" "@tauri-apps/api": "^2.11.0"
}, },
"devDependencies": { "devDependencies": {
"@tauri-apps/cli": "2.10.0" "@tauri-apps/cli-cef": "3.0.0-alpha.5"
} }
} }
@@ -0,0 +1,5 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
commands = ["get_current","register","unregister","is_registered"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-get-current"
description = "Enables the get_current command without any pre-configured scope."
commands.allow = ["get_current"]
[[permission]]
identifier = "deny-get-current"
description = "Denies the get_current command without any pre-configured scope."
commands.deny = ["get_current"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-is-registered"
description = "Enables the is_registered command without any pre-configured scope."
commands.allow = ["is_registered"]
[[permission]]
identifier = "deny-is-registered"
description = "Denies the is_registered command without any pre-configured scope."
commands.deny = ["is_registered"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-register"
description = "Enables the register command without any pre-configured scope."
commands.allow = ["register"]
[[permission]]
identifier = "deny-register"
description = "Denies the register command without any pre-configured scope."
commands.deny = ["register"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-unregister"
description = "Enables the unregister command without any pre-configured scope."
commands.allow = ["unregister"]
[[permission]]
identifier = "deny-unregister"
description = "Denies the unregister command without any pre-configured scope."
commands.deny = ["unregister"]
@@ -24,10 +24,17 @@
}, },
"permission": { "permission": {
"description": "A list of inlined permissions", "description": "A list of inlined permissions",
"default": [],
"type": "array", "type": "array",
"items": { "items": {
"$ref": "#/definitions/Permission" "$ref": "#/definitions/Permission"
},
"default": []
},
"commands": {
"description": "A list of command names that get `allow-$command` and `deny-$command` permissions\nautogenerated on demand instead of being stored as explicit permissions.\n\nSee [`Manifest::command_permission`] and the ACL resolver for how these are expanded.",
"type": "array",
"items": {
"type": "string"
} }
} }
}, },
@@ -35,9 +42,6 @@
"DefaultPermission": { "DefaultPermission": {
"description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.", "description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.",
"type": "object", "type": "object",
"required": [
"permissions"
],
"properties": { "properties": {
"version": { "version": {
"description": "The version of the permission.", "description": "The version of the permission.",
@@ -46,10 +50,10 @@
"null" "null"
], ],
"format": "uint64", "format": "uint64",
"minimum": 1.0 "minimum": 1
}, },
"description": { "description": {
"description": "Human-readable description of what the permission does. Tauri convention is to use `<h4>` headings in markdown content for Tauri documentation generation purposes.", "description": "Human-readable description of what the permission does.\nTauri convention is to use `<h4>` headings in markdown content\nfor Tauri documentation generation purposes.",
"type": [ "type": [
"string", "string",
"null" "null"
@@ -62,16 +66,14 @@
"type": "string" "type": "string"
} }
} }
} },
"required": [
"permissions"
]
}, },
"PermissionSet": { "PermissionSet": {
"description": "A set of direct permissions grouped together under a new name.", "description": "A set of direct permissions grouped together under a new name.",
"type": "object", "type": "object",
"required": [
"description",
"identifier",
"permissions"
],
"properties": { "properties": {
"identifier": { "identifier": {
"description": "A unique identifier for the permission.", "description": "A unique identifier for the permission.",
@@ -85,17 +87,19 @@
"description": "All permissions this set contains.", "description": "All permissions this set contains.",
"type": "array", "type": "array",
"items": { "items": {
"$ref": "#/definitions/PermissionKind" "type": "string"
} }
} }
} },
"required": [
"identifier",
"description",
"permissions"
]
}, },
"Permission": { "Permission": {
"description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.", "description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.",
"type": "object", "type": "object",
"required": [
"identifier"
],
"properties": { "properties": {
"version": { "version": {
"description": "The version of the permission.", "description": "The version of the permission.",
@@ -104,14 +108,14 @@
"null" "null"
], ],
"format": "uint64", "format": "uint64",
"minimum": 1.0 "minimum": 1
}, },
"identifier": { "identifier": {
"description": "A unique identifier for the permission.", "description": "A unique identifier for the permission.",
"type": "string" "type": "string"
}, },
"description": { "description": {
"description": "Human-readable description of what the permission does. Tauri internal convention is to use `<h4>` headings in markdown content for Tauri documentation generation purposes.", "description": "Human-readable description of what the permission does.\nTauri internal convention is to use `<h4>` headings in markdown content\nfor Tauri documentation generation purposes.",
"type": [ "type": [
"string", "string",
"null" "null"
@@ -147,7 +151,10 @@
"$ref": "#/definitions/Target" "$ref": "#/definitions/Target"
} }
} }
} },
"required": [
"identifier"
]
}, },
"Commands": { "Commands": {
"description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.", "description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.",
@@ -155,24 +162,24 @@
"properties": { "properties": {
"allow": { "allow": {
"description": "Allowed command.", "description": "Allowed command.",
"default": [],
"type": "array", "type": "array",
"items": { "items": {
"type": "string" "type": "string"
} },
"default": []
}, },
"deny": { "deny": {
"description": "Denied command, which takes priority.", "description": "Denied command, which takes priority.",
"default": [],
"type": "array", "type": "array",
"items": { "items": {
"type": "string" "type": "string"
} },
"default": []
} }
} }
}, },
"Scopes": { "Scopes": {
"description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command. The configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json { \"allow\": [{ \"path\": \"$HOME/**\" }], \"deny\": [{ \"path\": \"$HOME/secret.txt\" }] } ```", "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command.\nThe configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json\n{\n \"allow\": [{ \"path\": \"$HOME/**\" }],\n \"deny\": [{ \"path\": \"$HOME/secret.txt\" }]\n}\n```",
"type": "object", "type": "object",
"properties": { "properties": {
"allow": { "allow": {
@@ -257,96 +264,27 @@
{ {
"description": "MacOS.", "description": "MacOS.",
"type": "string", "type": "string",
"enum": [ "const": "macOS"
"macOS"
]
}, },
{ {
"description": "Windows.", "description": "Windows.",
"type": "string", "type": "string",
"enum": [ "const": "windows"
"windows"
]
}, },
{ {
"description": "Linux.", "description": "Linux.",
"type": "string", "type": "string",
"enum": [ "const": "linux"
"linux"
]
}, },
{ {
"description": "Android.", "description": "Android.",
"type": "string", "type": "string",
"enum": [ "const": "android"
"android"
]
}, },
{ {
"description": "iOS.", "description": "iOS.",
"type": "string", "type": "string",
"enum": [ "const": "iOS"
"iOS"
]
}
]
},
"PermissionKind": {
"type": "string",
"oneOf": [
{
"description": "Enables the get_current command without any pre-configured scope.",
"type": "string",
"const": "allow-get-current",
"markdownDescription": "Enables the get_current command without any pre-configured scope."
},
{
"description": "Denies the get_current command without any pre-configured scope.",
"type": "string",
"const": "deny-get-current",
"markdownDescription": "Denies the get_current command without any pre-configured scope."
},
{
"description": "Enables the is_registered command without any pre-configured scope.",
"type": "string",
"const": "allow-is-registered",
"markdownDescription": "Enables the is_registered command without any pre-configured scope."
},
{
"description": "Denies the is_registered command without any pre-configured scope.",
"type": "string",
"const": "deny-is-registered",
"markdownDescription": "Denies the is_registered command without any pre-configured scope."
},
{
"description": "Enables the register command without any pre-configured scope.",
"type": "string",
"const": "allow-register",
"markdownDescription": "Enables the register command without any pre-configured scope."
},
{
"description": "Denies the register command without any pre-configured scope.",
"type": "string",
"const": "deny-register",
"markdownDescription": "Denies the register command without any pre-configured scope."
},
{
"description": "Enables the unregister command without any pre-configured scope.",
"type": "string",
"const": "allow-unregister",
"markdownDescription": "Enables the unregister command without any pre-configured scope."
},
{
"description": "Denies the unregister command without any pre-configured scope.",
"type": "string",
"const": "deny-unregister",
"markdownDescription": "Denies the unregister command without any pre-configured scope."
},
{
"description": "Allows reading the opened deep link via the get_current command\n#### This default permission set includes:\n\n- `allow-get-current`",
"type": "string",
"const": "default",
"markdownDescription": "Allows reading the opened deep link via the get_current command\n#### This default permission set includes:\n\n- `allow-get-current`"
} }
] ]
} }
+2 -2
View File
@@ -293,7 +293,7 @@ mod imp {
.unwrap_or_else(|| bin.into_os_string()) .unwrap_or_else(|| bin.into_os_string())
.to_string_lossy() .to_string_lossy()
.to_string(); .to_string();
let qualified_exec = format!("{} %u", exec); let qualified_exec = format!("\"{}\" %u", exec);
let target = self.app.path().data_dir()?.join("applications"); let target = self.app.path().data_dir()?.join("applications");
@@ -540,7 +540,7 @@ pub fn init<R: Runtime>() -> TauriPlugin<R, Option<config::Config>> {
Ok(()) Ok(())
}) })
.on_event(|_app, _event| { .on_event(|_app, _event| {
#[cfg(any(target_os = "macos", target_os = "ios"))] #[cfg(desktop)]
if let tauri::RunEvent::Opened { urls } = _event { if let tauri::RunEvent::Opened { urls } = _event {
use tauri::Emitter; use tauri::Emitter;
+3
View File
@@ -1,4 +1,7 @@
{ {
"extends": "../../tsconfig.base.json", "extends": "../../tsconfig.base.json",
"compilerOptions": {
"rootDir": "guest-js"
},
"include": ["guest-js/*.ts"] "include": ["guest-js/*.ts"]
} }
+14
View File
@@ -1,5 +1,19 @@
# Changelog # Changelog
## \[2.7.1]
### Dependencies
- Upgraded to `fs-js@2.5.1`
## \[2.7.0]
- [`24154472`](https://github.com/tauri-apps/plugins-workspace/commit/24154472a6710a690173df0a121125d1f1b871e8) ([#3287](https://github.com/tauri-apps/plugins-workspace/pull/3287) by [@Legend-Master](https://github.com/tauri-apps/plugins-workspace/../../Legend-Master)) Re-use `message` command in Rust side for `ask` and `confirm` commands, `allow-ask` and `allow-confirm` permissions are now aliases to `allow-message`
### Dependencies
- Upgraded to `fs-js@2.5.0`
## \[2.6.0] ## \[2.6.0]
- [`d7a0bb32`](https://github.com/tauri-apps/plugins-workspace/commit/d7a0bb325dad919d6cc132eb3898c33540de77c4) ([#3136](https://github.com/tauri-apps/plugins-workspace/pull/3136) by [@onehumandev](https://github.com/tauri-apps/plugins-workspace/../../onehumandev)) Add `fileAccessMode` option to file picker. - [`d7a0bb32`](https://github.com/tauri-apps/plugins-workspace/commit/d7a0bb325dad919d6cc132eb3898c33540de77c4) ([#3136](https://github.com/tauri-apps/plugins-workspace/pull/3136) by [@onehumandev](https://github.com/tauri-apps/plugins-workspace/../../onehumandev)) Add `fileAccessMode` option to file picker.
+2 -2
View File
@@ -1,6 +1,6 @@
[package] [package]
name = "tauri-plugin-dialog" name = "tauri-plugin-dialog"
version = "2.6.0" version = "2.7.1"
description = "Native system dialogs for opening and saving files along with message dialogs on your Tauri application." description = "Native system dialogs for opening and saving files along with message dialogs on your Tauri application."
edition = { workspace = true } edition = { workspace = true }
authors = { workspace = true } authors = { workspace = true }
@@ -37,7 +37,7 @@ tauri = { workspace = true }
log = { workspace = true } log = { workspace = true }
thiserror = { workspace = true } thiserror = { workspace = true }
url = { workspace = true } url = { workspace = true }
tauri-plugin-fs = { path = "../fs", version = "2.4.5" } tauri-plugin-fs = { path = "../fs", version = "2.5.1" }
[target.'cfg(target_os = "ios")'.dependencies] [target.'cfg(target_os = "ios")'.dependencies]
tauri = { workspace = true, features = ["wry"] } tauri = { workspace = true, features = ["wry"] }
+1 -1
View File
@@ -1 +1 @@
if("__TAURI__"in window){var __TAURI_PLUGIN_DIALOG__=function(t){"use strict";async function n(t,n={},e){return window.__TAURI_INTERNALS__.invoke(t,n,e)}function e(t){if(void 0!==t)return"string"==typeof t?t:"ok"in t&&"cancel"in t?{OkCancelCustom:[t.ok,t.cancel]}:"yes"in t&&"no"in t&&"cancel"in t?{YesNoCancelCustom:[t.yes,t.no,t.cancel]}:"ok"in t?{OkCustom:t.ok}:void 0}return"function"==typeof SuppressedError&&SuppressedError,t.ask=async function(t,e){const o="string"==typeof e?{title:e}:e;return await n("plugin:dialog|ask",{message:t.toString(),title:o?.title?.toString(),kind:o?.kind,yesButtonLabel:o?.okLabel?.toString(),noButtonLabel:o?.cancelLabel?.toString()})},t.confirm=async function(t,e){const o="string"==typeof e?{title:e}:e;return await n("plugin:dialog|confirm",{message:t.toString(),title:o?.title?.toString(),kind:o?.kind,okButtonLabel:o?.okLabel?.toString(),cancelButtonLabel:o?.cancelLabel?.toString()})},t.message=async function(t,o){const i="string"==typeof o?{title:o}:o;return n("plugin:dialog|message",{message:t.toString(),title:i?.title?.toString(),kind:i?.kind,okButtonLabel:i?.okLabel?.toString(),buttons:e(i?.buttons)})},t.open=async function(t={}){return"object"==typeof t&&Object.freeze(t),await n("plugin:dialog|open",{options:t})},t.save=async function(t={}){return"object"==typeof t&&Object.freeze(t),await n("plugin:dialog|save",{options:t})},t}({});Object.defineProperty(window.__TAURI__,"dialog",{value:__TAURI_PLUGIN_DIALOG__})} if("__TAURI__"in window){var __TAURI_PLUGIN_DIALOG__=function(n){"use strict";async function e(n,e={},t){return window.__TAURI_INTERNALS__.invoke(n,e,t)}function t(n){if(void 0!==n)return"string"==typeof n?n:"ok"in n&&"cancel"in n?{OkCancelCustom:[n.ok,n.cancel]}:"yes"in n&&"no"in n&&"cancel"in n?{YesNoCancelCustom:[n.yes,n.no,n.cancel]}:"ok"in n?{OkCustom:n.ok}:void 0}async function o(n,o){return await e("plugin:dialog|message",{message:n,title:o?.title,kind:o?.kind,buttons:t(o?.buttons)})}return"function"==typeof SuppressedError&&SuppressedError,n.ask=async function(n,e){const t="string"==typeof e?{title:e}:e,i=t?.okLabel||t?.cancelLabel,a=t?.okLabel??"Yes";return await o(n,{title:t?.title,kind:t?.kind,buttons:i?{ok:a,cancel:t.cancelLabel??"No"}:"YesNo"})===a},n.confirm=async function(n,e){const t="string"==typeof e?{title:e}:e,i=t?.okLabel||t?.cancelLabel,a=t?.okLabel??"Ok";return await o(n,{title:t?.title,kind:t?.kind,buttons:i?{ok:a,cancel:t.cancelLabel??"Cancel"}:"OkCancel"})===a},n.message=async function(n,e){const t="string"==typeof e?{title:e}:e;return t&&!t.buttons&&t.okLabel&&(t.buttons={ok:t.okLabel}),o(n,t)},n.open=async function(n={}){return"object"==typeof n&&Object.freeze(n),await e("plugin:dialog|open",{options:n})},n.save=async function(n={}){return"object"==typeof n&&Object.freeze(n),await e("plugin:dialog|save",{options:n})},n}({});Object.defineProperty(window.__TAURI__,"dialog",{value:__TAURI_PLUGIN_DIALOG__})}
+1 -1
View File
@@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
const COMMANDS: &[&str] = &["open", "save", "message", "ask", "confirm"]; const COMMANDS: &[&str] = &["open", "save", "message"];
fn main() { fn main() {
let result = tauri_plugin::Builder::new(COMMANDS) let result = tauri_plugin::Builder::new(COMMANDS)
+44 -22
View File
@@ -405,6 +405,18 @@ async function save(options: SaveDialogOptions = {}): Promise<string | null> {
*/ */
export type MessageDialogResult = 'Yes' | 'No' | 'Ok' | 'Cancel' | (string & {}) export type MessageDialogResult = 'Yes' | 'No' | 'Ok' | 'Cancel' | (string & {})
async function messageCommand(
message: string,
options?: Omit<MessageDialogOptions, 'okLabel'>
) {
return await invoke<MessageDialogResult>('plugin:dialog|message', {
message,
title: options?.title,
kind: options?.kind,
buttons: buttonsToRust(options?.buttons)
})
}
/** /**
* Shows a message dialog with an `Ok` button. * Shows a message dialog with an `Ok` button.
* @example * @example
@@ -427,18 +439,17 @@ async function message(
options?: string | MessageDialogOptions options?: string | MessageDialogOptions
): Promise<MessageDialogResult> { ): Promise<MessageDialogResult> {
const opts = typeof options === 'string' ? { title: options } : options const opts = typeof options === 'string' ? { title: options } : options
if (opts && !opts.buttons && opts.okLabel) {
return invoke<MessageDialogResult>('plugin:dialog|message', { opts.buttons = { ok: opts.okLabel }
message: message.toString(), }
title: opts?.title?.toString(), return messageCommand(message, opts)
kind: opts?.kind,
okButtonLabel: opts?.okLabel?.toString(),
buttons: buttonsToRust(opts?.buttons)
})
} }
/** /**
* Shows a question dialog with `Yes` and `No` buttons. * Shows a question dialog with `Yes` and `No` buttons.
*
* Convenient wrapper for `await message('msg', { buttons: 'YesNo' }) === 'Yes'`
*
* @example * @example
* ```typescript * ```typescript
* import { ask } from '@tauri-apps/plugin-dialog'; * import { ask } from '@tauri-apps/plugin-dialog';
@@ -458,17 +469,24 @@ async function ask(
options?: string | ConfirmDialogOptions options?: string | ConfirmDialogOptions
): Promise<boolean> { ): Promise<boolean> {
const opts = typeof options === 'string' ? { title: options } : options const opts = typeof options === 'string' ? { title: options } : options
return await invoke('plugin:dialog|ask', { const customButtons = opts?.okLabel || opts?.cancelLabel
message: message.toString(), const okLabel = opts?.okLabel ?? 'Yes'
title: opts?.title?.toString(), return (
kind: opts?.kind, (await messageCommand(message, {
yesButtonLabel: opts?.okLabel?.toString(), title: opts?.title,
noButtonLabel: opts?.cancelLabel?.toString() kind: opts?.kind,
}) buttons: customButtons
? { ok: okLabel, cancel: opts.cancelLabel ?? 'No' }
: 'YesNo'
})) === okLabel
)
} }
/** /**
* Shows a question dialog with `Ok` and `Cancel` buttons. * Shows a question dialog with `Ok` and `Cancel` buttons.
*
* Convenient wrapper for `await message('msg', { buttons: 'OkCancel' }) === 'Ok'`
*
* @example * @example
* ```typescript * ```typescript
* import { confirm } from '@tauri-apps/plugin-dialog'; * import { confirm } from '@tauri-apps/plugin-dialog';
@@ -488,13 +506,17 @@ async function confirm(
options?: string | ConfirmDialogOptions options?: string | ConfirmDialogOptions
): Promise<boolean> { ): Promise<boolean> {
const opts = typeof options === 'string' ? { title: options } : options const opts = typeof options === 'string' ? { title: options } : options
return await invoke('plugin:dialog|confirm', { const customButtons = opts?.okLabel || opts?.cancelLabel
message: message.toString(), const okLabel = opts?.okLabel ?? 'Ok'
title: opts?.title?.toString(), return (
kind: opts?.kind, (await messageCommand(message, {
okButtonLabel: opts?.okLabel?.toString(), title: opts?.title,
cancelButtonLabel: opts?.cancelLabel?.toString() kind: opts?.kind,
}) buttons: customButtons
? { ok: okLabel, cancel: opts.cancelLabel ?? 'Cancel' }
: 'OkCancel'
})) === okLabel
)
} }
export type { export type {
+2 -2
View File
@@ -1,6 +1,6 @@
{ {
"name": "@tauri-apps/plugin-dialog", "name": "@tauri-apps/plugin-dialog",
"version": "2.6.0", "version": "2.7.1",
"license": "MIT OR Apache-2.0", "license": "MIT OR Apache-2.0",
"authors": [ "authors": [
"Tauri Programme within The Commons Conservancy" "Tauri Programme within The Commons Conservancy"
@@ -24,6 +24,6 @@
"LICENSE" "LICENSE"
], ],
"dependencies": { "dependencies": {
"@tauri-apps/api": "^2.10.1" "@tauri-apps/api": "^2.11.0"
} }
} }
+11
View File
@@ -0,0 +1,11 @@
"$schema" = "schemas/schema.json"
[[permission]]
identifier = "allow-ask"
description = "Enables the ask command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `allow-message` and will be removed in v3)"
commands.allow = ["message"]
[[permission]]
identifier = "deny-ask"
description = "Denies the ask command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `deny-message` and will be removed in v3)"
commands.deny = ["message"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-ask"
description = "Enables the ask command without any pre-configured scope."
commands.allow = ["ask"]
[[permission]]
identifier = "deny-ask"
description = "Denies the ask command without any pre-configured scope."
commands.deny = ["ask"]
@@ -0,0 +1,5 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
commands = ["open","save","message"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-confirm"
description = "Enables the confirm command without any pre-configured scope."
commands.allow = ["confirm"]
[[permission]]
identifier = "deny-confirm"
description = "Denies the confirm command without any pre-configured scope."
commands.deny = ["confirm"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-message"
description = "Enables the message command without any pre-configured scope."
commands.allow = ["message"]
[[permission]]
identifier = "deny-message"
description = "Denies the message command without any pre-configured scope."
commands.deny = ["message"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-open"
description = "Enables the open command without any pre-configured scope."
commands.allow = ["open"]
[[permission]]
identifier = "deny-open"
description = "Denies the open command without any pre-configured scope."
commands.deny = ["open"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-save"
description = "Enables the save command without any pre-configured scope."
commands.allow = ["save"]
[[permission]]
identifier = "deny-save"
description = "Denies the save command without any pre-configured scope."
commands.deny = ["save"]
@@ -9,8 +9,6 @@ All dialog types are enabled.
#### This default permission set includes the following: #### This default permission set includes the following:
- `allow-ask`
- `allow-confirm`
- `allow-message` - `allow-message`
- `allow-save` - `allow-save`
- `allow-open` - `allow-open`
@@ -32,7 +30,7 @@ All dialog types are enabled.
</td> </td>
<td> <td>
Enables the ask command without any pre-configured scope. Enables the ask command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `allow-message` and will be removed in v3)
</td> </td>
</tr> </tr>
@@ -45,33 +43,7 @@ Enables the ask command without any pre-configured scope.
</td> </td>
<td> <td>
Denies the ask command without any pre-configured scope. Denies the ask command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `deny-message` and will be removed in v3)
</td>
</tr>
<tr>
<td>
`dialog:allow-confirm`
</td>
<td>
Enables the confirm command without any pre-configured scope.
</td>
</tr>
<tr>
<td>
`dialog:deny-confirm`
</td>
<td>
Denies the confirm command without any pre-configured scope.
</td> </td>
</tr> </tr>
@@ -151,6 +123,32 @@ Enables the save command without any pre-configured scope.
Denies the save command without any pre-configured scope. Denies the save command without any pre-configured scope.
</td>
</tr>
<tr>
<td>
`dialog:allow-confirm`
</td>
<td>
Enables the confirm command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `allow-message` and will be removed in v3)
</td>
</tr>
<tr>
<td>
`dialog:deny-confirm`
</td>
<td>
Denies the confirm command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `deny-message` and will be removed in v3)
</td> </td>
</tr> </tr>
</table> </table>
+11
View File
@@ -0,0 +1,11 @@
"$schema" = "schemas/schema.json"
[[permission]]
identifier = "allow-confirm"
description = "Enables the confirm command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `allow-message` and will be removed in v3)"
commands.allow = ["message"]
[[permission]]
identifier = "deny-confirm"
description = "Denies the confirm command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `deny-message` and will be removed in v3)"
commands.deny = ["message"]
+1 -7
View File
@@ -11,10 +11,4 @@ All dialog types are enabled.
""" """
permissions = [ permissions = ["allow-message", "allow-save", "allow-open"]
"allow-ask",
"allow-confirm",
"allow-message",
"allow-save",
"allow-open",
]
+37 -111
View File
@@ -24,10 +24,17 @@
}, },
"permission": { "permission": {
"description": "A list of inlined permissions", "description": "A list of inlined permissions",
"default": [],
"type": "array", "type": "array",
"items": { "items": {
"$ref": "#/definitions/Permission" "$ref": "#/definitions/Permission"
},
"default": []
},
"commands": {
"description": "A list of command names that get `allow-$command` and `deny-$command` permissions\nautogenerated on demand instead of being stored as explicit permissions.\n\nSee [`Manifest::command_permission`] and the ACL resolver for how these are expanded.",
"type": "array",
"items": {
"type": "string"
} }
} }
}, },
@@ -35,9 +42,6 @@
"DefaultPermission": { "DefaultPermission": {
"description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.", "description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.",
"type": "object", "type": "object",
"required": [
"permissions"
],
"properties": { "properties": {
"version": { "version": {
"description": "The version of the permission.", "description": "The version of the permission.",
@@ -46,10 +50,10 @@
"null" "null"
], ],
"format": "uint64", "format": "uint64",
"minimum": 1.0 "minimum": 1
}, },
"description": { "description": {
"description": "Human-readable description of what the permission does. Tauri convention is to use `<h4>` headings in markdown content for Tauri documentation generation purposes.", "description": "Human-readable description of what the permission does.\nTauri convention is to use `<h4>` headings in markdown content\nfor Tauri documentation generation purposes.",
"type": [ "type": [
"string", "string",
"null" "null"
@@ -62,16 +66,14 @@
"type": "string" "type": "string"
} }
} }
} },
"required": [
"permissions"
]
}, },
"PermissionSet": { "PermissionSet": {
"description": "A set of direct permissions grouped together under a new name.", "description": "A set of direct permissions grouped together under a new name.",
"type": "object", "type": "object",
"required": [
"description",
"identifier",
"permissions"
],
"properties": { "properties": {
"identifier": { "identifier": {
"description": "A unique identifier for the permission.", "description": "A unique identifier for the permission.",
@@ -85,17 +87,19 @@
"description": "All permissions this set contains.", "description": "All permissions this set contains.",
"type": "array", "type": "array",
"items": { "items": {
"$ref": "#/definitions/PermissionKind" "type": "string"
} }
} }
} },
"required": [
"identifier",
"description",
"permissions"
]
}, },
"Permission": { "Permission": {
"description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.", "description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.",
"type": "object", "type": "object",
"required": [
"identifier"
],
"properties": { "properties": {
"version": { "version": {
"description": "The version of the permission.", "description": "The version of the permission.",
@@ -104,14 +108,14 @@
"null" "null"
], ],
"format": "uint64", "format": "uint64",
"minimum": 1.0 "minimum": 1
}, },
"identifier": { "identifier": {
"description": "A unique identifier for the permission.", "description": "A unique identifier for the permission.",
"type": "string" "type": "string"
}, },
"description": { "description": {
"description": "Human-readable description of what the permission does. Tauri internal convention is to use `<h4>` headings in markdown content for Tauri documentation generation purposes.", "description": "Human-readable description of what the permission does.\nTauri internal convention is to use `<h4>` headings in markdown content\nfor Tauri documentation generation purposes.",
"type": [ "type": [
"string", "string",
"null" "null"
@@ -147,7 +151,10 @@
"$ref": "#/definitions/Target" "$ref": "#/definitions/Target"
} }
} }
} },
"required": [
"identifier"
]
}, },
"Commands": { "Commands": {
"description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.", "description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.",
@@ -155,24 +162,24 @@
"properties": { "properties": {
"allow": { "allow": {
"description": "Allowed command.", "description": "Allowed command.",
"default": [],
"type": "array", "type": "array",
"items": { "items": {
"type": "string" "type": "string"
} },
"default": []
}, },
"deny": { "deny": {
"description": "Denied command, which takes priority.", "description": "Denied command, which takes priority.",
"default": [],
"type": "array", "type": "array",
"items": { "items": {
"type": "string" "type": "string"
} },
"default": []
} }
} }
}, },
"Scopes": { "Scopes": {
"description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command. The configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json { \"allow\": [{ \"path\": \"$HOME/**\" }], \"deny\": [{ \"path\": \"$HOME/secret.txt\" }] } ```", "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command.\nThe configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json\n{\n \"allow\": [{ \"path\": \"$HOME/**\" }],\n \"deny\": [{ \"path\": \"$HOME/secret.txt\" }]\n}\n```",
"type": "object", "type": "object",
"properties": { "properties": {
"allow": { "allow": {
@@ -257,108 +264,27 @@
{ {
"description": "MacOS.", "description": "MacOS.",
"type": "string", "type": "string",
"enum": [ "const": "macOS"
"macOS"
]
}, },
{ {
"description": "Windows.", "description": "Windows.",
"type": "string", "type": "string",
"enum": [ "const": "windows"
"windows"
]
}, },
{ {
"description": "Linux.", "description": "Linux.",
"type": "string", "type": "string",
"enum": [ "const": "linux"
"linux"
]
}, },
{ {
"description": "Android.", "description": "Android.",
"type": "string", "type": "string",
"enum": [ "const": "android"
"android"
]
}, },
{ {
"description": "iOS.", "description": "iOS.",
"type": "string", "type": "string",
"enum": [ "const": "iOS"
"iOS"
]
}
]
},
"PermissionKind": {
"type": "string",
"oneOf": [
{
"description": "Enables the ask command without any pre-configured scope.",
"type": "string",
"const": "allow-ask",
"markdownDescription": "Enables the ask command without any pre-configured scope."
},
{
"description": "Denies the ask command without any pre-configured scope.",
"type": "string",
"const": "deny-ask",
"markdownDescription": "Denies the ask command without any pre-configured scope."
},
{
"description": "Enables the confirm command without any pre-configured scope.",
"type": "string",
"const": "allow-confirm",
"markdownDescription": "Enables the confirm command without any pre-configured scope."
},
{
"description": "Denies the confirm command without any pre-configured scope.",
"type": "string",
"const": "deny-confirm",
"markdownDescription": "Denies the confirm command without any pre-configured scope."
},
{
"description": "Enables the message command without any pre-configured scope.",
"type": "string",
"const": "allow-message",
"markdownDescription": "Enables the message command without any pre-configured scope."
},
{
"description": "Denies the message command without any pre-configured scope.",
"type": "string",
"const": "deny-message",
"markdownDescription": "Denies the message command without any pre-configured scope."
},
{
"description": "Enables the open command without any pre-configured scope.",
"type": "string",
"const": "allow-open",
"markdownDescription": "Enables the open command without any pre-configured scope."
},
{
"description": "Denies the open command without any pre-configured scope.",
"type": "string",
"const": "deny-open",
"markdownDescription": "Denies the open command without any pre-configured scope."
},
{
"description": "Enables the save command without any pre-configured scope.",
"type": "string",
"const": "allow-save",
"markdownDescription": "Enables the save command without any pre-configured scope."
},
{
"description": "Denies the save command without any pre-configured scope.",
"type": "string",
"const": "deny-save",
"markdownDescription": "Denies the save command without any pre-configured scope."
},
{
"description": "This permission set configures the types of dialogs\navailable from the dialog plugin.\n\n#### Granted Permissions\n\nAll dialog types are enabled.\n\n\n\n#### This default permission set includes:\n\n- `allow-ask`\n- `allow-confirm`\n- `allow-message`\n- `allow-save`\n- `allow-open`",
"type": "string",
"const": "default",
"markdownDescription": "This permission set configures the types of dialogs\navailable from the dialog plugin.\n\n#### Granted Permissions\n\nAll dialog types are enabled.\n\n\n\n#### This default permission set includes:\n\n- `allow-ask`\n- `allow-confirm`\n- `allow-message`\n- `allow-save`\n- `allow-open`"
} }
] ]
} }
+11 -90
View File
@@ -9,9 +9,8 @@ use tauri::{command, Manager, Runtime, State, Window};
use tauri_plugin_fs::FsExt; use tauri_plugin_fs::FsExt;
use crate::{ use crate::{
Dialog, FileAccessMode, FileDialogBuilder, FilePath, MessageDialogBuilder, Dialog, FileAccessMode, FileDialogBuilder, FilePath, MessageDialogButtons, MessageDialogKind,
MessageDialogButtons, MessageDialogKind, MessageDialogResult, PickerMode, Result, CANCEL, NO, MessageDialogResult, PickerMode, Result,
OK, YES,
}; };
#[derive(Serialize)] #[derive(Serialize)]
@@ -259,17 +258,20 @@ pub(crate) async fn save<R: Runtime>(
Ok(path.map(|p| p.simplified())) Ok(path.map(|p| p.simplified()))
} }
fn message_dialog<R: Runtime>( #[command]
#[allow(unused_variables)] window: Window<R>, pub(crate) async fn message<R: Runtime>(
#[allow(unused)] window: Window<R>,
dialog: State<'_, Dialog<R>>, dialog: State<'_, Dialog<R>>,
title: Option<String>, title: Option<String>,
message: String, message: String,
kind: Option<MessageDialogKind>, kind: Option<MessageDialogKind>,
buttons: MessageDialogButtons, buttons: Option<MessageDialogButtons>,
) -> MessageDialogBuilder<R> { ) -> Result<MessageDialogResult> {
let mut builder = dialog.message(message); let mut builder = dialog.message(message);
builder = builder.buttons(buttons); if let Some(buttons) = buttons {
builder = builder.buttons(buttons);
}
if let Some(title) = title { if let Some(title) = title {
builder = builder.title(title); builder = builder.title(title);
@@ -284,86 +286,5 @@ fn message_dialog<R: Runtime>(
builder = builder.kind(kind); builder = builder.kind(kind);
} }
builder Ok(builder.blocking_show_with_result())
}
#[command]
pub(crate) async fn message<R: Runtime>(
window: Window<R>,
dialog: State<'_, Dialog<R>>,
title: Option<String>,
message: String,
kind: Option<MessageDialogKind>,
ok_button_label: Option<String>,
buttons: Option<MessageDialogButtons>,
) -> Result<MessageDialogResult> {
let buttons = buttons.unwrap_or(if let Some(ok_button_label) = ok_button_label {
MessageDialogButtons::OkCustom(ok_button_label)
} else {
MessageDialogButtons::Ok
});
Ok(message_dialog(window, dialog, title, message, kind, buttons).blocking_show_with_result())
}
#[command]
pub(crate) async fn ask<R: Runtime>(
window: Window<R>,
dialog: State<'_, Dialog<R>>,
title: Option<String>,
message: String,
kind: Option<MessageDialogKind>,
yes_button_label: Option<String>,
no_button_label: Option<String>,
) -> Result<bool> {
let dialog = message_dialog(
window,
dialog,
title,
message,
kind,
if let Some(yes_button_label) = yes_button_label {
MessageDialogButtons::OkCancelCustom(
yes_button_label,
no_button_label.unwrap_or(NO.to_string()),
)
} else if let Some(no_button_label) = no_button_label {
MessageDialogButtons::OkCancelCustom(YES.to_string(), no_button_label)
} else {
MessageDialogButtons::YesNo
},
);
Ok(dialog.blocking_show())
}
#[command]
pub(crate) async fn confirm<R: Runtime>(
window: Window<R>,
dialog: State<'_, Dialog<R>>,
title: Option<String>,
message: String,
kind: Option<MessageDialogKind>,
ok_button_label: Option<String>,
cancel_button_label: Option<String>,
) -> Result<bool> {
let dialog = message_dialog(
window,
dialog,
title,
message,
kind,
if let Some(ok_button_label) = ok_button_label {
MessageDialogButtons::OkCancelCustom(
ok_button_label,
cancel_button_label.unwrap_or(CANCEL.to_string()),
)
} else if let Some(cancel_button_label) = cancel_button_label {
MessageDialogButtons::OkCancelCustom(OK.to_string(), cancel_button_label)
} else {
MessageDialogButtons::OkCancel
},
);
Ok(dialog.blocking_show())
} }
+5 -4
View File
@@ -61,8 +61,11 @@ pub enum FileAccessMode {
} }
pub(crate) const OK: &str = "Ok"; pub(crate) const OK: &str = "Ok";
#[cfg(mobile)]
pub(crate) const CANCEL: &str = "Cancel"; pub(crate) const CANCEL: &str = "Cancel";
#[cfg(mobile)]
pub(crate) const YES: &str = "Yes"; pub(crate) const YES: &str = "Yes";
#[cfg(mobile)]
pub(crate) const NO: &str = "No"; pub(crate) const NO: &str = "No";
macro_rules! blocking_fn { macro_rules! blocking_fn {
@@ -197,8 +200,6 @@ pub fn init<R: Runtime>() -> TauriPlugin<R> {
commands::open, commands::open,
commands::save, commands::save,
commands::message, commands::message,
commands::ask,
commands::confirm,
]) ])
.setup(|app, api| { .setup(|app, api| {
#[cfg(mobile)] #[cfg(mobile)]
@@ -246,8 +247,8 @@ impl<R: Runtime> MessageDialogBuilder<R> {
dialog, dialog,
title: title.into(), title: title.into(),
message: message.into(), message: message.into(),
kind: Default::default(), kind: MessageDialogKind::default(),
buttons: Default::default(), buttons: MessageDialogButtons::default(),
#[cfg(desktop)] #[cfg(desktop)]
parent: None, parent: None,
} }
+3
View File
@@ -1,4 +1,7 @@
{ {
"extends": "../../tsconfig.base.json", "extends": "../../tsconfig.base.json",
"compilerOptions": {
"rootDir": "guest-js"
},
"include": ["guest-js/*.ts"] "include": ["guest-js/*.ts"]
} }
+10
View File
@@ -1,5 +1,15 @@
# Changelog # Changelog
## \[2.5.1]
- [`ec054013`](https://github.com/tauri-apps/plugins-workspace/commit/ec0540138bece081e9a87982091947360e61987a) ([#3323](https://github.com/tauri-apps/plugins-workspace/pull/3323) by [@renovate](https://github.com/tauri-apps/plugins-workspace/../../renovate)) Updated dependency `toml` from 0.9 to 1
## \[2.5.0]
- [`e97a4ded`](https://github.com/tauri-apps/plugins-workspace/commit/e97a4dedab8608d9d57029784ee8a2607ca3a996) ([#3244](https://github.com/tauri-apps/plugins-workspace/pull/3244) by [@SeijiOkuda](https://github.com/tauri-apps/plugins-workspace/../../SeijiOkuda)) Add `encoding` option for `readTextFile` and `readTextFileLines`
- [`f75d21db`](https://github.com/tauri-apps/plugins-workspace/commit/f75d21db3351d6f12adf585c2c797c20ece94f7f) ([#3360](https://github.com/tauri-apps/plugins-workspace/pull/3360) by [@Legend-Master](https://github.com/tauri-apps/plugins-workspace/../../Legend-Master)) Removed the dependency on `tauri-utils`'s `build` feature
- [`f5f68063`](https://github.com/tauri-apps/plugins-workspace/commit/f5f68063e459c33522f44a04df3120d9d039ec13) ([#3185](https://github.com/tauri-apps/plugins-workspace/pull/3185) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Enable access for security-scoped resources on iOS by automatically calling `NSURL::startAccessingSecurityScopedResource` on resource access and adding the `stopAccessingSecurityScopedResource` API.
## \[2.4.5] ## \[2.4.5]
- [`521cd8b3`](https://github.com/tauri-apps/plugins-workspace/commit/521cd8b372c862d96b1637775710e4d7cf2443e2) ([#3155](https://github.com/tauri-apps/plugins-workspace/pull/3155) by [@EliasStar](https://github.com/tauri-apps/plugins-workspace/../../EliasStar)) Fix off by one error in the implementation of readTextFileLines causing all lines to end with an (additional) null byte. - [`521cd8b3`](https://github.com/tauri-apps/plugins-workspace/commit/521cd8b372c862d96b1637775710e4d7cf2443e2) ([#3155](https://github.com/tauri-apps/plugins-workspace/pull/3155) by [@EliasStar](https://github.com/tauri-apps/plugins-workspace/../../EliasStar)) Fix off by one error in the implementation of readTextFileLines causing all lines to end with an (additional) null byte.
+5 -3
View File
@@ -1,6 +1,6 @@
[package] [package]
name = "tauri-plugin-fs" name = "tauri-plugin-fs"
version = "2.4.5" version = "2.5.1"
description = "Access the file system." description = "Access the file system."
authors = { workspace = true } authors = { workspace = true }
license = { workspace = true } license = { workspace = true }
@@ -20,8 +20,6 @@ ios = { level = "partial", notes = "Access is restricted to Application folder b
tauri-plugin = { workspace = true, features = ["build"] } tauri-plugin = { workspace = true, features = ["build"] }
schemars = { workspace = true } schemars = { workspace = true }
serde = { workspace = true } serde = { workspace = true }
toml = "0.9"
tauri-utils = { workspace = true, features = ["build"] }
[dependencies] [dependencies]
serde = { workspace = true } serde = { workspace = true }
@@ -30,6 +28,7 @@ serde_repr = "0.1"
tauri = { workspace = true } tauri = { workspace = true }
thiserror = { workspace = true } thiserror = { workspace = true }
url = { workspace = true } url = { workspace = true }
log = { workspace = true }
anyhow = "1" anyhow = "1"
glob = { workspace = true } glob = { workspace = true }
# TODO: Remove `serialization-compat-6` in v3 # TODO: Remove `serialization-compat-6` in v3
@@ -41,5 +40,8 @@ notify-debouncer-full = { version = "0.6", optional = true }
dunce = { workspace = true } dunce = { workspace = true }
percent-encoding = "2" percent-encoding = "2"
[target.'cfg(target_os = "ios")'.dependencies]
objc2-foundation = { version = "0.3", features = ["NSURL", "NSString"] }
[features] [features]
watch = ["notify", "notify-debouncer-full"] watch = ["notify", "notify-debouncer-full"]
File diff suppressed because one or more lines are too long
+36 -83
View File
@@ -7,8 +7,6 @@ use std::{
path::{Path, PathBuf}, path::{Path, PathBuf},
}; };
use tauri_utils::acl::manifest::PermissionFile;
#[path = "src/scope.rs"] #[path = "src/scope.rs"]
#[allow(dead_code)] #[allow(dead_code)]
mod scope; mod scope;
@@ -77,33 +75,35 @@ const BASE_DIR_VARS: &[&str] = &[
"APPCACHE", "APPCACHE",
"APPLOG", "APPLOG",
]; ];
const COMMANDS: &[(&str, &[&str])] = &[ // `write_file` and `read_text_file_lines` allow nested commands, so their permissions are
("mkdir", &[]), // manually authored in `permissions/commands/` instead of being autogenerated from this list.
("create", &[]), const COMMANDS: &[&str] = &[
("copy_file", &[]), "mkdir",
("remove", &[]), "create",
("rename", &[]), "copy_file",
("truncate", &[]), "remove",
("ftruncate", &[]), "rename",
("write", &[]), "truncate",
("write_file", &["open", "write"]), "ftruncate",
("write_text_file", &[]), "write",
("read_dir", &[]), "write_text_file",
("read_file", &[]), "read_dir",
("read", &[]), "read_file",
("open", &[]), "read",
("read_text_file", &[]), "open",
("read_text_file_lines", &["read_text_file_lines_next"]), "read_text_file",
("read_text_file_lines_next", &[]), "read_text_file_lines_next",
("seek", &[]), "seek",
("stat", &[]), "stat",
("lstat", &[]), "lstat",
("fstat", &[]), "fstat",
("exists", &[]), "exists",
("watch", &[]), "watch",
// TODO: Remove this in v3 // TODO: Remove this in v3
("unwatch", &[]), "unwatch",
("size", &[]), "size",
"start_accessing_security_scoped_resource",
"stop_accessing_security_scoped_resource",
]; ];
fn main() { fn main() {
@@ -209,59 +209,12 @@ permissions = [
} }
} }
tauri_plugin::Builder::new( tauri_plugin::Builder::new(COMMANDS)
&COMMANDS .global_api_script_path("./api-iife.js")
.iter() .global_scope_schema(
// FIXME: https://docs.rs/crate/tauri-plugin-fs/2.1.0/builds/1571296 schemars::SchemaGenerator::new(schemars::generate::SchemaSettings::draft07())
.filter(|c| c.1.is_empty()) .into_root_schema_for::<FsScopeEntry>(),
.map(|c| c.0) )
.collect::<Vec<_>>(), .android_path("android")
) .build();
.global_api_script_path("./api-iife.js")
.global_scope_schema(schemars::schema_for!(FsScopeEntry))
.android_path("android")
.build();
// workaround to include nested permissions as `tauri_plugin` doesn't support it
let permissions_dir = autogenerated.join("commands");
for (command, nested_commands) in COMMANDS {
if nested_commands.is_empty() {
continue;
}
let permission_path = permissions_dir.join(format!("{command}.toml"));
let content = std::fs::read_to_string(&permission_path)
.unwrap_or_else(|_| panic!("failed to read {command}.toml"));
let mut permission_file = toml::from_str::<PermissionFile>(&content)
.unwrap_or_else(|_| panic!("failed to deserialize {command}.toml"));
for p in permission_file
.permission
.iter_mut()
.filter(|p| p.identifier.starts_with("allow"))
{
for c in nested_commands.iter().map(|s| s.to_string()) {
if !p.commands.allow.contains(&c) {
p.commands.allow.push(c);
}
}
}
let out = toml::to_string_pretty(&permission_file)
.unwrap_or_else(|_| panic!("failed to serialize {command}.toml"));
let out = format!(
r#"# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
{out}"#
);
if content != out {
std::fs::write(permission_path, out)
.unwrap_or_else(|_| panic!("failed to write {command}.toml"));
}
}
} }
+101 -8
View File
@@ -5,6 +5,19 @@
/** /**
* Access the file system. * Access the file system.
* *
* ## iOS security-scoped resources
*
* On iOS, the `fs` plugin automatically manages access to security-scoped resources when a file URL is accessed.
* This is required for files outside the app's sandbox (e.g., from file picker).
*
* @example
* ```typescript
* import { open } from '@tauri-apps/plugin-fs';
*
* const file = await open('file:///path/to/file.txt');
* await file.close();
* ```
*
* ## Security * ## Security
* *
* This module prevents path traversal, not allowing parent directory accessors to be used * This module prevents path traversal, not allowing parent directory accessors to be used
@@ -723,6 +736,8 @@ async function readDir(
interface ReadFileOptions { interface ReadFileOptions {
/** Base directory for `path` */ /** Base directory for `path` */
baseDir?: BaseDirectory baseDir?: BaseDirectory
/** Text encoding to use when reading a text file. Defaults to 'utf-8'. */
encoding?: string
} }
/** /**
@@ -753,7 +768,7 @@ async function readFile(
} }
/** /**
* Reads and returns the entire contents of a file as UTF-8 string. * Reads and returns the entire contents of a file as a string using the specified encoding (default: UTF-8).
* @example * @example
* ```typescript * ```typescript
* import { readTextFile, BaseDirectory } from '@tauri-apps/plugin-fs'; * import { readTextFile, BaseDirectory } from '@tauri-apps/plugin-fs';
@@ -777,11 +792,11 @@ async function readTextFile(
const bytes = arr instanceof ArrayBuffer ? arr : Uint8Array.from(arr) const bytes = arr instanceof ArrayBuffer ? arr : Uint8Array.from(arr)
return new TextDecoder().decode(bytes) return new TextDecoder(options?.encoding ?? 'utf-8').decode(bytes)
} }
/** /**
* Returns an async {@linkcode AsyncIterableIterator} over the lines of a file as UTF-8 string. * Returns an async {@linkcode AsyncIterableIterator} over the lines of a file, decoded using the specified encoding (default: UTF-8).
* @example * @example
* ```typescript * ```typescript
* import { readTextFileLines, BaseDirectory } from '@tauri-apps/plugin-fs'; * import { readTextFileLines, BaseDirectory } from '@tauri-apps/plugin-fs';
@@ -810,10 +825,15 @@ async function readTextFileLines(
rid: null as number | null, rid: null as number | null,
async next(): Promise<IteratorResult<string>> { async next(): Promise<IteratorResult<string>> {
const decoder = new TextDecoder(options?.encoding ?? 'utf-8')
if (this.rid === null) { if (this.rid === null) {
// Use the normalized encoding label for options.
const encoding = decoder.encoding
this.rid = await invoke<number>('plugin:fs|read_text_file_lines', { this.rid = await invoke<number>('plugin:fs|read_text_file_lines', {
path: pathStr, path: pathStr,
options options: options != null ? { ...options, encoding } : undefined
}) })
} }
@@ -838,9 +858,7 @@ async function readTextFileLines(
return { value: null, done } return { value: null, done }
} }
const line = new TextDecoder().decode( const line = decoder.decode(bytes.slice(0, bytes.byteLength - 1))
bytes.slice(0, bytes.byteLength - 1)
)
return { return {
value: line, value: line,
@@ -1348,6 +1366,79 @@ async function size(path: string | URL): Promise<number> {
}) })
} }
/**
* Starts accessing a security-scoped resource for the given file URL.
* This should be called when you're accessing a file that was opened
* using a security-scoped URL (e.g., from a file picker).
*
* Note that accessing security-scoped resources is automatically managed by the plugin on iOS, so you don't need to call this function
* unless you want to manage the scope manually.
*
* You must call {@linkcode stopAccessingSecurityScopedResource} when you're done accessing the resource.
*
* #### Platform-specific
*
* - **iOS:** Starts accessing the security-scoped resource.
* - **Other platforms:** does nothing.
*
* @example
* ```typescript
* import { startAccessingSecurityScopedResource } from '@tauri-apps/plugin-fs';
*
* const filePath = 'file:///path/to/file.txt';
* await startAccessingSecurityScopedResource(filePath);
* // ... use the resource ...
* ```
*
* @since 2.5.0
*/
async function startAccessingSecurityScopedResource(
path: string | URL
): Promise<void> {
if (path instanceof URL && path.protocol !== 'file:') {
throw new TypeError('Must be a file URL.')
}
await invoke('plugin:fs|start_accessing_security_scoped_resource', {
path: path instanceof URL ? path.toString() : path
})
}
/**
* Stops accessing a security-scoped resource for the given file URL.
* This should be called when you're done accessing a file that was opened
* using a security-scoped URL (e.g., from a file picker) when using manual tracking via {@linkcode startAccessingSecurityScopedResource}.
*
* #### Platform-specific
*
* - **iOS:** Stops accessing the security-scoped resource.
* - **Other platforms:** does nothing.
*
* @example
* ```typescript
* import { stopAccessingSecurityScopedResource } from '@tauri-apps/plugin-fs';
*
* const filePath = 'file:///path/to/file.txt';
* await startAccessingSecurityScopedResource(filePath);
* // ... use the resource ...
* // when you're done with the resource:
* await stopAccessingSecurityScopedResource(filePath);
* ```
*
* @since 2.5.0
*/
async function stopAccessingSecurityScopedResource(
path: string | URL
): Promise<void> {
if (path instanceof URL && path.protocol !== 'file:') {
throw new TypeError('Must be a file URL.')
}
await invoke('plugin:fs|stop_accessing_security_scoped_resource', {
path: path instanceof URL ? path.toString() : path
})
}
export type { export type {
CreateOptions, CreateOptions,
OpenOptions, OpenOptions,
@@ -1396,5 +1487,7 @@ export {
exists, exists,
watch, watch,
watchImmediate, watchImmediate,
size size,
startAccessingSecurityScopedResource,
stopAccessingSecurityScopedResource
} }
+2 -2
View File
@@ -1,6 +1,6 @@
{ {
"name": "@tauri-apps/plugin-fs", "name": "@tauri-apps/plugin-fs",
"version": "2.4.5", "version": "2.5.1",
"description": "Access the file system.", "description": "Access the file system.",
"license": "MIT OR Apache-2.0", "license": "MIT OR Apache-2.0",
"authors": [ "authors": [
@@ -25,6 +25,6 @@
"LICENSE" "LICENSE"
], ],
"dependencies": { "dependencies": {
"@tauri-apps/api": "^2.10.1" "@tauri-apps/api": "^2.11.0"
} }
} }
@@ -0,0 +1,5 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
commands = ["mkdir","create","copy_file","remove","rename","truncate","ftruncate","write","write_text_file","read_dir","read_file","read","open","read_text_file","read_text_file_lines_next","seek","stat","lstat","fstat","exists","watch","unwatch","size","start_accessing_security_scoped_resource","stop_accessing_security_scoped_resource"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-copy-file"
description = "Enables the copy_file command without any pre-configured scope."
commands.allow = ["copy_file"]
[[permission]]
identifier = "deny-copy-file"
description = "Denies the copy_file command without any pre-configured scope."
commands.deny = ["copy_file"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-create"
description = "Enables the create command without any pre-configured scope."
commands.allow = ["create"]
[[permission]]
identifier = "deny-create"
description = "Denies the create command without any pre-configured scope."
commands.deny = ["create"]
@@ -1,13 +0,0 @@
# Automatically generated - DO NOT EDIT!
"$schema" = "../../schemas/schema.json"
[[permission]]
identifier = "allow-exists"
description = "Enables the exists command without any pre-configured scope."
commands.allow = ["exists"]
[[permission]]
identifier = "deny-exists"
description = "Denies the exists command without any pre-configured scope."
commands.deny = ["exists"]

Some files were not shown because too many files have changed in this diff Show More