@tauri-apps/cli 2.0.0-alpha.8 → 2.0.0-beta.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 +406 -0
- package/Cargo.toml +10 -8
- package/README.md +2 -2
- package/index.js +11 -1
- package/package.json +18 -16
- package/schema.json +1602 -2173
- package/tauri.js +5 -5
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, ...
|
|
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)\-?([
|
|
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)\-?([1-9]*)*$/g)) {
|
|
|
32
32
|
manager = 'npm'
|
|
33
33
|
break
|
|
34
34
|
|
|
35
|
-
// Yarn and
|
|
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)\-?([1-9]*)*$/g)) {
|
|
|
48
48
|
}
|
|
49
49
|
} else {
|
|
50
50
|
// We don't know what started it, assume it's already stripped.
|
|
51
|
-
|
|
51
|
+
args.unshift(bin)
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
cli.run(
|
|
54
|
+
cli.run(args, binName).catch((err) => {
|
|
55
55
|
cli.logError(err.message)
|
|
56
56
|
process.exit(1)
|
|
57
57
|
})
|