@tauri-apps/cli 2.0.1 → 2.0.3

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,32 @@
1
1
  # Changelog
2
2
 
3
+ ## \[2.0.3]
4
+
5
+ ### New Features
6
+
7
+ - [`eda5713ea`](https://www.github.com/tauri-apps/tauri/commit/eda5713eab78d28182071ea25ceca5f1994f37ea) ([#11242](https://www.github.com/tauri-apps/tauri/pull/11242) by [@alex-sandri](https://www.github.com/tauri-apps/tauri/../../alex-sandri)) Add `Italian` to supported NSIS installer languages
8
+ - [`b3563e3d6`](https://www.github.com/tauri-apps/tauri/commit/b3563e3d6ae8dc90ee68f25f575cd5538ab1915b) ([#11304](https://www.github.com/tauri-apps/tauri/pull/11304) by [@amrbashir](https://www.github.com/tauri-apps/tauri/../../amrbashir)) Add Deno support in tauri-cli operations.
9
+
10
+ ### Bug Fixes
11
+
12
+ - [`d609bef9f`](https://www.github.com/tauri-apps/tauri/commit/d609bef9fd7cd6eeb2bd701558100bd9cfb6e6f6) ([#11314](https://www.github.com/tauri-apps/tauri/pull/11314) by [@amrbashir](https://www.github.com/tauri-apps/tauri/../../amrbashir)) Fix android invalid proguard file when using an `identifier` that contains a component that is a reserved kotlin keyword, like `in`, `class`, etc
13
+ - [`069c05e44`](https://www.github.com/tauri-apps/tauri/commit/069c05e44fd6f30083fdc00dd6c0001278898592) ([#11315](https://www.github.com/tauri-apps/tauri/pull/11315) by [@amrbashir](https://www.github.com/tauri-apps/tauri/../../amrbashir)) Fix CLI crashing and failing to find a `.ico` file when `bundle > icon` option is using globs and doesn't have a string that ends with `.ico`.
14
+
15
+ ### Dependencies
16
+
17
+ - Upgraded to `tauri-cli@2.0.3`
18
+
19
+ ## \[2.0.2]
20
+
21
+ ### What's Changed
22
+
23
+ - [`4475fbb50`](https://www.github.com/tauri-apps/tauri/commit/4475fbb502c5ffb3cea4de6bef1c7869be39bed6) ([#11208](https://www.github.com/tauri-apps/tauri/pull/11208) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Update cargo-mobile2 to 0.17.3, fixing lib name validation.
24
+ - [`a49a19ffa`](https://www.github.com/tauri-apps/tauri/commit/a49a19ffa304f031fb1a04d31a567cc7f42a380a) ([#11218](https://www.github.com/tauri-apps/tauri/pull/11218)) Fix bundling `appimage`, `deb` and `rpm` bundles failing to open when using `mainBinaryName` with spaces.
25
+
26
+ ### Dependencies
27
+
28
+ - Upgraded to `tauri-cli@2.0.2`
29
+
3
30
  ## \[2.0.1]
4
31
 
5
32
  ### Dependencies
@@ -3,6 +3,7 @@
3
3
  // SPDX-License-Identifier: MIT
4
4
 
5
5
  import { resolve } from 'node:path'
6
+ import { spawnSync } from 'node:child_process'
6
7
  import {
7
8
  existsSync,
8
9
  readFileSync,
@@ -10,8 +11,16 @@ import {
10
11
  rmSync,
11
12
  renameSync
12
13
  } from 'node:fs'
13
- import cli from '../main.js'
14
- import { describe, it } from 'vitest'
14
+ import { beforeAll, describe, it } from 'vitest'
15
+
16
+ // Build CLI before tests, for local usage only.
17
+ // CI builds the CLI on different platforms and architectures
18
+ if (!process.env.CI) {
19
+ beforeAll(() => {
20
+ const cliDir = resolve(__dirname, '..')
21
+ exec('pnpm', ['build:debug'], { cwd: cliDir })
22
+ })
23
+ }
15
24
 
16
25
  describe('[CLI] @tauri-apps/cli template', () => {
17
26
  it('init a project and builds it', { timeout: 15 * 60 * 1000 }, async () => {
@@ -31,8 +40,11 @@ describe('[CLI] @tauri-apps/cli template', () => {
31
40
  renameSync(outPath, cacheOutPath)
32
41
  }
33
42
 
43
+ const cli = await import('../main.js')
44
+
34
45
  await cli.run([
35
46
  'init',
47
+ '-vvv',
36
48
  '--directory',
37
49
  process.cwd(),
38
50
  '--force',
@@ -59,7 +71,19 @@ describe('[CLI] @tauri-apps/cli template', () => {
59
71
  const config = readFileSync(configPath).toString()
60
72
  writeFileSync(configPath, config.replace('com.tauri.dev', 'com.tauri.test'))
61
73
 
62
- await cli.run(['build', '--verbose'])
74
+ await cli.run(['build'])
63
75
  process.chdir(cwd)
64
76
  })
65
77
  })
78
+
79
+ function exec(
80
+ bin: string,
81
+ args?: string[],
82
+ opts?: {
83
+ cwd?: string
84
+ }
85
+ ) {
86
+ process.platform === 'win32'
87
+ ? spawnSync('cmd', ['/c', bin, ...(args ?? [])], { cwd: opts?.cwd })
88
+ : spawnSync(bin, args, { cwd: opts?.cwd })
89
+ }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "https://schema.tauri.app/config/2.0.1",
3
+ "$id": "https://schema.tauri.app/config/2.0.3",
4
4
  "title": "Config",
5
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 ```",
6
6
  "type": "object",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tauri-apps/cli",
3
- "version": "2.0.1",
3
+ "version": "2.0.3",
4
4
  "description": "Command line interface for building Tauri apps",
5
5
  "funding": {
6
6
  "type": "opencollective",
@@ -62,15 +62,15 @@
62
62
  "tauri": "node ./tauri.js"
63
63
  },
64
64
  "optionalDependencies": {
65
- "@tauri-apps/cli-win32-x64-msvc": "2.0.1",
66
- "@tauri-apps/cli-darwin-x64": "2.0.1",
67
- "@tauri-apps/cli-linux-x64-gnu": "2.0.1",
68
- "@tauri-apps/cli-darwin-arm64": "2.0.1",
69
- "@tauri-apps/cli-linux-arm64-gnu": "2.0.1",
70
- "@tauri-apps/cli-linux-arm64-musl": "2.0.1",
71
- "@tauri-apps/cli-linux-arm-gnueabihf": "2.0.1",
72
- "@tauri-apps/cli-linux-x64-musl": "2.0.1",
73
- "@tauri-apps/cli-win32-ia32-msvc": "2.0.1",
74
- "@tauri-apps/cli-win32-arm64-msvc": "2.0.1"
65
+ "@tauri-apps/cli-win32-x64-msvc": "2.0.3",
66
+ "@tauri-apps/cli-darwin-x64": "2.0.3",
67
+ "@tauri-apps/cli-linux-x64-gnu": "2.0.3",
68
+ "@tauri-apps/cli-darwin-arm64": "2.0.3",
69
+ "@tauri-apps/cli-linux-arm64-gnu": "2.0.3",
70
+ "@tauri-apps/cli-linux-arm64-musl": "2.0.3",
71
+ "@tauri-apps/cli-linux-arm-gnueabihf": "2.0.3",
72
+ "@tauri-apps/cli-linux-x64-musl": "2.0.3",
73
+ "@tauri-apps/cli-win32-ia32-msvc": "2.0.3",
74
+ "@tauri-apps/cli-win32-arm64-msvc": "2.0.3"
75
75
  }
76
76
  }
package/tauri.js CHANGED
@@ -14,9 +14,9 @@ const binStem = path.parse(bin).name.toLowerCase()
14
14
  // can successfully detect what command likely started the execution.
15
15
  let binName
16
16
 
17
- // deno run -A --unstable --node-modules-dir npm:@tauri-apps/cli
18
- if (bin === '@tauri-apps/cli') {
19
- binName = '@tauri-apps/cli'
17
+ // deno run -A npm:@tauri-apps/cli or deno task tauri
18
+ if (globalThis.navigator?.userAgent?.includes('Deno')) {
19
+ binName = bin
20
20
  }
21
21
  // Even if started by a package manager, the binary will be NodeJS.
22
22
  // Some distribution still use "nodejs" as the binary name.