claudmax 1.0.18 → 2.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.
- package/index.js +3 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -80,7 +80,7 @@ function verifyConnection(apiKey) {
|
|
|
80
80
|
method: 'POST',
|
|
81
81
|
headers: {
|
|
82
82
|
'Content-Type': 'application/json',
|
|
83
|
-
'User-Agent': 'ClaudMax-CLI/
|
|
83
|
+
'User-Agent': 'ClaudMax-CLI/2.0.0',
|
|
84
84
|
},
|
|
85
85
|
timeout: 15000,
|
|
86
86
|
};
|
|
@@ -90,6 +90,7 @@ function verifyConnection(apiKey) {
|
|
|
90
90
|
res.on('data', (chunk) => { body += chunk; });
|
|
91
91
|
res.on('end', () => {
|
|
92
92
|
try {
|
|
93
|
+
// key-status uses POST with { apiKey } field
|
|
93
94
|
const data = JSON.parse(body);
|
|
94
95
|
resolve({ status: res.statusCode, data, ok: true });
|
|
95
96
|
} catch {
|
|
@@ -101,6 +102,7 @@ function verifyConnection(apiKey) {
|
|
|
101
102
|
req.on('error', (err) => resolve({ status: 0, error: err.message, ok: false }));
|
|
102
103
|
req.on('timeout', () => { req.destroy(); resolve({ status: 0, error: 'timeout', ok: false }); });
|
|
103
104
|
|
|
105
|
+
// key-status endpoint expects { apiKey } in body
|
|
104
106
|
req.write(JSON.stringify({ apiKey }));
|
|
105
107
|
req.end();
|
|
106
108
|
});
|
package/package.json
CHANGED