@tauri-apps/cli 2.0.0-rc.9 → 2.0.0

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,5 +1,129 @@
1
1
  # Changelog
2
2
 
3
+ ## \[2.0.0]
4
+
5
+ ### What's Changed
6
+
7
+ - [`637285790`](https://www.github.com/tauri-apps/tauri/commit/6372857905ae9c0aedb7f482ddf6cf9f9836c9f2) Promote to v2 stable!
8
+
9
+ ### Dependencies
10
+
11
+ - Upgraded to `tauri-cli@2.0.0`
12
+
13
+ ## \[2.0.0-rc.18]
14
+
15
+ ### Enhancements
16
+
17
+ - [`a08e6ffa6`](https://www.github.com/tauri-apps/tauri/commit/a08e6ffa6fe499553be3c4c620726d6031cd6dd3) ([#11185](https://www.github.com/tauri-apps/tauri/pull/11185) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Enhance port forwarding on `android dev` to be more resilient and tolerate delays when booting up devices.
18
+ - [`6cfe7edf6`](https://www.github.com/tauri-apps/tauri/commit/6cfe7edf63636fdf66c429efdeb7bc9a0f404e9f) ([#11186](https://www.github.com/tauri-apps/tauri/pull/11186) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Retain logger verbosity on the `android-studio-script` and `xcode-script` commands.
19
+ - [`60a5aea53`](https://www.github.com/tauri-apps/tauri/commit/60a5aea53db02ae6af325812ab97555f2c013d70) ([#11181](https://www.github.com/tauri-apps/tauri/pull/11181) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Set the `TRUNK_SERVE_ADDRESS` environment variable when running on iOS physical devices to support Trunk.
20
+
21
+ ### Bug Fixes
22
+
23
+ - [`f5d61822b`](https://www.github.com/tauri-apps/tauri/commit/f5d61822bf5988827776dd58bed75c19364e86bd) ([#11184](https://www.github.com/tauri-apps/tauri/pull/11184) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Fix iOS application not including the provided capabilities (entitlements).
24
+
25
+ ### Dependencies
26
+
27
+ - Upgraded to `tauri-cli@2.0.0-rc.18`
28
+
29
+ ## \[2.0.0-rc.17]
30
+
31
+ ### New Features
32
+
33
+ - [`a944b9b05`](https://www.github.com/tauri-apps/tauri/commit/a944b9b05bc5ae6125ff451e86c5b207c511f3d7) ([#11118](https://www.github.com/tauri-apps/tauri/pull/11118) by [@amrbashir](https://www.github.com/tauri-apps/tauri/../../amrbashir)) Add `--github-workflows` flag for `tauri plugin new/init`.
34
+ - [`f57a729cd`](https://www.github.com/tauri-apps/tauri/commit/f57a729cd8f7e10d8daf0b9d5b85f9c7ad530496) ([#11039](https://www.github.com/tauri-apps/tauri/pull/11039) by [@amrbashir](https://www.github.com/tauri-apps/tauri/../../amrbashir)) Add `tauri inspect wix-upgrade-code` to print default Upgrade Code for your MSI installer derived from `productName`.
35
+
36
+ ### Bug Fixes
37
+
38
+ - [`62b52f60a`](https://www.github.com/tauri-apps/tauri/commit/62b52f60a22ef84c4a2a2d9e662038b49f58e16c) ([#11064](https://www.github.com/tauri-apps/tauri/pull/11064) by [@amrbashir](https://www.github.com/tauri-apps/tauri/../../amrbashir)) Fix `tauri add` failing to add NPM depenency with `npm` package manager.
39
+ - [`56e087471`](https://www.github.com/tauri-apps/tauri/commit/56e087471a347f6bee7422221a956925c60b17e3) ([#11100](https://www.github.com/tauri-apps/tauri/pull/11100) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Fix iOS xcode-script usage with `bun`.
40
+ - [`b88e22a5f`](https://www.github.com/tauri-apps/tauri/commit/b88e22a5fe4e2e4376d6cad64d1e74d104ca8927) ([#11063](https://www.github.com/tauri-apps/tauri/pull/11063) by [@FabianLars](https://www.github.com/tauri-apps/tauri/../../FabianLars)) The cli now only sets the iOS deployment target environment variable when building for iOS.
41
+ - [`8d22c0c81`](https://www.github.com/tauri-apps/tauri/commit/8d22c0c814e7227d5e56ce9a08929045ccea1a1b) ([#11101](https://www.github.com/tauri-apps/tauri/pull/11101) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Only modify the iOS Xcode project "sign style" if we need to enforce manual signing.
42
+ - [`df24cb944`](https://www.github.com/tauri-apps/tauri/commit/df24cb944249ee398f6c8ba8c19757b398eec701) ([#11168](https://www.github.com/tauri-apps/tauri/pull/11168) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Fixes Xcode pbxproj file parsing not expecting `_` in build configuration IDs.
43
+
44
+ ### Dependencies
45
+
46
+ - Upgraded to `tauri-cli@2.0.0-rc.17`
47
+
48
+ ### Breaking Changes
49
+
50
+ - [`a944b9b05`](https://www.github.com/tauri-apps/tauri/commit/a944b9b05bc5ae6125ff451e86c5b207c511f3d7) ([#11118](https://www.github.com/tauri-apps/tauri/pull/11118) by [@amrbashir](https://www.github.com/tauri-apps/tauri/../../amrbashir)) `tauri plugin init/new` will no longer generate a `.github` directory with workflows by default, instead use the new `--github-workflows` flag.
51
+
52
+ ## \[2.0.0-rc.16]
53
+
54
+ ### New Features
55
+
56
+ - [`9bb8fc618`](https://www.github.com/tauri-apps/tauri/commit/9bb8fc6189a93bcb811588b36e710d0f7818a1f9) ([#11030](https://www.github.com/tauri-apps/tauri/pull/11030) by [@amrbashir](https://www.github.com/tauri-apps/tauri/../../amrbashir)) Add `--no-example` flag for `tauri plugin new` and `tauri plugin init` to disable creation of an example project.
57
+
58
+ ### Dependencies
59
+
60
+ - Upgraded to `tauri-cli@2.0.0-rc.16`
61
+
62
+ ## \[2.0.0-rc.15]
63
+
64
+ ### Enhancements
65
+
66
+ - [`5a0e922d4`](https://www.github.com/tauri-apps/tauri/commit/5a0e922d40dc3b7d9a8e3a65ccaf76d09f026cb8) ([#11007](https://www.github.com/tauri-apps/tauri/pull/11007) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Automatically discover the `src-tauri/src/main.rs` binary when it is not explicitly defined in the Cargo manifest bin array.
67
+
68
+ ### Bug Fixes
69
+
70
+ - [`94e9d476e`](https://www.github.com/tauri-apps/tauri/commit/94e9d476ef506b1b8c09f55b81620c7839f98086) ([#11011](https://www.github.com/tauri-apps/tauri/pull/11011) by [@amrbashir](https://www.github.com/tauri-apps/tauri/../../amrbashir)) Fix `main_binary_name` in custom wix and nsis templates including `.exe`
71
+
72
+ ### Dependencies
73
+
74
+ - Upgraded to `tauri-cli@2.0.0-rc.15`
75
+
76
+ ## \[2.0.0-rc.14]
77
+
78
+ ### Enhancements
79
+
80
+ - [`6c5340f8b`](https://www.github.com/tauri-apps/tauri/commit/6c5340f8b2549dfe89f19656304e65cd670afc92) ([#11004](https://www.github.com/tauri-apps/tauri/pull/11004) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Added the `log` plugin to the app template, which is required to visualize logs on Android and iOS.
81
+ - [`3ad2427dc`](https://www.github.com/tauri-apps/tauri/commit/3ad2427dc08f12c61edc726b587acce32eca1080) ([#10961](https://www.github.com/tauri-apps/tauri/pull/10961) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Only render app logs on iOS unless `-vv` is provided to the `ios dev` command.
82
+
83
+ ### Dependencies
84
+
85
+ - Upgraded to `tauri-cli@2.0.0-rc.13`
86
+
87
+ ## \[2.0.0-rc.13]
88
+
89
+ ### Bug Fixes
90
+
91
+ - [`a5848af65`](https://www.github.com/tauri-apps/tauri/commit/a5848af65b10d89686314cf737b7fd9d91f99dd8) ([#10944](https://www.github.com/tauri-apps/tauri/pull/10944) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Synchronize app version (`tauri.conf.json > version` or `Cargo.toml > package > version`) with the `CFBundleVersion` and `CFBundleShortVersionString` Info.plist values.
92
+
93
+ ### Dependencies
94
+
95
+ - Upgraded to `tauri-cli@2.0.0-rc.12`
96
+
97
+ ## \[2.0.0-rc.12]
98
+
99
+ ### Dependencies
100
+
101
+ - Upgraded to `tauri-cli@2.0.0-rc.11`
102
+
103
+ ## \[2.0.0-rc.11]
104
+
105
+ ### Enhancements
106
+
107
+ - [`9c9644d15`](https://www.github.com/tauri-apps/tauri/commit/9c9644d155818d9efcad65b60aa985a59e767922) ([#10845](https://www.github.com/tauri-apps/tauri/pull/10845) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Enhance iOS library validation, checking libs built with link time optimization.
108
+
109
+ ### Bug Fixes
110
+
111
+ - [`b42683592`](https://www.github.com/tauri-apps/tauri/commit/b42683592d446f25c2005b59e9e3ec551175906d) ([#10847](https://www.github.com/tauri-apps/tauri/pull/10847) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Fixes `ios build --target [aarch64-sim | x86_64]` failing to generate the app bundle for the iOS simulator.
112
+
113
+ ### Dependencies
114
+
115
+ - Upgraded to `tauri-cli@2.0.0-rc.10`
116
+
117
+ ## \[2.0.0-rc.10]
118
+
119
+ ### Bug Fixes
120
+
121
+ - [`6faa03276`](https://www.github.com/tauri-apps/tauri/commit/6faa032766b23cd161503905d4c79365ff6c50d1) ([#10854](https://www.github.com/tauri-apps/tauri/pull/10854) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Fixes iOS code signing failing on CI due to a missing development certificate.
122
+
123
+ ### Dependencies
124
+
125
+ - Upgraded to `tauri-cli@2.0.0-rc.9`
126
+
3
127
  ## \[2.0.0-rc.9]
4
128
 
5
129
  ### Bug Fixes
@@ -0,0 +1,6 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <body>
4
+ <div></div>
5
+ </body>
6
+ </html>
@@ -0,0 +1,5 @@
1
+ {
2
+ "scripts": {
3
+ "build": ""
4
+ }
5
+ }
@@ -0,0 +1,65 @@
1
+ // Copyright 2019-2024 Tauri Programme within The Commons Conservancy
2
+ // SPDX-License-Identifier: Apache-2.0
3
+ // SPDX-License-Identifier: MIT
4
+
5
+ import { resolve } from 'node:path'
6
+ import {
7
+ existsSync,
8
+ readFileSync,
9
+ writeFileSync,
10
+ rmSync,
11
+ renameSync
12
+ } from 'node:fs'
13
+ import cli from '../main.js'
14
+ import { describe, it } from 'vitest'
15
+
16
+ describe('[CLI] @tauri-apps/cli template', () => {
17
+ it('init a project and builds it', { timeout: 15 * 60 * 1000 }, async () => {
18
+ const cwd = process.cwd()
19
+ const fixturePath = resolve(__dirname, './fixtures/empty')
20
+ const tauriFixturePath = resolve(fixturePath, 'src-tauri')
21
+ const outPath = resolve(tauriFixturePath, 'target')
22
+ const cacheOutPath = resolve(fixturePath, 'target')
23
+
24
+ process.chdir(fixturePath)
25
+
26
+ const outExists = existsSync(outPath)
27
+ if (outExists) {
28
+ if (existsSync(cacheOutPath)) {
29
+ rmSync(cacheOutPath, { recursive: true, force: true })
30
+ }
31
+ renameSync(outPath, cacheOutPath)
32
+ }
33
+
34
+ await cli.run([
35
+ 'init',
36
+ '--directory',
37
+ process.cwd(),
38
+ '--force',
39
+ '--tauri-path',
40
+ resolve(__dirname, '../../..'),
41
+ '--before-build-command',
42
+ '',
43
+ '--before-dev-command',
44
+ '',
45
+ '--ci'
46
+ ])
47
+
48
+ if (outExists) {
49
+ renameSync(cacheOutPath, outPath)
50
+ }
51
+
52
+ process.chdir(tauriFixturePath)
53
+
54
+ const manifestPath = resolve(tauriFixturePath, 'Cargo.toml')
55
+ const manifestFile = readFileSync(manifestPath).toString()
56
+ writeFileSync(manifestPath, `workspace = { }\n${manifestFile}`)
57
+
58
+ const configPath = resolve(tauriFixturePath, 'tauri.conf.json')
59
+ const config = readFileSync(configPath).toString()
60
+ writeFileSync(configPath, config.replace('com.tauri.dev', 'com.tauri.test'))
61
+
62
+ await cli.run(['build', '--verbose'])
63
+ process.chdir(cwd)
64
+ })
65
+ })
@@ -0,0 +1,15 @@
1
+ // Copyright 2019-2024 Tauri Programme within The Commons Conservancy
2
+ // SPDX-License-Identifier: Apache-2.0
3
+ // SPDX-License-Identifier: MIT
4
+
5
+ const HEADERS = `// Copyright 2019-2024 Tauri Programme within The Commons Conservancy
6
+ // SPDX-License-Identifier: Apache-2.0
7
+ // SPDX-License-Identifier: MIT`
8
+
9
+ const fs = require('fs')
10
+
11
+ for (const file of ['index.js', 'index.d.ts']) {
12
+ const content = fs.readFileSync(file, 'utf8')
13
+ const newContent = `${HEADERS}\n\n${content}`
14
+ fs.writeFileSync(file, newContent, 'utf8')
15
+ }
@@ -1,8 +1,12 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://schema.tauri.app/config/2.0.0",
3
4
  "title": "Config",
4
- "description": "The Tauri configuration object.\n It is read from a file where you can define your frontend assets,\n configure the bundler and define a tray icon.\n\n The configuration file is generated by the\n [`tauri init`](https://tauri.app/v1/api/cli#init) command that lives in\n your Tauri application source directory (src-tauri).\n\n Once generated, you may modify it at will to customize your Tauri application.\n\n ## File Formats\n\n By default, the configuration is defined as a JSON file named `tauri.conf.json`.\n\n Tauri also supports JSON5 and TOML files via the `config-json5` and `config-toml` Cargo features, respectively.\n The JSON5 file name must be either `tauri.conf.json` or `tauri.conf.json5`.\n The TOML file name is `Tauri.toml`.\n\n ## Platform-Specific Configuration\n\n In addition to the default configuration file, Tauri can\n read 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),\n which gets merged with the main configuration object.\n\n ## Configuration Structure\n\n The 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\n Example 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\": \"../dist\",\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 ```",
5
+ "description": "The Tauri configuration object.\n It is read from a file where you can define your frontend assets,\n configure the bundler and define a tray icon.\n\n The configuration file is generated by the\n [`tauri init`](https://v2.tauri.app/reference/cli/#init) command that lives in\n your Tauri application source directory (src-tauri).\n\n Once generated, you may modify it at will to customize your Tauri application.\n\n ## File Formats\n\n By default, the configuration is defined as a JSON file named `tauri.conf.json`.\n\n Tauri also supports JSON5 and TOML files via the `config-json5` and `config-toml` Cargo features, respectively.\n The JSON5 file name must be either `tauri.conf.json` or `tauri.conf.json5`.\n The TOML file name is `Tauri.toml`.\n\n ## Platform-Specific Configuration\n\n In addition to the default configuration file, Tauri can\n read 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),\n which gets merged with the main configuration object.\n\n ## Configuration Structure\n\n The 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\n Example 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\": \"../dist\",\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 ```",
5
6
  "type": "object",
7
+ "required": [
8
+ "identifier"
9
+ ],
6
10
  "properties": {
7
11
  "$schema": {
8
12
  "description": "The JSON schema for the Tauri config.",
@@ -19,6 +23,13 @@
19
23
  ],
20
24
  "pattern": "^[^/\\:*?\"<>|]+$"
21
25
  },
26
+ "mainBinaryName": {
27
+ "description": "App main binary filename. Defaults to the name of your cargo crate.",
28
+ "type": [
29
+ "string",
30
+ "null"
31
+ ]
32
+ },
22
33
  "version": {
23
34
  "description": "App version. It is a semver version number or a path to a `package.json` file containing the `version` field. If removed the version number from `Cargo.toml` is used.\n\n By default version 1.0 is used on Android.",
24
35
  "type": [
@@ -27,8 +38,7 @@
27
38
  ]
28
39
  },
29
40
  "identifier": {
30
- "description": "The application identifier in reverse domain name notation (e.g. `com.tauri.example`).\n This string must be unique across applications since it is used in system configurations like\n the bundle ID and path to the webview data directory.\n This string must contain only alphanumeric characters (AZ, az, and 09), hyphens (-),\n and periods (.).",
31
- "default": "",
41
+ "description": "The application identifier in reverse domain name notation (e.g. `com.tauri.example`).\n This string must be unique across applications since it is used in system configurations like\n the bundle ID and path to the webview data directory.\n This string must contain only alphanumeric characters (A-Z, a-z, and 0-9), hyphens (-),\n and periods (.).",
32
42
  "type": "string"
33
43
  },
34
44
  "app": {
@@ -147,11 +157,11 @@
147
157
  "additionalProperties": false,
148
158
  "definitions": {
149
159
  "AppConfig": {
150
- "description": "The App configuration object.\n\n See more: <https://tauri.app/v1/api/config#appconfig>",
160
+ "description": "The App configuration object.\n\n See more: <https://v2.tauri.app/reference/config/#appconfig>",
151
161
  "type": "object",
152
162
  "properties": {
153
163
  "windows": {
154
- "description": "The windows configuration.",
164
+ "description": "The app windows configuration.",
155
165
  "default": [],
156
166
  "type": "array",
157
167
  "items": {
@@ -208,7 +218,7 @@
208
218
  "additionalProperties": false
209
219
  },
210
220
  "WindowConfig": {
211
- "description": "The window configuration object.\n\n See more: <https://tauri.app/v1/api/config#windowconfig>",
221
+ "description": "The window configuration object.\n\n See more: <https://v2.tauri.app/reference/config/#windowconfig>",
212
222
  "type": "object",
213
223
  "properties": {
214
224
  "label": {
@@ -216,6 +226,11 @@
216
226
  "default": "main",
217
227
  "type": "string"
218
228
  },
229
+ "create": {
230
+ "description": "Whether Tauri should create this window at app startup or not.\n\n When this is set to `false` you must manually grab the config object via `app.config().app.windows`\n and create it with [`WebviewWindowBuilder::from_config`](https://docs.rs/tauri/2.0.0-rc/tauri/webview/struct.WebviewWindowBuilder.html#method.from_config).",
231
+ "default": true,
232
+ "type": "boolean"
233
+ },
219
234
  "url": {
220
235
  "description": "The window webview URL.",
221
236
  "default": "index.html",
@@ -466,6 +481,11 @@
466
481
  "description": "Whether page zooming by hotkeys is enabled\n\n ## Platform-specific:\n\n - **Windows**: Controls WebView2's [`IsZoomControlEnabled`](https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2settings?view=webview2-winrt-1.0.2420.47#iszoomcontrolenabled) setting.\n - **MacOS / Linux**: Injects a polyfill that zooms in and out with `ctrl/command` + `-/=`,\n 20% in each step, ranging from 20% to 1000%. Requires `webview:allow-set-webview-zoom` permission\n\n - **Android / iOS**: Unsupported.",
467
482
  "default": false,
468
483
  "type": "boolean"
484
+ },
485
+ "browserExtensionsEnabled": {
486
+ "description": "Whether browser extensions can be installed for the webview process\n\n ## Platform-specific:\n\n - **Windows**: Enables the WebView2 environment's [`AreBrowserExtensionsEnabled`](https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2environmentoptions?view=webview2-winrt-1.0.2739.15#arebrowserextensionsenabled)\n - **MacOS / Linux / iOS / Android** - Unsupported.",
487
+ "default": false,
488
+ "type": "boolean"
469
489
  }
470
490
  },
471
491
  "additionalProperties": false
@@ -835,7 +855,7 @@
835
855
  "minItems": 4
836
856
  },
837
857
  "SecurityConfig": {
838
- "description": "Security configuration.\n\n See more: <https://tauri.app/v1/api/config#securityconfig>",
858
+ "description": "Security configuration.\n\n See more: <https://v2.tauri.app/reference/config/#securityconfig>",
839
859
  "type": "object",
840
860
  "properties": {
841
861
  "csp": {
@@ -957,7 +977,7 @@
957
977
  ]
958
978
  },
959
979
  "AssetProtocolConfig": {
960
- "description": "Config for the asset custom protocol.\n\n See more: <https://tauri.app/v1/api/config#assetprotocolconfig>",
980
+ "description": "Config for the asset custom protocol.\n\n See more: <https://v2.tauri.app/reference/config/#assetprotocolconfig>",
961
981
  "type": "object",
962
982
  "properties": {
963
983
  "scope": {
@@ -1314,7 +1334,7 @@
1314
1334
  ]
1315
1335
  },
1316
1336
  "TrayIconConfig": {
1317
- "description": "Configuration for application tray icon.\n\n See more: <https://tauri.app/v1/api/config#trayiconconfig>",
1337
+ "description": "Configuration for application tray icon.\n\n See more: <https://v2.tauri.app/reference/config/#trayiconconfig>",
1318
1338
  "type": "object",
1319
1339
  "required": [
1320
1340
  "iconPath"
@@ -1359,7 +1379,7 @@
1359
1379
  "additionalProperties": false
1360
1380
  },
1361
1381
  "BuildConfig": {
1362
- "description": "The Build configuration object.\n\n See more: <https://tauri.app/v1/api/config#buildconfig>",
1382
+ "description": "The Build configuration object.\n\n See more: <https://v2.tauri.app/reference/config/#buildconfig>",
1363
1383
  "type": "object",
1364
1384
  "properties": {
1365
1385
  "runner": {
@@ -1519,7 +1539,7 @@
1519
1539
  ]
1520
1540
  },
1521
1541
  "BundleConfig": {
1522
- "description": "Configuration for tauri-bundler.\n\n See more: <https://tauri.app/v1/api/config#bundleconfig>",
1542
+ "description": "Configuration for tauri-bundler.\n\n See more: <https://v2.tauri.app/reference/config/#bundleconfig>",
1523
1543
  "type": "object",
1524
1544
  "properties": {
1525
1545
  "active": {
@@ -1746,9 +1766,7 @@
1746
1766
  "anyOf": [
1747
1767
  {
1748
1768
  "description": "Bundle all targets.",
1749
- "enum": [
1750
- "all"
1751
- ]
1769
+ "const": "all"
1752
1770
  },
1753
1771
  {
1754
1772
  "description": "A list of bundle targets.",
@@ -1961,7 +1979,7 @@
1961
1979
  ]
1962
1980
  },
1963
1981
  "WindowsConfig": {
1964
- "description": "Windows bundler configuration.\n\n See more: <https://tauri.app/v1/api/config#windowsconfig>",
1982
+ "description": "Windows bundler configuration.\n\n See more: <https://v2.tauri.app/reference/config/#windowsconfig>",
1965
1983
  "type": "object",
1966
1984
  "properties": {
1967
1985
  "digestAlgorithm": {
@@ -2044,7 +2062,7 @@
2044
2062
  "additionalProperties": false
2045
2063
  },
2046
2064
  "WebviewInstallMode": {
2047
- "description": "Install modes for the Webview2 runtime.\n Note that for the updater bundle [`Self::DownloadBootstrapper`] is used.\n\n For more information see <https://tauri.app/v1/guides/building/windows>.",
2065
+ "description": "Install modes for the Webview2 runtime.\n Note that for the updater bundle [`Self::DownloadBootstrapper`] is used.\n\n For more information see <https://v2.tauri.app/distribute/windows-installer/#webview2-installation-options>.",
2048
2066
  "oneOf": [
2049
2067
  {
2050
2068
  "description": "Do not install the Webview2 as part of the Windows Installer.",
@@ -2149,9 +2167,17 @@
2149
2167
  ]
2150
2168
  },
2151
2169
  "WixConfig": {
2152
- "description": "Configuration for the MSI bundle using WiX.\n\n See more: <https://tauri.app/v1/api/config#wixconfig>",
2170
+ "description": "Configuration for the MSI bundle using WiX.\n\n See more: <https://v2.tauri.app/reference/config/#wixconfig>",
2153
2171
  "type": "object",
2154
2172
  "properties": {
2173
+ "upgradeCode": {
2174
+ "description": "A GUID upgrade code for MSI installer. This code **_must stay the same across all of your updates_**,\n otherwise, Windows will treat your update as a different app and your users will have duplicate versions of your app.\n\n By default, tauri generates this code by generating a Uuid v5 using the string `<productName>.exe.app.x64` in the DNS namespace.\n You can use Tauri's CLI to generate and print this code for you, run `tauri inspect wix-upgrade-code`.\n\n It is recommended that you set this value in your tauri config file to avoid accidental changes in your upgrade code\n whenever you want to change your product name.",
2175
+ "type": [
2176
+ "string",
2177
+ "null"
2178
+ ],
2179
+ "format": "uuid"
2180
+ },
2155
2181
  "language": {
2156
2182
  "description": "The installer languages to build. See <https://docs.microsoft.com/en-us/windows/win32/msi/localizing-the-error-and-actiontext-tables>.",
2157
2183
  "default": "en-US",
@@ -2262,7 +2288,7 @@
2262
2288
  ]
2263
2289
  },
2264
2290
  "WixLanguageConfig": {
2265
- "description": "Configuration for a target language for the WiX build.\n\n See more: <https://tauri.app/v1/api/config#wixlanguageconfig>",
2291
+ "description": "Configuration for a target language for the WiX build.\n\n See more: <https://v2.tauri.app/reference/config/#wixlanguageconfig>",
2266
2292
  "type": "object",
2267
2293
  "properties": {
2268
2294
  "localePath": {
@@ -2327,7 +2353,7 @@
2327
2353
  }
2328
2354
  },
2329
2355
  "customLanguageFiles": {
2330
- "description": "A key-value pair where the key is the language and the\n value is the path to a custom `.nsh` file that holds the translated text for tauri's custom messages.\n\n See <https://github.com/tauri-apps/tauri/blob/dev/crates/tauri-bundler/src/bundle/windows/templates/nsis-languages/English.nsh> for an example `.nsh` file.\n\n **Note**: the key must be a valid NSIS language and it must be added to [`NsisConfig`] languages array,",
2356
+ "description": "A key-value pair where the key is the language and the\n value is the path to a custom `.nsh` file that holds the translated text for tauri's custom messages.\n\n See <https://github.com/tauri-apps/tauri/blob/dev/crates/tauri-bundler/src/bundle/windows/nsis/languages/English.nsh> for an example `.nsh` file.\n\n **Note**: the key must be a valid NSIS language and it must be added to [`NsisConfig`] languages array,",
2331
2357
  "type": [
2332
2358
  "object",
2333
2359
  "null"
@@ -2465,7 +2491,7 @@
2465
2491
  ]
2466
2492
  },
2467
2493
  "LinuxConfig": {
2468
- "description": "Configuration for Linux bundles.\n\n See more: <https://tauri.app/v1/api/config#linuxconfig>",
2494
+ "description": "Configuration for Linux bundles.\n\n See more: <https://v2.tauri.app/reference/config/#linuxconfig>",
2469
2495
  "type": "object",
2470
2496
  "properties": {
2471
2497
  "appimage": {
@@ -2508,7 +2534,7 @@
2508
2534
  "additionalProperties": false
2509
2535
  },
2510
2536
  "AppImageConfig": {
2511
- "description": "Configuration for AppImage bundles.\n\n See more: <https://tauri.app/v1/api/config#appimageconfig>",
2537
+ "description": "Configuration for AppImage bundles.\n\n See more: <https://v2.tauri.app/reference/config/#appimageconfig>",
2512
2538
  "type": "object",
2513
2539
  "properties": {
2514
2540
  "bundleMediaFramework": {
@@ -2528,7 +2554,7 @@
2528
2554
  "additionalProperties": false
2529
2555
  },
2530
2556
  "DebConfig": {
2531
- "description": "Configuration for Debian (.deb) bundles.\n\n See more: <https://tauri.app/v1/api/config#debconfig>",
2557
+ "description": "Configuration for Debian (.deb) bundles.\n\n See more: <https://v2.tauri.app/reference/config/#debconfig>",
2532
2558
  "type": "object",
2533
2559
  "properties": {
2534
2560
  "depends": {
@@ -2673,7 +2699,7 @@
2673
2699
  }
2674
2700
  },
2675
2701
  "obsoletes": {
2676
- "description": "The list of RPM dependencies your application supersedes - if this package is installed,\n packages listed as obsoletes will be automatically removed (if they are present).",
2702
+ "description": "The list of RPM dependencies your application supersedes - if this package is installed,\n packages listed as \"obsoletes\" will be automatically removed (if they are present).",
2677
2703
  "type": [
2678
2704
  "array",
2679
2705
  "null"
@@ -2741,7 +2767,7 @@
2741
2767
  "additionalProperties": false
2742
2768
  },
2743
2769
  "MacConfig": {
2744
- "description": "Configuration for the macOS bundles.\n\n See more: <https://tauri.app/v1/api/config#macconfig>",
2770
+ "description": "Configuration for the macOS bundles.\n\n See more: <https://v2.tauri.app/reference/config/#macconfig>",
2745
2771
  "type": "object",
2746
2772
  "properties": {
2747
2773
  "frameworks": {
@@ -2829,7 +2855,7 @@
2829
2855
  "additionalProperties": false
2830
2856
  },
2831
2857
  "DmgConfig": {
2832
- "description": "Configuration for Apple Disk Image (.dmg) bundles.\n\n See more: <https://tauri.app/v1/api/config#dmgconfig>",
2858
+ "description": "Configuration for Apple Disk Image (.dmg) bundles.\n\n See more: <https://v2.tauri.app/reference/config/#dmgconfig>",
2833
2859
  "type": "object",
2834
2860
  "properties": {
2835
2861
  "background": {
@@ -2996,7 +3022,7 @@
2996
3022
  "additionalProperties": false
2997
3023
  },
2998
3024
  "PluginConfig": {
2999
- "description": "The plugin configs holds a HashMap mapping a plugin name to its configuration object.\n\n See more: <https://tauri.app/v1/api/config#pluginconfig>",
3025
+ "description": "The plugin configs holds a HashMap mapping a plugin name to its configuration object.\n\n See more: <https://v2.tauri.app/reference/config/#pluginconfig>",
3000
3026
  "type": "object",
3001
3027
  "additionalProperties": true
3002
3028
  }
package/main.d.ts CHANGED
@@ -7,5 +7,5 @@
7
7
 
8
8
  export function run(
9
9
  args: Array<string>,
10
- binName: string | undefined | null
10
+ binName?: string | undefined | null
11
11
  ): Promise<void>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tauri-apps/cli",
3
- "version": "2.0.0-rc.9",
3
+ "version": "2.0.0",
4
4
  "description": "Command line interface for building Tauri apps",
5
5
  "funding": {
6
6
  "type": "opencollective",
@@ -39,12 +39,9 @@
39
39
  },
40
40
  "devDependencies": {
41
41
  "@napi-rs/cli": "2.18.3",
42
+ "@types/node": "20.16.1",
42
43
  "cross-env": "7.0.3",
43
- "cross-spawn": "7.0.3",
44
- "fs-extra": "11.2.0",
45
- "jest": "29.7.0",
46
- "jest-transform-toml": "1.0.0",
47
- "prettier": "3.3.2"
44
+ "vitest": "^2.1.1"
48
45
  },
49
46
  "engines": {
50
47
  "node": ">= 10"
@@ -54,24 +51,26 @@
54
51
  },
55
52
  "scripts": {
56
53
  "artifacts": "napi artifacts",
57
- "build:release": "cross-env TARGET=node napi build --platform --profile release-size-optimized",
58
- "build": "cross-env TARGET=node napi build --platform",
54
+ "build": "cross-env TARGET=node napi build --platform --profile release-size-optimized",
55
+ "postbuild": "node append-headers.js",
56
+ "build:debug": "cross-env TARGET=node napi build --platform",
57
+ "postbuild:debug": "node append-headers.js",
59
58
  "prepublishOnly": "napi prepublish -t npm --gh-release-id $RELEASE_ID",
60
59
  "prepack": "cp ../../crates/tauri-schema-generator/schemas/config.schema.json .",
61
- "test": "jest --runInBand --forceExit --no-cache",
62
60
  "version": "napi version",
61
+ "test": "vitest run",
63
62
  "tauri": "node ./tauri.js"
64
63
  },
65
64
  "optionalDependencies": {
66
- "@tauri-apps/cli-win32-x64-msvc": "2.0.0-rc.9",
67
- "@tauri-apps/cli-darwin-x64": "2.0.0-rc.9",
68
- "@tauri-apps/cli-linux-x64-gnu": "2.0.0-rc.9",
69
- "@tauri-apps/cli-darwin-arm64": "2.0.0-rc.9",
70
- "@tauri-apps/cli-linux-arm64-gnu": "2.0.0-rc.9",
71
- "@tauri-apps/cli-linux-arm64-musl": "2.0.0-rc.9",
72
- "@tauri-apps/cli-linux-arm-gnueabihf": "2.0.0-rc.9",
73
- "@tauri-apps/cli-linux-x64-musl": "2.0.0-rc.9",
74
- "@tauri-apps/cli-win32-ia32-msvc": "2.0.0-rc.9",
75
- "@tauri-apps/cli-win32-arm64-msvc": "2.0.0-rc.9"
65
+ "@tauri-apps/cli-win32-x64-msvc": "2.0.0",
66
+ "@tauri-apps/cli-darwin-x64": "2.0.0",
67
+ "@tauri-apps/cli-linux-x64-gnu": "2.0.0",
68
+ "@tauri-apps/cli-darwin-arm64": "2.0.0",
69
+ "@tauri-apps/cli-linux-arm64-gnu": "2.0.0",
70
+ "@tauri-apps/cli-linux-arm64-musl": "2.0.0",
71
+ "@tauri-apps/cli-linux-arm-gnueabihf": "2.0.0",
72
+ "@tauri-apps/cli-linux-x64-musl": "2.0.0",
73
+ "@tauri-apps/cli-win32-ia32-msvc": "2.0.0",
74
+ "@tauri-apps/cli-win32-arm64-msvc": "2.0.0"
76
75
  }
77
76
  }
package/src/lib.rs CHANGED
@@ -18,7 +18,7 @@ pub fn run(args: Vec<String>, bin_name: Option<String>, callback: JsFunction) ->
18
18
  // can do work while `tauri dev` is running.
19
19
  std::thread::spawn(move || {
20
20
  let res = match std::panic::catch_unwind(std::panic::AssertUnwindSafe(|| {
21
- tauri_cli::try_run(args, bin_name)
21
+ tauri_cli::try_run(args, bin_name).inspect_err(|e| eprintln!("{e:#}"))
22
22
  })) {
23
23
  Ok(t) => t,
24
24
  Err(_) => {
package/jest.config.js DELETED
@@ -1,18 +0,0 @@
1
- // Copyright 2019-2024 Tauri Programme within The Commons Conservancy
2
- // SPDX-License-Identifier: Apache-2.0
3
- // SPDX-License-Identifier: MIT
4
-
5
- module.exports = {
6
- setupFilesAfterEnv: ['<rootDir>/test/jest/jest.setup.js'],
7
- testMatch: [
8
- '<rootDir>/test/jest/__tests__/**/*.spec.js',
9
- '<rootDir>/test/jest/__tests__/**/*.test.js'
10
- ],
11
- moduleFileExtensions: ['ts', 'js', 'json'],
12
- moduleNameMapper: {
13
- '^~/(.*)$': '<rootDir>/$1'
14
- },
15
- transform: {
16
- '\\.toml$': 'jest-transform-toml'
17
- }
18
- }