@heyamiko/amiko-cli 0.5.14 → 0.5.15
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 +6 -3
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -75842,11 +75842,14 @@ function registerSearchCommand(program2) {
|
|
|
75842
75842
|
const apiKey = config2.apiKey || auth.platformKey;
|
|
75843
75843
|
if (apiKey) {
|
|
75844
75844
|
headers["X-Amiko-Key"] = apiKey;
|
|
75845
|
-
} else if (auth.twinToken) {
|
|
75846
|
-
headers["Authorization"] = `Bearer ${auth.twinToken}`;
|
|
75847
75845
|
}
|
|
75848
75846
|
const params = new URLSearchParams({ q: query });
|
|
75849
|
-
|
|
75847
|
+
let res = await fetch(`${mppBase2}/v1/x/search?${params}`, { headers });
|
|
75848
|
+
if (res.status === 402 && auth.twinToken && !apiKey) {
|
|
75849
|
+
res = await fetch(`${mppBase2}/v1/x/search?${params}`, {
|
|
75850
|
+
headers: { ...headers, Authorization: `Bearer ${auth.twinToken}` }
|
|
75851
|
+
});
|
|
75852
|
+
}
|
|
75850
75853
|
spinner.stop();
|
|
75851
75854
|
if (res.status === 402) {
|
|
75852
75855
|
console.error(error("Payment required — no credits or API key."));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@heyamiko/amiko-cli",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.15",
|
|
4
4
|
"description": "Amiko CLI — swap tokens, manage credits, bridge cross-chain, and call marketplace agents",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@crossmint/wallets-sdk": "^1.0.5",
|
|
28
|
-
"@solana/mpp": "^0.
|
|
28
|
+
"@solana/mpp": "^0.5.1",
|
|
29
29
|
"chalk": "^5.3.0",
|
|
30
30
|
"commander": "^12.1.0",
|
|
31
31
|
"ora": "^8.1.0"
|