@kata.dev/challenge-cli 1.2.2 → 1.2.3

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/package.json +1 -1
  2. package/src/lib/polling.js +13 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kata.dev/challenge-cli",
3
- "version": "1.2.2",
3
+ "version": "1.2.3",
4
4
  "type": "module",
5
5
  "description": "CLI for authoring, packing, validating, and publishing Eval Engine challenges",
6
6
  "bin": {
@@ -56,6 +56,15 @@ function formatResult(job, jobId) {
56
56
  lines.push(`${statusIcon} Result: ${statusLabel}`);
57
57
  lines.push('');
58
58
 
59
+ // Show error details for failed/error jobs
60
+ if (job.errorCode) {
61
+ lines.push(chalk.red.bold('Error: ') + chalk.red(job.errorCode));
62
+ if (job.errorMessage) {
63
+ lines.push(chalk.dim(` ${job.errorMessage}`));
64
+ }
65
+ lines.push('');
66
+ }
67
+
59
68
  if (job.resultJson) {
60
69
  const result = typeof job.resultJson === 'string'
61
70
  ? JSON.parse(job.resultJson)
@@ -95,11 +104,10 @@ function formatResult(job, jobId) {
95
104
  }
96
105
  }
97
106
 
98
- if (job.errorCode) {
99
- lines.push(chalk.red(`Error: ${job.errorCode}`));
100
- if (job.errorMessage) {
101
- lines.push(chalk.dim(` ${job.errorMessage}`));
102
- }
107
+ // Show logsPreview for non-completed jobs (errors, failures)
108
+ if (job.status !== 'completed' && job.result && job.result.logsPreview) {
109
+ lines.push(chalk.bold('Logs:'));
110
+ lines.push(chalk.dim(job.result.logsPreview.slice(0, 500)));
103
111
  lines.push('');
104
112
  }
105
113