@bobfrankston/msger 0.1.392 → 0.1.394
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/msger-native/bin/msgernative.exe +0 -0
- package/package.json +1 -1
- package/shower.d.ts +1 -0
- package/shower.js +15 -9
|
Binary file
|
package/package.json
CHANGED
package/shower.d.ts
CHANGED
|
@@ -59,6 +59,7 @@ export interface MessageBoxOptions {
|
|
|
59
59
|
render?: boolean | string; /** Render to a bitmap instead of displaying. The window stays hidden; after the page loads (plus renderDelay) a screenshot is captured and msger exits. A string is a file path to write — format from extension (.png/.jpg/.jpeg/.bmp), result.render = {format,width,height,path}. `true` returns the image in result.render = {format,width,height,data(base64)}. Windows (WebView2) only for now. */
|
|
60
60
|
renderDelay?: number; /** Render mode: settle delay in ms between the page's load event and the capture (fonts/images/async paint). Default 100. */
|
|
61
61
|
renderFormat?: string; /** Render mode image format: png (default), jpeg, or bmp. Derived from the file extension when `render` is a path; settable directly when `render: true`. */
|
|
62
|
+
profile?: string; /** Named WebView2 profile: user-data dir becomes `%LOCALAPPDATA%\<appName>\webview2-<profile>` so this window gets its OWN browser-process cluster. Windows sharing one user-data dir share one browser process — a crash there blacks out ALL of them. Pass a name (e.g. "popout") for secondary windows so they can't take the main window down. */
|
|
62
63
|
}
|
|
63
64
|
/** Screenshot returned in MessageBoxResult.render (render mode). Width/height
|
|
64
65
|
* are physical pixels — the capture includes the monitor's DPI scale, so a
|
package/shower.js
CHANGED
|
@@ -569,12 +569,18 @@ function createMessageBoxHandle(options) {
|
|
|
569
569
|
rustOptions.aumid = rustOptions.appUserModelId;
|
|
570
570
|
}
|
|
571
571
|
delete rustOptions.appUserModelId;
|
|
572
|
-
// Pass
|
|
572
|
+
// Pass appName so the Rust side scopes its WebView2 user-data
|
|
573
573
|
// dir per app (one wedged profile no longer takes out every
|
|
574
574
|
// msger-hosted app's state). _appName defaults to "msger" so
|
|
575
|
-
// legacy callers retain the old shared profile path.
|
|
576
|
-
|
|
577
|
-
|
|
575
|
+
// legacy callers retain the old shared profile path. camelCase
|
|
576
|
+
// ONLY — the Rust struct is rename_all=camelCase (snake_case
|
|
577
|
+
// was silently dropped for months; aumid fallback masked it),
|
|
578
|
+
// and now that the binary also ALIASES app_name, sending both
|
|
579
|
+
// keys is a serde duplicate-field PANIC at boot (the 2026-07-15
|
|
580
|
+
// "window flashes and vanishes" incident).
|
|
581
|
+
if (!rustOptions.appName)
|
|
582
|
+
rustOptions.appName = rustOptions.app_name ?? _appName;
|
|
583
|
+
delete rustOptions.app_name;
|
|
578
584
|
const jsonToSend = JSON.stringify(rustOptions);
|
|
579
585
|
// If detached, resolve immediately after stdin is closed
|
|
580
586
|
if (options.detach) {
|
|
@@ -713,11 +719,11 @@ export function showService(options) {
|
|
|
713
719
|
}
|
|
714
720
|
delete rustOptions.appUserModelId;
|
|
715
721
|
// Per-app WebView2 profile dir — see corresponding showMessageBox path
|
|
716
|
-
// for rationale.
|
|
717
|
-
//
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
722
|
+
// for rationale. camelCase ONLY: with the binary's app_name alias,
|
|
723
|
+
// sending both keys is a serde duplicate-field panic at boot.
|
|
724
|
+
if (!rustOptions.appName)
|
|
725
|
+
rustOptions.appName = rustOptions.app_name ?? _appName;
|
|
726
|
+
delete rustOptions.app_name;
|
|
721
727
|
const jsonToSend = JSON.stringify(rustOptions);
|
|
722
728
|
if (process.env.MSGER_DEBUG)
|
|
723
729
|
console.log(`[service] Sending to Rust: ${jsonToSend.slice(0, 200)}`);
|