@tauri-apps/cli 2.0.2 → 2.0.4
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 +27 -0
- package/__tests__/template.spec.ts +27 -3
- package/config.schema.json +9 -2
- package/package.json +11 -11
- package/tauri.js +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## \[2.0.4]
|
|
4
|
+
|
|
5
|
+
### Enhancements
|
|
6
|
+
|
|
7
|
+
- [`e4c9268b1`](https://www.github.com/tauri-apps/tauri/commit/e4c9268b19c614dc9ebb0895448fd16de7efee80) ([#11258](https://www.github.com/tauri-apps/tauri/pull/11258) by [@regexident](https://www.github.com/tauri-apps/tauri/../../regexident)) Support custom project directory structure where the Tauri app folder is not a subfolder of the frontend project.
|
|
8
|
+
The frontend and Tauri app project paths can be set with the `TAURI_FRONTEND_PATH` and the `TAURI_APP_PATH` environment variables respectively.
|
|
9
|
+
|
|
10
|
+
### Dependencies
|
|
11
|
+
|
|
12
|
+
- Upgraded to `tauri-cli@2.0.4`
|
|
13
|
+
|
|
14
|
+
## \[2.0.3]
|
|
15
|
+
|
|
16
|
+
### New Features
|
|
17
|
+
|
|
18
|
+
- [`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
|
|
19
|
+
- [`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.
|
|
20
|
+
|
|
21
|
+
### Bug Fixes
|
|
22
|
+
|
|
23
|
+
- [`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
|
|
24
|
+
- [`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`.
|
|
25
|
+
|
|
26
|
+
### Dependencies
|
|
27
|
+
|
|
28
|
+
- Upgraded to `tauri-cli@2.0.3`
|
|
29
|
+
|
|
3
30
|
## \[2.0.2]
|
|
4
31
|
|
|
5
32
|
### What's Changed
|
|
@@ -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
|
|
14
|
-
|
|
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'
|
|
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
|
+
}
|
package/config.schema.json
CHANGED
|
@@ -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.
|
|
3
|
+
"$id": "https://schema.tauri.app/config/2.0.6",
|
|
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",
|
|
@@ -1104,7 +1104,7 @@
|
|
|
1104
1104
|
]
|
|
1105
1105
|
},
|
|
1106
1106
|
"Capability": {
|
|
1107
|
-
"description": "A grouping and boundary mechanism developers can use to isolate access to the IPC layer.\n\n It controls application windows fine grained access to the Tauri core, application, or plugin commands.\n If a window is not matching any capability then it has no access to the IPC layer at all.\n\n This can be done to create groups of windows, based on their required system access, which can reduce\n impact of frontend vulnerabilities in less privileged windows.\n Windows can be added to a capability by exact name (e.g. `main-window`) or glob patterns like `*` or `admin-*`.\n A Window can have none, one, or multiple associated capabilities.\n\n ## Example\n\n ```json\n {\n \"identifier\": \"main-user-files-write\",\n \"description\": \"This capability allows the `main` window on macOS and Windows access to `filesystem` write related commands and `dialog` commands to enable programatic access to files selected by the user.\",\n \"windows\": [\n \"main\"\n ],\n \"permissions\": [\n \"core:default\",\n \"dialog:open\",\n {\n \"identifier\": \"fs:allow-write-text-file\",\n \"allow\": [{ \"path\": \"$HOME/test.txt\" }]\n },\n \"platforms\": [\"macOS\",\"windows\"]\n }\n ```",
|
|
1107
|
+
"description": "A grouping and boundary mechanism developers can use to isolate access to the IPC layer.\n\n It controls application windows fine grained access to the Tauri core, application, or plugin commands.\n If a window is not matching any capability then it has no access to the IPC layer at all.\n\n This can be done to create groups of windows, based on their required system access, which can reduce\n impact of frontend vulnerabilities in less privileged windows.\n Windows can be added to a capability by exact name (e.g. `main-window`) or glob patterns like `*` or `admin-*`.\n A Window can have none, one, or multiple associated capabilities.\n\n ## Example\n\n ```json\n {\n \"identifier\": \"main-user-files-write\",\n \"description\": \"This capability allows the `main` window on macOS and Windows access to `filesystem` write related commands and `dialog` commands to enable programatic access to files selected by the user.\",\n \"windows\": [\n \"main\"\n ],\n \"permissions\": [\n \"core:default\",\n \"dialog:open\",\n {\n \"identifier\": \"fs:allow-write-text-file\",\n \"allow\": [{ \"path\": \"$HOME/test.txt\" }]\n },\n ],\n \"platforms\": [\"macOS\",\"windows\"]\n }\n ```",
|
|
1108
1108
|
"type": "object",
|
|
1109
1109
|
"required": [
|
|
1110
1110
|
"identifier",
|
|
@@ -2170,6 +2170,13 @@
|
|
|
2170
2170
|
"description": "Configuration for the MSI bundle using WiX.\n\n See more: <https://v2.tauri.app/reference/config/#wixconfig>",
|
|
2171
2171
|
"type": "object",
|
|
2172
2172
|
"properties": {
|
|
2173
|
+
"version": {
|
|
2174
|
+
"description": "MSI installer version in the format `major.minor.patch.build` (build is optional).\n\n Because a valid version is required for MSI installer, it will be derived from [`Config::version`] if this field is not set.\n\n The first field is the major version and has a maximum value of 255. The second field is the minor version and has a maximum value of 255.\n The third and foruth fields have a maximum value of 65,535.\n\n See <https://learn.microsoft.com/en-us/windows/win32/msi/productversion> for more info.",
|
|
2175
|
+
"type": [
|
|
2176
|
+
"string",
|
|
2177
|
+
"null"
|
|
2178
|
+
]
|
|
2179
|
+
},
|
|
2173
2180
|
"upgradeCode": {
|
|
2174
2181
|
"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
2182
|
"type": [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tauri-apps/cli",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.4",
|
|
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.
|
|
66
|
-
"@tauri-apps/cli-darwin-x64": "2.0.
|
|
67
|
-
"@tauri-apps/cli-linux-x64-gnu": "2.0.
|
|
68
|
-
"@tauri-apps/cli-darwin-arm64": "2.0.
|
|
69
|
-
"@tauri-apps/cli-linux-arm64-gnu": "2.0.
|
|
70
|
-
"@tauri-apps/cli-linux-arm64-musl": "2.0.
|
|
71
|
-
"@tauri-apps/cli-linux-arm-gnueabihf": "2.0.
|
|
72
|
-
"@tauri-apps/cli-linux-x64-musl": "2.0.
|
|
73
|
-
"@tauri-apps/cli-win32-ia32-msvc": "2.0.
|
|
74
|
-
"@tauri-apps/cli-win32-arm64-msvc": "2.0.
|
|
65
|
+
"@tauri-apps/cli-win32-x64-msvc": "2.0.4",
|
|
66
|
+
"@tauri-apps/cli-darwin-x64": "2.0.4",
|
|
67
|
+
"@tauri-apps/cli-linux-x64-gnu": "2.0.4",
|
|
68
|
+
"@tauri-apps/cli-darwin-arm64": "2.0.4",
|
|
69
|
+
"@tauri-apps/cli-linux-arm64-gnu": "2.0.4",
|
|
70
|
+
"@tauri-apps/cli-linux-arm64-musl": "2.0.4",
|
|
71
|
+
"@tauri-apps/cli-linux-arm-gnueabihf": "2.0.4",
|
|
72
|
+
"@tauri-apps/cli-linux-x64-musl": "2.0.4",
|
|
73
|
+
"@tauri-apps/cli-win32-ia32-msvc": "2.0.4",
|
|
74
|
+
"@tauri-apps/cli-win32-arm64-msvc": "2.0.4"
|
|
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
|
|
18
|
-
if (
|
|
19
|
-
binName =
|
|
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.
|