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.
@@ -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.142"
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.0", features = ["tray-icon", "image-ico", "image-png", "macos-proxy"] }
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.1"
27
+ tauri-plugin-http = "2.5.2"
28
28
  tauri-plugin-global-shortcut = { version = "2.3.0" }
29
- tauri-plugin-shell = "2.3.0"
30
- tauri-plugin-single-instance = "2.3.2"
31
- tauri-plugin-notification = "2.3.0"
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"]}}
@@ -13,7 +13,9 @@
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": {
@@ -16,6 +16,8 @@ pub struct WindowConfig {
16
16
  pub hide_on_close: bool,
17
17
  pub incognito: bool,
18
18
  pub title: Option<String>,
19
+ pub enable_wasm: bool,
20
+ pub enable_drag_drop: bool,
19
21
  }
20
22
 
21
23
  #[derive(Debug, Serialize, Deserialize)]
@@ -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
- .disable_drag_drop_handler()
42
- .incognito(window_config.incognito)
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) {
@@ -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!())
@@ -8,6 +8,9 @@
8
8
  "iconPath": "png/weekly_512.png",
9
9
  "iconAsTemplate": false,
10
10
  "id": "pake-tray"
11
+ },
12
+ "security": {
13
+ "headers": {}
11
14
  }
12
15
  },
13
16
  "build": {