@kibibot/cli 1.0.6 → 1.0.8
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/README.md +1 -0
- package/dist/commands/token.js +5 -0
- package/dist/lib/api.js +7 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -61,6 +61,7 @@ kibi token create
|
|
|
61
61
|
# Headless
|
|
62
62
|
kibi token create --name "MyToken" --symbol MTK --chain base
|
|
63
63
|
kibi token create --name "Moon" --symbol MOON --chain solana --description "To the moon"
|
|
64
|
+
kibi token create --name "Moon" --symbol MOON --chain base --image-url https://example.com/moon.png
|
|
64
65
|
kibi token create --name "Test" --symbol TST --chain base --no-wait # return job ID immediately
|
|
65
66
|
|
|
66
67
|
# Check deployment status
|
package/dist/commands/token.js
CHANGED
|
@@ -42,6 +42,11 @@ export function registerToken(program) {
|
|
|
42
42
|
symbol = await ask('Symbol: ');
|
|
43
43
|
if (!chain)
|
|
44
44
|
chain = await ask('Chain (base/bsc/solana): ');
|
|
45
|
+
if (!opts.imageUrl) {
|
|
46
|
+
const imgAnswer = await ask('Token image URL (optional, press Enter to skip): ');
|
|
47
|
+
if (imgAnswer)
|
|
48
|
+
opts.imageUrl = imgAnswer;
|
|
49
|
+
}
|
|
45
50
|
rl.close();
|
|
46
51
|
}
|
|
47
52
|
// Validate chain
|
package/dist/lib/api.js
CHANGED
|
@@ -32,8 +32,14 @@ function friendlyError(err) {
|
|
|
32
32
|
return err.body?.detail || 'Access denied. Your API key may not have the required permissions.';
|
|
33
33
|
case 404:
|
|
34
34
|
return err.body?.detail || 'Not found.';
|
|
35
|
-
case 429:
|
|
35
|
+
case 429: {
|
|
36
|
+
const detail = err.body?.detail;
|
|
37
|
+
if (typeof detail === 'object' && detail !== null && 'message' in detail)
|
|
38
|
+
return detail.message;
|
|
39
|
+
if (typeof detail === 'string')
|
|
40
|
+
return detail;
|
|
36
41
|
return 'Rate limited. Try again later.';
|
|
42
|
+
}
|
|
37
43
|
default:
|
|
38
44
|
if (err.statusCode >= 500) {
|
|
39
45
|
return 'Server error. Try again later.';
|