@tauri-apps/cli 1.3.0 → 1.4.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 CHANGED
@@ -1,5 +1,49 @@
1
1
  # Changelog
2
2
 
3
+ ## \[1.4.0]
4
+
5
+ ### New Features
6
+
7
+ - [`0ddbb3a1`](https://www.github.com/tauri-apps/tauri/commit/0ddbb3a1dc1961ba5c6c1a60081513c1380c8af1)([#7015](https://www.github.com/tauri-apps/tauri/pull/7015)) Provide prebuilt CLIs for Windows ARM64 targets.
8
+ - [`35cd751a`](https://www.github.com/tauri-apps/tauri/commit/35cd751adc6fef1f792696fa0cfb471b0bf99374)([#5176](https://www.github.com/tauri-apps/tauri/pull/5176)) Added the `desktop_template` option on `tauri.conf.json > tauri > bundle > deb`.
9
+ - [`6c5ade08`](https://www.github.com/tauri-apps/tauri/commit/6c5ade08d97844bb685789d30e589400bbe3e04c)([#4537](https://www.github.com/tauri-apps/tauri/pull/4537)) Added `tauri completions` to generate shell completions scripts.
10
+ - [`e092f799`](https://www.github.com/tauri-apps/tauri/commit/e092f799469ff32c7d1595d0f07d06fd2dab5c29)([#6887](https://www.github.com/tauri-apps/tauri/pull/6887)) Add `nsis > template` option to specify custom NSIS installer template.
11
+
12
+ ### Enhancements
13
+
14
+ - [`d75c1b82`](https://www.github.com/tauri-apps/tauri/commit/d75c1b829bd96d9e3a672bcc79120597d5ada4a0)([#7181](https://www.github.com/tauri-apps/tauri/pull/7181)) Print a useful error when `updater` bundle target is specified without an updater-enabled target.
15
+ - [`52474e47`](https://www.github.com/tauri-apps/tauri/commit/52474e479d695865299d8c8d868fb98b99731020)([#7141](https://www.github.com/tauri-apps/tauri/pull/7141)) Enhance injection of Cargo features.
16
+ - [`2659ca1a`](https://www.github.com/tauri-apps/tauri/commit/2659ca1ab4799a5bda65c229c149e98bd01eb1ee)([#6900](https://www.github.com/tauri-apps/tauri/pull/6900)) Add `rustls` as default Cargo feature.
17
+
18
+ ### Bug Fixes
19
+
20
+ - [`3cb7a3e6`](https://www.github.com/tauri-apps/tauri/commit/3cb7a3e642bb10ee90dc1d24daa48b8c8c15c9ce)([#6997](https://www.github.com/tauri-apps/tauri/pull/6997)) Fix built-in devserver adding hot-reload code to non-html files.
21
+ - [`fb7ef8da`](https://www.github.com/tauri-apps/tauri/commit/fb7ef8dacd9ade96976c84d22507782cdaf38acf)([#6667](https://www.github.com/tauri-apps/tauri/pull/6667)) Fix nodejs binary regex when `0` is in the version name, for example `node-20`
22
+ - [`1253bbf7`](https://www.github.com/tauri-apps/tauri/commit/1253bbf7ae11a87887e0b3bd98cc26dbb98c8130)([#7013](https://www.github.com/tauri-apps/tauri/pull/7013)) Fixes Cargo.toml feature rewriting.
23
+
24
+ ## \[1.3.1]
25
+
26
+ - Correctly escape XML for resource files in WiX bundler.
27
+ - Bumped due to a bump in tauri-bundler.
28
+ - Bumped due to a bump in cli.rs.
29
+ - [6a6b1388](https://www.github.com/tauri-apps/tauri/commit/6a6b1388ea5787aea4c0e0b0701a4772087bbc0f) fix(bundler): correctly escape resource xml, fixes [#6853](https://www.github.com/tauri-apps/tauri/pull/6853) ([#6855](https://www.github.com/tauri-apps/tauri/pull/6855)) on 2023-05-04
30
+
31
+ - Added the following languages to the NSIS bundler:
32
+
33
+ - `Spanish`
34
+
35
+ - `SpanishInternational`
36
+
37
+ - Bumped due to a bump in tauri-bundler.
38
+ - Bumped due to a bump in cli.rs.
39
+
40
+ - [422b4817](https://www.github.com/tauri-apps/tauri/commit/422b48179856504e980a156500afa8e22c44d357) Add Spanish and SpanishInternational languages ([#6871](https://www.github.com/tauri-apps/tauri/pull/6871)) on 2023-05-06
41
+
42
+ - Correctly escape arguments in NSIS script to fix bundling apps that use non-default WebView2 install modes.
43
+ - Bumped due to a bump in tauri-bundler.
44
+ - Bumped due to a bump in cli.rs.
45
+ - [2915bd06](https://www.github.com/tauri-apps/tauri/commit/2915bd068ed40dc01a363b69212c6b6f2d3ec01e) fix(bundler): Fix webview install modes in NSIS bundler ([#6854](https://www.github.com/tauri-apps/tauri/pull/6854)) on 2023-05-04
46
+
3
47
  ## \[1.3.0]
4
48
 
5
49
  - Add `--ci` flag and respect the `CI` environment variable on the `signer generate` command. In this case the default password will be an empty string and the CLI will not prompt for a value.
package/Cargo.toml CHANGED
@@ -8,14 +8,15 @@ crate-type = ["cdylib"]
8
8
 
9
9
  [dependencies]
10
10
  # Default enable napi4 feature, see https://nodejs.org/api/n-api.html#node-api-version-matrix
11
- napi = { version = "2.12", default-features = false, features = ["napi4"] }
12
- napi-derive = "2.12"
11
+ napi = { version = "2.13", default-features = false, features = ["napi4"] }
12
+ napi-derive = "2.13"
13
13
  tauri-cli = { path = "..", default-features = false }
14
- log = "0.4.17"
14
+ log = "0.4.19"
15
15
 
16
16
  [build-dependencies]
17
17
  napi-build = "2.0"
18
18
 
19
19
  [features]
20
+ default = ["tauri-cli/default"]
21
+ native-tls = ["tauri-cli/native-tls"]
20
22
  native-tls-vendored = ["tauri-cli/native-tls-vendored"]
21
- rustls = ["tauri-cli/rustls"]
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  [![status](https://img.shields.io/badge/status-stable-blue.svg)](https://github.com/tauri-apps/tauri/tree/dev)
5
5
  [![License](https://img.shields.io/badge/License-MIT%20or%20Apache%202-green.svg)](https://opencollective.com/tauri)
6
- [![test library](https://img.shields.io/github/workflow/status/tauri-apps/tauri/test%20library?label=test%20library)](https://github.com/tauri-apps/tauri/actions?query=workflow%3A%22test+library%22)
6
+ [![test cli](https://img.shields.io/github/actions/workflow/status/tauri-apps/tauri/test-cli-js.yml?label=test%20cli&logo=github)](https://github.com/tauri-apps/tauri/actions/workflows/test-cli-js.yml)
7
7
  [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Ftauri-apps%2Ftauri.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Ftauri-apps%2Ftauri?ref=badge_shield)
8
8
  [![Chat Server](https://img.shields.io/badge/chat-discord-7289da.svg)](https://discord.gg/SpmNs4S)
9
9
  [![website](https://img.shields.io/badge/website-tauri.app-purple.svg)](https://tauri.app)
@@ -19,7 +19,7 @@ Tauri is a polyglot and generic system that is very composable and allows engine
19
19
 
20
20
  Tauri apps can have custom menus and have tray-type interfaces. They can be updated, and are managed by the user's operating system as expected. They are very small, because they use the system's webview. They do not ship a runtime, since the final binary is compiled from rust. This makes the reversing of Tauri apps not a trivial task.
21
21
  ## This module
22
- Written in Typescript and packaged such that it can be used with `npm`, `pnpm`, and `yarn`, this library provides a node.js runner for common tasks when using Tauri, like `yarn tauri dev`. For the most part it is a wrapper around [cli.rs](https://github.com/tauri-apps/tauri/blob/dev/tooling/cli).
22
+ Written in Typescript and packaged such that it can be used with `npm`, `pnpm`, and `yarn`, this library provides a node.js runner for common tasks when using Tauri, like `yarn tauri dev`. For the most part it is a wrapper around [tauri-cli](https://github.com/tauri-apps/tauri/blob/dev/tooling/cli).
23
23
 
24
24
  To learn more about the details of how all of these pieces fit together, please consult this [ARCHITECTURE.md](https://github.com/tauri-apps/tauri/blob/dev/ARCHITECTURE.md) document.
25
25
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tauri-apps/cli",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "description": "Command line interface for building Tauri apps",
5
5
  "funding": {
6
6
  "type": "opencollective",
@@ -32,18 +32,19 @@
32
32
  "aarch64-unknown-linux-musl",
33
33
  "armv7-unknown-linux-gnueabihf",
34
34
  "x86_64-unknown-linux-musl",
35
- "i686-pc-windows-msvc"
35
+ "i686-pc-windows-msvc",
36
+ "aarch64-pc-windows-msvc"
36
37
  ]
37
38
  }
38
39
  },
39
40
  "devDependencies": {
40
- "@napi-rs/cli": "2.15.2",
41
+ "@napi-rs/cli": "2.16.1",
41
42
  "cross-env": "7.0.3",
42
43
  "cross-spawn": "7.0.3",
43
44
  "fs-extra": "11.1.1",
44
45
  "jest": "29.5.0",
45
46
  "jest-transform-toml": "1.0.0",
46
- "prettier": "2.8.7"
47
+ "prettier": "2.8.8"
47
48
  },
48
49
  "resolutions": {
49
50
  "json5": "2.2.3"
@@ -67,14 +68,15 @@
67
68
  "format:check": "prettier --check ./package.json ./tauri.js"
68
69
  },
69
70
  "optionalDependencies": {
70
- "@tauri-apps/cli-win32-x64-msvc": "1.3.0",
71
- "@tauri-apps/cli-darwin-x64": "1.3.0",
72
- "@tauri-apps/cli-linux-x64-gnu": "1.3.0",
73
- "@tauri-apps/cli-darwin-arm64": "1.3.0",
74
- "@tauri-apps/cli-linux-arm64-gnu": "1.3.0",
75
- "@tauri-apps/cli-linux-arm64-musl": "1.3.0",
76
- "@tauri-apps/cli-linux-arm-gnueabihf": "1.3.0",
77
- "@tauri-apps/cli-linux-x64-musl": "1.3.0",
78
- "@tauri-apps/cli-win32-ia32-msvc": "1.3.0"
71
+ "@tauri-apps/cli-win32-x64-msvc": "1.4.0",
72
+ "@tauri-apps/cli-darwin-x64": "1.4.0",
73
+ "@tauri-apps/cli-linux-x64-gnu": "1.4.0",
74
+ "@tauri-apps/cli-darwin-arm64": "1.4.0",
75
+ "@tauri-apps/cli-linux-arm64-gnu": "1.4.0",
76
+ "@tauri-apps/cli-linux-arm64-musl": "1.4.0",
77
+ "@tauri-apps/cli-linux-arm-gnueabihf": "1.4.0",
78
+ "@tauri-apps/cli-linux-x64-musl": "1.4.0",
79
+ "@tauri-apps/cli-win32-ia32-msvc": "1.4.0",
80
+ "@tauri-apps/cli-win32-arm64-msvc": "1.4.0"
79
81
  }
80
82
  }
package/schema.json CHANGED
@@ -105,6 +105,7 @@
105
105
  "print": false,
106
106
  "requestUserAttention": false,
107
107
  "setAlwaysOnTop": false,
108
+ "setClosable": false,
108
109
  "setContentProtected": false,
109
110
  "setCursorGrab": false,
110
111
  "setCursorIcon": false,
@@ -116,7 +117,9 @@
116
117
  "setIcon": false,
117
118
  "setIgnoreCursorEvents": false,
118
119
  "setMaxSize": false,
120
+ "setMaximizable": false,
119
121
  "setMinSize": false,
122
+ "setMinimizable": false,
120
123
  "setPosition": false,
121
124
  "setResizable": false,
122
125
  "setSize": false,
@@ -221,7 +224,7 @@
221
224
  "pattern": "^[^/\\:*?\"<>|]+$"
222
225
  },
223
226
  "version": {
224
- "description": "App version. It is a semver version number or a path to a `package.json` file containing the `version` field.",
227
+ "description": "App version. It is a semver version number or a path to a `package.json` file containing the `version` field. If removed the version number from `Cargo.toml` is used.",
225
228
  "default": null,
226
229
  "type": [
227
230
  "string",
@@ -383,6 +386,7 @@
383
386
  "print": false,
384
387
  "requestUserAttention": false,
385
388
  "setAlwaysOnTop": false,
389
+ "setClosable": false,
386
390
  "setContentProtected": false,
387
391
  "setCursorGrab": false,
388
392
  "setCursorIcon": false,
@@ -394,7 +398,9 @@
394
398
  "setIcon": false,
395
399
  "setIgnoreCursorEvents": false,
396
400
  "setMaxSize": false,
401
+ "setMaximizable": false,
397
402
  "setMinSize": false,
403
+ "setMinimizable": false,
398
404
  "setPosition": false,
399
405
  "setResizable": false,
400
406
  "setSize": false,
@@ -605,7 +611,22 @@
605
611
  "format": "double"
606
612
  },
607
613
  "resizable": {
608
- "description": "Whether the window is resizable or not.",
614
+ "description": "Whether the window is resizable or not. When resizable is set to false, native window's maximize button is automatically disabled.",
615
+ "default": true,
616
+ "type": "boolean"
617
+ },
618
+ "maximizable": {
619
+ "description": "Whether the window's native maximize button is enabled or not. If resizable is set to false, this setting is ignored.\n\n## Platform-specific\n\n- **macOS:** Disables the \"zoom\" button in the window titlebar, which is also used to enter fullscreen mode. - **Linux / iOS / Android:** Unsupported.",
620
+ "default": true,
621
+ "type": "boolean"
622
+ },
623
+ "minimizable": {
624
+ "description": "Whether the window's native minimize button is enabled or not.\n\n## Platform-specific\n\n- **Linux / iOS / Android:** Unsupported.",
625
+ "default": true,
626
+ "type": "boolean"
627
+ },
628
+ "closable": {
629
+ "description": "Whether the window's native close button is enabled or not.\n\n## Platform-specific\n\n- **Linux:** \"GTK+ will do its best to convince the window manager not to show a close button. Depending on the system, this function may not have any effect when called on a window that is already visible\" - **iOS / Android:** Unsupported.",
609
630
  "default": true,
610
631
  "type": "boolean"
611
632
  },
@@ -1270,6 +1291,13 @@
1270
1291
  "additionalProperties": {
1271
1292
  "type": "string"
1272
1293
  }
1294
+ },
1295
+ "desktopTemplate": {
1296
+ "description": "Path to a custom desktop file Handlebars template.\n\nAvailable variables: `categories`, `comment` (optional), `exec`, `icon` and `name`.",
1297
+ "type": [
1298
+ "string",
1299
+ "null"
1300
+ ]
1273
1301
  }
1274
1302
  },
1275
1303
  "additionalProperties": false
@@ -1661,6 +1689,13 @@
1661
1689
  "description": "Configuration for the Installer bundle using NSIS.",
1662
1690
  "type": "object",
1663
1691
  "properties": {
1692
+ "template": {
1693
+ "description": "A custom .nsi template to use.",
1694
+ "type": [
1695
+ "string",
1696
+ "null"
1697
+ ]
1698
+ },
1664
1699
  "license": {
1665
1700
  "description": "The path to the license file to render on the installer.",
1666
1701
  "type": [
@@ -1708,6 +1743,16 @@
1708
1743
  "type": "string"
1709
1744
  }
1710
1745
  },
1746
+ "customLanguageFiles": {
1747
+ "description": "A key-value pair where the key is the language and the value is the path to a custom `.nsh` file that holds the translated text for tauri's custom messages.\n\nSee <https://github.com/tauri-apps/tauri/blob/dev/tooling/bundler/src/bundle/windows/templates/nsis-languages/English.nsh> for an example `.nsh` file.\n\n**Note**: the key must be a valid NSIS language and it must be added to [`NsisConfig`] languages array,",
1748
+ "type": [
1749
+ "object",
1750
+ "null"
1751
+ ],
1752
+ "additionalProperties": {
1753
+ "type": "string"
1754
+ }
1755
+ },
1711
1756
  "displayLanguageSelector": {
1712
1757
  "description": "Whether to display a language selector dialog before the installer and uninstaller windows are rendered or not. By default the OS language is selected, with a fallback to the first language in the `languages` array.",
1713
1758
  "default": false,
@@ -1785,6 +1830,7 @@
1785
1830
  "print": false,
1786
1831
  "requestUserAttention": false,
1787
1832
  "setAlwaysOnTop": false,
1833
+ "setClosable": false,
1788
1834
  "setContentProtected": false,
1789
1835
  "setCursorGrab": false,
1790
1836
  "setCursorIcon": false,
@@ -1796,7 +1842,9 @@
1796
1842
  "setIcon": false,
1797
1843
  "setIgnoreCursorEvents": false,
1798
1844
  "setMaxSize": false,
1845
+ "setMaximizable": false,
1799
1846
  "setMinSize": false,
1847
+ "setMinimizable": false,
1800
1848
  "setPosition": false,
1801
1849
  "setResizable": false,
1802
1850
  "setSize": false,
@@ -2052,6 +2100,13 @@
2052
2100
  "items": {
2053
2101
  "type": "string"
2054
2102
  }
2103
+ },
2104
+ "requireLiteralLeadingDot": {
2105
+ "description": "Whether or not paths that contain components that start with a `.` will require that `.` appears literally in the pattern; `*`, `?`, `**`, or `[...]` will not match. This is useful because such files are conventionally considered hidden on Unix systems and it might be desirable to skip them when listing files.\n\nDefaults to `false` on Unix systems and `true` on Windows",
2106
+ "type": [
2107
+ "boolean",
2108
+ "null"
2109
+ ]
2055
2110
  }
2056
2111
  }
2057
2112
  }
@@ -2086,6 +2141,21 @@
2086
2141
  "default": false,
2087
2142
  "type": "boolean"
2088
2143
  },
2144
+ "setMaximizable": {
2145
+ "description": "Allows setting whether the window's native maximize button is enabled or not.",
2146
+ "default": false,
2147
+ "type": "boolean"
2148
+ },
2149
+ "setMinimizable": {
2150
+ "description": "Allows setting whether the window's native minimize button is enabled or not.",
2151
+ "default": false,
2152
+ "type": "boolean"
2153
+ },
2154
+ "setClosable": {
2155
+ "description": "Allows setting whether the window's native close button is enabled or not.",
2156
+ "default": false,
2157
+ "type": "boolean"
2158
+ },
2089
2159
  "setTitle": {
2090
2160
  "description": "Allows changing the window title.",
2091
2161
  "default": false,
@@ -2414,7 +2484,7 @@
2414
2484
  "additionalProperties": false
2415
2485
  },
2416
2486
  "HttpAllowlistScope": {
2417
- "description": "HTTP API scope definition. It is a list of URLs that can be accessed by the webview when using the HTTP APIs. The scoped URL is matched against the request URL using a glob pattern.\n\nExamples: - \"https://**\": allows all HTTPS urls - \"https://*.github.com/tauri-apps/tauri\": allows any subdomain of \"github.com\" with the \"tauri-apps/api\" path - \"https://myapi.service.com/users/*\": allows access to any URLs that begins with \"https://myapi.service.com/users/\"",
2487
+ "description": "HTTP API scope definition. It is a list of URLs that can be accessed by the webview when using the HTTP APIs. The scoped URL is matched against the request URL using a glob pattern.\n\nExamples: - \"https://*\": allows all HTTPS urls - \"https://*.github.com/tauri-apps/tauri\": allows any subdomain of \"github.com\" with the \"tauri-apps/api\" path - \"https://myapi.service.com/users/*\": allows access to any URLs that begins with \"https://myapi.service.com/users/\"",
2418
2488
  "type": "array",
2419
2489
  "items": {
2420
2490
  "type": "string",
@@ -2791,7 +2861,7 @@
2791
2861
  ]
2792
2862
  },
2793
2863
  {
2794
- "description": "The quiet mode means there's no user interaction required. Requires admin privileges if the installer does (WiX).",
2864
+ "description": "The quiet mode means there's no user interaction required. Requires admin privileges if the installer does.",
2795
2865
  "type": "string",
2796
2866
  "enum": [
2797
2867
  "quiet"
package/tauri.js CHANGED
@@ -20,7 +20,7 @@ if (bin === '@tauri-apps/cli') {
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.
23
- else if (binStem.match(/(nodejs|node)\-?([1-9]*)*$/g)) {
23
+ else if (binStem.match(/(nodejs|node)\-?([0-9]*)*$/g)) {
24
24
  const managerStem = process.env.npm_execpath
25
25
  ? path.parse(process.env.npm_execpath).name.toLowerCase()
26
26
  : null