@tauri-apps/cli 1.4.0 → 1.5.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,23 @@
1
1
  # Changelog
2
2
 
3
+ ## \[1.5.0]
4
+
5
+ ### New Features
6
+
7
+ - [`e1526626`](https://www.github.com/tauri-apps/tauri/commit/e152662687ece7a62d383923a50751cc0dd34331)([#7723](https://www.github.com/tauri-apps/tauri/pull/7723)) Support Bun package manager in CLI
8
+
9
+ ### Enhancements
10
+
11
+ - [`13279917`](https://www.github.com/tauri-apps/tauri/commit/13279917d4cae071d0ce3a686184d48af079f58a)([#7713](https://www.github.com/tauri-apps/tauri/pull/7713)) Add version of Rust Tauri CLI installed with Cargo to `tauri info` command.
12
+
13
+ ### Bug Fixes
14
+
15
+ - [`dad4f54e`](https://www.github.com/tauri-apps/tauri/commit/dad4f54eec9773d2ea6233a7d9fd218741173823)([#7277](https://www.github.com/tauri-apps/tauri/pull/7277)) Removed the automatic version check of the CLI that ran after `tauri` commands which caused various issues.
16
+
17
+ ### Dependencies
18
+
19
+ - Upgraded to `tauri-cli@1.5.0`
20
+
3
21
  ## \[1.4.0]
4
22
 
5
23
  ### New Features
package/README.md CHANGED
@@ -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 [tauri-cli](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`, `yarn`, and `bun`, 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/index.js CHANGED
@@ -17,7 +17,7 @@ function isMusl() {
17
17
  // For Node 10
18
18
  if (!process.report || typeof process.report.getReport !== 'function') {
19
19
  try {
20
- const lddPath = require('child_process').execSync('which ldd').toString().trim();
20
+ const lddPath = require('child_process').execSync('which ldd').toString().trim()
21
21
  return readFileSync(lddPath, 'utf8').includes('musl')
22
22
  } catch (e) {
23
23
  return true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tauri-apps/cli",
3
- "version": "1.4.0",
3
+ "version": "1.5.0",
4
4
  "description": "Command line interface for building Tauri apps",
5
5
  "funding": {
6
6
  "type": "opencollective",
@@ -47,7 +47,7 @@
47
47
  "prettier": "2.8.8"
48
48
  },
49
49
  "resolutions": {
50
- "json5": "2.2.3"
50
+ "semver": ">=7.5.2"
51
51
  },
52
52
  "engines": {
53
53
  "node": ">= 10"
@@ -68,15 +68,15 @@
68
68
  "format:check": "prettier --check ./package.json ./tauri.js"
69
69
  },
70
70
  "optionalDependencies": {
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"
71
+ "@tauri-apps/cli-win32-x64-msvc": "1.5.0",
72
+ "@tauri-apps/cli-darwin-x64": "1.5.0",
73
+ "@tauri-apps/cli-linux-x64-gnu": "1.5.0",
74
+ "@tauri-apps/cli-darwin-arm64": "1.5.0",
75
+ "@tauri-apps/cli-linux-arm64-gnu": "1.5.0",
76
+ "@tauri-apps/cli-linux-arm64-musl": "1.5.0",
77
+ "@tauri-apps/cli-linux-arm-gnueabihf": "1.5.0",
78
+ "@tauri-apps/cli-linux-x64-musl": "1.5.0",
79
+ "@tauri-apps/cli-win32-ia32-msvc": "1.5.0",
80
+ "@tauri-apps/cli-win32-arm64-msvc": "1.5.0"
81
81
  }
82
82
  }
package/schema.json CHANGED
@@ -167,6 +167,7 @@
167
167
  "security": {
168
168
  "dangerousDisableAssetCspModification": false,
169
169
  "dangerousRemoteDomainIpcAccess": [],
170
+ "dangerousUseHttpScheme": false,
170
171
  "freezePrototype": false
171
172
  },
172
173
  "updater": {
@@ -423,6 +424,7 @@
423
424
  "default": {
424
425
  "dangerousDisableAssetCspModification": false,
425
426
  "dangerousRemoteDomainIpcAccess": [],
427
+ "dangerousUseHttpScheme": false,
426
428
  "freezePrototype": false
427
429
  },
428
430
  "allOf": [
@@ -1074,13 +1076,14 @@
1074
1076
  },
1075
1077
  "resources": {
1076
1078
  "description": "App resources to bundle. Each resource is a path to a file or directory. Glob patterns are supported.",
1077
- "type": [
1078
- "array",
1079
- "null"
1080
- ],
1081
- "items": {
1082
- "type": "string"
1083
- }
1079
+ "anyOf": [
1080
+ {
1081
+ "$ref": "#/definitions/BundleResources"
1082
+ },
1083
+ {
1084
+ "type": "null"
1085
+ }
1086
+ ]
1084
1087
  },
1085
1088
  "copyright": {
1086
1089
  "description": "A copyright string associated with your application.",
@@ -1258,6 +1261,25 @@
1258
1261
  }
1259
1262
  ]
1260
1263
  },
1264
+ "BundleResources": {
1265
+ "description": "Definition for bundle resources. Can be either a list of paths to include or a map of source to target paths.",
1266
+ "anyOf": [
1267
+ {
1268
+ "description": "A list of paths to include.",
1269
+ "type": "array",
1270
+ "items": {
1271
+ "type": "string"
1272
+ }
1273
+ },
1274
+ {
1275
+ "description": "A map of source to target paths.",
1276
+ "type": "object",
1277
+ "additionalProperties": {
1278
+ "type": "string"
1279
+ }
1280
+ }
1281
+ ]
1282
+ },
1261
1283
  "AppImageConfig": {
1262
1284
  "description": "Configuration for AppImage bundles.\n\nSee more: https://tauri.app/v1/api/config#appimageconfig",
1263
1285
  "type": "object",
@@ -1757,6 +1779,17 @@
1757
1779
  "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.",
1758
1780
  "default": false,
1759
1781
  "type": "boolean"
1782
+ },
1783
+ "compression": {
1784
+ "description": "Set the compression algorithm used to compress files in the installer.\n\nSee <https://nsis.sourceforge.io/Reference/SetCompressor>",
1785
+ "anyOf": [
1786
+ {
1787
+ "$ref": "#/definitions/NsisCompression"
1788
+ },
1789
+ {
1790
+ "type": "null"
1791
+ }
1792
+ ]
1760
1793
  }
1761
1794
  },
1762
1795
  "additionalProperties": false
@@ -1787,6 +1820,32 @@
1787
1820
  }
1788
1821
  ]
1789
1822
  },
1823
+ "NsisCompression": {
1824
+ "description": "Compression algorithms used in the NSIS installer.\n\nSee <https://nsis.sourceforge.io/Reference/SetCompressor>",
1825
+ "oneOf": [
1826
+ {
1827
+ "description": "ZLIB uses the deflate algorithm, it is a quick and simple method. With the default compression level it uses about 300 KB of memory.",
1828
+ "type": "string",
1829
+ "enum": [
1830
+ "zlib"
1831
+ ]
1832
+ },
1833
+ {
1834
+ "description": "BZIP2 usually gives better compression ratios than ZLIB, but it is a bit slower and uses more memory. With the default compression level it uses about 4 MB of memory.",
1835
+ "type": "string",
1836
+ "enum": [
1837
+ "bzip2"
1838
+ ]
1839
+ },
1840
+ {
1841
+ "description": "LZMA (default) is a new compression method that gives very good compression ratios. The decompression speed is high (10-20 MB/s on a 2 GHz CPU), the compression speed is lower. The memory size that will be used for decompression is the dictionary size plus a few KBs, the default is 8 MB.",
1842
+ "type": "string",
1843
+ "enum": [
1844
+ "lzma"
1845
+ ]
1846
+ }
1847
+ ]
1848
+ },
1790
1849
  "AllowlistConfig": {
1791
1850
  "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.",
1792
1851
  "type": "object",
@@ -2102,7 +2161,7 @@
2102
2161
  }
2103
2162
  },
2104
2163
  "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",
2164
+ "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 `true` on Unix systems and `false` on Windows",
2106
2165
  "type": [
2107
2166
  "boolean",
2108
2167
  "null"
@@ -2683,6 +2742,11 @@
2683
2742
  "items": {
2684
2743
  "$ref": "#/definitions/RemoteDomainAccessScope"
2685
2744
  }
2745
+ },
2746
+ "dangerousUseHttpScheme": {
2747
+ "description": "Sets whether the custom protocols should use `http://<scheme>.localhost` instead of the default `https://<scheme>.localhost` on Windows.\n\n**WARNING:** Using a `http` scheme will allow mixed content when trying to fetch `http` endpoints and is therefore less secure but will match the behavior of the `<scheme>://localhost` protocols used on macOS and Linux.",
2748
+ "default": false,
2749
+ "type": "boolean"
2686
2750
  }
2687
2751
  },
2688
2752
  "additionalProperties": false
@@ -2762,7 +2826,7 @@
2762
2826
  }
2763
2827
  },
2764
2828
  "plugins": {
2765
- "description": "The list of plugins that are allowed in this scope.",
2829
+ "description": "The list of plugins that are allowed in this scope. The names should be without the `tauri-plugin-` prefix, for example `\"store\"` for `tauri-plugin-store`.",
2766
2830
  "default": [],
2767
2831
  "type": "array",
2768
2832
  "items": {
package/tauri.js CHANGED
@@ -7,7 +7,7 @@
7
7
  const cli = require('./main')
8
8
  const path = require('path')
9
9
 
10
- const [bin, script, ...arguments] = process.argv
10
+ const [bin, script, ...args] = process.argv
11
11
  const binStem = path.parse(bin).name.toLowerCase()
12
12
 
13
13
  // We want to make a helpful binary name for the underlying CLI helper, if we
@@ -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)\-?([0-9]*)*$/g)) {
23
+ else if (binStem.match(/(nodejs|node|bun)\-?([0-9]*)*$/g)) {
24
24
  const managerStem = process.env.npm_execpath
25
25
  ? path.parse(process.env.npm_execpath).name.toLowerCase()
26
26
  : null
@@ -32,7 +32,7 @@ else if (binStem.match(/(nodejs|node)\-?([0-9]*)*$/g)) {
32
32
  manager = 'npm'
33
33
  break
34
34
 
35
- // Yarn and pnpm have the same stem name as their bin.
35
+ // Yarn, pnpm, and bun have the same stem name as their bin.
36
36
  // We assume all unknown package managers do as well.
37
37
  default:
38
38
  manager = managerStem
@@ -48,10 +48,10 @@ else if (binStem.match(/(nodejs|node)\-?([0-9]*)*$/g)) {
48
48
  }
49
49
  } else {
50
50
  // We don't know what started it, assume it's already stripped.
51
- arguments.unshift(bin)
51
+ args.unshift(bin)
52
52
  }
53
53
 
54
- cli.run(arguments, binName).catch((err) => {
54
+ cli.run(args, binName).catch((err) => {
55
55
  cli.logError(err.message)
56
56
  process.exit(1)
57
57
  })