@agentlayer.tech/wallet 0.1.20 → 0.1.21
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.
|
@@ -53,6 +53,21 @@ by updates. The update command fetches the latest published npm package and
|
|
|
53
53
|
reuses shared dependency snapshots when possible.`);
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
+
function primaryBinCommand(pkg = packageJson) {
|
|
57
|
+
const bin = pkg?.bin;
|
|
58
|
+
if (!bin) return "wallet";
|
|
59
|
+
if (typeof bin === "string") {
|
|
60
|
+
const packageName = String(pkg?.name || "").trim();
|
|
61
|
+
if (packageName) {
|
|
62
|
+
const parts = packageName.split("/");
|
|
63
|
+
return parts[parts.length - 1] || "wallet";
|
|
64
|
+
}
|
|
65
|
+
return "wallet";
|
|
66
|
+
}
|
|
67
|
+
const names = Object.keys(bin);
|
|
68
|
+
return names[0] || "wallet";
|
|
69
|
+
}
|
|
70
|
+
|
|
56
71
|
function expandHome(value) {
|
|
57
72
|
if (!value) return value;
|
|
58
73
|
if (value === "~") return os.homedir();
|
|
@@ -748,9 +763,10 @@ function runDelegatedInstallForUpdate(args, { captureOutput = false } = {}) {
|
|
|
748
763
|
}
|
|
749
764
|
|
|
750
765
|
const packageSpec = resolveUpdatePackageSpec();
|
|
766
|
+
const binCommand = primaryBinCommand();
|
|
751
767
|
const result = spawnSync(
|
|
752
768
|
npmBin,
|
|
753
|
-
["exec", "--yes", `--package=${packageSpec}`, "
|
|
769
|
+
["exec", "--yes", `--package=${packageSpec}`, binCommand, "--", "install", ...args],
|
|
754
770
|
{
|
|
755
771
|
cwd: packageRoot,
|
|
756
772
|
stdio: captureOutput ? "pipe" : "inherit",
|