@tauri-apps/cli 1.2.3 → 1.3.1

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,56 @@
1
1
  # Changelog
2
2
 
3
+ ## \[1.3.1]
4
+
5
+ - Correctly escape XML for resource files in WiX bundler.
6
+ - Bumped due to a bump in tauri-bundler.
7
+ - Bumped due to a bump in cli.rs.
8
+ - [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
9
+
10
+ - Added the following languages to the NSIS bundler:
11
+
12
+ - `Spanish`
13
+
14
+ - `SpanishInternational`
15
+
16
+ - Bumped due to a bump in tauri-bundler.
17
+ - Bumped due to a bump in cli.rs.
18
+
19
+ - [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
20
+
21
+ - Correctly escape arguments in NSIS script to fix bundling apps that use non-default WebView2 install modes.
22
+ - Bumped due to a bump in tauri-bundler.
23
+ - Bumped due to a bump in cli.rs.
24
+ - [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
25
+
26
+ ## \[1.3.0]
27
+
28
+ - 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.
29
+ - [8fb1df8a](https://www.github.com/tauri-apps/tauri/commit/8fb1df8aa65a52cdb4a7e1bb9dda9b912a7a2895) feat(cli): add `--ci` flag to `signer generate`, closes [#6089](https://www.github.com/tauri-apps/tauri/pull/6089) ([#6097](https://www.github.com/tauri-apps/tauri/pull/6097)) on 2023-01-19
30
+ - Fix Outdated Github Actions in the Plugin Templates `with-api` and `backend`
31
+ - [a926b49a](https://www.github.com/tauri-apps/tauri/commit/a926b49a01925ca757d391994bfac3beea29599b) Fix Github Actions of Tauri Plugin with-api template ([#6603](https://www.github.com/tauri-apps/tauri/pull/6603)) on 2023-04-03
32
+ - Do not crash on Cargo.toml watcher.
33
+ - [e8014a7f](https://www.github.com/tauri-apps/tauri/commit/e8014a7f612a1094461ddad63aacc498a2682ff5) fix(cli): do not crash on watcher ([#6303](https://www.github.com/tauri-apps/tauri/pull/6303)) on 2023-02-17
34
+ - Fix crash when nodejs binary has the version in its name, for example `node-18`
35
+ - [1c8229fb](https://www.github.com/tauri-apps/tauri/commit/1c8229fbe273554c0c97cccee45d5967f5df1b9f) fix(cli.js): detect `node-<version>` binary, closes [#6427](https://www.github.com/tauri-apps/tauri/pull/6427) ([#6432](https://www.github.com/tauri-apps/tauri/pull/6432)) on 2023-03-16
36
+ - Add `--png` option for the `icon` command to generate custom icon sizes.
37
+ - [9d214412](https://www.github.com/tauri-apps/tauri/commit/9d2144128fc5fad67d8404bce95f82297ebb0e4a) feat(cli): add option to make custom icon sizes, closes [#5121](https://www.github.com/tauri-apps/tauri/pull/5121) ([#5246](https://www.github.com/tauri-apps/tauri/pull/5246)) on 2022-12-27
38
+ - Skip the password prompt on the build command when `TAURI_KEY_PASSWORD` environment variable is empty and the `--ci` argument is provided or the `CI` environment variable is set.
39
+ - [d4f89af1](https://www.github.com/tauri-apps/tauri/commit/d4f89af18d69fd95a4d8a1ede8442547c6a6d0ee) feat: skip password prompt on the build command if CI is set fixes [#6089](https://www.github.com/tauri-apps/tauri/pull/6089) on 2023-01-18
40
+ - Fix `default-run` not deserialized.
41
+ - [57c6bf07](https://www.github.com/tauri-apps/tauri/commit/57c6bf07bb380847abdf27c3fff9891d99c1c98c) fix(cli): fix default-run not deserialized ([#6584](https://www.github.com/tauri-apps/tauri/pull/6584)) on 2023-03-30
42
+ - Fixes HTML serialization removing template tags on the dev server.
43
+ - [314f0e21](https://www.github.com/tauri-apps/tauri/commit/314f0e212fd2b9e452bfe3424cdce2b0bf37b5d7) fix(cli): web_dev_server html template serialization (fix [#6165](https://www.github.com/tauri-apps/tauri/pull/6165)) ([#6166](https://www.github.com/tauri-apps/tauri/pull/6166)) on 2023-01-29
44
+ - Use escaping on Handlebars templates.
45
+ - [6d6b6e65](https://www.github.com/tauri-apps/tauri/commit/6d6b6e653ea70fc02794f723092cdc860995c259) feat: configure escaping on handlebars templates ([#6678](https://www.github.com/tauri-apps/tauri/pull/6678)) on 2023-05-02
46
+ - Add initial support for building `nsis` bundles on non-Windows platforms.
47
+ - [60e6f6c3](https://www.github.com/tauri-apps/tauri/commit/60e6f6c3f1605f3064b5bb177992530ff788ccf0) feat(bundler): Add support for creating NSIS bundles on unix hosts ([#5788](https://www.github.com/tauri-apps/tauri/pull/5788)) on 2023-01-19
48
+ - Add `nsis` bundle target
49
+ - [c94e1326](https://www.github.com/tauri-apps/tauri/commit/c94e1326a7c0767a13128a8b1d327a00156ece12) feat(bundler): add `nsis`, closes [#4450](https://www.github.com/tauri-apps/tauri/pull/4450), closes [#2319](https://www.github.com/tauri-apps/tauri/pull/2319) ([#4674](https://www.github.com/tauri-apps/tauri/pull/4674)) on 2023-01-03
50
+ - Remove default features from Cargo.toml template.
51
+ - [b08ae637](https://www.github.com/tauri-apps/tauri/commit/b08ae637a0f58b38cbce9b8a1fa0b6c5dc0cfd05) fix(cli): remove default features from template ([#6074](https://www.github.com/tauri-apps/tauri/pull/6074)) on 2023-01-17
52
+ - Use Ubuntu 20.04 to compile the CLI, increasing the minimum libc version required.
53
+
3
54
  ## \[1.2.3]
4
55
 
5
56
  - Pin `ignore` to `=0.4.18`.
package/Cargo.toml CHANGED
@@ -8,10 +8,14 @@ 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.10", default-features = false, features = ["napi4"] }
12
- napi-derive = "2.9"
13
- tauri-cli = { path = ".." }
11
+ napi = { version = "2.12", default-features = false, features = ["napi4"] }
12
+ napi-derive = "2.12"
13
+ tauri-cli = { path = "..", default-features = false }
14
14
  log = "0.4.17"
15
15
 
16
16
  [build-dependencies]
17
17
  napi-build = "2.0"
18
+
19
+ [features]
20
+ native-tls-vendored = ["tauri-cli/native-tls-vendored"]
21
+ rustls = ["tauri-cli/rustls"]
package/build.rs CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright 2019-2022 Tauri Programme within The Commons Conservancy
1
+ // Copyright 2019-2023 Tauri Programme within The Commons Conservancy
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  // SPDX-License-Identifier: MIT
4
4
 
package/index.js CHANGED
@@ -1,3 +1,9 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /* prettier-ignore */
4
+
5
+ /* auto-generated by NAPI-RS */
6
+
1
7
  const { existsSync, readFileSync } = require('fs')
2
8
  const { join } = require('path')
3
9
 
@@ -11,7 +17,8 @@ function isMusl() {
11
17
  // For Node 10
12
18
  if (!process.report || typeof process.report.getReport !== 'function') {
13
19
  try {
14
- return readFileSync('/usr/bin/ldd', 'utf8').includes('musl')
20
+ const lddPath = require('child_process').execSync('which ldd').toString().trim();
21
+ return readFileSync(lddPath, 'utf8').includes('musl')
15
22
  } catch (e) {
16
23
  return true
17
24
  }
@@ -101,6 +108,15 @@ switch (platform) {
101
108
  }
102
109
  break
103
110
  case 'darwin':
111
+ localFileExisted = existsSync(join(__dirname, 'cli.darwin-universal.node'))
112
+ try {
113
+ if (localFileExisted) {
114
+ nativeBinding = require('./cli.darwin-universal.node')
115
+ } else {
116
+ nativeBinding = require('@tauri-apps/cli-darwin-universal')
117
+ }
118
+ break
119
+ } catch {}
104
120
  switch (arch) {
105
121
  case 'x64':
106
122
  localFileExisted = existsSync(join(__dirname, 'cli.darwin-x64.node'))
package/jest.config.js CHANGED
@@ -1,3 +1,7 @@
1
+ // Copyright 2019-2023 Tauri Programme within The Commons Conservancy
2
+ // SPDX-License-Identifier: Apache-2.0
3
+ // SPDX-License-Identifier: MIT
4
+
1
5
  module.exports = {
2
6
  setupFilesAfterEnv: ['<rootDir>/test/jest/jest.setup.js'],
3
7
  testMatch: [
package/main.d.ts CHANGED
@@ -1,3 +1,7 @@
1
+ // Copyright 2019-2023 Tauri Programme within The Commons Conservancy
2
+ // SPDX-License-Identifier: Apache-2.0
3
+ // SPDX-License-Identifier: MIT
4
+
1
5
  /* tslint:disable */
2
6
  /* eslint-disable */
3
7
 
package/main.js CHANGED
@@ -1,3 +1,7 @@
1
+ // Copyright 2019-2023 Tauri Programme within The Commons Conservancy
2
+ // SPDX-License-Identifier: Apache-2.0
3
+ // SPDX-License-Identifier: MIT
4
+
1
5
  const { run, logError } = require('./index')
2
6
 
3
7
  module.exports.run = (args, binName) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tauri-apps/cli",
3
- "version": "1.2.3",
3
+ "version": "1.3.1",
4
4
  "description": "Command line interface for building Tauri apps",
5
5
  "funding": {
6
6
  "type": "opencollective",
@@ -37,13 +37,13 @@
37
37
  }
38
38
  },
39
39
  "devDependencies": {
40
- "@napi-rs/cli": "2.13.0",
40
+ "@napi-rs/cli": "2.15.2",
41
41
  "cross-env": "7.0.3",
42
42
  "cross-spawn": "7.0.3",
43
- "fs-extra": "11.1.0",
44
- "jest": "29.3.1",
43
+ "fs-extra": "11.1.1",
44
+ "jest": "29.5.0",
45
45
  "jest-transform-toml": "1.0.0",
46
- "prettier": "2.8.1"
46
+ "prettier": "2.8.7"
47
47
  },
48
48
  "resolutions": {
49
49
  "json5": "2.2.3"
@@ -67,14 +67,14 @@
67
67
  "format:check": "prettier --check ./package.json ./tauri.js"
68
68
  },
69
69
  "optionalDependencies": {
70
- "@tauri-apps/cli-win32-x64-msvc": "1.2.3",
71
- "@tauri-apps/cli-darwin-x64": "1.2.3",
72
- "@tauri-apps/cli-linux-x64-gnu": "1.2.3",
73
- "@tauri-apps/cli-darwin-arm64": "1.2.3",
74
- "@tauri-apps/cli-linux-arm64-gnu": "1.2.3",
75
- "@tauri-apps/cli-linux-arm64-musl": "1.2.3",
76
- "@tauri-apps/cli-linux-arm-gnueabihf": "1.2.3",
77
- "@tauri-apps/cli-linux-x64-musl": "1.2.3",
78
- "@tauri-apps/cli-win32-ia32-msvc": "1.2.3"
70
+ "@tauri-apps/cli-win32-x64-msvc": "1.3.1",
71
+ "@tauri-apps/cli-darwin-x64": "1.3.1",
72
+ "@tauri-apps/cli-linux-x64-gnu": "1.3.1",
73
+ "@tauri-apps/cli-darwin-arm64": "1.3.1",
74
+ "@tauri-apps/cli-linux-arm64-gnu": "1.3.1",
75
+ "@tauri-apps/cli-linux-arm64-musl": "1.3.1",
76
+ "@tauri-apps/cli-linux-arm-gnueabihf": "1.3.1",
77
+ "@tauri-apps/cli-linux-x64-musl": "1.3.1",
78
+ "@tauri-apps/cli-win32-ia32-msvc": "1.3.1"
79
79
  }
80
80
  }
package/schema.json CHANGED
@@ -105,6 +105,7 @@
105
105
  "print": false,
106
106
  "requestUserAttention": false,
107
107
  "setAlwaysOnTop": false,
108
+ "setContentProtected": false,
108
109
  "setCursorGrab": false,
109
110
  "setCursorIcon": false,
110
111
  "setCursorPosition": false,
@@ -145,6 +146,7 @@
145
146
  "allowDowngrades": true,
146
147
  "certificateThumbprint": null,
147
148
  "digestAlgorithm": null,
149
+ "nsis": null,
148
150
  "timestampUrl": null,
149
151
  "tsp": false,
150
152
  "webviewFixedRuntimePath": null,
@@ -161,6 +163,7 @@
161
163
  },
162
164
  "security": {
163
165
  "dangerousDisableAssetCspModification": false,
166
+ "dangerousRemoteDomainIpcAccess": [],
164
167
  "freezePrototype": false
165
168
  },
166
169
  "updater": {
@@ -168,7 +171,8 @@
168
171
  "dialog": true,
169
172
  "pubkey": "",
170
173
  "windows": {
171
- "installMode": "passive"
174
+ "installMode": "passive",
175
+ "installerArgs": []
172
176
  }
173
177
  },
174
178
  "windows": []
@@ -205,7 +209,7 @@
205
209
  "additionalProperties": false,
206
210
  "definitions": {
207
211
  "PackageConfig": {
208
- "description": "The package configuration.",
212
+ "description": "The package configuration.\n\nSee more: https://tauri.app/v1/api/config#packageconfig",
209
213
  "type": "object",
210
214
  "properties": {
211
215
  "productName": {
@@ -228,7 +232,7 @@
228
232
  "additionalProperties": false
229
233
  },
230
234
  "TauriConfig": {
231
- "description": "The Tauri configuration object.",
235
+ "description": "The Tauri configuration object.\n\nSee more: https://tauri.app/v1/api/config#tauriconfig",
232
236
  "type": "object",
233
237
  "properties": {
234
238
  "pattern": {
@@ -281,6 +285,7 @@
281
285
  "allowDowngrades": true,
282
286
  "certificateThumbprint": null,
283
287
  "digestAlgorithm": null,
288
+ "nsis": null,
284
289
  "timestampUrl": null,
285
290
  "tsp": false,
286
291
  "webviewFixedRuntimePath": null,
@@ -378,6 +383,7 @@
378
383
  "print": false,
379
384
  "requestUserAttention": false,
380
385
  "setAlwaysOnTop": false,
386
+ "setContentProtected": false,
381
387
  "setCursorGrab": false,
382
388
  "setCursorIcon": false,
383
389
  "setCursorPosition": false,
@@ -410,6 +416,7 @@
410
416
  "description": "Security configuration.",
411
417
  "default": {
412
418
  "dangerousDisableAssetCspModification": false,
419
+ "dangerousRemoteDomainIpcAccess": [],
413
420
  "freezePrototype": false
414
421
  },
415
422
  "allOf": [
@@ -425,7 +432,8 @@
425
432
  "dialog": true,
426
433
  "pubkey": "",
427
434
  "windows": {
428
- "installMode": "passive"
435
+ "installMode": "passive",
436
+ "installerArgs": []
429
437
  }
430
438
  },
431
439
  "allOf": [
@@ -502,7 +510,7 @@
502
510
  ]
503
511
  },
504
512
  "WindowConfig": {
505
- "description": "The window configuration object.",
513
+ "description": "The window configuration object.\n\nSee more: https://tauri.app/v1/api/config#windowconfig",
506
514
  "type": "object",
507
515
  "properties": {
508
516
  "label": {
@@ -641,6 +649,11 @@
641
649
  "default": false,
642
650
  "type": "boolean"
643
651
  },
652
+ "contentProtected": {
653
+ "description": "Prevents the window contents from being captured by other apps.",
654
+ "default": false,
655
+ "type": "boolean"
656
+ },
644
657
  "skipTaskbar": {
645
658
  "description": "If `true`, hides the window icon from the taskbar on Windows and Linux.",
646
659
  "default": false,
@@ -682,6 +695,13 @@
682
695
  "string",
683
696
  "null"
684
697
  ]
698
+ },
699
+ "additionalBrowserArgs": {
700
+ "description": "Defines additional browser arguments on Windows. By default wry passes `--disable-features=msWebOOUI,msPdfOOUI,msSmartScreenProtection` so if you use this method, you also need to disable these components by yourself if you want.",
701
+ "type": [
702
+ "string",
703
+ "null"
704
+ ]
685
705
  }
686
706
  },
687
707
  "additionalProperties": false
@@ -746,7 +766,7 @@
746
766
  ]
747
767
  },
748
768
  "CliConfig": {
749
- "description": "describes a CLI configuration",
769
+ "description": "describes a CLI configuration\n\nSee more: https://tauri.app/v1/api/config#cliconfig",
750
770
  "type": "object",
751
771
  "properties": {
752
772
  "description": {
@@ -992,7 +1012,7 @@
992
1012
  "additionalProperties": false
993
1013
  },
994
1014
  "BundleConfig": {
995
- "description": "Configuration for tauri-bundler.",
1015
+ "description": "Configuration for tauri-bundler.\n\nSee more: https://tauri.app/v1/api/config#bundleconfig",
996
1016
  "type": "object",
997
1017
  "required": [
998
1018
  "identifier"
@@ -1004,7 +1024,7 @@
1004
1024
  "type": "boolean"
1005
1025
  },
1006
1026
  "targets": {
1007
- "description": "The bundle targets, currently supports [\"deb\", \"appimage\", \"msi\", \"app\", \"dmg\", \"updater\"] or \"all\".",
1027
+ "description": "The bundle targets, currently supports [\"deb\", \"appimage\", \"nsis\", \"msi\", \"app\", \"dmg\", \"updater\"] or \"all\".",
1008
1028
  "default": "all",
1009
1029
  "allOf": [
1010
1030
  {
@@ -1118,6 +1138,7 @@
1118
1138
  "allowDowngrades": true,
1119
1139
  "certificateThumbprint": null,
1120
1140
  "digestAlgorithm": null,
1141
+ "nsis": null,
1121
1142
  "timestampUrl": null,
1122
1143
  "tsp": false,
1123
1144
  "webviewFixedRuntimePath": null,
@@ -1186,6 +1207,13 @@
1186
1207
  "msi"
1187
1208
  ]
1188
1209
  },
1210
+ {
1211
+ "description": "The NSIS bundle (.exe).",
1212
+ "type": "string",
1213
+ "enum": [
1214
+ "nsis"
1215
+ ]
1216
+ },
1189
1217
  {
1190
1218
  "description": "The macOS application bundle (.app).",
1191
1219
  "type": "string",
@@ -1210,7 +1238,7 @@
1210
1238
  ]
1211
1239
  },
1212
1240
  "AppImageConfig": {
1213
- "description": "Configuration for AppImage bundles.",
1241
+ "description": "Configuration for AppImage bundles.\n\nSee more: https://tauri.app/v1/api/config#appimageconfig",
1214
1242
  "type": "object",
1215
1243
  "properties": {
1216
1244
  "bundleMediaFramework": {
@@ -1222,7 +1250,7 @@
1222
1250
  "additionalProperties": false
1223
1251
  },
1224
1252
  "DebConfig": {
1225
- "description": "Configuration for Debian (.deb) bundles.",
1253
+ "description": "Configuration for Debian (.deb) bundles.\n\nSee more: https://tauri.app/v1/api/config#debconfig",
1226
1254
  "type": "object",
1227
1255
  "properties": {
1228
1256
  "depends": {
@@ -1247,7 +1275,7 @@
1247
1275
  "additionalProperties": false
1248
1276
  },
1249
1277
  "MacConfig": {
1250
- "description": "Configuration for the macOS bundles.",
1278
+ "description": "Configuration for the macOS bundles.\n\nSee more: https://tauri.app/v1/api/config#macconfig",
1251
1279
  "type": "object",
1252
1280
  "properties": {
1253
1281
  "frameworks": {
@@ -1307,7 +1335,7 @@
1307
1335
  "additionalProperties": false
1308
1336
  },
1309
1337
  "WindowsConfig": {
1310
- "description": "Windows bundler configuration.",
1338
+ "description": "Windows bundler configuration.\n\nSee more: https://tauri.app/v1/api/config#windowsconfig",
1311
1339
  "type": "object",
1312
1340
  "properties": {
1313
1341
  "digestAlgorithm": {
@@ -1370,6 +1398,17 @@
1370
1398
  "type": "null"
1371
1399
  }
1372
1400
  ]
1401
+ },
1402
+ "nsis": {
1403
+ "description": "Configuration for the installer generated with NSIS.",
1404
+ "anyOf": [
1405
+ {
1406
+ "$ref": "#/definitions/NsisConfig"
1407
+ },
1408
+ {
1409
+ "type": "null"
1410
+ }
1411
+ ]
1373
1412
  }
1374
1413
  },
1375
1414
  "additionalProperties": false
@@ -1394,7 +1433,7 @@
1394
1433
  "additionalProperties": false
1395
1434
  },
1396
1435
  {
1397
- "description": "Download the bootstrapper and run it. Requires internet connection. Results in a smaller installer size, but is not recommended on Windows 7.",
1436
+ "description": "Download the bootstrapper and run it. Requires an internet connection. Results in a smaller installer size, but is not recommended on Windows 7.",
1398
1437
  "type": "object",
1399
1438
  "required": [
1400
1439
  "type"
@@ -1415,7 +1454,7 @@
1415
1454
  "additionalProperties": false
1416
1455
  },
1417
1456
  {
1418
- "description": "Embed the bootstrapper and run it. Requires internet connection. Increases the installer size by around 1.8MB, but offers better support on Windows 7.",
1457
+ "description": "Embed the bootstrapper and run it. Requires an internet connection. Increases the installer size by around 1.8MB, but offers better support on Windows 7.",
1419
1458
  "type": "object",
1420
1459
  "required": [
1421
1460
  "type"
@@ -1436,7 +1475,7 @@
1436
1475
  "additionalProperties": false
1437
1476
  },
1438
1477
  {
1439
- "description": "Embed the offline installer and run it. Does not require internet connection. Increases the installer size by around 127MB.",
1478
+ "description": "Embed the offline installer and run it. Does not require an internet connection. Increases the installer size by around 127MB.",
1440
1479
  "type": "object",
1441
1480
  "required": [
1442
1481
  "type"
@@ -1480,7 +1519,7 @@
1480
1519
  ]
1481
1520
  },
1482
1521
  "WixConfig": {
1483
- "description": "Configuration for the MSI bundle using WiX.",
1522
+ "description": "Configuration for the MSI bundle using WiX.\n\nSee more: https://tauri.app/v1/api/config#wixconfig",
1484
1523
  "type": "object",
1485
1524
  "properties": {
1486
1525
  "language": {
@@ -1605,7 +1644,7 @@
1605
1644
  ]
1606
1645
  },
1607
1646
  "WixLanguageConfig": {
1608
- "description": "Configuration for a target language for the WiX build.",
1647
+ "description": "Configuration for a target language for the WiX build.\n\nSee more: https://tauri.app/v1/api/config#wixlanguageconfig",
1609
1648
  "type": "object",
1610
1649
  "properties": {
1611
1650
  "localePath": {
@@ -1618,8 +1657,93 @@
1618
1657
  },
1619
1658
  "additionalProperties": false
1620
1659
  },
1660
+ "NsisConfig": {
1661
+ "description": "Configuration for the Installer bundle using NSIS.",
1662
+ "type": "object",
1663
+ "properties": {
1664
+ "license": {
1665
+ "description": "The path to the license file to render on the installer.",
1666
+ "type": [
1667
+ "string",
1668
+ "null"
1669
+ ]
1670
+ },
1671
+ "headerImage": {
1672
+ "description": "The path to a bitmap file to display on the header of installers pages.\n\nThe recommended dimensions are 150px x 57px.",
1673
+ "type": [
1674
+ "string",
1675
+ "null"
1676
+ ]
1677
+ },
1678
+ "sidebarImage": {
1679
+ "description": "The path to a bitmap file for the Welcome page and the Finish page.\n\nThe recommended dimensions are 164px x 314px.",
1680
+ "type": [
1681
+ "string",
1682
+ "null"
1683
+ ]
1684
+ },
1685
+ "installerIcon": {
1686
+ "description": "The path to an icon file used as the installer icon.",
1687
+ "type": [
1688
+ "string",
1689
+ "null"
1690
+ ]
1691
+ },
1692
+ "installMode": {
1693
+ "description": "Whether the installation will be for all users or just the current user.",
1694
+ "default": "currentUser",
1695
+ "allOf": [
1696
+ {
1697
+ "$ref": "#/definitions/NSISInstallerMode"
1698
+ }
1699
+ ]
1700
+ },
1701
+ "languages": {
1702
+ "description": "A list of installer languages. By default the OS language is used. If the OS language is not in the list of languages, the first language will be used. To allow the user to select the language, set `display_language_selector` to `true`.\n\nSee <https://github.com/kichik/nsis/tree/9465c08046f00ccb6eda985abbdbf52c275c6c4d/Contrib/Language%20files> for the complete list of languages.",
1703
+ "type": [
1704
+ "array",
1705
+ "null"
1706
+ ],
1707
+ "items": {
1708
+ "type": "string"
1709
+ }
1710
+ },
1711
+ "displayLanguageSelector": {
1712
+ "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
+ "default": false,
1714
+ "type": "boolean"
1715
+ }
1716
+ },
1717
+ "additionalProperties": false
1718
+ },
1719
+ "NSISInstallerMode": {
1720
+ "description": "Install Modes for the NSIS installer.",
1721
+ "oneOf": [
1722
+ {
1723
+ "description": "Default mode for the installer.\n\nInstall the app by default in a directory that doesn't require Administrator access.\n\nInstaller metadata will be saved under the `HKCU` registry path.",
1724
+ "type": "string",
1725
+ "enum": [
1726
+ "currentUser"
1727
+ ]
1728
+ },
1729
+ {
1730
+ "description": "Install the app by default in the `Program Files` folder directory requires Administrator access for the installation.\n\nInstaller metadata will be saved under the `HKLM` registry path.",
1731
+ "type": "string",
1732
+ "enum": [
1733
+ "perMachine"
1734
+ ]
1735
+ },
1736
+ {
1737
+ "description": "Combines both modes and allows the user to choose at install time whether to install for the current user or per machine. Note that this mode will require Administrator access even if the user wants to install it for the current user only.\n\nInstaller metadata will be saved under the `HKLM` or `HKCU` registry path based on the user's choice.",
1738
+ "type": "string",
1739
+ "enum": [
1740
+ "both"
1741
+ ]
1742
+ }
1743
+ ]
1744
+ },
1621
1745
  "AllowlistConfig": {
1622
- "description": "Allowlist configuration.",
1746
+ "description": "Allowlist configuration. The allowlist is a translation of the [Cargo allowlist features](https://docs.rs/tauri/latest/tauri/#cargo-allowlist-features).\n\n# Notes\n\n- Endpoints that don't have their own allowlist option are enabled by default. - There is only \"opt-in\", no \"opt-out\". Setting an option to `false` has no effect.\n\n# Examples\n\n- * [`\"app-all\": true`](https://tauri.app/v1/api/config/#appallowlistconfig.all) will make the [hide](https://tauri.app/v1/api/js/app#hide) endpoint be available regardless of whether `hide` is set to `false` or `true` in the allowlist.",
1623
1747
  "type": "object",
1624
1748
  "properties": {
1625
1749
  "all": {
@@ -1661,6 +1785,7 @@
1661
1785
  "print": false,
1662
1786
  "requestUserAttention": false,
1663
1787
  "setAlwaysOnTop": false,
1788
+ "setContentProtected": false,
1664
1789
  "setCursorGrab": false,
1665
1790
  "setCursorIcon": false,
1666
1791
  "setCursorPosition": false,
@@ -1833,7 +1958,7 @@
1833
1958
  "additionalProperties": false
1834
1959
  },
1835
1960
  "FsAllowlistConfig": {
1836
- "description": "Allowlist for the file system APIs.",
1961
+ "description": "Allowlist for the file system APIs.\n\nSee more: https://tauri.app/v1/api/config#fsallowlistconfig",
1837
1962
  "type": "object",
1838
1963
  "properties": {
1839
1964
  "scope": {
@@ -1933,7 +2058,7 @@
1933
2058
  ]
1934
2059
  },
1935
2060
  "WindowAllowlistConfig": {
1936
- "description": "Allowlist for the window APIs.",
2061
+ "description": "Allowlist for the window APIs.\n\nSee more: https://tauri.app/v1/api/config#windowallowlistconfig",
1937
2062
  "type": "object",
1938
2063
  "properties": {
1939
2064
  "all": {
@@ -2011,6 +2136,11 @@
2011
2136
  "default": false,
2012
2137
  "type": "boolean"
2013
2138
  },
2139
+ "setContentProtected": {
2140
+ "description": "Allows preventing the window contents from being captured by other apps.",
2141
+ "default": false,
2142
+ "type": "boolean"
2143
+ },
2014
2144
  "setSize": {
2015
2145
  "description": "Allows setting the window size.",
2016
2146
  "default": false,
@@ -2090,7 +2220,7 @@
2090
2220
  "additionalProperties": false
2091
2221
  },
2092
2222
  "ShellAllowlistConfig": {
2093
- "description": "Allowlist for the shell APIs.",
2223
+ "description": "Allowlist for the shell APIs.\n\nSee more: https://tauri.app/v1/api/config#shellallowlistconfig",
2094
2224
  "type": "object",
2095
2225
  "properties": {
2096
2226
  "scope": {
@@ -2211,7 +2341,7 @@
2211
2341
  "description": "Defines the `shell > open` api scope.",
2212
2342
  "anyOf": [
2213
2343
  {
2214
- "description": "If the shell open API should be enabled.\n\nIf enabled, the default validation regex (`^https?://`) is used.",
2344
+ "description": "If the shell open API should be enabled.\n\nIf enabled, the default validation regex (`^((mailto:\\w+)|(tel:\\w+)|(https?://\\w+)).+`) is used.",
2215
2345
  "type": "boolean"
2216
2346
  },
2217
2347
  {
@@ -2221,7 +2351,7 @@
2221
2351
  ]
2222
2352
  },
2223
2353
  "DialogAllowlistConfig": {
2224
- "description": "Allowlist for the dialog APIs.",
2354
+ "description": "Allowlist for the dialog APIs.\n\nSee more: https://tauri.app/v1/api/config#dialogallowlistconfig",
2225
2355
  "type": "object",
2226
2356
  "properties": {
2227
2357
  "all": {
@@ -2258,7 +2388,7 @@
2258
2388
  "additionalProperties": false
2259
2389
  },
2260
2390
  "HttpAllowlistConfig": {
2261
- "description": "Allowlist for the HTTP APIs.",
2391
+ "description": "Allowlist for the HTTP APIs.\n\nSee more: https://tauri.app/v1/api/config#httpallowlistconfig",
2262
2392
  "type": "object",
2263
2393
  "properties": {
2264
2394
  "scope": {
@@ -2292,7 +2422,7 @@
2292
2422
  }
2293
2423
  },
2294
2424
  "NotificationAllowlistConfig": {
2295
- "description": "Allowlist for the notification APIs.",
2425
+ "description": "Allowlist for the notification APIs.\n\nSee more: https://tauri.app/v1/api/config#notificationallowlistconfig",
2296
2426
  "type": "object",
2297
2427
  "properties": {
2298
2428
  "all": {
@@ -2304,7 +2434,7 @@
2304
2434
  "additionalProperties": false
2305
2435
  },
2306
2436
  "GlobalShortcutAllowlistConfig": {
2307
- "description": "Allowlist for the global shortcut APIs.",
2437
+ "description": "Allowlist for the global shortcut APIs.\n\nSee more: https://tauri.app/v1/api/config#globalshortcutallowlistconfig",
2308
2438
  "type": "object",
2309
2439
  "properties": {
2310
2440
  "all": {
@@ -2316,7 +2446,7 @@
2316
2446
  "additionalProperties": false
2317
2447
  },
2318
2448
  "OsAllowlistConfig": {
2319
- "description": "Allowlist for the OS APIs.",
2449
+ "description": "Allowlist for the OS APIs.\n\nSee more: https://tauri.app/v1/api/config#osallowlistconfig",
2320
2450
  "type": "object",
2321
2451
  "properties": {
2322
2452
  "all": {
@@ -2328,7 +2458,7 @@
2328
2458
  "additionalProperties": false
2329
2459
  },
2330
2460
  "PathAllowlistConfig": {
2331
- "description": "Allowlist for the path APIs.",
2461
+ "description": "Allowlist for the path APIs.\n\nSee more: https://tauri.app/v1/api/config#pathallowlistconfig",
2332
2462
  "type": "object",
2333
2463
  "properties": {
2334
2464
  "all": {
@@ -2340,7 +2470,7 @@
2340
2470
  "additionalProperties": false
2341
2471
  },
2342
2472
  "ProtocolAllowlistConfig": {
2343
- "description": "Allowlist for the custom protocols.",
2473
+ "description": "Allowlist for the custom protocols.\n\nSee more: https://tauri.app/v1/api/config#protocolallowlistconfig",
2344
2474
  "type": "object",
2345
2475
  "properties": {
2346
2476
  "assetScope": {
@@ -2366,7 +2496,7 @@
2366
2496
  "additionalProperties": false
2367
2497
  },
2368
2498
  "ProcessAllowlistConfig": {
2369
- "description": "Allowlist for the process APIs.",
2499
+ "description": "Allowlist for the process APIs.\n\nSee more: https://tauri.app/v1/api/config#processallowlistconfig",
2370
2500
  "type": "object",
2371
2501
  "properties": {
2372
2502
  "all": {
@@ -2393,7 +2523,7 @@
2393
2523
  "additionalProperties": false
2394
2524
  },
2395
2525
  "ClipboardAllowlistConfig": {
2396
- "description": "Allowlist for the clipboard APIs.",
2526
+ "description": "Allowlist for the clipboard APIs.\n\nSee more: https://tauri.app/v1/api/config#clipboardallowlistconfig",
2397
2527
  "type": "object",
2398
2528
  "properties": {
2399
2529
  "all": {
@@ -2415,7 +2545,7 @@
2415
2545
  "additionalProperties": false
2416
2546
  },
2417
2547
  "AppAllowlistConfig": {
2418
- "description": "Allowlist for the app APIs.",
2548
+ "description": "Allowlist for the app APIs.\n\nSee more: https://tauri.app/v1/api/config#appallowlistconfig",
2419
2549
  "type": "object",
2420
2550
  "properties": {
2421
2551
  "all": {
@@ -2437,7 +2567,7 @@
2437
2567
  "additionalProperties": false
2438
2568
  },
2439
2569
  "SecurityConfig": {
2440
- "description": "Security configuration.",
2570
+ "description": "Security configuration.\n\nSee more: https://tauri.app/v1/api/config#securityconfig",
2441
2571
  "type": "object",
2442
2572
  "properties": {
2443
2573
  "csp": {
@@ -2475,6 +2605,14 @@
2475
2605
  "$ref": "#/definitions/DisabledCspModificationKind"
2476
2606
  }
2477
2607
  ]
2608
+ },
2609
+ "dangerousRemoteDomainIpcAccess": {
2610
+ "description": "Allow external domains to send command to Tauri.\n\nBy default, external domains do not have access to `window.__TAURI__`, which means they cannot communicate with the commands defined in Rust. This prevents attacks where an externally loaded malicious or compromised sites could start executing commands on the user's device.\n\nThis configuration allows a set of external domains to have access to the Tauri commands. When you configure a domain to be allowed to access the IPC, all subpaths are allowed. Subdomains are not allowed.\n\n**WARNING:** Only use this option if you either have internal checks against malicious external sites or you can trust the allowed external sites. You application might be vulnerable to dangerous Tauri command related attacks otherwise.",
2611
+ "default": [],
2612
+ "type": "array",
2613
+ "items": {
2614
+ "$ref": "#/definitions/RemoteDomainAccessScope"
2615
+ }
2478
2616
  }
2479
2617
  },
2480
2618
  "additionalProperties": false
@@ -2527,8 +2665,50 @@
2527
2665
  }
2528
2666
  ]
2529
2667
  },
2668
+ "RemoteDomainAccessScope": {
2669
+ "description": "External command access definition.",
2670
+ "type": "object",
2671
+ "required": [
2672
+ "domain",
2673
+ "windows"
2674
+ ],
2675
+ "properties": {
2676
+ "scheme": {
2677
+ "description": "The URL scheme to allow. By default, all schemas are allowed.",
2678
+ "type": [
2679
+ "string",
2680
+ "null"
2681
+ ]
2682
+ },
2683
+ "domain": {
2684
+ "description": "The domain to allow.",
2685
+ "type": "string"
2686
+ },
2687
+ "windows": {
2688
+ "description": "The list of window labels this scope applies to.",
2689
+ "type": "array",
2690
+ "items": {
2691
+ "type": "string"
2692
+ }
2693
+ },
2694
+ "plugins": {
2695
+ "description": "The list of plugins that are allowed in this scope.",
2696
+ "default": [],
2697
+ "type": "array",
2698
+ "items": {
2699
+ "type": "string"
2700
+ }
2701
+ },
2702
+ "enableTauriAPI": {
2703
+ "description": "Enables access to the Tauri API.",
2704
+ "default": false,
2705
+ "type": "boolean"
2706
+ }
2707
+ },
2708
+ "additionalProperties": false
2709
+ },
2530
2710
  "UpdaterConfig": {
2531
- "description": "The Updater configuration object.",
2711
+ "description": "The Updater configuration object.\n\nSee more: https://tauri.app/v1/api/config#updaterconfig",
2532
2712
  "type": "object",
2533
2713
  "properties": {
2534
2714
  "active": {
@@ -2559,7 +2739,8 @@
2559
2739
  "windows": {
2560
2740
  "description": "The Windows configuration for the updater.",
2561
2741
  "default": {
2562
- "installMode": "passive"
2742
+ "installMode": "passive",
2743
+ "installerArgs": []
2563
2744
  },
2564
2745
  "allOf": [
2565
2746
  {
@@ -2576,9 +2757,17 @@
2576
2757
  "format": "uri"
2577
2758
  },
2578
2759
  "UpdaterWindowsConfig": {
2579
- "description": "The updater configuration for Windows.",
2760
+ "description": "The updater configuration for Windows.\n\nSee more: https://tauri.app/v1/api/config#updaterwindowsconfig",
2580
2761
  "type": "object",
2581
2762
  "properties": {
2763
+ "installerArgs": {
2764
+ "description": "Additional arguments given to the NSIS or WiX installer.",
2765
+ "default": [],
2766
+ "type": "array",
2767
+ "items": {
2768
+ "type": "string"
2769
+ }
2770
+ },
2582
2771
  "installMode": {
2583
2772
  "description": "The installation mode for the update on Windows. Defaults to `passive`.",
2584
2773
  "default": "passive",
@@ -2602,7 +2791,7 @@
2602
2791
  ]
2603
2792
  },
2604
2793
  {
2605
- "description": "The quiet mode means there's no user interaction required. Requires admin privileges if the installer does.",
2794
+ "description": "The quiet mode means there's no user interaction required. Requires admin privileges if the installer does (WiX).",
2606
2795
  "type": "string",
2607
2796
  "enum": [
2608
2797
  "quiet"
@@ -2618,7 +2807,7 @@
2618
2807
  ]
2619
2808
  },
2620
2809
  "SystemTrayConfig": {
2621
- "description": "Configuration for application system tray icon.",
2810
+ "description": "Configuration for application system tray icon.\n\nSee more: https://tauri.app/v1/api/config#systemtrayconfig",
2622
2811
  "type": "object",
2623
2812
  "required": [
2624
2813
  "iconPath"
@@ -2649,7 +2838,7 @@
2649
2838
  "additionalProperties": false
2650
2839
  },
2651
2840
  "BuildConfig": {
2652
- "description": "The Build configuration object.",
2841
+ "description": "The Build configuration object.\n\nSee more: https://tauri.app/v1/api/config#buildconfig",
2653
2842
  "type": "object",
2654
2843
  "properties": {
2655
2844
  "runner": {
@@ -2812,7 +3001,7 @@
2812
3001
  ]
2813
3002
  },
2814
3003
  "PluginConfig": {
2815
- "description": "The plugin configs holds a HashMap mapping a plugin name to its configuration object.",
3004
+ "description": "The plugin configs holds a HashMap mapping a plugin name to its configuration object.\n\nSee more: https://tauri.app/v1/api/config#pluginconfig",
2816
3005
  "type": "object",
2817
3006
  "additionalProperties": true
2818
3007
  }
package/src/lib.rs CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright 2019-2022 Tauri Programme within The Commons Conservancy
1
+ // Copyright 2019-2023 Tauri Programme within The Commons Conservancy
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  // SPDX-License-Identifier: MIT
4
4
 
package/tauri.js CHANGED
@@ -1,5 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
 
3
+ // Copyright 2019-2023 Tauri Programme within The Commons Conservancy
4
+ // SPDX-License-Identifier: Apache-2.0
5
+ // SPDX-License-Identifier: MIT
6
+
3
7
  const cli = require('./main')
4
8
  const path = require('path')
5
9
 
@@ -16,7 +20,7 @@ if (bin === '@tauri-apps/cli') {
16
20
  }
17
21
  // Even if started by a package manager, the binary will be NodeJS.
18
22
  // Some distribution still use "nodejs" as the binary name.
19
- else if (binStem.match(/(nodejs|node)([1-9]*)*$/g)) {
23
+ else if (binStem.match(/(nodejs|node)\-?([1-9]*)*$/g)) {
20
24
  const managerStem = process.env.npm_execpath
21
25
  ? path.parse(process.env.npm_execpath).name.toLowerCase()
22
26
  : null