@tauri-apps/cli 3.0.0-alpha.4 → 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 CHANGED
@@ -1,11 +1,26 @@
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
+
3
18
  ## [3.0.0-alpha.4]
4
19
 
5
20
  ### New Features
6
21
 
7
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):
8
-
23
+
9
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.
10
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.
11
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.
@@ -74,12 +89,35 @@
74
89
  ### Breaking Changes
75
90
 
76
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`:
77
-
92
+
78
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.
79
94
  - The CEF files, code signing entitlements and macOS dev flow are only used when the app uses CEF.
80
95
  - Nothing runtime-specific is done for other runtimes.
81
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())`.
82
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
+
83
121
  ## [2.12.1]
84
122
 
85
123
  ### Enhancements
@@ -100,16 +138,16 @@
100
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.
101
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.
102
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.
103
-
141
+
104
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.
105
-
143
+
106
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.
107
145
 
108
146
  ### Enhancements
109
147
 
110
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
111
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.
112
-
150
+
113
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.
114
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.
115
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`
@@ -179,9 +217,9 @@
179
217
 
180
218
  - Upgraded to `tauri-cli@2.12.0`
181
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.
182
-
220
+
183
221
  **IMPORTANT**: For plugin authors, update your `build.gradle.kts` file to remove the
184
-
222
+
185
223
  ```kotlin
186
224
  buildTypes {
187
225
  release {
@@ -193,7 +231,7 @@
193
231
  }
194
232
  }
195
233
  ```
196
-
234
+
197
235
  section and rename your `proguard-rules.pro` to `consumer-rules.pro` to match the `consumerProguardFiles("consumer-rules.pro")` in the template.
198
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.
199
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`.
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://schema.tauri.app/config/3.0.0-alpha.4",
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```",
@@ -172,7 +172,7 @@
172
172
  "type": "object",
173
173
  "properties": {
174
174
  "windows": {
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\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```",
176
176
  "type": "array",
177
177
  "items": {
178
178
  "$ref": "#/definitions/WindowConfig"
@@ -221,7 +221,7 @@
221
221
  "default": false
222
222
  },
223
223
  "appDirectoriesOverride": {
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\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.",
225
225
  "anyOf": [
226
226
  {
227
227
  "$ref": "#/definitions/AppDirectoriesOverride"
@@ -244,7 +244,7 @@
244
244
  "default": "main"
245
245
  },
246
246
  "create": {
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\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```",
248
248
  "type": "boolean",
249
249
  "default": true
250
250
  },
@@ -2717,7 +2717,7 @@
2717
2717
  ]
2718
2718
  },
2719
2719
  "allowDowngrades": {
2720
- "description": "Validates a second app installation, blocking the user from installing an older version if set to `false`.\n\nFor instance, if `1.2.1` is installed, the user won't be able to install app version `1.2.0` or `1.1.5`.\n\nThe default value of this flag is `true`.",
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`.",
2721
2721
  "type": "boolean",
2722
2722
  "default": true
2723
2723
  },
@@ -3381,10 +3381,123 @@
3381
3381
  "string",
3382
3382
  "null"
3383
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
+ ]
3384
3395
  }
3385
3396
  },
3386
3397
  "additionalProperties": false
3387
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
+ },
3388
3501
  "RpmConfig": {
3389
3502
  "description": "Configuration for RPM bundles.",
3390
3503
  "type": "object",
@@ -3516,7 +3629,7 @@
3516
3629
  "type": "object",
3517
3630
  "properties": {
3518
3631
  "level": {
3519
- "description": "Gzip compression level",
3632
+ "description": "Gzip compression level (0-9).",
3520
3633
  "type": "integer",
3521
3634
  "format": "uint32",
3522
3635
  "minimum": 0
@@ -3537,7 +3650,7 @@
3537
3650
  "type": "object",
3538
3651
  "properties": {
3539
3652
  "level": {
3540
- "description": "Zstd compression level",
3653
+ "description": "Zstd compression level (-131072 - 22).",
3541
3654
  "type": "integer",
3542
3655
  "format": "int32"
3543
3656
  },
@@ -3557,7 +3670,7 @@
3557
3670
  "type": "object",
3558
3671
  "properties": {
3559
3672
  "level": {
3560
- "description": "Xz compression level",
3673
+ "description": "Xz compression level (0-9).",
3561
3674
  "type": "integer",
3562
3675
  "format": "uint32",
3563
3676
  "minimum": 0
@@ -3578,7 +3691,7 @@
3578
3691
  "type": "object",
3579
3692
  "properties": {
3580
3693
  "level": {
3581
- "description": "Bzip2 compression level",
3694
+ "description": "Bzip2 compression level (1-9).",
3582
3695
  "type": "integer",
3583
3696
  "format": "uint32",
3584
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.4",
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.4",
70
- "@tauri-apps/cli-win32-x64-msvc": "3.0.0-alpha.4",
71
- "@tauri-apps/cli-darwin-x64": "3.0.0-alpha.4",
72
- "@tauri-apps/cli-darwin-arm64": "3.0.0-alpha.4",
73
- "@tauri-apps/cli-linux-arm64-gnu": "3.0.0-alpha.4",
74
- "@tauri-apps/cli-linux-arm64-musl": "3.0.0-alpha.4",
75
- "@tauri-apps/cli-linux-arm-gnueabihf": "3.0.0-alpha.4",
76
- "@tauri-apps/cli-linux-x64-musl": "3.0.0-alpha.4",
77
- "@tauri-apps/cli-linux-riscv64-gnu": "3.0.0-alpha.4",
78
- "@tauri-apps/cli-win32-ia32-msvc": "3.0.0-alpha.4",
79
- "@tauri-apps/cli-win32-arm64-msvc": "3.0.0-alpha.4"
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
  }