@tauri-apps/cli 2.0.0-rc.3 → 2.0.0-rc.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,5 +1,63 @@
1
1
  # Changelog
2
2
 
3
+ ## \[2.0.0-rc.5]
4
+
5
+ ### New Features
6
+
7
+ - [`8d148a9e2`](https://www.github.com/tauri-apps/tauri/commit/8d148a9e2566edebfea2d75f32df7c9396d765a4) ([#10634](https://www.github.com/tauri-apps/tauri/pull/10634) by [@anatawa12](https://www.github.com/tauri-apps/tauri/../../anatawa12)) Custom sign command with object notation for whitespaces in the command path and arguments.
8
+
9
+ ### Bug Fixes
10
+
11
+ - [`8ae52a615`](https://www.github.com/tauri-apps/tauri/commit/8ae52a615a11d934930001da63ce6ac8442c7efc) ([#10676](https://www.github.com/tauri-apps/tauri/pull/10676) by [@rdlabo](https://www.github.com/tauri-apps/tauri/../../rdlabo)) Change plugin template call to `register_ios_plugin` params to snake case
12
+ - [`7796a8fc6`](https://www.github.com/tauri-apps/tauri/commit/7796a8fc649cd7397a67048c71f8d1fbf822122a) ([#10687](https://www.github.com/tauri-apps/tauri/pull/10687) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Fix Swift plugin compilation on older versions.
13
+ - [`9b99ebab1`](https://www.github.com/tauri-apps/tauri/commit/9b99ebab17d6a043d82a7aeecfb76c56a995c287) ([#10431](https://www.github.com/tauri-apps/tauri/pull/10431) by [@mrguiman](https://www.github.com/tauri-apps/tauri/../../mrguiman)) Do not include the target arch when building and archiving the iOS application,
14
+ which makes Xcode project modifications more flexible.
15
+
16
+ ### Dependencies
17
+
18
+ - Upgraded to `tauri-cli@2.0.0-rc.5`
19
+
20
+ ## \[2.0.0-rc.4]
21
+
22
+ ### New Features
23
+
24
+ - [`78e22bedc`](https://www.github.com/tauri-apps/tauri/commit/78e22bedcab5096f1a4e667321fc8b2817b79214) ([#10602](https://www.github.com/tauri-apps/tauri/pull/10602) by [@amrbashir](https://www.github.com/tauri-apps/tauri/../../amrbashir)) Add necessary options to `AndroidManifest.xml` in android template to support AndroidTV.
25
+ - [`3bec7b159`](https://www.github.com/tauri-apps/tauri/commit/3bec7b1595e28630a22b9fb16540beafd5eb7969) ([#10544](https://www.github.com/tauri-apps/tauri/pull/10544) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) v1 migrate script now migrates Svelte and Vue.js code.
26
+
27
+ ### Enhancements
28
+
29
+ - [`bba1a4419`](https://www.github.com/tauri-apps/tauri/commit/bba1a441917defcdf9e88221e9b0e1cdd744e77a) ([#10457](https://www.github.com/tauri-apps/tauri/pull/10457) by [@mmvanheusden](https://www.github.com/tauri-apps/tauri/../../mmvanheusden)) Added `--no-fmt` option to the `add` command to skip formatting the code after applying changes.
30
+ - [`71d00646a`](https://www.github.com/tauri-apps/tauri/commit/71d00646a9b7c52311ba087820e52fd19861b3d8) ([#10504](https://www.github.com/tauri-apps/tauri/pull/10504) by [@fu050409](https://www.github.com/tauri-apps/tauri/../../fu050409)) Improve the `init` command behavior by detecting the project NPM package manager.
31
+ - [`8deb1966a`](https://www.github.com/tauri-apps/tauri/commit/8deb1966ace93d1350f271d525a878ba4b0879ce) ([#10652](https://www.github.com/tauri-apps/tauri/pull/10652) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Infer macOS codesign identity from the `APPLE_CERTIFICATE` environment variable when provided, meaning the identity no longer needs to be provided when signing on CI using that option. If the imported certificate name does not match a provided signingIdentity configuration, an error is returned.
32
+ - [`f35bcda28`](https://www.github.com/tauri-apps/tauri/commit/f35bcda2895a1350df31853da76a051783b9fd3f) ([#10598](https://www.github.com/tauri-apps/tauri/pull/10598) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) `permission add` and `add` commands now check if the plugin is known and if it is either desktop or mobile only
33
+ we add the permission to a target-specific capability.
34
+
35
+ ### Bug Fixes
36
+
37
+ - [`f712f31d1`](https://www.github.com/tauri-apps/tauri/commit/f712f31d1d21e85fab99194530702c70e45c63fc) ([#10639](https://www.github.com/tauri-apps/tauri/pull/10639) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Include notarization error output in the error message if it fails.
38
+ - [`9f75d0622`](https://www.github.com/tauri-apps/tauri/commit/9f75d06228fcb7036cf7a4e215abc7bc8d1a0a56) ([#10604](https://www.github.com/tauri-apps/tauri/pull/10604) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Fixes `android dev` port forward failing under some conditions, add better logging and error handling.
39
+ - [`2d47352a0`](https://www.github.com/tauri-apps/tauri/commit/2d47352a07a7d742e62291a5e6810aed79fc8b50) ([#10418](https://www.github.com/tauri-apps/tauri/pull/10418) by [@samkearney](https://www.github.com/tauri-apps/tauri/../../samkearney)) CLI commands will now consistently search for the `app_dir` (the directory containing `package.json`) from the current working directory of the command invocation.
40
+ - [`f4cd68f04`](https://www.github.com/tauri-apps/tauri/commit/f4cd68f040635f019ff989667289cfe9061c7dfb) ([#10600](https://www.github.com/tauri-apps/tauri/pull/10600) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Fixes `android dev` not working when using the builtin dev server.
41
+ - [`41c7a6646`](https://www.github.com/tauri-apps/tauri/commit/41c7a6646ba9afbb2322986fb39054a43a88e604) ([#10572](https://www.github.com/tauri-apps/tauri/pull/10572) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Exit with code 1 if a panic occurs when running the CLI with `bun`.
42
+ - [`9089d9763`](https://www.github.com/tauri-apps/tauri/commit/9089d97637e49bebbe7dba8adc6351e04b53a44d) ([#10605](https://www.github.com/tauri-apps/tauri/pull/10605) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Fixes `[android|ios] build --config <config>` failing to resolve.
43
+ - [`712f1049f`](https://www.github.com/tauri-apps/tauri/commit/712f1049fae74bfda5f360adcee7210cea92fe63) ([#10569](https://www.github.com/tauri-apps/tauri/pull/10569) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Fixes running `ios dev` and `ios build` using `bun`.
44
+ - [`3998570fd`](https://www.github.com/tauri-apps/tauri/commit/3998570fd3d03c1bb282bd060a4aafb4ab5437f9) ([#10540](https://www.github.com/tauri-apps/tauri/pull/10540) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Fixes v1 migration of Cargo.toml dependencies and features.
45
+ - [`3beba92b5`](https://www.github.com/tauri-apps/tauri/commit/3beba92b5bdc62ed00c9f6a9b8f8c05cfa78f8dc) ([#10542](https://www.github.com/tauri-apps/tauri/pull/10542) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Fixes v1 frontend code migration when using plugin default imports.
46
+ - [`10fb027b7`](https://www.github.com/tauri-apps/tauri/commit/10fb027b7590cf2c020b5c220328b9051c05adca) ([#10656](https://www.github.com/tauri-apps/tauri/pull/10656) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Migrate v1 plugins to their v2 releases.
47
+ - [`10fb027b7`](https://www.github.com/tauri-apps/tauri/commit/10fb027b7590cf2c020b5c220328b9051c05adca) ([#10656](https://www.github.com/tauri-apps/tauri/pull/10656) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Prevent duplicate permissions on v1 migration.
48
+ - [`b160f9359`](https://www.github.com/tauri-apps/tauri/commit/b160f9359d6f661d280185d2a2a4bdf280b8e72c) ([#10638](https://www.github.com/tauri-apps/tauri/pull/10638) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Only validate the output iOS library on debug builds.
49
+ - [`4bfe4880f`](https://www.github.com/tauri-apps/tauri/commit/4bfe4880fbef42d1a115f840e712d4a2f59c8ab3) ([#10550](https://www.github.com/tauri-apps/tauri/pull/10550) by [@anatawa12](https://www.github.com/tauri-apps/tauri/../../anatawa12)) fails to build universal fat binary if main bin is renamed to another name in `Cargo.toml`
50
+ - [`f3837d5b9`](https://www.github.com/tauri-apps/tauri/commit/f3837d5b98f0caebc3337f9a9e8127e7b96c3fc5) ([#10539](https://www.github.com/tauri-apps/tauri/pull/10539) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Improve migration tooling by supporting TOML configs, handle nulls and properly check for updater migration.
51
+
52
+ ### What's Changed
53
+
54
+ - [`794cf8234`](https://www.github.com/tauri-apps/tauri/commit/794cf8234f8b620c74cbd23cc4b81be9b2edc386) ([#10571](https://www.github.com/tauri-apps/tauri/pull/10571) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Change iOS template default export method from deprecated `development` to `debugging`.
55
+ - [`bfc49cc7a`](https://www.github.com/tauri-apps/tauri/commit/bfc49cc7a1d43e3378e93865b9b37ce4bddfa6e6) ([#10558](https://www.github.com/tauri-apps/tauri/pull/10558) by [@ahqsoftwares](https://www.github.com/tauri-apps/tauri/../../ahqsoftwares)) Remove targetSdk from gradle files
56
+
57
+ ### Dependencies
58
+
59
+ - Upgraded to `tauri-cli@2.0.0-rc.4`
60
+
3
61
  ## \[2.0.0-rc.3]
4
62
 
5
63
  ### Enhancements
package/README.md CHANGED
@@ -1,4 +1,5 @@
1
1
  # @tauri-apps/cli
2
+
2
3
  <img align="right" src="https://github.com/tauri-apps/tauri/raw/dev/app-icon.png" height="128" width="128">
3
4
 
4
5
  [![status](https://img.shields.io/badge/status-stable-blue.svg)](https://github.com/tauri-apps/tauri/tree/dev)
@@ -10,34 +11,42 @@
10
11
  [![https://good-labs.github.io/greater-good-affirmation/assets/images/badge.svg](https://good-labs.github.io/greater-good-affirmation/assets/images/badge.svg)](https://good-labs.github.io/greater-good-affirmation)
11
12
  [![support](https://img.shields.io/badge/sponsor-Open%20Collective-blue.svg)](https://opencollective.com/tauri)
12
13
 
13
- | Component | Version |
14
- | --------- | ------------------------------------------- |
15
- | @tauri-apps/cli | ![](https://img.shields.io/npm/v/@tauri-apps/cli.svg) |
14
+ | Component | Version |
15
+ | --------------- | ----------------------------------------------------- |
16
+ | @tauri-apps/cli | ![](https://img.shields.io/npm/v/@tauri-apps/cli.svg) |
16
17
 
17
18
  ## About Tauri
19
+
18
20
  Tauri is a polyglot and generic system that is very composable and allows engineers to make a wide variety of applications. It is used for building applications for Desktop Computers using a combination of Rust tools and HTML rendered in a Webview. Apps built with Tauri can ship with any number of pieces of an optional JS API / Rust API so that webviews can control the system via message passing. In fact, developers can extend the default API with their own functionality and bridge the Webview and Rust-based backend easily.
19
21
 
20
22
  Tauri apps can have custom menus and have tray-type interfaces. They can be updated, and are managed by the user's operating system as expected. They are very small, because they use the system's webview. They do not ship a runtime, since the final binary is compiled from rust. This makes the reversing of Tauri apps not a trivial task.
23
+
21
24
  ## This module
22
- Written in Typescript and packaged such that it can be used with `npm`, `pnpm`, `yarn`, and `bun`, this library provides a node.js runner for common tasks when using Tauri, like `yarn tauri dev`. For the most part it is a wrapper around [tauri-cli](https://github.com/tauri-apps/tauri/blob/dev/tooling/cli).
23
25
 
24
- To learn more about the details of how all of these pieces fit together, please consult this [ARCHITECTURE.md](https://github.com/tauri-apps/tauri/blob/dev/ARCHITECTURE.md) document.
26
+ Written in Typescript and packaged such that it can be used with `npm`, `pnpm`, `yarn`, and `bun`, this library provides a node.js runner for common tasks when using Tauri, like `pnpm tauri dev`. For the most part it is a wrapper around [tauri-cli](https://github.com/tauri-apps/tauri/blob/dev/tooling/cli).
25
27
 
28
+ To learn more about the details of how all of these pieces fit together, please consult this [ARCHITECTURE.md](https://github.com/tauri-apps/tauri/blob/dev/ARCHITECTURE.md) document.
26
29
 
27
30
  ## Installation
28
31
 
29
32
  The preferred method is to install this module locally as a development dependency:
33
+
30
34
  ```
31
- $ npm install --save-dev @tauri-apps/cli
32
- $ yarn add --dev @tauri-apps/cli
35
+ $ pnpm add -D @tauri-apps/cli
36
+ $ yarn add -D @tauri-apps/cli
37
+ $ npm add -D @tauri-apps/cli
33
38
  ```
34
39
 
35
40
  ## Semver
41
+
36
42
  **tauri** is following [Semantic Versioning 2.0](https://semver.org/).
43
+
37
44
  ## Licenses
45
+
38
46
  Code: (c) 2019 - 2021 - The Tauri Programme within The Commons Conservancy.
39
47
 
40
48
  MIT or MIT/Apache 2.0 where applicable.
41
49
 
42
50
  Logo: CC-BY-NC-ND
51
+
43
52
  - Original Tauri Logo Designs by [Daniel Thompson-Yvetot](https://github.com/nothingismagick) and [Guillaume Chau](https://github.com/akryum)
package/index.d.ts CHANGED
@@ -7,5 +7,9 @@
7
7
 
8
8
  /* auto-generated by NAPI-RS */
9
9
 
10
- export function run(args: Array<string>, binName: string | undefined | null, callback: (...args: any[]) => any): void
10
+ export function run(
11
+ args: Array<string>,
12
+ binName: string | undefined | null,
13
+ callback: (...args: any[]) => any
14
+ ): void
11
15
  export function logError(error: string): void
package/index.js CHANGED
@@ -21,7 +21,10 @@ function isMusl() {
21
21
  // For Node 10
22
22
  if (!process.report || typeof process.report.getReport !== 'function') {
23
23
  try {
24
- const lddPath = require('child_process').execSync('which ldd').toString().trim()
24
+ const lddPath = require('child_process')
25
+ .execSync('which ldd')
26
+ .toString()
27
+ .trim()
25
28
  return readFileSync(lddPath, 'utf8').includes('musl')
26
29
  } catch (e) {
27
30
  return true
@@ -48,7 +51,9 @@ switch (platform) {
48
51
  }
49
52
  break
50
53
  case 'arm':
51
- localFileExisted = existsSync(join(__dirname, 'cli.android-arm-eabi.node'))
54
+ localFileExisted = existsSync(
55
+ join(__dirname, 'cli.android-arm-eabi.node')
56
+ )
52
57
  try {
53
58
  if (localFileExisted) {
54
59
  nativeBinding = require('./cli.android-arm-eabi.node')
@@ -135,9 +140,7 @@ switch (platform) {
135
140
  }
136
141
  break
137
142
  case 'arm64':
138
- localFileExisted = existsSync(
139
- join(__dirname, 'cli.darwin-arm64.node')
140
- )
143
+ localFileExisted = existsSync(join(__dirname, 'cli.darwin-arm64.node'))
141
144
  try {
142
145
  if (localFileExisted) {
143
146
  nativeBinding = require('./cli.darwin-arm64.node')
package/main.d.ts CHANGED
@@ -5,4 +5,7 @@
5
5
  /* tslint:disable */
6
6
  /* eslint-disable */
7
7
 
8
- export function run(args: Array<string>, binName: string | undefined | null): Promise<void>
8
+ export function run(
9
+ args: Array<string>,
10
+ binName: string | undefined | null
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.3",
3
+ "version": "2.0.0-rc.5",
4
4
  "description": "Command line interface for building Tauri apps",
5
5
  "funding": {
6
6
  "type": "opencollective",
@@ -11,7 +11,7 @@
11
11
  "url": "git+https://github.com/tauri-apps/tauri.git"
12
12
  },
13
13
  "contributors": [
14
- "Tauri Team <team@tauri-apps.org> (https://tauri.app)"
14
+ "Tauri Programme within The Commons Conservancy"
15
15
  ],
16
16
  "license": "Apache-2.0 OR MIT",
17
17
  "bugs": {
@@ -46,9 +46,6 @@
46
46
  "jest-transform-toml": "1.0.0",
47
47
  "prettier": "3.3.2"
48
48
  },
49
- "resolutions": {
50
- "json5": "2.2.3"
51
- },
52
49
  "engines": {
53
50
  "node": ">= 10"
54
51
  },
@@ -63,20 +60,18 @@
63
60
  "prepack": "cp ../schema.json .",
64
61
  "test": "jest --runInBand --forceExit --no-cache",
65
62
  "version": "napi version",
66
- "tauri": "node ./tauri.js",
67
- "format": "prettier --write ./package.json ./tauri.js",
68
- "format:check": "prettier --check ./package.json ./tauri.js"
63
+ "tauri": "node ./tauri.js"
69
64
  },
70
65
  "optionalDependencies": {
71
- "@tauri-apps/cli-win32-x64-msvc": "2.0.0-rc.3",
72
- "@tauri-apps/cli-darwin-x64": "2.0.0-rc.3",
73
- "@tauri-apps/cli-linux-x64-gnu": "2.0.0-rc.3",
74
- "@tauri-apps/cli-darwin-arm64": "2.0.0-rc.3",
75
- "@tauri-apps/cli-linux-arm64-gnu": "2.0.0-rc.3",
76
- "@tauri-apps/cli-linux-arm64-musl": "2.0.0-rc.3",
77
- "@tauri-apps/cli-linux-arm-gnueabihf": "2.0.0-rc.3",
78
- "@tauri-apps/cli-linux-x64-musl": "2.0.0-rc.3",
79
- "@tauri-apps/cli-win32-ia32-msvc": "2.0.0-rc.3",
80
- "@tauri-apps/cli-win32-arm64-msvc": "2.0.0-rc.3"
66
+ "@tauri-apps/cli-win32-x64-msvc": "2.0.0-rc.5",
67
+ "@tauri-apps/cli-darwin-x64": "2.0.0-rc.5",
68
+ "@tauri-apps/cli-linux-x64-gnu": "2.0.0-rc.5",
69
+ "@tauri-apps/cli-darwin-arm64": "2.0.0-rc.5",
70
+ "@tauri-apps/cli-linux-arm64-gnu": "2.0.0-rc.5",
71
+ "@tauri-apps/cli-linux-arm64-musl": "2.0.0-rc.5",
72
+ "@tauri-apps/cli-linux-arm-gnueabihf": "2.0.0-rc.5",
73
+ "@tauri-apps/cli-linux-x64-musl": "2.0.0-rc.5",
74
+ "@tauri-apps/cli-win32-ia32-msvc": "2.0.0-rc.5",
75
+ "@tauri-apps/cli-win32-arm64-msvc": "2.0.0-rc.5"
81
76
  }
82
77
  }
package/schema.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
3
  "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 ```json title=\"Example tauri.config.json file\"\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 ```",
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
5
  "type": "object",
6
6
  "properties": {
7
7
  "$schema": {
@@ -2033,10 +2033,14 @@
2033
2033
  ]
2034
2034
  },
2035
2035
  "signCommand": {
2036
- "description": "Specify a custom command to sign the binaries.\n This command needs to have a `%1` in it which is just a placeholder for the binary path,\n which we will detect and replace before calling the command.\n\n Example:\n ```text\n sign-cli --arg1 --arg2 %1\n ```\n\n By Default we use `signtool.exe` which can be found only on Windows so\n if you are on another platform and want to cross-compile and sign you will\n need to use another tool like `osslsigncode`.",
2037
- "type": [
2038
- "string",
2039
- "null"
2036
+ "description": "Specify a custom command to sign the binaries.\n This command needs to have a `%1` in args which is just a placeholder for the binary path,\n which we will detect and replace before calling the command.\n\n By Default we use `signtool.exe` which can be found only on Windows so\n if you are on another platform and want to cross-compile and sign you will\n need to use another tool like `osslsigncode`.",
2037
+ "anyOf": [
2038
+ {
2039
+ "$ref": "#/definitions/CustomSignCommandConfig"
2040
+ },
2041
+ {
2042
+ "type": "null"
2043
+ }
2040
2044
  ]
2041
2045
  }
2042
2046
  },
@@ -2425,6 +2429,37 @@
2425
2429
  }
2426
2430
  ]
2427
2431
  },
2432
+ "CustomSignCommandConfig": {
2433
+ "description": "Custom Signing Command configuration.",
2434
+ "anyOf": [
2435
+ {
2436
+ "description": "A string notation of the script to execute.\n\n \"%1\" will be replaced with the path to the binary to be signed.\n\n This is a simpler notation for the command.\n Tauri will split the string with `' '` and use the first element as the command name and the rest as arguments.\n\n If you need to use whitespace in the command or arguments, use the object notation [`Self::ScriptWithOptions`].",
2437
+ "type": "string"
2438
+ },
2439
+ {
2440
+ "description": "An object notation of the command.\n\n This is more complex notation for the command but\n this allows you to use whitespace in the command and arguments.",
2441
+ "type": "object",
2442
+ "required": [
2443
+ "args",
2444
+ "cmd"
2445
+ ],
2446
+ "properties": {
2447
+ "cmd": {
2448
+ "description": "The command to run to sign the binary.",
2449
+ "type": "string"
2450
+ },
2451
+ "args": {
2452
+ "description": "The arguments to pass to the command.\n\n \"%1\" will be replaced with the path to the binary to be signed.",
2453
+ "type": "array",
2454
+ "items": {
2455
+ "type": "string"
2456
+ }
2457
+ }
2458
+ },
2459
+ "additionalProperties": false
2460
+ }
2461
+ ]
2462
+ },
2428
2463
  "LinuxConfig": {
2429
2464
  "description": "Configuration for Linux bundles.\n\n See more: <https://tauri.app/v1/api/config#linuxconfig>",
2430
2465
  "type": "object",
package/src/lib.rs CHANGED
@@ -14,12 +14,29 @@ pub fn run(args: Vec<String>, bin_name: Option<String>, callback: JsFunction) ->
14
14
 
15
15
  // we need to run in a separate thread so Node.js consumers
16
16
  // can do work while `tauri dev` is running.
17
- std::thread::spawn(move || match tauri_cli::try_run(args, bin_name) {
18
- Ok(_) => function.call(Ok(true), ThreadsafeFunctionCallMode::Blocking),
19
- Err(e) => function.call(
20
- Err(Error::new(Status::GenericFailure, format!("{:#}", e))),
21
- ThreadsafeFunctionCallMode::Blocking,
22
- ),
17
+ std::thread::spawn(move || {
18
+ let res = match std::panic::catch_unwind(std::panic::AssertUnwindSafe(|| {
19
+ tauri_cli::try_run(args, bin_name)
20
+ })) {
21
+ Ok(t) => t,
22
+ Err(e) => {
23
+ return function.call(
24
+ Err(Error::new(
25
+ Status::GenericFailure,
26
+ "Tauri CLI unexpected panic",
27
+ )),
28
+ ThreadsafeFunctionCallMode::Blocking,
29
+ );
30
+ }
31
+ };
32
+
33
+ match res {
34
+ Ok(_) => function.call(Ok(true), ThreadsafeFunctionCallMode::Blocking),
35
+ Err(e) => function.call(
36
+ Err(Error::new(Status::GenericFailure, format!("{:#}", e))),
37
+ ThreadsafeFunctionCallMode::Blocking,
38
+ ),
39
+ }
23
40
  });
24
41
 
25
42
  Ok(())