@optiqcode/cli 2.1.4 → 2.1.5
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/index.js +8 -10
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -328,7 +328,7 @@ async function indexOnce(targetPath, config) {
|
|
|
328
328
|
headers: {
|
|
329
329
|
'Content-Type': 'application/json',
|
|
330
330
|
},
|
|
331
|
-
timeout: 120000,
|
|
331
|
+
timeout: 120000,
|
|
332
332
|
});
|
|
333
333
|
if (!response.data.success) {
|
|
334
334
|
spinner.fail(chalk.red('Indexing failed'));
|
|
@@ -336,20 +336,18 @@ async function indexOnce(targetPath, config) {
|
|
|
336
336
|
return;
|
|
337
337
|
}
|
|
338
338
|
totalChunks += response.data.result?.chunks_created || 0;
|
|
339
|
-
break;
|
|
339
|
+
break;
|
|
340
340
|
}
|
|
341
341
|
catch (err) {
|
|
342
342
|
lastError = err;
|
|
343
343
|
retries--;
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
}
|
|
349
|
-
}
|
|
344
|
+
// Always log which files failed
|
|
345
|
+
console.log(chalk.red(`\n✗ Batch ${batchNum} failed: ${err.code || err.message}`));
|
|
346
|
+
console.log(chalk.yellow(` Files in batch: ${batch.map(f => f.path).join(', ')}`));
|
|
347
|
+
console.log(chalk.gray(` Sizes: ${batch.map(f => `${f.path}(${Math.round(f.content.length / 1024)}KB)`).join(', ')}`));
|
|
350
348
|
if (retries > 0) {
|
|
351
|
-
|
|
352
|
-
await new Promise(r => setTimeout(r, 2000));
|
|
349
|
+
console.log(chalk.gray(` Retrying... (${retries} left)`));
|
|
350
|
+
await new Promise(r => setTimeout(r, 2000));
|
|
353
351
|
}
|
|
354
352
|
}
|
|
355
353
|
}
|