@tokenbuddy/tokenbuddy 1.0.24 → 1.0.26

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.
@@ -12,7 +12,7 @@
12
12
  <link rel="icon" type="image/png" sizes="192x192" href="/icons/tokenbuddy-192.png" />
13
13
  <link rel="apple-touch-icon" href="/icons/apple-touch-icon.png" />
14
14
  <title>TokenBuddy · Local Control</title>
15
- <script type="module" crossorigin src="/assets/index-BJSOFJIU.js"></script>
15
+ <script type="module" crossorigin src="/assets/index-cm_EgQZ-.js"></script>
16
16
  <link rel="stylesheet" crossorigin href="/assets/index-1uuyCCzj.css">
17
17
  </head>
18
18
  <body>
@@ -13,6 +13,7 @@ import {
13
13
  checkOpenClawRuntime,
14
14
  parseClawtipCliOutput,
15
15
  readClawtipPayCredential,
16
+ resolveNpxCommand,
16
17
  resolveClawtipQrMediaPath,
17
18
  startClawtipWalletBootstrap,
18
19
  waitForClawtipActivationConfirmation,
@@ -1116,6 +1117,24 @@ describe("TokenBuddy init payment options", () => {
1116
1117
  expect(parsed.requiresWalletAuth).toBe(true);
1117
1118
  });
1118
1119
 
1120
+ test("resolves npx next to the Node executable when PATH is sparse", () => {
1121
+ const resolved = resolveNpxCommand({
1122
+ execPath: "/opt/homebrew/Cellar/node/26.0.0/bin/node",
1123
+ envPath: "/usr/bin:/bin",
1124
+ exists: (filePath) => filePath === "/opt/homebrew/Cellar/node/26.0.0/bin/npx",
1125
+ });
1126
+
1127
+ expect(resolved).toBe("/opt/homebrew/Cellar/node/26.0.0/bin/npx");
1128
+ });
1129
+
1130
+ test("falls back to npx command name when no absolute candidate exists", () => {
1131
+ expect(resolveNpxCommand({
1132
+ execPath: "/missing/bin/node",
1133
+ envPath: "/usr/bin:/bin",
1134
+ exists: () => false,
1135
+ })).toBe("npx");
1136
+ });
1137
+
1119
1138
  test("surfaces ClawTip upstream payment errors directly", async () => {
1120
1139
  const parsed = parseClawtipCliOutput("ClawTip 返回错误:商家信息有误");
1121
1140