create-claude-workspace 2.1.8 → 2.1.10

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.
@@ -15,6 +15,7 @@ export function detectCIPlatform(projectDir) {
15
15
  return 'none';
16
16
  }
17
17
  export async function watchPipeline(branch, platform, projectDir, logger, signal) {
18
+ logger.info(`Watching CI pipeline for branch: ${branch} (${platform})`);
18
19
  if (platform === 'none') {
19
20
  return { status: 'not-found' };
20
21
  }
@@ -25,8 +26,8 @@ export async function watchPipeline(branch, platform, projectDir, logger, signal
25
26
  if (signal?.stopped)
26
27
  return { status: 'canceled' };
27
28
  const status = platform === 'github'
28
- ? pollGitHub(branch, projectDir)
29
- : pollGitLab(branch, projectDir);
29
+ ? pollGitHub(branch, projectDir, logger)
30
+ : pollGitLab(branch, projectDir, logger);
30
31
  if (status === 'passed' || status === 'failed' || status === 'canceled') {
31
32
  const logs = status === 'failed'
32
33
  ? fetchFailureLogs(branch, platform, projectDir)
@@ -48,7 +49,7 @@ export async function watchPipeline(branch, platform, projectDir, logger, signal
48
49
  }
49
50
  return { status: 'timeout' };
50
51
  }
51
- function pollGitHub(branch, cwd) {
52
+ function pollGitHub(branch, cwd, logger) {
52
53
  try {
53
54
  const output = execSync(`gh run list --branch "${branch}" --limit 1 --json status,conclusion`, { cwd, encoding: 'utf-8', stdio: 'pipe', timeout: 15_000 }).trim();
54
55
  const runs = JSON.parse(output);
@@ -60,17 +61,19 @@ function pollGitHub(branch, cwd) {
60
61
  }
61
62
  return 'pending';
62
63
  }
63
- catch {
64
+ catch (err) {
65
+ logger?.warn(`gh run list failed: ${err.message?.split('\n')[0]}`);
64
66
  return 'not-found';
65
67
  }
66
68
  }
67
- function pollGitLab(branch, cwd) {
69
+ function pollGitLab(branch, cwd, logger) {
68
70
  try {
69
71
  const output = execSync(`glab ci list --branch "${branch}" --output json`, { cwd, encoding: 'utf-8', stdio: 'pipe', timeout: 15_000 }).trim();
70
72
  const pipelines = JSON.parse(output);
71
73
  if (!pipelines.length)
72
74
  return 'not-found';
73
75
  const pipeline = pipelines[0];
76
+ logger?.info(`CI pipeline #${pipeline.id ?? '?'}: ${pipeline.status}`);
74
77
  switch (pipeline.status) {
75
78
  case 'success': return 'passed';
76
79
  case 'failed': return 'failed';
@@ -78,7 +81,8 @@ function pollGitLab(branch, cwd) {
78
81
  default: return 'pending';
79
82
  }
80
83
  }
81
- catch {
84
+ catch (err) {
85
+ logger?.warn(`glab ci list failed: ${err.message?.split('\n')[0]}`);
82
86
  return 'not-found';
83
87
  }
84
88
  }
@@ -423,7 +423,11 @@ export class TUI {
423
423
  this.log(` ${pre} ${ANSI_COLORS.red}✗ ${output}${RESET}`, `ERROR: ${output}`);
424
424
  }
425
425
  else {
426
- this.log(` ${pre} ${ANSI_COLORS.green}✓${RESET} ${DIM}${output}${RESET}`, `OK: ${output}`);
426
+ const lines = output.split('\n');
427
+ const summary = lines.length > 3
428
+ ? `${lines.length} lines`
429
+ : output.replace(/\n/g, ' ').trim();
430
+ this.log(` ${pre} ${ANSI_COLORS.green}✓${RESET} ${DIM}${summary}${RESET}`, `OK: ${summary}`);
427
431
  }
428
432
  }
429
433
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-claude-workspace",
3
- "version": "2.1.8",
3
+ "version": "2.1.10",
4
4
  "author": "",
5
5
  "repository": {
6
6
  "type": "git",