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

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,50 @@
1
1
  # Changelog
2
2
 
3
+ ## \[2.0.0-rc.9]
4
+
5
+ ### Bug Fixes
6
+
7
+ - [`5af1f5dec`](https://www.github.com/tauri-apps/tauri/commit/5af1f5dec1bb98f335169df8c5e30c19a24cae07) ([#10851](https://www.github.com/tauri-apps/tauri/pull/10851) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Fixes `ios build` failing to build iOS app in CI when using an API key for automatic signing.
8
+
9
+ ### Dependencies
10
+
11
+ - Upgraded to `tauri-cli@2.0.0-rc.9`
12
+
13
+ ## \[2.0.0-rc.8]
14
+
15
+ ### New Features
16
+
17
+ - [`91e9e784a`](https://www.github.com/tauri-apps/tauri/commit/91e9e784aa59634e3fe6359f8b78d071d76a9e42) ([#10729](https://www.github.com/tauri-apps/tauri/pull/10729) by [@amrbashir](https://www.github.com/tauri-apps/tauri/../../amrbashir)) Add plugins information in `tauri info` output
18
+ - [`09e9dc1aa`](https://www.github.com/tauri-apps/tauri/commit/09e9dc1aab1b66aa6a3a009d5873db586abe76a0) ([#10752](https://www.github.com/tauri-apps/tauri/pull/10752) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Allow Xcode to manage iOS code sign and provisioning profiles by default.
19
+ On CI, the `APPLE_API_KEY`, `APPLE_API_ISSUER` and `APPLE_API_KEY_PATH` environment variables must be provided for authentication.
20
+
21
+ ### Enhancements
22
+
23
+ - [`3a4972b39`](https://www.github.com/tauri-apps/tauri/commit/3a4972b394c65c32eefebfb2181ba56b0cfc08f7) ([#10793](https://www.github.com/tauri-apps/tauri/pull/10793) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Include architecture in the `tauri info` output.
24
+ - [`fd68b7fde`](https://www.github.com/tauri-apps/tauri/commit/fd68b7fdea3890d9f0a373a252a3682bd9d04138) ([#10785](https://www.github.com/tauri-apps/tauri/pull/10785) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Remove the `.cargo/config` file creation that used to fix mobile build caches.
25
+ - [`f67a9eb6d`](https://www.github.com/tauri-apps/tauri/commit/f67a9eb6de4567c2374b8cdbabadcf0ca44d28fb) ([#10802](https://www.github.com/tauri-apps/tauri/pull/10802) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Synchronize identifier, development team and lib name with the iOS Xcode project.
26
+
27
+ ### Bug Fixes
28
+
29
+ - [`83ed090bf`](https://www.github.com/tauri-apps/tauri/commit/83ed090bfa58a1784495f474d93b16a568be513f) ([#10790](https://www.github.com/tauri-apps/tauri/pull/10790) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Do not quit `ios dev` and `android dev` process when we fail to attach the logger.
30
+ - [`2d31aef75`](https://www.github.com/tauri-apps/tauri/commit/2d31aef759f496f3afe46b7697176e61a8570511) ([#10751](https://www.github.com/tauri-apps/tauri/pull/10751) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Ensure gradlew is executable and does not use CRLF so it can be used on UNIX systems.
31
+ - [`02b2f964a`](https://www.github.com/tauri-apps/tauri/commit/02b2f964a70c61ff08b5052bd9fcde472d706d9c) ([#10795](https://www.github.com/tauri-apps/tauri/pull/10795) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Fix the `add` command NPM version specifier for known plugins from `2.0.0-rc` (unknown version requirement) to `^2.0.0-rc`.
32
+ - [`84070bae9`](https://www.github.com/tauri-apps/tauri/commit/84070bae92d234bc3630e795cfaf79f869f3a751) ([#10792](https://www.github.com/tauri-apps/tauri/pull/10792) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Fix `tauri plugin ios init` not generating the iOS folder.
33
+ - [`edb2ca31f`](https://www.github.com/tauri-apps/tauri/commit/edb2ca31f70a39004b6a09ae53425f22e243318e) ([#10794](https://www.github.com/tauri-apps/tauri/pull/10794) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Migrate v1 plugins NPM packages.
34
+ - [`9718dc9e8`](https://www.github.com/tauri-apps/tauri/commit/9718dc9e8c9bc91d9a5d9e0e06a7afab62492152) ([#10791](https://www.github.com/tauri-apps/tauri/pull/10791) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Reintroduce the `targetSdk` value in the Android application template.
35
+
36
+ ### What's Changed
37
+
38
+ - [`fb6bf3142`](https://www.github.com/tauri-apps/tauri/commit/fb6bf314252c88dd49af74bdbb8499df370836ae) ([#10763](https://www.github.com/tauri-apps/tauri/pull/10763) by [@rdlabo](https://www.github.com/tauri-apps/tauri/../../rdlabo)) Update plugin template Android code to match documentation on Android package ID usage.
39
+
40
+ ### Dependencies
41
+
42
+ - Upgraded to `tauri-cli@2.0.0-rc.8`
43
+
44
+ ### Breaking Changes
45
+
46
+ - [`073bb4f45`](https://www.github.com/tauri-apps/tauri/commit/073bb4f459a923541b94970dfa7e087bccaa2cfd) ([#10772](https://www.github.com/tauri-apps/tauri/pull/10772) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Removed the deprecated `webview_fixed_runtime_path` config option, use the `webview_install_mode` instead.
47
+
3
48
  ## \[2.0.0-rc.7]
4
49
 
5
50
  ### Enhancements
package/Cargo.toml CHANGED
@@ -10,7 +10,7 @@ crate-type = ["cdylib"]
10
10
  # Default enable napi4 feature, see https://nodejs.org/api/n-api.html#node-api-version-matrix
11
11
  napi = { version = "2.16", default-features = false, features = ["napi4"] }
12
12
  napi-derive = "2.16"
13
- tauri-cli = { path = "..", default-features = false }
13
+ tauri-cli = { path = "../../crates/tauri-cli", default-features = false }
14
14
  log = "0.4.21"
15
15
 
16
16
  [build-dependencies]
package/README.md CHANGED
@@ -23,7 +23,7 @@ Tauri apps can have custom menus and have tray-type interfaces. They can be upda
23
23
 
24
24
  ## This module
25
25
 
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).
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/crates/tauri-cli).
27
27
 
28
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.
29
29
 
@@ -112,6 +112,7 @@
112
112
  "minimumSystemVersion": "10.13"
113
113
  },
114
114
  "targets": "all",
115
+ "useLocalToolsDir": false,
115
116
  "windows": {
116
117
  "allowDowngrades": true,
117
118
  "certificateThumbprint": null,
@@ -120,7 +121,6 @@
120
121
  "signCommand": null,
121
122
  "timestampUrl": null,
122
123
  "tsp": false,
123
- "webviewFixedRuntimePath": null,
124
124
  "webviewInstallMode": {
125
125
  "silent": true,
126
126
  "type": "downloadBootstrapper"
@@ -1546,7 +1546,7 @@
1546
1546
  ]
1547
1547
  },
1548
1548
  "publisher": {
1549
- "description": "The application's publisher. Defaults to the second element in the identifier string.\n Currently maps to the Manufacturer property of the Windows Installer.",
1549
+ "description": "The application's publisher. Defaults to the second element in the identifier string.\n\n Currently maps to the Manufacturer property of the Windows Installer\n and the Maintainer field of debian packages if the Cargo.toml does not have the authors field.",
1550
1550
  "type": [
1551
1551
  "string",
1552
1552
  "null"
@@ -1630,6 +1630,11 @@
1630
1630
  "null"
1631
1631
  ]
1632
1632
  },
1633
+ "useLocalToolsDir": {
1634
+ "description": "Whether to use the project's `target` directory, for caching build tools (e.g., Wix and NSIS) when building this application. Defaults to `false`.\n\n If true, tools will be cached in `target\\.tauri-tools`.\n If false, tools will be cached in the current user's platform-specific cache directory.\n\n An example where it can be appropriate to set this to `true` is when building this application as a Windows System user (e.g., AWS EC2 workloads),\n because the Window system's app data directory is restricted.",
1635
+ "default": false,
1636
+ "type": "boolean"
1637
+ },
1633
1638
  "externalBin": {
1634
1639
  "description": "A list of—either absolute or relative—paths to binaries to embed with your application.\n\n Note that Tauri will look for system-specific binaries following the pattern \"binary-name{-target-triple}{.system-extension}\".\n\n E.g. for the external binary \"my-binary\", Tauri looks for:\n\n - \"my-binary-x86_64-pc-windows-msvc.exe\" for Windows\n - \"my-binary-x86_64-apple-darwin\" for macOS\n - \"my-binary-x86_64-unknown-linux-gnu\" for Linux\n\n so don't forget to provide binaries for all targeted platforms.",
1635
1640
  "type": [
@@ -1650,7 +1655,6 @@
1650
1655
  "signCommand": null,
1651
1656
  "timestampUrl": null,
1652
1657
  "tsp": false,
1653
- "webviewFixedRuntimePath": null,
1654
1658
  "webviewInstallMode": {
1655
1659
  "silent": true,
1656
1660
  "type": "downloadBootstrapper"
@@ -1998,13 +2002,6 @@
1998
2002
  }
1999
2003
  ]
2000
2004
  },
2001
- "webviewFixedRuntimePath": {
2002
- "description": "Path to the webview fixed runtime to use. Overwrites [`Self::webview_install_mode`] if set.\n\n Will be removed in v2, prefer the [`Self::webview_install_mode`] option.\n\n The fixed version can be downloaded [on the official website](https://developer.microsoft.com/en-us/microsoft-edge/webview2/#download-section).\n The `.cab` file must be extracted to a folder and this folder path must be defined on this field.",
2003
- "type": [
2004
- "string",
2005
- "null"
2006
- ]
2007
- },
2008
2005
  "allowDowngrades": {
2009
2006
  "description": "Validates a second app installation, blocking the user from installing an older version if set to `false`.\n\n For 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\n The default value of this flag is `true`.",
2010
2007
  "default": true,
@@ -2330,7 +2327,7 @@
2330
2327
  }
2331
2328
  },
2332
2329
  "customLanguageFiles": {
2333
- "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/tooling/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,",
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,",
2334
2331
  "type": [
2335
2332
  "object",
2336
2333
  "null"
@@ -2366,6 +2363,13 @@
2366
2363
  "string",
2367
2364
  "null"
2368
2365
  ]
2366
+ },
2367
+ "minimumWebview2Version": {
2368
+ "description": "Try to ensure that the WebView2 version is equal to or newer than this version,\n if the user's WebView2 is older than this version,\n the installer will try to trigger a WebView2 update.",
2369
+ "type": [
2370
+ "string",
2371
+ "null"
2372
+ ]
2369
2373
  }
2370
2374
  },
2371
2375
  "additionalProperties": false
package/index.d.ts CHANGED
@@ -7,9 +7,5 @@
7
7
 
8
8
  /* auto-generated by NAPI-RS */
9
9
 
10
- export function run(
11
- args: Array<string>,
12
- binName: string | undefined | null,
13
- callback: (...args: any[]) => any
14
- ): void
15
- export function logError(error: string): void
10
+ export declare function run(args: Array<string>, binName: string | undefined | null, callback: (...args: any[]) => any): void
11
+ export declare function logError(error: string): void
package/index.js CHANGED
@@ -21,10 +21,7 @@ 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')
25
- .execSync('which ldd')
26
- .toString()
27
- .trim()
24
+ const lddPath = require('child_process').execSync('which ldd').toString().trim()
28
25
  return readFileSync(lddPath, 'utf8').includes('musl')
29
26
  } catch (e) {
30
27
  return true
@@ -51,9 +48,7 @@ switch (platform) {
51
48
  }
52
49
  break
53
50
  case 'arm':
54
- localFileExisted = existsSync(
55
- join(__dirname, 'cli.android-arm-eabi.node')
56
- )
51
+ localFileExisted = existsSync(join(__dirname, 'cli.android-arm-eabi.node'))
57
52
  try {
58
53
  if (localFileExisted) {
59
54
  nativeBinding = require('./cli.android-arm-eabi.node')
@@ -140,7 +135,9 @@ switch (platform) {
140
135
  }
141
136
  break
142
137
  case 'arm64':
143
- localFileExisted = existsSync(join(__dirname, 'cli.darwin-arm64.node'))
138
+ localFileExisted = existsSync(
139
+ join(__dirname, 'cli.darwin-arm64.node')
140
+ )
144
141
  try {
145
142
  if (localFileExisted) {
146
143
  nativeBinding = require('./cli.darwin-arm64.node')
@@ -231,14 +228,72 @@ switch (platform) {
231
228
  }
232
229
  break
233
230
  case 'arm':
231
+ if (isMusl()) {
232
+ localFileExisted = existsSync(
233
+ join(__dirname, 'cli.linux-arm-musleabihf.node')
234
+ )
235
+ try {
236
+ if (localFileExisted) {
237
+ nativeBinding = require('./cli.linux-arm-musleabihf.node')
238
+ } else {
239
+ nativeBinding = require('@tauri-apps/cli-linux-arm-musleabihf')
240
+ }
241
+ } catch (e) {
242
+ loadError = e
243
+ }
244
+ } else {
245
+ localFileExisted = existsSync(
246
+ join(__dirname, 'cli.linux-arm-gnueabihf.node')
247
+ )
248
+ try {
249
+ if (localFileExisted) {
250
+ nativeBinding = require('./cli.linux-arm-gnueabihf.node')
251
+ } else {
252
+ nativeBinding = require('@tauri-apps/cli-linux-arm-gnueabihf')
253
+ }
254
+ } catch (e) {
255
+ loadError = e
256
+ }
257
+ }
258
+ break
259
+ case 'riscv64':
260
+ if (isMusl()) {
261
+ localFileExisted = existsSync(
262
+ join(__dirname, 'cli.linux-riscv64-musl.node')
263
+ )
264
+ try {
265
+ if (localFileExisted) {
266
+ nativeBinding = require('./cli.linux-riscv64-musl.node')
267
+ } else {
268
+ nativeBinding = require('@tauri-apps/cli-linux-riscv64-musl')
269
+ }
270
+ } catch (e) {
271
+ loadError = e
272
+ }
273
+ } else {
274
+ localFileExisted = existsSync(
275
+ join(__dirname, 'cli.linux-riscv64-gnu.node')
276
+ )
277
+ try {
278
+ if (localFileExisted) {
279
+ nativeBinding = require('./cli.linux-riscv64-gnu.node')
280
+ } else {
281
+ nativeBinding = require('@tauri-apps/cli-linux-riscv64-gnu')
282
+ }
283
+ } catch (e) {
284
+ loadError = e
285
+ }
286
+ }
287
+ break
288
+ case 's390x':
234
289
  localFileExisted = existsSync(
235
- join(__dirname, 'cli.linux-arm-gnueabihf.node')
290
+ join(__dirname, 'cli.linux-s390x-gnu.node')
236
291
  )
237
292
  try {
238
293
  if (localFileExisted) {
239
- nativeBinding = require('./cli.linux-arm-gnueabihf.node')
294
+ nativeBinding = require('./cli.linux-s390x-gnu.node')
240
295
  } else {
241
- nativeBinding = require('@tauri-apps/cli-linux-arm-gnueabihf')
296
+ nativeBinding = require('@tauri-apps/cli-linux-s390x-gnu')
242
297
  }
243
298
  } catch (e) {
244
299
  loadError = e
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tauri-apps/cli",
3
- "version": "2.0.0-rc.7",
3
+ "version": "2.0.0-rc.9",
4
4
  "description": "Command line interface for building Tauri apps",
5
5
  "funding": {
6
6
  "type": "opencollective",
@@ -57,21 +57,21 @@
57
57
  "build:release": "cross-env TARGET=node napi build --platform --profile release-size-optimized",
58
58
  "build": "cross-env TARGET=node napi build --platform",
59
59
  "prepublishOnly": "napi prepublish -t npm --gh-release-id $RELEASE_ID",
60
- "prepack": "cp ../schema.json .",
60
+ "prepack": "cp ../../crates/tauri-schema-generator/schemas/config.schema.json .",
61
61
  "test": "jest --runInBand --forceExit --no-cache",
62
62
  "version": "napi version",
63
63
  "tauri": "node ./tauri.js"
64
64
  },
65
65
  "optionalDependencies": {
66
- "@tauri-apps/cli-win32-x64-msvc": "2.0.0-rc.7",
67
- "@tauri-apps/cli-darwin-x64": "2.0.0-rc.7",
68
- "@tauri-apps/cli-linux-x64-gnu": "2.0.0-rc.7",
69
- "@tauri-apps/cli-darwin-arm64": "2.0.0-rc.7",
70
- "@tauri-apps/cli-linux-arm64-gnu": "2.0.0-rc.7",
71
- "@tauri-apps/cli-linux-arm64-musl": "2.0.0-rc.7",
72
- "@tauri-apps/cli-linux-arm-gnueabihf": "2.0.0-rc.7",
73
- "@tauri-apps/cli-linux-x64-musl": "2.0.0-rc.7",
74
- "@tauri-apps/cli-win32-ia32-msvc": "2.0.0-rc.7",
75
- "@tauri-apps/cli-win32-arm64-msvc": "2.0.0-rc.7"
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"
76
76
  }
77
77
  }
package/src/lib.rs CHANGED
@@ -2,6 +2,8 @@
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  // SPDX-License-Identifier: MIT
4
4
 
5
+ #![cfg(any(target_os = "macos", target_os = "linux", windows))]
6
+
5
7
  use napi::{
6
8
  threadsafe_function::{ErrorStrategy, ThreadsafeFunction, ThreadsafeFunctionCallMode},
7
9
  Error, JsFunction, Result, Status,
@@ -19,7 +21,7 @@ pub fn run(args: Vec<String>, bin_name: Option<String>, callback: JsFunction) ->
19
21
  tauri_cli::try_run(args, bin_name)
20
22
  })) {
21
23
  Ok(t) => t,
22
- Err(e) => {
24
+ Err(_) => {
23
25
  return function.call(
24
26
  Err(Error::new(
25
27
  Status::GenericFailure,