pake-cli 3.15.1 โ 3.15.2
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 +6 -0
- package/dist/cli.js +1 -1
- package/package.json +1 -1
- package/src-tauri/Cargo.lock +1 -1
- package/src-tauri/Cargo.toml +1 -1
- package/src-tauri/src/app/setup.rs +4 -1
- package/src-tauri/src/app/window.rs +15 -0
- package/src-tauri/src/lib.rs +3 -1
- package/src-tauri/tauri.conf.json +1 -1
package/README.md
CHANGED
|
@@ -194,6 +194,12 @@ First-time packaging requires environment setup and may be slower, subsequent bu
|
|
|
194
194
|
|
|
195
195
|
Using Pake from a script or AI agent? Pass `--json` for machine-readable results, describe apps declaratively with `--config app.json` ([schema](schema/pake.schema.json)), and package local build output directly with `pake ./dist --name MyTool`. See [llms.txt](llms.txt) for the full agent contract. Claude Code users can install the official skill with `/plugin marketplace add tw93/Pake` and `/plugin install pake@pake`.
|
|
196
196
|
|
|
197
|
+
Copy this to your AI agent to get started:
|
|
198
|
+
|
|
199
|
+
```text
|
|
200
|
+
Use Pake (npm i -g pake-cli) to package webpages as desktop apps. Read https://raw.githubusercontent.com/tw93/Pake/main/llms.txt first; always run pake with --json and parse stdout as a single JSON object. Package <url-or-local-dist> into an app named <AppName>.
|
|
201
|
+
```
|
|
202
|
+
|
|
197
203
|
## Development
|
|
198
204
|
|
|
199
205
|
Requires Rust `>=1.85` and Node `>=22` (recommended LTS; `>=18` also works). For detailed installation guide, see [Tauri documentation](https://v2.tauri.app/start/prerequisites/). If unfamiliar with development environment, use the CLI tool instead.
|
package/dist/cli.js
CHANGED
|
@@ -20,7 +20,7 @@ import * as psl from 'psl';
|
|
|
20
20
|
import { InvalidArgumentError, program as program$1, Option } from 'commander';
|
|
21
21
|
|
|
22
22
|
var name = "pake-cli";
|
|
23
|
-
var version = "3.15.
|
|
23
|
+
var version = "3.15.2";
|
|
24
24
|
var description = "๐คฑ๐ป Turn any webpage into a desktop app with one command. ๐คฑ๐ป ไธ้ฎๆๅ
็ฝ้กต็ๆ่ฝป้ๆก้ขๅบ็จใ";
|
|
25
25
|
var engines = {
|
|
26
26
|
node: ">=18.0.0"
|
package/package.json
CHANGED
package/src-tauri/Cargo.lock
CHANGED
package/src-tauri/Cargo.toml
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
use crate::app::window::open_additional_window_safe;
|
|
1
|
+
use crate::app::window::{open_additional_window_safe, reapply_window_icon};
|
|
2
2
|
use std::str::FromStr;
|
|
3
3
|
use std::sync::{Arc, Mutex};
|
|
4
4
|
use std::time::{Duration, Instant};
|
|
@@ -56,6 +56,7 @@ pub fn set_system_tray(
|
|
|
56
56
|
"show_app" => {
|
|
57
57
|
if let Some(window) = app.get_webview_window("pake") {
|
|
58
58
|
let _ = window.show();
|
|
59
|
+
reapply_window_icon(&window);
|
|
59
60
|
#[cfg(target_os = "linux")]
|
|
60
61
|
if _init_fullscreen && !window.is_fullscreen().unwrap_or(false) {
|
|
61
62
|
let _ = window.set_fullscreen(true);
|
|
@@ -83,6 +84,7 @@ pub fn set_system_tray(
|
|
|
83
84
|
let _ = window.hide();
|
|
84
85
|
} else {
|
|
85
86
|
let _ = window.show();
|
|
87
|
+
reapply_window_icon(&window);
|
|
86
88
|
let _ = window.set_focus();
|
|
87
89
|
#[cfg(target_os = "linux")]
|
|
88
90
|
if _init_fullscreen && !window.is_fullscreen().unwrap_or(false) {
|
|
@@ -153,6 +155,7 @@ pub fn set_global_shortcut(
|
|
|
153
155
|
let _ = window.hide();
|
|
154
156
|
} else {
|
|
155
157
|
let _ = window.show();
|
|
158
|
+
reapply_window_icon(&window);
|
|
156
159
|
let _ = window.set_focus();
|
|
157
160
|
#[cfg(target_os = "linux")]
|
|
158
161
|
if _init_fullscreen && !window.is_fullscreen().unwrap_or(false) {
|
|
@@ -69,6 +69,21 @@ pub fn open_additional_window(app: &AppHandle) -> tauri::Result<WebviewWindow> {
|
|
|
69
69
|
build_window_with_label(app, &state.pake_config, &state.tauri_config, &label)
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
+
// Apps autostarted at Windows logon can register their window icon before
|
|
73
|
+
// Explorer's icon cache is ready, leaving a blank taskbar icon until the icon
|
|
74
|
+
// is asserted again (#1323), so re-apply it whenever a window becomes visible.
|
|
75
|
+
#[cfg(target_os = "windows")]
|
|
76
|
+
pub fn reapply_window_icon(window: &WebviewWindow) {
|
|
77
|
+
if let Some(icon) = window.app_handle().default_window_icon().cloned() {
|
|
78
|
+
if let Err(error) = window.set_icon(icon) {
|
|
79
|
+
eprintln!("[Pake] Failed to re-apply window icon: {error}");
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
#[cfg(not(target_os = "windows"))]
|
|
85
|
+
pub fn reapply_window_icon(_window: &WebviewWindow) {}
|
|
86
|
+
|
|
72
87
|
struct WindowBuildOptions<'a> {
|
|
73
88
|
label: &'a str,
|
|
74
89
|
url: WebviewUrl,
|
package/src-tauri/src/lib.rs
CHANGED
|
@@ -25,7 +25,7 @@ use app::{
|
|
|
25
25
|
set_dock_badge_label, set_zoom, update_theme_mode,
|
|
26
26
|
},
|
|
27
27
|
setup::{set_global_shortcut, set_system_tray},
|
|
28
|
-
window::{open_additional_window_safe, set_window, MultiWindowState},
|
|
28
|
+
window::{open_additional_window_safe, reapply_window_icon, set_window, MultiWindowState},
|
|
29
29
|
};
|
|
30
30
|
use util::get_pake_config;
|
|
31
31
|
|
|
@@ -179,6 +179,7 @@ pub fn run_app() {
|
|
|
179
179
|
} else if let Some(window) = app.get_webview_window("pake") {
|
|
180
180
|
let _ = window.unminimize();
|
|
181
181
|
let _ = window.show();
|
|
182
|
+
reapply_window_icon(&window);
|
|
182
183
|
let _ = window.set_focus();
|
|
183
184
|
}
|
|
184
185
|
},
|
|
@@ -231,6 +232,7 @@ pub fn run_app() {
|
|
|
231
232
|
tauri::async_runtime::spawn(async move {
|
|
232
233
|
tokio::time::sleep(tokio::time::Duration::from_millis(WINDOW_SHOW_DELAY)).await;
|
|
233
234
|
let _ = window_clone.show();
|
|
235
|
+
reapply_window_icon(&window_clone);
|
|
234
236
|
|
|
235
237
|
// Fixed: Linux fullscreen issue with virtual keyboard
|
|
236
238
|
#[cfg(target_os = "linux")]
|