vigthoria-cli 1.6.43 → 1.6.44
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/commands/auth.js +17 -13
- package/dist/commands/bridge.js +2 -0
- package/dist/index.js +1 -1
- package/dist/utils/api.js +1 -0
- package/package.json +2 -2
package/dist/commands/auth.js
CHANGED
|
@@ -138,6 +138,7 @@ class AuthCommand {
|
|
|
138
138
|
this.logger.warn('Not logged in');
|
|
139
139
|
console.log();
|
|
140
140
|
console.log(chalk_1.default.gray('Run `vigthoria login` to authenticate'));
|
|
141
|
+
this.api.destroy();
|
|
141
142
|
return;
|
|
142
143
|
}
|
|
143
144
|
const email = this.config.get('email');
|
|
@@ -174,6 +175,7 @@ class AuthCommand {
|
|
|
174
175
|
console.log();
|
|
175
176
|
// Run ALL three probes in parallel — they are independent.
|
|
176
177
|
const spinner = (0, logger_js_1.createSpinner)('Checking API, capabilities and auth...').start();
|
|
178
|
+
let capabilityTimeout = null;
|
|
177
179
|
const [apiStatus, capabilityStatus, tokenValidation] = await Promise.all([
|
|
178
180
|
this.api.getHealthStatus(),
|
|
179
181
|
Promise.race([
|
|
@@ -182,16 +184,20 @@ class AuthCommand {
|
|
|
182
184
|
projectPath: process.cwd(),
|
|
183
185
|
targetPath: process.cwd(),
|
|
184
186
|
}),
|
|
185
|
-
new Promise(resolve =>
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
187
|
+
new Promise(resolve => {
|
|
188
|
+
capabilityTimeout = setTimeout(() => resolve({
|
|
189
|
+
overallOk: false,
|
|
190
|
+
v3Agent: { name: 'V3 Agent', endpoint: '', ok: false, error: 'Timed out (8s)' },
|
|
191
|
+
hyperLoop: { name: 'Hyper Loop', endpoint: '', ok: false, error: 'Timed out (8s)' },
|
|
192
|
+
repoMemory: { name: 'Repo Memory', endpoint: '', ok: false, error: 'Timed out (8s)' },
|
|
193
|
+
devtoolsBridge: { name: 'DevTools Bridge', endpoint: '', ok: false, error: 'Timed out (8s)' },
|
|
194
|
+
}), 8000);
|
|
195
|
+
}),
|
|
192
196
|
]),
|
|
193
197
|
this.api.validateToken(),
|
|
194
198
|
]);
|
|
199
|
+
if (capabilityTimeout)
|
|
200
|
+
clearTimeout(capabilityTimeout);
|
|
195
201
|
spinner.stop();
|
|
196
202
|
// --- Display API Status ---
|
|
197
203
|
console.log(chalk_1.default.white('API Status:'));
|
|
@@ -249,13 +255,11 @@ class AuthCommand {
|
|
|
249
255
|
console.log(chalk_1.default.gray(' Bridge Auth: ') + (capabilityStatus.devtoolsBridge.ok ? chalk_1.default.green('Connected') : chalk_1.default.gray('N/A — bridge not running')) + chalk_1.default.gray(' (used by --bridge flag only)'));
|
|
250
256
|
console.log();
|
|
251
257
|
// Graceful exit — destroy keep-alive agents so the event loop drains
|
|
252
|
-
// naturally
|
|
253
|
-
//
|
|
254
|
-
//
|
|
258
|
+
// naturally. Setting exitCode (not calling process.exit()) avoids the
|
|
259
|
+
// libuv UV_HANDLE_CLOSING assertion on Windows that occurs when
|
|
260
|
+
// process.exit() is invoked while socket handles are mid-close.
|
|
255
261
|
this.api.destroy();
|
|
256
|
-
|
|
257
|
-
// 150 ms, force exit (unref'd so it won't block a clean drain).
|
|
258
|
-
setTimeout(() => process.exit(0), 150).unref();
|
|
262
|
+
process.exitCode = 0;
|
|
259
263
|
}
|
|
260
264
|
printLoginSuccess() {
|
|
261
265
|
const email = this.config.get('email');
|
package/dist/commands/bridge.js
CHANGED
|
@@ -32,6 +32,8 @@ class BridgeCommand {
|
|
|
32
32
|
? chalk_1.default.green('Local browser observability is available for debugging flows.')
|
|
33
33
|
: chalk_1.default.gray('Start the DevTools Bridge to enable local browser observability.')));
|
|
34
34
|
console.log();
|
|
35
|
+
this.api.destroy();
|
|
36
|
+
process.exitCode = 0;
|
|
35
37
|
}
|
|
36
38
|
}
|
|
37
39
|
exports.BridgeCommand = BridgeCommand;
|
package/dist/index.js
CHANGED
package/dist/utils/api.js
CHANGED
|
@@ -148,6 +148,7 @@ class APIClient {
|
|
|
148
148
|
this.selfHostedModelRouterClient = selfHostedModelsApiUrl ? axios_1.default.create({
|
|
149
149
|
baseURL: selfHostedModelsApiUrl,
|
|
150
150
|
timeout: 240000,
|
|
151
|
+
httpsAgent,
|
|
151
152
|
headers: {
|
|
152
153
|
'Content-Type': 'application/json',
|
|
153
154
|
'User-Agent': `Vigthoria-CLI/${process.env.npm_package_version || '1.6.9'}`,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vigthoria-cli",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.44",
|
|
4
4
|
"description": "Vigthoria Coder CLI - AI-powered terminal coding assistant",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"files": [
|
|
@@ -86,4 +86,4 @@
|
|
|
86
86
|
"engines": {
|
|
87
87
|
"node": ">=18.0.0"
|
|
88
88
|
}
|
|
89
|
-
}
|
|
89
|
+
}
|