pinokiod 3.141.0 → 3.143.0

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.
Files changed (2) hide show
  1. package/kernel/util.js +12 -10
  2. package/package.json +1 -1
package/kernel/util.js CHANGED
@@ -36,11 +36,16 @@ const pushListeners = new Set()
36
36
  let cachedMacNotifierPath
37
37
 
38
38
  function resolveAsarPath(p) {
39
- if (!p || p.includes('app.asar.unpacked')) {
39
+ if (!p || p.includes('app.asar.unpacked') || !p.includes('app.asar')) {
40
40
  return p
41
41
  }
42
- if (p.includes('app.asar')) {
43
- return p.replace('app.asar', 'app.asar.unpacked')
42
+ const candidate = p.replace('app.asar', 'app.asar.unpacked')
43
+ try {
44
+ if (fs.existsSync(candidate)) {
45
+ return candidate
46
+ }
47
+ } catch (_) {
48
+ // ignore fs errors and fall back to the original path
44
49
  }
45
50
  return p
46
51
  }
@@ -141,6 +146,10 @@ function ensureNotifierBinaries() {
141
146
  if ((mode & 0o111) === 0) {
142
147
  fs.chmodSync(binaryPath, mode | 0o755)
143
148
  }
149
+ if (!notifier.options) {
150
+ notifier.options = {}
151
+ }
152
+ notifier.options.customPath = binaryPath
144
153
  } catch (err) {
145
154
  console.warn('Warning: unable to update terminal-notifier permissions:', err.message)
146
155
  }
@@ -845,13 +854,6 @@ function push(params) {
845
854
  notifyParams.appID = WINDOWS_TOAST_APP_ID
846
855
  }
847
856
  }
848
- if (platform === 'darwin') {
849
- const macNotifierPath = getMacNotifierBinaryPath()
850
- if (macNotifierPath) {
851
- notifyParams.customPath = macNotifierPath
852
- }
853
- }
854
-
855
857
  const clientSoundUrl = soundTargetToClientUrl(customSoundTarget)
856
858
  if (customSoundTarget) {
857
859
  notifyParams.sound = false
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "3.141.0",
3
+ "version": "3.143.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {