@gearbox-protocol/cli-utils 5.60.6 → 5.61.0
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.
|
@@ -30,10 +30,34 @@ function getProviders(config) {
|
|
|
30
30
|
})));
|
|
31
31
|
break;
|
|
32
32
|
case "custom":
|
|
33
|
-
result.push(...jsonRpcProviders.map(url =>
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
result.push(...jsonRpcProviders.map((url) => {
|
|
34
|
+
const urlObj = new URL(url.value);
|
|
35
|
+
const hasCredentials = urlObj.username || urlObj.password;
|
|
36
|
+
let cleanUrl = url.value;
|
|
37
|
+
let httpClientOptions = {};
|
|
38
|
+
if (hasCredentials) {
|
|
39
|
+
// Create URL without credentials
|
|
40
|
+
const cleanUrlObj = new URL(url.value);
|
|
41
|
+
cleanUrlObj.username = "";
|
|
42
|
+
cleanUrlObj.password = "";
|
|
43
|
+
cleanUrl = cleanUrlObj.toString();
|
|
44
|
+
// Create Basic Auth header
|
|
45
|
+
const credentials = `${urlObj.username}:${urlObj.password}`;
|
|
46
|
+
const encodedCredentials = Buffer.from(credentials).toString("base64");
|
|
47
|
+
httpClientOptions = {
|
|
48
|
+
fetchOptions: {
|
|
49
|
+
headers: {
|
|
50
|
+
Authorization: `Basic ${encodedCredentials}`,
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
return {
|
|
56
|
+
name: urlObj.hostname,
|
|
57
|
+
url: cleanUrl,
|
|
58
|
+
httpClientOptions,
|
|
59
|
+
};
|
|
60
|
+
}));
|
|
37
61
|
break;
|
|
38
62
|
case "erpc":
|
|
39
63
|
if (erpcProjectId && erpcUrl) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gearbox-protocol/cli-utils",
|
|
3
3
|
"description": "Utils for creating cli apps",
|
|
4
|
-
"version": "5.
|
|
4
|
+
"version": "5.61.0",
|
|
5
5
|
"homepage": "https://gearbox.fi",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"gearbox"
|
|
@@ -31,12 +31,12 @@
|
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@aws-sdk/client-secrets-manager": "^3.940.0",
|
|
33
33
|
"@aws-sdk/client-ssm": "^3.940.0",
|
|
34
|
-
"@gearbox-protocol/sdk": ">=11.
|
|
34
|
+
"@gearbox-protocol/sdk": ">=11.8.4",
|
|
35
35
|
"abitype": "^1.2.0",
|
|
36
36
|
"commander": "^14.0.2",
|
|
37
37
|
"lodash-es": "^4.17.21",
|
|
38
38
|
"viem": "^2.40.3",
|
|
39
|
-
"yaml": "^2.8.
|
|
39
|
+
"yaml": "^2.8.2",
|
|
40
40
|
"zod": "^4.1.13"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|