@optiqcode/cli 2.1.7 → 2.1.8
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 +41 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -433,9 +433,23 @@ async function watchDirectory(targetPath, config) {
|
|
|
433
433
|
catch (err) {
|
|
434
434
|
lastError = err;
|
|
435
435
|
retries--;
|
|
436
|
+
spinner.stop();
|
|
437
|
+
// Print detailed error info
|
|
438
|
+
console.log(chalk.red(`\n✗ Batch ${batchNum}/${totalBatches} failed`));
|
|
439
|
+
console.log(chalk.yellow(` Status: ${err.response?.status || 'N/A'}`));
|
|
440
|
+
console.log(chalk.yellow(` Code: ${err.code || 'N/A'}`));
|
|
441
|
+
console.log(chalk.yellow(` Message: ${err.message}`));
|
|
442
|
+
if (err.response?.data) {
|
|
443
|
+
console.log(chalk.yellow(` Response: ${JSON.stringify(err.response.data, null, 2)}`));
|
|
444
|
+
}
|
|
445
|
+
if (err.response?.headers) {
|
|
446
|
+
console.log(chalk.gray(` Server: ${err.response.headers['server'] || 'unknown'}`));
|
|
447
|
+
console.log(chalk.gray(` CF-Ray: ${err.response.headers['cf-ray'] || 'N/A'}`));
|
|
448
|
+
}
|
|
436
449
|
if (retries > 0) {
|
|
437
|
-
|
|
450
|
+
console.log(chalk.gray(` Retrying in 2s... (${retries} attempts left)\n`));
|
|
438
451
|
await new Promise(r => setTimeout(r, 2000));
|
|
452
|
+
spinner.start(`Retrying batch ${batchNum}...`);
|
|
439
453
|
}
|
|
440
454
|
}
|
|
441
455
|
}
|
|
@@ -448,12 +462,21 @@ async function watchDirectory(targetPath, config) {
|
|
|
448
462
|
}
|
|
449
463
|
catch (error) {
|
|
450
464
|
spinner.fail(chalk.red('Failed'));
|
|
451
|
-
|
|
452
|
-
|
|
465
|
+
console.log(chalk.red('\n═══ DETAILED ERROR ═══'));
|
|
466
|
+
console.log(chalk.yellow(`Status: ${error.response?.status || 'N/A'}`));
|
|
467
|
+
console.log(chalk.yellow(`Code: ${error.code || 'N/A'}`));
|
|
468
|
+
console.log(chalk.yellow(`Message: ${error.message}`));
|
|
469
|
+
if (error.response?.data) {
|
|
470
|
+
console.log(chalk.yellow(`Response Body:`));
|
|
471
|
+
console.log(chalk.gray(JSON.stringify(error.response.data, null, 2)));
|
|
453
472
|
}
|
|
454
|
-
|
|
455
|
-
console.log(chalk.gray(
|
|
473
|
+
if (error.response?.headers) {
|
|
474
|
+
console.log(chalk.gray(`\nHeaders:`));
|
|
475
|
+
console.log(chalk.gray(` Server: ${error.response.headers['server'] || 'unknown'}`));
|
|
476
|
+
console.log(chalk.gray(` CF-Ray: ${error.response.headers['cf-ray'] || 'N/A'}`));
|
|
477
|
+
console.log(chalk.gray(` Content-Type: ${error.response.headers['content-type'] || 'N/A'}`));
|
|
456
478
|
}
|
|
479
|
+
console.log(chalk.red('═══════════════════════\n'));
|
|
457
480
|
return;
|
|
458
481
|
}
|
|
459
482
|
const ignorePatterns = await getGitIgnorePatterns(targetPath);
|
|
@@ -604,11 +627,22 @@ async function watchDirectory(targetPath, config) {
|
|
|
604
627
|
}
|
|
605
628
|
}
|
|
606
629
|
catch (error) {
|
|
607
|
-
// Clear dashboard, show error
|
|
630
|
+
// Clear dashboard, show error
|
|
608
631
|
process.stdout.write('\x1b[5A');
|
|
609
632
|
process.stdout.write('\x1b[0J');
|
|
610
633
|
dashboardShown = false;
|
|
611
|
-
console.log(chalk.red(
|
|
634
|
+
console.log(chalk.red('\n═══ INDEX ERROR ═══'));
|
|
635
|
+
console.log(chalk.yellow(`Status: ${error.response?.status || 'N/A'}`));
|
|
636
|
+
console.log(chalk.yellow(`Code: ${error.code || 'N/A'}`));
|
|
637
|
+
console.log(chalk.yellow(`Message: ${error.message}`));
|
|
638
|
+
if (error.response?.data) {
|
|
639
|
+
console.log(chalk.yellow(`Response: ${JSON.stringify(error.response.data, null, 2)}`));
|
|
640
|
+
}
|
|
641
|
+
if (error.response?.headers) {
|
|
642
|
+
console.log(chalk.gray(`Server: ${error.response.headers['server'] || 'unknown'}`));
|
|
643
|
+
console.log(chalk.gray(`CF-Ray: ${error.response.headers['cf-ray'] || 'N/A'}`));
|
|
644
|
+
}
|
|
645
|
+
console.log(chalk.red('═══════════════════\n'));
|
|
612
646
|
showDashboard();
|
|
613
647
|
}
|
|
614
648
|
isProcessing = false;
|