vpsnet-mcp 1.0.0 → 1.0.1

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.
Files changed (2) hide show
  1. package/build/api.js +8 -1
  2. package/package.json +1 -1
package/build/api.js CHANGED
@@ -16,7 +16,14 @@ export async function apiRequest(method, path, body) {
16
16
  init.body = JSON.stringify(body);
17
17
  }
18
18
  const res = await fetch(url, init);
19
- const data = await res.json().catch(() => null);
19
+ const text = await res.text();
20
+ let data;
21
+ try {
22
+ data = text ? JSON.parse(text) : null;
23
+ }
24
+ catch {
25
+ data = { error: text || res.statusText };
26
+ }
20
27
  return { status: res.status, data };
21
28
  }
22
29
  export function formatJson(data) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vpsnet-mcp",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "type": "module",
5
5
  "description": "MCP server for managing VPSNet virtual private servers",
6
6
  "bin": {