From e1e85dc2a5f656fc37867e278cae8042037740ac Mon Sep 17 00:00:00 2001 From: Amr Bashir Date: Sat, 13 May 2023 13:48:28 +0300 Subject: [PATCH] chore: fix ci and cleanup leftovers (#6925) * chore: fix ci and cleanup leftovers 1. removed leftover feature flags 2. remove zip/extract apis which are not used anymore 3. removed leftoever scopes 4. removed leftover allowlist and updater options 5. updated the example api * remove leftover updater structs * move updater under bundle and remove uneeded options * fix cli on linux * remove create_proxy * clippy * more clippy * clippppy * readd path api * fix api example * remove window allowlist * remove window from allowlist config * remove `all` allowlist option * remove file_move * lint * fix windows build * remvoe unused deps * remvoe allowlist config option, move protocol to `security > asset_protocol` * fix diffing features * fmt and test * fix scope alias * change files * android lint * simplify allow_file impl * Revert "simplify allow_file impl" This reverts commit b8882f2fd021917abce9338018d64652c65f33f9. * expose scopes * remove unused error variants * protocol-asset on docs.rs * ignore reqwest on udeps --------- Co-authored-by: Lucas Nogueira Co-authored-by: Lucas Nogueira --- .changes/move-protocol-asset.md | 6 + .changes/move-updater-config.md | 8 + .changes/remove-allowlist.md | 8 + .changes/remove-fs-apis.md | 5 + .changes/remove-updater-event.md | 6 + .github/CONTRIBUTING.md | 2 +- .github/workflows/lint-fmt-core.yml | 3 +- .github/workflows/test-core.yml | 6 +- core/tauri-build/Cargo.toml | 1 - core/tauri-build/src/lib.rs | 2 +- core/tauri-config-schema/Cargo.toml | 1 - core/tauri-config-schema/schema.json | 1350 +------ core/tauri-runtime-wry/Cargo.toml | 6 +- core/tauri-runtime/Cargo.toml | 9 +- core/tauri-utils/src/config.rs | 1504 +------- core/tauri/Cargo.toml | 223 +- core/tauri/build.rs | 115 - core/tauri/src/api/error.rs | 53 - core/tauri/src/api/file.rs | 8 - core/tauri/src/api/file/extract.rs | 328 -- core/tauri/src/api/file/file_move.rs | 114 - core/tauri/src/app.rs | 29 +- core/tauri/src/error.rs | 12 - core/tauri/src/lib.rs | 204 +- core/tauri/src/manager.rs | 3 +- core/tauri/src/scope/fs.rs | 8 +- core/tauri/src/scope/mod.rs | 34 +- core/tauri/src/test/mod.rs | 2 - core/tauri/src/window.rs | 1 - .../test/fixture/src-tauri/tauri.conf.json | 6 - examples/api/dist/assets/index.css | 2 +- examples/api/dist/assets/index.js | 16 +- examples/api/src-tauri/Cargo.lock | 89 +- examples/api/src-tauri/Cargo.toml | 3 +- examples/api/src-tauri/src/lib.rs | 1 - examples/api/src-tauri/src/main.rs | 2 +- examples/api/src-tauri/tauri.conf.json | 81 +- examples/api/src/App.svelte | 5 +- examples/api/src/views/Welcome.svelte | 4 - examples/commands/tauri.conf.json | 6 - examples/helloworld/tauri.conf.json | 3 - examples/isolation/tauri.conf.json | 3 - examples/multiwindow/tauri.conf.json | 8 - examples/navigation/tauri.conf.json | 8 - examples/parent-window/tauri.conf.json | 4 - examples/resources/src-tauri/tauri.conf.json | 9 - examples/sidecar/README.md | 43 - examples/sidecar/index.html | 55 - examples/sidecar/package.json | 18 - examples/sidecar/scripts/move-binary.js | 32 - examples/sidecar/src-tauri/.gitignore | 4 - examples/sidecar/src-tauri/Cargo.lock | 3144 ----------------- examples/sidecar/src-tauri/Cargo.toml | 17 - examples/sidecar/src-tauri/build.rs | 7 - examples/sidecar/src-tauri/src/main.rs | 41 - examples/sidecar/src-tauri/tauri.conf.json | 68 - examples/sidecar/src/communication.js | 22 - examples/sidecar/src/index.js | 13 - examples/sidecar/yarn.lock | 1134 ------ examples/splashscreen/tauri.conf.json | 6 - examples/state/tauri.conf.json | 6 - examples/streaming/tauri.conf.json | 14 +- .../src-tauri/tauri.conf.json | 6 - examples/web/core/tauri/tauri.conf.json | 5 +- examples/workspace/src-tauri/tauri.conf.json | 5 +- tooling/api/docs/js-api.json | 2 +- tooling/api/src/index.ts | 2 +- tooling/api/src/path.ts | 12 - tooling/api/typedoc.json | 13 - .../cpu_intensive/src-tauri/tauri.conf.json | 5 +- .../files_transfer/src-tauri/tauri.conf.json | 11 +- .../helloworld/src-tauri/tauri.conf.json | 5 +- tooling/bundler/src/bundle/settings.rs | 2 - .../fixtures/app/src-tauri/tauri.conf.json | 3 - tooling/cli/schema.json | 1350 +------ tooling/cli/src/build.rs | 13 +- tooling/cli/src/interface/rust.rs | 11 +- .../tauri-app/src-tauri/tauri.conf.json | 6 - .../vanilla/src-tauri/tauri.conf.json | 6 - tooling/cli/templates/tauri.conf.json | 5 +- 80 files changed, 698 insertions(+), 9689 deletions(-) create mode 100644 .changes/move-protocol-asset.md create mode 100644 .changes/move-updater-config.md create mode 100644 .changes/remove-allowlist.md create mode 100644 .changes/remove-fs-apis.md create mode 100644 .changes/remove-updater-event.md delete mode 100644 core/tauri/src/api/file/extract.rs delete mode 100644 core/tauri/src/api/file/file_move.rs delete mode 100644 examples/sidecar/README.md delete mode 100644 examples/sidecar/index.html delete mode 100644 examples/sidecar/package.json delete mode 100644 examples/sidecar/scripts/move-binary.js delete mode 100644 examples/sidecar/src-tauri/.gitignore delete mode 100644 examples/sidecar/src-tauri/Cargo.lock delete mode 100644 examples/sidecar/src-tauri/Cargo.toml delete mode 100644 examples/sidecar/src-tauri/build.rs delete mode 100644 examples/sidecar/src-tauri/src/main.rs delete mode 100644 examples/sidecar/src-tauri/tauri.conf.json delete mode 100644 examples/sidecar/src/communication.js delete mode 100644 examples/sidecar/src/index.js delete mode 100644 examples/sidecar/yarn.lock diff --git a/.changes/move-protocol-asset.md b/.changes/move-protocol-asset.md new file mode 100644 index 00000000000..8f7ca5ffef9 --- /dev/null +++ b/.changes/move-protocol-asset.md @@ -0,0 +1,6 @@ +--- +"tauri": patch +"tauri-utils": patch +--- + +Moved the `protocol` scope configuration to the `asset_protocol` field in `SecurityConfig`. diff --git a/.changes/move-updater-config.md b/.changes/move-updater-config.md new file mode 100644 index 00000000000..499551461d1 --- /dev/null +++ b/.changes/move-updater-config.md @@ -0,0 +1,8 @@ +--- +"tauri": patch +"tauri-utils": patch +"cli.rs": patch +"cli.js": patch +--- + +Moved the updater configuration to the `BundleConfig`. diff --git a/.changes/remove-allowlist.md b/.changes/remove-allowlist.md new file mode 100644 index 00000000000..64e4333d335 --- /dev/null +++ b/.changes/remove-allowlist.md @@ -0,0 +1,8 @@ +--- +"tauri": patch +"tauri-utils": patch +"cli.rs": patch +"cli.js": patch +--- + +Removed the allowlist configuration. diff --git a/.changes/remove-fs-apis.md b/.changes/remove-fs-apis.md new file mode 100644 index 00000000000..832923e1781 --- /dev/null +++ b/.changes/remove-fs-apis.md @@ -0,0 +1,5 @@ +--- +"tauri": patch +--- + +Removed extract and move APIs from `tauri::api::file`. diff --git a/.changes/remove-updater-event.md b/.changes/remove-updater-event.md new file mode 100644 index 00000000000..77dffd14194 --- /dev/null +++ b/.changes/remove-updater-event.md @@ -0,0 +1,6 @@ +--- +"tauri": patch +--- + +Removed `UpdaterEvent`. See `tauri-plugin-updater` for new usage. + diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index ffe024b57db..0e9d4cda114 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -71,7 +71,7 @@ The code for the bundler is located in `[Tauri repo root]/tooling/bundler`, and ### Developing Tauri Core and Related Components (Rust API, Macros, Codegen, and Utils) -The code for Tauri Core is located in `[Tauri repo root]/core/tauri`, and the Rust API, Macros, and Utils are in `[Tauri repo root]/core/tauri-(api/macros/utils)`. The easiest way to test your changes is to use the `[Tauri repo root]/examples/helloworld` app. It automatically rebuilds and uses your local copy of the Tauri core packages. Just run `yarn tauri build` or `yarn tauri dev` in the helloworld app directory after making changes to test them out. To use your local changes in another project, edit its `src-tauri/Cargo.toml` file so that the `tauri` key looks like `tauri = { path = "PATH", features = [ "api-all" ] }`, where `PATH` is the relative path to `[Tauri repo root]/core/tauri`. Then, your local copy of the Tauri core packages will be rebuilt and used whenever you build that project. +The code for Tauri Core is located in `[Tauri repo root]/core/tauri`, and the Rust API, Macros, and Utils are in `[Tauri repo root]/core/tauri-(api/macros/utils)`. The easiest way to test your changes is to use the `[Tauri repo root]/examples/helloworld` app. It automatically rebuilds and uses your local copy of the Tauri core packages. Just run `yarn tauri build` or `yarn tauri dev` in the helloworld app directory after making changes to test them out. To use your local changes in another project, edit its `src-tauri/Cargo.toml` file so that the `tauri` key looks like `tauri = { path = "PATH" }`, where `PATH` is the relative path to `[Tauri repo root]/core/tauri`. Then, your local copy of the Tauri core packages will be rebuilt and used whenever you build that project. #### Building the documentation locally diff --git a/.github/workflows/lint-fmt-core.yml b/.github/workflows/lint-fmt-core.yml index 741b2237958..b977b77c4e1 100644 --- a/.github/workflows/lint-fmt-core.yml +++ b/.github/workflows/lint-fmt-core.yml @@ -50,11 +50,10 @@ jobs: clippy: - { args: '', key: 'empty' } - { - args: '--features compression,wry,linux-protocol-headers,isolation,custom-protocol,api-all,updater,system-tray', + args: '--features compression,wry,linux-protocol-headers,isolation,custom-protocol,system-tray', key: 'all' } - { args: '--features custom-protocol', key: 'custom-protocol' } - - { args: '--features api-all', key: 'api-all' } steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/test-core.yml b/.github/workflows/test-core.yml index 9f60816afac..a3ef29d2d6b 100644 --- a/.github/workflows/test-core.yml +++ b/.github/workflows/test-core.yml @@ -72,11 +72,7 @@ jobs: key: no-default } - { - args: --features api-all, - key: api-all - } - - { - args: --features compression,wry,linux-protocol-headers,isolation,custom-protocol,api-all,updater,system-tray, + args: --features compression,wry,linux-protocol-headers,isolation,custom-protocol,system-tray, key: all } diff --git a/core/tauri-build/Cargo.toml b/core/tauri-build/Cargo.toml index 2da8f02ef9b..2d3d93d233b 100644 --- a/core/tauri-build/Cargo.toml +++ b/core/tauri-build/Cargo.toml @@ -27,7 +27,6 @@ serde_json = "1" heck = "0.4" json-patch = "1.0" walkdir = "2" -filetime = "0.2" tauri-winres = "0.1" semver = "1" diff --git a/core/tauri-build/src/lib.rs b/core/tauri-build/src/lib.rs index 1584fdc186b..8da6a0a2fd9 100644 --- a/core/tauri-build/src/lib.rs +++ b/core/tauri-build/src/lib.rs @@ -349,7 +349,7 @@ dependencies {" if !error_message.is_empty() { return Err(anyhow!(" - The `tauri` dependency features on the `Cargo.toml` file does not match the allowlist defined under `tauri.conf.json`. + The `tauri` dependency features on the `Cargo.toml` file does not match the `tauri.conf.json` config. Please run `tauri dev` or `tauri build` or {}. ", error_message)); } diff --git a/core/tauri-config-schema/Cargo.toml b/core/tauri-config-schema/Cargo.toml index 914b6250340..0f3f670ba14 100644 --- a/core/tauri-config-schema/Cargo.toml +++ b/core/tauri-config-schema/Cargo.toml @@ -11,5 +11,4 @@ tauri-utils = { version = "2.0.0-alpha.4", features = [ schemars = { version = "0.8", features = ["url", "preserve_order"] } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -serde_with = "1.12" url = { version = "2.3", features = ["serde"] } diff --git a/core/tauri-config-schema/schema.json b/core/tauri-config-schema/schema.json index b3b219fc71a..b5f5da37942 100644 --- a/core/tauri-config-schema/schema.json +++ b/core/tauri-config-schema/schema.json @@ -1,7 +1,7 @@ { "$schema": "http://json-schema.org/draft-07/schema#", "title": "Config", - "description": "The Tauri configuration object. It is read from a file where you can define your frontend assets, configure the bundler, enable the app updater, define a system tray, enable APIs via the allowlist and more.\n\nThe configuration file is generated by the [`tauri init`](https://tauri.app/v1/api/cli#init) command that lives in your Tauri application source directory (src-tauri).\n\nOnce generated, you may modify it at will to customize your Tauri application.\n\n## File Formats\n\nBy default, the configuration is defined as a JSON file named `tauri.conf.json`.\n\nTauri also supports JSON5 and TOML files via the `config-json5` and `config-toml` Cargo features, respectively. The JSON5 file name must be either `tauri.conf.json` or `tauri.conf.json5`. The TOML file name is `Tauri.toml`.\n\n## Platform-Specific Configuration\n\nIn addition to the default configuration file, Tauri can read a platform-specific configuration from `tauri.linux.conf.json`, `tauri.windows.conf.json`, `tauri.macos.conf.json`, `tauri.android.conf.json` and `tauri.ios.conf.json` (or `Tauri.linux.toml`, `Tauri.windows.toml`, `Tauri.macos.toml`, `Tauri.android.toml` and `Tauri.ios.toml` if the `Tauri.toml` format is used), which gets merged with the main configuration object.\n\n## Configuration Structure\n\nThe configuration is composed of the following objects:\n\n- [`package`](#packageconfig): Package settings - [`tauri`](#tauriconfig): The Tauri config - [`build`](#buildconfig): The build configuration - [`plugins`](#pluginconfig): The plugins config\n\n```json title=\"Example tauri.config.json file\" { \"build\": { \"beforeBuildCommand\": \"\", \"beforeDevCommand\": \"\", \"devPath\": \"../dist\", \"distDir\": \"../dist\" }, \"package\": { \"productName\": \"tauri-app\", \"version\": \"0.1.0\" }, \"tauri\": { \"allowlist\": { \"all\": true }, \"bundle\": {}, \"security\": { \"csp\": null }, \"updater\": { \"active\": false }, \"windows\": [ { \"fullscreen\": false, \"height\": 600, \"resizable\": true, \"title\": \"Tauri App\", \"width\": 800 } ] } } ```", + "description": "The Tauri configuration object. It is read from a file where you can define your frontend assets, configure the bundler and define a system tray.\n\nThe configuration file is generated by the [`tauri init`](https://tauri.app/v1/api/cli#init) command that lives in your Tauri application source directory (src-tauri).\n\nOnce generated, you may modify it at will to customize your Tauri application.\n\n## File Formats\n\nBy default, the configuration is defined as a JSON file named `tauri.conf.json`.\n\nTauri also supports JSON5 and TOML files via the `config-json5` and `config-toml` Cargo features, respectively. The JSON5 file name must be either `tauri.conf.json` or `tauri.conf.json5`. The TOML file name is `Tauri.toml`.\n\n## Platform-Specific Configuration\n\nIn addition to the default configuration file, Tauri can read a platform-specific configuration from `tauri.linux.conf.json`, `tauri.windows.conf.json`, `tauri.macos.conf.json`, `tauri.android.conf.json` and `tauri.ios.conf.json` (or `Tauri.linux.toml`, `Tauri.windows.toml`, `Tauri.macos.toml`, `Tauri.android.toml` and `Tauri.ios.toml` if the `Tauri.toml` format is used), which gets merged with the main configuration object.\n\n## Configuration Structure\n\nThe configuration is composed of the following objects:\n\n- [`package`](#packageconfig): Package settings - [`tauri`](#tauriconfig): The Tauri config - [`build`](#buildconfig): The build configuration - [`plugins`](#pluginconfig): The plugins config\n\n```json title=\"Example tauri.config.json file\" { \"build\": { \"beforeBuildCommand\": \"\", \"beforeDevCommand\": \"\", \"devPath\": \"../dist\", \"distDir\": \"../dist\" }, \"package\": { \"productName\": \"tauri-app\", \"version\": \"0.1.0\" }, \"tauri\": { \"bundle\": {}, \"security\": { \"csp\": null }, \"windows\": [ { \"fullscreen\": false, \"height\": 600, \"resizable\": true, \"title\": \"Tauri App\", \"width\": 800 } ] } } ```", "type": "object", "properties": { "$schema": { @@ -26,109 +26,6 @@ "tauri": { "description": "The Tauri configuration.", "default": { - "allowlist": { - "all": false, - "app": { - "all": false, - "hide": false, - "show": false - }, - "clipboard": { - "all": false, - "readText": false, - "writeText": false - }, - "dialog": { - "all": false, - "ask": false, - "confirm": false, - "message": false, - "open": false, - "save": false - }, - "fs": { - "all": false, - "copyFile": false, - "createDir": false, - "exists": false, - "readDir": false, - "readFile": false, - "removeDir": false, - "removeFile": false, - "renameFile": false, - "scope": [], - "writeFile": false - }, - "globalShortcut": { - "all": false - }, - "http": { - "all": false, - "request": false, - "scope": [] - }, - "notification": { - "all": false - }, - "os": { - "all": false - }, - "path": { - "all": false - }, - "process": { - "all": false, - "exit": false, - "relaunch": false, - "relaunchDangerousAllowSymlinkMacos": false - }, - "protocol": { - "all": false, - "asset": false, - "assetScope": [] - }, - "shell": { - "all": false, - "execute": false, - "open": false, - "scope": [], - "sidecar": false - }, - "window": { - "all": false, - "center": false, - "close": false, - "create": false, - "hide": false, - "maximize": false, - "minimize": false, - "print": false, - "requestUserAttention": false, - "setAlwaysOnTop": false, - "setContentProtected": false, - "setCursorGrab": false, - "setCursorIcon": false, - "setCursorPosition": false, - "setCursorVisible": false, - "setDecorations": false, - "setFocus": false, - "setFullscreen": false, - "setIcon": false, - "setIgnoreCursorEvents": false, - "setMaxSize": false, - "setMinSize": false, - "setPosition": false, - "setResizable": false, - "setShadow": false, - "setSize": false, - "setSkipTaskbar": false, - "setTitle": false, - "show": false, - "startDragging": false, - "unmaximize": false, - "unminimize": false - } - }, "bundle": { "active": false, "android": { @@ -147,6 +44,13 @@ "minimumSystemVersion": "10.13" }, "targets": "all", + "updater": { + "active": false, + "pubkey": "", + "windows": { + "installMode": "passive" + } + }, "windows": { "allowDowngrades": true, "certificateThumbprint": null, @@ -167,18 +71,14 @@ "use": "brownfield" }, "security": { + "assetProtocol": { + "enable": false, + "scope": [] + }, "dangerousDisableAssetCspModification": false, "dangerousRemoteDomainIpcAccess": [], "freezePrototype": false }, - "updater": { - "active": false, - "pubkey": "", - "windows": { - "installMode": "passive", - "installerArgs": [] - } - }, "windows": [] }, "allOf": [ @@ -278,6 +178,13 @@ "minimumSystemVersion": "10.13" }, "targets": "all", + "updater": { + "active": false, + "pubkey": "", + "windows": { + "installMode": "passive" + } + }, "windows": { "allowDowngrades": true, "certificateThumbprint": null, @@ -299,120 +206,13 @@ } ] }, - "allowlist": { - "description": "The allowlist configuration.", - "default": { - "all": false, - "app": { - "all": false, - "hide": false, - "show": false - }, - "clipboard": { - "all": false, - "readText": false, - "writeText": false - }, - "dialog": { - "all": false, - "ask": false, - "confirm": false, - "message": false, - "open": false, - "save": false - }, - "fs": { - "all": false, - "copyFile": false, - "createDir": false, - "exists": false, - "readDir": false, - "readFile": false, - "removeDir": false, - "removeFile": false, - "renameFile": false, - "scope": [], - "writeFile": false - }, - "globalShortcut": { - "all": false - }, - "http": { - "all": false, - "request": false, - "scope": [] - }, - "notification": { - "all": false - }, - "os": { - "all": false - }, - "path": { - "all": false - }, - "process": { - "all": false, - "exit": false, - "relaunch": false, - "relaunchDangerousAllowSymlinkMacos": false - }, - "protocol": { - "all": false, - "asset": false, - "assetScope": [] - }, - "shell": { - "all": false, - "execute": false, - "open": false, - "scope": [], - "sidecar": false - }, - "window": { - "all": false, - "center": false, - "close": false, - "create": false, - "hide": false, - "maximize": false, - "minimize": false, - "print": false, - "requestUserAttention": false, - "setAlwaysOnTop": false, - "setContentProtected": false, - "setCursorGrab": false, - "setCursorIcon": false, - "setCursorPosition": false, - "setCursorVisible": false, - "setDecorations": false, - "setFocus": false, - "setFullscreen": false, - "setIcon": false, - "setIgnoreCursorEvents": false, - "setMaxSize": false, - "setMinSize": false, - "setPosition": false, - "setResizable": false, - "setShadow": false, - "setSize": false, - "setSkipTaskbar": false, - "setTitle": false, - "show": false, - "startDragging": false, - "unmaximize": false, - "unminimize": false - } - }, - "allOf": [ - { - "$ref": "#/definitions/AllowlistConfig" - } - ] - }, "security": { "description": "Security configuration.", "default": { + "assetProtocol": { + "enable": false, + "scope": [] + }, "dangerousDisableAssetCspModification": false, "dangerousRemoteDomainIpcAccess": [], "freezePrototype": false @@ -423,22 +223,6 @@ } ] }, - "updater": { - "description": "The updater configuration.", - "default": { - "active": false, - "pubkey": "", - "windows": { - "installMode": "passive", - "installerArgs": [] - } - }, - "allOf": [ - { - "$ref": "#/definitions/UpdaterConfig" - } - ] - }, "systemTray": { "description": "Configuration for app system tray.", "anyOf": [ @@ -929,6 +713,21 @@ "$ref": "#/definitions/AndroidConfig" } ] + }, + "updater": { + "description": "The updater configuration.", + "default": { + "active": false, + "pubkey": "", + "windows": { + "installMode": "passive" + } + }, + "allOf": [ + { + "$ref": "#/definitions/UpdaterConfig" + } + ] } }, "additionalProperties": false @@ -1546,909 +1345,161 @@ }, "additionalProperties": false }, - "AllowlistConfig": { - "description": "Allowlist configuration. The allowlist is a translation of the [Cargo allowlist features](https://docs.rs/tauri/latest/tauri/#cargo-allowlist-features).\n\n# Notes\n\n- Endpoints that don't have their own allowlist option are enabled by default. - There is only \"opt-in\", no \"opt-out\". Setting an option to `false` has no effect.\n\n# Examples\n\n- * [`\"app-all\": true`](https://tauri.app/v1/api/config/#appallowlistconfig.all) will make the [hide](https://tauri.app/v1/api/js/app#hide) endpoint be available regardless of whether `hide` is set to `false` or `true` in the allowlist.", + "UpdaterConfig": { + "description": "The Updater configuration object.\n\nSee more: https://tauri.app/v1/api/config#updaterconfig", "type": "object", "properties": { - "all": { - "description": "Use this flag to enable all API features.", + "active": { + "description": "Whether the updater is active or not.", "default": false, "type": "boolean" }, - "fs": { - "description": "File system API allowlist.", - "default": { - "all": false, - "copyFile": false, - "createDir": false, - "exists": false, - "readDir": false, - "readFile": false, - "removeDir": false, - "removeFile": false, - "renameFile": false, - "scope": [], - "writeFile": false - }, - "allOf": [ - { - "$ref": "#/definitions/FsAllowlistConfig" - } - ] + "pubkey": { + "description": "Signature public key.", + "default": "", + "type": "string" }, - "window": { - "description": "Window API allowlist.", + "windows": { + "description": "The Windows configuration for the updater.", "default": { - "all": false, - "center": false, - "close": false, - "create": false, - "hide": false, - "maximize": false, - "minimize": false, - "print": false, - "requestUserAttention": false, - "setAlwaysOnTop": false, - "setContentProtected": false, - "setCursorGrab": false, - "setCursorIcon": false, - "setCursorPosition": false, - "setCursorVisible": false, - "setDecorations": false, - "setFocus": false, - "setFullscreen": false, - "setIcon": false, - "setIgnoreCursorEvents": false, - "setMaxSize": false, - "setMinSize": false, - "setPosition": false, - "setResizable": false, - "setShadow": false, - "setSize": false, - "setSkipTaskbar": false, - "setTitle": false, - "show": false, - "startDragging": false, - "unmaximize": false, - "unminimize": false + "installMode": "passive" }, "allOf": [ { - "$ref": "#/definitions/WindowAllowlistConfig" + "$ref": "#/definitions/UpdaterWindowsConfig" } ] - }, - "shell": { - "description": "Shell API allowlist.", - "default": { - "all": false, - "execute": false, - "open": false, - "scope": [], - "sidecar": false - }, + } + }, + "additionalProperties": false + }, + "UpdaterWindowsConfig": { + "description": "The updater configuration for Windows.\n\nSee more: https://tauri.app/v1/api/config#updaterwindowsconfig", + "type": "object", + "properties": { + "installMode": { + "description": "The installation mode for the update on Windows. Defaults to `passive`.", + "default": "passive", "allOf": [ { - "$ref": "#/definitions/ShellAllowlistConfig" + "$ref": "#/definitions/WindowsUpdateInstallMode" } ] - }, - "dialog": { - "description": "Dialog API allowlist.", - "default": { - "all": false, - "ask": false, - "confirm": false, - "message": false, - "open": false, - "save": false - }, - "allOf": [ - { - "$ref": "#/definitions/DialogAllowlistConfig" - } + } + }, + "additionalProperties": false + }, + "WindowsUpdateInstallMode": { + "description": "Install modes for the Windows update.", + "oneOf": [ + { + "description": "Specifies there's a basic UI during the installation process, including a final dialog box at the end.", + "type": "string", + "enum": [ + "basicUi" ] }, - "http": { - "description": "HTTP API allowlist.", - "default": { - "all": false, - "request": false, - "scope": [] - }, - "allOf": [ - { - "$ref": "#/definitions/HttpAllowlistConfig" - } + { + "description": "The quiet mode means there's no user interaction required. Requires admin privileges if the installer does (WiX).", + "type": "string", + "enum": [ + "quiet" ] }, - "notification": { - "description": "Notification API allowlist.", - "default": { - "all": false - }, - "allOf": [ - { - "$ref": "#/definitions/NotificationAllowlistConfig" - } + { + "description": "Specifies unattended mode, which means the installation only shows a progress bar.", + "type": "string", + "enum": [ + "passive" ] - }, - "globalShortcut": { - "description": "Global shortcut API allowlist.", - "default": { - "all": false - }, - "allOf": [ + } + ] + }, + "SecurityConfig": { + "description": "Security configuration.\n\nSee more: https://tauri.app/v1/api/config#securityconfig", + "type": "object", + "properties": { + "csp": { + "description": "The Content Security Policy that will be injected on all HTML files on the built application. If [`dev_csp`](#SecurityConfig.devCsp) is not specified, this value is also injected on dev.\n\nThis is a really important part of the configuration since it helps you ensure your WebView is secured. See .", + "anyOf": [ { - "$ref": "#/definitions/GlobalShortcutAllowlistConfig" - } - ] - }, - "os": { - "description": "OS allowlist.", - "default": { - "all": false - }, - "allOf": [ + "$ref": "#/definitions/Csp" + }, { - "$ref": "#/definitions/OsAllowlistConfig" + "type": "null" } ] }, - "path": { - "description": "Path API allowlist.", - "default": { - "all": false - }, - "allOf": [ + "devCsp": { + "description": "The Content Security Policy that will be injected on all HTML files on development.\n\nThis is a really important part of the configuration since it helps you ensure your WebView is secured. See .", + "anyOf": [ { - "$ref": "#/definitions/PathAllowlistConfig" - } - ] - }, - "protocol": { - "description": "Custom protocol allowlist.", - "default": { - "all": false, - "asset": false, - "assetScope": [] - }, - "allOf": [ + "$ref": "#/definitions/Csp" + }, { - "$ref": "#/definitions/ProtocolAllowlistConfig" + "type": "null" } ] }, - "process": { - "description": "Process API allowlist.", - "default": { - "all": false, - "exit": false, - "relaunch": false, - "relaunchDangerousAllowSymlinkMacos": false - }, - "allOf": [ - { - "$ref": "#/definitions/ProcessAllowlistConfig" - } - ] + "freezePrototype": { + "description": "Freeze the `Object.prototype` when using the custom protocol.", + "default": false, + "type": "boolean" }, - "clipboard": { - "description": "Clipboard APIs allowlist.", - "default": { - "all": false, - "readText": false, - "writeText": false - }, + "dangerousDisableAssetCspModification": { + "description": "Disables the Tauri-injected CSP sources.\n\nAt compile time, Tauri parses all the frontend assets and changes the Content-Security-Policy to only allow loading of your own scripts and styles by injecting nonce and hash sources. This stricts your CSP, which may introduce issues when using along with other flexing sources.\n\nThis configuration option allows both a boolean and a list of strings as value. A boolean instructs Tauri to disable the injection for all CSP injections, and a list of strings indicates the CSP directives that Tauri cannot inject.\n\n**WARNING:** Only disable this if you know what you are doing and have properly configured the CSP. Your application might be vulnerable to XSS attacks without this Tauri protection.", + "default": false, "allOf": [ { - "$ref": "#/definitions/ClipboardAllowlistConfig" + "$ref": "#/definitions/DisabledCspModificationKind" } ] }, - "app": { - "description": "App APIs allowlist.", + "dangerousRemoteDomainIpcAccess": { + "description": "Allow external domains to send command to Tauri.\n\nBy default, external domains do not have access to `window.__TAURI__`, which means they cannot communicate with the commands defined in Rust. This prevents attacks where an externally loaded malicious or compromised sites could start executing commands on the user's device.\n\nThis configuration allows a set of external domains to have access to the Tauri commands. When you configure a domain to be allowed to access the IPC, all subpaths are allowed. Subdomains are not allowed.\n\n**WARNING:** Only use this option if you either have internal checks against malicious external sites or you can trust the allowed external sites. You application might be vulnerable to dangerous Tauri command related attacks otherwise.", + "default": [], + "type": "array", + "items": { + "$ref": "#/definitions/RemoteDomainAccessScope" + } + }, + "assetProtocol": { + "description": "Custom protocol config.", "default": { - "all": false, - "hide": false, - "show": false + "enable": false, + "scope": [] }, "allOf": [ { - "$ref": "#/definitions/AppAllowlistConfig" + "$ref": "#/definitions/AssetProtocolConfig" } ] } }, "additionalProperties": false }, - "FsAllowlistConfig": { - "description": "Allowlist for the file system APIs.\n\nSee more: https://tauri.app/v1/api/config#fsallowlistconfig", - "type": "object", - "properties": { - "scope": { - "description": "The access scope for the filesystem APIs.", - "default": [], - "allOf": [ - { - "$ref": "#/definitions/FsAllowlistScope" - } - ] - }, - "all": { - "description": "Use this flag to enable all file system API features.", - "default": false, - "type": "boolean" - }, - "readFile": { - "description": "Read file from local filesystem.", - "default": false, - "type": "boolean" - }, - "writeFile": { - "description": "Write file to local filesystem.", - "default": false, - "type": "boolean" + "Csp": { + "description": "A Content-Security-Policy definition. See .", + "anyOf": [ + { + "description": "The entire CSP policy in a single text string.", + "type": "string" }, - "readDir": { - "description": "Read directory from local filesystem.", - "default": false, - "type": "boolean" - }, - "copyFile": { - "description": "Copy file from local filesystem.", - "default": false, - "type": "boolean" - }, - "createDir": { - "description": "Create directory from local filesystem.", - "default": false, - "type": "boolean" - }, - "removeDir": { - "description": "Remove directory from local filesystem.", - "default": false, - "type": "boolean" - }, - "removeFile": { - "description": "Remove file from local filesystem.", - "default": false, - "type": "boolean" - }, - "renameFile": { - "description": "Rename file from local filesystem.", - "default": false, - "type": "boolean" - }, - "exists": { - "description": "Check if path exists on the local filesystem.", - "default": false, - "type": "boolean" - } - }, - "additionalProperties": false - }, - "FsAllowlistScope": { - "description": "Filesystem scope definition. It is a list of glob patterns that restrict the API access from the webview.\n\nEach pattern can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.", - "anyOf": [ - { - "description": "A list of paths that are allowed by this scope.", - "type": "array", - "items": { - "type": "string" - } - }, - { - "description": "A complete scope configuration.", - "type": "object", - "properties": { - "allow": { - "description": "A list of paths that are allowed by this scope.", - "default": [], - "type": "array", - "items": { - "type": "string" - } - }, - "deny": { - "description": "A list of paths that are not allowed by this scope. This gets precedence over the [`Self::Scope::allow`] list.", - "default": [], - "type": "array", - "items": { - "type": "string" - } - } - } - } - ] - }, - "WindowAllowlistConfig": { - "description": "Allowlist for the window APIs.\n\nSee more: https://tauri.app/v1/api/config#windowallowlistconfig", - "type": "object", - "properties": { - "all": { - "description": "Use this flag to enable all window API features.", - "default": false, - "type": "boolean" - }, - "create": { - "description": "Allows dynamic window creation.", - "default": false, - "type": "boolean" - }, - "center": { - "description": "Allows centering the window.", - "default": false, - "type": "boolean" - }, - "requestUserAttention": { - "description": "Allows requesting user attention on the window.", - "default": false, - "type": "boolean" - }, - "setResizable": { - "description": "Allows setting the resizable flag of the window.", - "default": false, - "type": "boolean" - }, - "setTitle": { - "description": "Allows changing the window title.", - "default": false, - "type": "boolean" - }, - "maximize": { - "description": "Allows maximizing the window.", - "default": false, - "type": "boolean" - }, - "unmaximize": { - "description": "Allows unmaximizing the window.", - "default": false, - "type": "boolean" - }, - "minimize": { - "description": "Allows minimizing the window.", - "default": false, - "type": "boolean" - }, - "unminimize": { - "description": "Allows unminimizing the window.", - "default": false, - "type": "boolean" - }, - "show": { - "description": "Allows showing the window.", - "default": false, - "type": "boolean" - }, - "hide": { - "description": "Allows hiding the window.", - "default": false, - "type": "boolean" - }, - "close": { - "description": "Allows closing the window.", - "default": false, - "type": "boolean" - }, - "setDecorations": { - "description": "Allows setting the decorations flag of the window.", - "default": false, - "type": "boolean" - }, - "setShadow": { - "description": "Allows setting the shadow flag of the window.", - "default": false, - "type": "boolean" - }, - "setAlwaysOnTop": { - "description": "Allows setting the always_on_top flag of the window.", - "default": false, - "type": "boolean" - }, - "setContentProtected": { - "description": "Allows preventing the window contents from being captured by other apps.", - "default": false, - "type": "boolean" - }, - "setSize": { - "description": "Allows setting the window size.", - "default": false, - "type": "boolean" - }, - "setMinSize": { - "description": "Allows setting the window minimum size.", - "default": false, - "type": "boolean" - }, - "setMaxSize": { - "description": "Allows setting the window maximum size.", - "default": false, - "type": "boolean" - }, - "setPosition": { - "description": "Allows changing the position of the window.", - "default": false, - "type": "boolean" - }, - "setFullscreen": { - "description": "Allows setting the fullscreen flag of the window.", - "default": false, - "type": "boolean" - }, - "setFocus": { - "description": "Allows focusing the window.", - "default": false, - "type": "boolean" - }, - "setIcon": { - "description": "Allows changing the window icon.", - "default": false, - "type": "boolean" - }, - "setSkipTaskbar": { - "description": "Allows setting the skip_taskbar flag of the window.", - "default": false, - "type": "boolean" - }, - "setCursorGrab": { - "description": "Allows grabbing the cursor.", - "default": false, - "type": "boolean" - }, - "setCursorVisible": { - "description": "Allows setting the cursor visibility.", - "default": false, - "type": "boolean" - }, - "setCursorIcon": { - "description": "Allows changing the cursor icon.", - "default": false, - "type": "boolean" - }, - "setCursorPosition": { - "description": "Allows setting the cursor position.", - "default": false, - "type": "boolean" - }, - "setIgnoreCursorEvents": { - "description": "Allows ignoring cursor events.", - "default": false, - "type": "boolean" - }, - "startDragging": { - "description": "Allows start dragging on the window.", - "default": false, - "type": "boolean" - }, - "print": { - "description": "Allows opening the system dialog to print the window content.", - "default": false, - "type": "boolean" - } - }, - "additionalProperties": false - }, - "ShellAllowlistConfig": { - "description": "Allowlist for the shell APIs.\n\nSee more: https://tauri.app/v1/api/config#shellallowlistconfig", - "type": "object", - "properties": { - "scope": { - "description": "Access scope for the binary execution APIs. Sidecars are automatically enabled.", - "default": [], - "allOf": [ - { - "$ref": "#/definitions/ShellAllowlistScope" - } - ] - }, - "all": { - "description": "Use this flag to enable all shell API features.", - "default": false, - "type": "boolean" - }, - "execute": { - "description": "Enable binary execution.", - "default": false, - "type": "boolean" - }, - "sidecar": { - "description": "Enable sidecar execution, allowing the JavaScript layer to spawn a sidecar command, an executable that is shipped with the application. For more information see .", - "default": false, - "type": "boolean" - }, - "open": { - "description": "Open URL with the user's default application.", - "default": false, - "allOf": [ - { - "$ref": "#/definitions/ShellAllowlistOpen" - } - ] - } - }, - "additionalProperties": false - }, - "ShellAllowlistScope": { - "description": "Shell scope definition. It is a list of command names and associated CLI arguments that restrict the API access from the webview.", - "type": "array", - "items": { - "$ref": "#/definitions/ShellAllowedCommand" - } - }, - "ShellAllowedCommand": { - "description": "A command allowed to be executed by the webview API.", - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "description": "The name for this allowed shell command configuration.\n\nThis name will be used inside of the webview API to call this command along with any specified arguments.", - "type": "string" - }, - "cmd": { - "description": "The command name. It can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.", - "default": "", - "type": "string" - }, - "args": { - "description": "The allowed arguments for the command execution.", - "default": false, - "allOf": [ - { - "$ref": "#/definitions/ShellAllowedArgs" - } - ] - }, - "sidecar": { - "description": "If this command is a sidecar command.", - "default": false, - "type": "boolean" - } - } - }, - "ShellAllowedArgs": { - "description": "A set of command arguments allowed to be executed by the webview API.\n\nA value of `true` will allow any arguments to be passed to the command. `false` will disable all arguments. A list of [`ShellAllowedArg`] will set those arguments as the only valid arguments to be passed to the attached command configuration.", - "anyOf": [ - { - "description": "Use a simple boolean to allow all or disable all arguments to this command configuration.", - "type": "boolean" - }, - { - "description": "A specific set of [`ShellAllowedArg`] that are valid to call for the command configuration.", - "type": "array", - "items": { - "$ref": "#/definitions/ShellAllowedArg" - } - } - ] - }, - "ShellAllowedArg": { - "description": "A command argument allowed to be executed by the webview API.", - "anyOf": [ - { - "description": "A non-configurable argument that is passed to the command in the order it was specified.", - "type": "string" - }, - { - "description": "A variable that is set while calling the command from the webview API.", - "type": "object", - "required": [ - "validator" - ], - "properties": { - "validator": { - "description": "[regex] validator to require passed values to conform to an expected input.\n\nThis will require the argument value passed to this variable to match the `validator` regex before it will be executed.\n\n[regex]: https://docs.rs/regex/latest/regex/#syntax", - "type": "string" - } - }, - "additionalProperties": false - } - ] - }, - "ShellAllowlistOpen": { - "description": "Defines the `shell > open` api scope.", - "anyOf": [ - { - "description": "If the shell open API should be enabled.\n\nIf enabled, the default validation regex (`^((mailto:\\w+)|(tel:\\w+)|(https?://\\w+)).+`) is used.", - "type": "boolean" - }, - { - "description": "Enable the shell open API, with a custom regex that the opened path must match against.\n\nIf using a custom regex to support a non-http(s) schema, care should be used to prevent values that allow flag-like strings to pass validation. e.g. `--enable-debugging`, `-i`, `/R`.", - "type": "string" - } - ] - }, - "DialogAllowlistConfig": { - "description": "Allowlist for the dialog APIs.\n\nSee more: https://tauri.app/v1/api/config#dialogallowlistconfig", - "type": "object", - "properties": { - "all": { - "description": "Use this flag to enable all dialog API features.", - "default": false, - "type": "boolean" - }, - "open": { - "description": "Allows the API to open a dialog window to pick files.", - "default": false, - "type": "boolean" - }, - "save": { - "description": "Allows the API to open a dialog window to pick where to save files.", - "default": false, - "type": "boolean" - }, - "message": { - "description": "Allows the API to show a message dialog window.", - "default": false, - "type": "boolean" - }, - "ask": { - "description": "Allows the API to show a dialog window with Yes/No buttons.", - "default": false, - "type": "boolean" - }, - "confirm": { - "description": "Allows the API to show a dialog window with Ok/Cancel buttons.", - "default": false, - "type": "boolean" - } - }, - "additionalProperties": false - }, - "HttpAllowlistConfig": { - "description": "Allowlist for the HTTP APIs.\n\nSee more: https://tauri.app/v1/api/config#httpallowlistconfig", - "type": "object", - "properties": { - "scope": { - "description": "The access scope for the HTTP APIs.", - "default": [], - "allOf": [ - { - "$ref": "#/definitions/HttpAllowlistScope" - } - ] - }, - "all": { - "description": "Use this flag to enable all HTTP API features.", - "default": false, - "type": "boolean" - }, - "request": { - "description": "Allows making HTTP requests.", - "default": false, - "type": "boolean" - } - }, - "additionalProperties": false - }, - "HttpAllowlistScope": { - "description": "HTTP API scope definition. It is a list of URLs that can be accessed by the webview when using the HTTP APIs. The scoped URL is matched against the request URL using a glob pattern.\n\nExamples: - \"https://**\": allows all HTTPS urls - \"https://*.github.com/tauri-apps/tauri\": allows any subdomain of \"github.com\" with the \"tauri-apps/api\" path - \"https://myapi.service.com/users/*\": allows access to any URLs that begins with \"https://myapi.service.com/users/\"", - "type": "array", - "items": { - "type": "string", - "format": "uri" - } - }, - "NotificationAllowlistConfig": { - "description": "Allowlist for the notification APIs.\n\nSee more: https://tauri.app/v1/api/config#notificationallowlistconfig", - "type": "object", - "properties": { - "all": { - "description": "Use this flag to enable all notification API features.", - "default": false, - "type": "boolean" - } - }, - "additionalProperties": false - }, - "GlobalShortcutAllowlistConfig": { - "description": "Allowlist for the global shortcut APIs.\n\nSee more: https://tauri.app/v1/api/config#globalshortcutallowlistconfig", - "type": "object", - "properties": { - "all": { - "description": "Use this flag to enable all global shortcut API features.", - "default": false, - "type": "boolean" - } - }, - "additionalProperties": false - }, - "OsAllowlistConfig": { - "description": "Allowlist for the OS APIs.\n\nSee more: https://tauri.app/v1/api/config#osallowlistconfig", - "type": "object", - "properties": { - "all": { - "description": "Use this flag to enable all OS API features.", - "default": false, - "type": "boolean" - } - }, - "additionalProperties": false - }, - "PathAllowlistConfig": { - "description": "Allowlist for the path APIs.\n\nSee more: https://tauri.app/v1/api/config#pathallowlistconfig", - "type": "object", - "properties": { - "all": { - "description": "Use this flag to enable all path API features.", - "default": false, - "type": "boolean" - } - }, - "additionalProperties": false - }, - "ProtocolAllowlistConfig": { - "description": "Allowlist for the custom protocols.\n\nSee more: https://tauri.app/v1/api/config#protocolallowlistconfig", - "type": "object", - "properties": { - "assetScope": { - "description": "The access scope for the asset protocol.", - "default": [], - "allOf": [ - { - "$ref": "#/definitions/FsAllowlistScope" - } - ] - }, - "all": { - "description": "Use this flag to enable all custom protocols.", - "default": false, - "type": "boolean" - }, - "asset": { - "description": "Enables the asset protocol.", - "default": false, - "type": "boolean" - } - }, - "additionalProperties": false - }, - "ProcessAllowlistConfig": { - "description": "Allowlist for the process APIs.\n\nSee more: https://tauri.app/v1/api/config#processallowlistconfig", - "type": "object", - "properties": { - "all": { - "description": "Use this flag to enable all process APIs.", - "default": false, - "type": "boolean" - }, - "relaunch": { - "description": "Enables the relaunch API.", - "default": false, - "type": "boolean" - }, - "relaunchDangerousAllowSymlinkMacos": { - "description": "Dangerous option that allows macOS to relaunch even if the binary contains a symlink.\n\nThis is due to macOS having less symlink protection. Highly recommended to not set this flag unless you have a very specific reason too, and understand the implications of it.", - "default": false, - "type": "boolean" - }, - "exit": { - "description": "Enables the exit API.", - "default": false, - "type": "boolean" - } - }, - "additionalProperties": false - }, - "ClipboardAllowlistConfig": { - "description": "Allowlist for the clipboard APIs.\n\nSee more: https://tauri.app/v1/api/config#clipboardallowlistconfig", - "type": "object", - "properties": { - "all": { - "description": "Use this flag to enable all clipboard APIs.", - "default": false, - "type": "boolean" - }, - "writeText": { - "description": "Enables the clipboard's `writeText` API.", - "default": false, - "type": "boolean" - }, - "readText": { - "description": "Enables the clipboard's `readText` API.", - "default": false, - "type": "boolean" - } - }, - "additionalProperties": false - }, - "AppAllowlistConfig": { - "description": "Allowlist for the app APIs.\n\nSee more: https://tauri.app/v1/api/config#appallowlistconfig", - "type": "object", - "properties": { - "all": { - "description": "Use this flag to enable all app APIs.", - "default": false, - "type": "boolean" - }, - "show": { - "description": "Enables the app's `show` API.", - "default": false, - "type": "boolean" - }, - "hide": { - "description": "Enables the app's `hide` API.", - "default": false, - "type": "boolean" - } - }, - "additionalProperties": false - }, - "SecurityConfig": { - "description": "Security configuration.\n\nSee more: https://tauri.app/v1/api/config#securityconfig", - "type": "object", - "properties": { - "csp": { - "description": "The Content Security Policy that will be injected on all HTML files on the built application. If [`dev_csp`](#SecurityConfig.devCsp) is not specified, this value is also injected on dev.\n\nThis is a really important part of the configuration since it helps you ensure your WebView is secured. See .", - "anyOf": [ - { - "$ref": "#/definitions/Csp" - }, - { - "type": "null" - } - ] - }, - "devCsp": { - "description": "The Content Security Policy that will be injected on all HTML files on development.\n\nThis is a really important part of the configuration since it helps you ensure your WebView is secured. See .", - "anyOf": [ - { - "$ref": "#/definitions/Csp" - }, - { - "type": "null" - } - ] - }, - "freezePrototype": { - "description": "Freeze the `Object.prototype` when using the custom protocol.", - "default": false, - "type": "boolean" - }, - "dangerousDisableAssetCspModification": { - "description": "Disables the Tauri-injected CSP sources.\n\nAt compile time, Tauri parses all the frontend assets and changes the Content-Security-Policy to only allow loading of your own scripts and styles by injecting nonce and hash sources. This stricts your CSP, which may introduce issues when using along with other flexing sources.\n\nThis configuration option allows both a boolean and a list of strings as value. A boolean instructs Tauri to disable the injection for all CSP injections, and a list of strings indicates the CSP directives that Tauri cannot inject.\n\n**WARNING:** Only disable this if you know what you are doing and have properly configured the CSP. Your application might be vulnerable to XSS attacks without this Tauri protection.", - "default": false, - "allOf": [ - { - "$ref": "#/definitions/DisabledCspModificationKind" - } - ] - }, - "dangerousRemoteDomainIpcAccess": { - "description": "Allow external domains to send command to Tauri.\n\nBy default, external domains do not have access to `window.__TAURI__`, which means they cannot communicate with the commands defined in Rust. This prevents attacks where an externally loaded malicious or compromised sites could start executing commands on the user's device.\n\nThis configuration allows a set of external domains to have access to the Tauri commands. When you configure a domain to be allowed to access the IPC, all subpaths are allowed. Subdomains are not allowed.\n\n**WARNING:** Only use this option if you either have internal checks against malicious external sites or you can trust the allowed external sites. You application might be vulnerable to dangerous Tauri command related attacks otherwise.", - "default": [], - "type": "array", - "items": { - "$ref": "#/definitions/RemoteDomainAccessScope" - } - } - }, - "additionalProperties": false - }, - "Csp": { - "description": "A Content-Security-Policy definition. See .", - "anyOf": [ - { - "description": "The entire CSP policy in a single text string.", - "type": "string" - }, - { - "description": "An object mapping a directive with its sources values as a list of strings.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/CspDirectiveSources" - } - } - ] - }, - "CspDirectiveSources": { - "description": "A Content-Security-Policy directive source list. See .", - "anyOf": [ - { - "description": "An inline list of CSP sources. Same as [`Self::List`], but concatenated with a space separator.", - "type": "string" + { + "description": "An object mapping a directive with its sources values as a list of strings.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/CspDirectiveSources" + } + } + ] + }, + "CspDirectiveSources": { + "description": "A Content-Security-Policy directive source list. See .", + "anyOf": [ + { + "description": "An inline list of CSP sources. Same as [`Self::List`], but concatenated with a space separator.", + "type": "string" }, { "description": "A list of CSP sources. The collection will be concatenated with a space separator for the CSP string.", @@ -2512,97 +1563,58 @@ }, "additionalProperties": false }, - "UpdaterConfig": { - "description": "The Updater configuration object.\n\nSee more: https://tauri.app/v1/api/config#updaterconfig", + "AssetProtocolConfig": { + "description": "Config for the asset custom protocol.\n\nSee more: https://tauri.app/v1/api/config#assetprotocolconfig", "type": "object", "properties": { - "active": { - "description": "Whether the updater is active or not.", - "default": false, - "type": "boolean" - }, - "endpoints": { - "description": "The updater endpoints. TLS is enforced on production.\n\nThe updater URL can contain the following variables: - {{current_version}}: The version of the app that is requesting the update - {{target}}: The operating system name (one of `linux`, `windows` or `darwin`). - {{arch}}: The architecture of the machine (one of `x86_64`, `i686`, `aarch64` or `armv7`).\n\n# Examples - \"https://my.cdn.com/latest.json\": a raw JSON endpoint that returns the latest version and download links for each platform. - \"https://updates.app.dev/{{target}}?version={{current_version}}&arch={{arch}}\": a dedicated API with positional and query string arguments.", - "type": [ - "array", - "null" - ], - "items": { - "$ref": "#/definitions/UpdaterEndpoint" - } - }, - "pubkey": { - "description": "Signature public key.", - "default": "", - "type": "string" - }, - "windows": { - "description": "The Windows configuration for the updater.", - "default": { - "installMode": "passive", - "installerArgs": [] - }, + "scope": { + "description": "The access scope for the asset protocol.", + "default": [], "allOf": [ { - "$ref": "#/definitions/UpdaterWindowsConfig" + "$ref": "#/definitions/FsScope" } ] + }, + "enable": { + "description": "Enables the asset protocol.", + "default": false, + "type": "boolean" } }, "additionalProperties": false }, - "UpdaterEndpoint": { - "description": "A URL to an updater server.\n\nThe URL must use the `https` scheme on production.", - "type": "string", - "format": "uri" - }, - "UpdaterWindowsConfig": { - "description": "The updater configuration for Windows.\n\nSee more: https://tauri.app/v1/api/config#updaterwindowsconfig", - "type": "object", - "properties": { - "installerArgs": { - "description": "Additional arguments given to the NSIS or WiX installer.", - "default": [], + "FsScope": { + "description": "Protocol scope definition. It is a list of glob patterns that restrict the API access from the webview.\n\nEach pattern can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.", + "anyOf": [ + { + "description": "A list of paths that are allowed by this scope.", "type": "array", "items": { "type": "string" } }, - "installMode": { - "description": "The installation mode for the update on Windows. Defaults to `passive`.", - "default": "passive", - "allOf": [ - { - "$ref": "#/definitions/WindowsUpdateInstallMode" - } - ] - } - }, - "additionalProperties": false - }, - "WindowsUpdateInstallMode": { - "description": "Install modes for the Windows update.", - "oneOf": [ - { - "description": "Specifies there's a basic UI during the installation process, including a final dialog box at the end.", - "type": "string", - "enum": [ - "basicUi" - ] - }, { - "description": "The quiet mode means there's no user interaction required. Requires admin privileges if the installer does (WiX).", - "type": "string", - "enum": [ - "quiet" - ] - }, - { - "description": "Specifies unattended mode, which means the installation only shows a progress bar.", - "type": "string", - "enum": [ - "passive" - ] + "description": "A complete scope configuration.", + "type": "object", + "properties": { + "allow": { + "description": "A list of paths that are allowed by this scope.", + "default": [], + "type": "array", + "items": { + "type": "string" + } + }, + "deny": { + "description": "A list of paths that are not allowed by this scope. This gets precedence over the [`Self::Scope::allow`] list.", + "default": [], + "type": "array", + "items": { + "type": "string" + } + } + } } ] }, diff --git a/core/tauri-runtime-wry/Cargo.toml b/core/tauri-runtime-wry/Cargo.toml index 95225ae2be1..5c1d6888eb8 100644 --- a/core/tauri-runtime-wry/Cargo.toml +++ b/core/tauri-runtime-wry/Cargo.toml @@ -23,9 +23,9 @@ raw-window-handle = "0.5" [target."cfg(windows)".dependencies] webview2-com = "0.22" - [target."cfg(windows)".dependencies.windows] - version = "0.44" - features = [ "Win32_Foundation" ] +[target."cfg(windows)".dependencies.windows] +version = "0.44" +features = [ "Win32_Foundation" ] [target."cfg(any(target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies] gtk = { version = "0.16", features = [ "v3_24" ] } diff --git a/core/tauri-runtime/Cargo.toml b/core/tauri-runtime/Cargo.toml index 9762669505f..1c01c027218 100644 --- a/core/tauri-runtime/Cargo.toml +++ b/core/tauri-runtime/Cargo.toml @@ -34,12 +34,9 @@ raw-window-handle = "0.5" rand = "0.8" url = { version = "2" } -[target."cfg(windows)".dependencies] -webview2-com = "0.22" - - [target."cfg(windows)".dependencies.windows] - version = "0.44" - features = [ "Win32_Foundation" ] +[target."cfg(windows)".dependencies.windows] +version = "0.44" +features = [ "Win32_Foundation" ] [target."cfg(any(target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies] gtk = { version = "0.16", features = [ "v3_24" ] } diff --git a/core/tauri-utils/src/config.rs b/core/tauri-utils/src/config.rs index bfab234227f..c38a5baf31a 100644 --- a/core/tauri-utils/src/config.rs +++ b/core/tauri-utils/src/config.rs @@ -609,6 +609,65 @@ impl Default for WindowsConfig { } } +/// The Updater configuration object. +/// +/// See more: https://tauri.app/v1/api/config#updaterconfig +#[skip_serializing_none] +#[derive(Debug, PartialEq, Eq, Clone, Serialize)] +#[cfg_attr(feature = "schema", derive(JsonSchema))] +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub struct UpdaterConfig { + /// Whether the updater is active or not. + #[serde(default)] + pub active: bool, + /// Signature public key. + #[serde(default)] // use default just so the schema doesn't flag it as required + pub pubkey: String, + /// The Windows configuration for the updater. + #[serde(default)] + pub windows: UpdaterWindowsConfig, +} + +impl<'de> Deserialize<'de> for UpdaterConfig { + fn deserialize(deserializer: D) -> Result + where + D: Deserializer<'de>, + { + #[derive(Deserialize)] + struct InnerUpdaterConfig { + #[serde(default)] + active: bool, + pubkey: Option, + #[serde(default)] + windows: UpdaterWindowsConfig, + } + + let config = InnerUpdaterConfig::deserialize(deserializer)?; + + if config.active && config.pubkey.is_none() { + return Err(DeError::custom( + "The updater `pubkey` configuration is required.", + )); + } + + Ok(UpdaterConfig { + active: config.active, + pubkey: config.pubkey.unwrap_or_default(), + windows: config.windows, + }) + } +} + +impl Default for UpdaterConfig { + fn default() -> Self { + Self { + active: false, + pubkey: "".into(), + windows: Default::default(), + } + } +} + /// Configuration for tauri-bundler. /// /// See more: https://tauri.app/v1/api/config#bundleconfig @@ -683,6 +742,9 @@ pub struct BundleConfig { /// Android configuration. #[serde(default)] pub android: AndroidConfig, + /// The updater configuration. + #[serde(default)] + pub updater: UpdaterConfig, } /// The window configuration object. @@ -1021,76 +1083,7 @@ pub struct RemoteDomainAccessScope { pub plugins: Vec, } -/// Security configuration. -/// -/// See more: https://tauri.app/v1/api/config#securityconfig -#[skip_serializing_none] -#[derive(Debug, Default, PartialEq, Eq, Clone, Deserialize, Serialize)] -#[cfg_attr(feature = "schema", derive(JsonSchema))] -#[serde(rename_all = "camelCase", deny_unknown_fields)] -pub struct SecurityConfig { - /// The Content Security Policy that will be injected on all HTML files on the built application. - /// If [`dev_csp`](#SecurityConfig.devCsp) is not specified, this value is also injected on dev. - /// - /// This is a really important part of the configuration since it helps you ensure your WebView is secured. - /// See . - pub csp: Option, - /// The Content Security Policy that will be injected on all HTML files on development. - /// - /// This is a really important part of the configuration since it helps you ensure your WebView is secured. - /// See . - #[serde(alias = "dev-csp")] - pub dev_csp: Option, - /// Freeze the `Object.prototype` when using the custom protocol. - #[serde(default, alias = "freeze-prototype")] - pub freeze_prototype: bool, - /// Disables the Tauri-injected CSP sources. - /// - /// At compile time, Tauri parses all the frontend assets and changes the Content-Security-Policy - /// to only allow loading of your own scripts and styles by injecting nonce and hash sources. - /// This stricts your CSP, which may introduce issues when using along with other flexing sources. - /// - /// This configuration option allows both a boolean and a list of strings as value. - /// A boolean instructs Tauri to disable the injection for all CSP injections, - /// and a list of strings indicates the CSP directives that Tauri cannot inject. - /// - /// **WARNING:** Only disable this if you know what you are doing and have properly configured the CSP. - /// Your application might be vulnerable to XSS attacks without this Tauri protection. - #[serde(default, alias = "dangerous-disable-asset-csp-modification")] - pub dangerous_disable_asset_csp_modification: DisabledCspModificationKind, - /// Allow external domains to send command to Tauri. - /// - /// By default, external domains do not have access to `window.__TAURI__`, which means they cannot - /// communicate with the commands defined in Rust. This prevents attacks where an externally - /// loaded malicious or compromised sites could start executing commands on the user's device. - /// - /// This configuration allows a set of external domains to have access to the Tauri commands. - /// When you configure a domain to be allowed to access the IPC, all subpaths are allowed. Subdomains are not allowed. - /// - /// **WARNING:** Only use this option if you either have internal checks against malicious - /// external sites or you can trust the allowed external sites. You application might be - /// vulnerable to dangerous Tauri command related attacks otherwise. - #[serde(default, alias = "dangerous-remote-domain-ipc-access")] - pub dangerous_remote_domain_ipc_access: Vec, -} - -/// Defines an allowlist type. -pub trait Allowlist { - /// Returns all features associated with the allowlist struct. - fn all_features() -> Vec<&'static str>; - /// Returns the tauri features enabled on this allowlist. - fn to_features(&self) -> Vec<&'static str>; -} - -macro_rules! check_feature { - ($self:ident, $features:ident, $flag:ident, $feature_name: expr) => { - if $self.$flag { - $features.push($feature_name) - } - }; -} - -/// Filesystem scope definition. +/// Protocol scope definition. /// It is a list of glob patterns that restrict the API access from the webview. /// /// Each pattern can start with a variable that resolves to a system base directory. @@ -1101,7 +1094,7 @@ macro_rules! check_feature { #[derive(Debug, PartialEq, Eq, Clone, Deserialize, Serialize)] #[cfg_attr(feature = "schema", derive(JsonSchema))] #[serde(untagged)] -pub enum FsAllowlistScope { +pub enum FsScope { /// A list of paths that are allowed by this scope. AllowedPaths(Vec), /// A complete scope configuration. @@ -1116,1031 +1109,99 @@ pub enum FsAllowlistScope { }, } -impl Default for FsAllowlistScope { +impl Default for FsScope { fn default() -> Self { Self::AllowedPaths(Vec::new()) } } -impl FsAllowlistScope { +impl FsScope { /// The list of allowed paths. pub fn allowed_paths(&self) -> &Vec { match self { Self::AllowedPaths(p) => p, - Self::Scope { allow, .. } => allow, - } - } - - /// The list of forbidden paths. - pub fn forbidden_paths(&self) -> Option<&Vec> { - match self { - Self::AllowedPaths(_) => None, - Self::Scope { deny, .. } => Some(deny), - } - } -} - -/// Allowlist for the file system APIs. -/// -/// See more: https://tauri.app/v1/api/config#fsallowlistconfig -#[derive(Debug, Default, PartialEq, Eq, Clone, Deserialize, Serialize)] -#[cfg_attr(feature = "schema", derive(JsonSchema))] -#[serde(rename_all = "camelCase", deny_unknown_fields)] -pub struct FsAllowlistConfig { - /// The access scope for the filesystem APIs. - #[serde(default)] - pub scope: FsAllowlistScope, - /// Use this flag to enable all file system API features. - #[serde(default)] - pub all: bool, - /// Read file from local filesystem. - #[serde(default, alias = "read-file")] - pub read_file: bool, - /// Write file to local filesystem. - #[serde(default, alias = "write-file")] - pub write_file: bool, - /// Read directory from local filesystem. - #[serde(default, alias = "read-dir")] - pub read_dir: bool, - /// Copy file from local filesystem. - #[serde(default, alias = "copy-file")] - pub copy_file: bool, - /// Create directory from local filesystem. - #[serde(default, alias = "create-dir")] - pub create_dir: bool, - /// Remove directory from local filesystem. - #[serde(default, alias = "remove-dir")] - pub remove_dir: bool, - /// Remove file from local filesystem. - #[serde(default, alias = "remove-file")] - pub remove_file: bool, - /// Rename file from local filesystem. - #[serde(default, alias = "rename-file")] - pub rename_file: bool, - /// Check if path exists on the local filesystem. - #[serde(default)] - pub exists: bool, -} - -impl Allowlist for FsAllowlistConfig { - fn all_features() -> Vec<&'static str> { - let allowlist = Self { - scope: Default::default(), - all: false, - read_file: true, - write_file: true, - read_dir: true, - copy_file: true, - create_dir: true, - remove_dir: true, - remove_file: true, - rename_file: true, - exists: true, - }; - let mut features = allowlist.to_features(); - features.push("fs-all"); - features - } - - fn to_features(&self) -> Vec<&'static str> { - if self.all { - vec!["fs-all"] - } else { - let mut features = Vec::new(); - check_feature!(self, features, read_file, "fs-read-file"); - check_feature!(self, features, write_file, "fs-write-file"); - check_feature!(self, features, read_dir, "fs-read-dir"); - check_feature!(self, features, copy_file, "fs-copy-file"); - check_feature!(self, features, create_dir, "fs-create-dir"); - check_feature!(self, features, remove_dir, "fs-remove-dir"); - check_feature!(self, features, remove_file, "fs-remove-file"); - check_feature!(self, features, rename_file, "fs-rename-file"); - check_feature!(self, features, exists, "fs-exists"); - features - } - } -} - -/// Allowlist for the window APIs. -/// -/// See more: https://tauri.app/v1/api/config#windowallowlistconfig -#[derive(Debug, Default, PartialEq, Eq, Clone, Deserialize, Serialize)] -#[cfg_attr(feature = "schema", derive(JsonSchema))] -#[serde(rename_all = "camelCase", deny_unknown_fields)] -pub struct WindowAllowlistConfig { - /// Use this flag to enable all window API features. - #[serde(default)] - pub all: bool, - /// Allows dynamic window creation. - #[serde(default)] - pub create: bool, - /// Allows centering the window. - #[serde(default)] - pub center: bool, - /// Allows requesting user attention on the window. - #[serde(default, alias = "request-user-attention")] - pub request_user_attention: bool, - /// Allows setting the resizable flag of the window. - #[serde(default, alias = "set-resizable")] - pub set_resizable: bool, - /// Allows changing the window title. - #[serde(default, alias = "set-title")] - pub set_title: bool, - /// Allows maximizing the window. - #[serde(default)] - pub maximize: bool, - /// Allows unmaximizing the window. - #[serde(default)] - pub unmaximize: bool, - /// Allows minimizing the window. - #[serde(default)] - pub minimize: bool, - /// Allows unminimizing the window. - #[serde(default)] - pub unminimize: bool, - /// Allows showing the window. - #[serde(default)] - pub show: bool, - /// Allows hiding the window. - #[serde(default)] - pub hide: bool, - /// Allows closing the window. - #[serde(default)] - pub close: bool, - /// Allows setting the decorations flag of the window. - #[serde(default, alias = "set-decorations")] - pub set_decorations: bool, - /// Allows setting the shadow flag of the window. - #[serde(default, alias = "set-shadow")] - pub set_shadow: bool, - /// Allows setting the always_on_top flag of the window. - #[serde(default, alias = "set-always-on-top")] - pub set_always_on_top: bool, - /// Allows preventing the window contents from being captured by other apps. - #[serde(default, alias = "set-content-protected")] - pub set_content_protected: bool, - /// Allows setting the window size. - #[serde(default, alias = "set-size")] - pub set_size: bool, - /// Allows setting the window minimum size. - #[serde(default, alias = "set-min-size")] - pub set_min_size: bool, - /// Allows setting the window maximum size. - #[serde(default, alias = "set-max-size")] - pub set_max_size: bool, - /// Allows changing the position of the window. - #[serde(default, alias = "set-position")] - pub set_position: bool, - /// Allows setting the fullscreen flag of the window. - #[serde(default, alias = "set-fullscreen")] - pub set_fullscreen: bool, - /// Allows focusing the window. - #[serde(default, alias = "set-focus")] - pub set_focus: bool, - /// Allows changing the window icon. - #[serde(default, alias = "set-icon")] - pub set_icon: bool, - /// Allows setting the skip_taskbar flag of the window. - #[serde(default, alias = "set-skip-taskbar")] - pub set_skip_taskbar: bool, - /// Allows grabbing the cursor. - #[serde(default, alias = "set-cursor-grab")] - pub set_cursor_grab: bool, - /// Allows setting the cursor visibility. - #[serde(default, alias = "set-cursor-visible")] - pub set_cursor_visible: bool, - /// Allows changing the cursor icon. - #[serde(default, alias = "set-cursor-icon")] - pub set_cursor_icon: bool, - /// Allows setting the cursor position. - #[serde(default, alias = "set-cursor-position")] - pub set_cursor_position: bool, - /// Allows ignoring cursor events. - #[serde(default, alias = "set-ignore-cursor-events")] - pub set_ignore_cursor_events: bool, - /// Allows start dragging on the window. - #[serde(default, alias = "start-dragging")] - pub start_dragging: bool, - /// Allows opening the system dialog to print the window content. - #[serde(default)] - pub print: bool, -} - -impl Allowlist for WindowAllowlistConfig { - fn all_features() -> Vec<&'static str> { - let allowlist = Self { - all: false, - create: true, - center: true, - request_user_attention: true, - set_resizable: true, - set_title: true, - maximize: true, - unmaximize: true, - minimize: true, - unminimize: true, - show: true, - hide: true, - close: true, - set_decorations: true, - set_always_on_top: true, - set_content_protected: false, - set_size: true, - set_min_size: true, - set_max_size: true, - set_position: true, - set_fullscreen: true, - set_focus: true, - set_icon: true, - set_skip_taskbar: true, - set_cursor_grab: true, - set_cursor_visible: true, - set_cursor_icon: true, - set_cursor_position: true, - set_ignore_cursor_events: true, - set_shadow: true, - start_dragging: true, - print: true, - }; - let mut features = allowlist.to_features(); - features.push("window-all"); - features - } - - fn to_features(&self) -> Vec<&'static str> { - if self.all { - vec!["window-all"] - } else { - let mut features = Vec::new(); - check_feature!(self, features, create, "window-create"); - check_feature!(self, features, center, "window-center"); - check_feature!( - self, - features, - request_user_attention, - "window-request-user-attention" - ); - check_feature!(self, features, set_resizable, "window-set-resizable"); - check_feature!(self, features, set_title, "window-set-title"); - check_feature!(self, features, maximize, "window-maximize"); - check_feature!(self, features, unmaximize, "window-unmaximize"); - check_feature!(self, features, minimize, "window-minimize"); - check_feature!(self, features, unminimize, "window-unminimize"); - check_feature!(self, features, show, "window-show"); - check_feature!(self, features, hide, "window-hide"); - check_feature!(self, features, close, "window-close"); - check_feature!(self, features, set_decorations, "window-set-decorations"); - check_feature!(self, features, set_shadow, "window-set-shadow"); - check_feature!( - self, - features, - set_always_on_top, - "window-set-always-on-top" - ); - check_feature!( - self, - features, - set_content_protected, - "window-set-content-protected" - ); - check_feature!(self, features, set_size, "window-set-size"); - check_feature!(self, features, set_min_size, "window-set-min-size"); - check_feature!(self, features, set_max_size, "window-set-max-size"); - check_feature!(self, features, set_position, "window-set-position"); - check_feature!(self, features, set_fullscreen, "window-set-fullscreen"); - check_feature!(self, features, set_focus, "window-set-focus"); - check_feature!(self, features, set_icon, "window-set-icon"); - check_feature!(self, features, set_skip_taskbar, "window-set-skip-taskbar"); - check_feature!(self, features, set_cursor_grab, "window-set-cursor-grab"); - check_feature!( - self, - features, - set_cursor_visible, - "window-set-cursor-visible" - ); - check_feature!(self, features, set_cursor_icon, "window-set-cursor-icon"); - check_feature!( - self, - features, - set_cursor_position, - "window-set-cursor-position" - ); - check_feature!( - self, - features, - set_ignore_cursor_events, - "window-set-ignore-cursor-events" - ); - check_feature!(self, features, start_dragging, "window-start-dragging"); - check_feature!(self, features, print, "window-print"); - features - } - } -} - -/// A command allowed to be executed by the webview API. -#[derive(Debug, PartialEq, Eq, Clone, Serialize)] -#[cfg_attr(feature = "schema", derive(JsonSchema))] -pub struct ShellAllowedCommand { - /// The name for this allowed shell command configuration. - /// - /// This name will be used inside of the webview API to call this command along with - /// any specified arguments. - pub name: String, - - /// The command name. - /// It can start with a variable that resolves to a system base directory. - /// The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, - /// `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, - /// `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, - /// `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`. - #[serde(rename = "cmd", default)] // use default just so the schema doesn't flag it as required - pub command: PathBuf, - - /// The allowed arguments for the command execution. - #[serde(default)] - pub args: ShellAllowedArgs, - - /// If this command is a sidecar command. - #[serde(default)] - pub sidecar: bool, -} - -impl<'de> Deserialize<'de> for ShellAllowedCommand { - fn deserialize(deserializer: D) -> Result - where - D: Deserializer<'de>, - { - #[derive(Deserialize)] - struct InnerShellAllowedCommand { - name: String, - #[serde(rename = "cmd")] - command: Option, - #[serde(default)] - args: ShellAllowedArgs, - #[serde(default)] - sidecar: bool, - } - - let config = InnerShellAllowedCommand::deserialize(deserializer)?; - - if !config.sidecar && config.command.is_none() { - return Err(DeError::custom( - "The shell scope `command` value is required.", - )); - } - - Ok(ShellAllowedCommand { - name: config.name, - command: config.command.unwrap_or_default(), - args: config.args, - sidecar: config.sidecar, - }) - } -} - -/// A set of command arguments allowed to be executed by the webview API. -/// -/// A value of `true` will allow any arguments to be passed to the command. `false` will disable all -/// arguments. A list of [`ShellAllowedArg`] will set those arguments as the only valid arguments to -/// be passed to the attached command configuration. -#[derive(Debug, PartialEq, Eq, Clone, Deserialize, Serialize)] -#[cfg_attr(feature = "schema", derive(JsonSchema))] -#[serde(untagged, deny_unknown_fields)] -#[non_exhaustive] -pub enum ShellAllowedArgs { - /// Use a simple boolean to allow all or disable all arguments to this command configuration. - Flag(bool), - - /// A specific set of [`ShellAllowedArg`] that are valid to call for the command configuration. - List(Vec), -} - -impl Default for ShellAllowedArgs { - fn default() -> Self { - Self::Flag(false) - } -} - -/// A command argument allowed to be executed by the webview API. -#[derive(Debug, PartialEq, Eq, Clone, Deserialize, Serialize)] -#[cfg_attr(feature = "schema", derive(JsonSchema))] -#[serde(untagged, deny_unknown_fields)] -#[non_exhaustive] -pub enum ShellAllowedArg { - /// A non-configurable argument that is passed to the command in the order it was specified. - Fixed(String), - - /// A variable that is set while calling the command from the webview API. - /// - Var { - /// [regex] validator to require passed values to conform to an expected input. - /// - /// This will require the argument value passed to this variable to match the `validator` regex - /// before it will be executed. - /// - /// [regex]: https://docs.rs/regex/latest/regex/#syntax - validator: String, - }, -} - -/// Shell scope definition. -/// It is a list of command names and associated CLI arguments that restrict the API access from the webview. -#[derive(Debug, Default, PartialEq, Eq, Clone, Deserialize, Serialize)] -#[cfg_attr(feature = "schema", derive(JsonSchema))] -pub struct ShellAllowlistScope(pub Vec); - -/// Defines the `shell > open` api scope. -#[derive(Debug, PartialEq, Eq, Clone, Deserialize, Serialize)] -#[cfg_attr(feature = "schema", derive(JsonSchema))] -#[serde(untagged, deny_unknown_fields)] -#[non_exhaustive] -pub enum ShellAllowlistOpen { - /// If the shell open API should be enabled. - /// - /// If enabled, the default validation regex (`^((mailto:\w+)|(tel:\w+)|(https?://\w+)).+`) is used. - Flag(bool), - - /// Enable the shell open API, with a custom regex that the opened path must match against. - /// - /// If using a custom regex to support a non-http(s) schema, care should be used to prevent values - /// that allow flag-like strings to pass validation. e.g. `--enable-debugging`, `-i`, `/R`. - Validate(String), -} - -impl Default for ShellAllowlistOpen { - fn default() -> Self { - Self::Flag(false) - } -} - -/// Allowlist for the shell APIs. -/// -/// See more: https://tauri.app/v1/api/config#shellallowlistconfig -#[derive(Debug, Default, PartialEq, Eq, Clone, Deserialize, Serialize)] -#[cfg_attr(feature = "schema", derive(JsonSchema))] -#[serde(rename_all = "camelCase", deny_unknown_fields)] -pub struct ShellAllowlistConfig { - /// Access scope for the binary execution APIs. - /// Sidecars are automatically enabled. - #[serde(default)] - pub scope: ShellAllowlistScope, - /// Use this flag to enable all shell API features. - #[serde(default)] - pub all: bool, - /// Enable binary execution. - #[serde(default)] - pub execute: bool, - /// Enable sidecar execution, allowing the JavaScript layer to spawn a sidecar command, - /// an executable that is shipped with the application. - /// For more information see . - #[serde(default)] - pub sidecar: bool, - /// Open URL with the user's default application. - #[serde(default)] - pub open: ShellAllowlistOpen, -} - -impl Allowlist for ShellAllowlistConfig { - fn all_features() -> Vec<&'static str> { - let allowlist = Self { - scope: Default::default(), - all: false, - execute: true, - sidecar: true, - open: ShellAllowlistOpen::Flag(true), - }; - let mut features = allowlist.to_features(); - features.push("shell-all"); - features - } - - fn to_features(&self) -> Vec<&'static str> { - if self.all { - vec!["shell-all"] - } else { - let mut features = Vec::new(); - check_feature!(self, features, execute, "shell-execute"); - check_feature!(self, features, sidecar, "shell-sidecar"); - - if !matches!(self.open, ShellAllowlistOpen::Flag(false)) { - features.push("shell-open") - } - - features - } - } -} - -/// Allowlist for the dialog APIs. -/// -/// See more: https://tauri.app/v1/api/config#dialogallowlistconfig -#[derive(Debug, Default, PartialEq, Eq, Clone, Deserialize, Serialize)] -#[cfg_attr(feature = "schema", derive(JsonSchema))] -#[serde(rename_all = "camelCase", deny_unknown_fields)] -pub struct DialogAllowlistConfig { - /// Use this flag to enable all dialog API features. - #[serde(default)] - pub all: bool, - /// Allows the API to open a dialog window to pick files. - #[serde(default)] - pub open: bool, - /// Allows the API to open a dialog window to pick where to save files. - #[serde(default)] - pub save: bool, - /// Allows the API to show a message dialog window. - #[serde(default)] - pub message: bool, - /// Allows the API to show a dialog window with Yes/No buttons. - #[serde(default)] - pub ask: bool, - /// Allows the API to show a dialog window with Ok/Cancel buttons. - #[serde(default)] - pub confirm: bool, -} - -impl Allowlist for DialogAllowlistConfig { - fn all_features() -> Vec<&'static str> { - let allowlist = Self { - all: false, - open: true, - save: true, - message: true, - ask: true, - confirm: true, - }; - let mut features = allowlist.to_features(); - features.push("dialog-all"); - features - } - - fn to_features(&self) -> Vec<&'static str> { - if self.all { - vec!["dialog-all"] - } else { - let mut features = Vec::new(); - check_feature!(self, features, open, "dialog-open"); - check_feature!(self, features, save, "dialog-save"); - check_feature!(self, features, message, "dialog-message"); - check_feature!(self, features, ask, "dialog-ask"); - check_feature!(self, features, confirm, "dialog-confirm"); - features - } - } -} - -/// HTTP API scope definition. -/// It is a list of URLs that can be accessed by the webview when using the HTTP APIs. -/// The scoped URL is matched against the request URL using a glob pattern. -/// -/// Examples: -/// - "https://**": allows all HTTPS urls -/// - "https://*.github.com/tauri-apps/tauri": allows any subdomain of "github.com" with the "tauri-apps/api" path -/// - "https://myapi.service.com/users/*": allows access to any URLs that begins with "https://myapi.service.com/users/" -#[allow(rustdoc::bare_urls)] -#[derive(Debug, Default, PartialEq, Eq, Clone, Deserialize, Serialize)] -#[cfg_attr(feature = "schema", derive(JsonSchema))] -pub struct HttpAllowlistScope(pub Vec); - -/// Allowlist for the HTTP APIs. -/// -/// See more: https://tauri.app/v1/api/config#httpallowlistconfig -#[derive(Debug, Default, PartialEq, Eq, Clone, Deserialize, Serialize)] -#[cfg_attr(feature = "schema", derive(JsonSchema))] -#[serde(rename_all = "camelCase", deny_unknown_fields)] -pub struct HttpAllowlistConfig { - /// The access scope for the HTTP APIs. - #[serde(default)] - pub scope: HttpAllowlistScope, - /// Use this flag to enable all HTTP API features. - #[serde(default)] - pub all: bool, - /// Allows making HTTP requests. - #[serde(default)] - pub request: bool, -} - -impl Allowlist for HttpAllowlistConfig { - fn all_features() -> Vec<&'static str> { - let allowlist = Self { - scope: Default::default(), - all: false, - request: true, - }; - let mut features = allowlist.to_features(); - features.push("http-all"); - features - } - - fn to_features(&self) -> Vec<&'static str> { - if self.all { - vec!["http-all"] - } else { - let mut features = Vec::new(); - check_feature!(self, features, request, "http-request"); - features - } - } -} - -/// Allowlist for the notification APIs. -/// -/// See more: https://tauri.app/v1/api/config#notificationallowlistconfig -#[derive(Debug, Default, PartialEq, Eq, Clone, Deserialize, Serialize)] -#[cfg_attr(feature = "schema", derive(JsonSchema))] -#[serde(rename_all = "camelCase", deny_unknown_fields)] -pub struct NotificationAllowlistConfig { - /// Use this flag to enable all notification API features. - #[serde(default)] - pub all: bool, -} - -impl Allowlist for NotificationAllowlistConfig { - fn all_features() -> Vec<&'static str> { - let allowlist = Self { all: false }; - let mut features = allowlist.to_features(); - features.push("notification-all"); - features - } - - fn to_features(&self) -> Vec<&'static str> { - if self.all { - vec!["notification-all"] - } else { - vec![] - } - } -} - -/// Allowlist for the global shortcut APIs. -/// -/// See more: https://tauri.app/v1/api/config#globalshortcutallowlistconfig -#[derive(Debug, Default, PartialEq, Eq, Clone, Deserialize, Serialize)] -#[cfg_attr(feature = "schema", derive(JsonSchema))] -#[serde(rename_all = "camelCase", deny_unknown_fields)] -pub struct GlobalShortcutAllowlistConfig { - /// Use this flag to enable all global shortcut API features. - #[serde(default)] - pub all: bool, -} - -impl Allowlist for GlobalShortcutAllowlistConfig { - fn all_features() -> Vec<&'static str> { - let allowlist = Self { all: false }; - let mut features = allowlist.to_features(); - features.push("global-shortcut-all"); - features - } - - fn to_features(&self) -> Vec<&'static str> { - if self.all { - vec!["global-shortcut-all"] - } else { - vec![] - } - } -} - -/// Allowlist for the OS APIs. -/// -/// See more: https://tauri.app/v1/api/config#osallowlistconfig -#[derive(Debug, Default, PartialEq, Eq, Clone, Deserialize, Serialize)] -#[cfg_attr(feature = "schema", derive(JsonSchema))] -#[serde(rename_all = "camelCase", deny_unknown_fields)] -pub struct OsAllowlistConfig { - /// Use this flag to enable all OS API features. - #[serde(default)] - pub all: bool, -} - -impl Allowlist for OsAllowlistConfig { - fn all_features() -> Vec<&'static str> { - let allowlist = Self { all: false }; - let mut features = allowlist.to_features(); - features.push("os-all"); - features - } - - fn to_features(&self) -> Vec<&'static str> { - if self.all { - vec!["os-all"] - } else { - vec![] - } - } -} - -/// Allowlist for the path APIs. -/// -/// See more: https://tauri.app/v1/api/config#pathallowlistconfig -#[derive(Debug, Default, PartialEq, Eq, Clone, Deserialize, Serialize)] -#[cfg_attr(feature = "schema", derive(JsonSchema))] -#[serde(rename_all = "camelCase", deny_unknown_fields)] -pub struct PathAllowlistConfig { - /// Use this flag to enable all path API features. - #[serde(default)] - pub all: bool, -} - -impl Allowlist for PathAllowlistConfig { - fn all_features() -> Vec<&'static str> { - let allowlist = Self { all: false }; - let mut features = allowlist.to_features(); - features.push("path-all"); - features - } - - fn to_features(&self) -> Vec<&'static str> { - if self.all { - vec!["path-all"] - } else { - vec![] - } - } -} - -/// Allowlist for the custom protocols. -/// -/// See more: https://tauri.app/v1/api/config#protocolallowlistconfig -#[derive(Debug, Default, PartialEq, Eq, Clone, Deserialize, Serialize)] -#[cfg_attr(feature = "schema", derive(JsonSchema))] -#[serde(rename_all = "camelCase", deny_unknown_fields)] -pub struct ProtocolAllowlistConfig { - /// The access scope for the asset protocol. - #[serde(default, alias = "asset-scope")] - pub asset_scope: FsAllowlistScope, - /// Use this flag to enable all custom protocols. - #[serde(default)] - pub all: bool, - /// Enables the asset protocol. - #[serde(default)] - pub asset: bool, -} - -impl Allowlist for ProtocolAllowlistConfig { - fn all_features() -> Vec<&'static str> { - let allowlist = Self { - asset_scope: Default::default(), - all: false, - asset: true, - }; - let mut features = allowlist.to_features(); - features.push("protocol-all"); - features - } - - fn to_features(&self) -> Vec<&'static str> { - if self.all { - vec!["protocol-all"] - } else { - let mut features = Vec::new(); - check_feature!(self, features, asset, "protocol-asset"); - features - } - } -} - -/// Allowlist for the process APIs. -/// -/// See more: https://tauri.app/v1/api/config#processallowlistconfig -#[derive(Debug, Default, PartialEq, Eq, Clone, Deserialize, Serialize)] -#[cfg_attr(feature = "schema", derive(JsonSchema))] -#[serde(rename_all = "camelCase", deny_unknown_fields)] -pub struct ProcessAllowlistConfig { - /// Use this flag to enable all process APIs. - #[serde(default)] - pub all: bool, - /// Enables the relaunch API. - #[serde(default)] - pub relaunch: bool, - /// Dangerous option that allows macOS to relaunch even if the binary contains a symlink. - /// - /// This is due to macOS having less symlink protection. Highly recommended to not set this flag - /// unless you have a very specific reason too, and understand the implications of it. - #[serde( - default, - alias = "relaunchDangerousAllowSymlinkMacOS", - alias = "relaunch-dangerous-allow-symlink-macos" - )] - pub relaunch_dangerous_allow_symlink_macos: bool, - /// Enables the exit API. - #[serde(default)] - pub exit: bool, -} - -impl Allowlist for ProcessAllowlistConfig { - fn all_features() -> Vec<&'static str> { - let allowlist = Self { - all: false, - relaunch: true, - relaunch_dangerous_allow_symlink_macos: false, - exit: true, - }; - let mut features = allowlist.to_features(); - features.push("process-all"); - features - } - - fn to_features(&self) -> Vec<&'static str> { - if self.all { - vec!["process-all"] - } else { - let mut features = Vec::new(); - check_feature!(self, features, relaunch, "process-relaunch"); - check_feature!( - self, - features, - relaunch_dangerous_allow_symlink_macos, - "process-relaunch-dangerous-allow-symlink-macos" - ); - check_feature!(self, features, exit, "process-exit"); - features - } - } -} - -/// Allowlist for the clipboard APIs. -/// -/// See more: https://tauri.app/v1/api/config#clipboardallowlistconfig -#[derive(Debug, Default, PartialEq, Eq, Clone, Deserialize, Serialize)] -#[cfg_attr(feature = "schema", derive(JsonSchema))] -#[serde(rename_all = "camelCase", deny_unknown_fields)] -pub struct ClipboardAllowlistConfig { - /// Use this flag to enable all clipboard APIs. - #[serde(default)] - pub all: bool, - /// Enables the clipboard's `writeText` API. - #[serde(default, alias = "writeText")] - pub write_text: bool, - /// Enables the clipboard's `readText` API. - #[serde(default, alias = "readText")] - pub read_text: bool, -} - -impl Allowlist for ClipboardAllowlistConfig { - fn all_features() -> Vec<&'static str> { - let allowlist = Self { - all: false, - write_text: true, - read_text: true, - }; - let mut features = allowlist.to_features(); - features.push("clipboard-all"); - features + Self::Scope { allow, .. } => allow, + } } - fn to_features(&self) -> Vec<&'static str> { - if self.all { - vec!["clipboard-all"] - } else { - let mut features = Vec::new(); - check_feature!(self, features, write_text, "clipboard-write-text"); - check_feature!(self, features, read_text, "clipboard-read-text"); - features + /// The list of forbidden paths. + pub fn forbidden_paths(&self) -> Option<&Vec> { + match self { + Self::AllowedPaths(_) => None, + Self::Scope { deny, .. } => Some(deny), } } } -/// Allowlist for the app APIs. +/// Config for the asset custom protocol. /// -/// See more: https://tauri.app/v1/api/config#appallowlistconfig +/// See more: https://tauri.app/v1/api/config#assetprotocolconfig #[derive(Debug, Default, PartialEq, Eq, Clone, Deserialize, Serialize)] #[cfg_attr(feature = "schema", derive(JsonSchema))] #[serde(rename_all = "camelCase", deny_unknown_fields)] -pub struct AppAllowlistConfig { - /// Use this flag to enable all app APIs. - #[serde(default)] - pub all: bool, - /// Enables the app's `show` API. +pub struct AssetProtocolConfig { + /// The access scope for the asset protocol. #[serde(default)] - pub show: bool, - /// Enables the app's `hide` API. + pub scope: FsScope, + /// Enables the asset protocol. #[serde(default)] - pub hide: bool, -} - -impl Allowlist for AppAllowlistConfig { - fn all_features() -> Vec<&'static str> { - let allowlist = Self { - all: false, - show: true, - hide: true, - }; - let mut features = allowlist.to_features(); - features.push("app-all"); - features - } - - fn to_features(&self) -> Vec<&'static str> { - if self.all { - vec!["app-all"] - } else { - let mut features = Vec::new(); - check_feature!(self, features, show, "app-show"); - check_feature!(self, features, hide, "app-hide"); - features - } - } + pub enable: bool, } -/// Allowlist configuration. The allowlist is a translation of the [Cargo allowlist features](https://docs.rs/tauri/latest/tauri/#cargo-allowlist-features). -/// -/// # Notes -/// -/// - Endpoints that don't have their own allowlist option are enabled by default. -/// - There is only "opt-in", no "opt-out". Setting an option to `false` has no effect. -/// -/// # Examples +/// Security configuration. /// -/// - * [`"app-all": true`](https://tauri.app/v1/api/config/#appallowlistconfig.all) will make the [hide](https://tauri.app/v1/api/js/app#hide) endpoint be available regardless of whether `hide` is set to `false` or `true` in the allowlist. +/// See more: https://tauri.app/v1/api/config#securityconfig +#[skip_serializing_none] #[derive(Debug, Default, PartialEq, Eq, Clone, Deserialize, Serialize)] #[cfg_attr(feature = "schema", derive(JsonSchema))] #[serde(rename_all = "camelCase", deny_unknown_fields)] -pub struct AllowlistConfig { - /// Use this flag to enable all API features. - #[serde(default)] - pub all: bool, - /// File system API allowlist. - #[serde(default)] - pub fs: FsAllowlistConfig, - /// Window API allowlist. - #[serde(default)] - pub window: WindowAllowlistConfig, - /// Shell API allowlist. - #[serde(default)] - pub shell: ShellAllowlistConfig, - /// Dialog API allowlist. - #[serde(default)] - pub dialog: DialogAllowlistConfig, - /// HTTP API allowlist. - #[serde(default)] - pub http: HttpAllowlistConfig, - /// Notification API allowlist. - #[serde(default)] - pub notification: NotificationAllowlistConfig, - /// Global shortcut API allowlist. - #[serde(default, alias = "global-shortcut")] - pub global_shortcut: GlobalShortcutAllowlistConfig, - /// OS allowlist. - #[serde(default)] - pub os: OsAllowlistConfig, - /// Path API allowlist. - #[serde(default)] - pub path: PathAllowlistConfig, - /// Custom protocol allowlist. - #[serde(default)] - pub protocol: ProtocolAllowlistConfig, - /// Process API allowlist. - #[serde(default)] - pub process: ProcessAllowlistConfig, - /// Clipboard APIs allowlist. - #[serde(default)] - pub clipboard: ClipboardAllowlistConfig, - /// App APIs allowlist. - #[serde(default)] - pub app: AppAllowlistConfig, -} - -impl Allowlist for AllowlistConfig { - fn all_features() -> Vec<&'static str> { - let mut features = vec!["api-all"]; - features.extend(FsAllowlistConfig::all_features()); - features.extend(WindowAllowlistConfig::all_features()); - features.extend(ShellAllowlistConfig::all_features()); - features.extend(DialogAllowlistConfig::all_features()); - features.extend(HttpAllowlistConfig::all_features()); - features.extend(NotificationAllowlistConfig::all_features()); - features.extend(GlobalShortcutAllowlistConfig::all_features()); - features.extend(OsAllowlistConfig::all_features()); - features.extend(PathAllowlistConfig::all_features()); - features.extend(ProtocolAllowlistConfig::all_features()); - features.extend(ProcessAllowlistConfig::all_features()); - features.extend(ClipboardAllowlistConfig::all_features()); - features.extend(AppAllowlistConfig::all_features()); - features - } - - fn to_features(&self) -> Vec<&'static str> { - if self.all { - vec!["api-all"] - } else { - let mut features = Vec::new(); - features.extend(self.fs.to_features()); - features.extend(self.window.to_features()); - features.extend(self.shell.to_features()); - features.extend(self.dialog.to_features()); - features.extend(self.http.to_features()); - features.extend(self.notification.to_features()); - features.extend(self.global_shortcut.to_features()); - features.extend(self.os.to_features()); - features.extend(self.path.to_features()); - features.extend(self.protocol.to_features()); - features.extend(self.process.to_features()); - features.extend(self.clipboard.to_features()); - features.extend(self.app.to_features()); - features - } - } +pub struct SecurityConfig { + /// The Content Security Policy that will be injected on all HTML files on the built application. + /// If [`dev_csp`](#SecurityConfig.devCsp) is not specified, this value is also injected on dev. + /// + /// This is a really important part of the configuration since it helps you ensure your WebView is secured. + /// See . + pub csp: Option, + /// The Content Security Policy that will be injected on all HTML files on development. + /// + /// This is a really important part of the configuration since it helps you ensure your WebView is secured. + /// See . + #[serde(alias = "dev-csp")] + pub dev_csp: Option, + /// Freeze the `Object.prototype` when using the custom protocol. + #[serde(default, alias = "freeze-prototype")] + pub freeze_prototype: bool, + /// Disables the Tauri-injected CSP sources. + /// + /// At compile time, Tauri parses all the frontend assets and changes the Content-Security-Policy + /// to only allow loading of your own scripts and styles by injecting nonce and hash sources. + /// This stricts your CSP, which may introduce issues when using along with other flexing sources. + /// + /// This configuration option allows both a boolean and a list of strings as value. + /// A boolean instructs Tauri to disable the injection for all CSP injections, + /// and a list of strings indicates the CSP directives that Tauri cannot inject. + /// + /// **WARNING:** Only disable this if you know what you are doing and have properly configured the CSP. + /// Your application might be vulnerable to XSS attacks without this Tauri protection. + #[serde(default, alias = "dangerous-disable-asset-csp-modification")] + pub dangerous_disable_asset_csp_modification: DisabledCspModificationKind, + /// Allow external domains to send command to Tauri. + /// + /// By default, external domains do not have access to `window.__TAURI__`, which means they cannot + /// communicate with the commands defined in Rust. This prevents attacks where an externally + /// loaded malicious or compromised sites could start executing commands on the user's device. + /// + /// This configuration allows a set of external domains to have access to the Tauri commands. + /// When you configure a domain to be allowed to access the IPC, all subpaths are allowed. Subdomains are not allowed. + /// + /// **WARNING:** Only use this option if you either have internal checks against malicious + /// external sites or you can trust the allowed external sites. You application might be + /// vulnerable to dangerous Tauri command related attacks otherwise. + #[serde(default, alias = "dangerous-remote-domain-ipc-access")] + pub dangerous_remote_domain_ipc_access: Vec, + /// Custom protocol config. + #[serde(default, alias = "asset-protocol")] + pub asset_protocol: AssetProtocolConfig, } /// The application pattern. @@ -2181,15 +1242,9 @@ pub struct TauriConfig { /// The bundler configuration. #[serde(default)] pub bundle: BundleConfig, - /// The allowlist configuration. - #[serde(default)] - pub allowlist: AllowlistConfig, /// Security configuration. #[serde(default)] pub security: SecurityConfig, - /// The updater configuration. - #[serde(default)] - pub updater: UpdaterConfig, /// Configuration for app system tray. #[serde(alias = "system-tray")] pub system_tray: Option, @@ -2202,15 +1257,18 @@ impl TauriConfig { /// Returns all Cargo features. #[allow(dead_code)] pub fn all_features() -> Vec<&'static str> { - let mut features = AllowlistConfig::all_features(); - features.extend(vec!["system-tray", "macos-private-api", "isolation"]); - features + vec![ + "system-tray", + "macos-private-api", + "isolation", + "protocol-asset", + ] } /// Returns the enabled Cargo features. #[allow(dead_code)] pub fn features(&self) -> Vec<&str> { - let mut features = self.allowlist.to_features(); + let mut features = Vec::new(); if self.system_tray.is_some() { features.push("system-tray"); } @@ -2220,43 +1278,14 @@ impl TauriConfig { if let PatternKind::Isolation { .. } = self.pattern { features.push("isolation"); } + if self.security.asset_protocol.enable { + features.push("protocol-asset"); + } features.sort_unstable(); features } } -/// A URL to an updater server. -/// -/// The URL must use the `https` scheme on production. -#[skip_serializing_none] -#[derive(Debug, PartialEq, Eq, Clone, Serialize)] -#[cfg_attr(feature = "schema", derive(JsonSchema))] -pub struct UpdaterEndpoint(pub Url); - -impl std::fmt::Display for UpdaterEndpoint { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "{}", self.0) - } -} - -impl<'de> Deserialize<'de> for UpdaterEndpoint { - fn deserialize(deserializer: D) -> Result - where - D: Deserializer<'de>, - { - let url = Url::deserialize(deserializer)?; - #[cfg(all(not(debug_assertions), not(feature = "schema")))] - { - if url.scheme() != "https" { - return Err(serde::de::Error::custom( - "The configured updater endpoint must use the `https` protocol.", - )); - } - } - Ok(Self(url)) - } -} - /// Install modes for the Windows update. #[derive(Debug, PartialEq, Eq, Clone)] #[cfg_attr(feature = "schema", derive(JsonSchema))] @@ -2338,88 +1367,11 @@ impl<'de> Deserialize<'de> for WindowsUpdateInstallMode { #[cfg_attr(feature = "schema", derive(JsonSchema))] #[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct UpdaterWindowsConfig { - /// Additional arguments given to the NSIS or WiX installer. - #[serde(default, alias = "installer-args")] - pub installer_args: Vec, /// The installation mode for the update on Windows. Defaults to `passive`. #[serde(default, alias = "install-mode")] pub install_mode: WindowsUpdateInstallMode, } -/// The Updater configuration object. -/// -/// See more: https://tauri.app/v1/api/config#updaterconfig -#[skip_serializing_none] -#[derive(Debug, PartialEq, Eq, Clone, Serialize)] -#[cfg_attr(feature = "schema", derive(JsonSchema))] -#[serde(rename_all = "camelCase", deny_unknown_fields)] -pub struct UpdaterConfig { - /// Whether the updater is active or not. - #[serde(default)] - pub active: bool, - /// The updater endpoints. TLS is enforced on production. - /// - /// The updater URL can contain the following variables: - /// - {{current_version}}: The version of the app that is requesting the update - /// - {{target}}: The operating system name (one of `linux`, `windows` or `darwin`). - /// - {{arch}}: The architecture of the machine (one of `x86_64`, `i686`, `aarch64` or `armv7`). - /// - /// # Examples - /// - "https://my.cdn.com/latest.json": a raw JSON endpoint that returns the latest version and download links for each platform. - /// - "https://updates.app.dev/{{target}}?version={{current_version}}&arch={{arch}}": a dedicated API with positional and query string arguments. - #[allow(rustdoc::bare_urls)] - pub endpoints: Option>, - /// Signature public key. - #[serde(default)] // use default just so the schema doesn't flag it as required - pub pubkey: String, - /// The Windows configuration for the updater. - #[serde(default)] - pub windows: UpdaterWindowsConfig, -} - -impl<'de> Deserialize<'de> for UpdaterConfig { - fn deserialize(deserializer: D) -> Result - where - D: Deserializer<'de>, - { - #[derive(Deserialize)] - struct InnerUpdaterConfig { - #[serde(default)] - active: bool, - endpoints: Option>, - pubkey: Option, - #[serde(default)] - windows: UpdaterWindowsConfig, - } - - let config = InnerUpdaterConfig::deserialize(deserializer)?; - - if config.active && config.pubkey.is_none() { - return Err(DeError::custom( - "The updater `pubkey` configuration is required.", - )); - } - - Ok(UpdaterConfig { - active: config.active, - endpoints: config.endpoints, - pubkey: config.pubkey.unwrap_or_default(), - windows: config.windows, - }) - } -} - -impl Default for UpdaterConfig { - fn default() -> Self { - Self { - active: false, - endpoints: None, - pubkey: "".into(), - windows: Default::default(), - } - } -} - /// Configuration for application system tray icon. /// /// See more: https://tauri.app/v1/api/config#systemtrayconfig @@ -2708,8 +1660,7 @@ impl PackageConfig { /// The Tauri configuration object. /// It is read from a file where you can define your frontend assets, -/// configure the bundler, enable the app updater, define a system tray, -/// enable APIs via the allowlist and more. +/// configure the bundler and define a system tray. /// /// The configuration file is generated by the /// [`tauri init`](https://tauri.app/v1/api/cli#init) command that lives in @@ -2755,16 +1706,10 @@ impl PackageConfig { /// "version": "0.1.0" /// }, /// "tauri": { -/// "allowlist": { -/// "all": true -/// }, /// "bundle": {}, /// "security": { /// "csp": null /// }, -/// "updater": { -/// "active": false -/// }, /// "windows": [ /// { /// "fullscreen": false, @@ -3152,6 +2097,16 @@ mod build { } } + impl ToTokens for UpdaterConfig { + fn to_tokens(&self, tokens: &mut TokenStream) { + let active = self.active; + let pubkey = str_lit(&self.pubkey); + let windows = &self.windows; + + literal_struct!(tokens, UpdaterConfig, active, pubkey, windows); + } + } + impl ToTokens for BundleConfig { fn to_tokens(&self, tokens: &mut TokenStream) { let identifier = str_lit(&self.identifier); @@ -3171,6 +2126,7 @@ mod build { let windows = &self.windows; let ios = quote!(Default::default()); let android = quote!(Default::default()); + let updater = quote!(Default::default()); literal_struct!( tokens, @@ -3191,7 +2147,8 @@ mod build { external_bin, windows, ios, - android + android, + updater ); } } @@ -3253,30 +2210,7 @@ mod build { impl ToTokens for UpdaterWindowsConfig { fn to_tokens(&self, tokens: &mut TokenStream) { let install_mode = &self.install_mode; - let installer_args = vec_lit(&self.installer_args, str_lit); - literal_struct!(tokens, UpdaterWindowsConfig, install_mode, installer_args); - } - } - - impl ToTokens for UpdaterConfig { - fn to_tokens(&self, tokens: &mut TokenStream) { - let active = self.active; - let pubkey = str_lit(&self.pubkey); - let endpoints = opt_lit( - self - .endpoints - .as_ref() - .map(|list| { - vec_lit(list, |url| { - let url = url.0.as_str(); - quote! { ::tauri::utils::config::UpdaterEndpoint(#url.parse().unwrap()) } - }) - }) - .as_ref(), - ); - let windows = &self.windows; - - literal_struct!(tokens, UpdaterConfig, active, pubkey, endpoints, windows); + literal_struct!(tokens, UpdaterWindowsConfig, install_mode); } } @@ -3361,6 +2295,7 @@ mod build { let dangerous_disable_asset_csp_modification = &self.dangerous_disable_asset_csp_modification; let dangerous_remote_domain_ipc_access = vec_lit(&self.dangerous_remote_domain_ipc_access, identity); + let asset_protocol = &self.asset_protocol; literal_struct!( tokens, @@ -3369,7 +2304,8 @@ mod build { dev_csp, freeze_prototype, dangerous_disable_asset_csp_modification, - dangerous_remote_domain_ipc_access + dangerous_remote_domain_ipc_access, + asset_protocol ); } } @@ -3391,9 +2327,9 @@ mod build { } } - impl ToTokens for FsAllowlistScope { + impl ToTokens for FsScope { fn to_tokens(&self, tokens: &mut TokenStream) { - let prefix = quote! { ::tauri::utils::config::FsAllowlistScope }; + let prefix = quote! { ::tauri::utils::config::FsScope }; tokens.append_all(match self { Self::AllowedPaths(allow) => { @@ -3409,110 +2345,10 @@ mod build { } } - impl ToTokens for FsAllowlistConfig { - fn to_tokens(&self, tokens: &mut TokenStream) { - let scope = &self.scope; - tokens.append_all(quote! { ::tauri::utils::config::FsAllowlistConfig { scope: #scope, ..Default::default() } }) - } - } - - impl ToTokens for ProtocolAllowlistConfig { - fn to_tokens(&self, tokens: &mut TokenStream) { - let asset_scope = &self.asset_scope; - tokens.append_all(quote! { ::tauri::utils::config::ProtocolAllowlistConfig { asset_scope: #asset_scope, ..Default::default() } }) - } - } - - impl ToTokens for HttpAllowlistScope { - fn to_tokens(&self, tokens: &mut TokenStream) { - let allowed_urls = vec_lit(&self.0, url_lit); - tokens.append_all(quote! { ::tauri::utils::config::HttpAllowlistScope(#allowed_urls) }) - } - } - - impl ToTokens for HttpAllowlistConfig { - fn to_tokens(&self, tokens: &mut TokenStream) { - let scope = &self.scope; - tokens.append_all(quote! { ::tauri::utils::config::HttpAllowlistConfig { scope: #scope, ..Default::default() } }) - } - } - - impl ToTokens for ShellAllowedCommand { - fn to_tokens(&self, tokens: &mut TokenStream) { - let name = str_lit(&self.name); - let command = path_buf_lit(&self.command); - let args = &self.args; - let sidecar = &self.sidecar; - - literal_struct!(tokens, ShellAllowedCommand, name, command, args, sidecar); - } - } - - impl ToTokens for ShellAllowedArgs { - fn to_tokens(&self, tokens: &mut TokenStream) { - let prefix = quote! { ::tauri::utils::config::ShellAllowedArgs }; - - tokens.append_all(match self { - Self::Flag(flag) => quote!(#prefix::Flag(#flag)), - Self::List(list) => { - let list = vec_lit(list, identity); - quote!(#prefix::List(#list)) - } - }) - } - } - - impl ToTokens for ShellAllowedArg { - fn to_tokens(&self, tokens: &mut TokenStream) { - let prefix = quote! { ::tauri::utils::config::ShellAllowedArg }; - - tokens.append_all(match self { - Self::Fixed(fixed) => { - let fixed = str_lit(fixed); - quote!(#prefix::Fixed(#fixed)) - } - Self::Var { validator } => { - let validator = str_lit(validator); - quote!(#prefix::Var { validator: #validator }) - } - }) - } - } - - impl ToTokens for ShellAllowlistOpen { - fn to_tokens(&self, tokens: &mut TokenStream) { - let prefix = quote! { ::tauri::utils::config::ShellAllowlistOpen }; - - tokens.append_all(match self { - Self::Flag(flag) => quote!(#prefix::Flag(#flag)), - Self::Validate(regex) => quote!(#prefix::Validate(#regex)), - }) - } - } - - impl ToTokens for ShellAllowlistScope { - fn to_tokens(&self, tokens: &mut TokenStream) { - let allowed_commands = vec_lit(&self.0, identity); - tokens.append_all(quote! { ::tauri::utils::config::ShellAllowlistScope(#allowed_commands) }) - } - } - - impl ToTokens for ShellAllowlistConfig { + impl ToTokens for AssetProtocolConfig { fn to_tokens(&self, tokens: &mut TokenStream) { let scope = &self.scope; - tokens.append_all(quote! { ::tauri::utils::config::ShellAllowlistConfig { scope: #scope, ..Default::default() } }) - } - } - - impl ToTokens for AllowlistConfig { - fn to_tokens(&self, tokens: &mut TokenStream) { - let fs = &self.fs; - let protocol = &self.protocol; - let http = &self.http; - let shell = &self.shell; - tokens.append_all( - quote! { ::tauri::utils::config::AllowlistConfig { fs: #fs, protocol: #protocol, http: #http, shell: #shell, ..Default::default() } }, - ) + tokens.append_all(quote! { ::tauri::utils::config::AssetProtocolConfig { scope: #scope, ..Default::default() } }) } } @@ -3521,10 +2357,8 @@ mod build { let pattern = &self.pattern; let windows = vec_lit(&self.windows, identity); let bundle = &self.bundle; - let updater = &self.updater; let security = &self.security; let system_tray = opt_lit(self.system_tray.as_ref()); - let allowlist = &self.allowlist; let macos_private_api = self.macos_private_api; literal_struct!( @@ -3533,10 +2367,8 @@ mod build { pattern, windows, bundle, - updater, security, system_tray, - allowlist, macos_private_api ); } @@ -3595,8 +2427,6 @@ mod test { let d_windows: Vec = vec![]; // get default bundle let d_bundle = BundleConfig::default(); - // get default updater - let d_updater = UpdaterConfig::default(); // create a tauri config. let tauri = TauriConfig { @@ -3620,12 +2450,7 @@ mod test { windows: Default::default(), ios: Default::default(), android: Default::default(), - }, - updater: UpdaterConfig { - active: false, - pubkey: "".into(), - endpoints: None, - windows: Default::default(), + updater: Default::default(), }, security: SecurityConfig { csp: None, @@ -3633,8 +2458,8 @@ mod test { freeze_prototype: false, dangerous_disable_asset_csp_modification: DisabledCspModificationKind::Flag(false), dangerous_remote_domain_ipc_access: Vec::new(), + asset_protocol: AssetProtocolConfig::default(), }, - allowlist: AllowlistConfig::default(), system_tray: None, macos_private_api: false, }; @@ -3657,7 +2482,6 @@ mod test { assert_eq!(t_config, tauri); assert_eq!(b_config, build); assert_eq!(d_bundle, tauri.bundle); - assert_eq!(d_updater, tauri.updater); assert_eq!( d_path, AppUrl::Url(WindowUrl::External( diff --git a/core/tauri/Cargo.toml b/core/tauri/Cargo.toml index 71f8a0bae3f..d31db2866d2 100644 --- a/core/tauri/Cargo.toml +++ b/core/tauri/Cargo.toml @@ -1,10 +1,10 @@ [package] -authors = [ "Tauri Programme within The Commons Conservancy" ] -categories = [ "gui", "web-programming" ] +authors = ["Tauri Programme within The Commons Conservancy"] +categories = ["gui", "web-programming"] description = "Make tiny, secure apps for all desktop platforms with Tauri" edition = "2021" rust-version = "1.65" -exclude = [ "/test", "/.scripts", "CHANGELOG.md", "/target" ] +exclude = ["/test", "/.scripts", "CHANGELOG.md", "/target"] homepage = "https://tauri.app" license = "Apache-2.0 OR MIT" name = "tauri" @@ -18,28 +18,29 @@ no-default-features = true features = [ "wry", "custom-protocol", - "api-all", - "updater", - "fs-extract-api", "system-tray", "devtools", "icon-png", - "dox" + "protocol-asset", + "dox", ] -rustdoc-args = [ "--cfg", "doc_cfg" ] +rustdoc-args = ["--cfg", "doc_cfg"] default-target = "x86_64-unknown-linux-gnu" targets = [ "x86_64-pc-windows-msvc", "x86_64-unknown-linux-gnu", - "x86_64-apple-darwin" + "x86_64-apple-darwin", ] +[package.metadata.cargo-udeps.ignore] +normal = ["reqwest"] + [dependencies] -serde_json = { version = "1.0", features = [ "raw_value" ] } -serde = { version = "1.0", features = [ "derive" ] } +serde_json = { version = "1.0", features = ["raw_value"] } +serde = { version = "1.0", features = ["derive"] } tokio = { version = "1", features = [ "rt", "rt-multi-thread", "sync", "fs", "io-util" ] } futures-util = "0.3" -uuid = { version = "1", features = [ "v4" ] } +uuid = { version = "1", features = ["v4"] } url = { version = "2.3" } anyhow = "1.0" thiserror = "1.0" @@ -49,19 +50,15 @@ tauri-macros = { version = "2.0.0-alpha.4", path = "../tauri-macros" } tauri-utils = { version = "2.0.0-alpha.4", features = [ "resources" ], path = "../tauri-utils" } tauri-runtime-wry = { version = "0.13.0-alpha.4", path = "../tauri-runtime-wry", optional = true } rand = "0.8" -semver = { version = "1.0", features = [ "serde" ] } +semver = { version = "1.0", features = ["serde"] } serde_repr = "0.1" state = "0.5" -tar = "0.4.38" tempfile = "3" -zip = { version = "0.6", default-features = false, optional = true } -ignore = "0.4" -flate2 = "1.0" http = "0.2" dirs-next = "2.0" percent-encoding = "2.2" reqwest = { version = "0.11", default-features = false, features = [ "json", "stream" ] } -bytes = { version = "1", features = [ "serde" ] } +bytes = { version = "1", features = ["serde"] } raw-window-handle = "0.5" time = { version = "0.3", optional = true } glob = "0.3" @@ -70,12 +67,11 @@ serialize-to-javascript = "=0.1.1" infer = { version = "0.9", optional = true } png = { version = "0.17", optional = true } ico = { version = "0.2.0", optional = true } -encoding_rs = "0.8.31" [target."cfg(any(target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies] -gtk = { version = "0.16", features = [ "v3_24" ] } +gtk = { version = "0.16", features = ["v3_24"] } glib = "0.16" -webkit2gtk = { version = "0.19.1", features = [ "v2_38" ] } +webkit2gtk = { version = "0.19.1", features = ["v2_38"] } [target."cfg(target_os = \"macos\")".dependencies] embed_plist = "1.2" @@ -85,9 +81,9 @@ objc = "0.2" [target."cfg(windows)".dependencies] webview2-com = "0.22" - [target."cfg(windows)".dependencies.windows] - version = "0.44" - features = [ "Win32_Foundation" ] +[target."cfg(windows)".dependencies.windows] +version = "0.44" +features = ["Win32_Foundation"] [target."cfg(any(target_os = \"android\", target_os = \"ios\"))".dependencies] log = "0.4" @@ -111,165 +107,38 @@ tauri-build = { path = "../tauri-build/", version = "2.0.0-alpha.1" } proptest = "1.0.0" quickcheck = "1.0.3" quickcheck_macros = "1.0.0" -serde = { version = "1.0", features = [ "derive" ] } +serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -tauri = { path = ".", default-features = false, features = [ "wry" ] } -tokio = { version = "1", features = [ "full" ] } +tauri = { path = ".", default-features = false, features = ["wry"] } +tokio = { version = "1", features = ["full"] } cargo_toml = "0.11" winnow = "=0.4.1" [features] -default = [ "wry", "compression", "objc-exception" ] -compression = [ "tauri-macros/compression", "tauri-utils/compression" ] -wry = [ "tauri-runtime-wry" ] -objc-exception = [ "tauri-runtime-wry/objc-exception" ] -linux-protocol-headers = [ "tauri-runtime-wry/linux-headers", "webkit2gtk/v2_36" ] -isolation = [ "tauri-utils/isolation", "tauri-macros/isolation" ] -custom-protocol = [ "tauri-macros/custom-protocol" ] -updater = [ "time" ] -fs-extract-api = [ "zip" ] -native-tls = [ "reqwest/native-tls" ] -native-tls-vendored = [ "reqwest/native-tls-vendored" ] -rustls-tls = [ "reqwest/rustls-tls" ] -system-tray = [ "tauri-runtime/system-tray", "tauri-runtime-wry/system-tray" ] -devtools = [ "tauri-runtime/devtools", "tauri-runtime-wry/devtools" ] -dox = [ "tauri-runtime-wry/dox" ] +default = ["wry", "compression", "objc-exception"] +compression = ["tauri-macros/compression", "tauri-utils/compression"] +wry = ["tauri-runtime-wry"] +objc-exception = ["tauri-runtime-wry/objc-exception"] +linux-protocol-headers = ["tauri-runtime-wry/linux-headers", "webkit2gtk/v2_36"] +isolation = ["tauri-utils/isolation", "tauri-macros/isolation"] +custom-protocol = ["tauri-macros/custom-protocol"] +native-tls = ["reqwest/native-tls"] +native-tls-vendored = ["reqwest/native-tls-vendored"] +rustls-tls = ["reqwest/rustls-tls"] +system-tray = ["tauri-runtime/system-tray", "tauri-runtime-wry/system-tray"] +devtools = ["tauri-runtime/devtools", "tauri-runtime-wry/devtools"] +dox = ["tauri-runtime-wry/dox"] +process-relaunch-dangerous-allow-symlink-macos = [ "tauri-utils/process-relaunch-dangerous-allow-symlink-macos" ] macos-private-api = [ "tauri-runtime/macos-private-api", - "tauri-runtime-wry/macos-private-api" -] -window-data-url = [ "data-url" ] -api-all = [ - "clipboard-all", - "dialog-all", - "fs-all", - "global-shortcut-all", - "http-all", - "notification-all", - "os-all", - "path-all", - "process-all", - "protocol-all", - "shell-all", - "window-all", - "app-all" -] -clipboard-all = [ "clipboard-write-text", "clipboard-read-text" ] -clipboard-read-text = [ ] -clipboard-write-text = [ ] -dialog-all = [ "dialog-open", "dialog-save", "dialog-message", "dialog-ask" ] -dialog-ask = [ ] -dialog-confirm = [ ] -dialog-message = [ ] -dialog-open = [ ] -dialog-save = [ ] -fs-all = [ - "fs-copy-file", - "fs-create-dir", - "fs-exists", - "fs-read-file", - "fs-read-dir", - "fs-remove-dir", - "fs-remove-file", - "fs-rename-file", - "fs-write-file" -] -fs-copy-file = [ ] -fs-create-dir = [ ] -fs-exists = [ ] -fs-read-file = [ ] -fs-read-dir = [ ] -fs-remove-dir = [ ] -fs-remove-file = [ ] -fs-rename-file = [ ] -fs-write-file = [ ] -global-shortcut-all = [ ] -http-all = [ "http-request" ] -http-request = [ ] -notification-all = [ ] -os-all = [ ] -path-all = [ ] -process-all = [ "process-relaunch", "process-exit" ] -process-exit = [ ] -process-relaunch = [ ] -process-relaunch-dangerous-allow-symlink-macos = [ "tauri-utils/process-relaunch-dangerous-allow-symlink-macos" ] -protocol-all = [ "protocol-asset" ] -protocol-asset = [ ] -shell-all = [ "shell-execute", "shell-sidecar", "shell-open" ] -shell-execute = [ ] -shell-sidecar = [ ] -shell-open = [ ] -window-all = [ - "window-create", - "window-center", - "window-request-user-attention", - "window-set-resizable", - "window-set-title", - "window-maximize", - "window-unmaximize", - "window-minimize", - "window-unminimize", - "window-show", - "window-hide", - "window-close", - "window-set-decorations", - "window-set-shadow", - "window-set-always-on-top", - "window-set-content-protected", - "window-set-size", - "window-set-min-size", - "window-set-max-size", - "window-set-position", - "window-set-fullscreen", - "window-set-focus", - "window-set-icon", - "window-set-skip-taskbar", - "window-set-cursor-grab", - "window-set-cursor-visible", - "window-set-cursor-icon", - "window-set-cursor-position", - "window-set-ignore-cursor-events", - "window-start-dragging", - "window-print" + "tauri-runtime-wry/macos-private-api", ] -window-create = [ ] -window-center = [ ] -window-request-user-attention = [ ] -window-set-resizable = [ ] -window-set-title = [ ] -window-maximize = [ ] -window-unmaximize = [ ] -window-minimize = [ ] -window-unminimize = [ ] -window-show = [ ] -window-hide = [ ] -window-close = [ ] -window-set-decorations = [ ] -window-set-shadow = [ ] -window-set-always-on-top = [ ] -window-set-content-protected = [ ] -window-set-size = [ ] -window-set-min-size = [ ] -window-set-max-size = [ ] -window-set-position = [ ] -window-set-fullscreen = [ ] -window-set-focus = [ ] -window-set-icon = [ ] -window-set-skip-taskbar = [ ] -window-set-cursor-grab = [ ] -window-set-cursor-visible = [ ] -window-set-cursor-icon = [ ] -window-set-cursor-position = [ ] -window-set-ignore-cursor-events = [ ] -window-start-dragging = [ ] -window-print = [ ] -app-all = [ "app-show", "app-hide" ] -app-show = [ ] -app-hide = [ ] -config-json5 = [ "tauri-macros/config-json5" ] -config-toml = [ "tauri-macros/config-toml" ] -icon-ico = [ "infer", "ico" ] -icon-png = [ "infer", "png" ] +window-data-url = ["data-url"] +protocol-asset = [] +config-json5 = ["tauri-macros/config-json5"] +config-toml = ["tauri-macros/config-toml"] +icon-ico = ["infer", "ico"] +icon-png = ["infer", "png"] [[example]] name = "commands" @@ -282,7 +151,6 @@ path = "../../examples/helloworld/main.rs" [[example]] name = "multiwindow" path = "../../examples/multiwindow/main.rs" -required-features = [ "window-create" ] [[example]] name = "parent-window" @@ -291,7 +159,6 @@ path = "../../examples/parent-window/main.rs" [[example]] name = "navigation" path = "../../examples/navigation/main.rs" -required-features = [ "window-create" ] [[example]] name = "splashscreen" @@ -308,4 +175,4 @@ path = "../../examples/streaming/main.rs" [[example]] name = "isolation" path = "../../examples/isolation/main.rs" -required-features = [ "isolation" ] +required-features = ["isolation"] diff --git a/core/tauri/build.rs b/core/tauri/build.rs index 0051d425b08..863c9c26458 100644 --- a/core/tauri/build.rs +++ b/core/tauri/build.rs @@ -3,8 +3,6 @@ // SPDX-License-Identifier: MIT use heck::AsShoutySnakeCase; -use heck::AsSnakeCase; -use heck::ToSnakeCase; use once_cell::sync::OnceCell; @@ -46,97 +44,12 @@ fn alias(alias: &str, has_feature: bool) { fn main() { alias("custom_protocol", has_feature("custom-protocol")); alias("dev", !has_feature("custom-protocol")); - alias("updater", has_feature("updater")); let target_os = std::env::var("CARGO_CFG_TARGET_OS").unwrap(); let mobile = target_os == "ios" || target_os == "android"; alias("desktop", !mobile); alias("mobile", mobile); - let api_all = has_feature("api-all"); - alias("api_all", api_all); - - alias_module( - "fs", - &[ - "read-file", - "write-file", - "read-dir", - "copy-file", - "create-dir", - "remove-dir", - "remove-file", - "rename-file", - "exists", - ], - api_all, - ); - - alias_module( - "window", - &[ - "create", - "center", - "request-user-attention", - "set-resizable", - "set-title", - "maximize", - "unmaximize", - "minimize", - "unminimize", - "show", - "hide", - "close", - "set-decorations", - "set-shadow", - "set-always-on-top", - "set-content-protected", - "set-size", - "set-min-size", - "set-max-size", - "set-position", - "set-fullscreen", - "set-focus", - "set-icon", - "set-skip-taskbar", - "set-cursor-grab", - "set-cursor-visible", - "set-cursor-icon", - "set-cursor-position", - "set-ignore-cursor-events", - "start-dragging", - "print", - ], - api_all, - ); - - alias_module("shell", &["execute", "sidecar", "open"], api_all); - - if !mobile { - alias_module( - "dialog", - &["open", "save", "message", "ask", "confirm"], - api_all, - ); - } - - alias_module("http", &["request"], api_all); - - if !mobile { - alias_module("notification", &[], api_all); - alias_module("global-shortcut", &[], api_all); - } - alias_module("os", &[], api_all); - alias_module("path", &[], api_all); - - alias_module("protocol", &["asset"], api_all); - - alias_module("process", &["relaunch", "exit"], api_all); - - alias_module("clipboard", &["write-text", "read-text"], api_all); - - alias_module("app", &["show", "hide"], api_all); - let checked_features_out_path = Path::new(&var("OUT_DIR").unwrap()).join("checked_features"); std::fs::write( checked_features_out_path, @@ -219,34 +132,6 @@ fn main() { } } -// create aliases for the given module with its apis. -// each api is translated into a feature flag in the format of `-` -// and aliased as `_`. -// -// The `-all` feature is also aliased to `_all`. -// -// If any of the features is enabled, the `_any` alias is created. -// -// Note that both `module` and `apis` strings must be written in kebab case. -fn alias_module(module: &str, apis: &[&str], api_all: bool) { - let all_feature_name = format!("{module}-all"); - let all = has_feature(&all_feature_name) || api_all; - alias(&all_feature_name.to_snake_case(), all); - - let mut any = all; - - for api in apis { - let has = has_feature(&format!("{module}-{api}")) || all; - alias( - &format!("{}_{}", AsSnakeCase(module), AsSnakeCase(api)), - has, - ); - any = any || has; - } - - alias(&format!("{}_any", AsSnakeCase(module)), any); -} - fn add_manifest() { static WINDOWS_MANIFEST_FILE: &str = "window-app-manifest.xml"; diff --git a/core/tauri/src/api/error.rs b/core/tauri/src/api/error.rs index 8143360735d..0fce6a32c26 100644 --- a/core/tauri/src/api/error.rs +++ b/core/tauri/src/api/error.rs @@ -6,33 +6,6 @@ #[derive(thiserror::Error, Debug)] #[non_exhaustive] pub enum Error { - /// Command error. - #[error("Command Error: {0}")] - Command(String), - /// The path operation error. - #[error("Path Error: {0}")] - Path(String), - /// The path StripPrefixError error. - #[error("Path Error: {0}")] - PathPrefix(#[from] std::path::StripPrefixError), - /// Error showing the dialog. - #[error("Dialog Error: {0}")] - Dialog(String), - /// The dialog operation was cancelled by the user. - #[error("user cancelled the dialog")] - DialogCancelled, - /// Invalid HTTP header value. - #[error(transparent)] - HttpHeaderValue(#[from] http::header::InvalidHeaderValue), - /// Invalid HTTP header value. - #[error(transparent)] - HttpHeader(#[from] http::header::InvalidHeaderName), - /// Failed to convert bytes to string. - #[error(transparent)] - Utf8(#[from] std::string::FromUtf8Error), - /// HTTP form to must be an object. - #[error("http form must be an object")] - InvalidHttpForm, /// Semver error. #[error(transparent)] Semver(#[from] semver::Error), @@ -42,30 +15,4 @@ pub enum Error { /// IO error. #[error(transparent)] Io(#[from] std::io::Error), - /// Ignore error. - #[error("failed to walkdir: {0}")] - Ignore(#[from] ignore::Error), - /// ZIP error. - #[cfg(feature = "fs-extract-api")] - #[error(transparent)] - Zip(#[from] zip::result::ZipError), - /// Extract error. - #[cfg(feature = "fs-extract-api")] - #[error("Failed to extract: {0}")] - Extract(String), - /// Url error. - #[error(transparent)] - Url(#[from] url::ParseError), - /// failed to detect the current platform. - #[error("failed to detect platform: {0}")] - FailedToDetectPlatform(String), - /// Shell error. - #[error("shell error: {0}")] - Shell(String), - /// Unknown program name. - #[error("unknown program name: {0}")] - UnknownProgramName(String), - /// HTTP error. - #[error(transparent)] - Http(#[from] http::Error), } diff --git a/core/tauri/src/api/file.rs b/core/tauri/src/api/file.rs index 4459dab3b61..46ace7fa3ac 100644 --- a/core/tauri/src/api/file.rs +++ b/core/tauri/src/api/file.rs @@ -4,16 +4,8 @@ //! Types and functions related to file operations. -#[cfg(feature = "fs-extract-api")] -mod extract; -mod file_move; - use std::{fs, path::Path}; -#[cfg(feature = "fs-extract-api")] -pub use extract::*; -pub use file_move::*; - /// Reads the entire contents of a file into a string. pub fn read_string>(file: P) -> crate::api::Result { fs::read_to_string(file).map_err(Into::into) diff --git a/core/tauri/src/api/file/extract.rs b/core/tauri/src/api/file/extract.rs deleted file mode 100644 index 572a994f35d..00000000000 --- a/core/tauri/src/api/file/extract.rs +++ /dev/null @@ -1,328 +0,0 @@ -// Copyright 2019-2023 Tauri Programme within The Commons Conservancy -// SPDX-License-Identifier: Apache-2.0 -// SPDX-License-Identifier: MIT - -use std::{ - borrow::Cow, - fs, - io::{self, Cursor, Read, Seek}, - path::{self, Path, PathBuf}, -}; - -/// The archive reader. -#[derive(Debug)] -pub enum ArchiveReader { - /// A plain reader. - Plain(R), - /// A GZ- compressed reader (decoder). - GzCompressed(Box>), -} - -impl Read for ArchiveReader { - fn read(&mut self, buf: &mut [u8]) -> std::io::Result { - match self { - Self::Plain(r) => r.read(buf), - Self::GzCompressed(decoder) => decoder.read(buf), - } - } -} - -impl ArchiveReader { - #[allow(dead_code)] - fn get_mut(&mut self) -> &mut R { - match self { - Self::Plain(r) => r, - Self::GzCompressed(decoder) => decoder.get_mut(), - } - } -} - -/// The supported archive formats. -#[derive(Debug, Clone, Copy, PartialEq, Eq)] -#[non_exhaustive] -pub enum ArchiveFormat { - /// Tar archive. - Tar(Option), - /// Zip archive. - Zip, -} - -/// The supported compression types. -#[derive(Debug, Clone, Copy, PartialEq, Eq)] -#[non_exhaustive] -pub enum Compression { - /// Gz compression (e.g. `.tar.gz` archives) - Gz, -} - -/// The zip entry. -pub struct ZipEntry { - path: PathBuf, - is_dir: bool, - file_contents: Vec, -} - -/// A read-only view into an entry of an archive. -#[non_exhaustive] -pub enum Entry<'a, R: Read> { - /// An entry of a tar archive. - #[non_exhaustive] - Tar(Box>), - /// An entry of a zip archive. - #[non_exhaustive] - Zip(ZipEntry), -} - -impl<'a, R: Read> Entry<'a, R> { - /// The entry path. - pub fn path(&self) -> crate::api::Result> { - match self { - Self::Tar(e) => e.path().map_err(Into::into), - Self::Zip(e) => Ok(Cow::Borrowed(&e.path)), - } - } - - /// Extract this entry into `into_path`. - /// If it's a directory, the target will be created, if it's a file, it'll be extracted at this location. - /// Note: You need to include the complete path, with file name and extension. - pub fn extract(self, into_path: &path::Path) -> crate::api::Result<()> { - match self { - Self::Tar(mut entry) => { - // determine if it's a file or a directory - if entry.header().entry_type() == tar::EntryType::Directory { - // this is a directory, lets create it - match fs::create_dir_all(into_path) { - Ok(_) => (), - Err(e) => { - if e.kind() != io::ErrorKind::AlreadyExists { - return Err(e.into()); - } - } - } - } else { - let mut out_file = fs::File::create(into_path)?; - io::copy(&mut entry, &mut out_file)?; - - // make sure we set permissions - if let Ok(mode) = entry.header().mode() { - set_perms(into_path, Some(&mut out_file), mode, true)?; - } - } - } - Self::Zip(entry) => { - if entry.is_dir { - // this is a directory, lets create it - match fs::create_dir_all(into_path) { - Ok(_) => (), - Err(e) => { - if e.kind() != io::ErrorKind::AlreadyExists { - return Err(e.into()); - } - } - } - } else { - let mut out_file = fs::File::create(into_path)?; - io::copy(&mut Cursor::new(entry.file_contents), &mut out_file)?; - } - } - } - - Ok(()) - } -} - -/// The extract manager to retrieve files from archives. -pub struct Extract<'a, R: Read + Seek> { - reader: ArchiveReader, - archive_format: ArchiveFormat, - tar_archive: Option>>, -} - -impl<'a, R: std::fmt::Debug + Read + Seek> std::fmt::Debug for Extract<'a, R> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - f.debug_struct("Extract") - .field("reader", &self.reader) - .field("archive_format", &self.archive_format) - .finish() - } -} - -impl<'a, R: Read + Seek> Extract<'a, R> { - /// Create archive from reader. - pub fn from_cursor(mut reader: R, archive_format: ArchiveFormat) -> Extract<'a, R> { - if reader.rewind().is_err() { - #[cfg(debug_assertions)] - eprintln!("Could not seek to start of the file"); - } - let compression = if let ArchiveFormat::Tar(compression) = archive_format { - compression - } else { - None - }; - Extract { - reader: match compression { - Some(Compression::Gz) => { - ArchiveReader::GzCompressed(Box::new(flate2::read::GzDecoder::new(reader))) - } - _ => ArchiveReader::Plain(reader), - }, - archive_format, - tar_archive: None, - } - } - - /// Reads the archive content. - pub fn with_files< - E: Into, - F: FnMut(Entry<'_, &mut ArchiveReader>) -> std::result::Result, - >( - &'a mut self, - mut f: F, - ) -> crate::api::Result<()> { - match self.archive_format { - ArchiveFormat::Tar(_) => { - let archive = tar::Archive::new(&mut self.reader); - self.tar_archive.replace(archive); - for entry in self.tar_archive.as_mut().unwrap().entries()? { - let entry = entry?; - if entry.path().is_ok() { - let stop = f(Entry::Tar(Box::new(entry))).map_err(Into::into)?; - if stop { - break; - } - } - } - } - - ArchiveFormat::Zip => { - #[cfg(feature = "fs-extract-api")] - { - let mut archive = zip::ZipArchive::new(self.reader.get_mut())?; - let file_names = archive - .file_names() - .map(|f| f.to_string()) - .collect::>(); - for path in file_names { - let mut zip_file = archive.by_name(&path)?; - let is_dir = zip_file.is_dir(); - let mut file_contents = Vec::new(); - zip_file.read_to_end(&mut file_contents)?; - let stop = f(Entry::Zip(ZipEntry { - path: path.into(), - is_dir, - file_contents, - })) - .map_err(Into::into)?; - if stop { - break; - } - } - } - } - } - - Ok(()) - } - - /// Extract an entire source archive into a specified path. If the source is a single compressed - /// file and not an archive, it will be extracted into a file with the same name inside of - /// `into_dir`. - pub fn extract_into(&mut self, into_dir: &path::Path) -> crate::api::Result<()> { - match self.archive_format { - ArchiveFormat::Tar(_) => { - let mut archive = tar::Archive::new(&mut self.reader); - archive.unpack(into_dir)?; - } - - ArchiveFormat::Zip => { - #[cfg(feature = "fs-extract-api")] - { - let mut archive = zip::ZipArchive::new(self.reader.get_mut())?; - for i in 0..archive.len() { - let mut file = archive.by_index(i)?; - // Decode the file name from raw bytes instead of using file.name() directly. - // file.name() uses String::from_utf8_lossy() which may return messy characters - // such as: τê▒Σ║ñµÿô.app/, that does not work as expected. - // Here we require the file name must be a valid UTF-8. - let file_name = String::from_utf8(file.name_raw().to_vec())?; - let out_path = into_dir.join(file_name); - if file.is_dir() { - fs::create_dir_all(&out_path)?; - } else { - if let Some(out_path_parent) = out_path.parent() { - fs::create_dir_all(out_path_parent)?; - } - let mut out_file = fs::File::create(&out_path)?; - io::copy(&mut file, &mut out_file)?; - } - // Get and Set permissions - #[cfg(unix)] - { - use std::os::unix::fs::PermissionsExt; - if let Some(mode) = file.unix_mode() { - fs::set_permissions(&out_path, fs::Permissions::from_mode(mode))?; - } - } - } - } - } - } - Ok(()) - } -} - -fn set_perms( - dst: &Path, - f: Option<&mut std::fs::File>, - mode: u32, - preserve: bool, -) -> crate::api::Result<()> { - _set_perms(dst, f, mode, preserve).map_err(|_| { - crate::api::Error::Extract(format!( - "failed to set permissions to {mode:o} \ - for `{}`", - dst.display() - )) - }) -} - -#[cfg(unix)] -fn _set_perms( - dst: &Path, - f: Option<&mut std::fs::File>, - mode: u32, - preserve: bool, -) -> io::Result<()> { - use std::os::unix::prelude::*; - - let mode = if preserve { mode } else { mode & 0o777 }; - let perm = fs::Permissions::from_mode(mode as _); - match f { - Some(f) => f.set_permissions(perm), - None => fs::set_permissions(dst, perm), - } -} - -#[cfg(windows)] -fn _set_perms( - dst: &Path, - f: Option<&mut std::fs::File>, - mode: u32, - _preserve: bool, -) -> io::Result<()> { - if mode & 0o200 == 0o200 { - return Ok(()); - } - match f { - Some(f) => { - let mut perm = f.metadata()?.permissions(); - perm.set_readonly(true); - f.set_permissions(perm) - } - None => { - let mut perm = fs::metadata(dst)?.permissions(); - perm.set_readonly(true); - fs::set_permissions(dst, perm) - } - } -} diff --git a/core/tauri/src/api/file/file_move.rs b/core/tauri/src/api/file/file_move.rs deleted file mode 100644 index c8b7e689177..00000000000 --- a/core/tauri/src/api/file/file_move.rs +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright 2019-2023 Tauri Programme within The Commons Conservancy -// SPDX-License-Identifier: Apache-2.0 -// SPDX-License-Identifier: MIT - -use ignore::WalkBuilder; -use std::{fs, path}; - -/// Moves a file from the given path to the specified destination. -/// -/// `source` and `dest` must be on the same filesystem. -/// If `replace_using_temp` is specified, the destination file will be -/// replaced using the given temporary path. -/// -/// * Errors: -/// * Io - copying / renaming -#[derive(Debug)] -pub struct Move<'a> { - source: &'a path::Path, - temp: Option<&'a path::Path>, -} -impl<'a> Move<'a> { - /// Specify source file - pub fn from_source(source: &'a path::Path) -> Move<'a> { - Self { source, temp: None } - } - - /// If specified and the destination file already exists, the "destination" - /// file will be moved to the given temporary location before the "source" - /// file is moved to the "destination" file. - /// - /// In the event of an `io` error while renaming "source" to "destination", - /// the temporary file will be moved back to "destination". - /// - /// The `temp` dir must be explicitly provided since `rename` operations require - /// files to live on the same filesystem. - pub fn replace_using_temp(&mut self, temp: &'a path::Path) -> &mut Self { - self.temp = Some(temp); - self - } - - /// Move source file to specified destination (replace whole directory) - pub fn to_dest(&self, dest: &path::Path) -> crate::api::Result<()> { - match self.temp { - None => { - fs::rename(self.source, dest)?; - } - Some(temp) => { - if dest.exists() { - fs::rename(dest, temp)?; - if let Err(e) = fs::rename(self.source, dest) { - fs::rename(temp, dest)?; - return Err(e.into()); - } - } else { - fs::rename(self.source, dest)?; - } - } - }; - Ok(()) - } - - /// Walk in the source and copy all files and create directories if needed by - /// replacing existing elements. (equivalent to a cp -R) - pub fn walk_to_dest(&self, dest: &path::Path) -> crate::api::Result<()> { - match self.temp { - None => { - // got no temp -- no need to backup - walkdir_and_copy(self.source, dest)?; - } - Some(temp) => { - if dest.exists() { - // we got temp and our dest exist, lets make a backup - // of current files - walkdir_and_copy(dest, temp)?; - - if let Err(e) = walkdir_and_copy(self.source, dest) { - // if we got something wrong we reset the dest with our backup - fs::rename(temp, dest)?; - return Err(e); - } - } else { - // got temp but dest didnt exist - walkdir_and_copy(self.source, dest)?; - } - } - }; - Ok(()) - } -} -// Walk into the source and create directories, and copy files -// Overwriting existing items but keeping untouched the files in the dest -// not provided in the source. -fn walkdir_and_copy(source: &path::Path, dest: &path::Path) -> crate::api::Result<()> { - let walkdir = WalkBuilder::new(source).hidden(false).build(); - - for entry in walkdir { - // Check if it's a file - - let element = entry?; - let metadata = element.metadata()?; - let destination = dest.join(element.path().strip_prefix(source)?); - - // we make sure it's a directory and destination doesnt exist - if metadata.is_dir() && !&destination.exists() { - fs::create_dir_all(&destination)?; - } - - // we make sure it's a file - if metadata.is_file() { - fs::copy(element.path(), destination)?; - } - } - Ok(()) -} diff --git a/core/tauri/src/app.rs b/core/tauri/src/app.rs index 65159def905..f5b7b3d360d 100644 --- a/core/tauri/src/app.rs +++ b/core/tauri/src/app.rs @@ -19,7 +19,7 @@ use crate::{ window::{PendingWindow, WindowEvent as RuntimeWindowEvent}, ExitRequestedEventAction, RunEvent as RuntimeRunEvent, }, - scope::{FsScope, IpcScope}, + scope::IpcScope, sealed::{ManagerBase, RuntimeOrDispatch}, utils::config::Config, utils::{assets::Assets, Env}, @@ -27,6 +27,9 @@ use crate::{ Runtime, Scopes, StateManager, Theme, Window, }; +#[cfg(feature = "protocol-asset")] +use crate::scope::FsScope; + use raw_window_handle::HasRawDisplayHandle; use tauri_macros::default_runtime; use tauri_runtime::window::{ @@ -174,18 +177,11 @@ pub enum RunEvent { /// /// This event is useful as a place to put your code that should be run after all state-changing events have been handled and you want to do stuff (updating state, performing calculations, etc) that happens as the “main body” of your event loop. MainEventsCleared, - /// Updater event. - #[cfg(updater)] - #[cfg_attr(doc_cfg, doc(cfg(feature = "updater")))] - Updater(crate::UpdaterEvent), } impl From for RunEvent { fn from(event: EventLoopMessage) -> Self { - match event { - #[cfg(updater)] - EventLoopMessage::Updater(event) => RunEvent::Updater(event), - } + match event {} } } @@ -252,13 +248,6 @@ pub struct AppHandle { pub(crate) manager: WindowManager, } -impl AppHandle { - /// Creates a proxy to send events through the event loop. - pub fn create_proxy(&self) -> R::EventLoopProxy { - self.runtime_handle.create_proxy() - } -} - /// APIs specific to the wry runtime. #[cfg(feature = "wry")] impl AppHandle { @@ -1347,12 +1336,8 @@ impl Builder { app.manage(Scopes { ipc: IpcScope::new(&app.config()), - fs: FsScope::for_fs_api(&app, &app.config().tauri.allowlist.fs.scope)?, - #[cfg(protocol_asset)] - asset_protocol: FsScope::for_fs_api( - &app, - &app.config().tauri.allowlist.protocol.asset_scope, - )?, + #[cfg(feature = "protocol-asset")] + asset_protocol: FsScope::for_fs_api(&app, &app.config().tauri.security.asset_protocol.scope)?, }); #[cfg(windows)] diff --git a/core/tauri/src/error.rs b/core/tauri/src/error.rs index cce5b1b43f1..03ad98f8900 100644 --- a/core/tauri/src/error.rs +++ b/core/tauri/src/error.rs @@ -34,18 +34,9 @@ pub enum Error { /// Runtime error. #[error("runtime error: {0}")] Runtime(#[from] tauri_runtime::Error), - /// Failed to create window. - #[error("failed to create window")] - CreateWindow, /// Window label must be unique. #[error("a window with label `{0}` already exists")] WindowLabelAlreadyExists(String), - /// Can't access webview dispatcher because the webview was closed or not found. - #[error("webview not found: invalid label or it was closed")] - WebviewNotFound, - /// Failed to send message to webview. - #[error("failed to send message to the webview")] - FailedToSendMessage, /// Embedded asset not found. #[error("asset not found: {0}")] AssetNotFound(String), @@ -61,9 +52,6 @@ pub enum Error { /// Failed to load window icon. #[error("invalid icon: {0}")] InvalidIcon(std::io::Error), - /// API not whitelisted on tauri.conf.json - #[error("'{0}' not in the allowlist (https://tauri.app/docs/api/config#tauri.allowlist)")] - ApiNotAllowlisted(String), /// Invalid args when running a command. #[error("invalid args `{1}` for command `{0}`: {2}")] InvalidArgs(&'static str, &'static str, serde_json::Error), diff --git a/core/tauri/src/lib.rs b/core/tauri/src/lib.rs index c47ca5a3d1c..15db364d494 100644 --- a/core/tauri/src/lib.rs +++ b/core/tauri/src/lib.rs @@ -16,15 +16,12 @@ //! - **linux-protocol-headers**: Enables headers support for custom protocol requests on Linux. Requires webkit2gtk v2.36 or above. //! - **isolation**: Enables the isolation pattern. Enabled by default if the `tauri > pattern > use` config option is set to `isolation` on the `tauri.conf.json` file. //! - **custom-protocol**: Feature managed by the Tauri CLI. When enabled, Tauri assumes a production environment instead of a development one. -//! - **updater**: Enables the application auto updater. Enabled by default if the `updater` config is defined on the `tauri.conf.json` file. //! - **devtools**: Enables the developer tools (Web inspector) and [`Window::open_devtools`]. Enabled by default on debug builds. //! On macOS it uses private APIs, so you can't enable it if your app will be published to the App Store. //! - **native-tls**: Provides TLS support to connect over HTTPS. //! - **native-tls-vendored**: Compile and statically link to a vendored copy of OpenSSL. //! - **rustls-tls**: Provides TLS support to connect over HTTPS using rustls. //! - **process-relaunch-dangerous-allow-symlink-macos**: Allows the [`process::current_binary`] function to allow symlinks on macOS (this is dangerous, see the Security section in the documentation website). -//! - **dialog**: Enables the [`api::dialog`] module. -//! - **fs-extract-api**: Enabled the `tauri::api::file::Extract` API. //! - **system-tray**: Enables application system tray API. Enabled by default if the `systemTray` config is defined on the `tauri.conf.json` file. //! - **macos-private-api**: Enables features only available in **macOS**'s private APIs, currently the `transparent` window functionality and the `fullScreenEnabled` preference setting to `true`. Enabled by default if the `tauri > macosPrivateApi` config flag is set to `true` on the `tauri.conf.json` file. //! - **window-data-url**: Enables usage of data URLs on the webview. @@ -39,115 +36,9 @@ //! The following are a list of [Cargo features](https://doc.rust-lang.org/stable/cargo/reference/manifest.html#the-features-section) that enables commands for Tauri's API package. //! These features are automatically enabled by the Tauri CLI based on the `allowlist` configuration under `tauri.conf.json`. //! -//! - **api-all**: Enables all API endpoints. -//! -//! ### Clipboard allowlist -//! -//! - **clipboard-all**: Enables all [Clipboard APIs](https://tauri.app/en/docs/api/js/modules/clipboard/). -//! - **clipboard-read-text**: Enables the [`readText` API](https://tauri.app/en/docs/api/js/modules/clipboard/#readtext). -//! - **clipboard-write-text**: Enables the [`writeText` API](https://tauri.app/en/docs/api/js/modules/clipboard/#writetext). -//! -//! ### Dialog allowlist -//! -//! - **dialog-all**: Enables all [Dialog APIs](https://tauri.app/en/docs/api/js/modules/dialog). -//! - **dialog-ask**: Enables the [`ask` API](https://tauri.app/en/docs/api/js/modules/dialog#ask). -//! - **dialog-confirm**: Enables the [`confirm` API](https://tauri.app/en/docs/api/js/modules/dialog#confirm). -//! - **dialog-message**: Enables the [`message` API](https://tauri.app/en/docs/api/js/modules/dialog#message). -//! - **dialog-open**: Enables the [`open` API](https://tauri.app/en/docs/api/js/modules/dialog#open). -//! - **dialog-save**: Enables the [`save` API](https://tauri.app/en/docs/api/js/modules/dialog#save). -//! -//! ### Filesystem allowlist -//! -//! - **fs-all**: Enables all [Filesystem APIs](https://tauri.app/en/docs/api/js/modules/fs). -//! - **fs-copy-file**: Enables the [`copyFile` API](https://tauri.app/en/docs/api/js/modules/fs#copyfile). -//! - **fs-create-dir**: Enables the [`createDir` API](https://tauri.app/en/docs/api/js/modules/fs#createdir). -//! - **fs-exists**: Enables the [`exists` API](https://tauri.app/en/docs/api/js/modules/fs#exists). -//! - **fs-read-dir**: Enables the [`readDir` API](https://tauri.app/en/docs/api/js/modules/fs#readdir). -//! - **fs-read-file**: Enables the [`readTextFile` API](https://tauri.app/en/docs/api/js/modules/fs#readtextfile) and the [`readBinaryFile` API](https://tauri.app/en/docs/api/js/modules/fs#readbinaryfile). -//! - **fs-remove-dir**: Enables the [`removeDir` API](https://tauri.app/en/docs/api/js/modules/fs#removedir). -//! - **fs-remove-file**: Enables the [`removeFile` API](https://tauri.app/en/docs/api/js/modules/fs#removefile). -//! - **fs-rename-file**: Enables the [`renameFile` API](https://tauri.app/en/docs/api/js/modules/fs#renamefile). -//! - **fs-write-file**: Enables the [`writeFile` API](https://tauri.app/en/docs/api/js/modules/fs#writefile) and the [`writeBinaryFile` API](https://tauri.app/en/docs/api/js/modules/fs#writebinaryfile). -//! -//! ### Global shortcut allowlist -//! -//! - **global-shortcut-all**: Enables all [GlobalShortcut APIs](https://tauri.app/en/docs/api/js/modules/globalShortcut). -//! -//! ### HTTP allowlist -//! -//! - **http-all**: Enables all [HTTP APIs](https://tauri.app/en/docs/api/js/modules/http). -//! - **http-request**: Enables the [`request` APIs](https://tauri.app/en/docs/api/js/classes/http.client/). -//! -//! ### Notification allowlist -//! -//! - **notification-all**: Enables all [Notification APIs](https://tauri.app/en/docs/api/js/modules/notification). -//! -//! ### OS allowlist -//! -//! - **os-all**: Enables all [OS APIs](https://tauri.app/en/docs/api/js/modules/os). -//! -//! ### Path allowlist -//! -//! - **path-all**: Enables all [Path APIs](https://tauri.app/en/docs/api/js/modules/path). -//! -//! ### Process allowlist -//! -//! - **process-all**: Enables all [Process APIs](https://tauri.app/en/docs/api/js/modules/process). -//! - **process-exit**: Enables the [`exit` API](https://tauri.app/en/docs/api/js/modules/process#exit). -//! - **process-relaunch**: Enables the [`relaunch` API](https://tauri.app/en/docs/api/js/modules/process#relaunch). -//! //! ### Protocol allowlist //! -//! - **protocol-all**: Enables all Protocol APIs. //! - **protocol-asset**: Enables the `asset` custom protocol. -//! -//! ### Shell allowlist -//! -//! - **shell-all**: Enables all [Clipboard APIs](https://tauri.app/en/docs/api/js/modules/shell). -//! - **shell-execute**: Enables [executing arbitrary programs](https://tauri.app/en/docs/api/js/classes/shell.Command#constructor). -//! - **shell-sidecar**: Enables [executing a `sidecar` program](https://tauri.app/en/docs/api/js/classes/shell.Command#sidecar). -//! - **shell-open**: Enables the [`open` API](https://tauri.app/en/docs/api/js/modules/shell#open). -//! -//! ### Window allowlist -//! -//! - **window-all**: Enables all [Window APIs](https://tauri.app/en/docs/api/js/modules/window). -//! - **window-create**: Enables the API used to [create new windows](https://tauri.app/en/docs/api/js/classes/window.webviewwindow/). -//! - **window-center**: Enables the [`center` API](https://tauri.app/en/docs/api/js/classes/window.WebviewWindow#center). -//! - **window-request-user-attention**: Enables the [`requestUserAttention` API](https://tauri.app/en/docs/api/js/classes/window.WebviewWindow#requestuserattention). -//! - **window-set-resizable**: Enables the [`setResizable` API](https://tauri.app/en/docs/api/js/classes/window.WebviewWindow#setresizable). -//! - **window-set-title**: Enables the [`setTitle` API](https://tauri.app/en/docs/api/js/classes/window.WebviewWindow#settitle). -//! - **window-maximize**: Enables the [`maximize` API](https://tauri.app/en/docs/api/js/classes/window.WebviewWindow#maximize). -//! - **window-unmaximize**: Enables the [`unmaximize` API](https://tauri.app/en/docs/api/js/classes/window.WebviewWindow#unmaximize). -//! - **window-minimize**: Enables the [`minimize` API](https://tauri.app/en/docs/api/js/classes/window.WebviewWindow#minimize). -//! - **window-unminimize**: Enables the [`unminimize` API](https://tauri.app/en/docs/api/js/classes/window.WebviewWindow#unminimize). -//! - **window-show**: Enables the [`show` API](https://tauri.app/en/docs/api/js/classes/window.WebviewWindow#show). -//! - **window-hide**: Enables the [`hide` API](https://tauri.app/en/docs/api/js/classes/window.WebviewWindow#hide). -//! - **window-close**: Enables the [`close` API](https://tauri.app/en/docs/api/js/classes/window.WebviewWindow#close). -//! - **window-set-decorations**: Enables the [`setDecorations` API](https://tauri.app/en/docs/api/js/classes/window.WebviewWindow#setdecorations). -//! - **window-set-shadow**: Enables the [`setShadow` API](https://tauri.app/en/docs/api/js/classes/window.WebviewWindow#setshadow). -//! - **window-set-always-on-top**: Enables the [`setAlwaysOnTop` API](https://tauri.app/en/docs/api/js/classes/window.WebviewWindow#setalwaysontop). -//! - **window-set-content-protected**: Enables the [`setContentProtected` API](https://tauri.app/en/docs/api/js/classes/window.WebviewWindow#setcontentprotected). -//! - **window-set-size**: Enables the [`setSize` API](https://tauri.app/en/docs/api/js/classes/window.WebviewWindow#setsize). -//! - **window-set-min-size**: Enables the [`setMinSize` API](https://tauri.app/en/docs/api/js/classes/window.WebviewWindow#setminsize). -//! - **window-set-max-size**: Enables the [`setMaxSize` API](https://tauri.app/en/docs/api/js/classes/window.WebviewWindow#setmaxsize). -//! - **window-set-position**: Enables the [`setPosition` API](https://tauri.app/en/docs/api/js/classes/window.WebviewWindow#setposition). -//! - **window-set-fullscreen**: Enables the [`setFullscreen` API](https://tauri.app/en/docs/api/js/classes/window.WebviewWindow#setfullscreen). -//! - **window-set-focus**: Enables the [`setFocus` API](https://tauri.app/en/docs/api/js/classes/window.WebviewWindow#setfocus). -//! - **window-set-icon**: Enables the [`setIcon` API](https://tauri.app/en/docs/api/js/classes/window.WebviewWindow#seticon). -//! - **window-set-skip-taskbar**: Enables the [`setSkipTaskbar` API](https://tauri.app/en/docs/api/js/classes/window.WebviewWindow#setskiptaskbar). -//! - **window-set-cursor-grab**: Enables the [`setCursorGrab` API](https://tauri.app/en/docs/api/js/classes/window.WebviewWindow#setcursorgrab). -//! - **window-set-cursor-visible**: Enables the [`setCursorVisible` API](https://tauri.app/en/docs/api/js/classes/window.WebviewWindow#setcursorvisible). -//! - **window-set-cursor-icon**: Enables the [`setCursorIcon` API](https://tauri.app/en/docs/api/js/classes/window.WebviewWindow#setcursoricon). -//! - **window-set-cursor-position**: Enables the [`setCursorPosition` API](https://tauri.app/en/docs/api/js/classes/window.WebviewWindow#setcursorposition). -//! - **window-set-ignore-cursor-events**: Enables the [`setIgnoreCursorEvents` API](https://tauri.app/en/docs/api/js/classes/window.WebviewWindow#setignorecursorevents). -//! - **window-start-dragging**: Enables the [`startDragging` API](https://tauri.app/en/docs/api/js/classes/window.WebviewWindow#startdragging). -//! - **window-print**: Enables the [`print` API](https://tauri.app/en/docs/api/js/classes/window.WebviewWindow#print). -//! -//! ### App allowlist -//! -//! - **app-all**: Enables all [App APIs](https://tauri.app/en/docs/api/js/modules/app). -//! - **app-show**: Enables the [`show` API](https://tauri.app/en/docs/api/js/modules/app#show). -//! - **app-hide**: Enables the [`hide` API](https://tauri.app/en/docs/api/js/modules/app#hide). #![warn(missing_docs, rust_2018_idioms)] #![cfg_attr(doc_cfg, feature(doc_cfg))] @@ -338,48 +229,9 @@ pub fn log_stdout() { }); } -/// Updater events. -#[cfg(updater)] -#[cfg_attr(doc_cfg, doc(cfg(feature = "updater")))] -#[derive(Debug, Clone)] -pub enum UpdaterEvent { - /// An update is available. - UpdateAvailable { - /// The update body. - body: String, - /// The update release date. - date: Option, - /// The update version. - version: String, - }, - /// The update is pending and about to be downloaded. - Pending, - /// The update download received a progress event. - DownloadProgress { - /// The amount that was downloaded on this iteration. - /// Does not accumulate with previous chunks. - chunk_length: usize, - /// The total - content_length: Option, - }, - /// The update has been downloaded and is now about to be installed. - Downloaded, - /// The update has been applied and the app is now up to date. - Updated, - /// The app is already up to date. - AlreadyUpToDate, - /// An error occurred while updating. - Error(String), -} - /// The user event type. #[derive(Debug, Clone)] -pub enum EventLoopMessage { - /// Updater event. - #[cfg(updater)] - #[cfg_attr(doc_cfg, doc(cfg(feature = "updater")))] - Updater(UpdaterEvent), -} +pub enum EventLoopMessage {} /// The webview runtime interface. A wrapper around [`runtime::Runtime`] with the proper user event type associated. pub trait Runtime: runtime::Runtime {} @@ -845,18 +697,13 @@ pub trait Manager: sealed::ManagerBase { self.state::().inner().clone() } - /// Gets the scope for the filesystem APIs. - fn fs_scope(&self) -> FsScope { - self.state::().inner().fs.clone() - } - /// Gets the scope for the IPC. fn ipc_scope(&self) -> IpcScope { self.state::().inner().ipc.clone() } /// Gets the scope for the asset protocol. - #[cfg(protocol_asset)] + #[cfg(feature = "protocol-asset")] fn asset_protocol_scope(&self) -> FsScope { self.state::().inner().asset_protocol.clone() } @@ -937,53 +784,6 @@ mod tests { } } } - - #[test] - fn all_allowlist_features_are_aliased() { - let manifest = get_manifest(); - let all_modules = manifest - .features - .iter() - .find(|(f, _)| f.as_str() == "api-all") - .map(|(_, enabled)| enabled) - .expect("api-all feature must exist"); - - let checked_features = CHECKED_FEATURES.split(',').collect::>(); - assert!( - checked_features.contains(&"api-all"), - "`api-all` is not aliased" - ); - - // features that look like an allowlist feature, but are not - let allowed = [ - "fs-extract-api", - "process-relaunch-dangerous-allow-symlink-macos", - "window-data-url", - ]; - - for module_all_feature in all_modules { - let module = module_all_feature.replace("-all", ""); - assert!( - checked_features.contains(&module_all_feature.as_str()), - "`{module}` is not aliased" - ); - - let module_prefix = format!("{module}-"); - // we assume that module features are the ones that start with `-` - // though it's not 100% accurate, we have an allowed list to fix it - let module_features = manifest - .features - .keys() - .filter(|f| f.starts_with(&module_prefix)); - for module_feature in module_features { - assert!( - allowed.contains(&module_feature.as_str()) - || checked_features.contains(&module_feature.as_str()), - "`{module_feature}` is not aliased" - ); - } - } - } } #[cfg(test)] diff --git a/core/tauri/src/manager.rs b/core/tauri/src/manager.rs index c9a1aec1f75..a6f633424e4 100644 --- a/core/tauri/src/manager.rs +++ b/core/tauri/src/manager.rs @@ -505,7 +505,7 @@ impl WindowManager { registered_scheme_protocols.push("tauri".into()); } - #[cfg(protocol_asset)] + #[cfg(feature = "protocol-asset")] if !registered_scheme_protocols.contains(&"asset".into()) { use crate::path::SafePathBuf; use tokio::io::{AsyncReadExt, AsyncSeekExt}; @@ -1321,6 +1321,7 @@ impl WindowManager { pending, &label, window_labels, + #[allow(clippy::redundant_clone)] app_handle.clone(), web_resource_request_handler, )?; diff --git a/core/tauri/src/scope/fs.rs b/core/tauri/src/scope/fs.rs index 2de391a7825..3e415d89b02 100644 --- a/core/tauri/src/scope/fs.rs +++ b/core/tauri/src/scope/fs.rs @@ -10,11 +10,8 @@ use std::{ }; pub use glob::Pattern; -use tauri_utils::config::FsAllowlistScope; use uuid::Uuid; -use crate::{Manager, Runtime}; - /// Scope change event. #[derive(Debug, Clone)] pub enum Event { @@ -81,9 +78,10 @@ fn push_pattern, F: Fn(&str) -> Result>( + #[allow(unused)] + pub(crate) fn for_fs_api>( manager: &M, - scope: &FsAllowlistScope, + scope: &tauri_utils::config::FsScope, ) -> crate::Result { let mut allowed_patterns = HashSet::new(); for path in scope.allowed_paths() { diff --git a/core/tauri/src/scope/mod.rs b/core/tauri/src/scope/mod.rs index 6c5b5ba4913..3bb818d384b 100644 --- a/core/tauri/src/scope/mod.rs +++ b/core/tauri/src/scope/mod.rs @@ -10,27 +10,35 @@ pub use self::ipc::Scope as IpcScope; pub use fs::{Event as FsScopeEvent, Pattern as GlobPattern, Scope as FsScope}; use std::path::Path; -pub(crate) struct Scopes { - pub ipc: IpcScope, - pub fs: FsScope, - #[cfg(protocol_asset)] - pub asset_protocol: FsScope, +/// Managed state for all the core scopes in a tauri application. +pub struct Scopes { + pub(crate) ipc: IpcScope, + #[cfg(feature = "protocol-asset")] + pub(crate) asset_protocol: FsScope, } impl Scopes { - #[allow(dead_code)] - pub(crate) fn allow_directory(&self, path: &Path, recursive: bool) -> crate::Result<()> { - self.fs.allow_directory(path, recursive)?; - #[cfg(protocol_asset)] + /// Allows a directory on the scopes. + #[allow(unused)] + pub fn allow_directory>(&self, path: P, recursive: bool) -> crate::Result<()> { + #[cfg(feature = "protocol-asset")] self.asset_protocol.allow_directory(path, recursive)?; Ok(()) } - #[allow(dead_code)] - pub(crate) fn allow_file(&self, path: &Path) -> crate::Result<()> { - self.fs.allow_file(path)?; - #[cfg(protocol_asset)] + /// Allows a file on the scopes. + #[allow(unused)] + pub fn allow_file>(&self, path: P) -> crate::Result<()> { + #[cfg(feature = "protocol-asset")] self.asset_protocol.allow_file(path)?; Ok(()) } + + /// Forbids a file on the scopes. + #[allow(unused)] + pub fn forbid_file>(&self, path: P) -> crate::Result<()> { + #[cfg(feature = "protocol-asset")] + self.asset_protocol.forbid_file(path)?; + Ok(()) + } } diff --git a/core/tauri/src/test/mod.rs b/core/tauri/src/test/mod.rs index 0ee87e32720..90ea8d625d4 100644 --- a/core/tauri/src/test/mod.rs +++ b/core/tauri/src/test/mod.rs @@ -44,9 +44,7 @@ pub fn mock_context(assets: A) -> crate::Context { pattern: PatternKind::Brownfield, windows: Vec::new(), bundle: Default::default(), - allowlist: Default::default(), security: Default::default(), - updater: Default::default(), system_tray: None, macos_private_api: false, }, diff --git a/core/tauri/src/window.rs b/core/tauri/src/window.rs index 28838a6dcc9..0bfab5ea44d 100644 --- a/core/tauri/src/window.rs +++ b/core/tauri/src/window.rs @@ -1582,7 +1582,6 @@ impl Window { objects::JObject, JNIEnv, }; - use crate::api::ipc::CallbackFn; fn handle_message( plugin: &str, diff --git a/core/tauri/test/fixture/src-tauri/tauri.conf.json b/core/tauri/test/fixture/src-tauri/tauri.conf.json index 6b4473313d0..147743e3c13 100644 --- a/core/tauri/test/fixture/src-tauri/tauri.conf.json +++ b/core/tauri/test/fixture/src-tauri/tauri.conf.json @@ -9,9 +9,6 @@ "identifier": "studio.tauri.example", "active": true }, - "allowlist": { - "all": true - }, "windows": [ { "title": "Tauri App" @@ -19,9 +16,6 @@ ], "security": { "csp": "default-src blob: data: filesystem: ws: wss: http: https: tauri: 'unsafe-eval' 'unsafe-inline' 'self'" - }, - "updater": { - "active": false } } } diff --git a/examples/api/dist/assets/index.css b/examples/api/dist/assets/index.css index 2e0a5fe95b7..1148ece6d18 100644 --- a/examples/api/dist/assets/index.css +++ b/examples/api/dist/assets/index.css @@ -1 +1 @@ -*,::before,::after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x:var(--un-empty,/*!*/ /*!*/);--un-pan-y:var(--un-empty,/*!*/ /*!*/);--un-pinch-zoom:var(--un-empty,/*!*/ /*!*/);--un-scroll-snap-strictness:proximity;--un-ordinal:var(--un-empty,/*!*/ /*!*/);--un-slashed-zero:var(--un-empty,/*!*/ /*!*/);--un-numeric-figure:var(--un-empty,/*!*/ /*!*/);--un-numeric-spacing:var(--un-empty,/*!*/ /*!*/);--un-numeric-fraction:var(--un-empty,/*!*/ /*!*/);--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 #0000;--un-ring-shadow:0 0 #0000;--un-shadow-inset:var(--un-empty,/*!*/ /*!*/);--un-shadow:0 0 #0000;--un-ring-inset:var(--un-empty,/*!*/ /*!*/);--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,0.5);--un-blur:var(--un-empty,/*!*/ /*!*/);--un-brightness:var(--un-empty,/*!*/ /*!*/);--un-contrast:var(--un-empty,/*!*/ /*!*/);--un-drop-shadow:var(--un-empty,/*!*/ /*!*/);--un-grayscale:var(--un-empty,/*!*/ /*!*/);--un-hue-rotate:var(--un-empty,/*!*/ /*!*/);--un-invert:var(--un-empty,/*!*/ /*!*/);--un-saturate:var(--un-empty,/*!*/ /*!*/);--un-sepia:var(--un-empty,/*!*/ /*!*/);--un-backdrop-blur:var(--un-empty,/*!*/ /*!*/);--un-backdrop-brightness:var(--un-empty,/*!*/ /*!*/);--un-backdrop-contrast:var(--un-empty,/*!*/ /*!*/);--un-backdrop-grayscale:var(--un-empty,/*!*/ /*!*/);--un-backdrop-hue-rotate:var(--un-empty,/*!*/ /*!*/);--un-backdrop-invert:var(--un-empty,/*!*/ /*!*/);--un-backdrop-opacity:var(--un-empty,/*!*/ /*!*/);--un-backdrop-saturate:var(--un-empty,/*!*/ /*!*/);--un-backdrop-sepia:var(--un-empty,/*!*/ /*!*/);}@font-face { font-family: 'Fira Code'; font-style: normal; font-weight: 400; font-display: swap; src: url(https://fonts.gstatic.com/s/firacode/v21/uU9eCBsR6Z2vfE9aq3bL0fxyUs4tcw4W_D1sFVc.ttf) format('truetype');}@font-face { font-family: 'Fira Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(https://fonts.gstatic.com/s/firamono/v14/N0bX2SlFPv1weGeLZDtQIQ.ttf) format('truetype');}@font-face { font-family: 'Fira Mono'; font-style: normal; font-weight: 700; font-display: swap; src: url(https://fonts.gstatic.com/s/firamono/v14/N0bS2SlFPv1weGeLZDtondv3mQ.ttf) format('truetype');}@font-face { font-family: 'Rubik'; font-style: normal; font-weight: 400; font-display: swap; src: url(https://fonts.gstatic.com/s/rubik/v26/iJWZBXyIfDnIV5PNhY1KTN7Z-Yh-B4i1UA.ttf) format('truetype');}.i-codicon-clear-all{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='m10 12.6l.7.7l1.6-1.6l1.6 1.6l.8-.7L13 11l1.7-1.6l-.8-.8l-1.6 1.7l-1.6-1.7l-.7.8l1.6 1.6l-1.6 1.6zM1 4h14V3H1v1zm0 3h14V6H1v1zm8 2.5V9H1v1h8v-.5zM9 13v-1H1v1h8z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-close{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='m8 8.707l3.646 3.647l.708-.707L8.707 8l3.647-3.646l-.707-.708L8 7.293L4.354 3.646l-.707.708L7.293 8l-3.646 3.646l.707.708L8 8.707z' clip-rule='evenodd'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-link-external{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='currentColor'%3E%3Cpath d='M1.5 1H6v1H2v12h12v-4h1v4.5l-.5.5h-13l-.5-.5v-13l.5-.5z'/%3E%3Cpath d='M15 1.5V8h-1V2.707L7.243 9.465l-.707-.708L13.293 2H8V1h6.5l.5.5z'/%3E%3C/g%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-menu{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M16 5H0V4h16v1zm0 8H0v-1h16v1zm0-4.008H0V8h16v.992z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-radio-tower{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M2.998 5.58a5.55 5.55 0 0 1 1.62-3.88l-.71-.7a6.45 6.45 0 0 0 0 9.16l.71-.7a5.55 5.55 0 0 1-1.62-3.88zm1.06 0a4.42 4.42 0 0 0 1.32 3.17l.71-.71a3.27 3.27 0 0 1-.76-1.12a3.45 3.45 0 0 1 0-2.67a3.22 3.22 0 0 1 .76-1.13l-.71-.71a4.46 4.46 0 0 0-1.32 3.17zm7.65 3.21l-.71-.71c.33-.32.59-.704.76-1.13a3.449 3.449 0 0 0 0-2.67a3.22 3.22 0 0 0-.76-1.13l.71-.7a4.468 4.468 0 0 1 0 6.34zM13.068 1l-.71.71a5.43 5.43 0 0 1 0 7.74l.71.71a6.45 6.45 0 0 0 0-9.16zM9.993 5.43a1.5 1.5 0 0 1-.245.98a2 2 0 0 1-.27.23l3.44 7.73l-.92.4l-.77-1.73h-5.54l-.77 1.73l-.92-.4l3.44-7.73a1.52 1.52 0 0 1-.33-1.63a1.55 1.55 0 0 1 .56-.68a1.5 1.5 0 0 1 2.325 1.1zm-1.595-.34a.52.52 0 0 0-.25.14a.52.52 0 0 0-.11.22a.48.48 0 0 0 0 .29c.04.09.102.17.18.23a.54.54 0 0 0 .28.08a.51.51 0 0 0 .5-.5a.54.54 0 0 0-.08-.28a.58.58 0 0 0-.23-.18a.48.48 0 0 0-.29 0zm.23 2.05h-.27l-.87 1.94h2l-.86-1.94zm2.2 4.94l-.89-2h-2.88l-.89 2h4.66z' clip-rule='evenodd'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-ph-broadcast{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M128 88a40 40 0 1 0 40 40a40 40 0 0 0-40-40Zm0 64a24 24 0 1 1 24-24a24.1 24.1 0 0 1-24 24Zm-59-48.9a64.5 64.5 0 0 0 0 49.8a65.4 65.4 0 0 0 13.7 20.4a7.9 7.9 0 0 1 0 11.3a8 8 0 0 1-5.6 2.3a8.3 8.3 0 0 1-5.7-2.3a80 80 0 0 1-17.1-25.5a79.9 79.9 0 0 1 0-62.2a80 80 0 0 1 17.1-25.5a8 8 0 0 1 11.3 0a7.9 7.9 0 0 1 0 11.3A65.4 65.4 0 0 0 69 103.1Zm132.7 56a80 80 0 0 1-17.1 25.5a8.3 8.3 0 0 1-5.7 2.3a8 8 0 0 1-5.6-2.3a7.9 7.9 0 0 1 0-11.3a65.4 65.4 0 0 0 13.7-20.4a64.5 64.5 0 0 0 0-49.8a65.4 65.4 0 0 0-13.7-20.4a7.9 7.9 0 0 1 0-11.3a8 8 0 0 1 11.3 0a80 80 0 0 1 17.1 25.5a79.9 79.9 0 0 1 0 62.2ZM54.5 201.5a8.1 8.1 0 0 1 0 11.4a8.3 8.3 0 0 1-5.7 2.3a8.5 8.5 0 0 1-5.7-2.3a121.8 121.8 0 0 1-25.7-38.2a120.7 120.7 0 0 1 0-93.4a121.8 121.8 0 0 1 25.7-38.2a8.1 8.1 0 0 1 11.4 11.4A103.5 103.5 0 0 0 24 128a103.5 103.5 0 0 0 30.5 73.5ZM248 128a120.2 120.2 0 0 1-9.4 46.7a121.8 121.8 0 0 1-25.7 38.2a8.5 8.5 0 0 1-5.7 2.3a8.3 8.3 0 0 1-5.7-2.3a8.1 8.1 0 0 1 0-11.4A103.5 103.5 0 0 0 232 128a103.5 103.5 0 0 0-30.5-73.5a8.1 8.1 0 1 1 11.4-11.4a121.8 121.8 0 0 1 25.7 38.2A120.2 120.2 0 0 1 248 128Z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-ph-hand-waving{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='m220.2 104l-20-34.7a28.1 28.1 0 0 0-47.3-1.9l-17.3-30a28.1 28.1 0 0 0-38.3-10.3a29.4 29.4 0 0 0-9.9 9.6a27.9 27.9 0 0 0-11.5-6.2a27.2 27.2 0 0 0-21.2 2.8a27.9 27.9 0 0 0-10.3 38.2l3.4 5.8A28.5 28.5 0 0 0 36 81a28.1 28.1 0 0 0-10.2 38.2l42 72.8a88 88 0 1 0 152.4-88Zm-6.7 62.6a71.2 71.2 0 0 1-33.5 43.7A72.1 72.1 0 0 1 81.6 184l-42-72.8a12 12 0 0 1 20.8-12l22 38.1l.6.9v.2l.5.5l.2.2l.7.6h.1l.7.5h.3l.6.3h.2l.9.3h.1l.8.2h2.2l.9-.2h.3l.6-.2h.3l.9-.4a8.1 8.1 0 0 0 2.9-11l-22-38.1l-16-27.7a12 12 0 0 1-1.2-9.1a11.8 11.8 0 0 1 5.6-7.3a12 12 0 0 1 9.1-1.2a12.5 12.5 0 0 1 7.3 5.6l8 14h.1l26 45a7 7 0 0 0 1.5 1.9a8 8 0 0 0 12.3-9.9l-26-45a12 12 0 1 1 20.8-12l30 51.9l6.3 11a48.1 48.1 0 0 0-10.9 61a8 8 0 0 0 13.8-8a32 32 0 0 1 11.7-43.7l.7-.4l.5-.4h.1l.6-.6l.5-.5l.4-.5l.3-.6h.1l.2-.5v-.2a1.9 1.9 0 0 0 .2-.7h.1c0-.2.1-.4.1-.6s0-.2.1-.2v-2.1a6.4 6.4 0 0 0-.2-.7a1.9 1.9 0 0 0-.2-.7v-.2c0-.2-.1-.3-.2-.5l-.3-.7l-10-17.4a12 12 0 0 1 13.5-17.5a11.8 11.8 0 0 1 7.2 5.5l20 34.7a70.9 70.9 0 0 1 7.2 53.8Zm-125.8 78a8.2 8.2 0 0 1-6.6 3.4a8.6 8.6 0 0 1-4.6-1.4A117.9 117.9 0 0 1 41.1 208a8 8 0 1 1 13.8-8a102.6 102.6 0 0 0 30.8 33.4a8.1 8.1 0 0 1 2 11.2ZM168 31a8 8 0 0 1 8-8a60.2 60.2 0 0 1 52 30a7.9 7.9 0 0 1-3 10.9a7.1 7.1 0 0 1-4 1.1a8 8 0 0 1-6.9-4A44 44 0 0 0 176 39a8 8 0 0 1-8-8Z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-ph-moon{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M224.3 150.3a8.1 8.1 0 0 0-7.8-5.7l-2.2.4A84 84 0 0 1 111 41.6a5.7 5.7 0 0 0 .3-1.8a7.9 7.9 0 0 0-10.3-8.1a100 100 0 1 0 123.3 123.2a7.2 7.2 0 0 0 0-4.6ZM128 212A84 84 0 0 1 92.8 51.7a99.9 99.9 0 0 0 111.5 111.5A84.4 84.4 0 0 1 128 212Z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-ph-sun{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M128 60a68 68 0 1 0 68 68a68.1 68.1 0 0 0-68-68Zm0 120a52 52 0 1 1 52-52a52 52 0 0 1-52 52Zm-8-144V16a8 8 0 0 1 16 0v20a8 8 0 0 1-16 0ZM43.1 54.5a8.1 8.1 0 1 1 11.4-11.4l14.1 14.2a8 8 0 0 1 0 11.3a8.1 8.1 0 0 1-11.3 0ZM36 136H16a8 8 0 0 1 0-16h20a8 8 0 0 1 0 16Zm32.6 51.4a8 8 0 0 1 0 11.3l-14.1 14.2a8.3 8.3 0 0 1-5.7 2.3a8.5 8.5 0 0 1-5.7-2.3a8.1 8.1 0 0 1 0-11.4l14.2-14.1a8 8 0 0 1 11.3 0ZM136 220v20a8 8 0 0 1-16 0v-20a8 8 0 0 1 16 0Zm76.9-18.5a8.1 8.1 0 0 1 0 11.4a8.5 8.5 0 0 1-5.7 2.3a8.3 8.3 0 0 1-5.7-2.3l-14.1-14.2a8 8 0 0 1 11.3-11.3ZM248 128a8 8 0 0 1-8 8h-20a8 8 0 0 1 0-16h20a8 8 0 0 1 8 8Zm-60.6-59.4a8 8 0 0 1 0-11.3l14.1-14.2a8.1 8.1 0 0 1 11.4 11.4l-14.2 14.1a8.1 8.1 0 0 1-11.3 0Z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.note-red{position:relative;display:inline-flex;align-items:center;border-left-width:4px;border-left-style:solid;--un-border-opacity:1;border-color:rgba(53,120,229,var(--un-border-opacity));border-radius:0.25rem;background-color:rgba(53,120,229,0.1);background-color:rgba(185,28,28,0.1);padding:0.5rem;text-decoration:none;}.nv{position:relative;display:flex;align-items:center;border-radius:0.25rem;padding:0.5rem;--un-text-opacity:1;color:rgba(194,197,202,var(--un-text-opacity));text-decoration:none;transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:125ms;}.nv_selected{position:relative;display:flex;align-items:center;border-left-width:4px;border-left-style:solid;border-radius:0.25rem;--un-bg-opacity:.05;background-color:hsla(0,0%,100%,var(--un-bg-opacity));padding:0.5rem;--un-text-opacity:1;color:rgba(194,197,202,var(--un-text-opacity));color:rgba(53,120,229,var(--un-text-opacity));text-decoration:none;transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:125ms;}.input{height:2.5rem;display:flex;align-items:center;border-radius:0.25rem;border-style:none;--un-bg-opacity:1;background-color:rgba(233,236,239,var(--un-bg-opacity));padding:0.5rem;--un-text-opacity:1;color:rgba(28,30,33,var(--un-text-opacity));--un-shadow:var(--un-shadow-inset) 0 4px 6px -1px var(--un-shadow-color, rgba(0,0,0,0.1)),var(--un-shadow-inset) 0 2px 4px -2px var(--un-shadow-color, rgba(0,0,0,0.1));box-shadow:var(--un-ring-offset-shadow, 0 0 #0000), var(--un-ring-shadow, 0 0 #0000), var(--un-shadow);outline:2px solid transparent;outline-offset:2px;}.btn{user-select:none;border-radius:0.25rem;border-style:none;--un-bg-opacity:1;background-color:rgba(53,120,229,var(--un-bg-opacity));padding:0.5rem;font-weight:400;--un-text-opacity:1;color:rgba(28,30,33,var(--un-text-opacity));color:rgba(255,255,255,var(--un-text-opacity));--un-shadow:var(--un-shadow-inset) 0 4px 6px -1px var(--un-shadow-color, rgba(0,0,0,0.1)),var(--un-shadow-inset) 0 2px 4px -2px var(--un-shadow-color, rgba(0,0,0,0.1));box-shadow:var(--un-ring-offset-shadow, 0 0 #0000), var(--un-ring-shadow, 0 0 #0000), var(--un-shadow);outline:2px solid transparent;outline-offset:2px;}.nv_selected:hover,.nv:hover{border-left-width:4px;border-left-style:solid;--un-bg-opacity:.05;background-color:hsla(0,0%,100%,var(--un-bg-opacity));--un-text-opacity:1;color:rgba(53,120,229,var(--un-text-opacity));}.dark .note-red{--un-border-opacity:1;border-color:rgba(103,214,237,var(--un-border-opacity));background-color:rgba(103,214,237,0.1);background-color:rgba(185,28,28,0.1);}.btn:hover{--un-bg-opacity:1;background-color:rgba(45,102,195,var(--un-bg-opacity));}.dark .btn{--un-bg-opacity:1;background-color:rgba(103,214,237,var(--un-bg-opacity));font-weight:600;--un-text-opacity:1;color:rgba(28,30,33,var(--un-text-opacity));}.dark .btn:hover{--un-bg-opacity:1;background-color:rgba(57,202,232,var(--un-bg-opacity));}.dark .input{--un-bg-opacity:1;background-color:rgba(36,37,38,var(--un-bg-opacity));--un-text-opacity:1;color:rgba(227,227,227,var(--un-text-opacity));}.dark .note-red::after,.note-red::after{--un-bg-opacity:1;background-color:rgba(185,28,28,var(--un-bg-opacity));}.btn:active{--un-bg-opacity:1;background-color:rgba(37,84,160,var(--un-bg-opacity));}.dark .btn:active{--un-bg-opacity:1;background-color:rgba(25,181,213,var(--un-bg-opacity));}.dark .nv_selected,.dark .nv_selected:hover,.dark .nv:hover{--un-text-opacity:1;color:rgba(103,214,237,var(--un-text-opacity));} ::-webkit-scrollbar-thumb { background-color: #3578E5; } .dark ::-webkit-scrollbar-thumb { background-color: #67d6ed; } code { font-size: 0.75rem; font-family: "Fira Code","Fira Mono",ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace; border-radius: 0.25rem; background-color: #d6d8da; } .code-block { font-family: "Fira Code","Fira Mono",ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace; font-size: 0.875rem; } .dark code { background-color: #282a2e; } .visible{visibility:visible;}.absolute{position:absolute;}.left-2{left:0.5rem;}.top-2{top:0.5rem;}.z-2000{z-index:2000;}.grid{display:grid;}.grid-rows-\[2fr_auto\]{grid-template-rows:2fr auto;}.grid-rows-\[2px_2rem_1fr\]{grid-template-rows:2px 2rem 1fr;}.grid-rows-\[auto_1fr\]{grid-template-rows:auto 1fr;}.mr-2{margin-right:0.5rem;}.display-none{display:none;}.children-h-10>*{height:2.5rem;}.h-15rem{height:15rem;}.h-2px{height:2px;}.h-8{height:2rem;}.h-85\%{height:85%;}.h-screen{height:100vh;}.w-8{width:2rem;}.w-screen{width:100vw;}.flex{display:flex;}.flex-1{flex:1 1 0%;}.children-flex-none>*{flex:none;}.grow{flex-grow:1;}.flex-col{flex-direction:column;}@keyframes fade-in{from{opacity:0}to{opacity:1}}.animate-fade-in{animation:fade-in 1s linear 1;}.animate-duration-300ms{animation-duration:300ms;}.cursor-ns-resize{cursor:ns-resize;}.cursor-pointer{cursor:pointer;}.select-none{user-select:none;}.items-center{align-items:center;}.self-center{align-self:center;}.justify-center{justify-content:center;}.justify-between{justify-content:space-between;}.gap-1{grid-gap:0.25rem;gap:0.25rem;}.gap-2{grid-gap:0.5rem;gap:0.5rem;}.overflow-hidden{overflow:hidden;}.overflow-y-auto{overflow-y:auto;}.rd-1{border-radius:0.25rem;}.rd-8{border-radius:2rem;}.bg-accent{--un-bg-opacity:1;background-color:rgba(53,120,229,var(--un-bg-opacity));}.bg-black\/20{background-color:rgba(0,0,0,0.2);}.bg-darkPrimaryLighter{--un-bg-opacity:1;background-color:rgba(36,37,38,var(--un-bg-opacity));}.bg-primary{--un-bg-opacity:1;background-color:rgba(255,255,255,var(--un-bg-opacity));}.bg-white\/5{background-color:rgba(255,255,255,0.05);}.dark .dark\:bg-darkAccent{--un-bg-opacity:1;background-color:rgba(103,214,237,var(--un-bg-opacity));}.dark .dark\:bg-darkPrimary{--un-bg-opacity:1;background-color:rgba(27,27,29,var(--un-bg-opacity));}.dark .dark\:hover\:bg-darkHoverOverlay:hover{--un-bg-opacity:.05;background-color:hsla(0,0%,100%,var(--un-bg-opacity));}.hover\:bg-hoverOverlay:hover{--un-bg-opacity:.05;background-color:rgba(0,0,0,var(--un-bg-opacity));}.active\:bg-accentDark:active{--un-bg-opacity:1;background-color:rgba(48,108,206,var(--un-bg-opacity));}.active\:bg-hoverOverlay\/25:active{background-color:rgba(0,0,0,0.25);}.dark .dark\:active\:bg-darkAccentDark:active{--un-bg-opacity:1;background-color:rgba(73,206,233,var(--un-bg-opacity));}.dark .dark\:active\:bg-darkHoverOverlay\/25:active{background-color:hsla(0,0%,100%,0.25);}.p-1{padding:0.25rem;}.p-7{padding:1.75rem;}.px{padding-left:1rem;padding-right:1rem;}.px-2{padding-left:0.5rem;padding-right:0.5rem;}.px-5{padding-left:1.25rem;padding-right:1.25rem;}.children-pb-2>*{padding-bottom:0.5rem;}.children-pt8>*{padding-top:2rem;}.all\:font-mono *{font-family:"Fira Code","Fira Mono",ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;}.all\:text-xs *{font-size:0.75rem;line-height:1rem;}.font-semibold{font-weight:600;}.dark .dark\:text-darkAccent{--un-text-opacity:1;color:rgba(103,214,237,var(--un-text-opacity));}.dark .dark\:text-darkPrimaryText{--un-text-opacity:1;color:rgba(227,227,227,var(--un-text-opacity));}.text-accent{--un-text-opacity:1;color:rgba(53,120,229,var(--un-text-opacity));}.text-primaryText{--un-text-opacity:1;color:rgba(28,30,33,var(--un-text-opacity));}.transition-colors-250{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:250ms;}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;}@media (max-width: 639.9px){.lt-sm\:absolute{position:absolute;}.lt-sm\:z-1999{z-index:1999;}.lt-sm\:h-screen{height:100vh;}.lt-sm\:flex{display:flex;}.lt-sm\:shadow{--un-shadow:var(--un-shadow-inset) 0 1px 3px 0 var(--un-shadow-color, rgba(0,0,0,0.1)),var(--un-shadow-inset) 0 1px 2px -1px var(--un-shadow-color, rgba(0,0,0,0.1));box-shadow:var(--un-ring-offset-shadow, 0 0 #0000), var(--un-ring-shadow, 0 0 #0000), var(--un-shadow);}.lt-sm\:shadow-lg{--un-shadow:var(--un-shadow-inset) 0 10px 15px -3px var(--un-shadow-color, rgba(0,0,0,0.1)),var(--un-shadow-inset) 0 4px 6px -4px var(--un-shadow-color, rgba(0,0,0,0.1));box-shadow:var(--un-ring-offset-shadow, 0 0 #0000), var(--un-ring-shadow, 0 0 #0000), var(--un-shadow);}.lt-sm\:transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;}}*:not(h1,h2,h3,h4,h5,h6){margin:0;padding:0}*{box-sizing:border-box;font-family:Rubik,sans-serif}::-webkit-scrollbar{width:.25rem;height:3px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{border-radius:.25rem}code{padding:.05rem .25rem}code.code-block{padding:.5rem}#sidebar{width:18.75rem}@media screen and (max-width: 640px){#sidebar{--translate-x: -18.75rem;transform:translate(var(--translate-x))}} +*,::before,::after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x:var(--un-empty,/*!*/ /*!*/);--un-pan-y:var(--un-empty,/*!*/ /*!*/);--un-pinch-zoom:var(--un-empty,/*!*/ /*!*/);--un-scroll-snap-strictness:proximity;--un-ordinal:var(--un-empty,/*!*/ /*!*/);--un-slashed-zero:var(--un-empty,/*!*/ /*!*/);--un-numeric-figure:var(--un-empty,/*!*/ /*!*/);--un-numeric-spacing:var(--un-empty,/*!*/ /*!*/);--un-numeric-fraction:var(--un-empty,/*!*/ /*!*/);--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 #0000;--un-ring-shadow:0 0 #0000;--un-shadow-inset:var(--un-empty,/*!*/ /*!*/);--un-shadow:0 0 #0000;--un-ring-inset:var(--un-empty,/*!*/ /*!*/);--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,0.5);--un-blur:var(--un-empty,/*!*/ /*!*/);--un-brightness:var(--un-empty,/*!*/ /*!*/);--un-contrast:var(--un-empty,/*!*/ /*!*/);--un-drop-shadow:var(--un-empty,/*!*/ /*!*/);--un-grayscale:var(--un-empty,/*!*/ /*!*/);--un-hue-rotate:var(--un-empty,/*!*/ /*!*/);--un-invert:var(--un-empty,/*!*/ /*!*/);--un-saturate:var(--un-empty,/*!*/ /*!*/);--un-sepia:var(--un-empty,/*!*/ /*!*/);--un-backdrop-blur:var(--un-empty,/*!*/ /*!*/);--un-backdrop-brightness:var(--un-empty,/*!*/ /*!*/);--un-backdrop-contrast:var(--un-empty,/*!*/ /*!*/);--un-backdrop-grayscale:var(--un-empty,/*!*/ /*!*/);--un-backdrop-hue-rotate:var(--un-empty,/*!*/ /*!*/);--un-backdrop-invert:var(--un-empty,/*!*/ /*!*/);--un-backdrop-opacity:var(--un-empty,/*!*/ /*!*/);--un-backdrop-saturate:var(--un-empty,/*!*/ /*!*/);--un-backdrop-sepia:var(--un-empty,/*!*/ /*!*/);}@font-face { font-family: 'Fira Code'; font-style: normal; font-weight: 400; font-display: swap; src: url(https://fonts.gstatic.com/s/firacode/v21/uU9eCBsR6Z2vfE9aq3bL0fxyUs4tcw4W_D1sFVc.ttf) format('truetype');}@font-face { font-family: 'Fira Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(https://fonts.gstatic.com/s/firamono/v14/N0bX2SlFPv1weGeLZDtQIQ.ttf) format('truetype');}@font-face { font-family: 'Fira Mono'; font-style: normal; font-weight: 700; font-display: swap; src: url(https://fonts.gstatic.com/s/firamono/v14/N0bS2SlFPv1weGeLZDtondv3mQ.ttf) format('truetype');}@font-face { font-family: 'Rubik'; font-style: normal; font-weight: 400; font-display: swap; src: url(https://fonts.gstatic.com/s/rubik/v26/iJWZBXyIfDnIV5PNhY1KTN7Z-Yh-B4i1UA.ttf) format('truetype');}.i-codicon-clear-all{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='m10 12.6l.7.7l1.6-1.6l1.6 1.6l.8-.7L13 11l1.7-1.6l-.8-.8l-1.6 1.7l-1.6-1.7l-.7.8l1.6 1.6l-1.6 1.6zM1 4h14V3H1v1zm0 3h14V6H1v1zm8 2.5V9H1v1h8v-.5zM9 13v-1H1v1h8z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-close{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='m8 8.707l3.646 3.647l.708-.707L8.707 8l3.647-3.646l-.707-.708L8 7.293L4.354 3.646l-.707.708L7.293 8l-3.646 3.646l.707.708L8 8.707z' clip-rule='evenodd'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-link-external{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='currentColor'%3E%3Cpath d='M1.5 1H6v1H2v12h12v-4h1v4.5l-.5.5h-13l-.5-.5v-13l.5-.5z'/%3E%3Cpath d='M15 1.5V8h-1V2.707L7.243 9.465l-.707-.708L13.293 2H8V1h6.5l.5.5z'/%3E%3C/g%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-menu{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M16 5H0V4h16v1zm0 8H0v-1h16v1zm0-4.008H0V8h16v.992z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-radio-tower{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M2.998 5.58a5.55 5.55 0 0 1 1.62-3.88l-.71-.7a6.45 6.45 0 0 0 0 9.16l.71-.7a5.55 5.55 0 0 1-1.62-3.88zm1.06 0a4.42 4.42 0 0 0 1.32 3.17l.71-.71a3.27 3.27 0 0 1-.76-1.12a3.45 3.45 0 0 1 0-2.67a3.22 3.22 0 0 1 .76-1.13l-.71-.71a4.46 4.46 0 0 0-1.32 3.17zm7.65 3.21l-.71-.71c.33-.32.59-.704.76-1.13a3.449 3.449 0 0 0 0-2.67a3.22 3.22 0 0 0-.76-1.13l.71-.7a4.468 4.468 0 0 1 0 6.34zM13.068 1l-.71.71a5.43 5.43 0 0 1 0 7.74l.71.71a6.45 6.45 0 0 0 0-9.16zM9.993 5.43a1.5 1.5 0 0 1-.245.98a2 2 0 0 1-.27.23l3.44 7.73l-.92.4l-.77-1.73h-5.54l-.77 1.73l-.92-.4l3.44-7.73a1.52 1.52 0 0 1-.33-1.63a1.55 1.55 0 0 1 .56-.68a1.5 1.5 0 0 1 2.325 1.1zm-1.595-.34a.52.52 0 0 0-.25.14a.52.52 0 0 0-.11.22a.48.48 0 0 0 0 .29c.04.09.102.17.18.23a.54.54 0 0 0 .28.08a.51.51 0 0 0 .5-.5a.54.54 0 0 0-.08-.28a.58.58 0 0 0-.23-.18a.48.48 0 0 0-.29 0zm.23 2.05h-.27l-.87 1.94h2l-.86-1.94zm2.2 4.94l-.89-2h-2.88l-.89 2h4.66z' clip-rule='evenodd'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-ph-broadcast{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M128 88a40 40 0 1 0 40 40a40 40 0 0 0-40-40Zm0 64a24 24 0 1 1 24-24a24.1 24.1 0 0 1-24 24Zm-59-48.9a64.5 64.5 0 0 0 0 49.8a65.4 65.4 0 0 0 13.7 20.4a7.9 7.9 0 0 1 0 11.3a8 8 0 0 1-5.6 2.3a8.3 8.3 0 0 1-5.7-2.3a80 80 0 0 1-17.1-25.5a79.9 79.9 0 0 1 0-62.2a80 80 0 0 1 17.1-25.5a8 8 0 0 1 11.3 0a7.9 7.9 0 0 1 0 11.3A65.4 65.4 0 0 0 69 103.1Zm132.7 56a80 80 0 0 1-17.1 25.5a8.3 8.3 0 0 1-5.7 2.3a8 8 0 0 1-5.6-2.3a7.9 7.9 0 0 1 0-11.3a65.4 65.4 0 0 0 13.7-20.4a64.5 64.5 0 0 0 0-49.8a65.4 65.4 0 0 0-13.7-20.4a7.9 7.9 0 0 1 0-11.3a8 8 0 0 1 11.3 0a80 80 0 0 1 17.1 25.5a79.9 79.9 0 0 1 0 62.2ZM54.5 201.5a8.1 8.1 0 0 1 0 11.4a8.3 8.3 0 0 1-5.7 2.3a8.5 8.5 0 0 1-5.7-2.3a121.8 121.8 0 0 1-25.7-38.2a120.7 120.7 0 0 1 0-93.4a121.8 121.8 0 0 1 25.7-38.2a8.1 8.1 0 0 1 11.4 11.4A103.5 103.5 0 0 0 24 128a103.5 103.5 0 0 0 30.5 73.5ZM248 128a120.2 120.2 0 0 1-9.4 46.7a121.8 121.8 0 0 1-25.7 38.2a8.5 8.5 0 0 1-5.7 2.3a8.3 8.3 0 0 1-5.7-2.3a8.1 8.1 0 0 1 0-11.4A103.5 103.5 0 0 0 232 128a103.5 103.5 0 0 0-30.5-73.5a8.1 8.1 0 1 1 11.4-11.4a121.8 121.8 0 0 1 25.7 38.2A120.2 120.2 0 0 1 248 128Z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-ph-hand-waving{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='m220.2 104l-20-34.7a28.1 28.1 0 0 0-47.3-1.9l-17.3-30a28.1 28.1 0 0 0-38.3-10.3a29.4 29.4 0 0 0-9.9 9.6a27.9 27.9 0 0 0-11.5-6.2a27.2 27.2 0 0 0-21.2 2.8a27.9 27.9 0 0 0-10.3 38.2l3.4 5.8A28.5 28.5 0 0 0 36 81a28.1 28.1 0 0 0-10.2 38.2l42 72.8a88 88 0 1 0 152.4-88Zm-6.7 62.6a71.2 71.2 0 0 1-33.5 43.7A72.1 72.1 0 0 1 81.6 184l-42-72.8a12 12 0 0 1 20.8-12l22 38.1l.6.9v.2l.5.5l.2.2l.7.6h.1l.7.5h.3l.6.3h.2l.9.3h.1l.8.2h2.2l.9-.2h.3l.6-.2h.3l.9-.4a8.1 8.1 0 0 0 2.9-11l-22-38.1l-16-27.7a12 12 0 0 1-1.2-9.1a11.8 11.8 0 0 1 5.6-7.3a12 12 0 0 1 9.1-1.2a12.5 12.5 0 0 1 7.3 5.6l8 14h.1l26 45a7 7 0 0 0 1.5 1.9a8 8 0 0 0 12.3-9.9l-26-45a12 12 0 1 1 20.8-12l30 51.9l6.3 11a48.1 48.1 0 0 0-10.9 61a8 8 0 0 0 13.8-8a32 32 0 0 1 11.7-43.7l.7-.4l.5-.4h.1l.6-.6l.5-.5l.4-.5l.3-.6h.1l.2-.5v-.2a1.9 1.9 0 0 0 .2-.7h.1c0-.2.1-.4.1-.6s0-.2.1-.2v-2.1a6.4 6.4 0 0 0-.2-.7a1.9 1.9 0 0 0-.2-.7v-.2c0-.2-.1-.3-.2-.5l-.3-.7l-10-17.4a12 12 0 0 1 13.5-17.5a11.8 11.8 0 0 1 7.2 5.5l20 34.7a70.9 70.9 0 0 1 7.2 53.8Zm-125.8 78a8.2 8.2 0 0 1-6.6 3.4a8.6 8.6 0 0 1-4.6-1.4A117.9 117.9 0 0 1 41.1 208a8 8 0 1 1 13.8-8a102.6 102.6 0 0 0 30.8 33.4a8.1 8.1 0 0 1 2 11.2ZM168 31a8 8 0 0 1 8-8a60.2 60.2 0 0 1 52 30a7.9 7.9 0 0 1-3 10.9a7.1 7.1 0 0 1-4 1.1a8 8 0 0 1-6.9-4A44 44 0 0 0 176 39a8 8 0 0 1-8-8Z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-ph-moon{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M224.3 150.3a8.1 8.1 0 0 0-7.8-5.7l-2.2.4A84 84 0 0 1 111 41.6a5.7 5.7 0 0 0 .3-1.8a7.9 7.9 0 0 0-10.3-8.1a100 100 0 1 0 123.3 123.2a7.2 7.2 0 0 0 0-4.6ZM128 212A84 84 0 0 1 92.8 51.7a99.9 99.9 0 0 0 111.5 111.5A84.4 84.4 0 0 1 128 212Z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-ph-sun{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M128 60a68 68 0 1 0 68 68a68.1 68.1 0 0 0-68-68Zm0 120a52 52 0 1 1 52-52a52 52 0 0 1-52 52Zm-8-144V16a8 8 0 0 1 16 0v20a8 8 0 0 1-16 0ZM43.1 54.5a8.1 8.1 0 1 1 11.4-11.4l14.1 14.2a8 8 0 0 1 0 11.3a8.1 8.1 0 0 1-11.3 0ZM36 136H16a8 8 0 0 1 0-16h20a8 8 0 0 1 0 16Zm32.6 51.4a8 8 0 0 1 0 11.3l-14.1 14.2a8.3 8.3 0 0 1-5.7 2.3a8.5 8.5 0 0 1-5.7-2.3a8.1 8.1 0 0 1 0-11.4l14.2-14.1a8 8 0 0 1 11.3 0ZM136 220v20a8 8 0 0 1-16 0v-20a8 8 0 0 1 16 0Zm76.9-18.5a8.1 8.1 0 0 1 0 11.4a8.5 8.5 0 0 1-5.7 2.3a8.3 8.3 0 0 1-5.7-2.3l-14.1-14.2a8 8 0 0 1 11.3-11.3ZM248 128a8 8 0 0 1-8 8h-20a8 8 0 0 1 0-16h20a8 8 0 0 1 8 8Zm-60.6-59.4a8 8 0 0 1 0-11.3l14.1-14.2a8.1 8.1 0 0 1 11.4 11.4l-14.2 14.1a8.1 8.1 0 0 1-11.3 0Z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.note-red{position:relative;display:inline-flex;align-items:center;border-left-width:4px;border-left-style:solid;--un-border-opacity:1;border-color:rgba(53,120,229,var(--un-border-opacity));border-radius:0.25rem;background-color:rgba(53,120,229,0.1);background-color:rgba(185,28,28,0.1);padding:0.5rem;text-decoration:none;}.nv{position:relative;display:flex;align-items:center;border-radius:0.25rem;padding:0.5rem;--un-text-opacity:1;color:rgba(194,197,202,var(--un-text-opacity));text-decoration:none;transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:125ms;}.nv_selected{position:relative;display:flex;align-items:center;border-left-width:4px;border-left-style:solid;border-radius:0.25rem;--un-bg-opacity:.05;background-color:hsla(0,0%,100%,var(--un-bg-opacity));padding:0.5rem;--un-text-opacity:1;color:rgba(194,197,202,var(--un-text-opacity));color:rgba(53,120,229,var(--un-text-opacity));text-decoration:none;transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:125ms;}.input{height:2.5rem;display:flex;align-items:center;border-radius:0.25rem;border-style:none;--un-bg-opacity:1;background-color:rgba(233,236,239,var(--un-bg-opacity));padding:0.5rem;--un-text-opacity:1;color:rgba(28,30,33,var(--un-text-opacity));--un-shadow:var(--un-shadow-inset) 0 4px 6px -1px var(--un-shadow-color, rgba(0,0,0,0.1)),var(--un-shadow-inset) 0 2px 4px -2px var(--un-shadow-color, rgba(0,0,0,0.1));box-shadow:var(--un-ring-offset-shadow, 0 0 #0000), var(--un-ring-shadow, 0 0 #0000), var(--un-shadow);outline:2px solid transparent;outline-offset:2px;}.btn{user-select:none;border-radius:0.25rem;border-style:none;--un-bg-opacity:1;background-color:rgba(53,120,229,var(--un-bg-opacity));padding:0.5rem;font-weight:400;--un-text-opacity:1;color:rgba(28,30,33,var(--un-text-opacity));color:rgba(255,255,255,var(--un-text-opacity));--un-shadow:var(--un-shadow-inset) 0 4px 6px -1px var(--un-shadow-color, rgba(0,0,0,0.1)),var(--un-shadow-inset) 0 2px 4px -2px var(--un-shadow-color, rgba(0,0,0,0.1));box-shadow:var(--un-ring-offset-shadow, 0 0 #0000), var(--un-ring-shadow, 0 0 #0000), var(--un-shadow);outline:2px solid transparent;outline-offset:2px;}.nv_selected:hover,.nv:hover{border-left-width:4px;border-left-style:solid;--un-bg-opacity:.05;background-color:hsla(0,0%,100%,var(--un-bg-opacity));--un-text-opacity:1;color:rgba(53,120,229,var(--un-text-opacity));}.dark .note-red{--un-border-opacity:1;border-color:rgba(103,214,237,var(--un-border-opacity));background-color:rgba(103,214,237,0.1);background-color:rgba(185,28,28,0.1);}.btn:hover{--un-bg-opacity:1;background-color:rgba(45,102,195,var(--un-bg-opacity));}.dark .btn{--un-bg-opacity:1;background-color:rgba(103,214,237,var(--un-bg-opacity));font-weight:600;--un-text-opacity:1;color:rgba(28,30,33,var(--un-text-opacity));}.dark .btn:hover{--un-bg-opacity:1;background-color:rgba(57,202,232,var(--un-bg-opacity));}.dark .input{--un-bg-opacity:1;background-color:rgba(36,37,38,var(--un-bg-opacity));--un-text-opacity:1;color:rgba(227,227,227,var(--un-text-opacity));}.dark .note-red::after,.note-red::after{--un-bg-opacity:1;background-color:rgba(185,28,28,var(--un-bg-opacity));}.btn:active{--un-bg-opacity:1;background-color:rgba(37,84,160,var(--un-bg-opacity));}.dark .btn:active{--un-bg-opacity:1;background-color:rgba(25,181,213,var(--un-bg-opacity));}.dark .nv_selected,.dark .nv_selected:hover,.dark .nv:hover{--un-text-opacity:1;color:rgba(103,214,237,var(--un-text-opacity));} ::-webkit-scrollbar-thumb { background-color: #3578E5; } .dark ::-webkit-scrollbar-thumb { background-color: #67d6ed; } code { font-size: 0.75rem; font-family: "Fira Code","Fira Mono",ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace; border-radius: 0.25rem; background-color: #d6d8da; } .code-block { font-family: "Fira Code","Fira Mono",ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace; font-size: 0.875rem; } .dark code { background-color: #282a2e; } .visible{visibility:visible;}.absolute{position:absolute;}.left-2{left:0.5rem;}.top-2{top:0.5rem;}.z-2000{z-index:2000;}.grid{display:grid;}.grid-rows-\[2fr_auto\]{grid-template-rows:2fr auto;}.grid-rows-\[2px_2rem_1fr\]{grid-template-rows:2px 2rem 1fr;}.grid-rows-\[auto_1fr\]{grid-template-rows:auto 1fr;}.grid-rows-\[min-content_auto\]{grid-template-rows:min-content auto;}.mr-2{margin-right:0.5rem;}.display-none{display:none;}.children-h-10>*{height:2.5rem;}.h-15rem{height:15rem;}.h-2px{height:2px;}.h-8{height:2rem;}.h-85\%{height:85%;}.h-screen{height:100vh;}.w-8{width:2rem;}.w-screen{width:100vw;}.flex{display:flex;}.flex-1{flex:1 1 0%;}.children-flex-none>*{flex:none;}.grow{flex-grow:1;}.flex-col{flex-direction:column;}@keyframes fade-in{from{opacity:0}to{opacity:1}}.animate-fade-in{animation:fade-in 1s linear 1;}.animate-duration-300ms{animation-duration:300ms;}.cursor-ns-resize{cursor:ns-resize;}.cursor-pointer{cursor:pointer;}.select-none{user-select:none;}.items-center{align-items:center;}.self-center{align-self:center;}.justify-center{justify-content:center;}.justify-between{justify-content:space-between;}.gap-1{grid-gap:0.25rem;gap:0.25rem;}.gap-2{grid-gap:0.5rem;gap:0.5rem;}.overflow-hidden{overflow:hidden;}.overflow-y-auto{overflow-y:auto;}.rd-1{border-radius:0.25rem;}.rd-8{border-radius:2rem;}.bg-accent{--un-bg-opacity:1;background-color:rgba(53,120,229,var(--un-bg-opacity));}.bg-black\/20{background-color:rgba(0,0,0,0.2);}.bg-darkPrimaryLighter{--un-bg-opacity:1;background-color:rgba(36,37,38,var(--un-bg-opacity));}.bg-primary{--un-bg-opacity:1;background-color:rgba(255,255,255,var(--un-bg-opacity));}.bg-white\/5{background-color:rgba(255,255,255,0.05);}.dark .dark\:bg-darkAccent{--un-bg-opacity:1;background-color:rgba(103,214,237,var(--un-bg-opacity));}.dark .dark\:bg-darkPrimary{--un-bg-opacity:1;background-color:rgba(27,27,29,var(--un-bg-opacity));}.dark .dark\:hover\:bg-darkHoverOverlay:hover{--un-bg-opacity:.05;background-color:hsla(0,0%,100%,var(--un-bg-opacity));}.hover\:bg-hoverOverlay:hover{--un-bg-opacity:.05;background-color:rgba(0,0,0,var(--un-bg-opacity));}.active\:bg-accentDark:active{--un-bg-opacity:1;background-color:rgba(48,108,206,var(--un-bg-opacity));}.active\:bg-hoverOverlay\/25:active{background-color:rgba(0,0,0,0.25);}.dark .dark\:active\:bg-darkAccentDark:active{--un-bg-opacity:1;background-color:rgba(73,206,233,var(--un-bg-opacity));}.dark .dark\:active\:bg-darkHoverOverlay\/25:active{background-color:hsla(0,0%,100%,0.25);}.p-1{padding:0.25rem;}.p-7{padding:1.75rem;}.px{padding-left:1rem;padding-right:1rem;}.px-2{padding-left:0.5rem;padding-right:0.5rem;}.px-5{padding-left:1.25rem;padding-right:1.25rem;}.children-pb-2>*{padding-bottom:0.5rem;}.children-pt8>*{padding-top:2rem;}.all\:font-mono *{font-family:"Fira Code","Fira Mono",ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;}.all\:text-xs *{font-size:0.75rem;line-height:1rem;}.font-semibold{font-weight:600;}.dark .dark\:text-darkAccent{--un-text-opacity:1;color:rgba(103,214,237,var(--un-text-opacity));}.dark .dark\:text-darkPrimaryText{--un-text-opacity:1;color:rgba(227,227,227,var(--un-text-opacity));}.text-accent{--un-text-opacity:1;color:rgba(53,120,229,var(--un-text-opacity));}.text-primaryText{--un-text-opacity:1;color:rgba(28,30,33,var(--un-text-opacity));}.transition-colors-250{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:250ms;}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;}@media (max-width: 639.9px){.lt-sm\:absolute{position:absolute;}.lt-sm\:z-1999{z-index:1999;}.lt-sm\:h-screen{height:100vh;}.lt-sm\:flex{display:flex;}.lt-sm\:shadow{--un-shadow:var(--un-shadow-inset) 0 1px 3px 0 var(--un-shadow-color, rgba(0,0,0,0.1)),var(--un-shadow-inset) 0 1px 2px -1px var(--un-shadow-color, rgba(0,0,0,0.1));box-shadow:var(--un-ring-offset-shadow, 0 0 #0000), var(--un-ring-shadow, 0 0 #0000), var(--un-shadow);}.lt-sm\:shadow-lg{--un-shadow:var(--un-shadow-inset) 0 10px 15px -3px var(--un-shadow-color, rgba(0,0,0,0.1)),var(--un-shadow-inset) 0 4px 6px -4px var(--un-shadow-color, rgba(0,0,0,0.1));box-shadow:var(--un-ring-offset-shadow, 0 0 #0000), var(--un-ring-shadow, 0 0 #0000), var(--un-shadow);}.lt-sm\:transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;}}*:not(h1,h2,h3,h4,h5,h6){margin:0;padding:0}*{box-sizing:border-box;font-family:Rubik,sans-serif}::-webkit-scrollbar{width:.25rem;height:3px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{border-radius:.25rem}code{padding:.05rem .25rem}code.code-block{padding:.5rem}#sidebar{width:18.75rem}@media screen and (max-width: 640px){#sidebar{--translate-x: -18.75rem;transform:translate(var(--translate-x))}} diff --git a/examples/api/dist/assets/index.js b/examples/api/dist/assets/index.js index 855846251db..b3f209165e5 100644 --- a/examples/api/dist/assets/index.js +++ b/examples/api/dist/assets/index.js @@ -1,9 +1,9 @@ -(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const u of r)if(u.type==="childList")for(const m of u.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&i(m)}).observe(document,{childList:!0,subtree:!0});function n(r){const u={};return r.integrity&&(u.integrity=r.integrity),r.referrerpolicy&&(u.referrerPolicy=r.referrerpolicy),r.crossorigin==="use-credentials"?u.credentials="include":r.crossorigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function i(r){if(r.ep)return;r.ep=!0;const u=n(r);fetch(r.href,u)}})();function $(){}function ot(e){return e()}function Ge(){return Object.create(null)}function F(e){e.forEach(ot)}function gt(e){return typeof e=="function"}function me(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}let ke;function vt(e,t){return ke||(ke=document.createElement("a")),ke.href=t,e===ke.href}function bt(e){return Object.keys(e).length===0}function yt(e,...t){if(e==null)return $;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function wt(e,t,n){e.$$.on_destroy.push(yt(t,n))}function s(e,t){e.appendChild(t)}function v(e,t,n){e.insertBefore(t,n||null)}function g(e){e.parentNode.removeChild(e)}function Xe(e,t){for(let n=0;ne.removeEventListener(t,n,i)}function d(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function Et(e){return Array.from(e.childNodes)}function $t(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}class Lt{constructor(t=!1){this.is_svg=!1,this.is_svg=t,this.e=this.n=null}c(t){this.h(t)}m(t,n,i=null){this.e||(this.is_svg?this.e=kt(n.nodeName):this.e=f(n.nodeName),this.t=n,this.c(t)),this.i(i)}h(t){this.e.innerHTML=t,this.n=Array.from(this.e.childNodes)}i(t){for(let n=0;n{Le.delete(e),i&&(n&&e.d(1),i())}),e.o(t)}else i&&i()}function Ke(e){e&&e.c()}function Me(e,t,n,i){const{fragment:r,on_mount:u,on_destroy:m,after_update:l}=e.$$;r&&r.m(t,n),i||Ie(()=>{const o=u.map(ot).filter(gt);m?m.push(...o):F(o),e.$$.on_mount=[]}),l.forEach(Ie)}function Re(e,t){const n=e.$$;n.fragment!==null&&(F(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Dt(e,t){e.$$.dirty[0]===-1&&(ce.push(e),St(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<{const O=P.length?P[0]:S;return a.ctx&&r(a.ctx[y],a.ctx[y]=O)&&(!a.skip_bound&&a.bound[y]&&a.bound[y](O),E&&Dt(e,y)),S}):[],a.update(),E=!0,F(a.before_update),a.fragment=i?i(a.ctx):!1,t.target){if(t.hydrate){const y=Et(t.target);a.fragment&&a.fragment.l(y),y.forEach(g)}else a.fragment&&a.fragment.c();t.intro&&Ae(e.$$.fragment),Me(e,t.target,t.anchor,t.customElement),at()}ue(o)}class Oe{$destroy(){Re(this,1),this.$destroy=$}$on(t,n){const i=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return i.push(n),()=>{const r=i.indexOf(n);r!==-1&&i.splice(r,1)}}$set(t){this.$$set&&!bt(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const J=[];function Nt(e,t=$){let n;const i=new Set;function r(l){if(me(e,l)&&(e=l,n)){const o=!J.length;for(const a of i)a[1](),J.push(a,e);if(o){for(let a=0;a{i.delete(a),i.size===0&&(n(),n=null)}}return{set:r,update:u,subscribe:m}}function Wt(e){let t,n,i,r,u,m,l;return{c(){t=f("p"),t.innerHTML=`This is a demo of Tauri's API capabilities using the @tauri-apps/api package. It's used as the main validation app, serving as the test bed of our +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const a of r)if(a.type==="childList")for(const h of a.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&i(h)}).observe(document,{childList:!0,subtree:!0});function n(r){const a={};return r.integrity&&(a.integrity=r.integrity),r.referrerpolicy&&(a.referrerPolicy=r.referrerpolicy),r.crossorigin==="use-credentials"?a.credentials="include":r.crossorigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function i(r){if(r.ep)return;r.ep=!0;const a=n(r);fetch(r.href,a)}})();function $(){}function rt(e){return e()}function Ge(){return Object.create(null)}function F(e){e.forEach(rt)}function pt(e){return typeof e=="function"}function ue(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}let be;function gt(e,t){return be||(be=document.createElement("a")),be.href=t,e===be.href}function _t(e){return Object.keys(e).length===0}function vt(e,...t){if(e==null)return $;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function bt(e,t,n){e.$$.on_destroy.push(vt(t,n))}function o(e,t){e.appendChild(t)}function k(e,t,n){e.insertBefore(t,n||null)}function w(e){e.parentNode.removeChild(e)}function Xe(e,t){for(let n=0;ne.removeEventListener(t,n,i)}function l(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function wt(e){return Array.from(e.childNodes)}function kt(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}class Et{constructor(t=!1){this.is_svg=!1,this.is_svg=t,this.e=this.n=null}c(t){this.h(t)}m(t,n,i=null){this.e||(this.is_svg?this.e=yt(n.nodeName):this.e=f(n.nodeName),this.t=n,this.c(t)),this.i(i)}h(t){this.e.innerHTML=t,this.n=Array.from(this.e.childNodes)}i(t){for(let n=0;n{ke.delete(e),i&&(n&&e.d(1),i())}),e.o(t)}else i&&i()}function Ke(e){e&&e.c()}function Ne(e,t,n,i){const{fragment:r,on_mount:a,on_destroy:h,after_update:c}=e.$$;r&&r.m(t,n),i||We(()=>{const u=a.map(rt).filter(pt);h?h.push(...u):F(u),e.$$.on_mount=[]}),c.forEach(We)}function Ae(e,t){const n=e.$$;n.fragment!==null&&(F(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Dt(e,t){e.$$.dirty[0]===-1&&(le.push(e),xt(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<{const S=R.length?R[0]:O;return d.ctx&&r(d.ctx[v],d.ctx[v]=S)&&(!d.skip_bound&&d.bound[v]&&d.bound[v](S),E&&Dt(e,v)),O}):[],d.update(),E=!0,F(d.before_update),d.fragment=i?i(d.ctx):!1,t.target){if(t.hydrate){const v=wt(t.target);d.fragment&&d.fragment.l(v),v.forEach(w)}else d.fragment&&d.fragment.c();t.intro&&Ie(e.$$.fragment),Ne(e,t.target,t.anchor,t.customElement),ct()}ce(u)}class Oe{$destroy(){Ae(this,1),this.$destroy=$}$on(t,n){const i=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return i.push(n),()=>{const r=i.indexOf(n);r!==-1&&i.splice(r,1)}}$set(t){this.$$set&&!_t(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const J=[];function Tt(e,t=$){let n;const i=new Set;function r(c){if(ue(e,c)&&(e=c,n)){const u=!J.length;for(const d of i)d[1](),J.push(d,e);if(u){for(let d=0;d{i.delete(d),i.size===0&&(n(),n=null)}}return{set:r,update:a,subscribe:h}}function Ct(e){let t;return{c(){t=f("p"),t.innerHTML=`This is a demo of Tauri's API capabilities using the @tauri-apps/api package. It's used as the main validation app, serving as the test bed of our development process. In the future, this app will be used on Tauri's integration - tests.`,n=_(),i=f("br"),r=_(),u=f("br"),m=_(),l=f("br")},m(o,a){v(o,t,a),v(o,n,a),v(o,i,a),v(o,r,a),v(o,u,a),v(o,m,a),v(o,l,a)},p:$,i:$,o:$,d(o){o&&g(t),o&&g(n),o&&g(i),o&&g(r),o&&g(u),o&&g(m),o&&g(l)}}}class It extends Oe{constructor(t){super(),Se(this,t,null,Wt,me,{})}}var At=Object.defineProperty,ut=(e,t)=>{for(var n in t)At(e,n,{get:t[n],enumerable:!0})},dt=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Qe=(e,t,n)=>(dt(e,t,"read from private field"),n?n.call(e):t.get(e)),Mt=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Rt=(e,t,n,i)=>(dt(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),Pt={};ut(Pt,{Channel:()=>jt,convertFileSrc:()=>qt,invoke:()=>K,transformCallback:()=>fe});function Ht(){return window.crypto.getRandomValues(new Uint32Array(1))[0]}function fe(e,t=!1){let n=Ht(),i=`_${n}`;return Object.defineProperty(window,i,{value:r=>(t&&Reflect.deleteProperty(window,i),e==null?void 0:e(r)),writable:!1,configurable:!0}),n}var ae,jt=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,Mt(this,ae,()=>{}),this.id=fe(e=>{Qe(this,ae).call(this,e)})}set onmessage(e){Rt(this,ae,e)}get onmessage(){return Qe(this,ae)}toJSON(){return`__CHANNEL__:${this.id}`}};ae=new WeakMap;async function K(e,t={}){return new Promise((n,i)=>{let r=fe(m=>{n(m),Reflect.deleteProperty(window,`_${u}`)},!0),u=fe(m=>{i(m),Reflect.deleteProperty(window,`_${r}`)},!0);window.__TAURI_IPC__({cmd:e,callback:r,error:u,...t})})}function qt(e,t="asset"){let n=encodeURIComponent(e);return navigator.userAgent.includes("Windows")?`https://${t}.localhost/${n}`:`${t}://localhost/${n}`}var Ut={};ut(Ut,{TauriEvent:()=>ht,emit:()=>_t,listen:()=>pt,once:()=>Vt});async function ft(e,t){await K("plugin:event|unlisten",{event:e,eventId:t})}async function zt(e,t,n){await K("plugin:event|emit",{event:e,windowLabel:t,payload:n})}async function mt(e,t,n){return K("plugin:event|listen",{event:e,windowLabel:t,handler:fe(n)}).then(i=>async()=>ft(e,i))}async function Ft(e,t,n){return mt(e,t,i=>{n(i),ft(e,i.id).catch(()=>{})})}var ht=(e=>(e.WINDOW_RESIZED="tauri://resize",e.WINDOW_MOVED="tauri://move",e.WINDOW_CLOSE_REQUESTED="tauri://close-requested",e.WINDOW_CREATED="tauri://window-created",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_FILE_DROP="tauri://file-drop",e.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",e.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",e.MENU="tauri://menu",e))(ht||{});async function pt(e,t){return mt(e,null,t)}async function Vt(e,t){return Ft(e,null,t)}async function _t(e,t){return zt(e,void 0,t)}function Bt(e){let t,n,i,r,u,m,l,o;return{c(){t=f("div"),n=f("button"),n.textContent="Call Log API",i=_(),r=f("button"),r.textContent="Call Request (async) API",u=_(),m=f("button"),m.textContent="Send event to Rust",d(n,"class","btn"),d(n,"id","log"),d(r,"class","btn"),d(r,"id","request"),d(m,"class","btn"),d(m,"id","event")},m(a,E){v(a,t,E),s(t,n),s(t,i),s(t,r),s(t,u),s(t,m),l||(o=[z(n,"click",e[0]),z(r,"click",e[1]),z(m,"click",e[2])],l=!0)},p:$,i:$,o:$,d(a){a&&g(t),l=!1,F(o)}}}function Gt(e,t,n){let{onMessage:i}=t,r;xe(async()=>{r=await pt("rust-event",i)}),ct(()=>{r&&r()});function u(){K("log_operation",{event:"tauri-click",payload:"this payload is optional because we used Option in Rust"})}function m(){K("perform_request",{endpoint:"dummy endpoint arg",body:{id:5,name:"test"}}).then(i).catch(i)}function l(){_t("js-event","this is the payload string")}return e.$$set=o=>{"onMessage"in o&&n(3,i=o.onMessage)},[u,m,l,i]}class Xt extends Oe{constructor(t){super(),Se(this,t,Gt,Bt,me,{onMessage:3})}}function Yt(e){let t;return{c(){t=f("div"),t.innerHTML=`
Not available for Linux
- `,d(t,"class","flex flex-col gap-2")},m(n,i){v(n,t,i)},p:$,i:$,o:$,d(n){n&&g(t)}}}function Jt(e,t,n){let{onMessage:i}=t;const r=window.constraints={audio:!0,video:!0};function u(l){const o=document.querySelector("video"),a=l.getVideoTracks();i("Got stream with constraints:",r),i(`Using video device: ${a[0].label}`),window.stream=l,o.srcObject=l}function m(l){if(l.name==="ConstraintNotSatisfiedError"){const o=r.video;i(`The resolution ${o.width.exact}x${o.height.exact} px is not supported by your device.`)}else l.name==="PermissionDeniedError"&&i("Permissions have not been granted to use your camera and microphone, you need to allow the page access to your devices in order for the demo to work.");i(`getUserMedia error: ${l.name}`,l)}return xe(async()=>{try{const l=await navigator.mediaDevices.getUserMedia(r);u(l)}catch(l){m(l)}}),ct(()=>{window.stream.getTracks().forEach(function(l){l.stop()})}),e.$$set=l=>{"onMessage"in l&&n(0,i=l.onMessage)},[i]}class Kt extends Oe{constructor(t){super(),Se(this,t,Jt,Yt,me,{onMessage:0})}}function Ze(e,t,n){const i=e.slice();return i[25]=t[n],i}function et(e,t,n){const i=e.slice();return i[28]=t[n],i}function Qt(e){let t;return{c(){t=f("span"),d(t,"class","i-codicon-menu animate-duration-300ms animate-fade-in")},m(n,i){v(n,t,i)},d(n){n&&g(t)}}}function Zt(e){let t;return{c(){t=f("span"),d(t,"class","i-codicon-close animate-duration-300ms animate-fade-in")},m(n,i){v(n,t,i)},d(n){n&&g(t)}}}function en(e){let t,n;return{c(){t=Q(`Switch to Dark mode - `),n=f("div"),d(n,"class","i-ph-moon")},m(i,r){v(i,t,r),v(i,n,r)},d(i){i&&g(t),i&&g(n)}}}function tn(e){let t,n;return{c(){t=Q(`Switch to Light mode - `),n=f("div"),d(n,"class","i-ph-sun")},m(i,r){v(i,t,r),v(i,n,r)},d(i){i&&g(t),i&&g(n)}}}function nn(e){let t,n,i,r,u=e[28].label+"",m,l,o,a;function E(){return e[14](e[28])}return{c(){t=f("a"),n=f("div"),i=_(),r=f("p"),m=Q(u),d(n,"class",e[28].icon+" mr-2"),d(t,"href","##"),d(t,"class",l="nv "+(e[1]===e[28]?"nv_selected":""))},m(y,S){v(y,t,S),s(t,n),s(t,i),s(t,r),s(r,m),o||(a=z(t,"click",E),o=!0)},p(y,S){e=y,S&2&&l!==(l="nv "+(e[1]===e[28]?"nv_selected":""))&&d(t,"class",l)},d(y){y&&g(t),o=!1,a()}}}function tt(e){let t,n=e[28]&&nn(e);return{c(){n&&n.c(),t=st()},m(i,r){n&&n.m(i,r),v(i,t,r)},p(i,r){i[28]&&n.p(i,r)},d(i){n&&n.d(i),i&&g(t)}}}function nt(e){let t,n=e[25].html+"",i;return{c(){t=new Lt(!1),i=st(),t.a=i},m(r,u){t.m(n,r,u),v(r,i,u)},p(r,u){u&16&&n!==(n=r[25].html+"")&&t.p(n)},d(r){r&&g(i),r&&t.d()}}}function rn(e){let t,n,i,r,u,m,l,o,a,E,y,S,P,O,Z,W,he,w,H,C,j,V,ee,te,pe,_e,p,b,D,I,A,ne,q=e[1].label+"",Te,Pe,ge,ie,k,He,N,ve,je,B,be,qe,re,Ue,oe,se,Ce,ze;function Fe(c,T){return c[0]?Zt:Qt}let ye=Fe(e),M=ye(e);function Ve(c,T){return c[2]?tn:en}let we=Ve(e),R=we(e),G=e[5],L=[];for(let c=0;c`,he=_(),w=f("a"),w.innerHTML=`GitHub - `,H=_(),C=f("a"),C.innerHTML=`Source - `,j=_(),V=f("br"),ee=_(),te=f("div"),pe=_(),_e=f("br"),p=_(),b=f("div");for(let c=0;c',Ue=_(),oe=f("div");for(let c=0;c{Re(h,1)}),Ct()}X?(k=new X(Be(c)),Ke(k.$$.fragment),Ae(k.$$.fragment,1),Me(k,ie,null)):k=null}if(T&16){Y=c[4];let h;for(h=0;h{n(2,o=localStorage&&localStorage.getItem("theme")=="dark"),rt(o)});function a(){n(2,o=!o),rt(o)}let E=Nt([]);wt(e,E,p=>n(4,i=p));function y(p){E.update(b=>[{html:`
[${new Date().toLocaleTimeString()}]: `+(typeof p=="string"?p:JSON.stringify(p,null,1))+"
"},...b])}function S(p){E.update(b=>[{html:`
[${new Date().toLocaleTimeString()}]: `+p+"
"},...b])}function P(){E.update(()=>[])}let O,Z,W;function he(p){W=p.clientY;const b=window.getComputedStyle(O);Z=parseInt(b.height,10);const D=A=>{const ne=A.clientY-W,q=Z-ne;n(3,O.style.height=`${q{document.removeEventListener("mouseup",I),document.removeEventListener("mousemove",D)};document.addEventListener("mouseup",I),document.addEventListener("mousemove",D)}let w=!1,H,C,j=!1,V=0,ee=0;const te=(p,b,D)=>Math.min(Math.max(b,p),D);xe(()=>{n(13,H=document.querySelector("#sidebar")),C=document.querySelector("#sidebarToggle"),document.addEventListener("click",p=>{C.contains(p.target)?n(0,w=!w):w&&!H.contains(p.target)&&n(0,w=!1)}),document.addEventListener("touchstart",p=>{if(C.contains(p.target))return;const b=p.touches[0].clientX;(0{if(j){const b=p.touches[0].clientX;ee=b;const D=(b-V)/10;H.style.setProperty("--translate-x",`-${te(0,w?0-D:18.75-D,18.75)}rem`)}}),document.addEventListener("touchend",()=>{if(j){const p=(ee-V)/10;n(0,w=w?p>-(18.75/2):p>18.75/2)}j=!1})});const pe=p=>{l(p),n(0,w=!1)};function _e(p){Ne[p?"unshift":"push"](()=>{O=p,n(3,O)})}return e.$$.update=()=>{if(e.$$.dirty&1){const p=document.querySelector("#sidebar");p&&on(p,w)}},[w,m,o,O,i,u,l,a,E,y,S,P,he,H,pe,_e]}class ln extends Oe{constructor(t){super(),Se(this,t,sn,rn,me,{})}}new ln({target:document.querySelector("#app")}); + tests.`},m(n,i){k(n,t,i)},p:$,i:$,o:$,d(n){n&&w(t)}}}class Mt extends Oe{constructor(t){super(),Le(this,t,null,Ct,ue,{})}}var Wt=Object.defineProperty,at=(e,t)=>{for(var n in t)Wt(e,n,{get:t[n],enumerable:!0})},It={};at(It,{convertFileSrc:()=>At,invoke:()=>xe,transformCallback:()=>$e});function Nt(){return window.crypto.getRandomValues(new Uint32Array(1))[0]}function $e(e,t=!1){let n=Nt(),i=`_${n}`;return Object.defineProperty(window,i,{value:r=>(t&&Reflect.deleteProperty(window,i),e==null?void 0:e(r)),writable:!1,configurable:!0}),n}async function xe(e,t={}){return new Promise((n,i)=>{let r=$e(h=>{n(h),Reflect.deleteProperty(window,`_${a}`)},!0),a=$e(h=>{i(h),Reflect.deleteProperty(window,`_${r}`)},!0);window.__TAURI_IPC__({cmd:e,callback:r,error:a,...t})})}function At(e,t="asset"){let n=encodeURIComponent(e);return navigator.userAgent.includes("Windows")?`https://${t}.localhost/${n}`:`${t}://localhost/${n}`}var Pt={};at(Pt,{TauriEvent:()=>ft,emit:()=>ht,listen:()=>mt,once:()=>qt});async function Pe(e){return xe("tauri",e)}async function ut(e,t){return Pe({__tauriModule:"Event",message:{cmd:"unlisten",event:e,eventId:t}})}async function Rt(e,t,n){await Pe({__tauriModule:"Event",message:{cmd:"emit",event:e,windowLabel:t,payload:n}})}async function dt(e,t,n){return Pe({__tauriModule:"Event",message:{cmd:"listen",event:e,windowLabel:t,handler:$e(n)}}).then(i=>async()=>ut(e,i))}async function Ht(e,t,n){return dt(e,t,i=>{n(i),ut(e,i.id).catch(()=>{})})}var ft=(e=>(e.WINDOW_RESIZED="tauri://resize",e.WINDOW_MOVED="tauri://move",e.WINDOW_CLOSE_REQUESTED="tauri://close-requested",e.WINDOW_CREATED="tauri://window-created",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_FILE_DROP="tauri://file-drop",e.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",e.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",e.MENU="tauri://menu",e))(ft||{});async function mt(e,t){return dt(e,null,t)}async function qt(e,t){return Ht(e,null,t)}async function ht(e,t){return Rt(e,void 0,t)}function jt(e){let t,n,i,r,a,h,c,u;return{c(){t=f("div"),n=f("button"),n.textContent="Call Log API",i=g(),r=f("button"),r.textContent="Call Request (async) API",a=g(),h=f("button"),h.textContent="Send event to Rust",l(n,"class","btn"),l(n,"id","log"),l(r,"class","btn"),l(r,"id","request"),l(h,"class","btn"),l(h,"id","event")},m(d,E){k(d,t,E),o(t,n),o(t,i),o(t,r),o(t,a),o(t,h),c||(u=[z(n,"click",e[0]),z(r,"click",e[1]),z(h,"click",e[2])],c=!0)},p:$,i:$,o:$,d(d){d&&w(t),c=!1,F(u)}}}function Ut(e,t,n){let{onMessage:i}=t,r;Ee(async()=>{r=await mt("rust-event",i)}),lt(()=>{r&&r()});function a(){xe("log_operation",{event:"tauri-click",payload:"this payload is optional because we used Option in Rust"})}function h(){xe("perform_request",{endpoint:"dummy endpoint arg",body:{id:5,name:"test"}}).then(i).catch(i)}function c(){ht("js-event","this is the payload string")}return e.$$set=u=>{"onMessage"in u&&n(3,i=u.onMessage)},[a,h,c,i]}class zt extends Oe{constructor(t){super(),Le(this,t,Ut,jt,ue,{onMessage:3})}}function Ft(e){let t;return{c(){t=f("div"),t.innerHTML=`
Not available for Linux
+ `,l(t,"class","flex flex-col gap-2")},m(n,i){k(n,t,i)},p:$,i:$,o:$,d(n){n&&w(t)}}}function Vt(e,t,n){let{onMessage:i}=t;const r=window.constraints={audio:!0,video:!0};function a(c){const u=document.querySelector("video"),d=c.getVideoTracks();i("Got stream with constraints:",r),i(`Using video device: ${d[0].label}`),window.stream=c,u.srcObject=c}function h(c){if(c.name==="ConstraintNotSatisfiedError"){const u=r.video;i(`The resolution ${u.width.exact}x${u.height.exact} px is not supported by your device.`)}else c.name==="PermissionDeniedError"&&i("Permissions have not been granted to use your camera and microphone, you need to allow the page access to your devices in order for the demo to work.");i(`getUserMedia error: ${c.name}`,c)}return Ee(async()=>{try{const c=await navigator.mediaDevices.getUserMedia(r);a(c)}catch(c){h(c)}}),lt(()=>{window.stream.getTracks().forEach(function(c){c.stop()})}),e.$$set=c=>{"onMessage"in c&&n(0,i=c.onMessage)},[i]}class Bt extends Oe{constructor(t){super(),Le(this,t,Vt,Ft,ue,{onMessage:0})}}function Qe(e,t,n){const i=e.slice();return i[25]=t[n],i}function Ze(e,t,n){const i=e.slice();return i[28]=t[n],i}function Gt(e){let t;return{c(){t=f("span"),l(t,"class","i-codicon-menu animate-duration-300ms animate-fade-in")},m(n,i){k(n,t,i)},d(n){n&&w(t)}}}function Xt(e){let t;return{c(){t=f("span"),l(t,"class","i-codicon-close animate-duration-300ms animate-fade-in")},m(n,i){k(n,t,i)},d(n){n&&w(t)}}}function Yt(e){let t,n;return{c(){t=K(`Switch to Dark mode + `),n=f("div"),l(n,"class","i-ph-moon")},m(i,r){k(i,t,r),k(i,n,r)},d(i){i&&w(t),i&&w(n)}}}function Jt(e){let t,n;return{c(){t=K(`Switch to Light mode + `),n=f("div"),l(n,"class","i-ph-sun")},m(i,r){k(i,t,r),k(i,n,r)},d(i){i&&w(t),i&&w(n)}}}function Kt(e){let t,n,i,r,a=e[28].label+"",h,c,u,d;function E(){return e[14](e[28])}return{c(){t=f("a"),n=f("div"),i=g(),r=f("p"),h=K(a),l(n,"class",e[28].icon+" mr-2"),l(t,"href","##"),l(t,"class",c="nv "+(e[1]===e[28]?"nv_selected":""))},m(v,O){k(v,t,O),o(t,n),o(t,i),o(t,r),o(r,h),u||(d=z(t,"click",E),u=!0)},p(v,O){e=v,O&2&&c!==(c="nv "+(e[1]===e[28]?"nv_selected":""))&&l(t,"class",c)},d(v){v&&w(t),u=!1,d()}}}function et(e){let t,n=e[28]&&Kt(e);return{c(){n&&n.c(),t=ot()},m(i,r){n&&n.m(i,r),k(i,t,r)},p(i,r){i[28]&&n.p(i,r)},d(i){n&&n.d(i),i&&w(t)}}}function tt(e){let t,n=e[25].html+"",i;return{c(){t=new Et(!1),i=ot(),t.a=i},m(r,a){t.m(n,r,a),k(r,i,a)},p(r,a){a&16&&n!==(n=r[25].html+"")&&t.p(n)},d(r){r&&w(i),r&&t.d()}}}function Qt(e){let t,n,i,r,a,h,c,u,d,E,v,O,R,S,Q,W,de,b,H,T,q,V,Z,ee,fe,me,p,_,C,I,N,te,j=e[1].label+"",Se,Re,he,ne,y,He,M,pe,qe,B,ge,je,ie,Ue,re,oe,De,ze;function Fe(s,D){return s[0]?Xt:Gt}let _e=Fe(e),A=_e(e);function Ve(s,D){return s[2]?Jt:Yt}let ve=Ve(e),P=ve(e),G=e[5],x=[];for(let s=0;s`,de=g(),b=f("a"),b.innerHTML=`GitHub + `,H=g(),T=f("a"),T.innerHTML=`Source + `,q=g(),V=f("br"),Z=g(),ee=f("div"),fe=g(),me=f("br"),p=g(),_=f("div");for(let s=0;s',Ue=g(),re=f("div");for(let s=0;s{Ae(m,1)}),St()}X?(y=new X(Be(s)),Ke(y.$$.fragment),Ie(y.$$.fragment,1),Ne(y,ne,null)):y=null}if(D&16){Y=s[4];let m;for(m=0;m{n(2,u=localStorage&&localStorage.getItem("theme")=="dark"),it(u)});function d(){n(2,u=!u),it(u)}let E=Tt([]);bt(e,E,p=>n(4,i=p));function v(p){E.update(_=>[{html:`
[${new Date().toLocaleTimeString()}]: `+(typeof p=="string"?p:JSON.stringify(p,null,1))+"
"},..._])}function O(p){E.update(_=>[{html:`
[${new Date().toLocaleTimeString()}]: `+p+"
"},..._])}function R(){E.update(()=>[])}let S,Q,W;function de(p){W=p.clientY;const _=window.getComputedStyle(S);Q=parseInt(_.height,10);const C=N=>{const te=N.clientY-W,j=Q-te;n(3,S.style.height=`${j{document.removeEventListener("mouseup",I),document.removeEventListener("mousemove",C)};document.addEventListener("mouseup",I),document.addEventListener("mousemove",C)}let b=!1,H,T,q=!1,V=0,Z=0;const ee=(p,_,C)=>Math.min(Math.max(_,p),C);Ee(()=>{n(13,H=document.querySelector("#sidebar")),T=document.querySelector("#sidebarToggle"),document.addEventListener("click",p=>{T.contains(p.target)?n(0,b=!b):b&&!H.contains(p.target)&&n(0,b=!1)}),document.addEventListener("touchstart",p=>{if(T.contains(p.target))return;const _=p.touches[0].clientX;(0<_&&_<20&&!b||b)&&(q=!0,V=_)}),document.addEventListener("touchmove",p=>{if(q){const _=p.touches[0].clientX;Z=_;const C=(_-V)/10;H.style.setProperty("--translate-x",`-${ee(0,b?0-C:18.75-C,18.75)}rem`)}}),document.addEventListener("touchend",()=>{if(q){const p=(Z-V)/10;n(0,b=b?p>-(18.75/2):p>18.75/2)}q=!1})});const fe=p=>{c(p),n(0,b=!1)};function me(p){Ce[p?"unshift":"push"](()=>{S=p,n(3,S)})}return e.$$.update=()=>{if(e.$$.dirty&1){const p=document.querySelector("#sidebar");p&&Zt(p,b)}},[b,h,u,S,i,a,c,d,E,v,O,R,de,H,fe,me]}class tn extends Oe{constructor(t){super(),Le(this,t,en,Qt,ue,{})}}new tn({target:document.querySelector("#app")}); diff --git a/examples/api/src-tauri/Cargo.lock b/examples/api/src-tauri/Cargo.lock index a64a1f89ddb..ce325e31e88 100644 --- a/examples/api/src-tauri/Cargo.lock +++ b/examples/api/src-tauri/Cargo.lock @@ -43,15 +43,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "aho-corasick" -version = "0.7.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" -dependencies = [ - "memchr", -] - [[package]] name = "aho-corasick" version = "1.0.1" @@ -264,16 +255,6 @@ dependencies = [ "alloc-stdlib", ] -[[package]] -name = "bstr" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d4260bcc2e8fc9df1eac4919a720effeb63a3f0952f5bf4944adfa18897f09" -dependencies = [ - "memchr", - "serde", -] - [[package]] name = "bumpalo" version = "3.12.1" @@ -892,18 +873,6 @@ dependencies = [ "rustc_version", ] -[[package]] -name = "filetime" -version = "0.2.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cbc844cecaee9d4443931972e1289c8ff485cb4cc2767cb03ca139ed6885153" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall 0.2.16", - "windows-sys 0.48.0", -] - [[package]] name = "flate2" version = "1.0.26" @@ -1262,19 +1231,6 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" -[[package]] -name = "globset" -version = "0.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "029d74589adefde59de1a0c4f4732695c32805624aec7b68d91503d4dba79afc" -dependencies = [ - "aho-corasick 0.7.20", - "bstr", - "fnv", - "log", - "regex", -] - [[package]] name = "gobject-sys" version = "0.16.3" @@ -1531,23 +1487,6 @@ dependencies = [ "unicode-normalization", ] -[[package]] -name = "ignore" -version = "0.4.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbe7873dab538a9a44ad79ede1faf5f30d49f9a5c883ddbab48bce81b64b7492" -dependencies = [ - "globset", - "lazy_static", - "log", - "memchr", - "regex", - "same-file", - "thread_local", - "walkdir", - "winapi-util", -] - [[package]] name = "image" version = "0.24.6" @@ -2494,7 +2433,7 @@ version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af83e617f331cc6ae2da5443c602dfa5af81e517212d9d611a5b3ba1777b5370" dependencies = [ - "aho-corasick 1.0.1", + "aho-corasick", "memchr", "regex-syntax 0.7.1", ] @@ -3020,17 +2959,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "tar" -version = "0.4.38" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b55807c0344e1e6c04d7c965f5289c39a8d94ae23ed5c0b57aabac549f871c6" -dependencies = [ - "filetime", - "libc", - "xattr", -] - [[package]] name = "target-lexicon" version = "0.12.7" @@ -3046,8 +2974,6 @@ dependencies = [ "cocoa", "dirs-next", "embed_plist", - "encoding_rs", - "flate2", "futures-util", "glib", "glob", @@ -3055,7 +2981,6 @@ dependencies = [ "heck", "http", "ico 0.2.0", - "ignore", "infer 0.9.0", "jni", "libc", @@ -3074,7 +2999,6 @@ dependencies = [ "serialize-to-javascript", "state", "swift-rs", - "tar", "tauri-build", "tauri-macros", "tauri-runtime", @@ -3096,7 +3020,6 @@ version = "2.0.0-alpha.4" dependencies = [ "anyhow", "cargo_toml", - "filetime", "heck", "json-patch", "quote", @@ -3206,7 +3129,6 @@ dependencies = [ "thiserror", "url", "uuid", - "webview2-com", "windows 0.44.0", ] @@ -4221,12 +4143,3 @@ dependencies = [ "once_cell", "pkg-config", ] - -[[package]] -name = "xattr" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d1526bbe5aaeb5eb06885f4d987bcdfa5e23187055de9b83fe00156a821fabc" -dependencies = [ - "libc", -] diff --git a/examples/api/src-tauri/Cargo.toml b/examples/api/src-tauri/Cargo.toml index d06d48f3854..e3d1d23a190 100644 --- a/examples/api/src-tauri/Cargo.toml +++ b/examples/api/src-tauri/Cargo.toml @@ -7,6 +7,7 @@ rust-version = "1.65" license = "Apache-2.0 OR MIT" [lib] +name = "api_lib" crate-type = ["staticlib", "cdylib", "rlib"] [build-dependencies] @@ -34,7 +35,7 @@ tauri-build = { path = "../../../core/tauri-build" } [dependencies.tauri] path = "../../../core/tauri" features = [ - "api-all", + "protocol-asset", "icon-ico", "icon-png", "isolation", diff --git a/examples/api/src-tauri/src/lib.rs b/examples/api/src-tauri/src/lib.rs index e61ed79cad4..8578b5c503b 100644 --- a/examples/api/src-tauri/src/lib.rs +++ b/examples/api/src-tauri/src/lib.rs @@ -45,7 +45,6 @@ pub fn run() { #[cfg(desktop)] { window_builder = window_builder - .user_agent("Tauri API") .title("Tauri API Validation") .inner_size(1000., 800.) .min_inner_size(600., 400.) diff --git a/examples/api/src-tauri/src/main.rs b/examples/api/src-tauri/src/main.rs index 5c86c6f998e..e9885338f1b 100644 --- a/examples/api/src-tauri/src/main.rs +++ b/examples/api/src-tauri/src/main.rs @@ -7,5 +7,5 @@ fn main() { #[cfg(desktop)] - api::run(); + api_lib::run(); } diff --git a/examples/api/src-tauri/tauri.conf.json b/examples/api/src-tauri/tauri.conf.json index f247a49e1f3..fc7eef0ed0f 100644 --- a/examples/api/src-tauri/tauri.conf.json +++ b/examples/api/src-tauri/tauri.conf.json @@ -26,11 +26,7 @@ "name": "theme", "takesValue": true, "description": "App theme", - "possibleValues": [ - "light", - "dark", - "system" - ] + "possibleValues": ["light", "dark", "system"] }, { "short": "v", @@ -79,76 +75,31 @@ } } } - } - }, - "allowlist": { - "all": true, - "fs": { - "scope": { - "allow": [ - "$APPDATA/db/**", - "$DOWNLOAD/**", - "$RESOURCE/**" - ], - "deny": [ - "$APPDATA/db/*.stronghold" - ] - } }, - "shell": { - "open": true, - "scope": [ - { - "name": "sh", - "cmd": "sh", - "args": [ - "-c", - { - "validator": "\\S+" - } - ] - }, - { - "name": "cmd", - "cmd": "cmd", - "args": [ - "/C", - { - "validator": "\\S+" - } - ] - } - ] - }, - "protocol": { - "asset": true, - "assetScope": { - "allow": [ - "$APPDATA/db/**", - "$RESOURCE/**" - ], - "deny": [ - "$APPDATA/db/*.stronghold" - ] + "updater": { + "active": true, + "pubkey": "asdasd", + "windows": { + "installMode": "passive" } - }, - "http": { - "scope": [ - "http://localhost:3003" - ] } }, "windows": [], "security": { "csp": { "default-src": "'self' customprotocol: asset:", - "font-src": [ - "https://fonts.gstatic.com" - ], + "font-src": ["https://fonts.gstatic.com"], "img-src": "'self' asset: https://asset.localhost blob: data:", "style-src": "'unsafe-inline' 'self' https://fonts.googleapis.com" }, - "freezePrototype": true + "freezePrototype": true, + "assetProtocol": { + "enable": true, + "scope": { + "allow": ["$APPDATA/db/**", "$RESOURCE/**"], + "deny": ["$APPDATA/db/*.stronghold"] + } + } }, "systemTray": { "iconPath": "../../.icons/tray_icon_with_transparency.png", @@ -156,4 +107,4 @@ "menuOnLeftClick": false } } -} \ No newline at end of file +} diff --git a/examples/api/src/App.svelte b/examples/api/src/App.svelte index ae98905c793..264e9a0bed2 100644 --- a/examples/api/src/App.svelte +++ b/examples/api/src/App.svelte @@ -1,12 +1,11 @@ - - diff --git a/examples/sidecar/package.json b/examples/sidecar/package.json deleted file mode 100644 index 034961c3988..00000000000 --- a/examples/sidecar/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "sidecar", - "version": "1.0.0", - "bin": "src/index.js", - "pkg": { - "assets": [ - "src/**/*" - ] - }, - "scripts": { - "tauri": "node ../../tooling/cli/node/tauri.js", - "package": "pkg package.json --output src-tauri/binaries/app && node scripts/move-binary.js" - }, - "devDependencies": { - "execa": "5.1.1", - "pkg": "5.2.1" - } -} diff --git a/examples/sidecar/scripts/move-binary.js b/examples/sidecar/scripts/move-binary.js deleted file mode 100644 index c350b006dad..00000000000 --- a/examples/sidecar/scripts/move-binary.js +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2019-2023 Tauri Programme within The Commons Conservancy -// SPDX-License-Identifier: Apache-2.0 -// SPDX-License-Identifier: MIT - -/** - * This script is used to rename the binary with the platform specific postfix. - * When `tauri build` is ran, it looks for the binary name appended with the platform specific postfix. - */ - -const execa = require('execa') -const fs = require('fs') - -let extension = '' -if (process.platform === 'win32') { - extension = '.exe' -} - -async function main() { - const rustInfo = (await execa('rustc', ['-vV'])).stdout - const targetTriple = /host: (\S+)/g.exec(rustInfo)[1] - if (!targetTriple) { - console.error('Failed to determine platform target triple') - } - fs.renameSync( - `src-tauri/binaries/app${extension}`, - `src-tauri/binaries/app-${targetTriple}${extension}` - ) -} - -main().catch((e) => { - throw e -}) diff --git a/examples/sidecar/src-tauri/.gitignore b/examples/sidecar/src-tauri/.gitignore deleted file mode 100644 index 72198553f98..00000000000 --- a/examples/sidecar/src-tauri/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -# Generated by Cargo -# will have compiled files and executables -/target/ -binaries/ diff --git a/examples/sidecar/src-tauri/Cargo.lock b/examples/sidecar/src-tauri/Cargo.lock deleted file mode 100644 index 10b074a6a77..00000000000 --- a/examples/sidecar/src-tauri/Cargo.lock +++ /dev/null @@ -1,3144 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - -[[package]] -name = "aho-corasick" -version = "0.7.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" -dependencies = [ - "memchr", -] - -[[package]] -name = "alloc-no-stdlib" -version = "2.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" - -[[package]] -name = "alloc-stdlib" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece" -dependencies = [ - "alloc-no-stdlib", -] - -[[package]] -name = "anyhow" -version = "1.0.68" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cb2f989d18dd141ab8ae82f64d1a8cdd37e0840f73a406896cf5e99502fab61" - -[[package]] -name = "atk" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c3d816ce6f0e2909a96830d6911c2aff044370b1ef92d7f267b43bae5addedd" -dependencies = [ - "atk-sys", - "bitflags", - "glib", - "libc", -] - -[[package]] -name = "atk-sys" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58aeb089fb698e06db8089971c7ee317ab9644bade33383f63631437b03aafb6" -dependencies = [ - "glib-sys", - "gobject-sys", - "libc", - "system-deps 6.0.3", -] - -[[package]] -name = "autocfg" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" - -[[package]] -name = "base64" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" - -[[package]] -name = "base64" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ea22880d78093b0cbe17c89f64a7d457941e65759157ec6cb31a31d652b05e5" - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "block" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" - -[[package]] -name = "block-buffer" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" -dependencies = [ - "generic-array", -] - -[[package]] -name = "brotli" -version = "3.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1a0b1dbcc8ae29329621f8d4f0d835787c1c38bb1401979b49d13b0b305ff68" -dependencies = [ - "alloc-no-stdlib", - "alloc-stdlib", - "brotli-decompressor", -] - -[[package]] -name = "brotli-decompressor" -version = "2.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b6561fd3f895a11e8f72af2cb7d22e08366bebc2b6b57f7744c4bda27034744" -dependencies = [ - "alloc-no-stdlib", - "alloc-stdlib", -] - -[[package]] -name = "bstr" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b45ea9b00a7b3f2988e9a65ad3917e62123c38dba709b666506207be96d1790b" -dependencies = [ - "memchr", - "serde", -] - -[[package]] -name = "bytemuck" -version = "1.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aaa3a8d9a1ca92e282c96a32d6511b695d7d994d1d102ba85d279f9b2756947f" - -[[package]] -name = "byteorder" -version = "1.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" - -[[package]] -name = "bytes" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfb24e866b15a1af2a1b663f10c6b6b8f397a84aadb828f12e5b289ec23a3a3c" - -[[package]] -name = "cairo-rs" -version = "0.15.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c76ee391b03d35510d9fa917357c7f1855bd9a6659c95a1b392e33f49b3369bc" -dependencies = [ - "bitflags", - "cairo-sys-rs", - "glib", - "libc", - "thiserror", -] - -[[package]] -name = "cairo-sys-rs" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c55d429bef56ac9172d25fecb85dc8068307d17acd74b377866b7a1ef25d3c8" -dependencies = [ - "glib-sys", - "libc", - "system-deps 6.0.3", -] - -[[package]] -name = "cargo_toml" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f1204fe51a1e56042b8ec31d6407547ecd18f596b66f470dadb9abd9be9c843" -dependencies = [ - "serde", - "toml", -] - -[[package]] -name = "cc" -version = "1.0.78" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a20104e2335ce8a659d6dd92a51a767a0c062599c73b343fd152cb401e828c3d" - -[[package]] -name = "cesu8" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" - -[[package]] -name = "cfb" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d38f2da7a0a2c4ccf0065be06397cc26a81f4e528be095826eee9d4adbb8c60f" -dependencies = [ - "byteorder", - "fnv", - "uuid", -] - -[[package]] -name = "cfg-expr" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3431df59f28accaf4cb4eed4a9acc66bea3f3c3753aa6cdc2f024174ef232af7" -dependencies = [ - "smallvec", -] - -[[package]] -name = "cfg-expr" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0357a6402b295ca3a86bc148e84df46c02e41f41fef186bda662557ef6328aa" -dependencies = [ - "smallvec", -] - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "cocoa" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f425db7937052c684daec3bd6375c8abe2d146dca4b8b143d6db777c39138f3a" -dependencies = [ - "bitflags", - "block", - "cocoa-foundation", - "core-foundation", - "core-graphics", - "foreign-types", - "libc", - "objc", -] - -[[package]] -name = "cocoa-foundation" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ade49b65d560ca58c403a479bb396592b155c0185eada742ee323d1d68d6318" -dependencies = [ - "bitflags", - "block", - "core-foundation", - "core-graphics-types", - "foreign-types", - "libc", - "objc", -] - -[[package]] -name = "color_quant" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" - -[[package]] -name = "combine" -version = "4.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35ed6e9d84f0b51a7f52daf1c7d71dd136fd7a3f41a8462b8cdb8c78d920fad4" -dependencies = [ - "bytes", - "memchr", -] - -[[package]] -name = "convert_case" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" - -[[package]] -name = "core-foundation" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "core-foundation-sys" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" - -[[package]] -name = "core-graphics" -version = "0.22.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2581bbab3b8ffc6fcbd550bf46c355135d16e9ff2a6ea032ad6b9bf1d7efe4fb" -dependencies = [ - "bitflags", - "core-foundation", - "core-graphics-types", - "foreign-types", - "libc", -] - -[[package]] -name = "core-graphics-types" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a68b68b3446082644c91ac778bf50cd4104bfb002b5a6a7c44cca5a2c70788b" -dependencies = [ - "bitflags", - "core-foundation", - "foreign-types", - "libc", -] - -[[package]] -name = "cpufeatures" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" -dependencies = [ - "libc", -] - -[[package]] -name = "crc32fast" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "crossbeam-channel" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" -dependencies = [ - "cfg-if", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb766fa798726286dbbb842f174001dab8abc7b627a1dd86e0b7222a95d929f" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "crypto-common" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" -dependencies = [ - "generic-array", - "typenum", -] - -[[package]] -name = "cssparser" -version = "0.27.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "754b69d351cdc2d8ee09ae203db831e005560fc6030da058f86ad60c92a9cb0a" -dependencies = [ - "cssparser-macros", - "dtoa-short", - "itoa 0.4.8", - "matches", - "phf 0.8.0", - "proc-macro2", - "quote", - "smallvec", - "syn", -] - -[[package]] -name = "cssparser-macros" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfae75de57f2b2e85e8768c3ea840fd159c8f33e2b6522c7835b7abac81be16e" -dependencies = [ - "quote", - "syn", -] - -[[package]] -name = "ctor" -version = "0.1.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d2301688392eb071b0bf1a37be05c469d3cc4dbbd95df672fe28ab021e6a096" -dependencies = [ - "quote", - "syn", -] - -[[package]] -name = "cty" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35" - -[[package]] -name = "darling" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c" -dependencies = [ - "darling_core", - "darling_macro", -] - -[[package]] -name = "darling_core" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim", - "syn", -] - -[[package]] -name = "darling_macro" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" -dependencies = [ - "darling_core", - "quote", - "syn", -] - -[[package]] -name = "derive_more" -version = "0.99.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" -dependencies = [ - "convert_case", - "proc-macro2", - "quote", - "rustc_version 0.4.0", - "syn", -] - -[[package]] -name = "digest" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" -dependencies = [ - "block-buffer", - "crypto-common", -] - -[[package]] -name = "dirs-next" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" -dependencies = [ - "cfg-if", - "dirs-sys-next", -] - -[[package]] -name = "dirs-sys-next" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" -dependencies = [ - "libc", - "redox_users", - "winapi", -] - -[[package]] -name = "dispatch" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" - -[[package]] -name = "dtoa" -version = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56899898ce76aaf4a0f24d914c97ea6ed976d42fec6ad33fcbb0a1103e07b2b0" - -[[package]] -name = "dtoa-short" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bde03329ae10e79ede66c9ce4dc930aa8599043b0743008548680f25b91502d6" -dependencies = [ - "dtoa", -] - -[[package]] -name = "dunce" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bd4b30a6560bbd9b4620f4de34c3f14f60848e58a9b7216801afcb4c7b31c3c" - -[[package]] -name = "embed_plist" -version = "1.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ef6b89e5b37196644d8796de5268852ff179b44e96276cf4290264843743bb7" - -[[package]] -name = "encoding_rs" -version = "0.8.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9852635589dc9f9ea1b6fe9f05b50ef208c85c834a562f0c6abb1c475736ec2b" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "fastrand" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" -dependencies = [ - "instant", -] - -[[package]] -name = "field-offset" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e1c54951450cbd39f3dbcf1005ac413b49487dabf18a720ad2383eccfeffb92" -dependencies = [ - "memoffset", - "rustc_version 0.3.3", -] - -[[package]] -name = "filetime" -version = "0.2.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e884668cd0c7480504233e951174ddc3b382f7c2666e3b7310b5c4e7b0c37f9" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "windows-sys", -] - -[[package]] -name = "flate2" -version = "1.0.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8a2db397cb1c8772f31494cb8917e48cd1e64f0fa7efac59fbd741a0a8ce841" -dependencies = [ - "crc32fast", - "miniz_oxide", -] - -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "foreign-types" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -dependencies = [ - "foreign-types-shared", -] - -[[package]] -name = "foreign-types-shared" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" - -[[package]] -name = "form_urlencoded" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" -dependencies = [ - "percent-encoding", -] - -[[package]] -name = "futf" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df420e2e84819663797d1ec6544b13c5be84629e7bb00dc960d6917db2987843" -dependencies = [ - "mac", - "new_debug_unreachable", -] - -[[package]] -name = "futures-channel" -version = "0.3.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52ba265a92256105f45b719605a571ffe2d1f0fea3807304b522c1d778f79eed" -dependencies = [ - "futures-core", -] - -[[package]] -name = "futures-core" -version = "0.3.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04909a7a7e4633ae6c4a9ab280aeb86da1236243a77b694a49eacd659a4bd3ac" - -[[package]] -name = "futures-executor" -version = "0.3.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7acc85df6714c176ab5edf386123fafe217be88c0840ec11f199441134a074e2" -dependencies = [ - "futures-core", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-io" -version = "0.3.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00f5fb52a06bdcadeb54e8d3671f8888a39697dcb0b81b23b55174030427f4eb" - -[[package]] -name = "futures-macro" -version = "0.3.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdfb8ce053d86b91919aad980c220b1fb8401a9394410e1c289ed7e66b61835d" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "futures-task" -version = "0.3.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ffb393ac5d9a6eaa9d3fdf37ae2776656b706e200c8e16b1bdb227f5198e6ea" - -[[package]] -name = "futures-util" -version = "0.3.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "197676987abd2f9cadff84926f410af1c183608d36641465df73ae8211dc65d6" -dependencies = [ - "futures-core", - "futures-macro", - "futures-task", - "pin-project-lite", - "pin-utils", - "slab", -] - -[[package]] -name = "fxhash" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" -dependencies = [ - "byteorder", -] - -[[package]] -name = "gdk" -version = "0.15.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6e05c1f572ab0e1f15be94217f0dc29088c248b14f792a5ff0af0d84bcda9e8" -dependencies = [ - "bitflags", - "cairo-rs", - "gdk-pixbuf", - "gdk-sys", - "gio", - "glib", - "libc", - "pango", -] - -[[package]] -name = "gdk-pixbuf" -version = "0.15.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad38dd9cc8b099cceecdf41375bb6d481b1b5a7cd5cd603e10a69a9383f8619a" -dependencies = [ - "bitflags", - "gdk-pixbuf-sys", - "gio", - "glib", - "libc", -] - -[[package]] -name = "gdk-pixbuf-sys" -version = "0.15.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "140b2f5378256527150350a8346dbdb08fadc13453a7a2d73aecd5fab3c402a7" -dependencies = [ - "gio-sys", - "glib-sys", - "gobject-sys", - "libc", - "system-deps 6.0.3", -] - -[[package]] -name = "gdk-sys" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32e7a08c1e8f06f4177fb7e51a777b8c1689f743a7bc11ea91d44d2226073a88" -dependencies = [ - "cairo-sys-rs", - "gdk-pixbuf-sys", - "gio-sys", - "glib-sys", - "gobject-sys", - "libc", - "pango-sys", - "pkg-config", - "system-deps 6.0.3", -] - -[[package]] -name = "gdkx11-sys" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4b7f8c7a84b407aa9b143877e267e848ff34106578b64d1e0a24bf550716178" -dependencies = [ - "gdk-sys", - "glib-sys", - "libc", - "system-deps 6.0.3", - "x11", -] - -[[package]] -name = "generator" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d266041a359dfa931b370ef684cceb84b166beb14f7f0421f4a6a3d0c446d12e" -dependencies = [ - "cc", - "libc", - "log", - "rustversion", - "windows", -] - -[[package]] -name = "generic-array" -version = "0.14.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" -dependencies = [ - "typenum", - "version_check", -] - -[[package]] -name = "getrandom" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" -dependencies = [ - "cfg-if", - "libc", - "wasi 0.9.0+wasi-snapshot-preview1", -] - -[[package]] -name = "getrandom" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" -dependencies = [ - "cfg-if", - "libc", - "wasi 0.11.0+wasi-snapshot-preview1", -] - -[[package]] -name = "gio" -version = "0.15.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68fdbc90312d462781a395f7a16d96a2b379bb6ef8cd6310a2df272771c4283b" -dependencies = [ - "bitflags", - "futures-channel", - "futures-core", - "futures-io", - "gio-sys", - "glib", - "libc", - "once_cell", - "thiserror", -] - -[[package]] -name = "gio-sys" -version = "0.15.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32157a475271e2c4a023382e9cab31c4584ee30a97da41d3c4e9fdd605abcf8d" -dependencies = [ - "glib-sys", - "gobject-sys", - "libc", - "system-deps 6.0.3", - "winapi", -] - -[[package]] -name = "glib" -version = "0.15.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edb0306fbad0ab5428b0ca674a23893db909a98582969c9b537be4ced78c505d" -dependencies = [ - "bitflags", - "futures-channel", - "futures-core", - "futures-executor", - "futures-task", - "glib-macros", - "glib-sys", - "gobject-sys", - "libc", - "once_cell", - "smallvec", - "thiserror", -] - -[[package]] -name = "glib-macros" -version = "0.15.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25a68131a662b04931e71891fb14aaf65ee4b44d08e8abc10f49e77418c86c64" -dependencies = [ - "anyhow", - "heck 0.4.0", - "proc-macro-crate", - "proc-macro-error", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "glib-sys" -version = "0.15.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef4b192f8e65e9cf76cbf4ea71fa8e3be4a0e18ffe3d68b8da6836974cc5bad4" -dependencies = [ - "libc", - "system-deps 6.0.3", -] - -[[package]] -name = "glob" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" - -[[package]] -name = "globset" -version = "0.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "029d74589adefde59de1a0c4f4732695c32805624aec7b68d91503d4dba79afc" -dependencies = [ - "aho-corasick", - "bstr", - "fnv", - "log", - "regex", -] - -[[package]] -name = "gobject-sys" -version = "0.15.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d57ce44246becd17153bd035ab4d32cfee096a657fc01f2231c9278378d1e0a" -dependencies = [ - "glib-sys", - "libc", - "system-deps 6.0.3", -] - -[[package]] -name = "gtk" -version = "0.15.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92e3004a2d5d6d8b5057d2b57b3712c9529b62e82c77f25c1fecde1fd5c23bd0" -dependencies = [ - "atk", - "bitflags", - "cairo-rs", - "field-offset", - "futures-channel", - "gdk", - "gdk-pixbuf", - "gio", - "glib", - "gtk-sys", - "gtk3-macros", - "libc", - "once_cell", - "pango", - "pkg-config", -] - -[[package]] -name = "gtk-sys" -version = "0.15.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5bc2f0587cba247f60246a0ca11fe25fb733eabc3de12d1965fc07efab87c84" -dependencies = [ - "atk-sys", - "cairo-sys-rs", - "gdk-pixbuf-sys", - "gdk-sys", - "gio-sys", - "glib-sys", - "gobject-sys", - "libc", - "pango-sys", - "system-deps 6.0.3", -] - -[[package]] -name = "gtk3-macros" -version = "0.15.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24f518afe90c23fba585b2d7697856f9e6a7bbc62f65588035e66f6afb01a2e9" -dependencies = [ - "anyhow", - "proc-macro-crate", - "proc-macro-error", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" - -[[package]] -name = "heck" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" -dependencies = [ - "unicode-segmentation", -] - -[[package]] -name = "heck" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" - -[[package]] -name = "hermit-abi" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" -dependencies = [ - "libc", -] - -[[package]] -name = "html5ever" -version = "0.25.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5c13fb08e5d4dfc151ee5e88bae63f7773d61852f3bdc73c9f4b9e1bde03148" -dependencies = [ - "log", - "mac", - "markup5ever", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "http" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" -dependencies = [ - "bytes", - "fnv", - "itoa 1.0.5", -] - -[[package]] -name = "http-range" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21dec9db110f5f872ed9699c3ecf50cf16f423502706ba5c72462e28d3157573" - -[[package]] -name = "ico" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3804960be0bb5e4edb1e1ad67afd321a9ecfd875c3e65c099468fd2717d7cae" -dependencies = [ - "byteorder", - "png", -] - -[[package]] -name = "ident_case" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" - -[[package]] -name = "idna" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" -dependencies = [ - "unicode-bidi", - "unicode-normalization", -] - -[[package]] -name = "ignore" -version = "0.4.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "713f1b139373f96a2e0ce3ac931cd01ee973c3c5dd7c40c0c2efe96ad2b6751d" -dependencies = [ - "crossbeam-utils", - "globset", - "lazy_static", - "log", - "memchr", - "regex", - "same-file", - "thread_local", - "walkdir", - "winapi-util", -] - -[[package]] -name = "image" -version = "0.24.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69b7ea949b537b0fd0af141fff8c77690f2ce96f4f41f042ccb6c69c6c965945" -dependencies = [ - "bytemuck", - "byteorder", - "color_quant", - "num-rational", - "num-traits", -] - -[[package]] -name = "indexmap" -version = "1.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" -dependencies = [ - "autocfg", - "hashbrown", -] - -[[package]] -name = "infer" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a898e4b7951673fce96614ce5751d13c40fc5674bc2d759288e46c3ab62598b3" -dependencies = [ - "cfb", -] - -[[package]] -name = "instant" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "itoa" -version = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" - -[[package]] -name = "itoa" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fad582f4b9e86b6caa621cabeb0963332d92eea04729ab12892c2533951e6440" - -[[package]] -name = "javascriptcore-rs" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf053e7843f2812ff03ef5afe34bb9c06ffee120385caad4f6b9967fcd37d41c" -dependencies = [ - "bitflags", - "glib", - "javascriptcore-rs-sys", -] - -[[package]] -name = "javascriptcore-rs-sys" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "905fbb87419c5cde6e3269537e4ea7d46431f3008c5d057e915ef3f115e7793c" -dependencies = [ - "glib-sys", - "gobject-sys", - "libc", - "system-deps 5.0.0", -] - -[[package]] -name = "jni" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "039022cdf4d7b1cf548d31f60ae783138e5fd42013f6271049d7df7afadef96c" -dependencies = [ - "cesu8", - "combine", - "jni-sys", - "log", - "thiserror", - "walkdir", -] - -[[package]] -name = "jni-sys" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" - -[[package]] -name = "json-patch" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e712e62827c382a77b87f590532febb1f8b2fdbc3eefa1ee37fe7281687075ef" -dependencies = [ - "serde", - "serde_json", - "thiserror", - "treediff", -] - -[[package]] -name = "kuchiki" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ea8e9c6e031377cff82ee3001dc8026cdf431ed4e2e6b51f98ab8c73484a358" -dependencies = [ - "cssparser", - "html5ever", - "matches", - "selectors", -] - -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" - -[[package]] -name = "libc" -version = "0.2.139" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" - -[[package]] -name = "line-wrap" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f30344350a2a51da54c1d53be93fade8a237e545dbcc4bdbe635413f2117cab9" -dependencies = [ - "safemem", -] - -[[package]] -name = "lock_api" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" -dependencies = [ - "autocfg", - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "loom" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff50ecb28bb86013e935fb6683ab1f6d3a20016f123c76fd4c27470076ac30f5" -dependencies = [ - "cfg-if", - "generator", - "scoped-tls", - "serde", - "serde_json", - "tracing", - "tracing-subscriber", -] - -[[package]] -name = "mac" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4" - -[[package]] -name = "malloc_buf" -version = "0.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb" -dependencies = [ - "libc", -] - -[[package]] -name = "markup5ever" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a24f40fb03852d1cdd84330cddcaf98e9ec08a7b7768e952fad3b4cf048ec8fd" -dependencies = [ - "log", - "phf 0.8.0", - "phf_codegen", - "string_cache", - "string_cache_codegen", - "tendril", -] - -[[package]] -name = "matchers" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" -dependencies = [ - "regex-automata", -] - -[[package]] -name = "matches" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" - -[[package]] -name = "memchr" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" - -[[package]] -name = "memoffset" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" -dependencies = [ - "autocfg", -] - -[[package]] -name = "miniz_oxide" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" -dependencies = [ - "adler", -] - -[[package]] -name = "ndk" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2032c77e030ddee34a6787a64166008da93f6a352b629261d0fee232b8742dd4" -dependencies = [ - "bitflags", - "jni-sys", - "ndk-sys", - "num_enum", - "thiserror", -] - -[[package]] -name = "ndk-context" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" - -[[package]] -name = "ndk-sys" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e5a6ae77c8ee183dcbbba6150e2e6b9f3f4196a7666c02a715a95692ec1fa97" -dependencies = [ - "jni-sys", -] - -[[package]] -name = "new_debug_unreachable" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" - -[[package]] -name = "nodrop" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" - -[[package]] -name = "nu-ansi-term" -version = "0.46.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" -dependencies = [ - "overload", - "winapi", -] - -[[package]] -name = "num-integer" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" -dependencies = [ - "autocfg", - "num-traits", -] - -[[package]] -name = "num-rational" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-traits" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" -dependencies = [ - "autocfg", -] - -[[package]] -name = "num_cpus" -version = "1.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" -dependencies = [ - "hermit-abi", - "libc", -] - -[[package]] -name = "num_enum" -version = "0.5.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf5395665662ef45796a4ff5486c5d41d29e0c09640af4c5f17fd94ee2c119c9" -dependencies = [ - "num_enum_derive", -] - -[[package]] -name = "num_enum_derive" -version = "0.5.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b0498641e53dd6ac1a4f22547548caa6864cc4933784319cd1775271c5a46ce" -dependencies = [ - "proc-macro-crate", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "objc" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" -dependencies = [ - "malloc_buf", - "objc_exception", -] - -[[package]] -name = "objc_exception" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad970fb455818ad6cba4c122ad012fae53ae8b4795f86378bce65e4f6bab2ca4" -dependencies = [ - "cc", -] - -[[package]] -name = "objc_id" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c92d4ddb4bd7b50d730c215ff871754d0da6b2178849f8a2a2ab69712d0c073b" -dependencies = [ - "objc", -] - -[[package]] -name = "once_cell" -version = "1.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f61fba1741ea2b3d6a1e3178721804bb716a68a6aeba1149b5d52e3d464ea66" - -[[package]] -name = "os_pipe" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6a252f1f8c11e84b3ab59d7a488e48e4478a93937e027076638c49536204639" -dependencies = [ - "libc", - "windows-sys", -] - -[[package]] -name = "overload" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" - -[[package]] -name = "pango" -version = "0.15.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22e4045548659aee5313bde6c582b0d83a627b7904dd20dc2d9ef0895d414e4f" -dependencies = [ - "bitflags", - "glib", - "libc", - "once_cell", - "pango-sys", -] - -[[package]] -name = "pango-sys" -version = "0.15.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2a00081cde4661982ed91d80ef437c20eacaf6aa1a5962c0279ae194662c3aa" -dependencies = [ - "glib-sys", - "gobject-sys", - "libc", - "system-deps 6.0.3", -] - -[[package]] -name = "parking_lot" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" -dependencies = [ - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba1ef8814b5c993410bb3adfad7a5ed269563e4a2f90c41f5d85be7fb47133bf" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "smallvec", - "windows-sys", -] - -[[package]] -name = "percent-encoding" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" - -[[package]] -name = "pest" -version = "2.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4257b4a04d91f7e9e6290be5d3da4804dd5784fafde3a497d73eb2b4a158c30a" -dependencies = [ - "thiserror", - "ucd-trie", -] - -[[package]] -name = "phf" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dfb61232e34fcb633f43d12c58f83c1df82962dcdfa565a4e866ffc17dafe12" -dependencies = [ - "phf_macros 0.8.0", - "phf_shared 0.8.0", - "proc-macro-hack", -] - -[[package]] -name = "phf" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fabbf1ead8a5bcbc20f5f8b939ee3f5b0f6f281b6ad3468b84656b658b455259" -dependencies = [ - "phf_macros 0.10.0", - "phf_shared 0.10.0", - "proc-macro-hack", -] - -[[package]] -name = "phf_codegen" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbffee61585b0411840d3ece935cce9cb6321f01c45477d30066498cd5e1a815" -dependencies = [ - "phf_generator 0.8.0", - "phf_shared 0.8.0", -] - -[[package]] -name = "phf_generator" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17367f0cc86f2d25802b2c26ee58a7b23faeccf78a396094c13dced0d0182526" -dependencies = [ - "phf_shared 0.8.0", - "rand 0.7.3", -] - -[[package]] -name = "phf_generator" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d5285893bb5eb82e6aaf5d59ee909a06a16737a8970984dd7746ba9283498d6" -dependencies = [ - "phf_shared 0.10.0", - "rand 0.8.5", -] - -[[package]] -name = "phf_macros" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f6fde18ff429ffc8fe78e2bf7f8b7a5a5a6e2a8b58bc5a9ac69198bbda9189c" -dependencies = [ - "phf_generator 0.8.0", - "phf_shared 0.8.0", - "proc-macro-hack", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "phf_macros" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58fdf3184dd560f160dd73922bea2d5cd6e8f064bf4b13110abd81b03697b4e0" -dependencies = [ - "phf_generator 0.10.0", - "phf_shared 0.10.0", - "proc-macro-hack", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "phf_shared" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c00cf8b9eafe68dde5e9eaa2cef8ee84a9336a47d566ec55ca16589633b65af7" -dependencies = [ - "siphasher", -] - -[[package]] -name = "phf_shared" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" -dependencies = [ - "siphasher", -] - -[[package]] -name = "pin-project-lite" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "pkg-config" -version = "0.3.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" - -[[package]] -name = "plist" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5329b8f106a176ab0dce4aae5da86bfcb139bb74fb00882859e03745011f3635" -dependencies = [ - "base64 0.13.1", - "indexmap", - "line-wrap", - "quick-xml", - "serde", - "time", -] - -[[package]] -name = "png" -version = "0.17.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d708eaf860a19b19ce538740d2b4bdeeb8337fa53f7738455e706623ad5c638" -dependencies = [ - "bitflags", - "crc32fast", - "flate2", - "miniz_oxide", -] - -[[package]] -name = "ppv-lite86" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" - -[[package]] -name = "precomputed-hash" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" - -[[package]] -name = "proc-macro-crate" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eda0fc3b0fb7c975631757e14d9049da17374063edb6ebbcbc54d880d4fe94e9" -dependencies = [ - "once_cell", - "thiserror", - "toml", -] - -[[package]] -name = "proc-macro-error" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "syn", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" -dependencies = [ - "proc-macro2", - "quote", - "version_check", -] - -[[package]] -name = "proc-macro-hack" -version = "0.5.20+deprecated" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" - -[[package]] -name = "proc-macro2" -version = "1.0.50" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ef7d57beacfaf2d8aee5937dab7b7f28de3cb8b1828479bb5de2a7106f2bae2" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "quick-xml" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f50b1c63b38611e7d4d7f68b82d3ad0cc71a2ad2e7f61fc10f1328d917c93cd" -dependencies = [ - "memchr", -] - -[[package]] -name = "quote" -version = "1.0.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "rand" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -dependencies = [ - "getrandom 0.1.16", - "libc", - "rand_chacha 0.2.2", - "rand_core 0.5.1", - "rand_hc", - "rand_pcg", -] - -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha 0.3.1", - "rand_core 0.6.4", -] - -[[package]] -name = "rand_chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" -dependencies = [ - "ppv-lite86", - "rand_core 0.5.1", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core 0.6.4", -] - -[[package]] -name = "rand_core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -dependencies = [ - "getrandom 0.1.16", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom 0.2.8", -] - -[[package]] -name = "rand_hc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -dependencies = [ - "rand_core 0.5.1", -] - -[[package]] -name = "rand_pcg" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16abd0c1b639e9eb4d7c50c0b8100b0d0f849be2349829c740fe8e6eb4816429" -dependencies = [ - "rand_core 0.5.1", -] - -[[package]] -name = "raw-window-handle" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed7e3d950b66e19e0c372f3fa3fbbcf85b1746b571f74e0c2af6042a5c93420a" -dependencies = [ - "cty", -] - -[[package]] -name = "redox_syscall" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" -dependencies = [ - "bitflags", -] - -[[package]] -name = "redox_users" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" -dependencies = [ - "getrandom 0.2.8", - "redox_syscall", - "thiserror", -] - -[[package]] -name = "regex" -version = "1.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48aaa5748ba571fb95cd2c85c09f629215d3a6ece942baa100950af03a34f733" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-automata" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" -dependencies = [ - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.6.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" - -[[package]] -name = "remove_dir_all" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" -dependencies = [ - "winapi", -] - -[[package]] -name = "rustc_version" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee" -dependencies = [ - "semver 0.11.0", -] - -[[package]] -name = "rustc_version" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" -dependencies = [ - "semver 1.0.16", -] - -[[package]] -name = "rustversion" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5583e89e108996506031660fe09baa5011b9dd0341b89029313006d1fb508d70" - -[[package]] -name = "ryu" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b4b9743ed687d4b4bcedf9ff5eaa7398495ae14e61cba0a295704edbc7decde" - -[[package]] -name = "safemem" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072" - -[[package]] -name = "same-file" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "scoped-tls" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" - -[[package]] -name = "scopeguard" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" - -[[package]] -name = "selectors" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df320f1889ac4ba6bc0cdc9c9af7af4bd64bb927bccdf32d81140dc1f9be12fe" -dependencies = [ - "bitflags", - "cssparser", - "derive_more", - "fxhash", - "log", - "matches", - "phf 0.8.0", - "phf_codegen", - "precomputed-hash", - "servo_arc", - "smallvec", - "thin-slice", -] - -[[package]] -name = "semver" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" -dependencies = [ - "semver-parser", -] - -[[package]] -name = "semver" -version = "1.0.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58bc9567378fc7690d6b2addae4e60ac2eeea07becb2c64b9f218b53865cba2a" -dependencies = [ - "serde", -] - -[[package]] -name = "semver-parser" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" -dependencies = [ - "pest", -] - -[[package]] -name = "serde" -version = "1.0.152" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb7d1f0d3021d347a83e556fc4683dea2ea09d87bccdf88ff5c12545d89d5efb" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.152" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af487d118eecd09402d70a5d72551860e788df87b464af30e5ea6a38c75c541e" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "serde_json" -version = "1.0.91" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877c235533714907a8c2464236f5c4b2a17262ef1bd71f38f35ea592c8da6883" -dependencies = [ - "itoa 1.0.5", - "ryu", - "serde", -] - -[[package]] -name = "serde_repr" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a5ec9fa74a20ebbe5d9ac23dac1fc96ba0ecfe9f50f2843b52e537b10fbcb4e" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "serde_with" -version = "1.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "678b5a069e50bf00ecd22d0cd8ddf7c236f68581b03db652061ed5eb13a312ff" -dependencies = [ - "serde", - "serde_with_macros", -] - -[[package]] -name = "serde_with_macros" -version = "1.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e182d6ec6f05393cc0e5ed1bf81ad6db3a8feedf8ee515ecdd369809bcce8082" -dependencies = [ - "darling", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "serialize-to-javascript" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9823f2d3b6a81d98228151fdeaf848206a7855a7a042bbf9bf870449a66cafb" -dependencies = [ - "serde", - "serde_json", - "serialize-to-javascript-impl", -] - -[[package]] -name = "serialize-to-javascript-impl" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74064874e9f6a15f04c1f3cb627902d0e6b410abbf36668afa873c61889f1763" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "servo_arc" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d98238b800e0d1576d8b6e3de32827c2d74bee68bb97748dcf5071fb53965432" -dependencies = [ - "nodrop", - "stable_deref_trait", -] - -[[package]] -name = "sha2" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", -] - -[[package]] -name = "sharded-slab" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31" -dependencies = [ - "lazy_static", -] - -[[package]] -name = "shared_child" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0d94659ad3c2137fef23ae75b03d5241d633f8acded53d672decfa0e6e0caef" -dependencies = [ - "libc", - "winapi", -] - -[[package]] -name = "sidecar" -version = "0.1.0" -dependencies = [ - "serde", - "serde_json", - "tauri", - "tauri-build", -] - -[[package]] -name = "siphasher" -version = "0.3.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" - -[[package]] -name = "slab" -version = "0.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef" -dependencies = [ - "autocfg", -] - -[[package]] -name = "smallvec" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" - -[[package]] -name = "soup2" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2b4d76501d8ba387cf0fefbe055c3e0a59891d09f0f995ae4e4b16f6b60f3c0" -dependencies = [ - "bitflags", - "gio", - "glib", - "libc", - "once_cell", - "soup2-sys", -] - -[[package]] -name = "soup2-sys" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "009ef427103fcb17f802871647a7fa6c60cbb654b4c4e4c0ac60a31c5f6dc9cf" -dependencies = [ - "bitflags", - "gio-sys", - "glib-sys", - "gobject-sys", - "libc", - "system-deps 5.0.0", -] - -[[package]] -name = "stable_deref_trait" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" - -[[package]] -name = "state" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbe866e1e51e8260c9eed836a042a5e7f6726bb2b411dffeaa712e19c388f23b" -dependencies = [ - "loom", -] - -[[package]] -name = "string_cache" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "213494b7a2b503146286049378ce02b482200519accc31872ee8be91fa820a08" -dependencies = [ - "new_debug_unreachable", - "once_cell", - "parking_lot", - "phf_shared 0.10.0", - "precomputed-hash", - "serde", -] - -[[package]] -name = "string_cache_codegen" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bb30289b722be4ff74a408c3cc27edeaad656e06cb1fe8fa9231fa59c728988" -dependencies = [ - "phf_generator 0.10.0", - "phf_shared 0.10.0", - "proc-macro2", - "quote", -] - -[[package]] -name = "strsim" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" - -[[package]] -name = "syn" -version = "1.0.107" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f4064b5b16e03ae50984a5a8ed5d4f8803e6bc1fd170a3cda91a1be4b18e3f5" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "system-deps" -version = "5.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18db855554db7bd0e73e06cf7ba3df39f97812cb11d3f75e71c39bf45171797e" -dependencies = [ - "cfg-expr 0.9.1", - "heck 0.3.3", - "pkg-config", - "toml", - "version-compare 0.0.11", -] - -[[package]] -name = "system-deps" -version = "6.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2955b1fe31e1fa2fbd1976b71cc69a606d7d4da16f6de3333d0c92d51419aeff" -dependencies = [ - "cfg-expr 0.11.0", - "heck 0.4.0", - "pkg-config", - "toml", - "version-compare 0.1.1", -] - -[[package]] -name = "tao" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "704522803dda895767f69198af8351b0a3f4fe2e293c3ca54cce0ecba05a97f2" -dependencies = [ - "bitflags", - "cairo-rs", - "cc", - "cocoa", - "core-foundation", - "core-graphics", - "crossbeam-channel", - "dispatch", - "gdk", - "gdk-pixbuf", - "gdk-sys", - "gdkx11-sys", - "gio", - "glib", - "glib-sys", - "gtk", - "image", - "instant", - "jni", - "lazy_static", - "libc", - "log", - "ndk", - "ndk-context", - "ndk-sys", - "objc", - "once_cell", - "parking_lot", - "png", - "raw-window-handle", - "scopeguard", - "serde", - "tao-macros", - "unicode-segmentation", - "uuid", - "windows", - "windows-implement", - "x11-dl", -] - -[[package]] -name = "tao-macros" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b6fcd8245d45a39ffc8715183d92ae242750eb57b285eb3bcd63dfd512afd09" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "tar" -version = "0.4.38" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b55807c0344e1e6c04d7c965f5289c39a8d94ae23ed5c0b57aabac549f871c6" -dependencies = [ - "filetime", - "libc", - "xattr", -] - -[[package]] -name = "tauri" -version = "1.2.3" -dependencies = [ - "anyhow", - "cocoa", - "dirs-next", - "embed_plist", - "encoding_rs", - "flate2", - "futures-util", - "glib", - "glob", - "gtk", - "heck 0.4.0", - "http", - "ignore", - "objc", - "once_cell", - "os_pipe", - "percent-encoding", - "rand 0.8.5", - "raw-window-handle", - "regex", - "semver 1.0.16", - "serde", - "serde_json", - "serde_repr", - "serialize-to-javascript", - "shared_child", - "state", - "tar", - "tauri-macros", - "tauri-runtime", - "tauri-runtime-wry", - "tauri-utils", - "tempfile", - "thiserror", - "tokio", - "url", - "uuid", - "webkit2gtk", - "webview2-com", - "windows", -] - -[[package]] -name = "tauri-build" -version = "1.2.1" -dependencies = [ - "anyhow", - "cargo_toml", - "heck 0.4.0", - "json-patch", - "quote", - "semver 1.0.16", - "serde_json", - "tauri-codegen", - "tauri-utils", - "winres", -] - -[[package]] -name = "tauri-codegen" -version = "1.2.1" -dependencies = [ - "base64 0.20.0", - "brotli", - "ico", - "json-patch", - "plist", - "png", - "proc-macro2", - "quote", - "regex", - "semver 1.0.16", - "serde", - "serde_json", - "sha2", - "tauri-utils", - "thiserror", - "time", - "uuid", - "walkdir", -] - -[[package]] -name = "tauri-macros" -version = "1.2.1" -dependencies = [ - "heck 0.4.0", - "proc-macro2", - "quote", - "syn", - "tauri-codegen", - "tauri-utils", -] - -[[package]] -name = "tauri-runtime" -version = "0.12.1" -dependencies = [ - "gtk", - "http", - "http-range", - "rand 0.8.5", - "raw-window-handle", - "serde", - "serde_json", - "tauri-utils", - "thiserror", - "url", - "uuid", - "webview2-com", - "windows", -] - -[[package]] -name = "tauri-runtime-wry" -version = "0.12.2" -dependencies = [ - "cocoa", - "gtk", - "percent-encoding", - "rand 0.8.5", - "raw-window-handle", - "tauri-runtime", - "tauri-utils", - "uuid", - "webkit2gtk", - "webview2-com", - "windows", - "wry", -] - -[[package]] -name = "tauri-utils" -version = "1.2.1" -dependencies = [ - "brotli", - "ctor", - "glob", - "heck 0.4.0", - "html5ever", - "infer", - "json-patch", - "kuchiki", - "memchr", - "phf 0.10.1", - "proc-macro2", - "quote", - "semver 1.0.16", - "serde", - "serde_json", - "serde_with", - "thiserror", - "url", - "walkdir", - "windows", -] - -[[package]] -name = "tempfile" -version = "3.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" -dependencies = [ - "cfg-if", - "fastrand", - "libc", - "redox_syscall", - "remove_dir_all", - "winapi", -] - -[[package]] -name = "tendril" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d24a120c5fc464a3458240ee02c299ebcb9d67b5249c8848b09d639dca8d7bb0" -dependencies = [ - "futf", - "mac", - "utf-8", -] - -[[package]] -name = "thin-slice" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eaa81235c7058867fa8c0e7314f33dcce9c215f535d1913822a2b3f5e289f3c" - -[[package]] -name = "thiserror" -version = "1.0.38" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a9cd18aa97d5c45c6603caea1da6628790b37f7a34b6ca89522331c5180fed0" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.38" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fb327af4685e4d03fa8cbcf1716380da910eeb2bb8be417e7f9fd3fb164f36f" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "thread_local" -version = "1.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5516c27b78311c50bf42c071425c560ac799b11c30b31f87e3081965fe5e0180" -dependencies = [ - "once_cell", -] - -[[package]] -name = "time" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a561bf4617eebd33bca6434b988f39ed798e527f51a1e797d0ee4f61c0a38376" -dependencies = [ - "itoa 1.0.5", - "serde", - "time-core", - "time-macros", -] - -[[package]] -name = "time-core" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd" - -[[package]] -name = "time-macros" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d967f99f534ca7e495c575c62638eebc2898a8c84c119b89e250477bc4ba16b2" -dependencies = [ - "time-core", -] - -[[package]] -name = "tinyvec" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" -dependencies = [ - "tinyvec_macros", -] - -[[package]] -name = "tinyvec_macros" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" - -[[package]] -name = "tokio" -version = "1.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "597a12a59981d9e3c38d216785b0c37399f6e415e8d0712047620f189371b0bb" -dependencies = [ - "autocfg", - "bytes", - "memchr", - "num_cpus", - "pin-project-lite", - "windows-sys", -] - -[[package]] -name = "toml" -version = "0.5.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1333c76748e868a4d9d1017b5ab53171dfd095f70c712fdb4653a406547f598f" -dependencies = [ - "serde", -] - -[[package]] -name = "tracing" -version = "0.1.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" -dependencies = [ - "cfg-if", - "pin-project-lite", - "tracing-attributes", - "tracing-core", -] - -[[package]] -name = "tracing-attributes" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "tracing-core" -version = "0.1.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" -dependencies = [ - "once_cell", - "valuable", -] - -[[package]] -name = "tracing-log" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922" -dependencies = [ - "lazy_static", - "log", - "tracing-core", -] - -[[package]] -name = "tracing-subscriber" -version = "0.3.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6176eae26dd70d0c919749377897b54a9276bd7061339665dd68777926b5a70" -dependencies = [ - "matchers", - "nu-ansi-term", - "once_cell", - "regex", - "sharded-slab", - "smallvec", - "thread_local", - "tracing", - "tracing-core", - "tracing-log", -] - -[[package]] -name = "treediff" -version = "4.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52984d277bdf2a751072b5df30ec0377febdb02f7696d64c2d7d54630bac4303" -dependencies = [ - "serde_json", -] - -[[package]] -name = "typenum" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" - -[[package]] -name = "ucd-trie" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e79c4d996edb816c91e4308506774452e55e95c3c9de07b6729e17e15a5ef81" - -[[package]] -name = "unicode-bidi" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" - -[[package]] -name = "unicode-ident" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84a22b9f218b40614adcb3f4ff08b703773ad44fa9423e4e0d346d5db86e4ebc" - -[[package]] -name = "unicode-normalization" -version = "0.1.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" -dependencies = [ - "tinyvec", -] - -[[package]] -name = "unicode-segmentation" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fdbf052a0783de01e944a6ce7a8cb939e295b1e7be835a1112c3b9a7f047a5a" - -[[package]] -name = "url" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" -dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", - "serde", -] - -[[package]] -name = "utf-8" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" - -[[package]] -name = "uuid" -version = "1.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "422ee0de9031b5b948b97a8fc04e3aa35230001a722ddd27943e0be31564ce4c" -dependencies = [ - "getrandom 0.2.8", -] - -[[package]] -name = "valuable" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" - -[[package]] -name = "version-compare" -version = "0.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c18c859eead79d8b95d09e4678566e8d70105c4e7b251f707a03df32442661b" - -[[package]] -name = "version-compare" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "579a42fc0b8e0c63b76519a339be31bed574929511fa53c1a3acae26eb258f29" - -[[package]] -name = "version_check" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "walkdir" -version = "2.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" -dependencies = [ - "same-file", - "winapi", - "winapi-util", -] - -[[package]] -name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" - -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - -[[package]] -name = "webkit2gtk" -version = "0.18.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8f859735e4a452aeb28c6c56a852967a8a76c8eb1cc32dbf931ad28a13d6370" -dependencies = [ - "bitflags", - "cairo-rs", - "gdk", - "gdk-sys", - "gio", - "gio-sys", - "glib", - "glib-sys", - "gobject-sys", - "gtk", - "gtk-sys", - "javascriptcore-rs", - "libc", - "once_cell", - "soup2", - "webkit2gtk-sys", -] - -[[package]] -name = "webkit2gtk-sys" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d76ca6ecc47aeba01ec61e480139dda143796abcae6f83bcddf50d6b5b1dcf3" -dependencies = [ - "atk-sys", - "bitflags", - "cairo-sys-rs", - "gdk-pixbuf-sys", - "gdk-sys", - "gio-sys", - "glib-sys", - "gobject-sys", - "gtk-sys", - "javascriptcore-rs-sys", - "libc", - "pango-sys", - "pkg-config", - "soup2-sys", - "system-deps 6.0.3", -] - -[[package]] -name = "webview2-com" -version = "0.19.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4a769c9f1a64a8734bde70caafac2b96cada12cd4aefa49196b3a386b8b4178" -dependencies = [ - "webview2-com-macros", - "webview2-com-sys", - "windows", - "windows-implement", -] - -[[package]] -name = "webview2-com-macros" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaebe196c01691db62e9e4ca52c5ef1e4fd837dcae27dae3ada599b5a8fd05ac" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "webview2-com-sys" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aac48ef20ddf657755fdcda8dfed2a7b4fc7e4581acce6fe9b88c3d64f29dee7" -dependencies = [ - "regex", - "serde", - "serde_json", - "thiserror", - "windows", - "windows-bindgen", - "windows-metadata", -] - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-util" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" -dependencies = [ - "winapi", -] - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "windows" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1c4bd0a50ac6020f65184721f758dba47bb9fbc2133df715ec74a237b26794a" -dependencies = [ - "windows-implement", - "windows_aarch64_msvc 0.39.0", - "windows_i686_gnu 0.39.0", - "windows_i686_msvc 0.39.0", - "windows_x86_64_gnu 0.39.0", - "windows_x86_64_msvc 0.39.0", -] - -[[package]] -name = "windows-bindgen" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68003dbd0e38abc0fb85b939240f4bce37c43a5981d3df37ccbaaa981b47cb41" -dependencies = [ - "windows-metadata", - "windows-tokens", -] - -[[package]] -name = "windows-implement" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba01f98f509cb5dc05f4e5fc95e535f78260f15fea8fe1a8abdd08f774f1cee7" -dependencies = [ - "syn", - "windows-tokens", -] - -[[package]] -name = "windows-metadata" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ee5e275231f07c6e240d14f34e1b635bf1faa1c76c57cfd59a5cdb9848e4278" - -[[package]] -name = "windows-sys" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" -dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc 0.42.1", - "windows_i686_gnu 0.42.1", - "windows_i686_msvc 0.42.1", - "windows_x86_64_gnu 0.42.1", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc 0.42.1", -] - -[[package]] -name = "windows-tokens" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f838de2fe15fe6bac988e74b798f26499a8b21a9d97edec321e79b28d1d7f597" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec7711666096bd4096ffa835238905bb33fb87267910e154b18b44eaabb340f2" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7" - -[[package]] -name = "windows_i686_gnu" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "763fc57100a5f7042e3057e7e8d9bdd7860d330070251a73d003563a3bb49e1b" - -[[package]] -name = "windows_i686_gnu" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640" - -[[package]] -name = "windows_i686_msvc" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bc7cbfe58828921e10a9f446fcaaf649204dcfe6c1ddd712c5eebae6bda1106" - -[[package]] -name = "windows_i686_msvc" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6868c165637d653ae1e8dc4d82c25d4f97dd6605eaa8d784b5c6e0ab2a252b65" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e4d40883ae9cae962787ca76ba76390ffa29214667a111db9e0a1ad8377e809" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" - -[[package]] -name = "winres" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b68db261ef59e9e52806f688020631e987592bd83619edccda9c47d42cde4f6c" -dependencies = [ - "toml", -] - -[[package]] -name = "wry" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c846dc4dda988e959869dd0802cd27417c9696e584593e49178aeee28890d25" -dependencies = [ - "base64 0.13.1", - "block", - "cocoa", - "core-graphics", - "crossbeam-channel", - "dunce", - "gdk", - "gio", - "glib", - "gtk", - "html5ever", - "http", - "kuchiki", - "libc", - "log", - "objc", - "objc_id", - "once_cell", - "serde", - "serde_json", - "sha2", - "soup2", - "tao", - "thiserror", - "url", - "webkit2gtk", - "webkit2gtk-sys", - "webview2-com", - "windows", - "windows-implement", -] - -[[package]] -name = "x11" -version = "2.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2638d5b9c17ac40575fb54bb461a4b1d2a8d1b4ffcc4ff237d254ec59ddeb82" -dependencies = [ - "libc", - "pkg-config", -] - -[[package]] -name = "x11-dl" -version = "2.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1536d6965a5d4e573c7ef73a2c15ebcd0b2de3347bdf526c34c297c00ac40f0" -dependencies = [ - "lazy_static", - "libc", - "pkg-config", -] - -[[package]] -name = "xattr" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d1526bbe5aaeb5eb06885f4d987bcdfa5e23187055de9b83fe00156a821fabc" -dependencies = [ - "libc", -] diff --git a/examples/sidecar/src-tauri/Cargo.toml b/examples/sidecar/src-tauri/Cargo.toml deleted file mode 100644 index fc190447b6b..00000000000 --- a/examples/sidecar/src-tauri/Cargo.toml +++ /dev/null @@ -1,17 +0,0 @@ -[package] -name = "sidecar" -version = "0.1.0" -description = "A Tauri application with a sidecar binary" -edition = "2021" -rust-version = "1.65" - -[build-dependencies] -tauri-build = { path = "../../../core/tauri-build", features = ["codegen"] } - -[dependencies] -serde_json = "1.0" -serde = { version = "1.0", features = [ "derive" ] } -tauri = { path = "../../../core/tauri", features = ["process-command-api", "shell-sidecar"] } - -[features] -custom-protocol = [ "tauri/custom-protocol" ] diff --git a/examples/sidecar/src-tauri/build.rs b/examples/sidecar/src-tauri/build.rs deleted file mode 100644 index b055ec37c77..00000000000 --- a/examples/sidecar/src-tauri/build.rs +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2019-2023 Tauri Programme within The Commons Conservancy -// SPDX-License-Identifier: Apache-2.0 -// SPDX-License-Identifier: MIT - -fn main() { - tauri_build::build() -} diff --git a/examples/sidecar/src-tauri/src/main.rs b/examples/sidecar/src-tauri/src/main.rs deleted file mode 100644 index 7120d1acaef..00000000000 --- a/examples/sidecar/src-tauri/src/main.rs +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2019-2023 Tauri Programme within The Commons Conservancy -// SPDX-License-Identifier: Apache-2.0 -// SPDX-License-Identifier: MIT - -#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] - -use tauri::{ - process::{Command, CommandEvent}, - Manager, -}; - -fn main() { - tauri::Builder::default() - .setup(|app| { - let window = app.get_window("main").unwrap(); - tauri::async_runtime::spawn(async move { - let (mut rx, mut child) = Command::new_sidecar("app") - .expect("failed to setup `app` sidecar") - .spawn() - .expect("Failed to spawn packaged node"); - - let mut i = 0; - while let Some(event) = rx.recv().await { - if let CommandEvent::Stdout(line) = event { - window - .emit("message", Some(format!("'{}'", line))) - .expect("failed to emit event"); - i += 1; - if i == 4 { - child.write("message from Rust\n".as_bytes()).unwrap(); - i = 0; - } - } - } - }); - - Ok(()) - }) - .run(tauri::generate_context!()) - .expect("error while running tauri application"); -} diff --git a/examples/sidecar/src-tauri/tauri.conf.json b/examples/sidecar/src-tauri/tauri.conf.json deleted file mode 100644 index 2236436299d..00000000000 --- a/examples/sidecar/src-tauri/tauri.conf.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "$schema": "../../../core/tauri-config-schema/schema.json", - "build": { - "distDir": ["../index.html"], - "devPath": ["../index.html"], - "beforeDevCommand": "yarn package", - "beforeBuildCommand": "yarn package", - "withGlobalTauri": true - }, - "package": { - "productName": "Sidecar", - "version": "0.1.0" - }, - "tauri": { - "bundle": { - "active": true, - "targets": "all", - "identifier": "com.tauri.sidecar", - "icon": [ - "../../.icons/32x32.png", - "../../.icons/128x128.png", - "../../.icons/128x128@2x.png", - "../../.icons/icon.icns", - "../../.icons/icon.ico" - ], - "resources": [], - "externalBin": ["binaries/app"], - "copyright": "", - "category": "DeveloperTool", - "shortDescription": "", - "longDescription": "", - "deb": { - "depends": [] - }, - "macOS": { - "frameworks": [], - "exceptionDomain": "" - } - }, - "allowlist": { - "all": false, - "shell": { - "sidecar": true, - "scope": [ - { - "name": "binaries/app", - "sidecar": true - } - ] - } - }, - "windows": [ - { - "title": "Sidecar", - "width": 800, - "height": 600, - "resizable": true, - "fullscreen": false - } - ], - "security": { - "csp": "default-src 'self'" - }, - "updater": { - "active": false - } - } -} diff --git a/examples/sidecar/src/communication.js b/examples/sidecar/src/communication.js deleted file mode 100644 index 8a52032609c..00000000000 --- a/examples/sidecar/src/communication.js +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2019-2023 Tauri Programme within The Commons Conservancy -// SPDX-License-Identifier: Apache-2.0 -// SPDX-License-Identifier: MIT - -const readline = require('readline') - -module.exports = { - onMessage(cb) { - const rl = readline.createInterface({ - input: process.stdin, - output: process.stdout, - terminal: false - }) - - rl.on('line', function (line) { - cb(line) - }) - }, - write(message) { - console.log(message) - } -} diff --git a/examples/sidecar/src/index.js b/examples/sidecar/src/index.js deleted file mode 100644 index c3d76cf694f..00000000000 --- a/examples/sidecar/src/index.js +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright 2019-2023 Tauri Programme within The Commons Conservancy -// SPDX-License-Identifier: Apache-2.0 -// SPDX-License-Identifier: MIT - -const { write, onMessage } = require('./communication') - -onMessage((line) => { - write(`read ${line}`) -}) - -setInterval(() => { - write(`[${new Date().toLocaleTimeString()}] new message`) -}, 500) diff --git a/examples/sidecar/yarn.lock b/examples/sidecar/yarn.lock deleted file mode 100644 index d0e801ebb08..00000000000 --- a/examples/sidecar/yarn.lock +++ /dev/null @@ -1,1134 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@babel/helper-validator-identifier@^7.12.11": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.5.tgz#d0f0e277c512e0c938277faa85a3968c9a44c0e8" - integrity sha512-5lsetuxCLilmVGyiLEfoHBRX8UCFD+1m2x3Rj97WrW3V7H3u4RWRXA4evMjImCsin2J2YT0QaVDGf+z8ondbAg== - -"@babel/parser@7.13.13": - version "7.13.13" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.13.13.tgz#42f03862f4aed50461e543270916b47dd501f0df" - integrity sha512-OhsyMrqygfk5v8HmWwOzlYjJrtLaFhF34MrfG/Z73DgYCI6ojNUTUp2TYbtnjo8PegeJp12eamsNettCQjKjVw== - -"@babel/types@7.13.12": - version "7.13.12" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.13.12.tgz#edbf99208ef48852acdff1c8a681a1e4ade580cd" - integrity sha512-K4nY2xFN4QMvQwkQ+zmBDp6ANMbVNw6BbxWmYA4qNjhR9W+Lj/8ky5MEY2Me5r+B2c6/v6F53oMndG+f9s3IiA== - dependencies: - "@babel/helper-validator-identifier" "^7.12.11" - lodash "^4.17.19" - to-fast-properties "^2.0.0" - -"@nodelib/fs.scandir@2.1.5": - version "2.1.5" - resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" - integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== - dependencies: - "@nodelib/fs.stat" "2.0.5" - run-parallel "^1.1.9" - -"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": - version "2.0.5" - resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" - integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== - -"@nodelib/fs.walk@^1.2.3": - version "1.2.7" - resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.7.tgz#94c23db18ee4653e129abd26fb06f870ac9e1ee2" - integrity sha512-BTIhocbPBSrRmHxOAJFtR18oLhxTtAFDAvL8hY1S3iU8k+E60W/YFs4jrixGzQjMpF4qPXxIQHcjVD9dz1C2QA== - dependencies: - "@nodelib/fs.scandir" "2.1.5" - fastq "^1.6.0" - -agent-base@6: - version "6.0.2" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" - integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== - dependencies: - debug "4" - -ansi-regex@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" - integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8= - -ansi-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" - integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= - -ansi-regex@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" - integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg== - -ansi-styles@^4.0.0, ansi-styles@^4.1.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" - integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== - dependencies: - color-convert "^2.0.1" - -aproba@^1.0.3: - version "1.2.0" - resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" - integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== - -are-we-there-yet@~1.1.2: - version "1.1.5" - resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21" - integrity sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w== - dependencies: - delegates "^1.0.0" - readable-stream "^2.0.6" - -array-union@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" - integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== - -at-least-node@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" - integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== - -base64-js@^1.3.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" - integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== - -bl@^4.0.3: - version "4.1.0" - resolved "https://registry.yarnpkg.com/bl/-/bl-4.1.0.tgz#451535264182bec2fbbc83a62ab98cf11d9f7b3a" - integrity sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w== - dependencies: - buffer "^5.5.0" - inherits "^2.0.4" - readable-stream "^3.4.0" - -braces@^3.0.1: - version "3.0.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" - integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== - dependencies: - fill-range "^7.0.1" - -buffer@^5.5.0: - version "5.7.1" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" - integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== - dependencies: - base64-js "^1.3.1" - ieee754 "^1.1.13" - -chalk@^4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.1.tgz#c80b3fab28bf6371e6863325eee67e618b77e6ad" - integrity sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - -chownr@^1.1.1: - version "1.1.4" - resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" - integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== - -cliui@^7.0.2: - version "7.0.4" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" - integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== - dependencies: - string-width "^4.2.0" - strip-ansi "^6.0.0" - wrap-ansi "^7.0.0" - -code-point-at@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" - integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= - -color-convert@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" - integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== - dependencies: - color-name "~1.1.4" - -color-name@~1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" - integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== - -console-control-strings@^1.0.0, console-control-strings@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" - integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4= - -core-util-is@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" - integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= - -cross-spawn@^7.0.3: - version "7.0.3" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" - integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== - dependencies: - path-key "^3.1.0" - shebang-command "^2.0.0" - which "^2.0.1" - -debug@4: - version "4.3.1" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee" - integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ== - dependencies: - ms "2.1.2" - -decompress-response@^4.2.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-4.2.1.tgz#414023cc7a302da25ce2ec82d0d5238ccafd8986" - integrity sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw== - dependencies: - mimic-response "^2.0.0" - -deep-extend@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" - integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== - -deep-is@~0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" - integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= - -delegates@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" - integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o= - -detect-libc@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" - integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups= - -dir-glob@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" - integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== - dependencies: - path-type "^4.0.0" - -emoji-regex@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" - integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== - -end-of-stream@^1.1.0, end-of-stream@^1.4.1: - version "1.4.4" - resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" - integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== - dependencies: - once "^1.4.0" - -escalade@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" - integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== - -escodegen@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-2.0.0.tgz#5e32b12833e8aa8fa35e1bf0befa89380484c7dd" - integrity sha512-mmHKys/C8BFUGI+MAWNcSYoORYLMdPzjrknd2Vc+bUsjN5bXcr8EhrNB+UTqfL1y3I9c4fw2ihgtMPQLBRiQxw== - dependencies: - esprima "^4.0.1" - estraverse "^5.2.0" - esutils "^2.0.2" - optionator "^0.8.1" - optionalDependencies: - source-map "~0.6.1" - -esprima@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" - integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== - -estraverse@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.2.0.tgz#307df42547e6cc7324d3cf03c155d5cdb8c53880" - integrity sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ== - -esutils@^2.0.2: - version "2.0.3" - resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" - integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== - -execa@5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" - integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== - dependencies: - cross-spawn "^7.0.3" - get-stream "^6.0.0" - human-signals "^2.1.0" - is-stream "^2.0.0" - merge-stream "^2.0.0" - npm-run-path "^4.0.1" - onetime "^5.1.2" - signal-exit "^3.0.3" - strip-final-newline "^2.0.0" - -expand-template@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/expand-template/-/expand-template-2.0.3.tgz#6e14b3fcee0f3a6340ecb57d2e8918692052a47c" - integrity sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg== - -fast-glob@^3.1.1: - version "3.2.5" - resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.5.tgz#7939af2a656de79a4f1901903ee8adcaa7cb9661" - integrity sha512-2DtFcgT68wiTTiwZ2hNdJfcHNke9XOfnwmBRWXhmeKM8rF0TGwmC/Qto3S7RoZKp5cilZbxzO5iTNTQsJ+EeDg== - dependencies: - "@nodelib/fs.stat" "^2.0.2" - "@nodelib/fs.walk" "^1.2.3" - glob-parent "^5.1.0" - merge2 "^1.3.0" - micromatch "^4.0.2" - picomatch "^2.2.1" - -fast-levenshtein@~2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" - integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= - -fastq@^1.6.0: - version "1.11.0" - resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.11.0.tgz#bb9fb955a07130a918eb63c1f5161cc32a5d0858" - integrity sha512-7Eczs8gIPDrVzT+EksYBcupqMyxSHXXrHOLRRxU2/DicV8789MRBRR8+Hc2uWzUupOs4YS4JzBmBxjjCVBxD/g== - dependencies: - reusify "^1.0.4" - -fill-range@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" - integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== - dependencies: - to-regex-range "^5.0.1" - -from2@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/from2/-/from2-2.3.0.tgz#8bfb5502bde4a4d36cfdeea007fcca21d7e382af" - integrity sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8= - dependencies: - inherits "^2.0.1" - readable-stream "^2.0.0" - -fs-constants@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" - integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== - -fs-extra@^9.1.0: - version "9.1.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" - integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ== - dependencies: - at-least-node "^1.0.0" - graceful-fs "^4.2.0" - jsonfile "^6.0.1" - universalify "^2.0.0" - -function-bind@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" - integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== - -gauge@~2.7.3: - version "2.7.4" - resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" - integrity sha1-LANAXHU4w51+s3sxcCLjJfsBi/c= - dependencies: - aproba "^1.0.3" - console-control-strings "^1.0.0" - has-unicode "^2.0.0" - object-assign "^4.1.0" - signal-exit "^3.0.0" - string-width "^1.0.1" - strip-ansi "^3.0.1" - wide-align "^1.1.0" - -get-caller-file@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" - integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== - -get-stream@^6.0.0: - version "6.0.1" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" - integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== - -github-from-package@0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/github-from-package/-/github-from-package-0.0.0.tgz#97fb5d96bfde8973313f20e8288ef9a167fa64ce" - integrity sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4= - -glob-parent@^5.1.0: - version "5.1.2" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" - integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== - dependencies: - is-glob "^4.0.1" - -globby@^11.0.3: - version "11.0.4" - resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.4.tgz#2cbaff77c2f2a62e71e9b2813a67b97a3a3001a5" - integrity sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg== - dependencies: - array-union "^2.1.0" - dir-glob "^3.0.1" - fast-glob "^3.1.1" - ignore "^5.1.4" - merge2 "^1.3.0" - slash "^3.0.0" - -graceful-fs@^4.1.6, graceful-fs@^4.2.0: - version "4.2.6" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.6.tgz#ff040b2b0853b23c3d31027523706f1885d76bee" - integrity sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ== - -has-flag@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" - integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== - -has-unicode@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" - integrity sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk= - -has@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" - integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== - dependencies: - function-bind "^1.1.1" - -https-proxy-agent@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz#e2a90542abb68a762e0a0850f6c9edadfd8506b2" - integrity sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA== - dependencies: - agent-base "6" - debug "4" - -human-signals@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" - integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== - -ieee754@^1.1.13: - version "1.2.1" - resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" - integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== - -ignore@^5.1.4: - version "5.1.8" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57" - integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw== - -inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3: - version "2.0.4" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" - integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== - -ini@~1.3.0: - version "1.3.8" - resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" - integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== - -into-stream@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/into-stream/-/into-stream-6.0.0.tgz#4bfc1244c0128224e18b8870e85b2de8e66c6702" - integrity sha512-XHbaOAvP+uFKUFsOgoNPRjLkwB+I22JFPFe5OjTkQ0nwgj6+pSjb4NmB6VMxaPshLiOf+zcpOCBQuLwC1KHhZA== - dependencies: - from2 "^2.3.0" - p-is-promise "^3.0.0" - -is-core-module@^2.2.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.4.0.tgz#8e9fc8e15027b011418026e98f0e6f4d86305cc1" - integrity sha512-6A2fkfq1rfeQZjxrZJGerpLCTHRNEBiSgnu0+obeJpEPZRUooHgsizvzv0ZjJwOz3iWIHdJtVWJ/tmPr3D21/A== - dependencies: - has "^1.0.3" - -is-extglob@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" - integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= - -is-fullwidth-code-point@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" - integrity sha1-754xOG8DGn8NZDr4L95QxFfvAMs= - dependencies: - number-is-nan "^1.0.0" - -is-fullwidth-code-point@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" - integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= - -is-fullwidth-code-point@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" - integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== - -is-glob@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" - integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== - dependencies: - is-extglob "^2.1.1" - -is-number@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" - integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== - -is-stream@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.0.tgz#bde9c32680d6fae04129d6ac9d921ce7815f78e3" - integrity sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw== - -isarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" - integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= - -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= - -jsonfile@^6.0.1: - version "6.1.0" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" - integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ== - dependencies: - universalify "^2.0.0" - optionalDependencies: - graceful-fs "^4.1.6" - -levn@~0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" - integrity sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4= - dependencies: - prelude-ls "~1.1.2" - type-check "~0.3.2" - -lodash@^4.17.19: - version "4.17.21" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" - integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== - -lru-cache@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" - integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== - dependencies: - yallist "^4.0.0" - -merge-stream@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" - integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== - -merge2@^1.3.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" - integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== - -micromatch@^4.0.2: - version "4.0.4" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.4.tgz#896d519dfe9db25fce94ceb7a500919bf881ebf9" - integrity sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg== - dependencies: - braces "^3.0.1" - picomatch "^2.2.3" - -mimic-fn@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" - integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== - -mimic-response@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-2.1.0.tgz#d13763d35f613d09ec37ebb30bac0469c0ee8f43" - integrity sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA== - -minimist@^1.2.0, minimist@^1.2.3, minimist@^1.2.5: - version "1.2.6" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44" - integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q== - -mkdirp-classic@^0.5.2, mkdirp-classic@^0.5.3: - version "0.5.3" - resolved "https://registry.yarnpkg.com/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz#fa10c9115cc6d8865be221ba47ee9bed78601113" - integrity sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A== - -ms@2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" - integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== - -multistream@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/multistream/-/multistream-4.1.0.tgz#7bf00dfd119556fbc153cff3de4c6d477909f5a8" - integrity sha512-J1XDiAmmNpRCBfIWJv+n0ymC4ABcf/Pl+5YvC5B/D2f/2+8PtHvCNxMPKiQcZyi922Hq69J2YOpb1pTywfifyw== - dependencies: - once "^1.4.0" - readable-stream "^3.6.0" - -napi-build-utils@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/napi-build-utils/-/napi-build-utils-1.0.2.tgz#b1fddc0b2c46e380a0b7a76f984dd47c41a13806" - integrity sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg== - -node-abi@^2.7.0: - version "2.30.0" - resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-2.30.0.tgz#8be53bf3e7945a34eea10e0fc9a5982776cf550b" - integrity sha512-g6bZh3YCKQRdwuO/tSZZYJAw622SjsRfJ2X0Iy4sSOHZ34/sPPdVBn8fev2tj7njzLwuqPw9uMtGsGkO5kIQvg== - dependencies: - semver "^5.4.1" - -node-fetch@^2.6.1: - version "2.6.7" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" - integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ== - dependencies: - whatwg-url "^5.0.0" - -noop-logger@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/noop-logger/-/noop-logger-0.1.1.tgz#94a2b1633c4f1317553007d8966fd0e841b6a4c2" - integrity sha1-lKKxYzxPExdVMAfYlm/Q6EG2pMI= - -npm-run-path@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" - integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== - dependencies: - path-key "^3.0.0" - -npmlog@^4.0.1: - version "4.1.2" - resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" - integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg== - dependencies: - are-we-there-yet "~1.1.2" - console-control-strings "~1.1.0" - gauge "~2.7.3" - set-blocking "~2.0.0" - -number-is-nan@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" - integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= - -object-assign@^4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" - integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= - -once@^1.3.1, once@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= - dependencies: - wrappy "1" - -onetime@^5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" - integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== - dependencies: - mimic-fn "^2.1.0" - -optionator@^0.8.1: - version "0.8.3" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" - integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA== - dependencies: - deep-is "~0.1.3" - fast-levenshtein "~2.0.6" - levn "~0.3.0" - prelude-ls "~1.1.2" - type-check "~0.3.2" - word-wrap "~1.2.3" - -p-is-promise@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-3.0.0.tgz#58e78c7dfe2e163cf2a04ff869e7c1dba64a5971" - integrity sha512-Wo8VsW4IRQSKVXsJCn7TomUaVtyfjVDn3nUP7kE967BQk0CwFpdbZs0X0uk5sW9mkBa9eNM7hCMaG93WUAwxYQ== - -path-key@^3.0.0, path-key@^3.1.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" - integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== - -path-parse@^1.0.6: - version "1.0.7" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" - integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== - -path-type@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" - integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== - -picomatch@^2.2.1, picomatch@^2.2.3: - version "2.3.0" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.0.tgz#f1f061de8f6a4bf022892e2d128234fb98302972" - integrity sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw== - -pkg-fetch@3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/pkg-fetch/-/pkg-fetch-3.1.1.tgz#8f94115d926e71359ed96c211fe022b7a2452f8d" - integrity sha512-3GfpNwbwoTxge2TrVp6Oyz/FZJOoxF1r0+1YikOhnBXa2Di/VOJKtUObFHap76BFnyFo1fwh5vARWFR9TzLKUg== - dependencies: - chalk "^4.1.0" - fs-extra "^9.1.0" - https-proxy-agent "^5.0.0" - node-fetch "^2.6.1" - progress "^2.0.3" - semver "^7.3.5" - yargs "^16.2.0" - -pkg@5.2.1: - version "5.2.1" - resolved "https://registry.yarnpkg.com/pkg/-/pkg-5.2.1.tgz#929294d2dedbcd4427cfc00121a80c151a2a1d4c" - integrity sha512-kQ5Fla+76rdmFJNrEOgoklxAURl3uvhvX+m4LCQCRrI+q2lOgsx9pS02NhNuDVnyXsthluAuXCh5SKcMyw+cWw== - dependencies: - "@babel/parser" "7.13.13" - "@babel/types" "7.13.12" - chalk "^4.1.0" - escodegen "^2.0.0" - fs-extra "^9.1.0" - globby "^11.0.3" - into-stream "^6.0.0" - minimist "^1.2.5" - multistream "^4.1.0" - pkg-fetch "3.1.1" - prebuild-install "6.0.1" - progress "^2.0.3" - resolve "^1.20.0" - stream-meter "^1.0.4" - tslib "2.1.0" - -prebuild-install@6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-6.0.1.tgz#5902172f7a40eb67305b96c2a695db32636ee26d" - integrity sha512-7GOJrLuow8yeiyv75rmvZyeMGzl8mdEX5gY69d6a6bHWmiPevwqFw+tQavhK0EYMaSg3/KD24cWqeQv1EWsqDQ== - dependencies: - detect-libc "^1.0.3" - expand-template "^2.0.3" - github-from-package "0.0.0" - minimist "^1.2.3" - mkdirp-classic "^0.5.3" - napi-build-utils "^1.0.1" - node-abi "^2.7.0" - noop-logger "^0.1.1" - npmlog "^4.0.1" - pump "^3.0.0" - rc "^1.2.7" - simple-get "^3.0.3" - tar-fs "^2.0.0" - tunnel-agent "^0.6.0" - which-pm-runs "^1.0.0" - -prelude-ls@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" - integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= - -process-nextick-args@~2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" - integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== - -progress@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" - integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== - -pump@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" - integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== - dependencies: - end-of-stream "^1.1.0" - once "^1.3.1" - -queue-microtask@^1.2.2: - version "1.2.3" - resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" - integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== - -rc@^1.2.7: - version "1.2.8" - resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" - integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== - dependencies: - deep-extend "^0.6.0" - ini "~1.3.0" - minimist "^1.2.0" - strip-json-comments "~2.0.1" - -readable-stream@^2.0.0, readable-stream@^2.0.6, readable-stream@^2.1.4: - version "2.3.7" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" - integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.3" - isarray "~1.0.0" - process-nextick-args "~2.0.0" - safe-buffer "~5.1.1" - string_decoder "~1.1.1" - util-deprecate "~1.0.1" - -readable-stream@^3.1.1, readable-stream@^3.4.0, readable-stream@^3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" - integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== - dependencies: - inherits "^2.0.3" - string_decoder "^1.1.1" - util-deprecate "^1.0.1" - -require-directory@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" - integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= - -resolve@^1.20.0: - version "1.20.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975" - integrity sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A== - dependencies: - is-core-module "^2.2.0" - path-parse "^1.0.6" - -reusify@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" - integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== - -run-parallel@^1.1.9: - version "1.2.0" - resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" - integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== - dependencies: - queue-microtask "^1.2.2" - -safe-buffer@^5.0.1, safe-buffer@~5.2.0: - version "5.2.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" - integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== - -safe-buffer@~5.1.0, safe-buffer@~5.1.1: - version "5.1.2" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" - integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== - -semver@^5.4.1: - version "5.7.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" - integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== - -semver@^7.3.5: - version "7.3.5" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" - integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== - dependencies: - lru-cache "^6.0.0" - -set-blocking@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" - integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= - -shebang-command@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" - integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== - dependencies: - shebang-regex "^3.0.0" - -shebang-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" - integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== - -signal-exit@^3.0.0, signal-exit@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" - integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA== - -simple-concat@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/simple-concat/-/simple-concat-1.0.1.tgz#f46976082ba35c2263f1c8ab5edfe26c41c9552f" - integrity sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q== - -simple-get@^3.0.3: - version "3.1.1" - resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-3.1.1.tgz#cc7ba77cfbe761036fbfce3d021af25fc5584d55" - integrity sha512-CQ5LTKGfCpvE1K0n2us+kuMPbk/q0EKl82s4aheV9oXjFEz6W/Y7oQFVJuU6QG77hRT4Ghb5RURteF5vnWjupA== - dependencies: - decompress-response "^4.2.0" - once "^1.3.1" - simple-concat "^1.0.0" - -slash@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" - integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== - -source-map@~0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" - integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== - -stream-meter@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/stream-meter/-/stream-meter-1.0.4.tgz#52af95aa5ea760a2491716704dbff90f73afdd1d" - integrity sha1-Uq+Vql6nYKJJFxZwTb/5D3Ov3R0= - dependencies: - readable-stream "^2.1.4" - -string-width@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" - integrity sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M= - dependencies: - code-point-at "^1.0.0" - is-fullwidth-code-point "^1.0.0" - strip-ansi "^3.0.0" - -"string-width@^1.0.2 || 2": - version "2.1.1" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" - integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== - dependencies: - is-fullwidth-code-point "^2.0.0" - strip-ansi "^4.0.0" - -string-width@^4.1.0, string-width@^4.2.0: - version "4.2.2" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.2.tgz#dafd4f9559a7585cfba529c6a0a4f73488ebd4c5" - integrity sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.0" - -string_decoder@^1.1.1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" - integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== - dependencies: - safe-buffer "~5.2.0" - -string_decoder@~1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" - integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== - dependencies: - safe-buffer "~5.1.0" - -strip-ansi@^3.0.0, strip-ansi@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" - integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= - dependencies: - ansi-regex "^2.0.0" - -strip-ansi@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" - integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= - dependencies: - ansi-regex "^3.0.0" - -strip-ansi@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532" - integrity sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w== - dependencies: - ansi-regex "^5.0.0" - -strip-final-newline@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" - integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== - -strip-json-comments@~2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" - integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= - -supports-color@^7.1.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" - integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== - dependencies: - has-flag "^4.0.0" - -tar-fs@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-2.1.1.tgz#489a15ab85f1f0befabb370b7de4f9eb5cbe8784" - integrity sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng== - dependencies: - chownr "^1.1.1" - mkdirp-classic "^0.5.2" - pump "^3.0.0" - tar-stream "^2.1.4" - -tar-stream@^2.1.4: - version "2.2.0" - resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-2.2.0.tgz#acad84c284136b060dc3faa64474aa9aebd77287" - integrity sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ== - dependencies: - bl "^4.0.3" - end-of-stream "^1.4.1" - fs-constants "^1.0.0" - inherits "^2.0.3" - readable-stream "^3.1.1" - -to-fast-properties@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" - integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= - -to-regex-range@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" - integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== - dependencies: - is-number "^7.0.0" - -tr46@~0.0.3: - version "0.0.3" - resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" - integrity sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o= - -tslib@2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.1.0.tgz#da60860f1c2ecaa5703ab7d39bc05b6bf988b97a" - integrity sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A== - -tunnel-agent@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" - integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0= - dependencies: - safe-buffer "^5.0.1" - -type-check@~0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" - integrity sha1-WITKtRLPHTVeP7eE8wgEsrUg23I= - dependencies: - prelude-ls "~1.1.2" - -universalify@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" - integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== - -util-deprecate@^1.0.1, util-deprecate@~1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" - integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= - -webidl-conversions@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" - integrity sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE= - -whatwg-url@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" - integrity sha1-lmRU6HZUYuN2RNNib2dCzotwll0= - dependencies: - tr46 "~0.0.3" - webidl-conversions "^3.0.0" - -which-pm-runs@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/which-pm-runs/-/which-pm-runs-1.0.0.tgz#670b3afbc552e0b55df6b7780ca74615f23ad1cb" - integrity sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs= - -which@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" - integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== - dependencies: - isexe "^2.0.0" - -wide-align@^1.1.0: - version "1.1.3" - resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" - integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== - dependencies: - string-width "^1.0.2 || 2" - -word-wrap@~1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" - integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== - -wrap-ansi@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - -wrappy@1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= - -y18n@^5.0.5: - version "5.0.8" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" - integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== - -yallist@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" - integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== - -yargs-parser@^20.2.2: - version "20.2.7" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.7.tgz#61df85c113edfb5a7a4e36eb8aa60ef423cbc90a" - integrity sha512-FiNkvbeHzB/syOjIUxFDCnhSfzAL8R5vs40MgLFBorXACCOAEaWu0gRZl14vG8MR9AOJIZbmkjhusqBYZ3HTHw== - -yargs@^16.2.0: - version "16.2.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" - integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== - dependencies: - cliui "^7.0.2" - escalade "^3.1.1" - get-caller-file "^2.0.5" - require-directory "^2.1.1" - string-width "^4.2.0" - y18n "^5.0.5" - yargs-parser "^20.2.2" diff --git a/examples/splashscreen/tauri.conf.json b/examples/splashscreen/tauri.conf.json index edb2c8efdee..d4e128ee7a6 100644 --- a/examples/splashscreen/tauri.conf.json +++ b/examples/splashscreen/tauri.conf.json @@ -26,9 +26,6 @@ "copyright": "", "category": "DeveloperTool" }, - "allowlist": { - "all": false - }, "windows": [ { "label": "main", @@ -48,9 +45,6 @@ ], "security": { "csp": "default-src 'self'" - }, - "updater": { - "active": false } } } diff --git a/examples/state/tauri.conf.json b/examples/state/tauri.conf.json index 899e78f631d..4614753a1e9 100644 --- a/examples/state/tauri.conf.json +++ b/examples/state/tauri.conf.json @@ -37,9 +37,6 @@ "exceptionDomain": "" } }, - "allowlist": { - "all": false - }, "windows": [ { "title": "Welcome to Tauri!", @@ -51,9 +48,6 @@ ], "security": { "csp": "default-src 'self'" - }, - "updater": { - "active": false } } } diff --git a/examples/streaming/tauri.conf.json b/examples/streaming/tauri.conf.json index 9e303f1b264..0dfdb7ab360 100644 --- a/examples/streaming/tauri.conf.json +++ b/examples/streaming/tauri.conf.json @@ -37,12 +37,6 @@ "exceptionDomain": "" } }, - "allowlist": { - "all": false, - "protocol": { - "assetScope": ["**/test_video.mp4"] - } - }, "windows": [ { "title": "Welcome to Tauri!", @@ -53,10 +47,10 @@ } ], "security": { - "csp": "default-src 'self'; media-src stream: https://stream.localhost asset: https://asset.localhost" - }, - "updater": { - "active": false + "csp": "default-src 'self'; media-src stream: https://stream.localhost asset: https://asset.localhost", + "assetProtocol": { + "scope": ["**/test_video.mp4"] + } } } } diff --git a/examples/tauri-dynamic-lib/src-tauri/tauri.conf.json b/examples/tauri-dynamic-lib/src-tauri/tauri.conf.json index 773034cdca6..2d54d1dcee1 100644 --- a/examples/tauri-dynamic-lib/src-tauri/tauri.conf.json +++ b/examples/tauri-dynamic-lib/src-tauri/tauri.conf.json @@ -36,9 +36,6 @@ "exceptionDomain": "" } }, - "allowlist": { - "all": false - }, "windows": [ { "title": "Welcome to Tauri!", @@ -50,9 +47,6 @@ ], "security": { "csp": "default-src blob: data: filesystem: ws: wss: http: https: tauri: 'unsafe-eval' 'unsafe-inline' 'self'" - }, - "updater": { - "active": false } } } diff --git a/examples/web/core/tauri/tauri.conf.json b/examples/web/core/tauri/tauri.conf.json index 4306d1bacce..68f4b2ad72f 100644 --- a/examples/web/core/tauri/tauri.conf.json +++ b/examples/web/core/tauri/tauri.conf.json @@ -10,9 +10,6 @@ "version": "0.1.0" }, "tauri": { - "allowlist": { - "all": false - }, "bundle": { "active": true, "category": "DeveloperTool", @@ -59,4 +56,4 @@ } ] } -} \ No newline at end of file +} diff --git a/examples/workspace/src-tauri/tauri.conf.json b/examples/workspace/src-tauri/tauri.conf.json index 707379b2648..b03cf65a5d9 100644 --- a/examples/workspace/src-tauri/tauri.conf.json +++ b/examples/workspace/src-tauri/tauri.conf.json @@ -11,9 +11,6 @@ "productName": "workspace" }, "tauri": { - "allowlist": { - "all": false - }, "bundle": { "active": true, "category": "DeveloperTool", @@ -60,4 +57,4 @@ } ] } -} \ No newline at end of file +} diff --git a/tooling/api/docs/js-api.json b/tooling/api/docs/js-api.json index c841e4475eb..3ea36134aa0 100644 --- a/tooling/api/docs/js-api.json +++ b/tooling/api/docs/js-api.json @@ -1 +1 @@ -{"id":0,"name":"@tauri-apps/api","kind":1,"flags":{},"originalName":"","children":[{"id":1,"name":"event","kind":2,"kindString":"Module","flags":{},"comment":{"summary":[{"kind":"text","text":"The event system allows you to emit events to the backend and listen to events from it.\n\nThis package is also accessible with "},{"kind":"code","text":"`window.__TAURI__.event`"},{"kind":"text","text":" when ["},{"kind":"code","text":"`build.withGlobalTauri`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#buildconfig.withglobaltauri) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":" is set to "},{"kind":"code","text":"`true`"},{"kind":"text","text":"."}]},"children":[{"id":3,"name":"TauriEvent","kind":8,"kindString":"Enumeration","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"children":[{"id":16,"name":"MENU","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":33,"character":2}],"type":{"type":"literal","value":"tauri://menu"}},{"id":10,"name":"WINDOW_BLUR","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":27,"character":2}],"type":{"type":"literal","value":"tauri://blur"}},{"id":6,"name":"WINDOW_CLOSE_REQUESTED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":23,"character":2}],"type":{"type":"literal","value":"tauri://close-requested"}},{"id":7,"name":"WINDOW_CREATED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":24,"character":2}],"type":{"type":"literal","value":"tauri://window-created"}},{"id":8,"name":"WINDOW_DESTROYED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":25,"character":2}],"type":{"type":"literal","value":"tauri://destroyed"}},{"id":13,"name":"WINDOW_FILE_DROP","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":30,"character":2}],"type":{"type":"literal","value":"tauri://file-drop"}},{"id":15,"name":"WINDOW_FILE_DROP_CANCELLED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":32,"character":2}],"type":{"type":"literal","value":"tauri://file-drop-cancelled"}},{"id":14,"name":"WINDOW_FILE_DROP_HOVER","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":31,"character":2}],"type":{"type":"literal","value":"tauri://file-drop-hover"}},{"id":9,"name":"WINDOW_FOCUS","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":26,"character":2}],"type":{"type":"literal","value":"tauri://focus"}},{"id":5,"name":"WINDOW_MOVED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":22,"character":2}],"type":{"type":"literal","value":"tauri://move"}},{"id":4,"name":"WINDOW_RESIZED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":21,"character":2}],"type":{"type":"literal","value":"tauri://resize"}},{"id":11,"name":"WINDOW_SCALE_FACTOR_CHANGED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":28,"character":2}],"type":{"type":"literal","value":"tauri://scale-change"}},{"id":12,"name":"WINDOW_THEME_CHANGED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":29,"character":2}],"type":{"type":"literal","value":"tauri://theme-changed"}}],"groups":[{"title":"Enumeration Members","children":[16,10,6,7,8,13,15,14,9,5,4,11,12]}],"sources":[{"fileName":"event.ts","line":20,"character":12}]},{"id":182,"name":"Event","kind":256,"kindString":"Interface","flags":{},"children":[{"id":183,"name":"event","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Event name"}]},"sources":[{"fileName":"helpers/event.ts","line":10,"character":2}],"type":{"type":"reference","id":2,"name":"EventName"}},{"id":185,"name":"id","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Event identifier used to unlisten"}]},"sources":[{"fileName":"helpers/event.ts","line":14,"character":2}],"type":{"type":"intrinsic","name":"number"}},{"id":186,"name":"payload","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Event payload"}]},"sources":[{"fileName":"helpers/event.ts","line":16,"character":2}],"type":{"type":"reference","id":187,"name":"T"}},{"id":184,"name":"windowLabel","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The label of the window that emitted this event."}]},"sources":[{"fileName":"helpers/event.ts","line":12,"character":2}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[183,185,186,184]}],"sources":[{"fileName":"helpers/event.ts","line":8,"character":17}],"typeParameters":[{"id":187,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}]},{"id":188,"name":"EventCallback","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"helpers/event.ts","line":19,"character":12}],"typeParameters":[{"id":192,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"type":{"type":"reflection","declaration":{"id":189,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"helpers/event.ts","line":19,"character":31}],"signatures":[{"id":190,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":191,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":182,"typeArguments":[{"type":"reference","id":192,"name":"T"}],"name":"Event"}}],"type":{"type":"intrinsic","name":"void"}}]}}},{"id":2,"name":"EventName","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"event.ts","line":15,"character":12}],"type":{"type":"union","types":[{"type":"template-literal","head":"","tail":[[{"type":"reference","id":3,"name":"TauriEvent"},""]]},{"type":"intersection","types":[{"type":"intrinsic","name":"string"},{"type":"reference","typeArguments":[{"type":"intrinsic","name":"never"},{"type":"intrinsic","name":"never"}],"name":"Record","qualifiedName":"Record","package":"typescript"}]}]}},{"id":193,"name":"UnlistenFn","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"helpers/event.ts","line":21,"character":12}],"type":{"type":"reflection","declaration":{"id":194,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"helpers/event.ts","line":21,"character":25}],"signatures":[{"id":195,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"intrinsic","name":"void"}}]}}},{"id":27,"name":"emit","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"event.ts","line":107,"character":15}],"signatures":[{"id":28,"name":"emit","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Emits an event to the backend."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { emit } from '@tauri-apps/api/event';\nawait emit('frontend-loaded', { loggedIn: true, token: 'authToken' });\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":29,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event name. Must include only alphanumeric characters, "},{"kind":"code","text":"`-`"},{"kind":"text","text":", "},{"kind":"code","text":"`/`"},{"kind":"text","text":", "},{"kind":"code","text":"`:`"},{"kind":"text","text":" and "},{"kind":"code","text":"`_`"},{"kind":"text","text":"."}]},"type":{"type":"intrinsic","name":"string"}},{"id":30,"name":"payload","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"intrinsic","name":"unknown"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":17,"name":"listen","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"event.ts","line":57,"character":15}],"signatures":[{"id":18,"name":"listen","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to an event from the backend."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { listen } from '@tauri-apps/api/event';\nconst unlisten = await listen('error', (event) => {\n console.log(`Got error in window ${event.windowLabel}, payload: ${event.payload}`);\n});\n\n// you need to call unlisten if your handler goes out of scope e.g. the component is unmounted\nunlisten();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to a function to unlisten to the event.\nNote that removing the listener is required if your listener goes out of scope e.g. the component is unmounted."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"typeParameter":[{"id":19,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":20,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event name. Must include only alphanumeric characters, "},{"kind":"code","text":"`-`"},{"kind":"text","text":", "},{"kind":"code","text":"`/`"},{"kind":"text","text":", "},{"kind":"code","text":"`:`"},{"kind":"text","text":" and "},{"kind":"code","text":"`_`"},{"kind":"text","text":"."}]},"type":{"type":"reference","id":2,"name":"EventName"}},{"id":21,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event handler callback."}]},"type":{"type":"reference","id":188,"typeArguments":[{"type":"reference","id":19,"name":"T"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":193,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":22,"name":"once","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"event.ts","line":88,"character":15}],"signatures":[{"id":23,"name":"once","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to an one-off event from the backend."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { once } from '@tauri-apps/api/event';\ninterface LoadedPayload {\n loggedIn: boolean,\n token: string\n}\nconst unlisten = await once('loaded', (event) => {\n console.log(`App is loaded, loggedIn: ${event.payload.loggedIn}, token: ${event.payload.token}`);\n});\n\n// you need to call unlisten if your handler goes out of scope e.g. the component is unmounted\nunlisten();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to a function to unlisten to the event.\nNote that removing the listener is required if your listener goes out of scope e.g. the component is unmounted."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"typeParameter":[{"id":24,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":25,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event name. Must include only alphanumeric characters, "},{"kind":"code","text":"`-`"},{"kind":"text","text":", "},{"kind":"code","text":"`/`"},{"kind":"text","text":", "},{"kind":"code","text":"`:`"},{"kind":"text","text":" and "},{"kind":"code","text":"`_`"},{"kind":"text","text":"."}]},"type":{"type":"reference","id":2,"name":"EventName"}},{"id":26,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":188,"typeArguments":[{"type":"reference","id":24,"name":"T"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":193,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]}],"groups":[{"title":"Enumerations","children":[3]},{"title":"Interfaces","children":[182]},{"title":"Type Aliases","children":[188,2,193]},{"title":"Functions","children":[27,17,22]}],"sources":[{"fileName":"event.ts","line":12,"character":0}]},{"id":31,"name":"mocks","kind":2,"kindString":"Module","flags":{},"children":[{"id":43,"name":"clearMocks","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"mocks.ts","line":186,"character":16}],"signatures":[{"id":44,"name":"clearMocks","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Clears mocked functions/data injected by the other functions in this module.\nWhen using a test runner that doesn't provide a fresh window object for each test, calling this function will reset tauri specific properties.\n\n# Example\n\n"},{"kind":"code","text":"```js\nimport { mockWindows, clearMocks } from \"@tauri-apps/api/mocks\"\n\nafterEach(() => {\n clearMocks()\n})\n\ntest(\"mocked windows\", () => {\n mockWindows(\"main\", \"second\", \"third\");\n\n expect(window).toHaveProperty(\"__TAURI_METADATA__\")\n})\n\ntest(\"no mocked windows\", () => {\n expect(window).not.toHaveProperty(\"__TAURI_METADATA__\")\n})\n```"}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"intrinsic","name":"void"}}]},{"id":32,"name":"mockIPC","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"mocks.ts","line":80,"character":16}],"signatures":[{"id":33,"name":"mockIPC","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Intercepts all IPC requests with the given mock handler.\n\nThis function can be used when testing tauri frontend applications or when running the frontend in a Node.js context during static site generation.\n\n# Examples\n\nTesting setup using vitest:\n"},{"kind":"code","text":"```js\nimport { mockIPC, clearMocks } from \"@tauri-apps/api/mocks\"\nimport { invoke } from \"@tauri-apps/api/tauri\"\n\nafterEach(() => {\n clearMocks()\n})\n\ntest(\"mocked command\", () => {\n mockIPC((cmd, args) => {\n switch (cmd) {\n case \"add\":\n return (args.a as number) + (args.b as number);\n default:\n break;\n }\n });\n\n expect(invoke('add', { a: 12, b: 15 })).resolves.toBe(27);\n})\n```"},{"kind":"text","text":"\n\nThe callback function can also return a Promise:\n"},{"kind":"code","text":"```js\nimport { mockIPC, clearMocks } from \"@tauri-apps/api/mocks\"\nimport { invoke } from \"@tauri-apps/api/tauri\"\n\nafterEach(() => {\n clearMocks()\n})\n\ntest(\"mocked command\", () => {\n mockIPC((cmd, args) => {\n if(cmd === \"get_data\") {\n return fetch(\"https://example.com/data.json\")\n .then((response) => response.json())\n }\n });\n\n expect(invoke('get_data')).resolves.toBe({ foo: 'bar' });\n})\n```"}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":34,"name":"cb","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":35,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"mocks.ts","line":81,"character":6}],"signatures":[{"id":36,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":37,"name":"cmd","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":38,"name":"args","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"unknown"}],"name":"Record","qualifiedName":"Record","package":"typescript"}}],"type":{"type":"intrinsic","name":"any"}}]}}}],"type":{"type":"intrinsic","name":"void"}}]},{"id":39,"name":"mockWindows","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"mocks.ts","line":150,"character":16}],"signatures":[{"id":40,"name":"mockWindows","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Mocks one or many window labels.\nIn non-tauri context it is required to call this function *before* using the "},{"kind":"code","text":"`@tauri-apps/api/window`"},{"kind":"text","text":" module.\n\nThis function only mocks the *presence* of windows,\nwindow properties (e.g. width and height) can be mocked like regular IPC calls using the "},{"kind":"code","text":"`mockIPC`"},{"kind":"text","text":" function.\n\n# Examples\n\n"},{"kind":"code","text":"```js\nimport { mockWindows } from \"@tauri-apps/api/mocks\";\nimport { getCurrent } from \"@tauri-apps/api/window\";\n\nmockWindows(\"main\", \"second\", \"third\");\n\nconst win = getCurrent();\n\nwin.label // \"main\"\n```"},{"kind":"text","text":"\n\n"},{"kind":"code","text":"```js\nimport { mockWindows } from \"@tauri-apps/api/mocks\";\n\nmockWindows(\"main\", \"second\", \"third\");\n\nmockIPC((cmd, args) => {\n if (cmd === \"tauri\") {\n if (\n args?.__tauriModule === \"Window\" &&\n args?.message?.cmd === \"manage\" &&\n args?.message?.data?.cmd?.type === \"close\"\n ) {\n console.log('closing window!');\n }\n }\n});\n\nconst { getCurrent } = await import(\"@tauri-apps/api/window\");\n\nconst win = getCurrent();\nawait win.close(); // this will cause the mocked IPC handler to log to the console.\n```"}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":41,"name":"current","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Label of window this JavaScript context is running in."}]},"type":{"type":"intrinsic","name":"string"}},{"id":42,"name":"additionalWindows","kind":32768,"kindString":"Parameter","flags":{"isRest":true},"comment":{"summary":[{"kind":"text","text":"Label of additional windows the app has."}]},"type":{"type":"array","elementType":{"type":"intrinsic","name":"string"}}}],"type":{"type":"intrinsic","name":"void"}}]}],"groups":[{"title":"Functions","children":[43,32,39]}],"sources":[{"fileName":"mocks.ts","line":6,"character":0}]},{"id":45,"name":"path","kind":2,"kindString":"Module","flags":{},"comment":{"summary":[{"kind":"text","text":"The path module provides utilities for working with file and directory paths.\n\nThis package is also accessible with "},{"kind":"code","text":"`window.__TAURI__.path`"},{"kind":"text","text":" when ["},{"kind":"code","text":"`build.withGlobalTauri`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#buildconfig.withglobaltauri) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":" is set to "},{"kind":"code","text":"`true`"},{"kind":"text","text":".\n\nThe APIs must be added to ["},{"kind":"code","text":"`tauri.allowlist.path`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#allowlistconfig.path) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":":\n"},{"kind":"code","text":"```json\n{\n \"tauri\": {\n \"allowlist\": {\n \"path\": {\n \"all\": true, // enable all Path APIs\n }\n }\n }\n}\n```"},{"kind":"text","text":"\nIt is recommended to allowlist only the APIs you use for optimal bundle size and security."}]},"children":[{"id":46,"name":"BaseDirectory","kind":8,"kindString":"Enumeration","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"2.0.0"}]}]},"children":[{"id":62,"name":"AppCache","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":48,"character":2}],"type":{"type":"literal","value":16}},{"id":59,"name":"AppConfig","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":45,"character":2}],"type":{"type":"literal","value":13}},{"id":60,"name":"AppData","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":46,"character":2}],"type":{"type":"literal","value":14}},{"id":61,"name":"AppLocalData","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":47,"character":2}],"type":{"type":"literal","value":15}},{"id":63,"name":"AppLog","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":49,"character":2}],"type":{"type":"literal","value":17}},{"id":47,"name":"Audio","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":33,"character":2}],"type":{"type":"literal","value":1}},{"id":48,"name":"Cache","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":34,"character":2}],"type":{"type":"literal","value":2}},{"id":49,"name":"Config","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":35,"character":2}],"type":{"type":"literal","value":3}},{"id":50,"name":"Data","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":36,"character":2}],"type":{"type":"literal","value":4}},{"id":64,"name":"Desktop","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":51,"character":2}],"type":{"type":"literal","value":18}},{"id":52,"name":"Document","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":38,"character":2}],"type":{"type":"literal","value":6}},{"id":53,"name":"Download","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":39,"character":2}],"type":{"type":"literal","value":7}},{"id":65,"name":"Executable","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":52,"character":2}],"type":{"type":"literal","value":19}},{"id":66,"name":"Font","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":53,"character":2}],"type":{"type":"literal","value":20}},{"id":67,"name":"Home","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":54,"character":2}],"type":{"type":"literal","value":21}},{"id":51,"name":"LocalData","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":37,"character":2}],"type":{"type":"literal","value":5}},{"id":54,"name":"Picture","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":40,"character":2}],"type":{"type":"literal","value":8}},{"id":55,"name":"Public","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":41,"character":2}],"type":{"type":"literal","value":9}},{"id":57,"name":"Resource","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":43,"character":2}],"type":{"type":"literal","value":11}},{"id":68,"name":"Runtime","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":55,"character":2}],"type":{"type":"literal","value":22}},{"id":58,"name":"Temp","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":44,"character":2}],"type":{"type":"literal","value":12}},{"id":69,"name":"Template","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":56,"character":2}],"type":{"type":"literal","value":23}},{"id":56,"name":"Video","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":42,"character":2}],"type":{"type":"literal","value":10}}],"groups":[{"title":"Enumeration Members","children":[62,59,60,61,63,47,48,49,50,64,52,53,65,66,67,51,54,55,57,68,58,69,56]}],"sources":[{"fileName":"path.ts","line":32,"character":5}]},{"id":118,"name":"delimiter","kind":32,"kindString":"Variable","flags":{"isConst":true},"comment":{"summary":[{"kind":"text","text":"Provides the platform-specific path segment delimiter:\n- "},{"kind":"code","text":"`;`"},{"kind":"text","text":" on Windows\n- "},{"kind":"code","text":"`:`"},{"kind":"text","text":" on POSIX"}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"path.ts","line":555,"character":6}],"type":{"type":"union","types":[{"type":"literal","value":";"},{"type":"literal","value":":"}]},"defaultValue":"..."},{"id":117,"name":"sep","kind":32,"kindString":"Variable","flags":{"isConst":true},"comment":{"summary":[{"kind":"text","text":"Provides the platform-specific path segment separator:\n- "},{"kind":"code","text":"`\\` on Windows\n- `"},{"kind":"text","text":"/` on POSIX"}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"path.ts","line":546,"character":6}],"type":{"type":"union","types":[{"type":"literal","value":"\\"},{"type":"literal","value":"/"}]},"defaultValue":"..."},{"id":76,"name":"appCacheDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":121,"character":15}],"signatures":[{"id":77,"name":"appCacheDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the suggested directory for your app's cache files.\nResolves to "},{"kind":"code","text":"`${cacheDir}/${bundleIdentifier}`"},{"kind":"text","text":", where "},{"kind":"code","text":"`bundleIdentifier`"},{"kind":"text","text":" is the value ["},{"kind":"code","text":"`tauri.bundle.identifier`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#bundleconfig.identifier) is configured in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appCacheDir } from '@tauri-apps/api/path';\nconst appCacheDirPath = await appCacheDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.2.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":70,"name":"appConfigDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":70,"character":15}],"signatures":[{"id":71,"name":"appConfigDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the suggested directory for your app's config files.\nResolves to "},{"kind":"code","text":"`${configDir}/${bundleIdentifier}`"},{"kind":"text","text":", where "},{"kind":"code","text":"`bundleIdentifier`"},{"kind":"text","text":" is the value ["},{"kind":"code","text":"`tauri.bundle.identifier`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#bundleconfig.identifier) is configured in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appConfigDir } from '@tauri-apps/api/path';\nconst appConfigDirPath = await appConfigDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.2.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":72,"name":"appDataDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":87,"character":15}],"signatures":[{"id":73,"name":"appDataDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the suggested directory for your app's data files.\nResolves to "},{"kind":"code","text":"`${dataDir}/${bundleIdentifier}`"},{"kind":"text","text":", where "},{"kind":"code","text":"`bundleIdentifier`"},{"kind":"text","text":" is the value ["},{"kind":"code","text":"`tauri.bundle.identifier`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#bundleconfig.identifier) is configured in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appDataDir } from '@tauri-apps/api/path';\nconst appDataDirPath = await appDataDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.2.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":74,"name":"appLocalDataDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":104,"character":15}],"signatures":[{"id":75,"name":"appLocalDataDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the suggested directory for your app's local data files.\nResolves to "},{"kind":"code","text":"`${localDataDir}/${bundleIdentifier}`"},{"kind":"text","text":", where "},{"kind":"code","text":"`bundleIdentifier`"},{"kind":"text","text":" is the value ["},{"kind":"code","text":"`tauri.bundle.identifier`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#bundleconfig.identifier) is configured in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appLocalDataDir } from '@tauri-apps/api/path';\nconst appLocalDataDirPath = await appLocalDataDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.2.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":78,"name":"appLogDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":533,"character":15}],"signatures":[{"id":79,"name":"appLogDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the suggested directory for your app's log files.\n\n#### Platform-specific\n\n- **Linux:** Resolves to "},{"kind":"code","text":"`${configDir}/${bundleIdentifier}/logs`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`${homeDir}/Library/Logs/{bundleIdentifier}`"},{"kind":"text","text":"\n- **Windows:** Resolves to "},{"kind":"code","text":"`${configDir}/${bundleIdentifier}/logs`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appLogDir } from '@tauri-apps/api/path';\nconst appLogDirPath = await appLogDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.2.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":80,"name":"audioDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":143,"character":15}],"signatures":[{"id":81,"name":"audioDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's audio directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to ["},{"kind":"code","text":"`xdg-user-dirs`"},{"kind":"text","text":"](https://www.freedesktop.org/wiki/Software/xdg-user-dirs/)' "},{"kind":"code","text":"`XDG_MUSIC_DIR`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Music`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_Music}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { audioDir } from '@tauri-apps/api/path';\nconst audioDirPath = await audioDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":134,"name":"basename","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":647,"character":15}],"signatures":[{"id":135,"name":"basename","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the last portion of a "},{"kind":"code","text":"`path`"},{"kind":"text","text":". Trailing directory separators are ignored."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { basename, resolveResource } from '@tauri-apps/api/path';\nconst resourcePath = await resolveResource('app.conf');\nconst base = await basename(resourcePath);\nassert(base === 'app.conf');\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":136,"name":"path","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":137,"name":"ext","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"An optional file extension to be removed from the returned path."}]},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":82,"name":"cacheDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":165,"character":15}],"signatures":[{"id":83,"name":"cacheDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's cache directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to "},{"kind":"code","text":"`$XDG_CACHE_HOME`"},{"kind":"text","text":" or "},{"kind":"code","text":"`$HOME/.cache`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Library/Caches`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_LocalAppData}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { cacheDir } from '@tauri-apps/api/path';\nconst cacheDirPath = await cacheDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":84,"name":"configDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":187,"character":15}],"signatures":[{"id":85,"name":"configDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's config directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to "},{"kind":"code","text":"`$XDG_CONFIG_HOME`"},{"kind":"text","text":" or "},{"kind":"code","text":"`$HOME/.config`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Library/Application Support`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_RoamingAppData}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { configDir } from '@tauri-apps/api/path';\nconst configDirPath = await configDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":86,"name":"dataDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":209,"character":15}],"signatures":[{"id":87,"name":"dataDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's data directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to "},{"kind":"code","text":"`$XDG_DATA_HOME`"},{"kind":"text","text":" or "},{"kind":"code","text":"`$HOME/.local/share`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Library/Application Support`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_RoamingAppData}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { dataDir } from '@tauri-apps/api/path';\nconst dataDirPath = await dataDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":88,"name":"desktopDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":231,"character":15}],"signatures":[{"id":89,"name":"desktopDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's desktop directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to ["},{"kind":"code","text":"`xdg-user-dirs`"},{"kind":"text","text":"](https://www.freedesktop.org/wiki/Software/xdg-user-dirs/)' "},{"kind":"code","text":"`XDG_DESKTOP_DIR`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Desktop`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_Desktop}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { desktopDir } from '@tauri-apps/api/path';\nconst desktopPath = await desktopDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":128,"name":"dirname","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":613,"character":15}],"signatures":[{"id":129,"name":"dirname","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the directory name of a "},{"kind":"code","text":"`path`"},{"kind":"text","text":". Trailing directory separators are ignored."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { dirname, appDataDir } from '@tauri-apps/api/path';\nconst appDataDirPath = await appDataDir();\nconst dir = await dirname(appDataDirPath);\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":130,"name":"path","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":90,"name":"documentDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":253,"character":15}],"signatures":[{"id":91,"name":"documentDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's document directory."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { documentDir } from '@tauri-apps/api/path';\nconst documentDirPath = await documentDir();\n```"},{"kind":"text","text":"\n\n#### Platform-specific\n\n- **Linux:** Resolves to ["},{"kind":"code","text":"`xdg-user-dirs`"},{"kind":"text","text":"](https://www.freedesktop.org/wiki/Software/xdg-user-dirs/)' "},{"kind":"code","text":"`XDG_DOCUMENTS_DIR`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Documents`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_Documents}`"},{"kind":"text","text":"."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":92,"name":"downloadDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":275,"character":15}],"signatures":[{"id":93,"name":"downloadDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's download directory.\n\n#### Platform-specific\n\n- **Linux**: Resolves to ["},{"kind":"code","text":"`xdg-user-dirs`"},{"kind":"text","text":"](https://www.freedesktop.org/wiki/Software/xdg-user-dirs/)' "},{"kind":"code","text":"`XDG_DOWNLOAD_DIR`"},{"kind":"text","text":".\n- **macOS**: Resolves to "},{"kind":"code","text":"`$HOME/Downloads`"},{"kind":"text","text":".\n- **Windows**: Resolves to "},{"kind":"code","text":"`{FOLDERID_Downloads}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { downloadDir } from '@tauri-apps/api/path';\nconst downloadDirPath = await downloadDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":94,"name":"executableDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":297,"character":15}],"signatures":[{"id":95,"name":"executableDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's executable directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to "},{"kind":"code","text":"`$XDG_BIN_HOME/../bin`"},{"kind":"text","text":" or "},{"kind":"code","text":"`$XDG_DATA_HOME/../bin`"},{"kind":"text","text":" or "},{"kind":"code","text":"`$HOME/.local/bin`"},{"kind":"text","text":".\n- **macOS:** Not supported.\n- **Windows:** Not supported."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { executableDir } from '@tauri-apps/api/path';\nconst executableDirPath = await executableDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":131,"name":"extname","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":629,"character":15}],"signatures":[{"id":132,"name":"extname","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the extension of the "},{"kind":"code","text":"`path`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { extname, resolveResource } from '@tauri-apps/api/path';\nconst resourcePath = await resolveResource('app.conf');\nconst ext = await extname(resourcePath);\nassert(ext === 'conf');\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":133,"name":"path","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":96,"name":"fontDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":319,"character":15}],"signatures":[{"id":97,"name":"fontDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's font directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to "},{"kind":"code","text":"`$XDG_DATA_HOME/fonts`"},{"kind":"text","text":" or "},{"kind":"code","text":"`$HOME/.local/share/fonts`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Library/Fonts`"},{"kind":"text","text":".\n- **Windows:** Not supported."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { fontDir } from '@tauri-apps/api/path';\nconst fontDirPath = await fontDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":98,"name":"homeDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":341,"character":15}],"signatures":[{"id":99,"name":"homeDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's home directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to "},{"kind":"code","text":"`$HOME`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_Profile}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { homeDir } from '@tauri-apps/api/path';\nconst homeDirPath = await homeDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":138,"name":"isAbsolute","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":661,"character":15}],"signatures":[{"id":139,"name":"isAbsolute","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns whether the path is absolute or not."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { isAbsolute } from '@tauri-apps/api/path';\nassert(await isAbsolute('/home/tauri'));\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":140,"name":"path","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":125,"name":"join","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":598,"character":15}],"signatures":[{"id":126,"name":"join","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Joins all given "},{"kind":"code","text":"`path`"},{"kind":"text","text":" segments together using the platform-specific separator as a delimiter, then normalizes the resulting path."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { join, appDataDir } from '@tauri-apps/api/path';\nconst appDataDirPath = await appDataDir();\nconst path = await join(appDataDirPath, 'users', 'tauri', 'avatar.png');\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":127,"name":"paths","kind":32768,"kindString":"Parameter","flags":{"isRest":true},"type":{"type":"array","elementType":{"type":"intrinsic","name":"string"}}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":100,"name":"localDataDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":363,"character":15}],"signatures":[{"id":101,"name":"localDataDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's local data directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to "},{"kind":"code","text":"`$XDG_DATA_HOME`"},{"kind":"text","text":" or "},{"kind":"code","text":"`$HOME/.local/share`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Library/Application Support`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_LocalAppData}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { localDataDir } from '@tauri-apps/api/path';\nconst localDataDirPath = await localDataDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":122,"name":"normalize","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":583,"character":15}],"signatures":[{"id":123,"name":"normalize","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Normalizes the given "},{"kind":"code","text":"`path`"},{"kind":"text","text":", resolving "},{"kind":"code","text":"`'..'`"},{"kind":"text","text":" and "},{"kind":"code","text":"`'.'`"},{"kind":"text","text":" segments and resolve symbolic links."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { normalize, appDataDir } from '@tauri-apps/api/path';\nconst appDataDirPath = await appDataDir();\nconst path = await normalize(appDataDirPath, '..', 'users', 'tauri', 'avatar.png');\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":124,"name":"path","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":102,"name":"pictureDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":385,"character":15}],"signatures":[{"id":103,"name":"pictureDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's picture directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to ["},{"kind":"code","text":"`xdg-user-dirs`"},{"kind":"text","text":"](https://www.freedesktop.org/wiki/Software/xdg-user-dirs/)' "},{"kind":"code","text":"`XDG_PICTURES_DIR`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Pictures`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_Pictures}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { pictureDir } from '@tauri-apps/api/path';\nconst pictureDirPath = await pictureDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":104,"name":"publicDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":407,"character":15}],"signatures":[{"id":105,"name":"publicDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's public directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to ["},{"kind":"code","text":"`xdg-user-dirs`"},{"kind":"text","text":"](https://www.freedesktop.org/wiki/Software/xdg-user-dirs/)' "},{"kind":"code","text":"`XDG_PUBLICSHARE_DIR`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Public`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_Public}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { publicDir } from '@tauri-apps/api/path';\nconst publicDirPath = await publicDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":119,"name":"resolve","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":568,"character":15}],"signatures":[{"id":120,"name":"resolve","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Resolves a sequence of "},{"kind":"code","text":"`paths`"},{"kind":"text","text":" or "},{"kind":"code","text":"`path`"},{"kind":"text","text":" segments into an absolute path."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { resolve, appDataDir } from '@tauri-apps/api/path';\nconst appDataDirPath = await appDataDir();\nconst path = await resolve(appDataDirPath, '..', 'users', 'tauri', 'avatar.png');\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":121,"name":"paths","kind":32768,"kindString":"Parameter","flags":{"isRest":true},"type":{"type":"array","elementType":{"type":"intrinsic","name":"string"}}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":108,"name":"resolveResource","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":444,"character":15}],"signatures":[{"id":109,"name":"resolveResource","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Resolve the path to a resource file."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { resolveResource } from '@tauri-apps/api/path';\nconst resourcePath = await resolveResource('script.sh');\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"The full path to the resource."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":110,"name":"resourcePath","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The path to the resource.\nMust follow the same syntax as defined in "},{"kind":"code","text":"`tauri.conf.json > tauri > bundle > resources`"},{"kind":"text","text":", i.e. keeping subfolders and parent dir components ("},{"kind":"code","text":"`../`"},{"kind":"text","text":")."}]},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":106,"name":"resourceDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":424,"character":15}],"signatures":[{"id":107,"name":"resourceDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the application's resource directory.\nTo resolve a resource path, see the [[resolveResource | "},{"kind":"code","text":"`resolveResource API`"},{"kind":"text","text":"]]."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { resourceDir } from '@tauri-apps/api/path';\nconst resourceDirPath = await resourceDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":111,"name":"runtimeDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":467,"character":15}],"signatures":[{"id":112,"name":"runtimeDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's runtime directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to "},{"kind":"code","text":"`$XDG_RUNTIME_DIR`"},{"kind":"text","text":".\n- **macOS:** Not supported.\n- **Windows:** Not supported."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { runtimeDir } from '@tauri-apps/api/path';\nconst runtimeDirPath = await runtimeDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":113,"name":"templateDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":489,"character":15}],"signatures":[{"id":114,"name":"templateDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's template directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to ["},{"kind":"code","text":"`xdg-user-dirs`"},{"kind":"text","text":"](https://www.freedesktop.org/wiki/Software/xdg-user-dirs/)' "},{"kind":"code","text":"`XDG_TEMPLATES_DIR`"},{"kind":"text","text":".\n- **macOS:** Not supported.\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_Templates}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { templateDir } from '@tauri-apps/api/path';\nconst templateDirPath = await templateDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":115,"name":"videoDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":511,"character":15}],"signatures":[{"id":116,"name":"videoDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's video directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to ["},{"kind":"code","text":"`xdg-user-dirs`"},{"kind":"text","text":"](https://www.freedesktop.org/wiki/Software/xdg-user-dirs/)' "},{"kind":"code","text":"`XDG_VIDEOS_DIR`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Movies`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_Videos}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { videoDir } from '@tauri-apps/api/path';\nconst videoDirPath = await videoDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]}],"groups":[{"title":"Enumerations","children":[46]},{"title":"Variables","children":[118,117]},{"title":"Functions","children":[76,70,72,74,78,80,134,82,84,86,88,128,90,92,94,131,96,98,138,125,100,122,102,104,119,108,106,111,113,115]}],"sources":[{"fileName":"path.ts","line":26,"character":0}]},{"id":141,"name":"tauri","kind":2,"kindString":"Module","flags":{},"comment":{"summary":[{"kind":"text","text":"Invoke your custom commands.\n\nThis package is also accessible with "},{"kind":"code","text":"`window.__TAURI__.tauri`"},{"kind":"text","text":" when ["},{"kind":"code","text":"`build.withGlobalTauri`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#buildconfig.withglobaltauri) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":" is set to "},{"kind":"code","text":"`true`"},{"kind":"text","text":"."}]},"children":[{"id":150,"name":"Channel","kind":128,"kindString":"Class","flags":{},"children":[{"id":151,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"tauri.ts","line":66,"character":2}],"signatures":[{"id":152,"name":"new Channel","kind":16384,"kindString":"Constructor signature","flags":{},"typeParameter":[{"id":153,"name":"T","kind":131072,"kindString":"Type parameter","flags":{},"default":{"type":"intrinsic","name":"unknown"}}],"type":{"type":"reference","id":150,"typeArguments":[{"type":"reference","id":153,"name":"T"}],"name":"Channel"}}]},{"id":156,"name":"#onmessage","kind":1024,"kindString":"Property","flags":{"isPrivate":true},"sources":[{"fileName":"tauri.ts","line":62,"character":2}],"type":{"type":"reflection","declaration":{"id":157,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"tauri.ts","line":62,"character":14}],"signatures":[{"id":158,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":159,"name":"response","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":153,"name":"T"}}],"type":{"type":"intrinsic","name":"void"}}]}},"defaultValue":"..."},{"id":155,"name":"__TAURI_CHANNEL_MARKER__","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isReadonly":true},"sources":[{"fileName":"tauri.ts","line":61,"character":19}],"type":{"type":"literal","value":true},"defaultValue":"true"},{"id":154,"name":"id","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"tauri.ts","line":59,"character":2}],"type":{"type":"intrinsic","name":"number"}},{"id":160,"name":"onmessage","kind":262144,"kindString":"Accessor","flags":{},"sources":[{"fileName":"tauri.ts","line":72,"character":6},{"fileName":"tauri.ts","line":76,"character":6}],"getSignature":{"id":161,"name":"onmessage","kind":524288,"kindString":"Get signature","flags":{},"type":{"type":"reflection","declaration":{"id":162,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"tauri.ts","line":76,"character":19}],"signatures":[{"id":163,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":164,"name":"response","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":153,"name":"T"}}],"type":{"type":"intrinsic","name":"void"}}]}}},"setSignature":{"id":165,"name":"onmessage","kind":1048576,"kindString":"Set signature","flags":{},"parameters":[{"id":166,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":167,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"tauri.ts","line":72,"character":25}],"signatures":[{"id":168,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":169,"name":"response","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":153,"name":"T"}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"intrinsic","name":"void"}}},{"id":170,"name":"toJSON","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"tauri.ts","line":80,"character":2}],"signatures":[{"id":171,"name":"toJSON","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"intrinsic","name":"string"}}]}],"groups":[{"title":"Constructors","children":[151]},{"title":"Properties","children":[156,155,154]},{"title":"Accessors","children":[160]},{"title":"Methods","children":[170]}],"sources":[{"fileName":"tauri.ts","line":58,"character":6}],"typeParameters":[{"id":172,"name":"T","kind":131072,"kindString":"Type parameter","flags":{},"default":{"type":"intrinsic","name":"unknown"}}]},{"id":142,"name":"InvokeArgs","kind":4194304,"kindString":"Type alias","flags":{},"comment":{"summary":[{"kind":"text","text":"Command arguments."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"tauri.ts","line":90,"character":5}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"unknown"}],"name":"Record","qualifiedName":"Record","package":"typescript"}},{"id":178,"name":"convertFileSrc","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"tauri.ts","line":156,"character":9}],"signatures":[{"id":179,"name":"convertFileSrc","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Convert a device file path to an URL that can be loaded by the webview.\nNote that "},{"kind":"code","text":"`asset:`"},{"kind":"text","text":" and "},{"kind":"code","text":"`https://asset.localhost`"},{"kind":"text","text":" must be added to ["},{"kind":"code","text":"`tauri.security.csp`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#securityconfig.csp) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":".\nExample CSP value: "},{"kind":"code","text":"`\"csp\": \"default-src 'self'; img-src 'self' asset: https://asset.localhost\"`"},{"kind":"text","text":" to use the asset protocol on image sources.\n\nAdditionally, "},{"kind":"code","text":"`asset`"},{"kind":"text","text":" must be added to ["},{"kind":"code","text":"`tauri.allowlist.protocol`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#allowlistconfig.protocol)\nin "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":" and its access scope must be defined on the "},{"kind":"code","text":"`assetScope`"},{"kind":"text","text":" array on the same "},{"kind":"code","text":"`protocol`"},{"kind":"text","text":" object."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appDataDir, join } from '@tauri-apps/api/path';\nimport { convertFileSrc } from '@tauri-apps/api/tauri';\nconst appDataDirPath = await appDataDir();\nconst filePath = await join(appDataDirPath, 'assets/video.mp4');\nconst assetUrl = convertFileSrc(filePath);\n\nconst video = document.getElementById('my-video');\nconst source = document.createElement('source');\nsource.type = 'video/mp4';\nsource.src = assetUrl;\nvideo.appendChild(source);\nvideo.load();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"the URL that can be used as source on the webview."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":180,"name":"filePath","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The file path."}]},"type":{"type":"intrinsic","name":"string"}},{"id":181,"name":"protocol","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The protocol to use. Defaults to "},{"kind":"code","text":"`asset`"},{"kind":"text","text":". You only need to set this when using a custom protocol."}]},"type":{"type":"intrinsic","name":"string"},"defaultValue":"'asset'"}],"type":{"type":"intrinsic","name":"string"}}]},{"id":173,"name":"invoke","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"tauri.ts","line":106,"character":15}],"signatures":[{"id":174,"name":"invoke","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Sends a message to the backend."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { invoke } from '@tauri-apps/api/tauri';\nawait invoke('login', { user: 'tauri', password: 'poiwe3h4r5ip3yrhtew9ty' });\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving or rejecting to the backend response."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"typeParameter":[{"id":175,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":176,"name":"cmd","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The command name."}]},"type":{"type":"intrinsic","name":"string"}},{"id":177,"name":"args","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The optional arguments to pass to the command."}]},"type":{"type":"reference","id":142,"name":"InvokeArgs"},"defaultValue":"{}"}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":175,"name":"T"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":143,"name":"transformCallback","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"tauri.ts","line":36,"character":9}],"signatures":[{"id":144,"name":"transformCallback","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Transforms a callback function to a string identifier that can be passed to the backend.\nThe backend uses the identifier to "},{"kind":"code","text":"`eval()`"},{"kind":"text","text":" the callback."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"A unique identifier associated with the callback function."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":145,"name":"callback","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reflection","declaration":{"id":146,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"tauri.ts","line":37,"character":13}],"signatures":[{"id":147,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":148,"name":"response","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"any"}}],"type":{"type":"intrinsic","name":"void"}}]}}},{"id":149,"name":"once","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"boolean"},"defaultValue":"false"}],"type":{"type":"intrinsic","name":"number"}}]}],"groups":[{"title":"Classes","children":[150]},{"title":"Type Aliases","children":[142]},{"title":"Functions","children":[178,173,143]}],"sources":[{"fileName":"tauri.ts","line":13,"character":0}]}],"groups":[{"title":"Modules","children":[1,31,45,141]}]} \ No newline at end of file +{"id":0,"name":"@tauri-apps/api","kind":1,"flags":{},"originalName":"","children":[{"id":1,"name":"event","kind":2,"kindString":"Module","flags":{},"comment":{"summary":[{"kind":"text","text":"The event system allows you to emit events to the backend and listen to events from it.\n\nThis package is also accessible with "},{"kind":"code","text":"`window.__TAURI__.event`"},{"kind":"text","text":" when ["},{"kind":"code","text":"`build.withGlobalTauri`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#buildconfig.withglobaltauri) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":" is set to "},{"kind":"code","text":"`true`"},{"kind":"text","text":"."}]},"children":[{"id":3,"name":"TauriEvent","kind":8,"kindString":"Enumeration","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"children":[{"id":16,"name":"MENU","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":33,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/63506f2d/tooling/api/src/event.ts#L33"}],"type":{"type":"literal","value":"tauri://menu"}},{"id":10,"name":"WINDOW_BLUR","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":27,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/63506f2d/tooling/api/src/event.ts#L27"}],"type":{"type":"literal","value":"tauri://blur"}},{"id":6,"name":"WINDOW_CLOSE_REQUESTED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":23,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/63506f2d/tooling/api/src/event.ts#L23"}],"type":{"type":"literal","value":"tauri://close-requested"}},{"id":7,"name":"WINDOW_CREATED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":24,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/63506f2d/tooling/api/src/event.ts#L24"}],"type":{"type":"literal","value":"tauri://window-created"}},{"id":8,"name":"WINDOW_DESTROYED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":25,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/63506f2d/tooling/api/src/event.ts#L25"}],"type":{"type":"literal","value":"tauri://destroyed"}},{"id":13,"name":"WINDOW_FILE_DROP","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":30,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/63506f2d/tooling/api/src/event.ts#L30"}],"type":{"type":"literal","value":"tauri://file-drop"}},{"id":15,"name":"WINDOW_FILE_DROP_CANCELLED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":32,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/63506f2d/tooling/api/src/event.ts#L32"}],"type":{"type":"literal","value":"tauri://file-drop-cancelled"}},{"id":14,"name":"WINDOW_FILE_DROP_HOVER","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":31,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/63506f2d/tooling/api/src/event.ts#L31"}],"type":{"type":"literal","value":"tauri://file-drop-hover"}},{"id":9,"name":"WINDOW_FOCUS","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":26,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/63506f2d/tooling/api/src/event.ts#L26"}],"type":{"type":"literal","value":"tauri://focus"}},{"id":5,"name":"WINDOW_MOVED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":22,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/63506f2d/tooling/api/src/event.ts#L22"}],"type":{"type":"literal","value":"tauri://move"}},{"id":4,"name":"WINDOW_RESIZED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":21,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/63506f2d/tooling/api/src/event.ts#L21"}],"type":{"type":"literal","value":"tauri://resize"}},{"id":11,"name":"WINDOW_SCALE_FACTOR_CHANGED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":28,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/63506f2d/tooling/api/src/event.ts#L28"}],"type":{"type":"literal","value":"tauri://scale-change"}},{"id":12,"name":"WINDOW_THEME_CHANGED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":29,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/63506f2d/tooling/api/src/event.ts#L29"}],"type":{"type":"literal","value":"tauri://theme-changed"}}],"groups":[{"title":"Enumeration Members","children":[16,10,6,7,8,13,15,14,9,5,4,11,12]}],"sources":[{"fileName":"event.ts","line":20,"character":12,"url":"https://github.com/tauri-apps/tauri/blob/63506f2d/tooling/api/src/event.ts#L20"}]},{"id":86,"name":"Event","kind":256,"kindString":"Interface","flags":{},"children":[{"id":87,"name":"event","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Event name"}]},"sources":[{"fileName":"helpers/event.ts","line":10,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/63506f2d/tooling/api/src/helpers/event.ts#L10"}],"type":{"type":"reference","id":2,"name":"EventName"}},{"id":89,"name":"id","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Event identifier used to unlisten"}]},"sources":[{"fileName":"helpers/event.ts","line":14,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/63506f2d/tooling/api/src/helpers/event.ts#L14"}],"type":{"type":"intrinsic","name":"number"}},{"id":90,"name":"payload","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Event payload"}]},"sources":[{"fileName":"helpers/event.ts","line":16,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/63506f2d/tooling/api/src/helpers/event.ts#L16"}],"type":{"type":"reference","id":91,"name":"T"}},{"id":88,"name":"windowLabel","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The label of the window that emitted this event."}]},"sources":[{"fileName":"helpers/event.ts","line":12,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/63506f2d/tooling/api/src/helpers/event.ts#L12"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[87,89,90,88]}],"sources":[{"fileName":"helpers/event.ts","line":8,"character":17,"url":"https://github.com/tauri-apps/tauri/blob/63506f2d/tooling/api/src/helpers/event.ts#L8"}],"typeParameters":[{"id":91,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}]},{"id":92,"name":"EventCallback","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"helpers/event.ts","line":19,"character":12,"url":"https://github.com/tauri-apps/tauri/blob/63506f2d/tooling/api/src/helpers/event.ts#L19"}],"typeParameters":[{"id":96,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"type":{"type":"reflection","declaration":{"id":93,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"helpers/event.ts","line":19,"character":31,"url":"https://github.com/tauri-apps/tauri/blob/63506f2d/tooling/api/src/helpers/event.ts#L19"}],"signatures":[{"id":94,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":95,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":86,"typeArguments":[{"type":"reference","id":96,"name":"T"}],"name":"Event"}}],"type":{"type":"intrinsic","name":"void"}}]}}},{"id":2,"name":"EventName","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"event.ts","line":15,"character":12,"url":"https://github.com/tauri-apps/tauri/blob/63506f2d/tooling/api/src/event.ts#L15"}],"type":{"type":"union","types":[{"type":"template-literal","head":"","tail":[[{"type":"reference","id":3,"name":"TauriEvent"},""]]},{"type":"intersection","types":[{"type":"intrinsic","name":"string"},{"type":"reference","typeArguments":[{"type":"intrinsic","name":"never"},{"type":"intrinsic","name":"never"}],"name":"Record","qualifiedName":"Record","package":"typescript"}]}]}},{"id":97,"name":"UnlistenFn","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"helpers/event.ts","line":21,"character":12,"url":"https://github.com/tauri-apps/tauri/blob/63506f2d/tooling/api/src/helpers/event.ts#L21"}],"type":{"type":"reflection","declaration":{"id":98,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"helpers/event.ts","line":21,"character":25,"url":"https://github.com/tauri-apps/tauri/blob/63506f2d/tooling/api/src/helpers/event.ts#L21"}],"signatures":[{"id":99,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"intrinsic","name":"void"}}]}}},{"id":27,"name":"emit","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"event.ts","line":107,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/63506f2d/tooling/api/src/event.ts#L107"}],"signatures":[{"id":28,"name":"emit","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Emits an event to the backend."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { emit } from '@tauri-apps/api/event';\nawait emit('frontend-loaded', { loggedIn: true, token: 'authToken' });\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":29,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event name. Must include only alphanumeric characters, "},{"kind":"code","text":"`-`"},{"kind":"text","text":", "},{"kind":"code","text":"`/`"},{"kind":"text","text":", "},{"kind":"code","text":"`:`"},{"kind":"text","text":" and "},{"kind":"code","text":"`_`"},{"kind":"text","text":"."}]},"type":{"type":"intrinsic","name":"string"}},{"id":30,"name":"payload","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"intrinsic","name":"unknown"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":17,"name":"listen","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"event.ts","line":57,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/63506f2d/tooling/api/src/event.ts#L57"}],"signatures":[{"id":18,"name":"listen","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to an event from the backend."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { listen } from '@tauri-apps/api/event';\nconst unlisten = await listen('error', (event) => {\n console.log(`Got error in window ${event.windowLabel}, payload: ${event.payload}`);\n});\n\n// you need to call unlisten if your handler goes out of scope e.g. the component is unmounted\nunlisten();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to a function to unlisten to the event.\nNote that removing the listener is required if your listener goes out of scope e.g. the component is unmounted."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"typeParameter":[{"id":19,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":20,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event name. Must include only alphanumeric characters, "},{"kind":"code","text":"`-`"},{"kind":"text","text":", "},{"kind":"code","text":"`/`"},{"kind":"text","text":", "},{"kind":"code","text":"`:`"},{"kind":"text","text":" and "},{"kind":"code","text":"`_`"},{"kind":"text","text":"."}]},"type":{"type":"reference","id":2,"name":"EventName"}},{"id":21,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event handler callback."}]},"type":{"type":"reference","id":92,"typeArguments":[{"type":"reference","id":19,"name":"T"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":97,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":22,"name":"once","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"event.ts","line":88,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/63506f2d/tooling/api/src/event.ts#L88"}],"signatures":[{"id":23,"name":"once","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to an one-off event from the backend."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { once } from '@tauri-apps/api/event';\ninterface LoadedPayload {\n loggedIn: boolean,\n token: string\n}\nconst unlisten = await once('loaded', (event) => {\n console.log(`App is loaded, loggedIn: ${event.payload.loggedIn}, token: ${event.payload.token}`);\n});\n\n// you need to call unlisten if your handler goes out of scope e.g. the component is unmounted\nunlisten();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to a function to unlisten to the event.\nNote that removing the listener is required if your listener goes out of scope e.g. the component is unmounted."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"typeParameter":[{"id":24,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":25,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event name. Must include only alphanumeric characters, "},{"kind":"code","text":"`-`"},{"kind":"text","text":", "},{"kind":"code","text":"`/`"},{"kind":"text","text":", "},{"kind":"code","text":"`:`"},{"kind":"text","text":" and "},{"kind":"code","text":"`_`"},{"kind":"text","text":"."}]},"type":{"type":"reference","id":2,"name":"EventName"}},{"id":26,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":92,"typeArguments":[{"type":"reference","id":24,"name":"T"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":97,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]}],"groups":[{"title":"Enumerations","children":[3]},{"title":"Interfaces","children":[86]},{"title":"Type Aliases","children":[92,2,97]},{"title":"Functions","children":[27,17,22]}],"sources":[{"fileName":"event.ts","line":12,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/63506f2d/tooling/api/src/event.ts#L12"}]},{"id":31,"name":"mocks","kind":2,"kindString":"Module","flags":{},"children":[{"id":43,"name":"clearMocks","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"mocks.ts","line":186,"character":16,"url":"https://github.com/tauri-apps/tauri/blob/63506f2d/tooling/api/src/mocks.ts#L186"}],"signatures":[{"id":44,"name":"clearMocks","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Clears mocked functions/data injected by the other functions in this module.\nWhen using a test runner that doesn't provide a fresh window object for each test, calling this function will reset tauri specific properties.\n\n# Example\n\n"},{"kind":"code","text":"```js\nimport { mockWindows, clearMocks } from \"@tauri-apps/api/mocks\"\n\nafterEach(() => {\n clearMocks()\n})\n\ntest(\"mocked windows\", () => {\n mockWindows(\"main\", \"second\", \"third\");\n\n expect(window).toHaveProperty(\"__TAURI_METADATA__\")\n})\n\ntest(\"no mocked windows\", () => {\n expect(window).not.toHaveProperty(\"__TAURI_METADATA__\")\n})\n```"}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"intrinsic","name":"void"}}]},{"id":32,"name":"mockIPC","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"mocks.ts","line":80,"character":16,"url":"https://github.com/tauri-apps/tauri/blob/63506f2d/tooling/api/src/mocks.ts#L80"}],"signatures":[{"id":33,"name":"mockIPC","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Intercepts all IPC requests with the given mock handler.\n\nThis function can be used when testing tauri frontend applications or when running the frontend in a Node.js context during static site generation.\n\n# Examples\n\nTesting setup using vitest:\n"},{"kind":"code","text":"```js\nimport { mockIPC, clearMocks } from \"@tauri-apps/api/mocks\"\nimport { invoke } from \"@tauri-apps/api/tauri\"\n\nafterEach(() => {\n clearMocks()\n})\n\ntest(\"mocked command\", () => {\n mockIPC((cmd, args) => {\n switch (cmd) {\n case \"add\":\n return (args.a as number) + (args.b as number);\n default:\n break;\n }\n });\n\n expect(invoke('add', { a: 12, b: 15 })).resolves.toBe(27);\n})\n```"},{"kind":"text","text":"\n\nThe callback function can also return a Promise:\n"},{"kind":"code","text":"```js\nimport { mockIPC, clearMocks } from \"@tauri-apps/api/mocks\"\nimport { invoke } from \"@tauri-apps/api/tauri\"\n\nafterEach(() => {\n clearMocks()\n})\n\ntest(\"mocked command\", () => {\n mockIPC((cmd, args) => {\n if(cmd === \"get_data\") {\n return fetch(\"https://example.com/data.json\")\n .then((response) => response.json())\n }\n });\n\n expect(invoke('get_data')).resolves.toBe({ foo: 'bar' });\n})\n```"}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":34,"name":"cb","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":35,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"mocks.ts","line":81,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/63506f2d/tooling/api/src/mocks.ts#L81"}],"signatures":[{"id":36,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":37,"name":"cmd","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":38,"name":"args","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"unknown"}],"name":"Record","qualifiedName":"Record","package":"typescript"}}],"type":{"type":"intrinsic","name":"any"}}]}}}],"type":{"type":"intrinsic","name":"void"}}]},{"id":39,"name":"mockWindows","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"mocks.ts","line":150,"character":16,"url":"https://github.com/tauri-apps/tauri/blob/63506f2d/tooling/api/src/mocks.ts#L150"}],"signatures":[{"id":40,"name":"mockWindows","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Mocks one or many window labels.\nIn non-tauri context it is required to call this function *before* using the "},{"kind":"code","text":"`@tauri-apps/api/window`"},{"kind":"text","text":" module.\n\nThis function only mocks the *presence* of windows,\nwindow properties (e.g. width and height) can be mocked like regular IPC calls using the "},{"kind":"code","text":"`mockIPC`"},{"kind":"text","text":" function.\n\n# Examples\n\n"},{"kind":"code","text":"```js\nimport { mockWindows } from \"@tauri-apps/api/mocks\";\nimport { getCurrent } from \"@tauri-apps/api/window\";\n\nmockWindows(\"main\", \"second\", \"third\");\n\nconst win = getCurrent();\n\nwin.label // \"main\"\n```"},{"kind":"text","text":"\n\n"},{"kind":"code","text":"```js\nimport { mockWindows } from \"@tauri-apps/api/mocks\";\n\nmockWindows(\"main\", \"second\", \"third\");\n\nmockIPC((cmd, args) => {\n if (cmd === \"tauri\") {\n if (\n args?.__tauriModule === \"Window\" &&\n args?.message?.cmd === \"manage\" &&\n args?.message?.data?.cmd?.type === \"close\"\n ) {\n console.log('closing window!');\n }\n }\n});\n\nconst { getCurrent } = await import(\"@tauri-apps/api/window\");\n\nconst win = getCurrent();\nawait win.close(); // this will cause the mocked IPC handler to log to the console.\n```"}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":41,"name":"current","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Label of window this JavaScript context is running in."}]},"type":{"type":"intrinsic","name":"string"}},{"id":42,"name":"additionalWindows","kind":32768,"kindString":"Parameter","flags":{"isRest":true},"comment":{"summary":[{"kind":"text","text":"Label of additional windows the app has."}]},"type":{"type":"array","elementType":{"type":"intrinsic","name":"string"}}}],"type":{"type":"intrinsic","name":"void"}}]}],"groups":[{"title":"Functions","children":[43,32,39]}],"sources":[{"fileName":"mocks.ts","line":6,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/63506f2d/tooling/api/src/mocks.ts#L6"}]},{"id":45,"name":"tauri","kind":2,"kindString":"Module","flags":{},"comment":{"summary":[{"kind":"text","text":"Invoke your custom commands.\n\nThis package is also accessible with "},{"kind":"code","text":"`window.__TAURI__.tauri`"},{"kind":"text","text":" when ["},{"kind":"code","text":"`build.withGlobalTauri`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#buildconfig.withglobaltauri) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":" is set to "},{"kind":"code","text":"`true`"},{"kind":"text","text":"."}]},"children":[{"id":54,"name":"Channel","kind":128,"kindString":"Class","flags":{},"children":[{"id":55,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"tauri.ts","line":66,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/63506f2d/tooling/api/src/tauri.ts#L66"}],"signatures":[{"id":56,"name":"new Channel","kind":16384,"kindString":"Constructor signature","flags":{},"typeParameter":[{"id":57,"name":"T","kind":131072,"kindString":"Type parameter","flags":{},"default":{"type":"intrinsic","name":"unknown"}}],"type":{"type":"reference","id":54,"typeArguments":[{"type":"reference","id":57,"name":"T"}],"name":"Channel"}}]},{"id":60,"name":"#onmessage","kind":1024,"kindString":"Property","flags":{"isPrivate":true},"sources":[{"fileName":"tauri.ts","line":62,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/63506f2d/tooling/api/src/tauri.ts#L62"}],"type":{"type":"reflection","declaration":{"id":61,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"tauri.ts","line":62,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/63506f2d/tooling/api/src/tauri.ts#L62"}],"signatures":[{"id":62,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":63,"name":"response","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":57,"name":"T"}}],"type":{"type":"intrinsic","name":"void"}}]}},"defaultValue":"..."},{"id":59,"name":"__TAURI_CHANNEL_MARKER__","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isReadonly":true},"sources":[{"fileName":"tauri.ts","line":61,"character":19,"url":"https://github.com/tauri-apps/tauri/blob/63506f2d/tooling/api/src/tauri.ts#L61"}],"type":{"type":"literal","value":true},"defaultValue":"true"},{"id":58,"name":"id","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"tauri.ts","line":59,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/63506f2d/tooling/api/src/tauri.ts#L59"}],"type":{"type":"intrinsic","name":"number"}},{"id":64,"name":"onmessage","kind":262144,"kindString":"Accessor","flags":{},"sources":[{"fileName":"tauri.ts","line":72,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/63506f2d/tooling/api/src/tauri.ts#L72"},{"fileName":"tauri.ts","line":76,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/63506f2d/tooling/api/src/tauri.ts#L76"}],"getSignature":{"id":65,"name":"onmessage","kind":524288,"kindString":"Get signature","flags":{},"type":{"type":"reflection","declaration":{"id":66,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"tauri.ts","line":76,"character":19,"url":"https://github.com/tauri-apps/tauri/blob/63506f2d/tooling/api/src/tauri.ts#L76"}],"signatures":[{"id":67,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":68,"name":"response","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":57,"name":"T"}}],"type":{"type":"intrinsic","name":"void"}}]}}},"setSignature":{"id":69,"name":"onmessage","kind":1048576,"kindString":"Set signature","flags":{},"parameters":[{"id":70,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":71,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"tauri.ts","line":72,"character":25,"url":"https://github.com/tauri-apps/tauri/blob/63506f2d/tooling/api/src/tauri.ts#L72"}],"signatures":[{"id":72,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":73,"name":"response","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":57,"name":"T"}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"intrinsic","name":"void"}}},{"id":74,"name":"toJSON","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"tauri.ts","line":80,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/63506f2d/tooling/api/src/tauri.ts#L80"}],"signatures":[{"id":75,"name":"toJSON","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"intrinsic","name":"string"}}]}],"groups":[{"title":"Constructors","children":[55]},{"title":"Properties","children":[60,59,58]},{"title":"Accessors","children":[64]},{"title":"Methods","children":[74]}],"sources":[{"fileName":"tauri.ts","line":58,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/63506f2d/tooling/api/src/tauri.ts#L58"}],"typeParameters":[{"id":76,"name":"T","kind":131072,"kindString":"Type parameter","flags":{},"default":{"type":"intrinsic","name":"unknown"}}]},{"id":46,"name":"InvokeArgs","kind":4194304,"kindString":"Type alias","flags":{},"comment":{"summary":[{"kind":"text","text":"Command arguments."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"tauri.ts","line":90,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/63506f2d/tooling/api/src/tauri.ts#L90"}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"unknown"}],"name":"Record","qualifiedName":"Record","package":"typescript"}},{"id":82,"name":"convertFileSrc","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"tauri.ts","line":156,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/63506f2d/tooling/api/src/tauri.ts#L156"}],"signatures":[{"id":83,"name":"convertFileSrc","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Convert a device file path to an URL that can be loaded by the webview.\nNote that "},{"kind":"code","text":"`asset:`"},{"kind":"text","text":" and "},{"kind":"code","text":"`https://asset.localhost`"},{"kind":"text","text":" must be added to ["},{"kind":"code","text":"`tauri.security.csp`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#securityconfig.csp) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":".\nExample CSP value: "},{"kind":"code","text":"`\"csp\": \"default-src 'self'; img-src 'self' asset: https://asset.localhost\"`"},{"kind":"text","text":" to use the asset protocol on image sources.\n\nAdditionally, "},{"kind":"code","text":"`asset`"},{"kind":"text","text":" must be added to ["},{"kind":"code","text":"`tauri.allowlist.protocol`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#allowlistconfig.protocol)\nin "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":" and its access scope must be defined on the "},{"kind":"code","text":"`assetScope`"},{"kind":"text","text":" array on the same "},{"kind":"code","text":"`protocol`"},{"kind":"text","text":" object."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appDataDir, join } from '@tauri-apps/api/path';\nimport { convertFileSrc } from '@tauri-apps/api/tauri';\nconst appDataDirPath = await appDataDir();\nconst filePath = await join(appDataDirPath, 'assets/video.mp4');\nconst assetUrl = convertFileSrc(filePath);\n\nconst video = document.getElementById('my-video');\nconst source = document.createElement('source');\nsource.type = 'video/mp4';\nsource.src = assetUrl;\nvideo.appendChild(source);\nvideo.load();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"the URL that can be used as source on the webview."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":84,"name":"filePath","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The file path."}]},"type":{"type":"intrinsic","name":"string"}},{"id":85,"name":"protocol","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The protocol to use. Defaults to "},{"kind":"code","text":"`asset`"},{"kind":"text","text":". You only need to set this when using a custom protocol."}]},"type":{"type":"intrinsic","name":"string"},"defaultValue":"'asset'"}],"type":{"type":"intrinsic","name":"string"}}]},{"id":77,"name":"invoke","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"tauri.ts","line":106,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/63506f2d/tooling/api/src/tauri.ts#L106"}],"signatures":[{"id":78,"name":"invoke","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Sends a message to the backend."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { invoke } from '@tauri-apps/api/tauri';\nawait invoke('login', { user: 'tauri', password: 'poiwe3h4r5ip3yrhtew9ty' });\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving or rejecting to the backend response."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"typeParameter":[{"id":79,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":80,"name":"cmd","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The command name."}]},"type":{"type":"intrinsic","name":"string"}},{"id":81,"name":"args","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The optional arguments to pass to the command."}]},"type":{"type":"reference","id":46,"name":"InvokeArgs"},"defaultValue":"{}"}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":79,"name":"T"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":47,"name":"transformCallback","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"tauri.ts","line":36,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/63506f2d/tooling/api/src/tauri.ts#L36"}],"signatures":[{"id":48,"name":"transformCallback","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Transforms a callback function to a string identifier that can be passed to the backend.\nThe backend uses the identifier to "},{"kind":"code","text":"`eval()`"},{"kind":"text","text":" the callback."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"A unique identifier associated with the callback function."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":49,"name":"callback","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reflection","declaration":{"id":50,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"tauri.ts","line":37,"character":13,"url":"https://github.com/tauri-apps/tauri/blob/63506f2d/tooling/api/src/tauri.ts#L37"}],"signatures":[{"id":51,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":52,"name":"response","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"any"}}],"type":{"type":"intrinsic","name":"void"}}]}}},{"id":53,"name":"once","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"boolean"},"defaultValue":"false"}],"type":{"type":"intrinsic","name":"number"}}]}],"groups":[{"title":"Classes","children":[54]},{"title":"Type Aliases","children":[46]},{"title":"Functions","children":[82,77,47]}],"sources":[{"fileName":"tauri.ts","line":13,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/63506f2d/tooling/api/src/tauri.ts#L13"}]}],"groups":[{"title":"Modules","children":[1,31,45]}]} \ No newline at end of file diff --git a/tooling/api/src/index.ts b/tooling/api/src/index.ts index 113ee68089e..658c39ed82e 100644 --- a/tooling/api/src/index.ts +++ b/tooling/api/src/index.ts @@ -14,8 +14,8 @@ */ import * as event from './event' -import * as path from './path' import * as tauri from './tauri' +import * as path from './path' /** @ignore */ const invoke = tauri.invoke diff --git a/tooling/api/src/path.ts b/tooling/api/src/path.ts index 60683dfde8d..76a2f5db5d3 100644 --- a/tooling/api/src/path.ts +++ b/tooling/api/src/path.ts @@ -7,18 +7,6 @@ * * This package is also accessible with `window.__TAURI__.path` when [`build.withGlobalTauri`](https://tauri.app/v1/api/config/#buildconfig.withglobaltauri) in `tauri.conf.json` is set to `true`. * - * The APIs must be added to [`tauri.allowlist.path`](https://tauri.app/v1/api/config/#allowlistconfig.path) in `tauri.conf.json`: - * ```json - * { - * "tauri": { - * "allowlist": { - * "path": { - * "all": true, // enable all Path APIs - * } - * } - * } - * } - * ``` * It is recommended to allowlist only the APIs you use for optimal bundle size and security. * @module */ diff --git a/tooling/api/typedoc.json b/tooling/api/typedoc.json index 962cf97e9f5..b1075065910 100644 --- a/tooling/api/typedoc.json +++ b/tooling/api/typedoc.json @@ -1,21 +1,8 @@ { "entryPoints": [ - "src/app.ts", - "src/cli.ts", - "src/clipboard.ts", - "src/dialog.ts", "src/event.ts", - "src/fs.ts", - "src/globalShortcut.ts", - "src/http.ts", "src/mocks.ts", - "src/notification.ts", - "src/os.ts", - "src/path.ts", - "src/process.ts", - "src/shell.ts", "src/tauri.ts", - "src/updater.ts", "src/window.ts" ], "githubPages": false, diff --git a/tooling/bench/tests/cpu_intensive/src-tauri/tauri.conf.json b/tooling/bench/tests/cpu_intensive/src-tauri/tauri.conf.json index c6578efad51..aa6e927d594 100644 --- a/tooling/bench/tests/cpu_intensive/src-tauri/tauri.conf.json +++ b/tooling/bench/tests/cpu_intensive/src-tauri/tauri.conf.json @@ -33,9 +33,6 @@ "exceptionDomain": "" } }, - "allowlist": { - "all": false - }, "windows": [ { "title": "Welcome to Tauri!", @@ -49,4 +46,4 @@ "csp": "default-src blob: data: filesystem: ws: wss: http: https: tauri: 'unsafe-eval' 'unsafe-inline' 'self'" } } -} \ No newline at end of file +} diff --git a/tooling/bench/tests/files_transfer/src-tauri/tauri.conf.json b/tooling/bench/tests/files_transfer/src-tauri/tauri.conf.json index 3fb573e3750..aa6e927d594 100644 --- a/tooling/bench/tests/files_transfer/src-tauri/tauri.conf.json +++ b/tooling/bench/tests/files_transfer/src-tauri/tauri.conf.json @@ -33,15 +33,6 @@ "exceptionDomain": "" } }, - "allowlist": { - "all": false, - "fs": { - "readFile": true, - "scope": [ - "$HOME/.tauri_3mb.json" - ] - } - }, "windows": [ { "title": "Welcome to Tauri!", @@ -55,4 +46,4 @@ "csp": "default-src blob: data: filesystem: ws: wss: http: https: tauri: 'unsafe-eval' 'unsafe-inline' 'self'" } } -} \ No newline at end of file +} diff --git a/tooling/bench/tests/helloworld/src-tauri/tauri.conf.json b/tooling/bench/tests/helloworld/src-tauri/tauri.conf.json index c6578efad51..aa6e927d594 100644 --- a/tooling/bench/tests/helloworld/src-tauri/tauri.conf.json +++ b/tooling/bench/tests/helloworld/src-tauri/tauri.conf.json @@ -33,9 +33,6 @@ "exceptionDomain": "" } }, - "allowlist": { - "all": false - }, "windows": [ { "title": "Welcome to Tauri!", @@ -49,4 +46,4 @@ "csp": "default-src blob: data: filesystem: ws: wss: http: https: tauri: 'unsafe-eval' 'unsafe-inline' 'self'" } } -} \ No newline at end of file +} diff --git a/tooling/bundler/src/bundle/settings.rs b/tooling/bundler/src/bundle/settings.rs index 7661cbe7d69..03e028e5843 100644 --- a/tooling/bundler/src/bundle/settings.rs +++ b/tooling/bundler/src/bundle/settings.rs @@ -137,8 +137,6 @@ pub struct PackageSettings { pub struct UpdaterSettings { /// Whether the updater is active or not. pub active: bool, - /// The updater endpoints. - pub endpoints: Option>, /// Signature public key. pub pubkey: String, /// Args to pass to `msiexec.exe` to run the updater on Windows. diff --git a/tooling/cli/node/test/jest/fixtures/app/src-tauri/tauri.conf.json b/tooling/cli/node/test/jest/fixtures/app/src-tauri/tauri.conf.json index 98017f16433..ac345145327 100644 --- a/tooling/cli/node/test/jest/fixtures/app/src-tauri/tauri.conf.json +++ b/tooling/cli/node/test/jest/fixtures/app/src-tauri/tauri.conf.json @@ -6,9 +6,6 @@ "withGlobalTauri": true }, "tauri": { - "allowlist": { - "all": true - }, "bundle": { "icon": [ "icons/32x32.png", diff --git a/tooling/cli/schema.json b/tooling/cli/schema.json index b3b219fc71a..b5f5da37942 100644 --- a/tooling/cli/schema.json +++ b/tooling/cli/schema.json @@ -1,7 +1,7 @@ { "$schema": "http://json-schema.org/draft-07/schema#", "title": "Config", - "description": "The Tauri configuration object. It is read from a file where you can define your frontend assets, configure the bundler, enable the app updater, define a system tray, enable APIs via the allowlist and more.\n\nThe configuration file is generated by the [`tauri init`](https://tauri.app/v1/api/cli#init) command that lives in your Tauri application source directory (src-tauri).\n\nOnce generated, you may modify it at will to customize your Tauri application.\n\n## File Formats\n\nBy default, the configuration is defined as a JSON file named `tauri.conf.json`.\n\nTauri also supports JSON5 and TOML files via the `config-json5` and `config-toml` Cargo features, respectively. The JSON5 file name must be either `tauri.conf.json` or `tauri.conf.json5`. The TOML file name is `Tauri.toml`.\n\n## Platform-Specific Configuration\n\nIn addition to the default configuration file, Tauri can read a platform-specific configuration from `tauri.linux.conf.json`, `tauri.windows.conf.json`, `tauri.macos.conf.json`, `tauri.android.conf.json` and `tauri.ios.conf.json` (or `Tauri.linux.toml`, `Tauri.windows.toml`, `Tauri.macos.toml`, `Tauri.android.toml` and `Tauri.ios.toml` if the `Tauri.toml` format is used), which gets merged with the main configuration object.\n\n## Configuration Structure\n\nThe configuration is composed of the following objects:\n\n- [`package`](#packageconfig): Package settings - [`tauri`](#tauriconfig): The Tauri config - [`build`](#buildconfig): The build configuration - [`plugins`](#pluginconfig): The plugins config\n\n```json title=\"Example tauri.config.json file\" { \"build\": { \"beforeBuildCommand\": \"\", \"beforeDevCommand\": \"\", \"devPath\": \"../dist\", \"distDir\": \"../dist\" }, \"package\": { \"productName\": \"tauri-app\", \"version\": \"0.1.0\" }, \"tauri\": { \"allowlist\": { \"all\": true }, \"bundle\": {}, \"security\": { \"csp\": null }, \"updater\": { \"active\": false }, \"windows\": [ { \"fullscreen\": false, \"height\": 600, \"resizable\": true, \"title\": \"Tauri App\", \"width\": 800 } ] } } ```", + "description": "The Tauri configuration object. It is read from a file where you can define your frontend assets, configure the bundler and define a system tray.\n\nThe configuration file is generated by the [`tauri init`](https://tauri.app/v1/api/cli#init) command that lives in your Tauri application source directory (src-tauri).\n\nOnce generated, you may modify it at will to customize your Tauri application.\n\n## File Formats\n\nBy default, the configuration is defined as a JSON file named `tauri.conf.json`.\n\nTauri also supports JSON5 and TOML files via the `config-json5` and `config-toml` Cargo features, respectively. The JSON5 file name must be either `tauri.conf.json` or `tauri.conf.json5`. The TOML file name is `Tauri.toml`.\n\n## Platform-Specific Configuration\n\nIn addition to the default configuration file, Tauri can read a platform-specific configuration from `tauri.linux.conf.json`, `tauri.windows.conf.json`, `tauri.macos.conf.json`, `tauri.android.conf.json` and `tauri.ios.conf.json` (or `Tauri.linux.toml`, `Tauri.windows.toml`, `Tauri.macos.toml`, `Tauri.android.toml` and `Tauri.ios.toml` if the `Tauri.toml` format is used), which gets merged with the main configuration object.\n\n## Configuration Structure\n\nThe configuration is composed of the following objects:\n\n- [`package`](#packageconfig): Package settings - [`tauri`](#tauriconfig): The Tauri config - [`build`](#buildconfig): The build configuration - [`plugins`](#pluginconfig): The plugins config\n\n```json title=\"Example tauri.config.json file\" { \"build\": { \"beforeBuildCommand\": \"\", \"beforeDevCommand\": \"\", \"devPath\": \"../dist\", \"distDir\": \"../dist\" }, \"package\": { \"productName\": \"tauri-app\", \"version\": \"0.1.0\" }, \"tauri\": { \"bundle\": {}, \"security\": { \"csp\": null }, \"windows\": [ { \"fullscreen\": false, \"height\": 600, \"resizable\": true, \"title\": \"Tauri App\", \"width\": 800 } ] } } ```", "type": "object", "properties": { "$schema": { @@ -26,109 +26,6 @@ "tauri": { "description": "The Tauri configuration.", "default": { - "allowlist": { - "all": false, - "app": { - "all": false, - "hide": false, - "show": false - }, - "clipboard": { - "all": false, - "readText": false, - "writeText": false - }, - "dialog": { - "all": false, - "ask": false, - "confirm": false, - "message": false, - "open": false, - "save": false - }, - "fs": { - "all": false, - "copyFile": false, - "createDir": false, - "exists": false, - "readDir": false, - "readFile": false, - "removeDir": false, - "removeFile": false, - "renameFile": false, - "scope": [], - "writeFile": false - }, - "globalShortcut": { - "all": false - }, - "http": { - "all": false, - "request": false, - "scope": [] - }, - "notification": { - "all": false - }, - "os": { - "all": false - }, - "path": { - "all": false - }, - "process": { - "all": false, - "exit": false, - "relaunch": false, - "relaunchDangerousAllowSymlinkMacos": false - }, - "protocol": { - "all": false, - "asset": false, - "assetScope": [] - }, - "shell": { - "all": false, - "execute": false, - "open": false, - "scope": [], - "sidecar": false - }, - "window": { - "all": false, - "center": false, - "close": false, - "create": false, - "hide": false, - "maximize": false, - "minimize": false, - "print": false, - "requestUserAttention": false, - "setAlwaysOnTop": false, - "setContentProtected": false, - "setCursorGrab": false, - "setCursorIcon": false, - "setCursorPosition": false, - "setCursorVisible": false, - "setDecorations": false, - "setFocus": false, - "setFullscreen": false, - "setIcon": false, - "setIgnoreCursorEvents": false, - "setMaxSize": false, - "setMinSize": false, - "setPosition": false, - "setResizable": false, - "setShadow": false, - "setSize": false, - "setSkipTaskbar": false, - "setTitle": false, - "show": false, - "startDragging": false, - "unmaximize": false, - "unminimize": false - } - }, "bundle": { "active": false, "android": { @@ -147,6 +44,13 @@ "minimumSystemVersion": "10.13" }, "targets": "all", + "updater": { + "active": false, + "pubkey": "", + "windows": { + "installMode": "passive" + } + }, "windows": { "allowDowngrades": true, "certificateThumbprint": null, @@ -167,18 +71,14 @@ "use": "brownfield" }, "security": { + "assetProtocol": { + "enable": false, + "scope": [] + }, "dangerousDisableAssetCspModification": false, "dangerousRemoteDomainIpcAccess": [], "freezePrototype": false }, - "updater": { - "active": false, - "pubkey": "", - "windows": { - "installMode": "passive", - "installerArgs": [] - } - }, "windows": [] }, "allOf": [ @@ -278,6 +178,13 @@ "minimumSystemVersion": "10.13" }, "targets": "all", + "updater": { + "active": false, + "pubkey": "", + "windows": { + "installMode": "passive" + } + }, "windows": { "allowDowngrades": true, "certificateThumbprint": null, @@ -299,120 +206,13 @@ } ] }, - "allowlist": { - "description": "The allowlist configuration.", - "default": { - "all": false, - "app": { - "all": false, - "hide": false, - "show": false - }, - "clipboard": { - "all": false, - "readText": false, - "writeText": false - }, - "dialog": { - "all": false, - "ask": false, - "confirm": false, - "message": false, - "open": false, - "save": false - }, - "fs": { - "all": false, - "copyFile": false, - "createDir": false, - "exists": false, - "readDir": false, - "readFile": false, - "removeDir": false, - "removeFile": false, - "renameFile": false, - "scope": [], - "writeFile": false - }, - "globalShortcut": { - "all": false - }, - "http": { - "all": false, - "request": false, - "scope": [] - }, - "notification": { - "all": false - }, - "os": { - "all": false - }, - "path": { - "all": false - }, - "process": { - "all": false, - "exit": false, - "relaunch": false, - "relaunchDangerousAllowSymlinkMacos": false - }, - "protocol": { - "all": false, - "asset": false, - "assetScope": [] - }, - "shell": { - "all": false, - "execute": false, - "open": false, - "scope": [], - "sidecar": false - }, - "window": { - "all": false, - "center": false, - "close": false, - "create": false, - "hide": false, - "maximize": false, - "minimize": false, - "print": false, - "requestUserAttention": false, - "setAlwaysOnTop": false, - "setContentProtected": false, - "setCursorGrab": false, - "setCursorIcon": false, - "setCursorPosition": false, - "setCursorVisible": false, - "setDecorations": false, - "setFocus": false, - "setFullscreen": false, - "setIcon": false, - "setIgnoreCursorEvents": false, - "setMaxSize": false, - "setMinSize": false, - "setPosition": false, - "setResizable": false, - "setShadow": false, - "setSize": false, - "setSkipTaskbar": false, - "setTitle": false, - "show": false, - "startDragging": false, - "unmaximize": false, - "unminimize": false - } - }, - "allOf": [ - { - "$ref": "#/definitions/AllowlistConfig" - } - ] - }, "security": { "description": "Security configuration.", "default": { + "assetProtocol": { + "enable": false, + "scope": [] + }, "dangerousDisableAssetCspModification": false, "dangerousRemoteDomainIpcAccess": [], "freezePrototype": false @@ -423,22 +223,6 @@ } ] }, - "updater": { - "description": "The updater configuration.", - "default": { - "active": false, - "pubkey": "", - "windows": { - "installMode": "passive", - "installerArgs": [] - } - }, - "allOf": [ - { - "$ref": "#/definitions/UpdaterConfig" - } - ] - }, "systemTray": { "description": "Configuration for app system tray.", "anyOf": [ @@ -929,6 +713,21 @@ "$ref": "#/definitions/AndroidConfig" } ] + }, + "updater": { + "description": "The updater configuration.", + "default": { + "active": false, + "pubkey": "", + "windows": { + "installMode": "passive" + } + }, + "allOf": [ + { + "$ref": "#/definitions/UpdaterConfig" + } + ] } }, "additionalProperties": false @@ -1546,909 +1345,161 @@ }, "additionalProperties": false }, - "AllowlistConfig": { - "description": "Allowlist configuration. The allowlist is a translation of the [Cargo allowlist features](https://docs.rs/tauri/latest/tauri/#cargo-allowlist-features).\n\n# Notes\n\n- Endpoints that don't have their own allowlist option are enabled by default. - There is only \"opt-in\", no \"opt-out\". Setting an option to `false` has no effect.\n\n# Examples\n\n- * [`\"app-all\": true`](https://tauri.app/v1/api/config/#appallowlistconfig.all) will make the [hide](https://tauri.app/v1/api/js/app#hide) endpoint be available regardless of whether `hide` is set to `false` or `true` in the allowlist.", + "UpdaterConfig": { + "description": "The Updater configuration object.\n\nSee more: https://tauri.app/v1/api/config#updaterconfig", "type": "object", "properties": { - "all": { - "description": "Use this flag to enable all API features.", + "active": { + "description": "Whether the updater is active or not.", "default": false, "type": "boolean" }, - "fs": { - "description": "File system API allowlist.", - "default": { - "all": false, - "copyFile": false, - "createDir": false, - "exists": false, - "readDir": false, - "readFile": false, - "removeDir": false, - "removeFile": false, - "renameFile": false, - "scope": [], - "writeFile": false - }, - "allOf": [ - { - "$ref": "#/definitions/FsAllowlistConfig" - } - ] + "pubkey": { + "description": "Signature public key.", + "default": "", + "type": "string" }, - "window": { - "description": "Window API allowlist.", + "windows": { + "description": "The Windows configuration for the updater.", "default": { - "all": false, - "center": false, - "close": false, - "create": false, - "hide": false, - "maximize": false, - "minimize": false, - "print": false, - "requestUserAttention": false, - "setAlwaysOnTop": false, - "setContentProtected": false, - "setCursorGrab": false, - "setCursorIcon": false, - "setCursorPosition": false, - "setCursorVisible": false, - "setDecorations": false, - "setFocus": false, - "setFullscreen": false, - "setIcon": false, - "setIgnoreCursorEvents": false, - "setMaxSize": false, - "setMinSize": false, - "setPosition": false, - "setResizable": false, - "setShadow": false, - "setSize": false, - "setSkipTaskbar": false, - "setTitle": false, - "show": false, - "startDragging": false, - "unmaximize": false, - "unminimize": false + "installMode": "passive" }, "allOf": [ { - "$ref": "#/definitions/WindowAllowlistConfig" + "$ref": "#/definitions/UpdaterWindowsConfig" } ] - }, - "shell": { - "description": "Shell API allowlist.", - "default": { - "all": false, - "execute": false, - "open": false, - "scope": [], - "sidecar": false - }, + } + }, + "additionalProperties": false + }, + "UpdaterWindowsConfig": { + "description": "The updater configuration for Windows.\n\nSee more: https://tauri.app/v1/api/config#updaterwindowsconfig", + "type": "object", + "properties": { + "installMode": { + "description": "The installation mode for the update on Windows. Defaults to `passive`.", + "default": "passive", "allOf": [ { - "$ref": "#/definitions/ShellAllowlistConfig" + "$ref": "#/definitions/WindowsUpdateInstallMode" } ] - }, - "dialog": { - "description": "Dialog API allowlist.", - "default": { - "all": false, - "ask": false, - "confirm": false, - "message": false, - "open": false, - "save": false - }, - "allOf": [ - { - "$ref": "#/definitions/DialogAllowlistConfig" - } + } + }, + "additionalProperties": false + }, + "WindowsUpdateInstallMode": { + "description": "Install modes for the Windows update.", + "oneOf": [ + { + "description": "Specifies there's a basic UI during the installation process, including a final dialog box at the end.", + "type": "string", + "enum": [ + "basicUi" ] }, - "http": { - "description": "HTTP API allowlist.", - "default": { - "all": false, - "request": false, - "scope": [] - }, - "allOf": [ - { - "$ref": "#/definitions/HttpAllowlistConfig" - } + { + "description": "The quiet mode means there's no user interaction required. Requires admin privileges if the installer does (WiX).", + "type": "string", + "enum": [ + "quiet" ] }, - "notification": { - "description": "Notification API allowlist.", - "default": { - "all": false - }, - "allOf": [ - { - "$ref": "#/definitions/NotificationAllowlistConfig" - } + { + "description": "Specifies unattended mode, which means the installation only shows a progress bar.", + "type": "string", + "enum": [ + "passive" ] - }, - "globalShortcut": { - "description": "Global shortcut API allowlist.", - "default": { - "all": false - }, - "allOf": [ + } + ] + }, + "SecurityConfig": { + "description": "Security configuration.\n\nSee more: https://tauri.app/v1/api/config#securityconfig", + "type": "object", + "properties": { + "csp": { + "description": "The Content Security Policy that will be injected on all HTML files on the built application. If [`dev_csp`](#SecurityConfig.devCsp) is not specified, this value is also injected on dev.\n\nThis is a really important part of the configuration since it helps you ensure your WebView is secured. See .", + "anyOf": [ { - "$ref": "#/definitions/GlobalShortcutAllowlistConfig" - } - ] - }, - "os": { - "description": "OS allowlist.", - "default": { - "all": false - }, - "allOf": [ + "$ref": "#/definitions/Csp" + }, { - "$ref": "#/definitions/OsAllowlistConfig" + "type": "null" } ] }, - "path": { - "description": "Path API allowlist.", - "default": { - "all": false - }, - "allOf": [ + "devCsp": { + "description": "The Content Security Policy that will be injected on all HTML files on development.\n\nThis is a really important part of the configuration since it helps you ensure your WebView is secured. See .", + "anyOf": [ { - "$ref": "#/definitions/PathAllowlistConfig" - } - ] - }, - "protocol": { - "description": "Custom protocol allowlist.", - "default": { - "all": false, - "asset": false, - "assetScope": [] - }, - "allOf": [ + "$ref": "#/definitions/Csp" + }, { - "$ref": "#/definitions/ProtocolAllowlistConfig" + "type": "null" } ] }, - "process": { - "description": "Process API allowlist.", - "default": { - "all": false, - "exit": false, - "relaunch": false, - "relaunchDangerousAllowSymlinkMacos": false - }, - "allOf": [ - { - "$ref": "#/definitions/ProcessAllowlistConfig" - } - ] + "freezePrototype": { + "description": "Freeze the `Object.prototype` when using the custom protocol.", + "default": false, + "type": "boolean" }, - "clipboard": { - "description": "Clipboard APIs allowlist.", - "default": { - "all": false, - "readText": false, - "writeText": false - }, + "dangerousDisableAssetCspModification": { + "description": "Disables the Tauri-injected CSP sources.\n\nAt compile time, Tauri parses all the frontend assets and changes the Content-Security-Policy to only allow loading of your own scripts and styles by injecting nonce and hash sources. This stricts your CSP, which may introduce issues when using along with other flexing sources.\n\nThis configuration option allows both a boolean and a list of strings as value. A boolean instructs Tauri to disable the injection for all CSP injections, and a list of strings indicates the CSP directives that Tauri cannot inject.\n\n**WARNING:** Only disable this if you know what you are doing and have properly configured the CSP. Your application might be vulnerable to XSS attacks without this Tauri protection.", + "default": false, "allOf": [ { - "$ref": "#/definitions/ClipboardAllowlistConfig" + "$ref": "#/definitions/DisabledCspModificationKind" } ] }, - "app": { - "description": "App APIs allowlist.", + "dangerousRemoteDomainIpcAccess": { + "description": "Allow external domains to send command to Tauri.\n\nBy default, external domains do not have access to `window.__TAURI__`, which means they cannot communicate with the commands defined in Rust. This prevents attacks where an externally loaded malicious or compromised sites could start executing commands on the user's device.\n\nThis configuration allows a set of external domains to have access to the Tauri commands. When you configure a domain to be allowed to access the IPC, all subpaths are allowed. Subdomains are not allowed.\n\n**WARNING:** Only use this option if you either have internal checks against malicious external sites or you can trust the allowed external sites. You application might be vulnerable to dangerous Tauri command related attacks otherwise.", + "default": [], + "type": "array", + "items": { + "$ref": "#/definitions/RemoteDomainAccessScope" + } + }, + "assetProtocol": { + "description": "Custom protocol config.", "default": { - "all": false, - "hide": false, - "show": false + "enable": false, + "scope": [] }, "allOf": [ { - "$ref": "#/definitions/AppAllowlistConfig" + "$ref": "#/definitions/AssetProtocolConfig" } ] } }, "additionalProperties": false }, - "FsAllowlistConfig": { - "description": "Allowlist for the file system APIs.\n\nSee more: https://tauri.app/v1/api/config#fsallowlistconfig", - "type": "object", - "properties": { - "scope": { - "description": "The access scope for the filesystem APIs.", - "default": [], - "allOf": [ - { - "$ref": "#/definitions/FsAllowlistScope" - } - ] - }, - "all": { - "description": "Use this flag to enable all file system API features.", - "default": false, - "type": "boolean" - }, - "readFile": { - "description": "Read file from local filesystem.", - "default": false, - "type": "boolean" - }, - "writeFile": { - "description": "Write file to local filesystem.", - "default": false, - "type": "boolean" + "Csp": { + "description": "A Content-Security-Policy definition. See .", + "anyOf": [ + { + "description": "The entire CSP policy in a single text string.", + "type": "string" }, - "readDir": { - "description": "Read directory from local filesystem.", - "default": false, - "type": "boolean" - }, - "copyFile": { - "description": "Copy file from local filesystem.", - "default": false, - "type": "boolean" - }, - "createDir": { - "description": "Create directory from local filesystem.", - "default": false, - "type": "boolean" - }, - "removeDir": { - "description": "Remove directory from local filesystem.", - "default": false, - "type": "boolean" - }, - "removeFile": { - "description": "Remove file from local filesystem.", - "default": false, - "type": "boolean" - }, - "renameFile": { - "description": "Rename file from local filesystem.", - "default": false, - "type": "boolean" - }, - "exists": { - "description": "Check if path exists on the local filesystem.", - "default": false, - "type": "boolean" - } - }, - "additionalProperties": false - }, - "FsAllowlistScope": { - "description": "Filesystem scope definition. It is a list of glob patterns that restrict the API access from the webview.\n\nEach pattern can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.", - "anyOf": [ - { - "description": "A list of paths that are allowed by this scope.", - "type": "array", - "items": { - "type": "string" - } - }, - { - "description": "A complete scope configuration.", - "type": "object", - "properties": { - "allow": { - "description": "A list of paths that are allowed by this scope.", - "default": [], - "type": "array", - "items": { - "type": "string" - } - }, - "deny": { - "description": "A list of paths that are not allowed by this scope. This gets precedence over the [`Self::Scope::allow`] list.", - "default": [], - "type": "array", - "items": { - "type": "string" - } - } - } - } - ] - }, - "WindowAllowlistConfig": { - "description": "Allowlist for the window APIs.\n\nSee more: https://tauri.app/v1/api/config#windowallowlistconfig", - "type": "object", - "properties": { - "all": { - "description": "Use this flag to enable all window API features.", - "default": false, - "type": "boolean" - }, - "create": { - "description": "Allows dynamic window creation.", - "default": false, - "type": "boolean" - }, - "center": { - "description": "Allows centering the window.", - "default": false, - "type": "boolean" - }, - "requestUserAttention": { - "description": "Allows requesting user attention on the window.", - "default": false, - "type": "boolean" - }, - "setResizable": { - "description": "Allows setting the resizable flag of the window.", - "default": false, - "type": "boolean" - }, - "setTitle": { - "description": "Allows changing the window title.", - "default": false, - "type": "boolean" - }, - "maximize": { - "description": "Allows maximizing the window.", - "default": false, - "type": "boolean" - }, - "unmaximize": { - "description": "Allows unmaximizing the window.", - "default": false, - "type": "boolean" - }, - "minimize": { - "description": "Allows minimizing the window.", - "default": false, - "type": "boolean" - }, - "unminimize": { - "description": "Allows unminimizing the window.", - "default": false, - "type": "boolean" - }, - "show": { - "description": "Allows showing the window.", - "default": false, - "type": "boolean" - }, - "hide": { - "description": "Allows hiding the window.", - "default": false, - "type": "boolean" - }, - "close": { - "description": "Allows closing the window.", - "default": false, - "type": "boolean" - }, - "setDecorations": { - "description": "Allows setting the decorations flag of the window.", - "default": false, - "type": "boolean" - }, - "setShadow": { - "description": "Allows setting the shadow flag of the window.", - "default": false, - "type": "boolean" - }, - "setAlwaysOnTop": { - "description": "Allows setting the always_on_top flag of the window.", - "default": false, - "type": "boolean" - }, - "setContentProtected": { - "description": "Allows preventing the window contents from being captured by other apps.", - "default": false, - "type": "boolean" - }, - "setSize": { - "description": "Allows setting the window size.", - "default": false, - "type": "boolean" - }, - "setMinSize": { - "description": "Allows setting the window minimum size.", - "default": false, - "type": "boolean" - }, - "setMaxSize": { - "description": "Allows setting the window maximum size.", - "default": false, - "type": "boolean" - }, - "setPosition": { - "description": "Allows changing the position of the window.", - "default": false, - "type": "boolean" - }, - "setFullscreen": { - "description": "Allows setting the fullscreen flag of the window.", - "default": false, - "type": "boolean" - }, - "setFocus": { - "description": "Allows focusing the window.", - "default": false, - "type": "boolean" - }, - "setIcon": { - "description": "Allows changing the window icon.", - "default": false, - "type": "boolean" - }, - "setSkipTaskbar": { - "description": "Allows setting the skip_taskbar flag of the window.", - "default": false, - "type": "boolean" - }, - "setCursorGrab": { - "description": "Allows grabbing the cursor.", - "default": false, - "type": "boolean" - }, - "setCursorVisible": { - "description": "Allows setting the cursor visibility.", - "default": false, - "type": "boolean" - }, - "setCursorIcon": { - "description": "Allows changing the cursor icon.", - "default": false, - "type": "boolean" - }, - "setCursorPosition": { - "description": "Allows setting the cursor position.", - "default": false, - "type": "boolean" - }, - "setIgnoreCursorEvents": { - "description": "Allows ignoring cursor events.", - "default": false, - "type": "boolean" - }, - "startDragging": { - "description": "Allows start dragging on the window.", - "default": false, - "type": "boolean" - }, - "print": { - "description": "Allows opening the system dialog to print the window content.", - "default": false, - "type": "boolean" - } - }, - "additionalProperties": false - }, - "ShellAllowlistConfig": { - "description": "Allowlist for the shell APIs.\n\nSee more: https://tauri.app/v1/api/config#shellallowlistconfig", - "type": "object", - "properties": { - "scope": { - "description": "Access scope for the binary execution APIs. Sidecars are automatically enabled.", - "default": [], - "allOf": [ - { - "$ref": "#/definitions/ShellAllowlistScope" - } - ] - }, - "all": { - "description": "Use this flag to enable all shell API features.", - "default": false, - "type": "boolean" - }, - "execute": { - "description": "Enable binary execution.", - "default": false, - "type": "boolean" - }, - "sidecar": { - "description": "Enable sidecar execution, allowing the JavaScript layer to spawn a sidecar command, an executable that is shipped with the application. For more information see .", - "default": false, - "type": "boolean" - }, - "open": { - "description": "Open URL with the user's default application.", - "default": false, - "allOf": [ - { - "$ref": "#/definitions/ShellAllowlistOpen" - } - ] - } - }, - "additionalProperties": false - }, - "ShellAllowlistScope": { - "description": "Shell scope definition. It is a list of command names and associated CLI arguments that restrict the API access from the webview.", - "type": "array", - "items": { - "$ref": "#/definitions/ShellAllowedCommand" - } - }, - "ShellAllowedCommand": { - "description": "A command allowed to be executed by the webview API.", - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "description": "The name for this allowed shell command configuration.\n\nThis name will be used inside of the webview API to call this command along with any specified arguments.", - "type": "string" - }, - "cmd": { - "description": "The command name. It can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.", - "default": "", - "type": "string" - }, - "args": { - "description": "The allowed arguments for the command execution.", - "default": false, - "allOf": [ - { - "$ref": "#/definitions/ShellAllowedArgs" - } - ] - }, - "sidecar": { - "description": "If this command is a sidecar command.", - "default": false, - "type": "boolean" - } - } - }, - "ShellAllowedArgs": { - "description": "A set of command arguments allowed to be executed by the webview API.\n\nA value of `true` will allow any arguments to be passed to the command. `false` will disable all arguments. A list of [`ShellAllowedArg`] will set those arguments as the only valid arguments to be passed to the attached command configuration.", - "anyOf": [ - { - "description": "Use a simple boolean to allow all or disable all arguments to this command configuration.", - "type": "boolean" - }, - { - "description": "A specific set of [`ShellAllowedArg`] that are valid to call for the command configuration.", - "type": "array", - "items": { - "$ref": "#/definitions/ShellAllowedArg" - } - } - ] - }, - "ShellAllowedArg": { - "description": "A command argument allowed to be executed by the webview API.", - "anyOf": [ - { - "description": "A non-configurable argument that is passed to the command in the order it was specified.", - "type": "string" - }, - { - "description": "A variable that is set while calling the command from the webview API.", - "type": "object", - "required": [ - "validator" - ], - "properties": { - "validator": { - "description": "[regex] validator to require passed values to conform to an expected input.\n\nThis will require the argument value passed to this variable to match the `validator` regex before it will be executed.\n\n[regex]: https://docs.rs/regex/latest/regex/#syntax", - "type": "string" - } - }, - "additionalProperties": false - } - ] - }, - "ShellAllowlistOpen": { - "description": "Defines the `shell > open` api scope.", - "anyOf": [ - { - "description": "If the shell open API should be enabled.\n\nIf enabled, the default validation regex (`^((mailto:\\w+)|(tel:\\w+)|(https?://\\w+)).+`) is used.", - "type": "boolean" - }, - { - "description": "Enable the shell open API, with a custom regex that the opened path must match against.\n\nIf using a custom regex to support a non-http(s) schema, care should be used to prevent values that allow flag-like strings to pass validation. e.g. `--enable-debugging`, `-i`, `/R`.", - "type": "string" - } - ] - }, - "DialogAllowlistConfig": { - "description": "Allowlist for the dialog APIs.\n\nSee more: https://tauri.app/v1/api/config#dialogallowlistconfig", - "type": "object", - "properties": { - "all": { - "description": "Use this flag to enable all dialog API features.", - "default": false, - "type": "boolean" - }, - "open": { - "description": "Allows the API to open a dialog window to pick files.", - "default": false, - "type": "boolean" - }, - "save": { - "description": "Allows the API to open a dialog window to pick where to save files.", - "default": false, - "type": "boolean" - }, - "message": { - "description": "Allows the API to show a message dialog window.", - "default": false, - "type": "boolean" - }, - "ask": { - "description": "Allows the API to show a dialog window with Yes/No buttons.", - "default": false, - "type": "boolean" - }, - "confirm": { - "description": "Allows the API to show a dialog window with Ok/Cancel buttons.", - "default": false, - "type": "boolean" - } - }, - "additionalProperties": false - }, - "HttpAllowlistConfig": { - "description": "Allowlist for the HTTP APIs.\n\nSee more: https://tauri.app/v1/api/config#httpallowlistconfig", - "type": "object", - "properties": { - "scope": { - "description": "The access scope for the HTTP APIs.", - "default": [], - "allOf": [ - { - "$ref": "#/definitions/HttpAllowlistScope" - } - ] - }, - "all": { - "description": "Use this flag to enable all HTTP API features.", - "default": false, - "type": "boolean" - }, - "request": { - "description": "Allows making HTTP requests.", - "default": false, - "type": "boolean" - } - }, - "additionalProperties": false - }, - "HttpAllowlistScope": { - "description": "HTTP API scope definition. It is a list of URLs that can be accessed by the webview when using the HTTP APIs. The scoped URL is matched against the request URL using a glob pattern.\n\nExamples: - \"https://**\": allows all HTTPS urls - \"https://*.github.com/tauri-apps/tauri\": allows any subdomain of \"github.com\" with the \"tauri-apps/api\" path - \"https://myapi.service.com/users/*\": allows access to any URLs that begins with \"https://myapi.service.com/users/\"", - "type": "array", - "items": { - "type": "string", - "format": "uri" - } - }, - "NotificationAllowlistConfig": { - "description": "Allowlist for the notification APIs.\n\nSee more: https://tauri.app/v1/api/config#notificationallowlistconfig", - "type": "object", - "properties": { - "all": { - "description": "Use this flag to enable all notification API features.", - "default": false, - "type": "boolean" - } - }, - "additionalProperties": false - }, - "GlobalShortcutAllowlistConfig": { - "description": "Allowlist for the global shortcut APIs.\n\nSee more: https://tauri.app/v1/api/config#globalshortcutallowlistconfig", - "type": "object", - "properties": { - "all": { - "description": "Use this flag to enable all global shortcut API features.", - "default": false, - "type": "boolean" - } - }, - "additionalProperties": false - }, - "OsAllowlistConfig": { - "description": "Allowlist for the OS APIs.\n\nSee more: https://tauri.app/v1/api/config#osallowlistconfig", - "type": "object", - "properties": { - "all": { - "description": "Use this flag to enable all OS API features.", - "default": false, - "type": "boolean" - } - }, - "additionalProperties": false - }, - "PathAllowlistConfig": { - "description": "Allowlist for the path APIs.\n\nSee more: https://tauri.app/v1/api/config#pathallowlistconfig", - "type": "object", - "properties": { - "all": { - "description": "Use this flag to enable all path API features.", - "default": false, - "type": "boolean" - } - }, - "additionalProperties": false - }, - "ProtocolAllowlistConfig": { - "description": "Allowlist for the custom protocols.\n\nSee more: https://tauri.app/v1/api/config#protocolallowlistconfig", - "type": "object", - "properties": { - "assetScope": { - "description": "The access scope for the asset protocol.", - "default": [], - "allOf": [ - { - "$ref": "#/definitions/FsAllowlistScope" - } - ] - }, - "all": { - "description": "Use this flag to enable all custom protocols.", - "default": false, - "type": "boolean" - }, - "asset": { - "description": "Enables the asset protocol.", - "default": false, - "type": "boolean" - } - }, - "additionalProperties": false - }, - "ProcessAllowlistConfig": { - "description": "Allowlist for the process APIs.\n\nSee more: https://tauri.app/v1/api/config#processallowlistconfig", - "type": "object", - "properties": { - "all": { - "description": "Use this flag to enable all process APIs.", - "default": false, - "type": "boolean" - }, - "relaunch": { - "description": "Enables the relaunch API.", - "default": false, - "type": "boolean" - }, - "relaunchDangerousAllowSymlinkMacos": { - "description": "Dangerous option that allows macOS to relaunch even if the binary contains a symlink.\n\nThis is due to macOS having less symlink protection. Highly recommended to not set this flag unless you have a very specific reason too, and understand the implications of it.", - "default": false, - "type": "boolean" - }, - "exit": { - "description": "Enables the exit API.", - "default": false, - "type": "boolean" - } - }, - "additionalProperties": false - }, - "ClipboardAllowlistConfig": { - "description": "Allowlist for the clipboard APIs.\n\nSee more: https://tauri.app/v1/api/config#clipboardallowlistconfig", - "type": "object", - "properties": { - "all": { - "description": "Use this flag to enable all clipboard APIs.", - "default": false, - "type": "boolean" - }, - "writeText": { - "description": "Enables the clipboard's `writeText` API.", - "default": false, - "type": "boolean" - }, - "readText": { - "description": "Enables the clipboard's `readText` API.", - "default": false, - "type": "boolean" - } - }, - "additionalProperties": false - }, - "AppAllowlistConfig": { - "description": "Allowlist for the app APIs.\n\nSee more: https://tauri.app/v1/api/config#appallowlistconfig", - "type": "object", - "properties": { - "all": { - "description": "Use this flag to enable all app APIs.", - "default": false, - "type": "boolean" - }, - "show": { - "description": "Enables the app's `show` API.", - "default": false, - "type": "boolean" - }, - "hide": { - "description": "Enables the app's `hide` API.", - "default": false, - "type": "boolean" - } - }, - "additionalProperties": false - }, - "SecurityConfig": { - "description": "Security configuration.\n\nSee more: https://tauri.app/v1/api/config#securityconfig", - "type": "object", - "properties": { - "csp": { - "description": "The Content Security Policy that will be injected on all HTML files on the built application. If [`dev_csp`](#SecurityConfig.devCsp) is not specified, this value is also injected on dev.\n\nThis is a really important part of the configuration since it helps you ensure your WebView is secured. See .", - "anyOf": [ - { - "$ref": "#/definitions/Csp" - }, - { - "type": "null" - } - ] - }, - "devCsp": { - "description": "The Content Security Policy that will be injected on all HTML files on development.\n\nThis is a really important part of the configuration since it helps you ensure your WebView is secured. See .", - "anyOf": [ - { - "$ref": "#/definitions/Csp" - }, - { - "type": "null" - } - ] - }, - "freezePrototype": { - "description": "Freeze the `Object.prototype` when using the custom protocol.", - "default": false, - "type": "boolean" - }, - "dangerousDisableAssetCspModification": { - "description": "Disables the Tauri-injected CSP sources.\n\nAt compile time, Tauri parses all the frontend assets and changes the Content-Security-Policy to only allow loading of your own scripts and styles by injecting nonce and hash sources. This stricts your CSP, which may introduce issues when using along with other flexing sources.\n\nThis configuration option allows both a boolean and a list of strings as value. A boolean instructs Tauri to disable the injection for all CSP injections, and a list of strings indicates the CSP directives that Tauri cannot inject.\n\n**WARNING:** Only disable this if you know what you are doing and have properly configured the CSP. Your application might be vulnerable to XSS attacks without this Tauri protection.", - "default": false, - "allOf": [ - { - "$ref": "#/definitions/DisabledCspModificationKind" - } - ] - }, - "dangerousRemoteDomainIpcAccess": { - "description": "Allow external domains to send command to Tauri.\n\nBy default, external domains do not have access to `window.__TAURI__`, which means they cannot communicate with the commands defined in Rust. This prevents attacks where an externally loaded malicious or compromised sites could start executing commands on the user's device.\n\nThis configuration allows a set of external domains to have access to the Tauri commands. When you configure a domain to be allowed to access the IPC, all subpaths are allowed. Subdomains are not allowed.\n\n**WARNING:** Only use this option if you either have internal checks against malicious external sites or you can trust the allowed external sites. You application might be vulnerable to dangerous Tauri command related attacks otherwise.", - "default": [], - "type": "array", - "items": { - "$ref": "#/definitions/RemoteDomainAccessScope" - } - } - }, - "additionalProperties": false - }, - "Csp": { - "description": "A Content-Security-Policy definition. See .", - "anyOf": [ - { - "description": "The entire CSP policy in a single text string.", - "type": "string" - }, - { - "description": "An object mapping a directive with its sources values as a list of strings.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/CspDirectiveSources" - } - } - ] - }, - "CspDirectiveSources": { - "description": "A Content-Security-Policy directive source list. See .", - "anyOf": [ - { - "description": "An inline list of CSP sources. Same as [`Self::List`], but concatenated with a space separator.", - "type": "string" + { + "description": "An object mapping a directive with its sources values as a list of strings.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/CspDirectiveSources" + } + } + ] + }, + "CspDirectiveSources": { + "description": "A Content-Security-Policy directive source list. See .", + "anyOf": [ + { + "description": "An inline list of CSP sources. Same as [`Self::List`], but concatenated with a space separator.", + "type": "string" }, { "description": "A list of CSP sources. The collection will be concatenated with a space separator for the CSP string.", @@ -2512,97 +1563,58 @@ }, "additionalProperties": false }, - "UpdaterConfig": { - "description": "The Updater configuration object.\n\nSee more: https://tauri.app/v1/api/config#updaterconfig", + "AssetProtocolConfig": { + "description": "Config for the asset custom protocol.\n\nSee more: https://tauri.app/v1/api/config#assetprotocolconfig", "type": "object", "properties": { - "active": { - "description": "Whether the updater is active or not.", - "default": false, - "type": "boolean" - }, - "endpoints": { - "description": "The updater endpoints. TLS is enforced on production.\n\nThe updater URL can contain the following variables: - {{current_version}}: The version of the app that is requesting the update - {{target}}: The operating system name (one of `linux`, `windows` or `darwin`). - {{arch}}: The architecture of the machine (one of `x86_64`, `i686`, `aarch64` or `armv7`).\n\n# Examples - \"https://my.cdn.com/latest.json\": a raw JSON endpoint that returns the latest version and download links for each platform. - \"https://updates.app.dev/{{target}}?version={{current_version}}&arch={{arch}}\": a dedicated API with positional and query string arguments.", - "type": [ - "array", - "null" - ], - "items": { - "$ref": "#/definitions/UpdaterEndpoint" - } - }, - "pubkey": { - "description": "Signature public key.", - "default": "", - "type": "string" - }, - "windows": { - "description": "The Windows configuration for the updater.", - "default": { - "installMode": "passive", - "installerArgs": [] - }, + "scope": { + "description": "The access scope for the asset protocol.", + "default": [], "allOf": [ { - "$ref": "#/definitions/UpdaterWindowsConfig" + "$ref": "#/definitions/FsScope" } ] + }, + "enable": { + "description": "Enables the asset protocol.", + "default": false, + "type": "boolean" } }, "additionalProperties": false }, - "UpdaterEndpoint": { - "description": "A URL to an updater server.\n\nThe URL must use the `https` scheme on production.", - "type": "string", - "format": "uri" - }, - "UpdaterWindowsConfig": { - "description": "The updater configuration for Windows.\n\nSee more: https://tauri.app/v1/api/config#updaterwindowsconfig", - "type": "object", - "properties": { - "installerArgs": { - "description": "Additional arguments given to the NSIS or WiX installer.", - "default": [], + "FsScope": { + "description": "Protocol scope definition. It is a list of glob patterns that restrict the API access from the webview.\n\nEach pattern can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.", + "anyOf": [ + { + "description": "A list of paths that are allowed by this scope.", "type": "array", "items": { "type": "string" } }, - "installMode": { - "description": "The installation mode for the update on Windows. Defaults to `passive`.", - "default": "passive", - "allOf": [ - { - "$ref": "#/definitions/WindowsUpdateInstallMode" - } - ] - } - }, - "additionalProperties": false - }, - "WindowsUpdateInstallMode": { - "description": "Install modes for the Windows update.", - "oneOf": [ - { - "description": "Specifies there's a basic UI during the installation process, including a final dialog box at the end.", - "type": "string", - "enum": [ - "basicUi" - ] - }, { - "description": "The quiet mode means there's no user interaction required. Requires admin privileges if the installer does (WiX).", - "type": "string", - "enum": [ - "quiet" - ] - }, - { - "description": "Specifies unattended mode, which means the installation only shows a progress bar.", - "type": "string", - "enum": [ - "passive" - ] + "description": "A complete scope configuration.", + "type": "object", + "properties": { + "allow": { + "description": "A list of paths that are allowed by this scope.", + "default": [], + "type": "array", + "items": { + "type": "string" + } + }, + "deny": { + "description": "A list of paths that are not allowed by this scope. This gets precedence over the [`Self::Scope::allow`] list.", + "default": [], + "type": "array", + "items": { + "type": "string" + } + } + } } ] }, diff --git a/tooling/cli/src/build.rs b/tooling/cli/src/build.rs index b1271adcabc..98d12b96cb2 100644 --- a/tooling/cli/src/build.rs +++ b/tooling/cli/src/build.rs @@ -112,7 +112,7 @@ pub fn command(mut options: Options, verbosity: u8) -> Result<()> { }; if let Some(types) = &package_types { - if config_.tauri.updater.active && !types.contains(&PackageType::Updater) { + if config_.tauri.bundle.updater.active && !types.contains(&PackageType::Updater) { warn!("The updater is enabled but the bundle target list does not contain `updater`, so the updater artifacts won't be generated."); } } @@ -142,13 +142,6 @@ pub fn command(mut options: Options, verbosity: u8) -> Result<()> { // set env vars used by the bundler #[cfg(target_os = "linux")] { - use crate::helpers::config::ShellAllowlistOpen; - if matches!( - config_.tauri.allowlist.shell.open, - ShellAllowlistOpen::Flag(true) | ShellAllowlistOpen::Validate(_) - ) { - std::env::set_var("APPIMAGE_BUNDLE_XDG_OPEN", "1"); - } if config_.tauri.system_tray.is_some() { if let Ok(tray) = std::env::var("TAURI_TRAY") { std::env::set_var( @@ -188,7 +181,7 @@ pub fn command(mut options: Options, verbosity: u8) -> Result<()> { .filter(|bundle| bundle.package_type == PackageType::Updater) .collect(); // If updater is active and we bundled it - if config_.tauri.updater.active && !updater_bundles.is_empty() { + if config_.tauri.bundle.updater.active && !updater_bundles.is_empty() { // if no password provided we use an empty string let password = var_os("TAURI_KEY_PASSWORD") .map(|v| v.to_str().unwrap().to_string()) @@ -211,7 +204,7 @@ pub fn command(mut options: Options, verbosity: u8) -> Result<()> { }?; let pubkey = - base64::engine::general_purpose::STANDARD.decode(&config_.tauri.updater.pubkey)?; + base64::engine::general_purpose::STANDARD.decode(&config_.tauri.bundle.updater.pubkey)?; let pub_key_decoded = String::from_utf8_lossy(&pubkey); let public_key = minisign::PublicKeyBox::from_string(&pub_key_decoded)?.into_public_key()?; diff --git a/tooling/cli/src/interface/rust.rs b/tooling/cli/src/interface/rust.rs index dff3f721460..f35d53c31b0 100644 --- a/tooling/cli/src/interface/rust.rs +++ b/tooling/cli/src/interface/rust.rs @@ -693,7 +693,6 @@ impl AppSettings for RustAppSettings { features, config.tauri.bundle.clone(), config.tauri.system_tray.clone(), - config.tauri.updater.clone(), ) } @@ -1029,7 +1028,6 @@ fn tauri_config_to_bundle_settings( features: &[String], config: crate::helpers::config::BundleConfig, system_tray_config: Option, - updater_config: crate::helpers::config::UpdaterConfig, ) -> crate::Result { let enabled_features = manifest.all_enabled_features(features); @@ -1159,12 +1157,9 @@ fn tauri_config_to_bundle_settings( allow_downgrades: config.windows.allow_downgrades, }, updater: Some(UpdaterSettings { - active: updater_config.active, - pubkey: updater_config.pubkey, - endpoints: updater_config - .endpoints - .map(|endpoints| endpoints.iter().map(|e| e.to_string()).collect()), - msiexec_args: Some(updater_config.windows.install_mode.msiexec_args()), + active: config.updater.active, + pubkey: config.updater.pubkey, + msiexec_args: Some(config.updater.windows.install_mode.msiexec_args()), }), ..Default::default() }) diff --git a/tooling/cli/templates/plugin/__example-api/tauri-app/src-tauri/tauri.conf.json b/tooling/cli/templates/plugin/__example-api/tauri-app/src-tauri/tauri.conf.json index 85db6a8f92e..5d6f5f5d00c 100644 --- a/tooling/cli/templates/plugin/__example-api/tauri-app/src-tauri/tauri.conf.json +++ b/tooling/cli/templates/plugin/__example-api/tauri-app/src-tauri/tauri.conf.json @@ -11,9 +11,6 @@ "version": "0.0.0" }, "tauri": { - "allowlist": { - "all": true - }, "bundle": { "active": true, "category": "DeveloperTool", @@ -50,9 +47,6 @@ "security": { "csp": null }, - "updater": { - "active": false - }, "windows": [ { "fullscreen": false, diff --git a/tooling/cli/templates/plugin/__example-basic/vanilla/src-tauri/tauri.conf.json b/tooling/cli/templates/plugin/__example-basic/vanilla/src-tauri/tauri.conf.json index 46829680d1a..36149bb456a 100644 --- a/tooling/cli/templates/plugin/__example-basic/vanilla/src-tauri/tauri.conf.json +++ b/tooling/cli/templates/plugin/__example-basic/vanilla/src-tauri/tauri.conf.json @@ -40,12 +40,6 @@ "timestampUrl": "" } }, - "updater": { - "active": false - }, - "allowlist": { - "all": false - }, "windows": [ { "title": "app", diff --git a/tooling/cli/templates/tauri.conf.json b/tooling/cli/templates/tauri.conf.json index af2bebd2d74..959c2515846 100644 --- a/tooling/cli/templates/tauri.conf.json +++ b/tooling/cli/templates/tauri.conf.json @@ -43,9 +43,6 @@ "timestampUrl": "" } }, - "allowlist": { - "all": false - }, "windows": [ { "title": "{{ window_title }}", @@ -59,4 +56,4 @@ "csp": null } } -} \ No newline at end of file +}