adhdev 0.9.76-rc.52 → 0.9.76-rc.53
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/cli/index.js +24 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/index.js +24 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -61652,6 +61652,28 @@ function isManagedSessionHostPid2(pid) {
|
|
|
61652
61652
|
if (!commandLine) return false;
|
|
61653
61653
|
return /session-host-daemon/i.test(commandLine);
|
|
61654
61654
|
}
|
|
61655
|
+
function getSessionHostSocketOwnerPids(endpoint) {
|
|
61656
|
+
if (endpoint.kind !== "unix") return [];
|
|
61657
|
+
try {
|
|
61658
|
+
const output = (0, import_child_process12.execFileSync)("lsof", ["-n", "-t", "-U", endpoint.path], {
|
|
61659
|
+
encoding: "utf8",
|
|
61660
|
+
timeout: 3e3,
|
|
61661
|
+
stdio: ["ignore", "pipe", "ignore"]
|
|
61662
|
+
});
|
|
61663
|
+
return Array.from(new Set(output.split(/\s+/).map((value) => Number.parseInt(value, 10)).filter((pid) => Number.isFinite(pid) && pid > 0 && pid !== process.pid)));
|
|
61664
|
+
} catch {
|
|
61665
|
+
return [];
|
|
61666
|
+
}
|
|
61667
|
+
}
|
|
61668
|
+
function stopSessionHostSocketOwners(endpoint) {
|
|
61669
|
+
let stopped = false;
|
|
61670
|
+
for (const pid of getSessionHostSocketOwnerPids(endpoint)) {
|
|
61671
|
+
if (isManagedSessionHostPid2(pid)) {
|
|
61672
|
+
stopped = killPid2(pid) || stopped;
|
|
61673
|
+
}
|
|
61674
|
+
}
|
|
61675
|
+
return stopped;
|
|
61676
|
+
}
|
|
61655
61677
|
function stopManagedSessionHostProcess() {
|
|
61656
61678
|
let stopped = false;
|
|
61657
61679
|
const pidFile = getSessionHostPidFile();
|
|
@@ -61669,6 +61691,7 @@ function stopManagedSessionHostProcess() {
|
|
|
61669
61691
|
} catch {
|
|
61670
61692
|
}
|
|
61671
61693
|
}
|
|
61694
|
+
stopped = stopSessionHostSocketOwners(getDefaultSessionHostEndpoint(SESSION_HOST_APP_NAME)) || stopped;
|
|
61672
61695
|
return stopped;
|
|
61673
61696
|
}
|
|
61674
61697
|
function stopSessionHost() {
|
|
@@ -62786,7 +62809,7 @@ var init_adhdev_daemon = __esm({
|
|
|
62786
62809
|
init_version();
|
|
62787
62810
|
init_src();
|
|
62788
62811
|
init_runtime_defaults();
|
|
62789
|
-
pkgVersion = resolvePackageVersion({ injectedVersion: "0.9.76-rc.
|
|
62812
|
+
pkgVersion = resolvePackageVersion({ injectedVersion: "0.9.76-rc.53" });
|
|
62790
62813
|
AdhdevDaemon = class _AdhdevDaemon {
|
|
62791
62814
|
localHttpServer = null;
|
|
62792
62815
|
localWss = null;
|