@tauri-apps/cli 2.10.0 → 2.11.0
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 +52 -0
- package/config.schema.json +100 -7
- package/index.js +218 -35
- package/package.json +15 -15
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,57 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## \[2.11.0]
|
|
4
|
+
|
|
5
|
+
### New Features
|
|
6
|
+
|
|
7
|
+
- [`926a57bb0`](https://www.github.com/tauri-apps/tauri/commit/926a57bb0851e45d47ad1ee68fc96a9c25754c7c) ([#15201](https://www.github.com/tauri-apps/tauri/pull/15201)) Added uninstaller icon and uninstaller header image support for NSIS installer.
|
|
8
|
+
|
|
9
|
+
Notes:
|
|
10
|
+
|
|
11
|
+
- For `tauri-bundler` lib users, the `NsisSettings` now has 2 new fields `uninstaller_icon` and `uninstaller_header_image` which can be a breaking change
|
|
12
|
+
- When bundling with NSIS, users can add `uninstallerIcon` and `uninstallerHeaderImage` under `bundle > windows > nsis` to configure them.
|
|
13
|
+
- [`764b9139a`](https://www.github.com/tauri-apps/tauri/commit/764b9139a32de149d8a914a6b5ec6cd1937c64eb) ([#14313](https://www.github.com/tauri-apps/tauri/pull/14313)) Prompt to restart the Android emulator if it is not connected to adb.
|
|
14
|
+
- [`5dc2cee60`](https://www.github.com/tauri-apps/tauri/commit/5dc2cee60370665af88c185684432e425b1c987d) ([#14793](https://www.github.com/tauri-apps/tauri/pull/14793)) Added support for `minimumWebview2Version` option support for the MSI (Wix) installer, the old `bundle > windows > nsis > minimumWebview2Version` is now deprecated in favor of `bundle > windows > minimumWebview2Version`
|
|
15
|
+
|
|
16
|
+
Notes:
|
|
17
|
+
|
|
18
|
+
- For anyone relying on the `WVRTINSTALLED` `Property` tag in `main.wxs`, it is now renamed to `INSTALLED_WEBVIEW2_VERSION`
|
|
19
|
+
- For `tauri-bundler` lib users, the `WindowsSettings` now has a new field `minimum_webview2_version` which can be a breaking change
|
|
20
|
+
|
|
21
|
+
### Enhancements
|
|
22
|
+
|
|
23
|
+
- [`be0e4bd2d`](https://www.github.com/tauri-apps/tauri/commit/be0e4bd2da02eb6cc75a8dc7c81663277e64c590) ([#15218](https://www.github.com/tauri-apps/tauri/pull/15218)) Added Vietnamese translations for the NSIS installer
|
|
24
|
+
- [`8718d0816`](https://www.github.com/tauri-apps/tauri/commit/8718d08163f074dfc53387ebd1d823f9c28280ee) ([#15033](https://www.github.com/tauri-apps/tauri/pull/15033)) Show the context before prompting for updater signing key password
|
|
25
|
+
|
|
26
|
+
### Bug Fixes
|
|
27
|
+
|
|
28
|
+
- [`fcb702ec4`](https://www.github.com/tauri-apps/tauri/commit/fcb702ec4d924e81943efaeebea8d3edb7289c33) ([#14954](https://www.github.com/tauri-apps/tauri/pull/14954)) Fix `build --bundles` to allow `nsis` arg in linux+macOS
|
|
29
|
+
- [`80c1425af`](https://www.github.com/tauri-apps/tauri/commit/80c1425af86058b1fc9489a30f778b6288d79b6b) ([#14921](https://www.github.com/tauri-apps/tauri/pull/14921)) Fix iOS build failure when `Metal Toolchain` is installed by using explicit `$(DEVELOPER_DIR)/Toolchains/XcodeDefault.xctoolchain` path instead of `$(TOOLCHAIN_DIR)` for Swift library search paths.
|
|
30
|
+
|
|
31
|
+
### What's Changed
|
|
32
|
+
|
|
33
|
+
- [`9979cde1c`](https://www.github.com/tauri-apps/tauri/commit/9979cde1c5534dafb1a07cc4dc2bc280d15d2f66) ([#15175](https://www.github.com/tauri-apps/tauri/pull/15175)) Update NSIS installer Italian translations
|
|
34
|
+
|
|
35
|
+
### Dependencies
|
|
36
|
+
|
|
37
|
+
- Upgraded to `tauri-cli@2.11.0`
|
|
38
|
+
|
|
39
|
+
## \[2.10.1]
|
|
40
|
+
|
|
41
|
+
### Bug Fixes
|
|
42
|
+
|
|
43
|
+
- [`35c35f27a`](https://www.github.com/tauri-apps/tauri/commit/35c35f27aedc430b602ec74059b271128c15ad36) ([#14931](https://www.github.com/tauri-apps/tauri/pull/14931) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Support comma-separated list of Cargo features on all commands.
|
|
44
|
+
- [`0d1cb83ba`](https://www.github.com/tauri-apps/tauri/commit/0d1cb83bab2aa482c7d73116893fd7ff6aa56283) ([#14932](https://www.github.com/tauri-apps/tauri/pull/14932) by [@lucasfernog](https://www.github.com/tauri-apps/tauri/../../lucasfernog)) Fix missing Cargo args when running mobile dev and build commands.
|
|
45
|
+
- [`33754ae5e`](https://www.github.com/tauri-apps/tauri/commit/33754ae5e3740d022483b6164511c5c001a3c24b) ([#15022](https://www.github.com/tauri-apps/tauri/pull/15022) by [@Legend-Master](https://www.github.com/tauri-apps/tauri/../../Legend-Master)) Fix updater signing private keys generated using `tauri signer generate` with empty password can't be used (The keys generated during tauri were broken between v2.9.3 and v2.10.0, you'll need to regenerate them)
|
|
46
|
+
|
|
47
|
+
### What's Changed
|
|
48
|
+
|
|
49
|
+
- [`7be58a1c6`](https://www.github.com/tauri-apps/tauri/commit/7be58a1c643a7ed6d0f484a7e1134022618eb2b2) ([#14894](https://www.github.com/tauri-apps/tauri/pull/14894) by [@Legend-Master](https://www.github.com/tauri-apps/tauri/../../Legend-Master)) Log patching bundle type information again
|
|
50
|
+
|
|
51
|
+
### Dependencies
|
|
52
|
+
|
|
53
|
+
- Upgraded to `tauri-cli@2.10.1`
|
|
54
|
+
|
|
3
55
|
## \[2.10.0]
|
|
4
56
|
|
|
5
57
|
### Enhancements
|
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.
|
|
3
|
+
"$id": "https://schema.tauri.app/config/2.11.0",
|
|
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\": \"http://localhost:3000\",\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",
|
|
@@ -131,6 +131,7 @@
|
|
|
131
131
|
"allowDowngrades": true,
|
|
132
132
|
"certificateThumbprint": null,
|
|
133
133
|
"digestAlgorithm": null,
|
|
134
|
+
"minimumWebview2Version": null,
|
|
134
135
|
"nsis": null,
|
|
135
136
|
"signCommand": null,
|
|
136
137
|
"timestampUrl": null,
|
|
@@ -549,7 +550,7 @@
|
|
|
549
550
|
]
|
|
550
551
|
},
|
|
551
552
|
"backgroundThrottling": {
|
|
552
|
-
"description": "Change the default background throttling behaviour.\n\n By default, browsers use a suspend policy that will throttle timers and even unload\n the whole tab (view) to free resources after roughly 5 minutes when a view became\n minimized or hidden. This will pause all tasks until the documents visibility state\n changes back from hidden to visible by bringing the view back to the foreground.\n\n ## Platform-specific\n\n - **Linux / Windows / Android**: Unsupported. Workarounds like a pending WebLock transaction might suffice.\n - **iOS**: Supported since version 17.0+.\n - **macOS**: Supported since version 14.0+.\n\n see https://github.com/tauri-apps/tauri/issues/5250#issuecomment-2569380578",
|
|
553
|
+
"description": "Change the default background throttling behaviour.\n\n By default, browsers use a suspend policy that will throttle timers and even unload\n the whole tab (view) to free resources after roughly 5 minutes when a view became\n minimized or hidden. This will pause all tasks until the documents visibility state\n changes back from hidden to visible by bringing the view back to the foreground.\n\n ## Platform-specific\n\n - **Linux / Windows / Android**: Unsupported. Workarounds like a pending WebLock transaction might suffice.\n - **iOS**: Supported since version 17.0+.\n - **macOS**: Supported since version 14.0+.\n\n see <https://github.com/tauri-apps/tauri/issues/5250#issuecomment-2569380578>",
|
|
553
554
|
"anyOf": [
|
|
554
555
|
{
|
|
555
556
|
"$ref": "#/definitions/BackgroundThrottlingPolicy"
|
|
@@ -603,6 +604,32 @@
|
|
|
603
604
|
"$ref": "#/definitions/ScrollBarStyle"
|
|
604
605
|
}
|
|
605
606
|
]
|
|
607
|
+
},
|
|
608
|
+
"activityName": {
|
|
609
|
+
"description": "The name of the Android activity to create for this window.",
|
|
610
|
+
"type": [
|
|
611
|
+
"string",
|
|
612
|
+
"null"
|
|
613
|
+
]
|
|
614
|
+
},
|
|
615
|
+
"createdByActivityName": {
|
|
616
|
+
"description": "The name of the Android activity that is creating this webview window.\n\n This is important to determine which stack the activity will belong to.",
|
|
617
|
+
"type": [
|
|
618
|
+
"string",
|
|
619
|
+
"null"
|
|
620
|
+
]
|
|
621
|
+
},
|
|
622
|
+
"requestedBySceneIdentifier": {
|
|
623
|
+
"description": "Sets the identifier of the scene that is requesting the new scene,\n establishing a relationship between the two scenes.\n\n By default the system uses the foreground scene.",
|
|
624
|
+
"type": [
|
|
625
|
+
"string",
|
|
626
|
+
"null"
|
|
627
|
+
]
|
|
628
|
+
},
|
|
629
|
+
"generalAutofillEnabled": {
|
|
630
|
+
"description": "Controls the WebView's browser-level general autofill behavior.\n\n **This option does not disable password or credit card autofill.**\n\n When set to `false`, the WebView will not automatically populate\n general form fields using previously stored data such as addresses\n or contact information.\n\n If not specified, this is `true` by default.\n\n ## Platform-specific\n\n - **Windows**: Supported. WebView2's autofill feature (called\n \"Suggestions\") may not honor `autocomplete=\"off\"` on input\n elements in some cases.\n - **Linux / Android / iOS / macOS**: Unsupported and performs no\n operation.",
|
|
631
|
+
"default": true,
|
|
632
|
+
"type": "boolean"
|
|
606
633
|
}
|
|
607
634
|
},
|
|
608
635
|
"additionalProperties": false
|
|
@@ -1133,7 +1160,7 @@
|
|
|
1133
1160
|
]
|
|
1134
1161
|
},
|
|
1135
1162
|
{
|
|
1136
|
-
"description": "Fluent UI style overlay scrollbars. **Windows Only**\n\n Requires WebView2 Runtime version 125.0.2535.41 or higher, does nothing on older versions,\n see https://learn.microsoft.com/en-us/microsoft-edge/webview2/release-notes/?tabs=dotnetcsharp#10253541",
|
|
1163
|
+
"description": "Fluent UI style overlay scrollbars. **Windows Only**\n\n Requires WebView2 Runtime version 125.0.2535.41 or higher, does nothing on older versions,\n see <https://learn.microsoft.com/en-us/microsoft-edge/webview2/release-notes/?tabs=dotnetcsharp#10253541>",
|
|
1137
1164
|
"type": "string",
|
|
1138
1165
|
"enum": [
|
|
1139
1166
|
"fluentOverlay"
|
|
@@ -2204,6 +2231,7 @@
|
|
|
2204
2231
|
"allowDowngrades": true,
|
|
2205
2232
|
"certificateThumbprint": null,
|
|
2206
2233
|
"digestAlgorithm": null,
|
|
2234
|
+
"minimumWebview2Version": null,
|
|
2207
2235
|
"nsis": null,
|
|
2208
2236
|
"signCommand": null,
|
|
2209
2237
|
"timestampUrl": null,
|
|
@@ -2469,7 +2497,7 @@
|
|
|
2469
2497
|
]
|
|
2470
2498
|
},
|
|
2471
2499
|
"mimeType": {
|
|
2472
|
-
"description": "The mime-type e.g. 'image/png' or 'text/plain'
|
|
2500
|
+
"description": "The mime-type of the association, e.g. `'image/png'` or `'text/plain'`.\n\n - **Linux**: written as `MimeType=` in the `.desktop` file.\n - **macOS / iOS**: added as `public.mime-type` in the `UTTypeTagSpecification` dictionary of\n the `UTExportedTypeDeclarations` entry in `Info.plist`.\n - **Android**: used as `android:mimeType` in the `<data>` element of an `<intent-filter>`\n in `AndroidManifest.xml`.",
|
|
2473
2501
|
"type": [
|
|
2474
2502
|
"string",
|
|
2475
2503
|
"null"
|
|
@@ -2494,6 +2522,16 @@
|
|
|
2494
2522
|
"type": "null"
|
|
2495
2523
|
}
|
|
2496
2524
|
]
|
|
2525
|
+
},
|
|
2526
|
+
"androidIntentActionFilters": {
|
|
2527
|
+
"description": "Intent action filters for this file association.\n\n By default all filters are used.",
|
|
2528
|
+
"type": [
|
|
2529
|
+
"array",
|
|
2530
|
+
"null"
|
|
2531
|
+
],
|
|
2532
|
+
"items": {
|
|
2533
|
+
"$ref": "#/definitions/AndroidIntentAction"
|
|
2534
|
+
}
|
|
2497
2535
|
}
|
|
2498
2536
|
},
|
|
2499
2537
|
"additionalProperties": false
|
|
@@ -2599,6 +2637,32 @@
|
|
|
2599
2637
|
},
|
|
2600
2638
|
"additionalProperties": false
|
|
2601
2639
|
},
|
|
2640
|
+
"AndroidIntentAction": {
|
|
2641
|
+
"description": "Android intent action.",
|
|
2642
|
+
"oneOf": [
|
|
2643
|
+
{
|
|
2644
|
+
"description": "ACTION_SEND.\n\n <https://developer.android.com/reference/android/content/Intent#ACTION_SEND>",
|
|
2645
|
+
"type": "string",
|
|
2646
|
+
"enum": [
|
|
2647
|
+
"send"
|
|
2648
|
+
]
|
|
2649
|
+
},
|
|
2650
|
+
{
|
|
2651
|
+
"description": "ACTION_SEND_MULTIPLE.\n\n <https://developer.android.com/reference/android/content/Intent#ACTION_SEND_MULTIPLE>",
|
|
2652
|
+
"type": "string",
|
|
2653
|
+
"enum": [
|
|
2654
|
+
"sendMultiple"
|
|
2655
|
+
]
|
|
2656
|
+
},
|
|
2657
|
+
{
|
|
2658
|
+
"description": "ACTION_VIEW.\n\n <https://developer.android.com/reference/android/content/Intent#ACTION_SEND>",
|
|
2659
|
+
"type": "string",
|
|
2660
|
+
"enum": [
|
|
2661
|
+
"view"
|
|
2662
|
+
]
|
|
2663
|
+
}
|
|
2664
|
+
]
|
|
2665
|
+
},
|
|
2602
2666
|
"WindowsConfig": {
|
|
2603
2667
|
"description": "Windows bundler configuration.\n\n See more: <https://v2.tauri.app/reference/config/#windowsconfig>",
|
|
2604
2668
|
"type": "object",
|
|
@@ -2646,6 +2710,13 @@
|
|
|
2646
2710
|
"default": true,
|
|
2647
2711
|
"type": "boolean"
|
|
2648
2712
|
},
|
|
2713
|
+
"minimumWebview2Version": {
|
|
2714
|
+
"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.",
|
|
2715
|
+
"type": [
|
|
2716
|
+
"string",
|
|
2717
|
+
"null"
|
|
2718
|
+
]
|
|
2719
|
+
},
|
|
2649
2720
|
"wix": {
|
|
2650
2721
|
"description": "Configuration for the MSI generated with WiX.",
|
|
2651
2722
|
"anyOf": [
|
|
@@ -2966,6 +3037,20 @@
|
|
|
2966
3037
|
"null"
|
|
2967
3038
|
]
|
|
2968
3039
|
},
|
|
3040
|
+
"uninstallerIcon": {
|
|
3041
|
+
"description": "The path to an icon file used as the uninstaller icon.",
|
|
3042
|
+
"type": [
|
|
3043
|
+
"string",
|
|
3044
|
+
"null"
|
|
3045
|
+
]
|
|
3046
|
+
},
|
|
3047
|
+
"uninstallerHeaderImage": {
|
|
3048
|
+
"description": "The path to a bitmap file to display on the header of uninstallers pages.\n Defaults to [`Self::header_image`]. If this is set but [`Self::header_image`] is not, a default image from NSIS will be applied to `header_image`\n\n The recommended dimensions are 150px x 57px.",
|
|
3049
|
+
"type": [
|
|
3050
|
+
"string",
|
|
3051
|
+
"null"
|
|
3052
|
+
]
|
|
3053
|
+
},
|
|
2969
3054
|
"installMode": {
|
|
2970
3055
|
"description": "Whether the installation will be for all users or just the current user.",
|
|
2971
3056
|
"default": "currentUser",
|
|
@@ -2976,7 +3061,7 @@
|
|
|
2976
3061
|
]
|
|
2977
3062
|
},
|
|
2978
3063
|
"languages": {
|
|
2979
|
-
"description": "A list of installer languages.\n By default the OS language is used. If the OS language is not in the list of languages, the first language will be used.\n To allow the user to select the language, set `display_language_selector` to `true`.\n\n See <https://github.com/kichik/nsis/tree/9465c08046f00ccb6eda985abbdbf52c275c6c4d/Contrib/Language%20files> for the complete list of languages.",
|
|
3064
|
+
"description": "A list of installer languages. Default to `[\"English\"]` if not set.\n\n By default the OS language is used. If the OS language is not in the list of languages, the first language will be used.\n To allow the user to select the language, set `display_language_selector` to `true`.\n\n See <https://github.com/kichik/nsis/tree/9465c08046f00ccb6eda985abbdbf52c275c6c4d/Contrib/Language%20files> for the complete list of languages.",
|
|
2980
3065
|
"type": [
|
|
2981
3066
|
"array",
|
|
2982
3067
|
"null"
|
|
@@ -2986,7 +3071,7 @@
|
|
|
2986
3071
|
}
|
|
2987
3072
|
},
|
|
2988
3073
|
"customLanguageFiles": {
|
|
2989
|
-
"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 [`
|
|
3074
|
+
"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 the [`Self::languages`] array,",
|
|
2990
3075
|
"type": [
|
|
2991
3076
|
"object",
|
|
2992
3077
|
"null"
|
|
@@ -3024,7 +3109,8 @@
|
|
|
3024
3109
|
]
|
|
3025
3110
|
},
|
|
3026
3111
|
"minimumWebview2Version": {
|
|
3027
|
-
"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.",
|
|
3112
|
+
"description": "Deprecated: use [`WindowsConfig::minimum_webview2_version`] (`bundle > windows > minimumWebview2Version`) instead.\n\n 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.",
|
|
3113
|
+
"deprecated": true,
|
|
3028
3114
|
"type": [
|
|
3029
3115
|
"string",
|
|
3030
3116
|
"null"
|
|
@@ -3833,6 +3919,13 @@
|
|
|
3833
3919
|
"description": "Whether to automatically increment the `versionCode` on each build.\n\n - If `true`, the generator will try to read the last `versionCode` from\n `tauri.properties` and increment it by 1 for every build.\n - If `false` or not set, it falls back to `version_code` or semver-derived logic.\n\n Note that to use this feature, you should remove `/tauri.properties` from `src-tauri/gen/android/app/.gitignore` so the current versionCode is committed to the repository.",
|
|
3834
3920
|
"default": false,
|
|
3835
3921
|
"type": "boolean"
|
|
3922
|
+
},
|
|
3923
|
+
"debugApplicationIdSuffix": {
|
|
3924
|
+
"description": "Application ID suffix to append for debug builds.\n This allows installing debug and release versions side-by-side on the same device.\n Example: \".debug\" will make debug builds use \"com.example.app.debug\" as the application ID.",
|
|
3925
|
+
"type": [
|
|
3926
|
+
"string",
|
|
3927
|
+
"null"
|
|
3928
|
+
]
|
|
3836
3929
|
}
|
|
3837
3930
|
},
|
|
3838
3931
|
"additionalProperties": false
|
package/index.js
CHANGED
|
@@ -7,9 +7,6 @@
|
|
|
7
7
|
// @ts-nocheck
|
|
8
8
|
/* auto-generated by NAPI-RS */
|
|
9
9
|
|
|
10
|
-
const { createRequire } = require('node:module')
|
|
11
|
-
require = createRequire(__filename)
|
|
12
|
-
|
|
13
10
|
const { readFileSync } = require('node:fs')
|
|
14
11
|
let nativeBinding = null
|
|
15
12
|
const loadErrors = []
|
|
@@ -70,7 +67,7 @@ const isMuslFromChildProcess = () => {
|
|
|
70
67
|
function requireNative() {
|
|
71
68
|
if (process.env.NAPI_RS_NATIVE_LIBRARY_PATH) {
|
|
72
69
|
try {
|
|
73
|
-
|
|
70
|
+
return require(process.env.NAPI_RS_NATIVE_LIBRARY_PATH);
|
|
74
71
|
} catch (err) {
|
|
75
72
|
loadErrors.push(err)
|
|
76
73
|
}
|
|
@@ -82,7 +79,12 @@ function requireNative() {
|
|
|
82
79
|
loadErrors.push(e)
|
|
83
80
|
}
|
|
84
81
|
try {
|
|
85
|
-
|
|
82
|
+
const binding = require('@tauri-apps/cli-android-arm64')
|
|
83
|
+
const bindingPackageVersion = require('@tauri-apps/cli-android-arm64/package.json').version
|
|
84
|
+
if (bindingPackageVersion !== '2.10.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
85
|
+
throw new Error(`Native binding package version mismatch, expected 2.10.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
86
|
+
}
|
|
87
|
+
return binding
|
|
86
88
|
} catch (e) {
|
|
87
89
|
loadErrors.push(e)
|
|
88
90
|
}
|
|
@@ -93,7 +95,12 @@ function requireNative() {
|
|
|
93
95
|
loadErrors.push(e)
|
|
94
96
|
}
|
|
95
97
|
try {
|
|
96
|
-
|
|
98
|
+
const binding = require('@tauri-apps/cli-android-arm-eabi')
|
|
99
|
+
const bindingPackageVersion = require('@tauri-apps/cli-android-arm-eabi/package.json').version
|
|
100
|
+
if (bindingPackageVersion !== '2.10.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
101
|
+
throw new Error(`Native binding package version mismatch, expected 2.10.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
102
|
+
}
|
|
103
|
+
return binding
|
|
97
104
|
} catch (e) {
|
|
98
105
|
loadErrors.push(e)
|
|
99
106
|
}
|
|
@@ -102,16 +109,39 @@ function requireNative() {
|
|
|
102
109
|
}
|
|
103
110
|
} else if (process.platform === 'win32') {
|
|
104
111
|
if (process.arch === 'x64') {
|
|
112
|
+
if (process.config?.variables?.shlib_suffix === 'dll.a' || process.config?.variables?.node_target_type === 'shared_library') {
|
|
113
|
+
try {
|
|
114
|
+
return require('./cli.win32-x64-gnu.node')
|
|
115
|
+
} catch (e) {
|
|
116
|
+
loadErrors.push(e)
|
|
117
|
+
}
|
|
105
118
|
try {
|
|
119
|
+
const binding = require('@tauri-apps/cli-win32-x64-gnu')
|
|
120
|
+
const bindingPackageVersion = require('@tauri-apps/cli-win32-x64-gnu/package.json').version
|
|
121
|
+
if (bindingPackageVersion !== '2.10.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
122
|
+
throw new Error(`Native binding package version mismatch, expected 2.10.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
123
|
+
}
|
|
124
|
+
return binding
|
|
125
|
+
} catch (e) {
|
|
126
|
+
loadErrors.push(e)
|
|
127
|
+
}
|
|
128
|
+
} else {
|
|
129
|
+
try {
|
|
106
130
|
return require('./cli.win32-x64-msvc.node')
|
|
107
131
|
} catch (e) {
|
|
108
132
|
loadErrors.push(e)
|
|
109
133
|
}
|
|
110
134
|
try {
|
|
111
|
-
|
|
135
|
+
const binding = require('@tauri-apps/cli-win32-x64-msvc')
|
|
136
|
+
const bindingPackageVersion = require('@tauri-apps/cli-win32-x64-msvc/package.json').version
|
|
137
|
+
if (bindingPackageVersion !== '2.10.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
138
|
+
throw new Error(`Native binding package version mismatch, expected 2.10.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
139
|
+
}
|
|
140
|
+
return binding
|
|
112
141
|
} catch (e) {
|
|
113
142
|
loadErrors.push(e)
|
|
114
143
|
}
|
|
144
|
+
}
|
|
115
145
|
} else if (process.arch === 'ia32') {
|
|
116
146
|
try {
|
|
117
147
|
return require('./cli.win32-ia32-msvc.node')
|
|
@@ -119,7 +149,12 @@ function requireNative() {
|
|
|
119
149
|
loadErrors.push(e)
|
|
120
150
|
}
|
|
121
151
|
try {
|
|
122
|
-
|
|
152
|
+
const binding = require('@tauri-apps/cli-win32-ia32-msvc')
|
|
153
|
+
const bindingPackageVersion = require('@tauri-apps/cli-win32-ia32-msvc/package.json').version
|
|
154
|
+
if (bindingPackageVersion !== '2.10.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
155
|
+
throw new Error(`Native binding package version mismatch, expected 2.10.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
156
|
+
}
|
|
157
|
+
return binding
|
|
123
158
|
} catch (e) {
|
|
124
159
|
loadErrors.push(e)
|
|
125
160
|
}
|
|
@@ -130,7 +165,12 @@ function requireNative() {
|
|
|
130
165
|
loadErrors.push(e)
|
|
131
166
|
}
|
|
132
167
|
try {
|
|
133
|
-
|
|
168
|
+
const binding = require('@tauri-apps/cli-win32-arm64-msvc')
|
|
169
|
+
const bindingPackageVersion = require('@tauri-apps/cli-win32-arm64-msvc/package.json').version
|
|
170
|
+
if (bindingPackageVersion !== '2.10.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
171
|
+
throw new Error(`Native binding package version mismatch, expected 2.10.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
172
|
+
}
|
|
173
|
+
return binding
|
|
134
174
|
} catch (e) {
|
|
135
175
|
loadErrors.push(e)
|
|
136
176
|
}
|
|
@@ -144,7 +184,12 @@ function requireNative() {
|
|
|
144
184
|
loadErrors.push(e)
|
|
145
185
|
}
|
|
146
186
|
try {
|
|
147
|
-
|
|
187
|
+
const binding = require('@tauri-apps/cli-darwin-universal')
|
|
188
|
+
const bindingPackageVersion = require('@tauri-apps/cli-darwin-universal/package.json').version
|
|
189
|
+
if (bindingPackageVersion !== '2.10.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
190
|
+
throw new Error(`Native binding package version mismatch, expected 2.10.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
191
|
+
}
|
|
192
|
+
return binding
|
|
148
193
|
} catch (e) {
|
|
149
194
|
loadErrors.push(e)
|
|
150
195
|
}
|
|
@@ -155,7 +200,12 @@ function requireNative() {
|
|
|
155
200
|
loadErrors.push(e)
|
|
156
201
|
}
|
|
157
202
|
try {
|
|
158
|
-
|
|
203
|
+
const binding = require('@tauri-apps/cli-darwin-x64')
|
|
204
|
+
const bindingPackageVersion = require('@tauri-apps/cli-darwin-x64/package.json').version
|
|
205
|
+
if (bindingPackageVersion !== '2.10.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
206
|
+
throw new Error(`Native binding package version mismatch, expected 2.10.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
207
|
+
}
|
|
208
|
+
return binding
|
|
159
209
|
} catch (e) {
|
|
160
210
|
loadErrors.push(e)
|
|
161
211
|
}
|
|
@@ -166,7 +216,12 @@ function requireNative() {
|
|
|
166
216
|
loadErrors.push(e)
|
|
167
217
|
}
|
|
168
218
|
try {
|
|
169
|
-
|
|
219
|
+
const binding = require('@tauri-apps/cli-darwin-arm64')
|
|
220
|
+
const bindingPackageVersion = require('@tauri-apps/cli-darwin-arm64/package.json').version
|
|
221
|
+
if (bindingPackageVersion !== '2.10.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
222
|
+
throw new Error(`Native binding package version mismatch, expected 2.10.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
223
|
+
}
|
|
224
|
+
return binding
|
|
170
225
|
} catch (e) {
|
|
171
226
|
loadErrors.push(e)
|
|
172
227
|
}
|
|
@@ -181,7 +236,12 @@ function requireNative() {
|
|
|
181
236
|
loadErrors.push(e)
|
|
182
237
|
}
|
|
183
238
|
try {
|
|
184
|
-
|
|
239
|
+
const binding = require('@tauri-apps/cli-freebsd-x64')
|
|
240
|
+
const bindingPackageVersion = require('@tauri-apps/cli-freebsd-x64/package.json').version
|
|
241
|
+
if (bindingPackageVersion !== '2.10.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
242
|
+
throw new Error(`Native binding package version mismatch, expected 2.10.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
243
|
+
}
|
|
244
|
+
return binding
|
|
185
245
|
} catch (e) {
|
|
186
246
|
loadErrors.push(e)
|
|
187
247
|
}
|
|
@@ -192,7 +252,12 @@ function requireNative() {
|
|
|
192
252
|
loadErrors.push(e)
|
|
193
253
|
}
|
|
194
254
|
try {
|
|
195
|
-
|
|
255
|
+
const binding = require('@tauri-apps/cli-freebsd-arm64')
|
|
256
|
+
const bindingPackageVersion = require('@tauri-apps/cli-freebsd-arm64/package.json').version
|
|
257
|
+
if (bindingPackageVersion !== '2.10.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
258
|
+
throw new Error(`Native binding package version mismatch, expected 2.10.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
259
|
+
}
|
|
260
|
+
return binding
|
|
196
261
|
} catch (e) {
|
|
197
262
|
loadErrors.push(e)
|
|
198
263
|
}
|
|
@@ -208,7 +273,12 @@ function requireNative() {
|
|
|
208
273
|
loadErrors.push(e)
|
|
209
274
|
}
|
|
210
275
|
try {
|
|
211
|
-
|
|
276
|
+
const binding = require('@tauri-apps/cli-linux-x64-musl')
|
|
277
|
+
const bindingPackageVersion = require('@tauri-apps/cli-linux-x64-musl/package.json').version
|
|
278
|
+
if (bindingPackageVersion !== '2.10.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
279
|
+
throw new Error(`Native binding package version mismatch, expected 2.10.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
280
|
+
}
|
|
281
|
+
return binding
|
|
212
282
|
} catch (e) {
|
|
213
283
|
loadErrors.push(e)
|
|
214
284
|
}
|
|
@@ -219,7 +289,12 @@ function requireNative() {
|
|
|
219
289
|
loadErrors.push(e)
|
|
220
290
|
}
|
|
221
291
|
try {
|
|
222
|
-
|
|
292
|
+
const binding = require('@tauri-apps/cli-linux-x64-gnu')
|
|
293
|
+
const bindingPackageVersion = require('@tauri-apps/cli-linux-x64-gnu/package.json').version
|
|
294
|
+
if (bindingPackageVersion !== '2.10.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
295
|
+
throw new Error(`Native binding package version mismatch, expected 2.10.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
296
|
+
}
|
|
297
|
+
return binding
|
|
223
298
|
} catch (e) {
|
|
224
299
|
loadErrors.push(e)
|
|
225
300
|
}
|
|
@@ -232,7 +307,12 @@ function requireNative() {
|
|
|
232
307
|
loadErrors.push(e)
|
|
233
308
|
}
|
|
234
309
|
try {
|
|
235
|
-
|
|
310
|
+
const binding = require('@tauri-apps/cli-linux-arm64-musl')
|
|
311
|
+
const bindingPackageVersion = require('@tauri-apps/cli-linux-arm64-musl/package.json').version
|
|
312
|
+
if (bindingPackageVersion !== '2.10.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
313
|
+
throw new Error(`Native binding package version mismatch, expected 2.10.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
314
|
+
}
|
|
315
|
+
return binding
|
|
236
316
|
} catch (e) {
|
|
237
317
|
loadErrors.push(e)
|
|
238
318
|
}
|
|
@@ -243,7 +323,12 @@ function requireNative() {
|
|
|
243
323
|
loadErrors.push(e)
|
|
244
324
|
}
|
|
245
325
|
try {
|
|
246
|
-
|
|
326
|
+
const binding = require('@tauri-apps/cli-linux-arm64-gnu')
|
|
327
|
+
const bindingPackageVersion = require('@tauri-apps/cli-linux-arm64-gnu/package.json').version
|
|
328
|
+
if (bindingPackageVersion !== '2.10.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
329
|
+
throw new Error(`Native binding package version mismatch, expected 2.10.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
330
|
+
}
|
|
331
|
+
return binding
|
|
247
332
|
} catch (e) {
|
|
248
333
|
loadErrors.push(e)
|
|
249
334
|
}
|
|
@@ -256,7 +341,12 @@ function requireNative() {
|
|
|
256
341
|
loadErrors.push(e)
|
|
257
342
|
}
|
|
258
343
|
try {
|
|
259
|
-
|
|
344
|
+
const binding = require('@tauri-apps/cli-linux-arm-musleabihf')
|
|
345
|
+
const bindingPackageVersion = require('@tauri-apps/cli-linux-arm-musleabihf/package.json').version
|
|
346
|
+
if (bindingPackageVersion !== '2.10.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
347
|
+
throw new Error(`Native binding package version mismatch, expected 2.10.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
348
|
+
}
|
|
349
|
+
return binding
|
|
260
350
|
} catch (e) {
|
|
261
351
|
loadErrors.push(e)
|
|
262
352
|
}
|
|
@@ -267,7 +357,46 @@ function requireNative() {
|
|
|
267
357
|
loadErrors.push(e)
|
|
268
358
|
}
|
|
269
359
|
try {
|
|
270
|
-
|
|
360
|
+
const binding = require('@tauri-apps/cli-linux-arm-gnueabihf')
|
|
361
|
+
const bindingPackageVersion = require('@tauri-apps/cli-linux-arm-gnueabihf/package.json').version
|
|
362
|
+
if (bindingPackageVersion !== '2.10.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
363
|
+
throw new Error(`Native binding package version mismatch, expected 2.10.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
364
|
+
}
|
|
365
|
+
return binding
|
|
366
|
+
} catch (e) {
|
|
367
|
+
loadErrors.push(e)
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
} else if (process.arch === 'loong64') {
|
|
371
|
+
if (isMusl()) {
|
|
372
|
+
try {
|
|
373
|
+
return require('./cli.linux-loong64-musl.node')
|
|
374
|
+
} catch (e) {
|
|
375
|
+
loadErrors.push(e)
|
|
376
|
+
}
|
|
377
|
+
try {
|
|
378
|
+
const binding = require('@tauri-apps/cli-linux-loong64-musl')
|
|
379
|
+
const bindingPackageVersion = require('@tauri-apps/cli-linux-loong64-musl/package.json').version
|
|
380
|
+
if (bindingPackageVersion !== '2.10.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
381
|
+
throw new Error(`Native binding package version mismatch, expected 2.10.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
382
|
+
}
|
|
383
|
+
return binding
|
|
384
|
+
} catch (e) {
|
|
385
|
+
loadErrors.push(e)
|
|
386
|
+
}
|
|
387
|
+
} else {
|
|
388
|
+
try {
|
|
389
|
+
return require('./cli.linux-loong64-gnu.node')
|
|
390
|
+
} catch (e) {
|
|
391
|
+
loadErrors.push(e)
|
|
392
|
+
}
|
|
393
|
+
try {
|
|
394
|
+
const binding = require('@tauri-apps/cli-linux-loong64-gnu')
|
|
395
|
+
const bindingPackageVersion = require('@tauri-apps/cli-linux-loong64-gnu/package.json').version
|
|
396
|
+
if (bindingPackageVersion !== '2.10.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
397
|
+
throw new Error(`Native binding package version mismatch, expected 2.10.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
398
|
+
}
|
|
399
|
+
return binding
|
|
271
400
|
} catch (e) {
|
|
272
401
|
loadErrors.push(e)
|
|
273
402
|
}
|
|
@@ -280,7 +409,12 @@ function requireNative() {
|
|
|
280
409
|
loadErrors.push(e)
|
|
281
410
|
}
|
|
282
411
|
try {
|
|
283
|
-
|
|
412
|
+
const binding = require('@tauri-apps/cli-linux-riscv64-musl')
|
|
413
|
+
const bindingPackageVersion = require('@tauri-apps/cli-linux-riscv64-musl/package.json').version
|
|
414
|
+
if (bindingPackageVersion !== '2.10.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
415
|
+
throw new Error(`Native binding package version mismatch, expected 2.10.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
416
|
+
}
|
|
417
|
+
return binding
|
|
284
418
|
} catch (e) {
|
|
285
419
|
loadErrors.push(e)
|
|
286
420
|
}
|
|
@@ -291,7 +425,12 @@ function requireNative() {
|
|
|
291
425
|
loadErrors.push(e)
|
|
292
426
|
}
|
|
293
427
|
try {
|
|
294
|
-
|
|
428
|
+
const binding = require('@tauri-apps/cli-linux-riscv64-gnu')
|
|
429
|
+
const bindingPackageVersion = require('@tauri-apps/cli-linux-riscv64-gnu/package.json').version
|
|
430
|
+
if (bindingPackageVersion !== '2.10.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
431
|
+
throw new Error(`Native binding package version mismatch, expected 2.10.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
432
|
+
}
|
|
433
|
+
return binding
|
|
295
434
|
} catch (e) {
|
|
296
435
|
loadErrors.push(e)
|
|
297
436
|
}
|
|
@@ -303,7 +442,12 @@ function requireNative() {
|
|
|
303
442
|
loadErrors.push(e)
|
|
304
443
|
}
|
|
305
444
|
try {
|
|
306
|
-
|
|
445
|
+
const binding = require('@tauri-apps/cli-linux-ppc64-gnu')
|
|
446
|
+
const bindingPackageVersion = require('@tauri-apps/cli-linux-ppc64-gnu/package.json').version
|
|
447
|
+
if (bindingPackageVersion !== '2.10.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
448
|
+
throw new Error(`Native binding package version mismatch, expected 2.10.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
449
|
+
}
|
|
450
|
+
return binding
|
|
307
451
|
} catch (e) {
|
|
308
452
|
loadErrors.push(e)
|
|
309
453
|
}
|
|
@@ -314,7 +458,12 @@ function requireNative() {
|
|
|
314
458
|
loadErrors.push(e)
|
|
315
459
|
}
|
|
316
460
|
try {
|
|
317
|
-
|
|
461
|
+
const binding = require('@tauri-apps/cli-linux-s390x-gnu')
|
|
462
|
+
const bindingPackageVersion = require('@tauri-apps/cli-linux-s390x-gnu/package.json').version
|
|
463
|
+
if (bindingPackageVersion !== '2.10.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
464
|
+
throw new Error(`Native binding package version mismatch, expected 2.10.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
465
|
+
}
|
|
466
|
+
return binding
|
|
318
467
|
} catch (e) {
|
|
319
468
|
loadErrors.push(e)
|
|
320
469
|
}
|
|
@@ -324,34 +473,49 @@ function requireNative() {
|
|
|
324
473
|
} else if (process.platform === 'openharmony') {
|
|
325
474
|
if (process.arch === 'arm64') {
|
|
326
475
|
try {
|
|
327
|
-
return require('./cli.
|
|
476
|
+
return require('./cli.openharmony-arm64.node')
|
|
328
477
|
} catch (e) {
|
|
329
478
|
loadErrors.push(e)
|
|
330
479
|
}
|
|
331
480
|
try {
|
|
332
|
-
|
|
481
|
+
const binding = require('@tauri-apps/cli-openharmony-arm64')
|
|
482
|
+
const bindingPackageVersion = require('@tauri-apps/cli-openharmony-arm64/package.json').version
|
|
483
|
+
if (bindingPackageVersion !== '2.10.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
484
|
+
throw new Error(`Native binding package version mismatch, expected 2.10.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
485
|
+
}
|
|
486
|
+
return binding
|
|
333
487
|
} catch (e) {
|
|
334
488
|
loadErrors.push(e)
|
|
335
489
|
}
|
|
336
490
|
} else if (process.arch === 'x64') {
|
|
337
491
|
try {
|
|
338
|
-
return require('./cli.
|
|
492
|
+
return require('./cli.openharmony-x64.node')
|
|
339
493
|
} catch (e) {
|
|
340
494
|
loadErrors.push(e)
|
|
341
495
|
}
|
|
342
496
|
try {
|
|
343
|
-
|
|
497
|
+
const binding = require('@tauri-apps/cli-openharmony-x64')
|
|
498
|
+
const bindingPackageVersion = require('@tauri-apps/cli-openharmony-x64/package.json').version
|
|
499
|
+
if (bindingPackageVersion !== '2.10.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
500
|
+
throw new Error(`Native binding package version mismatch, expected 2.10.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
501
|
+
}
|
|
502
|
+
return binding
|
|
344
503
|
} catch (e) {
|
|
345
504
|
loadErrors.push(e)
|
|
346
505
|
}
|
|
347
506
|
} else if (process.arch === 'arm') {
|
|
348
507
|
try {
|
|
349
|
-
return require('./cli.
|
|
508
|
+
return require('./cli.openharmony-arm.node')
|
|
350
509
|
} catch (e) {
|
|
351
510
|
loadErrors.push(e)
|
|
352
511
|
}
|
|
353
512
|
try {
|
|
354
|
-
|
|
513
|
+
const binding = require('@tauri-apps/cli-openharmony-arm')
|
|
514
|
+
const bindingPackageVersion = require('@tauri-apps/cli-openharmony-arm/package.json').version
|
|
515
|
+
if (bindingPackageVersion !== '2.10.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
516
|
+
throw new Error(`Native binding package version mismatch, expected 2.10.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
517
|
+
}
|
|
518
|
+
return binding
|
|
355
519
|
} catch (e) {
|
|
356
520
|
loadErrors.push(e)
|
|
357
521
|
}
|
|
@@ -366,22 +530,36 @@ function requireNative() {
|
|
|
366
530
|
nativeBinding = requireNative()
|
|
367
531
|
|
|
368
532
|
if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) {
|
|
533
|
+
let wasiBinding = null
|
|
534
|
+
let wasiBindingError = null
|
|
369
535
|
try {
|
|
370
|
-
|
|
536
|
+
wasiBinding = require('./cli.wasi.cjs')
|
|
537
|
+
nativeBinding = wasiBinding
|
|
371
538
|
} catch (err) {
|
|
372
539
|
if (process.env.NAPI_RS_FORCE_WASI) {
|
|
373
|
-
|
|
540
|
+
wasiBindingError = err
|
|
374
541
|
}
|
|
375
542
|
}
|
|
376
|
-
if (!nativeBinding) {
|
|
543
|
+
if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) {
|
|
377
544
|
try {
|
|
378
|
-
|
|
545
|
+
wasiBinding = require('@tauri-apps/cli-wasm32-wasi')
|
|
546
|
+
nativeBinding = wasiBinding
|
|
379
547
|
} catch (err) {
|
|
380
548
|
if (process.env.NAPI_RS_FORCE_WASI) {
|
|
549
|
+
if (!wasiBindingError) {
|
|
550
|
+
wasiBindingError = err
|
|
551
|
+
} else {
|
|
552
|
+
wasiBindingError.cause = err
|
|
553
|
+
}
|
|
381
554
|
loadErrors.push(err)
|
|
382
555
|
}
|
|
383
556
|
}
|
|
384
557
|
}
|
|
558
|
+
if (process.env.NAPI_RS_FORCE_WASI === 'error' && !wasiBinding) {
|
|
559
|
+
const error = new Error('WASI binding not found and NAPI_RS_FORCE_WASI is set to error')
|
|
560
|
+
error.cause = wasiBindingError
|
|
561
|
+
throw error
|
|
562
|
+
}
|
|
385
563
|
}
|
|
386
564
|
|
|
387
565
|
if (!nativeBinding) {
|
|
@@ -390,7 +568,12 @@ if (!nativeBinding) {
|
|
|
390
568
|
`Cannot find native binding. ` +
|
|
391
569
|
`npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). ` +
|
|
392
570
|
'Please try `npm i` again after removing both package-lock.json and node_modules directory.',
|
|
393
|
-
{
|
|
571
|
+
{
|
|
572
|
+
cause: loadErrors.reduce((err, cur) => {
|
|
573
|
+
cur.cause = err
|
|
574
|
+
return cur
|
|
575
|
+
}),
|
|
576
|
+
},
|
|
394
577
|
)
|
|
395
578
|
}
|
|
396
579
|
throw new Error(`Failed to load native binding`)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tauri-apps/cli",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.11.0",
|
|
4
4
|
"description": "Command line interface for building Tauri apps",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"funding": {
|
|
@@ -41,10 +41,10 @@
|
|
|
41
41
|
]
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@napi-rs/cli": "
|
|
45
|
-
"@types/node": "^24.
|
|
44
|
+
"@napi-rs/cli": "3.4.1",
|
|
45
|
+
"@types/node": "^24.11.0",
|
|
46
46
|
"cross-env": "10.1.0",
|
|
47
|
-
"vitest": "^4.0.
|
|
47
|
+
"vitest": "^4.0.18"
|
|
48
48
|
},
|
|
49
49
|
"engines": {
|
|
50
50
|
"node": ">= 10"
|
|
@@ -65,16 +65,16 @@
|
|
|
65
65
|
"tauri": "node ./tauri.js"
|
|
66
66
|
},
|
|
67
67
|
"optionalDependencies": {
|
|
68
|
-
"@tauri-apps/cli-linux-x64-gnu": "2.
|
|
69
|
-
"@tauri-apps/cli-win32-x64-msvc": "2.
|
|
70
|
-
"@tauri-apps/cli-darwin-x64": "2.
|
|
71
|
-
"@tauri-apps/cli-darwin-arm64": "2.
|
|
72
|
-
"@tauri-apps/cli-linux-arm64-gnu": "2.
|
|
73
|
-
"@tauri-apps/cli-linux-arm64-musl": "2.
|
|
74
|
-
"@tauri-apps/cli-linux-arm-gnueabihf": "2.
|
|
75
|
-
"@tauri-apps/cli-linux-x64-musl": "2.
|
|
76
|
-
"@tauri-apps/cli-linux-riscv64-gnu": "2.
|
|
77
|
-
"@tauri-apps/cli-win32-ia32-msvc": "2.
|
|
78
|
-
"@tauri-apps/cli-win32-arm64-msvc": "2.
|
|
68
|
+
"@tauri-apps/cli-linux-x64-gnu": "2.11.0",
|
|
69
|
+
"@tauri-apps/cli-win32-x64-msvc": "2.11.0",
|
|
70
|
+
"@tauri-apps/cli-darwin-x64": "2.11.0",
|
|
71
|
+
"@tauri-apps/cli-darwin-arm64": "2.11.0",
|
|
72
|
+
"@tauri-apps/cli-linux-arm64-gnu": "2.11.0",
|
|
73
|
+
"@tauri-apps/cli-linux-arm64-musl": "2.11.0",
|
|
74
|
+
"@tauri-apps/cli-linux-arm-gnueabihf": "2.11.0",
|
|
75
|
+
"@tauri-apps/cli-linux-x64-musl": "2.11.0",
|
|
76
|
+
"@tauri-apps/cli-linux-riscv64-gnu": "2.11.0",
|
|
77
|
+
"@tauri-apps/cli-win32-ia32-msvc": "2.11.0",
|
|
78
|
+
"@tauri-apps/cli-win32-arm64-msvc": "2.11.0"
|
|
79
79
|
}
|
|
80
80
|
}
|