@pmate/cli 0.35.9 → 0.35.11

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.
@@ -1,5 +1,5 @@
1
1
  // Main-process presentation boundary. Only the configured app's top frame may invoke it.
2
- function createDesktopNotifications({ ipcMain, Notification, origin, appId, getWindow, showWindow, now = Date.now }) {
2
+ function createDesktopNotifications({ ipcMain, Notification, origin, appId, getWindow, showWindow, now = Date.now, platform = process.platform }) {
3
3
  let activeThreadId, pendingOpen, epoch = 0
4
4
  const shown = new Map()
5
5
  const pending = new Map()
@@ -34,7 +34,7 @@ function createDesktopNotifications({ ipcMain, Notification, origin, appId, getW
34
34
  }
35
35
  if (input.threadId && input.threadId === activeThreadId && window && window.isVisible() && window.isFocused() && !window.isMinimized()) return 'suppressed'
36
36
  if (!Notification.isSupported()) throw new Error('Desktop notifications unavailable')
37
- const notification = new Notification({ title: input.title, body: input.body, silent: false })
37
+ const notification = new Notification({ title: input.title, body: input.body, silent: false, ...(platform === 'darwin' ? { sound: 'Ping' } : {}) })
38
38
  const until = Math.min(input.expiresAtMs ?? now() + 86400000, now() + 86400000)
39
39
  const presentationEpoch = epoch
40
40
  const operation = new Promise((resolve, reject) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pmate/cli",
3
- "version": "0.35.9",
3
+ "version": "0.35.11",
4
4
  "description": "CLI utilities for the pMate project",
5
5
  "license": "MIT",
6
6
  "bin": {