From 3fb27bf13a88dd1e5aa2cc933408be02b0eafc91 Mon Sep 17 00:00:00 2001 From: Vitor Ayres Date: Tue, 21 Jul 2026 03:56:52 -0300 Subject: [PATCH] fix(docs): deep link platform specific and fs scope (#3504) * deep link fix Platform Specific heading * fix fs permission toml * .changes * Update change files Co-authored-by: Tony <68118705+Legend-Master@users.noreply.github.com> * Update .changes/fs-deny-scope.md * fix eol --------- Co-authored-by: Tony <68118705+Legend-Master@users.noreply.github.com> --- .changes/deep-link-platform.md | 6 +++++ .changes/fs-deny-scope.md | 6 +++++ plugins/deep-link/guest-js/index.ts | 24 +++++++++++++------ plugins/fs/permissions/deny-webview-data.toml | 4 ++-- 4 files changed, 31 insertions(+), 9 deletions(-) create mode 100644 .changes/deep-link-platform.md create mode 100644 .changes/fs-deny-scope.md diff --git a/.changes/deep-link-platform.md b/.changes/deep-link-platform.md new file mode 100644 index 000000000..0dfb78803 --- /dev/null +++ b/.changes/deep-link-platform.md @@ -0,0 +1,6 @@ +--- +"deep-link": patch +"deep-link-js": patch +--- + +adds proper Platform-specific sections to the docs for `register`, `unregister`, `isRegistered`, and `onOpenUrl` \ No newline at end of file diff --git a/.changes/fs-deny-scope.md b/.changes/fs-deny-scope.md new file mode 100644 index 000000000..ca8974699 --- /dev/null +++ b/.changes/fs-deny-scope.md @@ -0,0 +1,6 @@ +--- +"fs": patch +"fs-js": patch +--- + +Fixed `deny-webview-data` has no effect \ No newline at end of file diff --git a/plugins/deep-link/guest-js/index.ts b/plugins/deep-link/guest-js/index.ts index 461bec8ad..e766a4547 100644 --- a/plugins/deep-link/guest-js/index.ts +++ b/plugins/deep-link/guest-js/index.ts @@ -14,9 +14,11 @@ import { type UnlistenFn, listen } from '@tauri-apps/api/event' * const urls = await getCurrent(); * ``` * - * #### - **Windows / Linux**: This function reads the command line arguments and checks if there's only one value, which must be an URL with scheme matching one of the configured values. - * Note that you must manually check the arguments when registering deep link schemes dynamically with [`Self::register`]. - * Additionally, the deep link might have been provided as a CLI argument so you should check if its format matches what you expect.. + * #### Platform-specific + * + * - **Windows / Linux:** This function reads the command line arguments and checks if there's only one value, which must be an URL with scheme matching one of the configured values. + * Note that you must manually check the arguments when registering deep link schemes dynamically with [`Self::register`]. + * Additionally, the deep link might have been provided as a CLI argument so you should check if its format matches what you expect. * * @since 2.0.0 */ @@ -35,7 +37,9 @@ export async function getCurrent(): Promise { * await register("my-scheme"); * ``` * - * #### - **macOS / Android / iOS**: Unsupported. + * #### Platform-specific + * + * - **macOS / Android / iOS:** Unsupported. * * @since 2.0.0 */ @@ -54,7 +58,9 @@ export async function register(protocol: string): Promise { * await unregister("my-scheme"); * ``` * - * #### - **macOS / Linux / Android / iOS**: Unsupported. + * #### Platform-specific + * + * - **macOS / Linux / Android / iOS:** Unsupported. * * @since 2.0.0 */ @@ -73,7 +79,9 @@ export async function unregister(protocol: string): Promise { * await isRegistered("my-scheme"); * ``` * - * #### - **macOS / Android / iOS**: Unsupported. + * #### Platform-specific + * + * - **macOS / Android / iOS:** Unsupported. * * @since 2.0.0 */ @@ -92,7 +100,9 @@ export async function isRegistered(protocol: string): Promise { * await onOpenUrl((urls) => { console.log(urls) }); * ``` * - * #### - **Windows / Linux**: Unsupported without the single-instance plugin. The OS will spawn a new app instance passing the URL as a CLI argument. + * #### Platform-specific + * + * - **Windows / Linux:** Unsupported without the single-instance plugin. The OS will spawn a new app instance passing the URL as a CLI argument. * * @since 2.0.0 */ diff --git a/plugins/fs/permissions/deny-webview-data.toml b/plugins/fs/permissions/deny-webview-data.toml index 73712d95e..3636ac6d4 100644 --- a/plugins/fs/permissions/deny-webview-data.toml +++ b/plugins/fs/permissions/deny-webview-data.toml @@ -6,7 +6,7 @@ description = """This denies read access to the `$APPLOCALDATA` folder on linux as the webview data and configuration values are stored here. Allowing access can lead to sensitive information disclosure and should be well considered.""" -[[scope.deny]] +[[permission.scope.deny]] path = "$APPLOCALDATA/**" [[permission]] @@ -15,5 +15,5 @@ description = """This denies read access to the `$APPLOCALDATA/EBWebView` folder on windows as the webview data and configuration values are stored here. Allowing access can lead to sensitive information disclosure and should be well considered.""" -[[scope.deny]] +[[permission.scope.deny]] path = "$APPLOCALDATA/EBWebView/**"