@bobfrankston/msger 0.1.197 → 0.1.198
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.js +8 -0
package/package.json
CHANGED
package/shower.js
CHANGED
|
@@ -345,6 +345,14 @@ export function showService(options) {
|
|
|
345
345
|
rustOptions.height = rustOptions.size.height;
|
|
346
346
|
delete rustOptions.size;
|
|
347
347
|
}
|
|
348
|
+
// Convert local paths to file:// URLs (same as createMessageBoxHandle)
|
|
349
|
+
if (rustOptions.url && !rustOptions.url.startsWith("http://") && !rustOptions.url.startsWith("https://") && !rustOptions.url.startsWith("file://")) {
|
|
350
|
+
const absolutePath = path.resolve(rustOptions.url);
|
|
351
|
+
if (!fs.existsSync(absolutePath)) {
|
|
352
|
+
throw new Error(`File not found: ${absolutePath}`);
|
|
353
|
+
}
|
|
354
|
+
rustOptions.url = pathToFileURL(absolutePath).href;
|
|
355
|
+
}
|
|
348
356
|
child.stdin?.write(JSON.stringify(rustOptions) + "\n");
|
|
349
357
|
return new ServiceHandle(child);
|
|
350
358
|
}
|