@ramarivera/chofi 0.1.7 → 0.1.8
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/dist/drivers/apple.js +5 -1
- package/package.json +1 -1
package/dist/drivers/apple.js
CHANGED
|
@@ -383,7 +383,7 @@ function parseRunningApps(stdout) {
|
|
|
383
383
|
if (parts.length >= 3) {
|
|
384
384
|
const pidStr = parts[0];
|
|
385
385
|
const status = parts[1];
|
|
386
|
-
const bundleId = parts[2];
|
|
386
|
+
const bundleId = normalizeLaunchctlBundleId(parts[2]);
|
|
387
387
|
const pid = Number.parseInt(pidStr, 10);
|
|
388
388
|
if (!Number.isNaN(pid) && bundleId.includes(".")) {
|
|
389
389
|
apps.push({ bundleId, pid, status });
|
|
@@ -392,3 +392,7 @@ function parseRunningApps(stdout) {
|
|
|
392
392
|
}
|
|
393
393
|
return apps;
|
|
394
394
|
}
|
|
395
|
+
function normalizeLaunchctlBundleId(label) {
|
|
396
|
+
const match = /^UIKitApplication:([^\[]+)/.exec(label);
|
|
397
|
+
return match?.[1] ?? label;
|
|
398
|
+
}
|
package/package.json
CHANGED