pake-cli 3.2.17 → 3.3.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/README.md +15 -7
- package/dist/cli.js +135 -46
- package/package.json +6 -5
- package/src-tauri/.cargo/config.toml +11 -0
- package/src-tauri/.pake/pake.json +10 -8
- package/src-tauri/.pake/tauri.conf.json +5 -5
- package/src-tauri/.pake/tauri.macos.conf.json +3 -3
- package/src-tauri/Cargo.lock +267 -362
- package/src-tauri/Cargo.toml +6 -6
- package/src-tauri/pake.json +6 -4
- package/src-tauri/src/app/config.rs +1 -0
- package/src-tauri/src/app/window.rs +11 -10
- package/src-tauri/src/lib.rs +11 -2
package/src-tauri/Cargo.toml
CHANGED
|
@@ -18,17 +18,17 @@ crate-type = ["staticlib", "cdylib", "lib"]
|
|
|
18
18
|
tauri-build = { version = "2.4.0", features = [] }
|
|
19
19
|
|
|
20
20
|
[dependencies]
|
|
21
|
-
serde_json = "1.0.
|
|
21
|
+
serde_json = "1.0.143"
|
|
22
22
|
serde = { version = "1.0.219", features = ["derive"] }
|
|
23
23
|
tokio = { version = "1.47.1", features = ["full"] }
|
|
24
|
-
tauri = { version = "2.8.
|
|
24
|
+
tauri = { version = "2.8.4", features = ["tray-icon", "image-ico", "image-png", "macos-proxy"] }
|
|
25
25
|
tauri-plugin-window-state = "2.4.0"
|
|
26
26
|
tauri-plugin-oauth = "2.0.0"
|
|
27
|
-
tauri-plugin-http = "2.5.
|
|
27
|
+
tauri-plugin-http = "2.5.2"
|
|
28
28
|
tauri-plugin-global-shortcut = { version = "2.3.0" }
|
|
29
|
-
tauri-plugin-shell = "2.3.
|
|
30
|
-
tauri-plugin-single-instance = "2.3.
|
|
31
|
-
tauri-plugin-notification = "2.3.
|
|
29
|
+
tauri-plugin-shell = "2.3.1"
|
|
30
|
+
tauri-plugin-single-instance = "2.3.3"
|
|
31
|
+
tauri-plugin-notification = "2.3.1"
|
|
32
32
|
|
|
33
33
|
[features]
|
|
34
34
|
# this feature is used for development builds from development cli
|
package/src-tauri/pake.json
CHANGED
|
@@ -13,13 +13,15 @@
|
|
|
13
13
|
"activation_shortcut": "",
|
|
14
14
|
"disabled_web_shortcuts": false,
|
|
15
15
|
"hide_on_close": true,
|
|
16
|
-
"incognito": false
|
|
16
|
+
"incognito": false,
|
|
17
|
+
"enable_wasm": false,
|
|
18
|
+
"enable_drag_drop": false
|
|
17
19
|
}
|
|
18
20
|
],
|
|
19
21
|
"user_agent": {
|
|
20
|
-
"macos": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/
|
|
21
|
-
"linux": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/
|
|
22
|
-
"windows": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/
|
|
22
|
+
"macos": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.2 Safari/605.1.15",
|
|
23
|
+
"linux": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36",
|
|
24
|
+
"windows": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36"
|
|
23
25
|
},
|
|
24
26
|
"system_tray": {
|
|
25
27
|
"macos": false,
|
|
@@ -38,22 +38,25 @@ pub fn set_window(app: &mut App, config: &PakeConfig, tauri_config: &Config) ->
|
|
|
38
38
|
.fullscreen(window_config.fullscreen)
|
|
39
39
|
.inner_size(window_config.width, window_config.height)
|
|
40
40
|
.always_on_top(window_config.always_on_top)
|
|
41
|
-
.
|
|
42
|
-
|
|
41
|
+
.incognito(window_config.incognito);
|
|
42
|
+
|
|
43
|
+
if !window_config.enable_drag_drop {
|
|
44
|
+
window_builder = window_builder.disable_drag_drop_handler();
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
window_builder = window_builder
|
|
43
48
|
.initialization_script(&config_script)
|
|
44
49
|
.initialization_script(include_str!("../inject/component.js"))
|
|
45
50
|
.initialization_script(include_str!("../inject/event.js"))
|
|
46
51
|
.initialization_script(include_str!("../inject/style.js"))
|
|
47
52
|
.initialization_script(include_str!("../inject/custom.js"));
|
|
48
53
|
|
|
49
|
-
// Configure WASM support with required headers for SharedArrayBuffer
|
|
50
54
|
if window_config.enable_wasm {
|
|
51
55
|
window_builder = window_builder
|
|
52
56
|
.additional_browser_args("--enable-features=SharedArrayBuffer")
|
|
53
57
|
.additional_browser_args("--enable-unsafe-webgpu");
|
|
54
58
|
}
|
|
55
59
|
|
|
56
|
-
// Configure proxy if specified
|
|
57
60
|
if !config.proxy_url.is_empty() {
|
|
58
61
|
if let Ok(proxy_url) = Url::from_str(&config.proxy_url) {
|
|
59
62
|
window_builder = window_builder.proxy_url(proxy_url);
|
|
@@ -80,10 +83,9 @@ pub fn set_window(app: &mut App, config: &PakeConfig, tauri_config: &Config) ->
|
|
|
80
83
|
{
|
|
81
84
|
window_builder = window_builder
|
|
82
85
|
.data_directory(_data_dir)
|
|
83
|
-
.title(app.package_info().name.clone())
|
|
86
|
+
.title(app.package_info().name.clone())
|
|
87
|
+
.additional_browser_args("--disable-blink-features=AutomationControlled");
|
|
84
88
|
|
|
85
|
-
// Set theme to None for automatic system theme detection on Windows
|
|
86
|
-
// This allows the window to respond to system theme changes automatically
|
|
87
89
|
window_builder = window_builder.theme(None);
|
|
88
90
|
}
|
|
89
91
|
|
|
@@ -91,10 +93,9 @@ pub fn set_window(app: &mut App, config: &PakeConfig, tauri_config: &Config) ->
|
|
|
91
93
|
{
|
|
92
94
|
window_builder = window_builder
|
|
93
95
|
.data_directory(_data_dir)
|
|
94
|
-
.title(app.package_info().name.clone())
|
|
96
|
+
.title(app.package_info().name.clone())
|
|
97
|
+
.additional_browser_args("--disable-blink-features=AutomationControlled");
|
|
95
98
|
|
|
96
|
-
// Set theme to None for automatic system theme detection on Linux
|
|
97
|
-
// This allows the window to respond to system theme changes automatically
|
|
98
99
|
window_builder = window_builder.theme(None);
|
|
99
100
|
}
|
|
100
101
|
|
package/src-tauri/src/lib.rs
CHANGED
|
@@ -41,7 +41,13 @@ pub fn run_app() {
|
|
|
41
41
|
.plugin(tauri_plugin_http::init())
|
|
42
42
|
.plugin(tauri_plugin_shell::init())
|
|
43
43
|
.plugin(tauri_plugin_notification::init())
|
|
44
|
-
.plugin(tauri_plugin_single_instance::init(|
|
|
44
|
+
.plugin(tauri_plugin_single_instance::init(|app, _args, _cwd| {
|
|
45
|
+
if let Some(window) = app.get_webview_window("pake") {
|
|
46
|
+
let _ = window.unminimize();
|
|
47
|
+
let _ = window.show();
|
|
48
|
+
let _ = window.set_focus();
|
|
49
|
+
}
|
|
50
|
+
}))
|
|
45
51
|
.invoke_handler(tauri::generate_handler![
|
|
46
52
|
download_file,
|
|
47
53
|
download_file_by_binary,
|
|
@@ -64,6 +70,7 @@ pub fn run_app() {
|
|
|
64
70
|
.on_window_event(move |_window, _event| {
|
|
65
71
|
if let tauri::WindowEvent::CloseRequested { api, .. } = _event {
|
|
66
72
|
if hide_on_close {
|
|
73
|
+
// Hide window when hide_on_close is enabled (regardless of tray status)
|
|
67
74
|
let window = _window.clone();
|
|
68
75
|
tauri::async_runtime::spawn(async move {
|
|
69
76
|
#[cfg(target_os = "macos")]
|
|
@@ -77,8 +84,10 @@ pub fn run_app() {
|
|
|
77
84
|
window.hide().unwrap();
|
|
78
85
|
});
|
|
79
86
|
api.prevent_close();
|
|
87
|
+
} else {
|
|
88
|
+
// Exit app completely when hide_on_close is false
|
|
89
|
+
std::process::exit(0);
|
|
80
90
|
}
|
|
81
|
-
// If hide_on_close is false, allow normal close behavior
|
|
82
91
|
}
|
|
83
92
|
})
|
|
84
93
|
.run(tauri::generate_context!())
|