pake-cli 3.2.16 → 3.2.18
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 +32 -21
- package/dist/cli.js +221 -182
- package/package.json +16 -13
- package/src-tauri/.cargo/config.toml +0 -11
- package/src-tauri/.pake/pake.json +6 -2
- package/src-tauri/.pake/tauri.conf.json +8 -6
- package/src-tauri/.pake/tauri.macos.conf.json +2 -3
- package/src-tauri/Cargo.lock +267 -362
- package/src-tauri/Cargo.toml +6 -6
- package/src-tauri/gen/schemas/capabilities.json +1 -1
- package/src-tauri/pake.json +3 -1
- package/src-tauri/src/app/config.rs +2 -0
- package/src-tauri/src/app/window.rs +15 -2
- package/src-tauri/src/lib.rs +11 -2
- package/src-tauri/tauri.conf.json +3 -0
- package/src-tauri/gen/schemas/windows-schema.json +0 -2326
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
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"pake-capability":{"identifier":"pake-capability","description":"Capability for the pake app.","remote":{"urls":["https://*.*"]},"local":true,"webviews":["pake"],"permissions":["shell:allow-open","core:window:allow-theme","core:window:allow-start-dragging","core:window:allow-toggle-maximize","core:window:allow-is-fullscreen","core:window:allow-set-fullscreen","core:webview:allow-internal-toggle-devtools","notification:allow-is-permission-granted","notification:allow-notify","notification:allow-get-active","notification:allow-register-listener","notification:allow-register-action-types","notification:default"]}}
|
|
1
|
+
{"pake-capability":{"identifier":"pake-capability","description":"Capability for the pake app.","remote":{"urls":["https://*.*"]},"local":true,"webviews":["pake"],"permissions":["shell:allow-open","core:window:allow-theme","core:window:allow-start-dragging","core:window:allow-toggle-maximize","core:window:allow-is-fullscreen","core:window:allow-set-fullscreen","core:webview:allow-internal-toggle-devtools","notification:allow-is-permission-granted","notification:allow-notify","notification:allow-get-active","notification:allow-register-listener","notification:allow-register-action-types","notification:default","core:path:default"]}}
|
package/src-tauri/pake.json
CHANGED
|
@@ -38,14 +38,27 @@ 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
|
+
// Conditionally disable drag-drop handler
|
|
44
|
+
if !window_config.enable_drag_drop {
|
|
45
|
+
window_builder = window_builder.disable_drag_drop_handler();
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
window_builder = window_builder
|
|
43
49
|
.initialization_script(&config_script)
|
|
44
50
|
.initialization_script(include_str!("../inject/component.js"))
|
|
45
51
|
.initialization_script(include_str!("../inject/event.js"))
|
|
46
52
|
.initialization_script(include_str!("../inject/style.js"))
|
|
47
53
|
.initialization_script(include_str!("../inject/custom.js"));
|
|
48
54
|
|
|
55
|
+
// Configure WASM support with required headers for SharedArrayBuffer
|
|
56
|
+
if window_config.enable_wasm {
|
|
57
|
+
window_builder = window_builder
|
|
58
|
+
.additional_browser_args("--enable-features=SharedArrayBuffer")
|
|
59
|
+
.additional_browser_args("--enable-unsafe-webgpu");
|
|
60
|
+
}
|
|
61
|
+
|
|
49
62
|
// Configure proxy if specified
|
|
50
63
|
if !config.proxy_url.is_empty() {
|
|
51
64
|
if let Ok(proxy_url) = Url::from_str(&config.proxy_url) {
|
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!())
|