@bobfrankston/msger 0.1.323 → 0.1.325
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/package.json +1 -1
- package/shower.d.ts +1 -0
- package/shower.js +10 -2
package/package.json
CHANGED
package/shower.d.ts
CHANGED
|
@@ -41,6 +41,7 @@ export interface MessageBoxOptions {
|
|
|
41
41
|
debug?: boolean; /** Return debug information (HTML, size) in result (default: false) */
|
|
42
42
|
showVersion?: boolean; /** Show version in window title (default: false) */
|
|
43
43
|
appUserModelId?: string; /** Windows AppUserModelID for taskbar pinning (internal use) */
|
|
44
|
+
aumid?: string; /** Same as appUserModelId — short name for callers (forwarded to Rust) */
|
|
44
45
|
initScript?: string; /** Custom JS injected into WebView alongside msger-api.js (inline) */
|
|
45
46
|
initScriptPath?: string; /** Path to JS file injected into WebView (avoids large JSON) */
|
|
46
47
|
service?: boolean; /** Service mode: bidirectional IPC with parent. Stdin/stdout stay open. */
|
package/shower.js
CHANGED
|
@@ -264,9 +264,12 @@ function createMessageBoxHandle(options) {
|
|
|
264
264
|
screen: rustOptions.pos.screen
|
|
265
265
|
};
|
|
266
266
|
}
|
|
267
|
+
// Normalize aumid: both appUserModelId and aumid → aumid (Rust field name)
|
|
268
|
+
if (!rustOptions.aumid && rustOptions.appUserModelId) {
|
|
269
|
+
rustOptions.aumid = rustOptions.appUserModelId;
|
|
270
|
+
}
|
|
271
|
+
delete rustOptions.appUserModelId;
|
|
267
272
|
const jsonToSend = JSON.stringify(rustOptions);
|
|
268
|
-
// DEBUG: Uncomment to see what's being sent
|
|
269
|
-
// console.error('[DEBUG] JSON sent to native binary:', jsonToSend);
|
|
270
273
|
// If detached, resolve immediately after stdin is closed
|
|
271
274
|
if (options.detach) {
|
|
272
275
|
child.stdin.write(jsonToSend);
|
|
@@ -398,6 +401,11 @@ export function showService(options) {
|
|
|
398
401
|
if (rustOptions.contentDir) {
|
|
399
402
|
rustOptions.contentDir = path.resolve(rustOptions.contentDir);
|
|
400
403
|
}
|
|
404
|
+
// Normalize aumid: both appUserModelId and aumid → aumid (Rust field name)
|
|
405
|
+
if (!rustOptions.aumid && rustOptions.appUserModelId) {
|
|
406
|
+
rustOptions.aumid = rustOptions.appUserModelId;
|
|
407
|
+
}
|
|
408
|
+
delete rustOptions.appUserModelId;
|
|
401
409
|
const jsonToSend = JSON.stringify(rustOptions);
|
|
402
410
|
console.error(`[service] Sending to Rust: ${jsonToSend.slice(0, 200)}`);
|
|
403
411
|
child.stdin?.write(jsonToSend + "\n");
|