@tokenbuddy/tokenbuddy 1.0.39 → 1.0.40
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.
|
@@ -37,7 +37,10 @@ function isClawtipPayWalletAuthOutput(args, output) {
|
|
|
37
37
|
|| output.includes("MEDIA:")
|
|
38
38
|
|| lower.includes("clawtipid")
|
|
39
39
|
|| lower.includes("qrcode")
|
|
40
|
-
|| lower.includes("扫码")
|
|
40
|
+
|| lower.includes("扫码")
|
|
41
|
+
|| output.includes("人工授权")
|
|
42
|
+
|| output.includes("付款凭证缺失")
|
|
43
|
+
|| output.includes("首次使用");
|
|
41
44
|
}
|
|
42
45
|
export function resolveNpxCommand(options = {}) {
|
|
43
46
|
const platform = options.platform ?? process.platform;
|
|
@@ -198,12 +201,20 @@ function findClawtipFailureMessage(output) {
|
|
|
198
201
|
}
|
|
199
202
|
const returnedMessage = trimmed.match(/^返回消息[::]\s*(.+)$/);
|
|
200
203
|
const returnedText = returnedMessage?.[1]?.trim();
|
|
204
|
+
if (returnedText && isClawtipManualAuthorizationMessage(returnedText)) {
|
|
205
|
+
continue;
|
|
206
|
+
}
|
|
201
207
|
if (returnedText && !returnedText.includes("成功")) {
|
|
202
208
|
return sanitizeClawtipOutput(trimmed);
|
|
203
209
|
}
|
|
204
210
|
}
|
|
205
211
|
return undefined;
|
|
206
212
|
}
|
|
213
|
+
function isClawtipManualAuthorizationMessage(message) {
|
|
214
|
+
return message.includes("人工授权")
|
|
215
|
+
|| message.includes("付款凭证缺失")
|
|
216
|
+
|| message.includes("首次使用");
|
|
217
|
+
}
|
|
207
218
|
function decodeClawtipValue(value) {
|
|
208
219
|
try {
|
|
209
220
|
return decodeURIComponent(value);
|
|
@@ -273,7 +284,10 @@ export function parseClawtipCliOutput(output) {
|
|
|
273
284
|
|| lower.includes("authurl")
|
|
274
285
|
|| lower.includes("qrcode")
|
|
275
286
|
|| lower.includes("scan")
|
|
276
|
-
|| lower.includes("扫码")
|
|
287
|
+
|| lower.includes("扫码")
|
|
288
|
+
|| output.includes("人工授权")
|
|
289
|
+
|| output.includes("付款凭证缺失")
|
|
290
|
+
|| output.includes("首次使用")),
|
|
277
291
|
walletReady: lower.includes("register success")
|
|
278
292
|
|| lower.includes("注册成功")
|
|
279
293
|
|| lower.includes("tokeninfo")
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tokenbuddy/tokenbuddy",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.40",
|
|
4
4
|
"description": "TokenBuddy Client CLI and Daemon",
|
|
5
5
|
"main": "dist/src/index.js",
|
|
6
6
|
"types": "dist/src/index.d.ts",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@clack/prompts": "^0.7.0",
|
|
31
|
-
"@tokenbuddy/contracts": "^1.0.
|
|
31
|
+
"@tokenbuddy/contracts": "^1.0.40",
|
|
32
32
|
"@tokenbuddy/logging": "^1.0.0",
|
|
33
33
|
"cli-table3": "^0.6.4",
|
|
34
34
|
"commander": "^12.0.0",
|