@adhdev/daemon-standalone 0.9.82-rc.313 → 0.9.82-rc.314
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/index.js +43 -34
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -30029,10 +30029,10 @@ var require_dist3 = __commonJS({
|
|
|
30029
30029
|
}
|
|
30030
30030
|
function getDaemonBuildInfo() {
|
|
30031
30031
|
if (cached2) return cached2;
|
|
30032
|
-
const commit = readInjected(true ? "
|
|
30033
|
-
const commitShort = readInjected(true ? "
|
|
30034
|
-
const version2 = readInjected(true ? "0.9.82-rc.
|
|
30035
|
-
const builtAt = readInjected(true ? "2026-06-
|
|
30032
|
+
const commit = readInjected(true ? "f236ed7432cf04dbcfd2e530fa6c69e77e809c80" : void 0) ?? "unknown";
|
|
30033
|
+
const commitShort = readInjected(true ? "f236ed74" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
|
|
30034
|
+
const version2 = readInjected(true ? "0.9.82-rc.314" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
|
|
30035
|
+
const builtAt = readInjected(true ? "2026-06-18T04:16:06.357Z" : void 0);
|
|
30036
30036
|
cached2 = builtAt ? { commit, commitShort, version: version2, builtAt } : { commit, commitShort, version: version2 };
|
|
30037
30037
|
return cached2;
|
|
30038
30038
|
}
|
|
@@ -71707,39 +71707,48 @@ ${formatManifestValidationIssues2(validation2.issues)}`);
|
|
|
71707
71707
|
} catch {
|
|
71708
71708
|
}
|
|
71709
71709
|
}
|
|
71710
|
+
function safeRemoveStaleEntry(target, label) {
|
|
71711
|
+
try {
|
|
71712
|
+
fs24.rmSync(target, { recursive: true, force: true });
|
|
71713
|
+
appendUpgradeLog(`${label}: ${target}`);
|
|
71714
|
+
} catch (error48) {
|
|
71715
|
+
appendUpgradeLog(`Skipped locked stale entry (${error48?.code || "error"}): ${target} \u2014 ${error48?.message || String(error48)}`);
|
|
71716
|
+
}
|
|
71717
|
+
}
|
|
71710
71718
|
function cleanupStaleGlobalInstallDirs(pkgName, surface) {
|
|
71711
|
-
|
|
71712
|
-
|
|
71713
|
-
|
|
71714
|
-
|
|
71715
|
-
|
|
71716
|
-
|
|
71717
|
-
|
|
71718
|
-
|
|
71719
|
-
|
|
71720
|
-
|
|
71721
|
-
|
|
71722
|
-
|
|
71723
|
-
|
|
71724
|
-
|
|
71725
|
-
|
|
71726
|
-
|
|
71727
|
-
|
|
71728
|
-
|
|
71729
|
-
|
|
71730
|
-
|
|
71731
|
-
|
|
71732
|
-
|
|
71733
|
-
|
|
71734
|
-
|
|
71719
|
+
try {
|
|
71720
|
+
const prefixArgs = surface.installPrefix ? ["--prefix", surface.installPrefix] : [];
|
|
71721
|
+
const npmRoot = String(execNpmCommandSync(["root", "-g", ...prefixArgs], { encoding: "utf8" }, surface)).trim();
|
|
71722
|
+
if (!npmRoot) return;
|
|
71723
|
+
const npmPrefix = surface.installPrefix || String(execNpmCommandSync(["prefix", "-g", ...prefixArgs], { encoding: "utf8" }, surface)).trim();
|
|
71724
|
+
const binDir = process.platform === "win32" ? npmPrefix : path35.join(npmPrefix, "bin");
|
|
71725
|
+
const packageBaseName = pkgName.startsWith("@") ? pkgName.split("/")[1] : pkgName;
|
|
71726
|
+
const binNames = /* @__PURE__ */ new Set([packageBaseName]);
|
|
71727
|
+
if (pkgName === "@adhdev/daemon-standalone") {
|
|
71728
|
+
binNames.add("adhdev-standalone");
|
|
71729
|
+
}
|
|
71730
|
+
if (pkgName.startsWith("@")) {
|
|
71731
|
+
const [scope, name] = pkgName.split("/");
|
|
71732
|
+
const scopeDir = path35.join(npmRoot, scope);
|
|
71733
|
+
if (!fs24.existsSync(scopeDir)) return;
|
|
71734
|
+
for (const entry of fs24.readdirSync(scopeDir)) {
|
|
71735
|
+
if (!entry.startsWith(`.${name}-`)) continue;
|
|
71736
|
+
safeRemoveStaleEntry(path35.join(scopeDir, entry), "Removed stale scoped staging dir");
|
|
71737
|
+
}
|
|
71738
|
+
} else {
|
|
71739
|
+
for (const entry of fs24.readdirSync(npmRoot)) {
|
|
71740
|
+
if (!entry.startsWith(`.${pkgName}-`)) continue;
|
|
71741
|
+
safeRemoveStaleEntry(path35.join(npmRoot, entry), "Removed stale staging dir");
|
|
71742
|
+
}
|
|
71735
71743
|
}
|
|
71736
|
-
|
|
71737
|
-
|
|
71738
|
-
|
|
71739
|
-
|
|
71740
|
-
|
|
71741
|
-
appendUpgradeLog(`Removed stale bin staging entry: ${path35.join(binDir, entry)}`);
|
|
71744
|
+
if (fs24.existsSync(binDir)) {
|
|
71745
|
+
for (const entry of fs24.readdirSync(binDir)) {
|
|
71746
|
+
if (!Array.from(binNames).some((name) => entry.startsWith(`.${name}-`))) continue;
|
|
71747
|
+
safeRemoveStaleEntry(path35.join(binDir, entry), "Removed stale bin staging entry");
|
|
71748
|
+
}
|
|
71742
71749
|
}
|
|
71750
|
+
} catch (error48) {
|
|
71751
|
+
appendUpgradeLog(`Stale staging cleanup skipped (${error48?.code || "error"}): ${error48?.message || String(error48)}`);
|
|
71743
71752
|
}
|
|
71744
71753
|
}
|
|
71745
71754
|
function spawnDetachedDaemonUpgradeHelper(payload) {
|