@tdxvolt/volt-client-grpc 0.18.6 → 0.18.7

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/lib/index.cjs CHANGED
@@ -96,7 +96,10 @@ const getDIDResolutionURL = (didIn, registryUrl = "") => {
96
96
  return "";
97
97
  }
98
98
 
99
- const lookupUrl = registryUrl || `https://${constants.defaultDIDHostName}`;
99
+ let lookupUrl = registryUrl || `https://${constants.defaultDIDHostName}`;
100
+ if (!lookupUrl.startsWith("http")) {
101
+ lookupUrl = `https://${lookupUrl}`;
102
+ }
100
103
  return `${lookupUrl}/did/${didIn}`;
101
104
  };
102
105
 
@@ -5329,7 +5332,7 @@ async function fetchVoltConfigFromDID(
5329
5332
  }
5330
5333
  }
5331
5334
 
5332
- throw new Error("Failed to fetch Volt config from any registry");
5335
+ throw new Error(`Failed to fetch Volt config from any of these registries: ${registryList.join(", ")}`);
5333
5336
  }
5334
5337
 
5335
5338
  const { readFile } = fs__default["default"].promises;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.18.6",
6
+ "version": "0.18.7",
7
7
  "description": "tdx Volt library for nodejs clients",
8
8
  "type": "module",
9
9
  "exports": {
package/src/utils.js CHANGED
@@ -47,6 +47,9 @@ export const getDIDResolutionURL = (didIn, registryUrl = "") => {
47
47
  return "";
48
48
  }
49
49
 
50
- const lookupUrl = registryUrl || `https://${constants.defaultDIDHostName}`;
50
+ let lookupUrl = registryUrl || `https://${constants.defaultDIDHostName}`;
51
+ if (!lookupUrl.startsWith("http")) {
52
+ lookupUrl = `https://${lookupUrl}`;
53
+ }
51
54
  return `${lookupUrl}/did/${didIn}`;
52
55
  };
@@ -536,5 +536,5 @@ export async function fetchVoltConfigFromDID(
536
536
  }
537
537
  }
538
538
 
539
- throw new Error("Failed to fetch Volt config from any registry");
539
+ throw new Error(`Failed to fetch Volt config from any of these registries: ${registryList.join(", ")}`);
540
540
  }