@tauri-apps/cli 2.0.0-rc.15 → 2.0.0-rc.17
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 +33 -0
- package/__tests__/fixtures/empty/dist/index.html +6 -0
- package/__tests__/fixtures/empty/package.json +5 -0
- package/__tests__/template.spec.ts +65 -0
- package/append-headers.js +15 -0
- package/config.schema.json +39 -20
- package/main.d.ts +1 -1
- package/package.json +18 -19
- package/src/lib.rs +1 -1
- package/jest.config.js +0 -18
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,38 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## \[2.0.0-rc.17]
|
|
4
|
+
|
|
5
|
+
### New Features
|
|
6
|
+
|
|
7
|
+
- [`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`.
|
|
8
|
+
- [`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`.
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
- [`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.
|
|
13
|
+
- [`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`.
|
|
14
|
+
- [`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.
|
|
15
|
+
- [`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.
|
|
16
|
+
- [`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.
|
|
17
|
+
|
|
18
|
+
### Dependencies
|
|
19
|
+
|
|
20
|
+
- Upgraded to `tauri-cli@2.0.0-rc.17`
|
|
21
|
+
|
|
22
|
+
### Breaking Changes
|
|
23
|
+
|
|
24
|
+
- [`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.
|
|
25
|
+
|
|
26
|
+
## \[2.0.0-rc.16]
|
|
27
|
+
|
|
28
|
+
### New Features
|
|
29
|
+
|
|
30
|
+
- [`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.
|
|
31
|
+
|
|
32
|
+
### Dependencies
|
|
33
|
+
|
|
34
|
+
- Upgraded to `tauri-cli@2.0.0-rc.16`
|
|
35
|
+
|
|
3
36
|
## \[2.0.0-rc.15]
|
|
4
37
|
|
|
5
38
|
### Enhancements
|
|
@@ -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
|
+
}
|
package/config.schema.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://schema.tauri.app/config/2.0.0-rc.16",
|
|
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/
|
|
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",
|
|
6
7
|
"required": [
|
|
7
8
|
"identifier"
|
|
@@ -156,11 +157,11 @@
|
|
|
156
157
|
"additionalProperties": false,
|
|
157
158
|
"definitions": {
|
|
158
159
|
"AppConfig": {
|
|
159
|
-
"description": "The App configuration object.\n\n See more: <https://tauri.app/
|
|
160
|
+
"description": "The App configuration object.\n\n See more: <https://v2.tauri.app/reference/config/#appconfig>",
|
|
160
161
|
"type": "object",
|
|
161
162
|
"properties": {
|
|
162
163
|
"windows": {
|
|
163
|
-
"description": "The windows configuration.",
|
|
164
|
+
"description": "The app windows configuration.",
|
|
164
165
|
"default": [],
|
|
165
166
|
"type": "array",
|
|
166
167
|
"items": {
|
|
@@ -217,7 +218,7 @@
|
|
|
217
218
|
"additionalProperties": false
|
|
218
219
|
},
|
|
219
220
|
"WindowConfig": {
|
|
220
|
-
"description": "The window configuration object.\n\n See more: <https://tauri.app/
|
|
221
|
+
"description": "The window configuration object.\n\n See more: <https://v2.tauri.app/reference/config/#windowconfig>",
|
|
221
222
|
"type": "object",
|
|
222
223
|
"properties": {
|
|
223
224
|
"label": {
|
|
@@ -225,6 +226,11 @@
|
|
|
225
226
|
"default": "main",
|
|
226
227
|
"type": "string"
|
|
227
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
|
+
},
|
|
228
234
|
"url": {
|
|
229
235
|
"description": "The window webview URL.",
|
|
230
236
|
"default": "index.html",
|
|
@@ -475,6 +481,11 @@
|
|
|
475
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.",
|
|
476
482
|
"default": false,
|
|
477
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"
|
|
478
489
|
}
|
|
479
490
|
},
|
|
480
491
|
"additionalProperties": false
|
|
@@ -844,7 +855,7 @@
|
|
|
844
855
|
"minItems": 4
|
|
845
856
|
},
|
|
846
857
|
"SecurityConfig": {
|
|
847
|
-
"description": "Security configuration.\n\n See more: <https://tauri.app/
|
|
858
|
+
"description": "Security configuration.\n\n See more: <https://v2.tauri.app/reference/config/#securityconfig>",
|
|
848
859
|
"type": "object",
|
|
849
860
|
"properties": {
|
|
850
861
|
"csp": {
|
|
@@ -966,7 +977,7 @@
|
|
|
966
977
|
]
|
|
967
978
|
},
|
|
968
979
|
"AssetProtocolConfig": {
|
|
969
|
-
"description": "Config for the asset custom protocol.\n\n See more: <https://tauri.app/
|
|
980
|
+
"description": "Config for the asset custom protocol.\n\n See more: <https://v2.tauri.app/reference/config/#assetprotocolconfig>",
|
|
970
981
|
"type": "object",
|
|
971
982
|
"properties": {
|
|
972
983
|
"scope": {
|
|
@@ -1323,7 +1334,7 @@
|
|
|
1323
1334
|
]
|
|
1324
1335
|
},
|
|
1325
1336
|
"TrayIconConfig": {
|
|
1326
|
-
"description": "Configuration for application tray icon.\n\n See more: <https://tauri.app/
|
|
1337
|
+
"description": "Configuration for application tray icon.\n\n See more: <https://v2.tauri.app/reference/config/#trayiconconfig>",
|
|
1327
1338
|
"type": "object",
|
|
1328
1339
|
"required": [
|
|
1329
1340
|
"iconPath"
|
|
@@ -1368,7 +1379,7 @@
|
|
|
1368
1379
|
"additionalProperties": false
|
|
1369
1380
|
},
|
|
1370
1381
|
"BuildConfig": {
|
|
1371
|
-
"description": "The Build configuration object.\n\n See more: <https://tauri.app/
|
|
1382
|
+
"description": "The Build configuration object.\n\n See more: <https://v2.tauri.app/reference/config/#buildconfig>",
|
|
1372
1383
|
"type": "object",
|
|
1373
1384
|
"properties": {
|
|
1374
1385
|
"runner": {
|
|
@@ -1528,7 +1539,7 @@
|
|
|
1528
1539
|
]
|
|
1529
1540
|
},
|
|
1530
1541
|
"BundleConfig": {
|
|
1531
|
-
"description": "Configuration for tauri-bundler.\n\n See more: <https://tauri.app/
|
|
1542
|
+
"description": "Configuration for tauri-bundler.\n\n See more: <https://v2.tauri.app/reference/config/#bundleconfig>",
|
|
1532
1543
|
"type": "object",
|
|
1533
1544
|
"properties": {
|
|
1534
1545
|
"active": {
|
|
@@ -1968,7 +1979,7 @@
|
|
|
1968
1979
|
]
|
|
1969
1980
|
},
|
|
1970
1981
|
"WindowsConfig": {
|
|
1971
|
-
"description": "Windows bundler configuration.\n\n See more: <https://tauri.app/
|
|
1982
|
+
"description": "Windows bundler configuration.\n\n See more: <https://v2.tauri.app/reference/config/#windowsconfig>",
|
|
1972
1983
|
"type": "object",
|
|
1973
1984
|
"properties": {
|
|
1974
1985
|
"digestAlgorithm": {
|
|
@@ -2051,7 +2062,7 @@
|
|
|
2051
2062
|
"additionalProperties": false
|
|
2052
2063
|
},
|
|
2053
2064
|
"WebviewInstallMode": {
|
|
2054
|
-
"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/
|
|
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>.",
|
|
2055
2066
|
"oneOf": [
|
|
2056
2067
|
{
|
|
2057
2068
|
"description": "Do not install the Webview2 as part of the Windows Installer.",
|
|
@@ -2156,9 +2167,17 @@
|
|
|
2156
2167
|
]
|
|
2157
2168
|
},
|
|
2158
2169
|
"WixConfig": {
|
|
2159
|
-
"description": "Configuration for the MSI bundle using WiX.\n\n See more: <https://tauri.app/
|
|
2170
|
+
"description": "Configuration for the MSI bundle using WiX.\n\n See more: <https://v2.tauri.app/reference/config/#wixconfig>",
|
|
2160
2171
|
"type": "object",
|
|
2161
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
|
+
},
|
|
2162
2181
|
"language": {
|
|
2163
2182
|
"description": "The installer languages to build. See <https://docs.microsoft.com/en-us/windows/win32/msi/localizing-the-error-and-actiontext-tables>.",
|
|
2164
2183
|
"default": "en-US",
|
|
@@ -2269,7 +2288,7 @@
|
|
|
2269
2288
|
]
|
|
2270
2289
|
},
|
|
2271
2290
|
"WixLanguageConfig": {
|
|
2272
|
-
"description": "Configuration for a target language for the WiX build.\n\n See more: <https://tauri.app/
|
|
2291
|
+
"description": "Configuration for a target language for the WiX build.\n\n See more: <https://v2.tauri.app/reference/config/#wixlanguageconfig>",
|
|
2273
2292
|
"type": "object",
|
|
2274
2293
|
"properties": {
|
|
2275
2294
|
"localePath": {
|
|
@@ -2334,7 +2353,7 @@
|
|
|
2334
2353
|
}
|
|
2335
2354
|
},
|
|
2336
2355
|
"customLanguageFiles": {
|
|
2337
|
-
"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/
|
|
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,",
|
|
2338
2357
|
"type": [
|
|
2339
2358
|
"object",
|
|
2340
2359
|
"null"
|
|
@@ -2472,7 +2491,7 @@
|
|
|
2472
2491
|
]
|
|
2473
2492
|
},
|
|
2474
2493
|
"LinuxConfig": {
|
|
2475
|
-
"description": "Configuration for Linux bundles.\n\n See more: <https://tauri.app/
|
|
2494
|
+
"description": "Configuration for Linux bundles.\n\n See more: <https://v2.tauri.app/reference/config/#linuxconfig>",
|
|
2476
2495
|
"type": "object",
|
|
2477
2496
|
"properties": {
|
|
2478
2497
|
"appimage": {
|
|
@@ -2515,7 +2534,7 @@
|
|
|
2515
2534
|
"additionalProperties": false
|
|
2516
2535
|
},
|
|
2517
2536
|
"AppImageConfig": {
|
|
2518
|
-
"description": "Configuration for AppImage bundles.\n\n See more: <https://tauri.app/
|
|
2537
|
+
"description": "Configuration for AppImage bundles.\n\n See more: <https://v2.tauri.app/reference/config/#appimageconfig>",
|
|
2519
2538
|
"type": "object",
|
|
2520
2539
|
"properties": {
|
|
2521
2540
|
"bundleMediaFramework": {
|
|
@@ -2535,7 +2554,7 @@
|
|
|
2535
2554
|
"additionalProperties": false
|
|
2536
2555
|
},
|
|
2537
2556
|
"DebConfig": {
|
|
2538
|
-
"description": "Configuration for Debian (.deb) bundles.\n\n See more: <https://tauri.app/
|
|
2557
|
+
"description": "Configuration for Debian (.deb) bundles.\n\n See more: <https://v2.tauri.app/reference/config/#debconfig>",
|
|
2539
2558
|
"type": "object",
|
|
2540
2559
|
"properties": {
|
|
2541
2560
|
"depends": {
|
|
@@ -2748,7 +2767,7 @@
|
|
|
2748
2767
|
"additionalProperties": false
|
|
2749
2768
|
},
|
|
2750
2769
|
"MacConfig": {
|
|
2751
|
-
"description": "Configuration for the macOS bundles.\n\n See more: <https://tauri.app/
|
|
2770
|
+
"description": "Configuration for the macOS bundles.\n\n See more: <https://v2.tauri.app/reference/config/#macconfig>",
|
|
2752
2771
|
"type": "object",
|
|
2753
2772
|
"properties": {
|
|
2754
2773
|
"frameworks": {
|
|
@@ -2836,7 +2855,7 @@
|
|
|
2836
2855
|
"additionalProperties": false
|
|
2837
2856
|
},
|
|
2838
2857
|
"DmgConfig": {
|
|
2839
|
-
"description": "Configuration for Apple Disk Image (.dmg) bundles.\n\n See more: <https://tauri.app/
|
|
2858
|
+
"description": "Configuration for Apple Disk Image (.dmg) bundles.\n\n See more: <https://v2.tauri.app/reference/config/#dmgconfig>",
|
|
2840
2859
|
"type": "object",
|
|
2841
2860
|
"properties": {
|
|
2842
2861
|
"background": {
|
|
@@ -3003,7 +3022,7 @@
|
|
|
3003
3022
|
"additionalProperties": false
|
|
3004
3023
|
},
|
|
3005
3024
|
"PluginConfig": {
|
|
3006
|
-
"description": "The plugin configs holds a HashMap mapping a plugin name to its configuration object.\n\n See more: <https://tauri.app/
|
|
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>",
|
|
3007
3026
|
"type": "object",
|
|
3008
3027
|
"additionalProperties": true
|
|
3009
3028
|
}
|
package/main.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tauri-apps/cli",
|
|
3
|
-
"version": "2.0.0-rc.
|
|
3
|
+
"version": "2.0.0-rc.17",
|
|
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
|
-
"
|
|
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
|
|
58
|
-
"
|
|
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.
|
|
67
|
-
"@tauri-apps/cli-darwin-x64": "2.0.0-rc.
|
|
68
|
-
"@tauri-apps/cli-linux-x64-gnu": "2.0.0-rc.
|
|
69
|
-
"@tauri-apps/cli-darwin-arm64": "2.0.0-rc.
|
|
70
|
-
"@tauri-apps/cli-linux-arm64-gnu": "2.0.0-rc.
|
|
71
|
-
"@tauri-apps/cli-linux-arm64-musl": "2.0.0-rc.
|
|
72
|
-
"@tauri-apps/cli-linux-arm-gnueabihf": "2.0.0-rc.
|
|
73
|
-
"@tauri-apps/cli-linux-x64-musl": "2.0.0-rc.
|
|
74
|
-
"@tauri-apps/cli-win32-ia32-msvc": "2.0.0-rc.
|
|
75
|
-
"@tauri-apps/cli-win32-arm64-msvc": "2.0.0-rc.
|
|
65
|
+
"@tauri-apps/cli-win32-x64-msvc": "2.0.0-rc.17",
|
|
66
|
+
"@tauri-apps/cli-darwin-x64": "2.0.0-rc.17",
|
|
67
|
+
"@tauri-apps/cli-linux-x64-gnu": "2.0.0-rc.17",
|
|
68
|
+
"@tauri-apps/cli-darwin-arm64": "2.0.0-rc.17",
|
|
69
|
+
"@tauri-apps/cli-linux-arm64-gnu": "2.0.0-rc.17",
|
|
70
|
+
"@tauri-apps/cli-linux-arm64-musl": "2.0.0-rc.17",
|
|
71
|
+
"@tauri-apps/cli-linux-arm-gnueabihf": "2.0.0-rc.17",
|
|
72
|
+
"@tauri-apps/cli-linux-x64-musl": "2.0.0-rc.17",
|
|
73
|
+
"@tauri-apps/cli-win32-ia32-msvc": "2.0.0-rc.17",
|
|
74
|
+
"@tauri-apps/cli-win32-arm64-msvc": "2.0.0-rc.17"
|
|
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
|
-
}
|