@pmate/cli 0.37.0 → 0.37.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.
@@ -98,4 +98,5 @@ function createDesktopCalls({ appId, instanceId, origin, BrowserWindow, ipcMain,
98
98
  stop() { generation++; unsubscribe?.(); unsubscribe = undefined; client?.close(); client = undefined; identity = undefined; destroy(); people.clear() },
99
99
  }
100
100
  }
101
- module.exports = { createDesktopCalls }
101
+ function supportsDesktopCalls(appId) { return ['pmate:hello', 'pmate:merry'].includes(appId) }
102
+ module.exports = { createDesktopCalls, supportsDesktopCalls }
@@ -7,7 +7,7 @@ const { installMediaPermissions } = require('./media.cjs')
7
7
  const { createDesktopNotifications } = require('./notifications.cjs')
8
8
  const { desktopInstanceId, createDesktopReach } = require('./reach.cjs')
9
9
  const { createRendererReach } = require('./reach-renderer.cjs')
10
- const { createDesktopCalls } = require('./calls.cjs')
10
+ const { createDesktopCalls, supportsDesktopCalls } = require('./calls.cjs')
11
11
  const config = require('./desktop-config.json')
12
12
  const manifest = require('./resource-manifest.json')
13
13
  app.setName(config.productName)
@@ -75,7 +75,7 @@ else {
75
75
  installUpdateHandlers({ ipcMain, app, shell, appId: config.app, trusted: event => desktopNotifications.trusted(event) })
76
76
  const instanceId = desktopInstanceId(app.getPath('userData'))
77
77
  const rendererReach = createRendererReach({ ipcMain, getWindow: () => mainWindow, trusted: event => desktopNotifications.trusted(event) })
78
- if (config.app === 'pmate:hello') desktopCalls = createDesktopCalls({ appId: config.app, instanceId, origin: config.origin, BrowserWindow, ipcMain, dialog })
78
+ if (supportsDesktopCalls(config.app)) desktopCalls = createDesktopCalls({ appId: config.app, instanceId, origin: config.origin, BrowserWindow, ipcMain, dialog })
79
79
  desktopReach = createDesktopReach({ appId: config.app, instanceId, present: input => desktopNotifications.display(input),
80
80
  configureCalls: identity => { rendererReach.reset(); return desktopCalls?.configure(identity) }, stopCalls: () => { rendererReach.reset(); desktopCalls?.stop() },
81
81
  incomingCall: (callId, teamId) => { if (!desktopCalls) throw new Error('Call handler unavailable'); return desktopCalls.incoming(callId, teamId) },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pmate/cli",
3
- "version": "0.37.0",
3
+ "version": "0.37.2",
4
4
  "description": "CLI utilities for the pMate project",
5
5
  "license": "MIT",
6
6
  "bin": {