@tauri-apps/cli 3.0.0-alpha.3 → 3.0.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +73 -7
- package/config.schema.json +123 -16
- package/package.json +12 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,38 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [3.0.0-alpha.5]
|
|
4
|
+
|
|
5
|
+
### New Features
|
|
6
|
+
|
|
7
|
+
- [`7cf5d9032`](https://www.github.com/tauri-apps/tauri/commit/7cf5d903221d1400c0d256cbbff3a46d2d55781e) ([#16198](https://www.github.com/tauri-apps/tauri/pull/16198) by [@Vishal-770](https://www.github.com/tauri-apps/tauri/../../Vishal-770)) Add `bundle > linux > deb > compression` config option to control Debian bundle compression type and level.
|
|
8
|
+
- [`0e849336a`](https://www.github.com/tauri-apps/tauri/commit/0e849336a7f2b406d2d508cbdd01a25bcb02f8b9) ([#16261](https://www.github.com/tauri-apps/tauri/pull/16261) by [@github-actions](https://www.github.com/tauri-apps/tauri/../../github-actions)) zstd compression for deb and rpm bundles accepts negative levels (down to -131072) for zstd's fast modes. `DebCompression::Zstd`'s `level` is now an `i32`, and `DebCompression::{default_level, min_level, max_level, level}` return `Option<i32>`.
|
|
9
|
+
|
|
10
|
+
### Dependencies
|
|
11
|
+
|
|
12
|
+
- Upgraded to `tauri-cli@3.0.0-alpha.5`
|
|
13
|
+
|
|
14
|
+
### Breaking Changes
|
|
15
|
+
|
|
16
|
+
- [`0e849336a`](https://www.github.com/tauri-apps/tauri/commit/0e849336a7f2b406d2d508cbdd01a25bcb02f8b9) ([#16261](https://www.github.com/tauri-apps/tauri/pull/16261) by [@github-actions](https://www.github.com/tauri-apps/tauri/../../github-actions)) RPM bundles are compressed with zstd level 19 instead of gzip level 6 when `bundle > linux > rpm > compression` is not set, which matches rpm's own default. zstd payloads need rpm 4.14 or newer, so set the option to gzip to keep installing on older distributions.
|
|
17
|
+
|
|
18
|
+
## [3.0.0-alpha.4]
|
|
19
|
+
|
|
20
|
+
### New Features
|
|
21
|
+
|
|
22
|
+
- [`49dc7cc39`](https://www.github.com/tauri-apps/tauri/commit/49dc7cc39017f63b81adb09303d9b82d5b71207a) `tauri migrate` now migrates Tauri v2 apps to v3 (v1 and v2 beta apps continue to v3 after their existing migration):
|
|
23
|
+
|
|
24
|
+
- The Tauri crates and official plugins are updated to v3 in `Cargo.toml` and `package.json`, and the app depends on `tauri-runtime-wry`, which receives the `devtools`, `unstable`, `tracing`, `x11`, `dbus` and `macos-proxy` features (including the ones enabled through the app's own `[features]`). The removed `wry`, `macos-private-api` and `objc-exception` features are dropped.
|
|
25
|
+
- The `app > macOSPrivateApi` option is removed and the NSIS `install-icon` key is renamed to `installer-icon` in the main and platform-specific configuration files, keeping their formatting and comments.
|
|
26
|
+
- The Rust sources select the runtime with `.runtime(tauri_runtime_wry::Wry::default())` on `tauri::Builder::default()`, use `tauri::DynRuntime` instead of `tauri::Wry`, and pick up the renamed `with_inner_blocking`, `initialization_script`, `run_invoke_handler`, `tauri_runtime_wry::{tao, wry, android_binding, webview_version}` APIs.
|
|
27
|
+
|
|
28
|
+
### Dependencies
|
|
29
|
+
|
|
30
|
+
- Upgraded to `tauri-cli@3.0.0-alpha.4`
|
|
31
|
+
|
|
32
|
+
### Breaking Changes
|
|
33
|
+
|
|
34
|
+
- [`b9a77ebb8`](https://www.github.com/tauri-apps/tauri/commit/b9a77ebb8ab57480a354ec47aa45c6898ec9bfda) Removed the `macos-private-api` Cargo feature and the `app > macOSPrivateApi` configuration option. Window transparency and the `fullScreenEnabled` preference no longer rely on macOS private APIs, so they are always available.
|
|
35
|
+
|
|
3
36
|
## [3.0.0-alpha.3]
|
|
4
37
|
|
|
5
38
|
### Bug Fixes
|
|
@@ -56,12 +89,45 @@
|
|
|
56
89
|
### Breaking Changes
|
|
57
90
|
|
|
58
91
|
- [`1e5ba7b53`](https://www.github.com/tauri-apps/tauri/commit/1e5ba7b53dfb3da97f372b646f15853e5ba0e1a8) ([#15985](https://www.github.com/tauri-apps/tauri/pull/15985)) The CLI detects the webview runtime (wry, CEF or other) from the `tauri-runtime-wry` and `tauri-runtime-cef` dependencies of the app manifest instead of the removed `cef` feature of `tauri`:
|
|
59
|
-
|
|
92
|
+
|
|
60
93
|
- The webkit2gtk package dependencies of the Debian and RPM packages and the WebView2 installation step of the Windows installers are only added when the app uses wry.
|
|
61
94
|
- The CEF files, code signing entitlements and macOS dev flow are only used when the app uses CEF.
|
|
62
95
|
- Nothing runtime-specific is done for other runtimes.
|
|
63
96
|
- The app and plugin templates add the `tauri-runtime-wry` dependency and select it with `tauri::Builder::default().runtime(tauri_runtime_wry::Wry::default())`.
|
|
64
97
|
|
|
98
|
+
## [2.12.3]
|
|
99
|
+
|
|
100
|
+
### Bug Fixes
|
|
101
|
+
|
|
102
|
+
- [`c95be4615`](https://www.github.com/tauri-apps/tauri/commit/c95be4615a432b1d12409d3684c960e8aa718ada) ([#16287](https://www.github.com/tauri-apps/tauri/pull/16287)) Fix `tauri ios xcode-script` failing to find the Tauri project when Xcode inherits package manager environment variables from `tauri ios dev --open`, or when pnpm runs the CLI directly from the `gen/apple` folder.
|
|
103
|
+
- [`d62e5d9c0`](https://www.github.com/tauri-apps/tauri/commit/d62e5d9c0878b6fb327543cc9be50aa1696ee23c) ([#16184](https://www.github.com/tauri-apps/tauri/pull/16184)) Fix NSIS installer leaving `uninstall.exe` and the installation directory behind when uninstalling an existing installation from the installer.
|
|
104
|
+
|
|
105
|
+
### Dependencies
|
|
106
|
+
|
|
107
|
+
- Upgraded to `tauri-cli@2.12.3`
|
|
108
|
+
- [`5a2953e55`](https://www.github.com/tauri-apps/tauri/commit/5a2953e555b4444bed68bd5324ea13ad85a6c06e) ([#16237](https://www.github.com/tauri-apps/tauri/pull/16237)) Updated NSIS to 3.13
|
|
109
|
+
|
|
110
|
+
## [2.12.2]
|
|
111
|
+
|
|
112
|
+
### Bug Fixes
|
|
113
|
+
|
|
114
|
+
- [`c48e1ca89`](https://www.github.com/tauri-apps/tauri/commit/c48e1ca891a3b82770b6b03f87eba740344cf2f1) ([#16246](https://www.github.com/tauri-apps/tauri/pull/16246)) On iOS, mark the Swift `@_cdecl` entry points that Rust links against as `public` (in the iOS API and in the plugin templates), so release builds made with Xcode 27 keep them global and link.
|
|
115
|
+
|
|
116
|
+
### Dependencies
|
|
117
|
+
|
|
118
|
+
- Upgraded to `tauri-cli@2.12.2`
|
|
119
|
+
- [`fd319dd43`](https://www.github.com/tauri-apps/tauri/commit/fd319dd432e36748483ae93e6cdea1c44a66fe79) Update `base64` to 0.23.
|
|
120
|
+
|
|
121
|
+
## [2.12.1]
|
|
122
|
+
|
|
123
|
+
### Enhancements
|
|
124
|
+
|
|
125
|
+
- [`64bfdd909`](https://www.github.com/tauri-apps/tauri/commit/64bfdd909c5c3f0828371e4995b69ad5ed685126) ([#16165](https://www.github.com/tauri-apps/tauri/pull/16165) by [@Legend-Master](https://www.github.com/tauri-apps/tauri/../../Legend-Master)) Ignore `src-tauri` in `tauri plugin init` example template
|
|
126
|
+
|
|
127
|
+
### Dependencies
|
|
128
|
+
|
|
129
|
+
- Upgraded to `tauri-cli@2.12.1`
|
|
130
|
+
|
|
65
131
|
## [2.12.0]
|
|
66
132
|
|
|
67
133
|
### New Features
|
|
@@ -72,16 +138,16 @@
|
|
|
72
138
|
- [`0646cc162`](https://www.github.com/tauri-apps/tauri/commit/0646cc1623608dfdaec8d1adbc08d0159b9c2369) ([#15620](https://www.github.com/tauri-apps/tauri/pull/15620)) Add a `--fit` option to `tauri icon` to accept non-square source images. `--fit cover` center-crops the source to a square (clipping the longer side) and `--fit contain` pads the shorter side with transparency. Non-square sources without `--fit` keep erroring, now with a hint pointing to the flag.
|
|
73
139
|
- [`f6c1eb253`](https://www.github.com/tauri-apps/tauri/commit/f6c1eb2533a0445e081c334931d67fee3e354c6f) ([#15401](https://www.github.com/tauri-apps/tauri/pull/15401)) Added `build.windows.staticVCRuntime` to control MSVC static runtime linking. The `STATIC_VCRUNTIME` environment variable is now deprecated and emits a migration warning when used.
|
|
74
140
|
- [`f45ec0dcf`](https://www.github.com/tauri-apps/tauri/commit/f45ec0dcf83c139c8fdde5e61923a0e82836f756) Record the app version in the trusted comment of updater signatures, so a signed artifact is bound to the version it was released as.
|
|
75
|
-
|
|
141
|
+
|
|
76
142
|
An update endpoint response is not signed, and the signature only covers the downloaded artifact, so the announced `version` on its own does not prove which release the `url` and `signature` point at. minisign covers the trusted comment with its global signature, which lets the updater plugin compare the two and reject a response that pairs a version number with a different release. Enable `requireSignedVersion` in the updater plugin configuration to enforce this.
|
|
77
|
-
|
|
143
|
+
|
|
78
144
|
`tauri build` fills the version in automatically, and `tauri plugin add updater` now enables `requireSignedVersion` for the project it is adding the plugin to. `tauri signer sign` gains an `--app-version` flag for signing updater artifacts by hand, and warns when it is omitted.
|
|
79
145
|
|
|
80
146
|
### Enhancements
|
|
81
147
|
|
|
82
148
|
- [`e19121427`](https://www.github.com/tauri-apps/tauri/commit/e19121427332c8a14165999251cce415707a62fc) ([#15993](https://www.github.com/tauri-apps/tauri/pull/15993)) Don't always rewrite `Cargo.toml` file from CRLF line endings to LF
|
|
83
149
|
- [`aebf38c84`](https://www.github.com/tauri-apps/tauri/commit/aebf38c845b57bc5653eca677e2e2e044528ea73) ([#15694](https://www.github.com/tauri-apps/tauri/pull/15694)) Migrate the Android Gradle scripts from the deprecated `kotlinOptions` DSL to `compilerOptions`, which is accepted by both Kotlin Gradle Plugin 1.9.x and 2.x. This lets projects move to Kotlin 2.x without hitting the hard error that 2.3+ raises on the old DSL.
|
|
84
|
-
|
|
150
|
+
|
|
85
151
|
This increased the minimum supported Gradle version to 8.13, if your `gradle` is on an earlier version, delete `src-tauri/gen/android/gradle/wrapper/gradle-wrapper.properties` and re-run `tauri android init` to update it.
|
|
86
152
|
- [`d89d8fa62`](https://www.github.com/tauri-apps/tauri/commit/d89d8fa62302bd3553b66fd47ecfa046b2fc84ef) ([#15780](https://www.github.com/tauri-apps/tauri/pull/15780)) Warn during Android commands (`init`/`dev`/`build`) when the active Java version is too new for the Gradle version the project uses (e.g. Java 27 against the Gradle 9.6.1 the template ships, or Java 25 against a project still on Gradle 8.14), instead of letting the build fail later with a cryptic error. The warning points to the Gradle/Java compatibility matrix and suggests a supported JDK.
|
|
87
153
|
- [`c3d21bd60`](https://www.github.com/tauri-apps/tauri/commit/c3d21bd60c3355b284b23dee1a181c3423231182) ([#15730](https://www.github.com/tauri-apps/tauri/pull/15730)) Use `Theme.Material3.DayNight.NoActionBar` instead of `Theme.MaterialComponents.DayNight.NoActionBar` when running `tauri android init`
|
|
@@ -151,9 +217,9 @@
|
|
|
151
217
|
|
|
152
218
|
- Upgraded to `tauri-cli@2.12.0`
|
|
153
219
|
- [`e2e585ad1`](https://www.github.com/tauri-apps/tauri/commit/e2e585ad1196c9572f86ef39aae01ef4c3b1a762) ([#15828](https://www.github.com/tauri-apps/tauri/pull/15828)) On Android, fix missing `consumer-rules.pro` file in the template.
|
|
154
|
-
|
|
220
|
+
|
|
155
221
|
**IMPORTANT**: For plugin authors, update your `build.gradle.kts` file to remove the
|
|
156
|
-
|
|
222
|
+
|
|
157
223
|
```kotlin
|
|
158
224
|
buildTypes {
|
|
159
225
|
release {
|
|
@@ -165,7 +231,7 @@
|
|
|
165
231
|
}
|
|
166
232
|
}
|
|
167
233
|
```
|
|
168
|
-
|
|
234
|
+
|
|
169
235
|
section and rename your `proguard-rules.pro` to `consumer-rules.pro` to match the `consumerProguardFiles("consumer-rules.pro")` in the template.
|
|
170
236
|
- [`e2e585ad1`](https://www.github.com/tauri-apps/tauri/commit/e2e585ad1196c9572f86ef39aae01ef4c3b1a762) ([#15828](https://www.github.com/tauri-apps/tauri/pull/15828)) On Android, updated the template to use Gradle v9.6.1 (`com.android.tools.build:gradle` v9.3.1) and Kotlin v2.2. Use `tauri android init` to apply the change.
|
|
171
237
|
- [`9e9a54dea`](https://www.github.com/tauri-apps/tauri/commit/9e9a54dea26ae66de63800cabbccf980902a1cd3) ([#15890](https://www.github.com/tauri-apps/tauri/pull/15890)) Update the generated iOS Xcode project to build with Xcode 27. The scenes lifecycle is **not** enabled by default: to opt in, add the `UIApplicationSceneManifest` key to your `src-tauri/Info.ios.plist`.
|
package/config.schema.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$id": "https://schema.tauri.app/config/3.0.0-alpha.
|
|
2
|
+
"$id": "https://schema.tauri.app/config/3.0.0-alpha.5",
|
|
3
3
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4
4
|
"title": "Config",
|
|
5
5
|
"description": "The Tauri configuration object.\nIt is read from a file where you can define your frontend assets,\nconfigure the bundler and define a tray icon.\n\nThe configuration file is generated by the\n[`tauri init`](https://v2.tauri.app/reference/cli/#init) command that lives in\nyour 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.\nThe JSON5 file name must be either `tauri.conf.json` or `tauri.conf.json5`.\nThe TOML file name is `Tauri.toml`.\n\n## Platform-Specific Configuration\n\nIn addition to the default configuration file, Tauri can\nread a platform-specific configuration from `tauri.linux.conf.json`,\n`tauri.windows.conf.json`, `tauri.macos.conf.json`, `tauri.android.conf.json` and `tauri.ios.conf.json`\n(or `Tauri.linux.toml`, `Tauri.windows.toml`, `Tauri.macos.toml`, `Tauri.android.toml` and `Tauri.ios.toml` if the `Tauri.toml` format is used),\nwhich gets merged with the main configuration object.\n\n## Configuration Structure\n\nThe configuration is composed of the following objects:\n\n- [`app`](#appconfig): The Tauri configuration\n- [`build`](#buildconfig): The build configuration\n- [`bundle`](#bundleconfig): The bundle configurations\n- [`plugins`](#pluginconfig): The plugins configuration\n\nExample tauri.config.json file:\n\n```json\n{\n \"productName\": \"tauri-app\",\n \"version\": \"0.1.0\",\n \"build\": {\n \"beforeBuildCommand\": \"\",\n \"beforeDevCommand\": \"\",\n \"devUrl\": \"http://localhost:3000\",\n \"frontendDist\": \"../dist\"\n },\n \"app\": {\n \"security\": {\n \"csp\": null\n },\n \"windows\": [\n {\n \"fullscreen\": false,\n \"height\": 600,\n \"resizable\": true,\n \"title\": \"Tauri App\",\n \"width\": 800\n }\n ]\n },\n \"bundle\": {},\n \"plugins\": {}\n}\n```",
|
|
@@ -54,7 +54,6 @@
|
|
|
54
54
|
},
|
|
55
55
|
"capabilities": []
|
|
56
56
|
},
|
|
57
|
-
"macOSPrivateApi": false,
|
|
58
57
|
"withGlobalTauri": false,
|
|
59
58
|
"enableGTKAppId": false
|
|
60
59
|
},
|
|
@@ -173,7 +172,7 @@
|
|
|
173
172
|
"type": "object",
|
|
174
173
|
"properties": {
|
|
175
174
|
"windows": {
|
|
176
|
-
"description": "The app windows configuration.\n\n## Example:\n\nTo create a window at app startup\n\n```json\n{\n \"app\": {\n \"windows\": [\n { \"width\": 800, \"height\": 600 }\n ]\n }\n}\n```\n\nIf not specified, the window's label (its identifier) defaults to \"main\",\nyou can use this label to get the window through\n`app.get_webview_window` in Rust or `WebviewWindow.getByLabel` in JavaScript\n\nWhen working with multiple windows, each window will need an unique label\n\n```json\n{\n \"app\": {\n \"windows\": [\n { \"label\": \"main\", \"width\": 800, \"height\": 600 },\n { \"label\": \"secondary\", \"width\": 800, \"height\": 600 }\n ]\n }\n}\n```\n\nYou can also set `create` to false and use this config through the Rust APIs\n\n```json\n{\n \"app\": {\n \"windows\": [\n { \"create\": false, \"width\": 800, \"height\": 600 }\n ]\n }\n}\n```\n\nand use it like this\n\n```rust\ntauri::Builder::default()\n .setup(|app| {\n tauri::WebviewWindowBuilder::from_config(app.handle(), &app.config().app.windows[0])?.build()?;\n Ok(())\n });\n```",
|
|
175
|
+
"description": "The app windows configuration.\n\n## Example:\n\nTo create a window at app startup\n\n```json\n{\n \"app\": {\n \"windows\": [\n { \"width\": 800, \"height\": 600 }\n ]\n }\n}\n```\n\nIf not specified, the window's label (its identifier) defaults to \"main\",\nyou can use this label to get the window through\n`app.get_webview_window` in Rust or `WebviewWindow.getByLabel` in JavaScript\n\nWhen working with multiple windows, each window will need an unique label\n\n```json\n{\n \"app\": {\n \"windows\": [\n { \"label\": \"main\", \"width\": 800, \"height\": 600 },\n { \"label\": \"secondary\", \"width\": 800, \"height\": 600 }\n ]\n }\n}\n```\n\nYou can also set `create` to false and use this config through the Rust APIs\n\n```json\n{\n \"app\": {\n \"windows\": [\n { \"create\": false, \"width\": 800, \"height\": 600 }\n ]\n }\n}\n```\n\nand use it like this\n\n```rust,no_run\ntauri::Builder::default()\n .setup(|app| {\n tauri::WebviewWindowBuilder::from_config(app.handle(), &app.config().app.windows[0])?.build()?;\n Ok(())\n });\n```",
|
|
177
176
|
"type": "array",
|
|
178
177
|
"items": {
|
|
179
178
|
"$ref": "#/definitions/WindowConfig"
|
|
@@ -211,11 +210,6 @@
|
|
|
211
210
|
}
|
|
212
211
|
]
|
|
213
212
|
},
|
|
214
|
-
"macOSPrivateApi": {
|
|
215
|
-
"description": "MacOS private API configuration. Enables the transparent background API and sets the `fullScreenEnabled` preference to `true`.",
|
|
216
|
-
"type": "boolean",
|
|
217
|
-
"default": false
|
|
218
|
-
},
|
|
219
213
|
"withGlobalTauri": {
|
|
220
214
|
"description": "Whether we should inject the Tauri API on `window.__TAURI__` or not.",
|
|
221
215
|
"type": "boolean",
|
|
@@ -227,7 +221,7 @@
|
|
|
227
221
|
"default": false
|
|
228
222
|
},
|
|
229
223
|
"appDirectoriesOverride": {
|
|
230
|
-
"description": "Overrides the directories returned by the `app_*_dir` path APIs (`app_config_dir`, `app_data_dir`,\n`app_local_data_dir`, `app_cache_dir` and `app_log_dir`) and the matching `$APPCONFIG`, `$APPDATA`,\n`$APPLOCALDATA`, `$APPCACHE` and `$APPLOG` base directory variables.\n\nThis is useful for portable apps that keep all of their data next to the executable,\nand for apps that want their app directories in a location they choose, such as `$DOCUMENT/my-app`.\nEverything that resolves paths through these APIs follows the override, including Tauri itself\n(the default webview data directory on Windows and Linux) and plugins,\nso the storage locations do not need to be configured one by one.\nThe only exception is a window's `dataDirectory` config, which is not affected.\n\nIt can also isolate the data of a development build from an installed version of the app,\nthough a distinct `identifier` for development builds achieves that while keeping the production directory layout.\n\nThe value is either a single path used as the root of every app directory\n(config, data and local data resolve to the root itself, cache to `<root>/caches` and log to `<root>/logs`),\nor an object that overrides individual directories (`config`, `data`, `localData`, `cache` and `log`),\neach resolving to exactly the configured path. Directories that are not listed in the object keep their default location.\n\nEach path is resolved as follows:\n\n- A path starting with a base directory variable is resolved relative to that directory.\n The supported variables are `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`,\n `$DOWNLOAD`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$TEMP` and `$VIDEO`.\n `..` components are kept, so `$DATA/../my-app` refers to a sibling of the data directory.\n- An absolute path is used as is.\n- Any other path is resolved relative to the directory containing the executable,\n which must be writable, see the platform-specific notes below.\n\n## Examples\n\nKeep all data in an `app-data` folder next to the executable, for a portable build:\n\n```json\n{\n \"app\": {\n \"appDirectoriesOverride\": \"./app-data\"\n }\n}\n```\n\nOnly move the logs and the cache:\n\n```json\n{\n \"app\": {\n \"appDirectoriesOverride\": {\n \"log\": \"$DATA/my-app/logs\",\n \"cache\": \"$CACHE/my-app\"\n }\n }\n}\n```\n\nSet the override at runtime, for instance from an environment variable, a command line flag\nor a directory picked by the user, by modifying the config returned by `tauri::generate_context!()`\nbefore building the app:\n\n```rust\nuse tauri::utils::config::AppDirectoriesOverride;\n\nfn main() {\n let mut context = tauri::generate_context!();\n\n if let Ok(data_dir) = std::env::var(\"MY_APP_DATA_DIR\") {\n context.config_mut().app.app_directories_override =\n Some(AppDirectoriesOverride::Root(data_dir.into()));\n }\n\n tauri::Builder::default()\n .run(context)\n .expect(\"error while running tauri application\");\n}\n```\n\n## Security\n\nScopes and permissions that use the `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE` and `$APPLOG`\nvariables follow the override, so the configured paths must be directories dedicated to the app.\nA single root is used as is for the config, data and local data directories, so a root that is not dedicated\nto the app, such as `\"./\"` or `\"$DOCUMENT\"`, extends those scopes to everything it contains.\nWith `\"./\"`, `fs:default` (which allows reading the app directories recursively) lets the webview read\nevery file next to the executable, including anything else in the folder the app was run from,\nsuch as the downloads folder. If the app also grants write access to an app directory, a compromised webview\n(e.g. through XSS) can replace files next to the executable, such as dropping a DLL that Windows loads\nfrom the executable's directory on the next launch, leading to code execution.\nAlways point the override to a subfolder owned by the app, such as `\"./app-data\"` or `\"$DOCUMENT/my-app\"`.\n\n## Platform-specific\n\nA path relative to the executable only works where the executable's directory is writable:\nportable builds, `tauri dev` builds in the `target` directory and the cases listed below.\nEverywhere else every write to an app directory fails at runtime, so installed apps should use\na base directory variable or an absolute path instead. Unless every distribution of the app is portable,\nkeep relative paths out of the shared configuration and apply them to the portable build flavor only,\nfor instance with the CLI's `--config` flag, which accepts a JSON file or an inline JSON string:\n\n```sh\ntauri build --config '{ \"app\": { \"appDirectoriesOverride\": \"./app-data\" } }'\n```\n\n- **Linux**: Relative paths only work for AppImages, where they are resolved relative to the AppImage file,\n as long as it is kept in a writable directory. `.deb` and `.rpm` packages install the executable to `/usr/bin`.\n- **macOS**: Relative paths are resolved next to the `.app` bundle. This does not work for installed apps,\n since `/Applications` is not writable for standard users, nor for bundles downloaded from the internet,\n which run from a random read-only location (App Translocation) until the user moves them out of the quarantined folder.\n- **Windows**: Relative paths also work for per-user NSIS installers,\n but not for per-machine installers in `Program Files`.\n- **Android / iOS**: Relative paths are not supported, since there is no writable directory next to the executable.\n Use a base directory variable or an absolute path instead. `$DESKTOP` is not available on Android.",
|
|
224
|
+
"description": "Overrides the directories returned by the `app_*_dir` path APIs (`app_config_dir`, `app_data_dir`,\n`app_local_data_dir`, `app_cache_dir` and `app_log_dir`) and the matching `$APPCONFIG`, `$APPDATA`,\n`$APPLOCALDATA`, `$APPCACHE` and `$APPLOG` base directory variables.\n\nThis is useful for portable apps that keep all of their data next to the executable,\nand for apps that want their app directories in a location they choose, such as `$DOCUMENT/my-app`.\nEverything that resolves paths through these APIs follows the override, including Tauri itself\n(the default webview data directory on Windows and Linux) and plugins,\nso the storage locations do not need to be configured one by one.\nThe only exception is a window's `dataDirectory` config, which is not affected.\n\nIt can also isolate the data of a development build from an installed version of the app,\nthough a distinct `identifier` for development builds achieves that while keeping the production directory layout.\n\nThe value is either a single path used as the root of every app directory\n(config, data and local data resolve to the root itself, cache to `<root>/caches` and log to `<root>/logs`),\nor an object that overrides individual directories (`config`, `data`, `localData`, `cache` and `log`),\neach resolving to exactly the configured path. Directories that are not listed in the object keep their default location.\n\nEach path is resolved as follows:\n\n- A path starting with a base directory variable is resolved relative to that directory.\n The supported variables are `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`,\n `$DOWNLOAD`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$TEMP` and `$VIDEO`.\n `..` components are kept, so `$DATA/../my-app` refers to a sibling of the data directory.\n- An absolute path is used as is.\n- Any other path is resolved relative to the directory containing the executable,\n which must be writable, see the platform-specific notes below.\n\n## Examples\n\nKeep all data in an `app-data` folder next to the executable, for a portable build:\n\n```json\n{\n \"app\": {\n \"appDirectoriesOverride\": \"./app-data\"\n }\n}\n```\n\nOnly move the logs and the cache:\n\n```json\n{\n \"app\": {\n \"appDirectoriesOverride\": {\n \"log\": \"$DATA/my-app/logs\",\n \"cache\": \"$CACHE/my-app\"\n }\n }\n}\n```\n\nSet the override at runtime, for instance from an environment variable, a command line flag\nor a directory picked by the user, by modifying the config returned by `tauri::generate_context!()`\nbefore building the app:\n\n```rust,no_run\nuse tauri::utils::config::AppDirectoriesOverride;\n\nfn main() {\n // on an actual app, remove the string argument\n let mut context = tauri::generate_context!(\"../tauri/test/fixture/src-tauri/tauri.conf.json\");\n\n if let Ok(data_dir) = std::env::var(\"MY_APP_DATA_DIR\") {\n context.config_mut().app.app_directories_override =\n Some(AppDirectoriesOverride::Root(data_dir.into()));\n }\n\n tauri::Builder::default()\n .run(context)\n .expect(\"error while running tauri application\");\n}\n```\n\n## Security\n\nScopes and permissions that use the `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE` and `$APPLOG`\nvariables follow the override, so the configured paths must be directories dedicated to the app.\nA single root is used as is for the config, data and local data directories, so a root that is not dedicated\nto the app, such as `\"./\"` or `\"$DOCUMENT\"`, extends those scopes to everything it contains.\nWith `\"./\"`, `fs:default` (which allows reading the app directories recursively) lets the webview read\nevery file next to the executable, including anything else in the folder the app was run from,\nsuch as the downloads folder. If the app also grants write access to an app directory, a compromised webview\n(e.g. through XSS) can replace files next to the executable, such as dropping a DLL that Windows loads\nfrom the executable's directory on the next launch, leading to code execution.\nAlways point the override to a subfolder owned by the app, such as `\"./app-data\"` or `\"$DOCUMENT/my-app\"`.\n\n## Platform-specific\n\nA path relative to the executable only works where the executable's directory is writable:\nportable builds, `tauri dev` builds in the `target` directory and the cases listed below.\nEverywhere else every write to an app directory fails at runtime, so installed apps should use\na base directory variable or an absolute path instead. Unless every distribution of the app is portable,\nkeep relative paths out of the shared configuration and apply them to the portable build flavor only,\nfor instance with the CLI's `--config` flag, which accepts a JSON file or an inline JSON string:\n\n```sh\ntauri build --config '{ \"app\": { \"appDirectoriesOverride\": \"./app-data\" } }'\n```\n\n- **Linux**: Relative paths only work for AppImages, where they are resolved relative to the AppImage file,\n as long as it is kept in a writable directory. `.deb` and `.rpm` packages install the executable to `/usr/bin`.\n- **macOS**: Relative paths are resolved next to the `.app` bundle. This does not work for installed apps,\n since `/Applications` is not writable for standard users, nor for bundles downloaded from the internet,\n which run from a random read-only location (App Translocation) until the user moves them out of the quarantined folder.\n- **Windows**: Relative paths also work for per-user NSIS installers,\n but not for per-machine installers in `Program Files`.\n- **Android / iOS**: Relative paths are not supported, since there is no writable directory next to the executable.\n Use a base directory variable or an absolute path instead. `$DESKTOP` is not available on Android.",
|
|
231
225
|
"anyOf": [
|
|
232
226
|
{
|
|
233
227
|
"$ref": "#/definitions/AppDirectoriesOverride"
|
|
@@ -250,7 +244,7 @@
|
|
|
250
244
|
"default": "main"
|
|
251
245
|
},
|
|
252
246
|
"create": {
|
|
253
|
-
"description": "Whether Tauri should create this window at app startup or not.\n\nWhen this is set to `false` you must manually grab the config object via `app.config().app.windows`\nand create it with [`WebviewWindowBuilder::from_config`](https://docs.rs/tauri/2/tauri/webview/struct.WebviewWindowBuilder.html#method.from_config).\n\n## Example:\n\n```rust\ntauri::Builder::default()\n .setup(|app| {\n tauri::WebviewWindowBuilder::from_config(app.handle(), &app.config().app.windows[0])?.build()?;\n Ok(())\n });\n```",
|
|
247
|
+
"description": "Whether Tauri should create this window at app startup or not.\n\nWhen this is set to `false` you must manually grab the config object via `app.config().app.windows`\nand create it with [`WebviewWindowBuilder::from_config`](https://docs.rs/tauri/2/tauri/webview/struct.WebviewWindowBuilder.html#method.from_config).\n\n## Example:\n\n```rust,no_run\ntauri::Builder::default()\n .setup(|app| {\n tauri::WebviewWindowBuilder::from_config(app.handle(), &app.config().app.windows[0])?.build()?;\n Ok(())\n });\n```",
|
|
254
248
|
"type": "boolean",
|
|
255
249
|
"default": true
|
|
256
250
|
},
|
|
@@ -392,7 +386,7 @@
|
|
|
392
386
|
"default": true
|
|
393
387
|
},
|
|
394
388
|
"transparent": {
|
|
395
|
-
"description": "Whether the window is transparent or not.\n\n## Platform-specific\n\n- **
|
|
389
|
+
"description": "Whether the window is transparent or not.\n\n## Platform-specific\n\n- **Windows**: Using `noRedirectionBitmap` can help avoid a white flash when creating a transparent window.\n- **CEF runtime**: The window can be transparent but the webview cannot: a windowed Chromium browser paints an opaque background. The runtime logs a warning.",
|
|
396
390
|
"type": "boolean",
|
|
397
391
|
"default": false
|
|
398
392
|
},
|
|
@@ -2723,7 +2717,7 @@
|
|
|
2723
2717
|
]
|
|
2724
2718
|
},
|
|
2725
2719
|
"allowDowngrades": {
|
|
2726
|
-
"description": "
|
|
2720
|
+
"description": "Whether an older version can be installed when a newer one is already installed.\n\nFor instance, if `1.2.1` is installed and this is set to `false`:\n\n- The MSI installer won't install version `1.2.0` or `1.1.5`.\n- The NSIS installer won't install them over `1.2.1` in silent, passive or update mode.\n The interactive installer only lets the user install them after uninstalling `1.2.1` first.\n\nThe default value of this flag is `true`.",
|
|
2727
2721
|
"type": "boolean",
|
|
2728
2722
|
"default": true
|
|
2729
2723
|
},
|
|
@@ -3387,10 +3381,123 @@
|
|
|
3387
3381
|
"string",
|
|
3388
3382
|
"null"
|
|
3389
3383
|
]
|
|
3384
|
+
},
|
|
3385
|
+
"compression": {
|
|
3386
|
+
"description": "Compression algorithm and level. Defaults to `Gzip` with level 6.",
|
|
3387
|
+
"anyOf": [
|
|
3388
|
+
{
|
|
3389
|
+
"$ref": "#/definitions/DebCompression"
|
|
3390
|
+
},
|
|
3391
|
+
{
|
|
3392
|
+
"type": "null"
|
|
3393
|
+
}
|
|
3394
|
+
]
|
|
3390
3395
|
}
|
|
3391
3396
|
},
|
|
3392
3397
|
"additionalProperties": false
|
|
3393
3398
|
},
|
|
3399
|
+
"DebCompression": {
|
|
3400
|
+
"description": "Compression algorithms used when bundling DEB packages.",
|
|
3401
|
+
"oneOf": [
|
|
3402
|
+
{
|
|
3403
|
+
"description": "Gzip compression",
|
|
3404
|
+
"type": "object",
|
|
3405
|
+
"properties": {
|
|
3406
|
+
"level": {
|
|
3407
|
+
"description": "Gzip compression level (0-9).",
|
|
3408
|
+
"type": "integer",
|
|
3409
|
+
"format": "uint32",
|
|
3410
|
+
"minimum": 0
|
|
3411
|
+
},
|
|
3412
|
+
"type": {
|
|
3413
|
+
"type": "string",
|
|
3414
|
+
"const": "gzip"
|
|
3415
|
+
}
|
|
3416
|
+
},
|
|
3417
|
+
"additionalProperties": false,
|
|
3418
|
+
"required": [
|
|
3419
|
+
"type",
|
|
3420
|
+
"level"
|
|
3421
|
+
]
|
|
3422
|
+
},
|
|
3423
|
+
{
|
|
3424
|
+
"description": "Zstd compression",
|
|
3425
|
+
"type": "object",
|
|
3426
|
+
"properties": {
|
|
3427
|
+
"level": {
|
|
3428
|
+
"description": "Zstd compression level (-131072 - 22).",
|
|
3429
|
+
"type": "integer",
|
|
3430
|
+
"format": "int32"
|
|
3431
|
+
},
|
|
3432
|
+
"type": {
|
|
3433
|
+
"type": "string",
|
|
3434
|
+
"const": "zstd"
|
|
3435
|
+
}
|
|
3436
|
+
},
|
|
3437
|
+
"additionalProperties": false,
|
|
3438
|
+
"required": [
|
|
3439
|
+
"type",
|
|
3440
|
+
"level"
|
|
3441
|
+
]
|
|
3442
|
+
},
|
|
3443
|
+
{
|
|
3444
|
+
"description": "Xz compression",
|
|
3445
|
+
"type": "object",
|
|
3446
|
+
"properties": {
|
|
3447
|
+
"level": {
|
|
3448
|
+
"description": "Xz compression level (0-9).",
|
|
3449
|
+
"type": "integer",
|
|
3450
|
+
"format": "uint32",
|
|
3451
|
+
"minimum": 0
|
|
3452
|
+
},
|
|
3453
|
+
"type": {
|
|
3454
|
+
"type": "string",
|
|
3455
|
+
"const": "xz"
|
|
3456
|
+
}
|
|
3457
|
+
},
|
|
3458
|
+
"additionalProperties": false,
|
|
3459
|
+
"required": [
|
|
3460
|
+
"type",
|
|
3461
|
+
"level"
|
|
3462
|
+
]
|
|
3463
|
+
},
|
|
3464
|
+
{
|
|
3465
|
+
"description": "Bzip2 compression",
|
|
3466
|
+
"type": "object",
|
|
3467
|
+
"properties": {
|
|
3468
|
+
"level": {
|
|
3469
|
+
"description": "Bzip2 compression level (1-9).",
|
|
3470
|
+
"type": "integer",
|
|
3471
|
+
"format": "uint32",
|
|
3472
|
+
"minimum": 0
|
|
3473
|
+
},
|
|
3474
|
+
"type": {
|
|
3475
|
+
"type": "string",
|
|
3476
|
+
"const": "bzip2"
|
|
3477
|
+
}
|
|
3478
|
+
},
|
|
3479
|
+
"additionalProperties": false,
|
|
3480
|
+
"required": [
|
|
3481
|
+
"type",
|
|
3482
|
+
"level"
|
|
3483
|
+
]
|
|
3484
|
+
},
|
|
3485
|
+
{
|
|
3486
|
+
"description": "Disable compression",
|
|
3487
|
+
"type": "object",
|
|
3488
|
+
"properties": {
|
|
3489
|
+
"type": {
|
|
3490
|
+
"type": "string",
|
|
3491
|
+
"const": "none"
|
|
3492
|
+
}
|
|
3493
|
+
},
|
|
3494
|
+
"required": [
|
|
3495
|
+
"type"
|
|
3496
|
+
],
|
|
3497
|
+
"additionalProperties": false
|
|
3498
|
+
}
|
|
3499
|
+
]
|
|
3500
|
+
},
|
|
3394
3501
|
"RpmConfig": {
|
|
3395
3502
|
"description": "Configuration for RPM bundles.",
|
|
3396
3503
|
"type": "object",
|
|
@@ -3522,7 +3629,7 @@
|
|
|
3522
3629
|
"type": "object",
|
|
3523
3630
|
"properties": {
|
|
3524
3631
|
"level": {
|
|
3525
|
-
"description": "Gzip compression level",
|
|
3632
|
+
"description": "Gzip compression level (0-9).",
|
|
3526
3633
|
"type": "integer",
|
|
3527
3634
|
"format": "uint32",
|
|
3528
3635
|
"minimum": 0
|
|
@@ -3543,7 +3650,7 @@
|
|
|
3543
3650
|
"type": "object",
|
|
3544
3651
|
"properties": {
|
|
3545
3652
|
"level": {
|
|
3546
|
-
"description": "Zstd compression level",
|
|
3653
|
+
"description": "Zstd compression level (-131072 - 22).",
|
|
3547
3654
|
"type": "integer",
|
|
3548
3655
|
"format": "int32"
|
|
3549
3656
|
},
|
|
@@ -3563,7 +3670,7 @@
|
|
|
3563
3670
|
"type": "object",
|
|
3564
3671
|
"properties": {
|
|
3565
3672
|
"level": {
|
|
3566
|
-
"description": "Xz compression level",
|
|
3673
|
+
"description": "Xz compression level (0-9).",
|
|
3567
3674
|
"type": "integer",
|
|
3568
3675
|
"format": "uint32",
|
|
3569
3676
|
"minimum": 0
|
|
@@ -3584,7 +3691,7 @@
|
|
|
3584
3691
|
"type": "object",
|
|
3585
3692
|
"properties": {
|
|
3586
3693
|
"level": {
|
|
3587
|
-
"description": "Bzip2 compression level",
|
|
3694
|
+
"description": "Bzip2 compression level (1-9).",
|
|
3588
3695
|
"type": "integer",
|
|
3589
3696
|
"format": "uint32",
|
|
3590
3697
|
"minimum": 0
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tauri-apps/cli",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.5",
|
|
4
4
|
"description": "Command line interface for building Tauri apps",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"funding": {
|
|
@@ -66,16 +66,16 @@
|
|
|
66
66
|
"tauri": "node ./tauri.js"
|
|
67
67
|
},
|
|
68
68
|
"optionalDependencies": {
|
|
69
|
-
"@tauri-apps/cli-linux-x64-gnu": "3.0.0-alpha.
|
|
70
|
-
"@tauri-apps/cli-win32-x64-msvc": "3.0.0-alpha.
|
|
71
|
-
"@tauri-apps/cli-darwin-x64": "3.0.0-alpha.
|
|
72
|
-
"@tauri-apps/cli-darwin-arm64": "3.0.0-alpha.
|
|
73
|
-
"@tauri-apps/cli-linux-arm64-gnu": "3.0.0-alpha.
|
|
74
|
-
"@tauri-apps/cli-linux-arm64-musl": "3.0.0-alpha.
|
|
75
|
-
"@tauri-apps/cli-linux-arm-gnueabihf": "3.0.0-alpha.
|
|
76
|
-
"@tauri-apps/cli-linux-x64-musl": "3.0.0-alpha.
|
|
77
|
-
"@tauri-apps/cli-linux-riscv64-gnu": "3.0.0-alpha.
|
|
78
|
-
"@tauri-apps/cli-win32-ia32-msvc": "3.0.0-alpha.
|
|
79
|
-
"@tauri-apps/cli-win32-arm64-msvc": "3.0.0-alpha.
|
|
69
|
+
"@tauri-apps/cli-linux-x64-gnu": "3.0.0-alpha.5",
|
|
70
|
+
"@tauri-apps/cli-win32-x64-msvc": "3.0.0-alpha.5",
|
|
71
|
+
"@tauri-apps/cli-darwin-x64": "3.0.0-alpha.5",
|
|
72
|
+
"@tauri-apps/cli-darwin-arm64": "3.0.0-alpha.5",
|
|
73
|
+
"@tauri-apps/cli-linux-arm64-gnu": "3.0.0-alpha.5",
|
|
74
|
+
"@tauri-apps/cli-linux-arm64-musl": "3.0.0-alpha.5",
|
|
75
|
+
"@tauri-apps/cli-linux-arm-gnueabihf": "3.0.0-alpha.5",
|
|
76
|
+
"@tauri-apps/cli-linux-x64-musl": "3.0.0-alpha.5",
|
|
77
|
+
"@tauri-apps/cli-linux-riscv64-gnu": "3.0.0-alpha.5",
|
|
78
|
+
"@tauri-apps/cli-win32-ia32-msvc": "3.0.0-alpha.5",
|
|
79
|
+
"@tauri-apps/cli-win32-arm64-msvc": "3.0.0-alpha.5"
|
|
80
80
|
}
|
|
81
81
|
}
|