@tauri-apps/cli 1.0.2 → 1.0.3
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 +17 -0
- package/Cargo.toml +3 -2
- package/index.d.ts +2 -1
- package/index.js +2 -1
- package/main.js +3 -1
- package/package.json +11 -11
- package/schema.json +5 -0
- package/src/lib.rs +25 -2
- package/tauri.js +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## \[1.0.3]
|
|
4
|
+
|
|
5
|
+
- Changed the app template to not set the default app menu as it is now set automatically on macOS which is the platform that needs a menu to function properly.
|
|
6
|
+
- [91055883](https://www.github.com/tauri-apps/tauri/commit/9105588373cc8401bd9ad79bdef26f509b2d76b7) feat: add implicit default menu for macOS only, closes [#4551](https://www.github.com/tauri-apps/tauri/pull/4551) ([#4570](https://www.github.com/tauri-apps/tauri/pull/4570)) on 2022-07-04
|
|
7
|
+
- Improved bundle identifier validation showing the exact source of the configuration value.
|
|
8
|
+
- [8e3e7fc6](https://www.github.com/tauri-apps/tauri/commit/8e3e7fc64641afc7a6833bc93205e6f525562545) feat(cli): improve bundle identifier validation, closes [#4589](https://www.github.com/tauri-apps/tauri/pull/4589) ([#4596](https://www.github.com/tauri-apps/tauri/pull/4596)) on 2022-07-05
|
|
9
|
+
- Improve configuration deserialization error messages.
|
|
10
|
+
- [9170c920](https://www.github.com/tauri-apps/tauri/commit/9170c9207044fa561535f624916dfdbaa41ff79d) feat(core): improve config deserialization error messages ([#4607](https://www.github.com/tauri-apps/tauri/pull/4607)) on 2022-07-06
|
|
11
|
+
- Revert the `run` command to run in a separate thread.
|
|
12
|
+
- [f65eb4f8](https://www.github.com/tauri-apps/tauri/commit/f65eb4f84d8e511cd30d01d20a8223a297f7e584) fix(cli.js): revert `run` command to be nonblocking on 2022-07-04
|
|
13
|
+
- Skip the static link of the `vcruntime140.dll` if the `STATIC_VCRUNTIME` environment variable is set to `false`.
|
|
14
|
+
- [2e61abaa](https://www.github.com/tauri-apps/tauri/commit/2e61abaa9ae5d7a41ca1fa6505b5d6c368625ce5) feat(cli): allow dynamic link vcruntime, closes [#4565](https://www.github.com/tauri-apps/tauri/pull/4565) ([#4601](https://www.github.com/tauri-apps/tauri/pull/4601)) on 2022-07-06
|
|
15
|
+
- The `TAURI_CONFIG` environment variable now represents the configuration to be merged instead of the entire JSON.
|
|
16
|
+
- [fa028ebf](https://www.github.com/tauri-apps/tauri/commit/fa028ebf3c8ca7b43a70d283a01dbea86217594f) refactor: do not pass entire config from CLI to core, send patch instead ([#4598](https://www.github.com/tauri-apps/tauri/pull/4598)) on 2022-07-06
|
|
17
|
+
- Watch for Cargo workspace members in the `dev` file watcher.
|
|
18
|
+
- [dbb8c87b](https://www.github.com/tauri-apps/tauri/commit/dbb8c87b96dec9942b1bf877b29bafb8246514d4) feat(cli): watch Cargo workspaces in the dev command, closes [#4222](https://www.github.com/tauri-apps/tauri/pull/4222) ([#4572](https://www.github.com/tauri-apps/tauri/pull/4572)) on 2022-07-03
|
|
19
|
+
|
|
3
20
|
## \[1.0.2]
|
|
4
21
|
|
|
5
22
|
- Fixes a crash on the `signer sign` command.
|
package/Cargo.toml
CHANGED
|
@@ -8,9 +8,10 @@ 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
|
-
napi-derive = "2.
|
|
11
|
+
napi = { version = "2.6", default-features = false, features = ["napi4"] }
|
|
12
|
+
napi-derive = "2.6"
|
|
13
13
|
tauri-cli = { path = ".." }
|
|
14
|
+
log = "0.4.17"
|
|
14
15
|
|
|
15
16
|
[build-dependencies]
|
|
16
17
|
napi-build = "2.0"
|
package/index.d.ts
CHANGED
|
@@ -3,4 +3,5 @@
|
|
|
3
3
|
|
|
4
4
|
/* auto-generated by NAPI-RS */
|
|
5
5
|
|
|
6
|
-
export function run(args: Array<string>, binName
|
|
6
|
+
export function run(args: Array<string>, binName: string | undefined | null, callback: (...args: any[]) => any): void
|
|
7
|
+
export function logError(error: string): void
|
package/index.js
CHANGED
package/main.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const { run } = require('./index')
|
|
1
|
+
const { run, logError } = require('./index')
|
|
2
2
|
|
|
3
3
|
module.exports.run = (args, binName) => {
|
|
4
4
|
return new Promise((resolve, reject) => {
|
|
@@ -11,3 +11,5 @@ module.exports.run = (args, binName) => {
|
|
|
11
11
|
})
|
|
12
12
|
})
|
|
13
13
|
}
|
|
14
|
+
|
|
15
|
+
module.exports.logError = logError
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tauri-apps/cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Command line interface for building Tauri apps",
|
|
5
5
|
"funding": {
|
|
6
6
|
"type": "opencollective",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@napi-rs/cli": "2.10.
|
|
40
|
+
"@napi-rs/cli": "2.10.1",
|
|
41
41
|
"cross-env": "7.0.3",
|
|
42
42
|
"cross-spawn": "7.0.3",
|
|
43
43
|
"fs-extra": "10.1.0",
|
|
@@ -64,14 +64,14 @@
|
|
|
64
64
|
"format:check": "prettier --check ./package.json ./tauri.js"
|
|
65
65
|
},
|
|
66
66
|
"optionalDependencies": {
|
|
67
|
-
"@tauri-apps/cli-win32-x64-msvc": "1.0.
|
|
68
|
-
"@tauri-apps/cli-darwin-x64": "1.0.
|
|
69
|
-
"@tauri-apps/cli-linux-x64-gnu": "1.0.
|
|
70
|
-
"@tauri-apps/cli-darwin-arm64": "1.0.
|
|
71
|
-
"@tauri-apps/cli-linux-arm64-gnu": "1.0.
|
|
72
|
-
"@tauri-apps/cli-linux-arm64-musl": "1.0.
|
|
73
|
-
"@tauri-apps/cli-linux-arm-gnueabihf": "1.0.
|
|
74
|
-
"@tauri-apps/cli-linux-x64-musl": "1.0.
|
|
75
|
-
"@tauri-apps/cli-win32-ia32-msvc": "1.0.
|
|
67
|
+
"@tauri-apps/cli-win32-x64-msvc": "1.0.3",
|
|
68
|
+
"@tauri-apps/cli-darwin-x64": "1.0.3",
|
|
69
|
+
"@tauri-apps/cli-linux-x64-gnu": "1.0.3",
|
|
70
|
+
"@tauri-apps/cli-darwin-arm64": "1.0.3",
|
|
71
|
+
"@tauri-apps/cli-linux-arm64-gnu": "1.0.3",
|
|
72
|
+
"@tauri-apps/cli-linux-arm64-musl": "1.0.3",
|
|
73
|
+
"@tauri-apps/cli-linux-arm-gnueabihf": "1.0.3",
|
|
74
|
+
"@tauri-apps/cli-linux-x64-musl": "1.0.3",
|
|
75
|
+
"@tauri-apps/cli-win32-ia32-msvc": "1.0.3"
|
|
76
76
|
}
|
|
77
77
|
}
|
package/schema.json
CHANGED
|
@@ -2409,6 +2409,11 @@
|
|
|
2409
2409
|
"description": "A Boolean value that determines whether the image represents a [template](https://developer.apple.com/documentation/appkit/nsimage/1520017-template?language=objc) image on macOS.",
|
|
2410
2410
|
"default": false,
|
|
2411
2411
|
"type": "boolean"
|
|
2412
|
+
},
|
|
2413
|
+
"menuOnLeftClick": {
|
|
2414
|
+
"description": "A Boolean value that determines whether the menu should appear when the tray icon receives a left click on macOS.",
|
|
2415
|
+
"default": true,
|
|
2416
|
+
"type": "boolean"
|
|
2412
2417
|
}
|
|
2413
2418
|
},
|
|
2414
2419
|
"additionalProperties": false
|
package/src/lib.rs
CHANGED
|
@@ -2,7 +2,30 @@
|
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
// SPDX-License-Identifier: MIT
|
|
4
4
|
|
|
5
|
+
use napi::{
|
|
6
|
+
threadsafe_function::{ErrorStrategy, ThreadsafeFunction, ThreadsafeFunctionCallMode},
|
|
7
|
+
Error, JsFunction, Result, Status,
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
#[napi_derive::napi]
|
|
11
|
+
pub fn run(args: Vec<String>, bin_name: Option<String>, callback: JsFunction) -> Result<()> {
|
|
12
|
+
let function: ThreadsafeFunction<bool, ErrorStrategy::CalleeHandled> = callback
|
|
13
|
+
.create_threadsafe_function(0, |ctx| ctx.env.get_boolean(ctx.value).map(|v| vec![v]))?;
|
|
14
|
+
|
|
15
|
+
// we need to run in a separate thread so Node.js (e.g. vue-cli-plugin-tauri) consumers
|
|
16
|
+
// can do work while `tauri dev` is running.
|
|
17
|
+
std::thread::spawn(move || match tauri_cli::try_run(args, bin_name) {
|
|
18
|
+
Ok(_) => function.call(Ok(true), ThreadsafeFunctionCallMode::Blocking),
|
|
19
|
+
Err(e) => function.call(
|
|
20
|
+
Err(Error::new(Status::GenericFailure, format!("{:#}", e))),
|
|
21
|
+
ThreadsafeFunctionCallMode::Blocking,
|
|
22
|
+
),
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
Ok(())
|
|
26
|
+
}
|
|
27
|
+
|
|
5
28
|
#[napi_derive::napi]
|
|
6
|
-
pub fn
|
|
7
|
-
|
|
29
|
+
pub fn log_error(error: String) {
|
|
30
|
+
log::error!("{}", error);
|
|
8
31
|
}
|