bktide 1.0.1755547716 → 1.0.1755568192
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/ShowBuild.js +92 -0
- package/dist/commands/ShowBuild.js.map +1 -0
- package/dist/commands/index.js +1 -0
- package/dist/commands/index.js.map +1 -1
- package/dist/formatters/FormatterFactory.js +4 -0
- package/dist/formatters/FormatterFactory.js.map +1 -1
- package/dist/formatters/build-detail/AlfredFormatter.js +113 -0
- package/dist/formatters/build-detail/AlfredFormatter.js.map +1 -0
- package/dist/formatters/build-detail/Formatter.js +3 -0
- package/dist/formatters/build-detail/Formatter.js.map +1 -0
- package/dist/formatters/build-detail/JsonFormatter.js +132 -0
- package/dist/formatters/build-detail/JsonFormatter.js.map +1 -0
- package/dist/formatters/build-detail/PlainTextFormatter.js +851 -0
- package/dist/formatters/build-detail/PlainTextFormatter.js.map +1 -0
- package/dist/formatters/build-detail/index.js +21 -0
- package/dist/formatters/build-detail/index.js.map +1 -0
- package/dist/formatters/builds/PlainTextFormatter.js +4 -2
- package/dist/formatters/builds/PlainTextFormatter.js.map +1 -1
- package/dist/formatters/pipelines/PlainTextFormatter.js +3 -6
- package/dist/formatters/pipelines/PlainTextFormatter.js.map +1 -1
- package/dist/graphql/queries.js +185 -0
- package/dist/graphql/queries.js.map +1 -1
- package/dist/index.js +22 -1
- package/dist/index.js.map +1 -1
- package/dist/services/BuildkiteClient.js +87 -26
- package/dist/services/BuildkiteClient.js.map +1 -1
- package/dist/services/BuildkiteRestClient.js +8 -7
- package/dist/services/BuildkiteRestClient.js.map +1 -1
- package/dist/ui/theme.js +193 -8
- package/dist/ui/theme.js.map +1 -1
- package/dist/utils/terminal-links.js +165 -0
- package/dist/utils/terminal-links.js.map +1 -0
- package/package.json +2 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PlainTextFormatter.js","sourceRoot":"/","sources":["formatters/build-detail/PlainTextFormatter.ts"],"names":[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9B,CAAC;QACH,CAAC;QAED,OAAO,OAAO,CAAC;IACjB,CAAC;IAEO,uBAAuB,CAAC,WAAkB;QAChD,MAAM,MAAM,GAA2B;YACrC,KAAK,EAAE,CAAC;YACR,OAAO,EAAE,CAAC;YACV,IAAI,EAAE,CAAC;YACP,OAAO,EAAE,CAAC;SACX,CAAC;QAEF,KAAK,MAAM,UAAU,IAAI,WAAW,EAAE,CAAC;YACrC,MAAM,KAAK,GAAG,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,WAAW,EAAE,IAAI,MAAM,CAAC;YAC7D,IAAI,KAAK,IAAI,MAAM,EAAE,CAAC;gBACpB,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;YAClB,CAAC;QACH,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;IAEO,uBAAuB,CAAC,WAAkB;QAChD,MAAM,OAAO,GAA0B,EAAE,CAAC;QAE1C,KAAK,MAAM,UAAU,IAAI,WAAW,EAAE,CAAC;YACrC,MAAM,KAAK,GAAG,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,WAAW,EAAE,IAAI,MAAM,CAAC;YAC7D,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;gBACpB,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;YACtB,CAAC;YACD,OAAO,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAClC,CAAC;QAED,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,WAAW,CAAC,MAAc,EAAE,KAAU;QACpC,OAAO,WAAW,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IACpC,CAAC;CACF","sourcesContent":["import { BaseBuildDetailFormatter, BuildDetail, BuildDetailFormatterOptions } from './Formatter.js';\nimport { formatDistanceToNow } from 'date-fns';\nimport { htmlToText } from 'html-to-text';\nimport { \n formatEmptyState,\n formatError,\n SEMANTIC_COLORS,\n formatBuildStatus,\n formatTips,\n TipStyle,\n getStateIcon,\n getAnnotationIcon,\n getProgressIcon,\n BUILD_STATUS_THEME\n} from '../../ui/theme.js';\n\n// Standard emoji mappings only\n// Only map universally recognized emoji codes, not Buildkite-specific ones\nconst STANDARD_EMOJI: Record<string, string> = {\n // Faces & emotions\n ':smile:': '😊',\n ':grin:': '😁',\n ':joy:': '😂',\n ':laughing:': '😆',\n ':blush:': '😊',\n ':heart_eyes:': '😍',\n ':sob:': '😭',\n ':cry:': '😢',\n ':angry:': '😠',\n ':rage:': '😡',\n ':thinking:': '🤔',\n ':confused:': '😕',\n ':neutral_face:': '😐',\n \n // Hands & gestures\n ':thumbsup:': '👍',\n ':thumbsdown:': '👎',\n ':clap:': '👏',\n ':wave:': '👋',\n ':raised_hand:': '✋',\n ':ok_hand:': '👌',\n ':pray:': '🙏',\n ':muscle:': '💪',\n ':point_left:': '👈',\n ':point_right:': '👉',\n ':point_up:': '👆',\n ':point_down:': '👇',\n \n // Objects & symbols\n ':heart:': '❤️',\n ':broken_heart:': '💔',\n ':star:': '⭐',\n ':sparkles:': '✨',\n ':boom:': '💥',\n ':fire:': '🔥',\n ':zap:': '⚡',\n ':rocket:': '🚀',\n ':sun:': '☀️',\n ':moon:': '🌙',\n ':cloud:': '☁️',\n ':umbrella:': '☔',\n ':snowflake:': '❄️',\n \n // Status symbols\n ':white_check_mark:': '✅',\n ':x:': '❌',\n ':warning:': '⚠️',\n ':exclamation:': '❗',\n ':question:': '❓',\n ':heavy_plus_sign:': '➕',\n ':heavy_minus_sign:': '➖',\n ':heavy_check_mark:': '✔️',\n \n // Common tools/tech (universally recognized)\n ':computer:': '💻',\n ':iphone:': '📱',\n ':email:': '📧',\n ':package:': '📦',\n ':lock:': '🔒',\n ':key:': '🔑',\n ':mag:': '🔍',\n ':bulb:': '💡',\n ':books:': '📚',\n ':memo:': '📝',\n ':pencil:': '✏️',\n ':art:': '🎨',\n ':camera:': '📷',\n ':movie_camera:': '🎥',\n ':musical_note:': '🎵',\n ':bell:': '🔔',\n ':link:': '🔗',\n ':paperclip:': '📎',\n ':hourglass:': '⏳',\n ':alarm_clock:': '⏰',\n ':stopwatch:': '⏱️',\n ':timer_clock:': '⏲️',\n ':calendar:': '📅',\n ':date:': '📅',\n};\n\nexport class PlainTextFormatter extends BaseBuildDetailFormatter {\n name = 'plain-text';\n \n private parseEmoji(text: string): string {\n if (!text) return text;\n // Only replace standard emoji codes, leave Buildkite-specific ones as-is\n return text.replace(/:[\\w_]+:/g, (match) => {\n return STANDARD_EMOJI[match] || match;\n });\n }\n \n formatBuildDetail(buildData: BuildDetail | null, options?: BuildDetailFormatterOptions): string {\n // Handle error cases first\n if (options?.hasError || !buildData) {\n return this.formatErrorState(options);\n }\n \n const build = buildData.build;\n \n // Choose display mode based on options\n if (options?.summary) {\n return this.formatSummaryLine(build);\n }\n \n if (options?.full) {\n return this.formatFullDetails(build, options);\n }\n \n // Default: contextual display based on state\n switch (build.state) {\n case 'FAILED':\n return this.formatFailedBuild(build, options);\n case 'RUNNING':\n return this.formatRunningBuild(build, options);\n case 'BLOCKED':\n return this.formatBlockedBuild(build, options);\n case 'PASSED':\n return this.formatPassedBuild(build, options);\n case 'CANCELED':\n return this.formatCanceledBuild(build, options);\n default:\n return this.formatDefaultBuild(build, options);\n }\n }\n \n private formatErrorState(options?: BuildDetailFormatterOptions): string {\n if (options?.errorType === 'not_found') {\n return formatEmptyState(\n 'Build not found',\n ['Check the build reference format', 'Verify the build exists']\n );\n }\n \n return formatError(options?.errorMessage || 'Unknown error');\n }\n \n private formatSummaryLine(build: any): string {\n const statusIcon = this.getStatusIcon(build.state);\n const coloredIcon = this.colorizeStatusIcon(statusIcon, build.state);\n const duration = this.formatDuration(build);\n const age = this.formatAge(build.createdAt);\n const stateFormatted = formatBuildStatus(build.state, { useSymbol: false });\n const branch = SEMANTIC_COLORS.identifier(build.branch);\n \n return `${coloredIcon} ${SEMANTIC_COLORS.label(`#${build.number}`)} ${stateFormatted} • ${duration} • ${branch} • ${age}`;\n }\n \n private formatPassedBuild(build: any, options?: BuildDetailFormatterOptions): string {\n const lines: string[] = [];\n \n // Header line\n lines.push(this.formatHeader(build));\n lines.push(this.formatCommitInfo(build));\n \n // Show annotations summary if present\n if (build.annotations?.edges?.length > 0) {\n lines.push('');\n lines.push(this.formatAnnotationSummary(build.annotations.edges));\n \n if (!options?.annotations) {\n lines.push('');\n const tips = formatTips(\n ['Use --annotations to view annotation details'],\n TipStyle.GROUPED\n );\n lines.push(tips);\n }\n }\n \n // Show annotations detail if requested\n if (options?.annotations) {\n lines.push('');\n lines.push(this.formatAnnotationDetails(build.annotations.edges));\n }\n \n return lines.join('\\n');\n }\n \n private formatFailedBuild(build: any, options?: BuildDetailFormatterOptions): string {\n const lines: string[] = [];\n \n // Header line\n lines.push(this.formatHeader(build));\n lines.push(this.formatCommitInfo(build));\n lines.push('');\n \n // Failed jobs summary\n const failedJobs = this.getFailedJobs(build.jobs?.edges);\n const allHints: string[] = [];\n \n if (failedJobs.length > 0) {\n const { summary, hints } = this.formatFailedJobsSummaryWithHints(failedJobs, options);\n lines.push(summary);\n allHints.push(...hints);\n }\n \n // Annotation summary\n if (build.annotations?.edges?.length > 0) {\n lines.push(this.formatAnnotationSummary(build.annotations.edges));\n }\n \n // Show detailed job info if requested\n if (options?.jobs || options?.failed) {\n lines.push('');\n lines.push(this.formatJobDetails(build.jobs?.edges, options));\n }\n \n // Show annotations detail if requested\n if (options?.annotations) {\n lines.push('');\n lines.push(this.formatAnnotationDetails(build.annotations.edges));\n }\n \n // Collect all hints for more info\n if (!options?.failed && failedJobs.length > 0) {\n allHints.push('Use --failed to show failure details');\n }\n if (!options?.annotations && build.annotations?.edges?.length > 0) {\n allHints.push('Use --annotations to view annotation details');\n }\n \n // Display all hints together\n if (allHints.length > 0) {\n lines.push('');\n lines.push(formatTips(allHints, TipStyle.GROUPED));\n }\n \n return lines.join('\\n');\n }\n \n private formatRunningBuild(build: any, options?: BuildDetailFormatterOptions): string {\n const lines: string[] = [];\n \n // Header line\n lines.push(this.formatHeader(build));\n lines.push(this.formatCommitInfo(build));\n lines.push('');\n \n // Progress information\n const jobStats = this.getJobStats(build.jobs?.edges);\n lines.push(`Progress: ${SEMANTIC_COLORS.count(String(jobStats.completed))}/${jobStats.total} complete, ${SEMANTIC_COLORS.info(String(jobStats.running))} running, ${jobStats.queued} queued`);\n \n // Show running jobs\n const runningJobs = this.getRunningJobs(build.jobs?.edges);\n if (runningJobs.length > 0) {\n const labels = runningJobs.map(j => this.parseEmoji(j.node.label)).join(', ');\n lines.push(`${SEMANTIC_COLORS.info('Running')}: ${labels}`);\n }\n \n // Annotation summary\n if (build.annotations?.edges?.length > 0) {\n lines.push('');\n lines.push(this.formatAnnotationSummary(build.annotations.edges));\n }\n \n // Show job details if requested\n if (options?.jobs) {\n lines.push('');\n lines.push(this.formatJobDetails(build.jobs?.edges, options));\n }\n \n // Show annotations detail if requested\n if (options?.annotations) {\n lines.push('');\n lines.push(this.formatAnnotationDetails(build.annotations.edges));\n }\n \n return lines.join('\\n');\n }\n \n private formatBlockedBuild(build: any, options?: BuildDetailFormatterOptions): string {\n const lines: string[] = [];\n \n // Header line\n lines.push(this.formatHeader(build));\n lines.push(this.formatCommitInfo(build));\n lines.push('');\n \n // Blocked information\n const blockedJobs = this.getBlockedJobs(build.jobs?.edges);\n if (blockedJobs.length > 0) {\n lines.push(`${getProgressIcon('BLOCKED_MESSAGE')} Blocked: \"${blockedJobs[0].node.label}\" (manual unblock required)`);\n }\n \n // Show jobs summary\n const jobStats = this.getJobStats(build.jobs?.edges);\n if (jobStats.completed > 0) {\n lines.push(`${getStateIcon('PASSED')} ${jobStats.completed} jobs passed before block`);\n }\n \n // Annotation summary\n if (build.annotations?.edges?.length > 0) {\n lines.push('');\n lines.push(this.formatAnnotationSummary(build.annotations.edges));\n }\n \n // Show job details if requested\n if (options?.jobs) {\n lines.push('');\n lines.push(this.formatJobDetails(build.jobs?.edges, options));\n }\n \n // Show annotations detail if requested\n if (options?.annotations) {\n lines.push('');\n lines.push(this.formatAnnotationDetails(build.annotations.edges));\n }\n \n return lines.join('\\n');\n }\n \n private formatCanceledBuild(build: any, options?: BuildDetailFormatterOptions): string {\n const lines: string[] = [];\n \n // Header line\n lines.push(this.formatHeader(build));\n lines.push(this.formatCommitInfo(build));\n lines.push('');\n \n // Canceled information\n if (build.createdBy) {\n const creator = build.createdBy.name || build.createdBy.email;\n lines.push(`Canceled by: ${creator}`);\n }\n \n // Show jobs summary\n const jobStats = this.getJobStats(build.jobs?.edges);\n lines.push(`Completed: ${jobStats.completed}/${jobStats.total} jobs before cancellation`);\n \n // Show job details if requested\n if (options?.jobs) {\n lines.push('');\n lines.push(this.formatJobDetails(build.jobs?.edges, options));\n }\n \n return lines.join('\\n');\n }\n \n private formatDefaultBuild(build: any, options?: BuildDetailFormatterOptions): string {\n return this.formatPassedBuild(build, options);\n }\n \n private formatFullDetails(build: any, options?: BuildDetailFormatterOptions): string {\n const lines: string[] = [];\n \n // Full header information\n lines.push(this.formatHeader(build));\n lines.push(this.formatCommitInfo(build));\n lines.push('');\n \n // Build metadata\n lines.push('Build Details:');\n lines.push(` URL: ${build.url}`);\n lines.push(` Organization: ${build.organization?.name || 'Unknown'}`);\n lines.push(` Pipeline: ${build.pipeline?.name || 'Unknown'}`);\n \n if (build.pullRequest) {\n // Try to construct PR URL from repository URL\n const repoUrl = build.pipeline?.repository?.url;\n if (repoUrl && repoUrl.includes('github.com')) {\n // Extract owner/repo from various GitHub URL formats\n const match = repoUrl.match(/github\\.com[/:]([\\w-]+)\\/([\\w-]+)/);\n if (match && build.pullRequest.id) {\n // Extract PR number from GraphQL ID if possible\n // GitHub PR IDs often contain the number\n const prUrl = `https://github.com/${match[1]}/${match[2]}/pull/${build.pullRequest.id}`;\n lines.push(` Pull Request: ${SEMANTIC_COLORS.url(prUrl)}`);\n } else {\n lines.push(` Pull Request: ${build.pullRequest.id}`);\n }\n } else {\n lines.push(` Pull Request: ${build.pullRequest.id}`);\n }\n }\n \n if (build.triggeredFrom) {\n lines.push(` Triggered from: ${build.triggeredFrom.pipeline?.name} #${build.triggeredFrom.number}`);\n }\n \n lines.push('');\n \n // Jobs section\n lines.push('Jobs:');\n lines.push(this.formatJobDetails(build.jobs?.edges, { ...options, full: true }));\n \n // Annotations section\n if (build.annotations?.edges?.length > 0) {\n lines.push('');\n lines.push('Annotations:');\n lines.push(this.formatAnnotationDetails(build.annotations.edges));\n }\n \n return lines.join('\\n');\n }\n \n private formatHeader(build: any): string {\n const statusIcon = this.getStatusIcon(build.state);\n // Apply appropriate color to the icon based on the state\n const coloredIcon = this.colorizeStatusIcon(statusIcon, build.state);\n const stateFormatted = formatBuildStatus(build.state, { useSymbol: false });\n const duration = this.formatDuration(build);\n const age = this.formatAge(build.createdAt);\n const branch = SEMANTIC_COLORS.identifier(build.branch);\n \n return `${coloredIcon} ${SEMANTIC_COLORS.label(`#${build.number}`)} ${stateFormatted} • ${duration} • ${branch} • ${age}`;\n }\n \n private formatCommitInfo(build: any): string {\n const shortSha = build.commit ? build.commit.substring(0, 7) : 'unknown';\n const message = build.message || 'No commit message';\n const truncatedMessage = message.length > 60 ? message.substring(0, 57) + '...' : message;\n \n return ` \"${truncatedMessage}\" (${shortSha})`;\n }\n \n private formatAnnotationSummary(annotations: any[]): string {\n if (!annotations || annotations.length === 0) {\n return '';\n }\n \n const lines: string[] = [];\n const total = annotations.length;\n \n // Header with count\n const counts = this.countAnnotationsByStyle(annotations);\n const countParts = [];\n if (counts.ERROR > 0) countParts.push(SEMANTIC_COLORS.error(`${counts.ERROR} error${counts.ERROR > 1 ? 's' : ''}`));\n if (counts.WARNING > 0) countParts.push(SEMANTIC_COLORS.warning(`${counts.WARNING} warning${counts.WARNING > 1 ? 's' : ''}`));\n if (counts.INFO > 0) countParts.push(SEMANTIC_COLORS.info(`${counts.INFO} info`));\n if (counts.SUCCESS > 0) countParts.push(SEMANTIC_COLORS.success(`${counts.SUCCESS} success`));\n \n lines.push(`${getAnnotationIcon('DEFAULT')} ${SEMANTIC_COLORS.count(String(total))} annotation${total > 1 ? 's' : ''}: ${countParts.join(', ')}`);\n \n // List each annotation with style and context\n const grouped = this.groupAnnotationsByStyle(annotations);\n const styleOrder = ['ERROR', 'WARNING', 'INFO', 'SUCCESS'];\n \n for (const style of styleOrder) {\n if (grouped[style]) {\n for (const annotation of grouped[style]) {\n const icon = this.getAnnotationIcon(style);\n const context = annotation.node.context || 'default';\n const styleColored = this.colorizeAnnotationStyle(style);\n lines.push(` ${icon} ${styleColored}: ${context}`);\n }\n }\n }\n \n return lines.join('\\n');\n }\n \n private formatAnnotationDetails(annotations: any[]): string {\n const lines: string[] = [];\n \n // Group annotations by style\n const grouped = this.groupAnnotationsByStyle(annotations);\n const styleOrder = ['ERROR', 'WARNING', 'INFO', 'SUCCESS'];\n \n for (const style of styleOrder) {\n if (grouped[style]) {\n for (const annotation of grouped[style]) {\n const icon = this.getAnnotationIcon(style);\n const context = annotation.node.context || 'default';\n const styleColored = this.colorizeAnnotationStyle(style);\n \n // When showing annotation details, always show the body text\n lines.push(`${icon} ${styleColored}: ${context}`);\n const body = htmlToText(annotation.node.body?.html || '', {\n wordwrap: 80,\n preserveNewlines: true\n });\n lines.push(body.split('\\n').map(l => ` ${l}`).join('\\n'));\n lines.push('');\n }\n }\n }\n \n return lines.join('\\n').trim();\n }\n \n private formatJobDetails(jobs: any[], options?: BuildDetailFormatterOptions): string {\n if (!jobs || jobs.length === 0) {\n return 'No jobs found';\n }\n \n const lines: string[] = [];\n const jobStats = this.getJobStats(jobs);\n \n // Summary line\n const parts = [];\n if (jobStats.passed > 0) parts.push(`${getStateIcon('PASSED')} ${jobStats.passed} passed`);\n if (jobStats.failed > 0) parts.push(`${getStateIcon('FAILED')} ${jobStats.failed} failed`);\n if (jobStats.running > 0) parts.push(`${getStateIcon('RUNNING')} ${jobStats.running} running`);\n if (jobStats.blocked > 0) parts.push(`${getStateIcon('BLOCKED')} ${jobStats.blocked} blocked`);\n if (jobStats.skipped > 0) parts.push(`${getStateIcon('SKIPPED')} ${jobStats.skipped} skipped`);\n \n lines.push(`Jobs: ${parts.join(' ')}`);\n lines.push('');\n \n // Filter jobs based on options\n let filteredJobs = jobs;\n if (options?.failed) {\n filteredJobs = this.getFailedJobs(jobs);\n }\n \n // Group jobs by state\n const grouped = this.groupJobsByState(filteredJobs);\n \n for (const [state, stateJobs] of Object.entries(grouped)) {\n if (stateJobs.length === 0) continue;\n \n const icon = this.getJobStateIcon(state);\n const stateColored = this.colorizeJobState(state);\n lines.push(`${icon} ${stateColored} (${SEMANTIC_COLORS.count(String(stateJobs.length))}):`);\n \n for (const job of stateJobs) {\n const label = this.parseEmoji(job.node.label);\n const duration = this.formatJobDuration(job.node);\n \n // Basic job line\n lines.push(` ${label} (${duration})`);\n \n // Show additional details if --jobs or --full\n if (options?.jobs || options?.full) {\n // Timing details\n if (job.node.startedAt) {\n const startTime = new Date(job.node.startedAt).toLocaleTimeString();\n const endTime = job.node.finishedAt \n ? new Date(job.node.finishedAt).toLocaleTimeString()\n : 'still running';\n lines.push(` ${SEMANTIC_COLORS.dim(`${getProgressIcon('TIMING')} ${startTime} → ${endTime}`)}`);\n }\n \n // Parallel group info\n if (job.node.parallelGroupIndex !== undefined && job.node.parallelGroupTotal) {\n lines.push(` ${SEMANTIC_COLORS.dim(`${getProgressIcon('PARALLEL')} Parallel: ${job.node.parallelGroupIndex + 1}/${job.node.parallelGroupTotal}`)}`);\n }\n \n // Retry info\n if (job.node.retried) {\n lines.push(` ${SEMANTIC_COLORS.warning(`${getProgressIcon('RETRY')} Retried`)}`);\n }\n }\n }\n lines.push('');\n }\n \n return lines.join('\\n').trim();\n }\n \n private formatFailedJobsSummaryWithHints(failedJobs: any[], options?: BuildDetailFormatterOptions): { summary: string; hints: string[] } {\n const hints: string[] = [];\n const summary = this.formatFailedJobsSummary(failedJobs, options, hints);\n return { summary, hints };\n }\n \n private formatFailedJobsSummary(failedJobs: any[], options?: BuildDetailFormatterOptions, hints?: string[]): string {\n const lines: string[] = [];\n \n // Group identical jobs by label\n const jobGroups = this.groupJobsByLabel(failedJobs);\n \n // Show all groups if --all-jobs, otherwise limit to 10\n const displayGroups = options?.allJobs \n ? jobGroups \n : jobGroups.slice(0, 10);\n \n for (const group of displayGroups) {\n const label = this.parseEmoji(group.label);\n if (group.count === 1) {\n const duration = this.formatJobDuration(group.jobs[0].node);\n lines.push(` ${SEMANTIC_COLORS.error('Failed')}: ${label} - ran ${duration}`);\n } else {\n // Multiple jobs with same label - show detailed breakdown\n const statusParts = [];\n \n if (group.stateCounts.failed > 0) {\n statusParts.push(`${group.stateCounts.failed} failed`);\n }\n if (group.stateCounts.broken > 0) {\n statusParts.push(`${group.stateCounts.broken} broken`);\n }\n if (group.stateCounts.notStarted > 0) {\n statusParts.push(`${group.stateCounts.notStarted} not started`);\n }\n if (group.stateCounts.passed > 0) {\n statusParts.push(`${group.stateCounts.passed} passed`);\n }\n if (group.stateCounts.other > 0) {\n statusParts.push(`${group.stateCounts.other} other`);\n }\n \n const statusInfo = statusParts.join(', ') || 'various states';\n \n // Show parallel info if it's a parallel job group\n const parallelInfo = group.parallelTotal > 0 ? ` (${group.count}/${group.parallelTotal} parallel)` : ` (${SEMANTIC_COLORS.count(String(group.count))} jobs)`;\n lines.push(` ${SEMANTIC_COLORS.error('Failed')}: ${label}${parallelInfo}: ${statusInfo}`);\n }\n }\n \n // Add summary if there are more job types and not showing all\n if (!options?.allJobs) {\n const remaining = jobGroups.length - displayGroups.length;\n if (remaining > 0) {\n lines.push(` ${SEMANTIC_COLORS.muted(`...and ${remaining} more job types`)}`);\n \n // If hints array is provided, add hint there; otherwise format inline\n if (hints) {\n hints.push('Use --all-jobs to show all jobs');\n } else {\n lines.push('');\n const tips = formatTips(\n ['Use --all-jobs to show all jobs'],\n TipStyle.GROUPED\n );\n lines.push(tips);\n }\n }\n }\n \n return lines.join('\\n');\n }\n \n private groupJobsByLabel(jobs: any[]): any[] {\n const groups = new Map<string, any>();\n \n for (const job of jobs) {\n const fullLabel = job.node.label || 'Unnamed job';\n \n // Strip parallel job index from label for grouping\n // e.g., \"deposit_and_filing_schedule_calculator rspec (1/22)\" -> \"deposit_and_filing_schedule_calculator rspec\"\n const baseLabel = fullLabel.replace(/\\s*\\(\\d+\\/\\d+\\)\\s*$/, '').trim();\n \n if (!groups.has(baseLabel)) {\n groups.set(baseLabel, {\n label: baseLabel,\n count: 0,\n jobs: [],\n parallelTotal: 0,\n stateCounts: {\n failed: 0,\n broken: 0,\n notStarted: 0,\n passed: 0,\n other: 0\n }\n });\n }\n \n const group = groups.get(baseLabel)!;\n group.count++;\n group.jobs.push(job);\n \n // Track the maximum parallel total for this job group\n if (job.node.parallelGroupTotal && job.node.parallelGroupTotal > group.parallelTotal) {\n group.parallelTotal = job.node.parallelGroupTotal;\n }\n \n\n \n // Count by state\n const state = job.node.state?.toUpperCase();\n \n // Use exit status as source of truth when available\n // Note: exitStatus comes as a string from Buildkite API\n if (job.node.exitStatus !== null && job.node.exitStatus !== undefined) {\n const exitCode = parseInt(job.node.exitStatus, 10);\n if (exitCode === 0) {\n group.stateCounts.passed++;\n } else {\n group.stateCounts.failed++;\n }\n } else if (!job.node.startedAt) {\n group.stateCounts.notStarted++;\n } else if (state === 'FINISHED' || state === 'COMPLETED') {\n // For finished jobs without exit status, check passed field\n if (job.node.passed === true) {\n group.stateCounts.passed++;\n } else if (job.node.passed === false) {\n group.stateCounts.failed++;\n } else {\n group.stateCounts.other++;\n }\n } else if (state === 'FAILED') {\n group.stateCounts.failed++;\n } else if (state === 'BROKEN') {\n group.stateCounts.broken++;\n } else if (state === 'PASSED' || job.node.passed === true) {\n group.stateCounts.passed++;\n } else {\n group.stateCounts.other++;\n }\n }\n \n // Convert to array and sort by count (most failures first)\n return Array.from(groups.values())\n .sort((a, b) => b.count - a.count);\n }\n \n private formatDuration(build: any): string {\n if (!build.startedAt) {\n return 'not started';\n }\n \n const start = new Date(build.startedAt);\n const end = build.finishedAt ? new Date(build.finishedAt) : new Date();\n const durationMs = end.getTime() - start.getTime();\n \n const minutes = Math.floor(durationMs / 60000);\n const seconds = Math.floor((durationMs % 60000) / 1000);\n \n if (build.state === 'RUNNING') {\n return `${minutes}m ${seconds}s elapsed`;\n }\n \n return `${minutes}m ${seconds}s`;\n }\n \n private formatJobDuration(job: any): string {\n if (!job.startedAt) {\n return 'not started';\n }\n \n const start = new Date(job.startedAt);\n const end = job.finishedAt ? new Date(job.finishedAt) : new Date();\n const durationMs = end.getTime() - start.getTime();\n \n const minutes = Math.floor(durationMs / 60000);\n const seconds = Math.floor((durationMs % 60000) / 1000);\n \n return `${minutes}m ${seconds}s`;\n }\n \n private formatAge(createdAt: string): string {\n return formatDistanceToNow(new Date(createdAt), { addSuffix: true });\n }\n \n private colorizeJobState(state: string): string {\n switch (state.toLowerCase()) {\n case 'failed':\n return SEMANTIC_COLORS.error(state);\n case 'passed':\n return SEMANTIC_COLORS.success(state);\n case 'running':\n return SEMANTIC_COLORS.info(state);\n case 'blocked':\n return SEMANTIC_COLORS.warning(state);\n case 'skipped':\n case 'canceled':\n return SEMANTIC_COLORS.muted(state);\n default:\n return state;\n }\n }\n \n private getStatusIcon(state: string): string {\n return getStateIcon(state);\n }\n \n private getJobStateIcon(state: string): string {\n return getStateIcon(state);\n }\n \n private getAnnotationIcon(style: string): string {\n return getAnnotationIcon(style);\n }\n \n private colorizeAnnotationStyle(style: string): string {\n switch (style.toUpperCase()) {\n case 'ERROR':\n return SEMANTIC_COLORS.error(style.toLowerCase());\n case 'WARNING':\n return SEMANTIC_COLORS.warning(style.toLowerCase());\n case 'INFO':\n return SEMANTIC_COLORS.info(style.toLowerCase());\n case 'SUCCESS':\n return SEMANTIC_COLORS.success(style.toLowerCase());\n default:\n return style.toLowerCase();\n }\n }\n \n private colorizeStatusIcon(icon: string, state: string): string {\n const upperState = state.toUpperCase();\n const theme = BUILD_STATUS_THEME[upperState as keyof typeof BUILD_STATUS_THEME];\n if (!theme) {\n return SEMANTIC_COLORS.muted(icon);\n }\n return theme.color(icon);\n }\n \n private getJobStats(jobs: any[]): any {\n const stats = {\n total: jobs?.length || 0,\n passed: 0,\n failed: 0,\n running: 0,\n blocked: 0,\n skipped: 0,\n queued: 0,\n completed: 0\n };\n \n if (!jobs) return stats;\n \n for (const job of jobs) {\n const state = job.node.state?.toUpperCase() || '';\n \n // If we have an exit status, use that as the source of truth\n // Note: exitStatus comes as a string from Buildkite API\n if (job.node.exitStatus !== null && job.node.exitStatus !== undefined) {\n const exitCode = parseInt(job.node.exitStatus, 10);\n if (exitCode === 0) {\n stats.passed++;\n stats.completed++;\n } else {\n stats.failed++;\n stats.completed++;\n }\n } else if (state === 'RUNNING') {\n stats.running++;\n } else if (state === 'BLOCKED') {\n stats.blocked++;\n } else if (state === 'SKIPPED' || state === 'CANCELED') {\n stats.skipped++;\n stats.completed++;\n } else if (state === 'SCHEDULED' || state === 'ASSIGNED') {\n stats.queued++;\n } else if (state === 'FINISHED' || state === 'COMPLETED') {\n // For finished jobs without exit status, check passed field\n if (job.node.passed === true) {\n stats.passed++;\n stats.completed++;\n } else if (job.node.passed === false) {\n stats.failed++;\n stats.completed++;\n }\n } else if (state === 'PASSED' || job.node.passed === true) {\n stats.passed++;\n stats.completed++;\n } else if (state === 'FAILED' || state === 'BROKEN' || job.node.passed === false) {\n stats.failed++;\n stats.completed++;\n }\n }\n \n return stats;\n }\n \n private getFailedJobs(jobs: any[]): any[] {\n if (!jobs) return [];\n \n return jobs.filter(job => {\n const state = job.node.state?.toUpperCase();\n \n // If we have an exit status, use that as the source of truth\n // Note: exitStatus comes as a string from Buildkite API\n if (job.node.exitStatus !== null && job.node.exitStatus !== undefined) {\n const exitCode = parseInt(job.node.exitStatus, 10);\n return exitCode !== 0;\n }\n \n // Otherwise fall back to state\n return state === 'FAILED' || state === 'BROKEN' || job.node.passed === false;\n });\n }\n \n private getRunningJobs(jobs: any[]): any[] {\n if (!jobs) return [];\n \n return jobs.filter(job => job.node.state?.toLowerCase() === 'running');\n }\n \n private getBlockedJobs(jobs: any[]): any[] {\n if (!jobs) return [];\n \n return jobs.filter(job => job.node.state?.toLowerCase() === 'blocked');\n }\n \n private groupJobsByState(jobs: any[]): Record<string, any[]> {\n const grouped: Record<string, any[]> = {\n 'Failed': [],\n 'Passed': [],\n 'Running': [],\n 'Blocked': [],\n 'Skipped': []\n };\n \n if (!jobs) return grouped;\n \n for (const job of jobs) {\n const state = job.node.state?.toUpperCase() || '';\n \n // If we have an exit status, use that as the source of truth\n // Note: exitStatus comes as a string from Buildkite API\n if (job.node.exitStatus !== null && job.node.exitStatus !== undefined) {\n const exitCode = parseInt(job.node.exitStatus, 10);\n if (exitCode === 0) {\n grouped['Passed'].push(job);\n } else {\n grouped['Failed'].push(job);\n }\n } else if (state === 'RUNNING') {\n grouped['Running'].push(job);\n } else if (state === 'BLOCKED') {\n grouped['Blocked'].push(job);\n } else if (state === 'SKIPPED' || state === 'CANCELED') {\n grouped['Skipped'].push(job);\n } else if (state === 'FINISHED' || state === 'COMPLETED') {\n // For finished jobs without exit status, check passed field\n if (job.node.passed === true) {\n grouped['Passed'].push(job);\n } else if (job.node.passed === false) {\n grouped['Failed'].push(job);\n }\n } else if (state === 'PASSED' || job.node.passed === true) {\n grouped['Passed'].push(job);\n } else if (state === 'FAILED' || state === 'BROKEN' || job.node.passed === false) {\n grouped['Failed'].push(job);\n }\n }\n \n return grouped;\n }\n \n private countAnnotationsByStyle(annotations: any[]): Record<string, number> {\n const counts: Record<string, number> = {\n ERROR: 0,\n WARNING: 0,\n INFO: 0,\n SUCCESS: 0\n };\n \n for (const annotation of annotations) {\n const style = annotation.node.style?.toUpperCase() || 'INFO';\n if (style in counts) {\n counts[style]++;\n }\n }\n \n return counts;\n }\n \n private groupAnnotationsByStyle(annotations: any[]): Record<string, any[]> {\n const grouped: Record<string, any[]> = {};\n \n for (const annotation of annotations) {\n const style = annotation.node.style?.toUpperCase() || 'INFO';\n if (!grouped[style]) {\n grouped[style] = [];\n }\n grouped[style].push(annotation);\n }\n \n return grouped;\n }\n \n formatError(action: string, error: any): string {\n return formatError(action, error);\n }\n}\n"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { PlainTextFormatter } from './PlainTextFormatter.js';
|
|
2
|
+
import { JsonFormatter } from './JsonFormatter.js';
|
|
3
|
+
import { AlfredFormatter } from './AlfredFormatter.js';
|
|
4
|
+
export function getBuildDetailFormatter(format) {
|
|
5
|
+
switch (format.toLowerCase()) {
|
|
6
|
+
case 'json':
|
|
7
|
+
return new JsonFormatter();
|
|
8
|
+
case 'alfred':
|
|
9
|
+
return new AlfredFormatter();
|
|
10
|
+
case 'plain':
|
|
11
|
+
case 'text':
|
|
12
|
+
case 'plain-text':
|
|
13
|
+
default:
|
|
14
|
+
return new PlainTextFormatter();
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export { BaseBuildDetailFormatter } from './Formatter.js';
|
|
18
|
+
export { PlainTextFormatter } from './PlainTextFormatter.js';
|
|
19
|
+
export { JsonFormatter } from './JsonFormatter.js';
|
|
20
|
+
export { AlfredFormatter } from './AlfredFormatter.js';
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"/","sources":["formatters/build-detail/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD,MAAM,UAAU,uBAAuB,CAAC,MAAc;IACpD,QAAQ,MAAM,CAAC,WAAW,EAAE,EAAE,CAAC;QAC7B,KAAK,MAAM;YACT,OAAO,IAAI,aAAa,EAAE,CAAC;QAC7B,KAAK,QAAQ;YACX,OAAO,IAAI,eAAe,EAAE,CAAC;QAC/B,KAAK,OAAO,CAAC;QACb,KAAK,MAAM,CAAC;QACZ,KAAK,YAAY,CAAC;QAClB;YACE,OAAO,IAAI,kBAAkB,EAAE,CAAC;IACpC,CAAC;AACH,CAAC;AAED,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC","sourcesContent":["import { BaseBuildDetailFormatter } from './Formatter.js';\nimport { PlainTextFormatter } from './PlainTextFormatter.js';\nimport { JsonFormatter } from './JsonFormatter.js';\nimport { AlfredFormatter } from './AlfredFormatter.js';\n\nexport function getBuildDetailFormatter(format: string): BaseBuildDetailFormatter {\n switch (format.toLowerCase()) {\n case 'json':\n return new JsonFormatter();\n case 'alfred':\n return new AlfredFormatter();\n case 'plain':\n case 'text':\n case 'plain-text':\n default:\n return new PlainTextFormatter();\n }\n}\n\nexport { BaseBuildDetailFormatter } from './Formatter.js';\nexport { PlainTextFormatter } from './PlainTextFormatter.js';\nexport { JsonFormatter } from './JsonFormatter.js';\nexport { AlfredFormatter } from './AlfredFormatter.js';\n"]}
|
|
@@ -76,9 +76,11 @@ export class PlainTextFormatter extends BaseFormatter {
|
|
|
76
76
|
lines.push(SEMANTIC_COLORS.dim(`Found ${SEMANTIC_COLORS.count(builds.length.toString())} builds`));
|
|
77
77
|
// Add contextual hints if searching multiple orgs
|
|
78
78
|
if (options?.organizationsCount && options.organizationsCount > 1 && !options.orgSpecified) {
|
|
79
|
-
const hints = [`Searched across ${options.organizationsCount} organizations. Use --org to filter to a specific organization.`];
|
|
80
79
|
lines.push('');
|
|
81
|
-
lines.push(
|
|
80
|
+
lines.push(SEMANTIC_COLORS.dim(`Searched across ${options.organizationsCount} organizations`));
|
|
81
|
+
lines.push('');
|
|
82
|
+
const tips = formatTips(['Use --org <name> to filter to a specific organization'], TipStyle.GROUPED);
|
|
83
|
+
lines.push(tips);
|
|
82
84
|
}
|
|
83
85
|
return lines.join('\n');
|
|
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OAAO,EAAE,MAAM,EAAE,CAAC;gBAC1C,OAAO,IAAI,KAAK,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC;YACzD,CAAC;QACH,CAAC;QAED,MAAM,WAAW,GAAa,EAAE,CAAC;QACjC,IAAI,CAAC,OAAO,EAAE,YAAY,EAAE,CAAC;YAC3B,WAAW,CAAC,IAAI,CAAC,kDAAkD,CAAC,CAAC;QACvE,CAAC;QACD,WAAW,CAAC,IAAI,CAAC,gCAAgC,CAAC,CAAC;QACnD,WAAW,CAAC,IAAI,CAAC,4BAA4B,CAAC,CAAC;QAE/C,OAAO,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;IAChD,CAAC;IAEO,cAAc,CAAC,OAA+B;QACpD,MAAM,OAAO,GAAG,OAAO,EAAE,YAAY,IAAI,uCAAuC,CAAC;QACjF,OAAO,WAAW,CAAC,OAAO,EAAE;YAC1B,QAAQ,EAAE,IAAI;YACd,WAAW,EAAE,sBAAsB;YACnC,WAAW,EAAE,CAAC,yDAAyD,CAAC;SACzE,CAAC,CAAC;IACL,CAAC;IAEO,kBAAkB,CAAC,OAA+B;QACxD,MAAM,OAAO,GAAG,OAAO,EAAE,YAAY,IAAI,8BAA8B,CAAC;QACxE,OAAO,WAAW,CAAC,OAAO,EAAE;YAC1B,QAAQ,EAAE,IAAI;YACd,WAAW,EAAE,sBAAsB;SACpC,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["import { BaseFormatter, BuildFormatterOptions } from './Formatter.js';\nimport { Build } from '../../types/index.js';\nimport { renderTable } from '../../ui/table.js';\nimport { renderResponsiveTable, isNarrowTerminal, isMobileTerminal } from '../../ui/responsive-table.js';\nimport { \n SEMANTIC_COLORS, \n formatBuildStatus,\n formatEmptyState,\n formatError,\n formatTips,\n TipStyle\n} from '../../ui/theme.js';\n\nexport class PlainTextFormatter extends BaseFormatter {\n name = 'plain-text';\n \n formatBuilds(builds: Build[], options?: BuildFormatterOptions): string {\n // Handle error cases first\n if (options?.hasError) {\n if (options.errorType === 'access') {\n return this.formatAccessError(options);\n } else if (options.errorType === 'not_found') {\n return this.formatNotFoundError(options);\n } else if (options.errorType === 'api') {\n return this.formatApiError(options);\n } else {\n return this.formatGenericError(options);\n }\n }\n \n // Handle empty results (no error, just no data)\n if (builds.length === 0) {\n let message = 'No builds found';\n const suggestions: string[] = [];\n \n // Add user info if provided\n if (options?.userName) {\n message = `No builds found for ${SEMANTIC_COLORS.label(options.userName)}`;\n if (options?.userEmail || options?.userId) {\n message += ` ${SEMANTIC_COLORS.dim(`(${options.userEmail || options.userId})`)}`;\n }\n }\n \n // Add suggestions based on context\n if (!options?.orgSpecified) {\n suggestions.push('Try specifying an organization with --org <name>');\n }\n suggestions.push('Use --count to increase the number of results');\n \n return formatEmptyState(message, suggestions);\n }\n\n const lines: string[] = [];\n \n // Build a tabular summary view for scan-ability\n const headers = ['PIPELINE', 'NUMBER', 'STATE', 'BRANCH'].map(\n h => SEMANTIC_COLORS.heading(h)\n );\n \n const dataRows: string[][] = [];\n builds.forEach((b: Build) => {\n dataRows.push([\n b.pipeline?.slug || SEMANTIC_COLORS.muted('unknown'),\n SEMANTIC_COLORS.identifier(`#${b.number}`),\n formatBuildStatus(b.state || 'UNKNOWN', { useSymbol: false }),\n b.branch || SEMANTIC_COLORS.dim('(no branch)')\n ]);\n });\n \n // Use responsive table for narrow terminals\n if (isNarrowTerminal()) {\n // Configure columns with priorities for narrow displays\n const columns = [\n { header: 'PIPELINE', priority: 3, minWidth: 10, truncate: true },\n { header: 'NUMBER', priority: 10, minWidth: 6, align: 'right' as const },\n { header: 'STATE', priority: 9, minWidth: 8 },\n { header: 'BRANCH', priority: 1, minWidth: 6, truncate: true }\n ];\n \n if (isMobileTerminal()) {\n // For very narrow terminals, show only most important columns\n columns[0].priority = 2; // Lower pipeline priority\n columns[3].priority = 0; // Hide branch on mobile\n }\n \n lines.push(renderResponsiveTable(headers, dataRows, { columns }));\n } else {\n // Use standard table for wide terminals\n const rows: string[][] = [headers, ...dataRows];\n lines.push(renderTable(rows, { preserveWidths: true }));\n }\n \n // Summary line (dimmed as auxiliary info)\n lines.push('');\n lines.push(SEMANTIC_COLORS.dim(`Found ${SEMANTIC_COLORS.count(builds.length.toString())} builds`));\n \n // Add contextual hints if searching multiple orgs\n if (options?.organizationsCount && options.organizationsCount > 1 && !options.orgSpecified) {\n const hints = [`Searched across ${options.organizationsCount} organizations. Use --org to filter to a specific organization.`];\n lines.push('');\n lines.push(formatTips(hints, TipStyle.INDIVIDUAL));\n }\n \n return lines.join('\\n');\n }\n \n private formatAccessError(options?: BuildFormatterOptions): string {\n let message = 'Access Denied';\n \n if (options?.orgSpecified && options?.accessErrors && options.accessErrors.length > 0) {\n message = options.accessErrors[0];\n } else {\n message = 'You don\\'t have access to the specified organization(s).';\n }\n \n return formatError(message, {\n showHelp: true,\n helpCommand: 'bktide orgs',\n suggestions: [\n 'Check your organization name is correct',\n 'Run \"bktide orgs\" to see available organizations',\n 'Verify your token has the correct permissions'\n ]\n });\n }\n \n private formatNotFoundError(options?: BuildFormatterOptions): string {\n let message = 'No builds found';\n \n if (options?.userName) {\n message = `No builds found for ${options.userName}`;\n if (options?.userEmail || options?.userId) {\n message += ` (${options.userEmail || options.userId})`;\n }\n }\n \n const suggestions: string[] = [];\n if (!options?.orgSpecified) {\n suggestions.push('Try specifying an organization with --org <name>');\n }\n suggestions.push('Check your filters are correct');\n suggestions.push('Try broadening your search');\n \n return formatEmptyState(message, suggestions);\n }\n \n private formatApiError(options?: BuildFormatterOptions): string {\n const message = options?.errorMessage || 'Failed to fetch builds from Buildkite';\n return formatError(message, {\n showHelp: true,\n helpCommand: 'bktide builds --help',\n suggestions: ['This might be a temporary issue. Try again in a moment.']\n });\n }\n \n private formatGenericError(options?: BuildFormatterOptions): string {\n const message = options?.errorMessage || 'An unexpected error occurred';\n return formatError(message, {\n showHelp: true,\n helpCommand: 'bktide builds --help'\n });\n }\n} "]}
|
|
1
|
+
{"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AAG,uBAAuB,OAAO,CAAC,QAAQ,EAAE,CAAC;YACpD,IAAI,OAAO,EAAE,SAAS,IAAI,OAAO,EAAE,MAAM,EAAE,CAAC;gBAC1C,OAAO,IAAI,KAAK,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC;YACzD,CAAC;QACH,CAAC;QAED,MAAM,WAAW,GAAa,EAAE,CAAC;QACjC,IAAI,CAAC,OAAO,EAAE,YAAY,EAAE,CAAC;YAC3B,WAAW,CAAC,IAAI,CAAC,kDAAkD,CAAC,CAAC;QACvE,CAAC;QACD,WAAW,CAAC,IAAI,CAAC,gCAAgC,CAAC,CAAC;QACnD,WAAW,CAAC,IAAI,CAAC,4BAA4B,CAAC,CAAC;QAE/C,OAAO,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;IAChD,CAAC;IAEO,cAAc,CAAC,OAA+B;QACpD,MAAM,OAAO,GAAG,OAAO,EAAE,YAAY,IAAI,uCAAuC,CAAC;QACjF,OAAO,WAAW,CAAC,OAAO,EAAE;YAC1B,QAAQ,EAAE,IAAI;YACd,WAAW,EAAE,sBAAsB;YACnC,WAAW,EAAE,CAAC,yDAAyD,CAAC;SACzE,CAAC,CAAC;IACL,CAAC;IAEO,kBAAkB,CAAC,OAA+B;QACxD,MAAM,OAAO,GAAG,OAAO,EAAE,YAAY,IAAI,8BAA8B,CAAC;QACxE,OAAO,WAAW,CAAC,OAAO,EAAE;YAC1B,QAAQ,EAAE,IAAI;YACd,WAAW,EAAE,sBAAsB;SACpC,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["import { BaseFormatter, BuildFormatterOptions } from './Formatter.js';\nimport { Build } from '../../types/index.js';\nimport { renderTable } from '../../ui/table.js';\nimport { renderResponsiveTable, isNarrowTerminal, isMobileTerminal } from '../../ui/responsive-table.js';\nimport { \n SEMANTIC_COLORS, \n formatBuildStatus,\n formatEmptyState,\n formatError,\n formatTips,\n TipStyle\n} from '../../ui/theme.js';\n\nexport class PlainTextFormatter extends BaseFormatter {\n name = 'plain-text';\n \n formatBuilds(builds: Build[], options?: BuildFormatterOptions): string {\n // Handle error cases first\n if (options?.hasError) {\n if (options.errorType === 'access') {\n return this.formatAccessError(options);\n } else if (options.errorType === 'not_found') {\n return this.formatNotFoundError(options);\n } else if (options.errorType === 'api') {\n return this.formatApiError(options);\n } else {\n return this.formatGenericError(options);\n }\n }\n \n // Handle empty results (no error, just no data)\n if (builds.length === 0) {\n let message = 'No builds found';\n const suggestions: string[] = [];\n \n // Add user info if provided\n if (options?.userName) {\n message = `No builds found for ${SEMANTIC_COLORS.label(options.userName)}`;\n if (options?.userEmail || options?.userId) {\n message += ` ${SEMANTIC_COLORS.dim(`(${options.userEmail || options.userId})`)}`;\n }\n }\n \n // Add suggestions based on context\n if (!options?.orgSpecified) {\n suggestions.push('Try specifying an organization with --org <name>');\n }\n suggestions.push('Use --count to increase the number of results');\n \n return formatEmptyState(message, suggestions);\n }\n\n const lines: string[] = [];\n \n // Build a tabular summary view for scan-ability\n const headers = ['PIPELINE', 'NUMBER', 'STATE', 'BRANCH'].map(\n h => SEMANTIC_COLORS.heading(h)\n );\n \n const dataRows: string[][] = [];\n builds.forEach((b: Build) => {\n dataRows.push([\n b.pipeline?.slug || SEMANTIC_COLORS.muted('unknown'),\n SEMANTIC_COLORS.identifier(`#${b.number}`),\n formatBuildStatus(b.state || 'UNKNOWN', { useSymbol: false }),\n b.branch || SEMANTIC_COLORS.dim('(no branch)')\n ]);\n });\n \n // Use responsive table for narrow terminals\n if (isNarrowTerminal()) {\n // Configure columns with priorities for narrow displays\n const columns = [\n { header: 'PIPELINE', priority: 3, minWidth: 10, truncate: true },\n { header: 'NUMBER', priority: 10, minWidth: 6, align: 'right' as const },\n { header: 'STATE', priority: 9, minWidth: 8 },\n { header: 'BRANCH', priority: 1, minWidth: 6, truncate: true }\n ];\n \n if (isMobileTerminal()) {\n // For very narrow terminals, show only most important columns\n columns[0].priority = 2; // Lower pipeline priority\n columns[3].priority = 0; // Hide branch on mobile\n }\n \n lines.push(renderResponsiveTable(headers, dataRows, { columns }));\n } else {\n // Use standard table for wide terminals\n const rows: string[][] = [headers, ...dataRows];\n lines.push(renderTable(rows, { preserveWidths: true }));\n }\n \n // Summary line (dimmed as auxiliary info)\n lines.push('');\n lines.push(SEMANTIC_COLORS.dim(`Found ${SEMANTIC_COLORS.count(builds.length.toString())} builds`));\n \n // Add contextual hints if searching multiple orgs\n if (options?.organizationsCount && options.organizationsCount > 1 && !options.orgSpecified) {\n lines.push('');\n lines.push(SEMANTIC_COLORS.dim(`Searched across ${options.organizationsCount} organizations`));\n lines.push('');\n const tips = formatTips(\n ['Use --org <name> to filter to a specific organization'],\n TipStyle.GROUPED\n );\n lines.push(tips);\n }\n \n return lines.join('\\n');\n }\n \n private formatAccessError(options?: BuildFormatterOptions): string {\n let message = 'Access Denied';\n \n if (options?.orgSpecified && options?.accessErrors && options.accessErrors.length > 0) {\n message = options.accessErrors[0];\n } else {\n message = 'You don\\'t have access to the specified organization(s).';\n }\n \n return formatError(message, {\n showHelp: true,\n helpCommand: 'bktide orgs',\n suggestions: [\n 'Check your organization name is correct',\n 'Run \"bktide orgs\" to see available organizations',\n 'Verify your token has the correct permissions'\n ]\n });\n }\n \n private formatNotFoundError(options?: BuildFormatterOptions): string {\n let message = 'No builds found';\n \n if (options?.userName) {\n message = `No builds found for ${options.userName}`;\n if (options?.userEmail || options?.userId) {\n message += ` (${options.userEmail || options.userId})`;\n }\n }\n \n const suggestions: string[] = [];\n if (!options?.orgSpecified) {\n suggestions.push('Try specifying an organization with --org <name>');\n }\n suggestions.push('Check your filters are correct');\n suggestions.push('Try broadening your search');\n \n return formatEmptyState(message, suggestions);\n }\n \n private formatApiError(options?: BuildFormatterOptions): string {\n const message = options?.errorMessage || 'Failed to fetch builds from Buildkite';\n return formatError(message, {\n showHelp: true,\n helpCommand: 'bktide builds --help',\n suggestions: ['This might be a temporary issue. Try again in a moment.']\n });\n }\n \n private formatGenericError(options?: BuildFormatterOptions): string {\n const message = options?.errorMessage || 'An unexpected error occurred';\n return formatError(message, {\n showHelp: true,\n helpCommand: 'bktide builds --help'\n });\n }\n} "]}
|
|
@@ -145,18 +145,15 @@ export class PlainTextFormatter extends AbstractFormatter {
|
|
|
145
145
|
// Add filter hints
|
|
146
146
|
if (options?.filterActive && options?.filterText) {
|
|
147
147
|
output.push(SEMANTIC_COLORS.dim(`Showing pipelines matching '${options.filterText}'`));
|
|
148
|
-
hints.push(
|
|
148
|
+
hints.push(`Remove --filter to see all pipelines`);
|
|
149
149
|
}
|
|
150
150
|
else if (pipelines.length > 20) {
|
|
151
151
|
// Many pipelines - suggest filtering
|
|
152
|
-
hints.push(
|
|
152
|
+
hints.push(`Use --filter <text> to search by name or description`);
|
|
153
153
|
}
|
|
154
154
|
// Add organization hints
|
|
155
155
|
if (organizations.length > 1 && !options?.orgSpecified) {
|
|
156
|
-
hints.push(
|
|
157
|
-
if (pipelines.length > 10) {
|
|
158
|
-
hints.push('Pipeline slugs are unique within each organization');
|
|
159
|
-
}
|
|
156
|
+
hints.push(`Use --org <name> to focus on a specific organization`);
|
|
160
157
|
}
|
|
161
158
|
// Add pagination hints
|
|
162
159
|
if (options?.truncated || options?.hasMoreAvailable) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlainTextFormatter.js","sourceRoot":"/","sources":["formatters/pipelines/PlainTextFormatter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAGxD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AACzG,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE5F,MAAM,OAAO,kBAAmB,SAAQ,iBAAiB;IACvD;QACE,KAAK,CA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CAAC,CAAC,CAAE,mBAAmB;gBACrE,CAAC;qBAAM,IAAI,cAAc,GAAG,GAAG,EAAE,CAAC;oBAChC,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,cAAc,GAAG,GAAG,EAAE,GAAG,CAAC,CAAC,CAAE,oBAAoB;gBACxE,CAAC;qBAAM,CAAC;oBACN,SAAS,GAAG,cAAc,GAAG,GAAG,CAAC,CAAE,8BAA8B;gBACnE,CAAC;gBAED,qDAAqD;gBACrD,IAAI,OAAO,EAAE,gBAAgB,IAAI,OAAO,EAAE,SAAS,EAAE,CAAC;oBACpD,KAAK,CAAC,IAAI,CAAC,eAAe,SAAS,cAAc,CAAC,CAAC;gBACrD,CAAC;YACH,CAAC;QACH,CAAC;QAED,uBAAuB;QACvB,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACrB,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YAChB,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;QACnD,CAAC;QAED,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC3B,CAAC;CACF","sourcesContent":["import { AbstractFormatter } from '../BaseFormatter.js';\nimport { PipelineFormatter, PipelineFormatterOptions } from './Formatter.js';\nimport { Pipeline } from '../../types/index.js';\nimport { renderTable } from '../../ui/table.js';\nimport { renderResponsiveTable, isNarrowTerminal, isMobileTerminal } from '../../ui/responsive-table.js';\nimport { SEMANTIC_COLORS, formatEmptyState, formatTips, TipStyle } from '../../ui/theme.js';\n\nexport class PlainTextFormatter extends AbstractFormatter implements PipelineFormatter {\n constructor() {\n super('plain-text');\n }\n\n formatPipelines(pipelines: Pipeline[], organizations: string[], options?: PipelineFormatterOptions): string {\n // If no organizations are found, handle that case\n if (organizations.length === 0) {\n return formatEmptyState(\n 'No organizations found',\n ['Check your API token has the correct permissions']\n );\n }\n \n return this.format(pipelines, this.formatPipelinesImpl.bind(this, organizations), options);\n }\n\n private formatPipelinesImpl(organizations: string[], pipelines: Pipeline[], options?: PipelineFormatterOptions): string {\n const output: string[] = [];\n \n if (pipelines.length === 0) {\n // Build context-aware empty state message\n let message: string;\n const suggestions: string[] = [];\n \n if (options?.filterActive && options?.filterText) {\n // Filter returned no results\n message = `No pipelines match filter '${SEMANTIC_COLORS.label(options.filterText)}'`;\n suggestions.push('Try a broader search term');\n suggestions.push('The filter searches pipeline names, slugs, and descriptions');\n suggestions.push('Remove the filter to see all pipelines');\n } else if (organizations.length === 1) {\n // Specific organization has no pipelines\n message = `No pipelines found in organization ${SEMANTIC_COLORS.label(organizations[0])}`;\n suggestions.push('Check the organization name is correct');\n suggestions.push('Verify you have access to pipelines in this organization');\n suggestions.push('Run \"bktide orgs\" to see available organizations');\n } else {\n // No pipelines across all organizations\n message = `No pipelines found across ${organizations.length === 0 ? 'any accessible' : organizations.length.toString()} organizations`;\n suggestions.push('Check your API token has the correct permissions');\n suggestions.push('Run \"bktide token --check\" to verify your access');\n if (organizations.length > 0) {\n suggestions.push('Some organizations may not have any pipelines configured');\n }\n }\n \n return formatEmptyState(message, suggestions);\n }\n\n // Build table rows\n // Check if we're on a mobile terminal\n if (isMobileTerminal()) {\n // Use a vertical list format for very narrow terminals\n const items = pipelines.map(p => ({\n name: p.name || 'Unknown',\n slug: p.slug || '-',\n org: p.organization || '-'\n }));\n \n items.forEach((item, i) => {\n if (i > 0) output.push(''); // Separator between items\n output.push(SEMANTIC_COLORS.heading(item.name));\n output.push(` ${SEMANTIC_COLORS.label('Slug:')} ${SEMANTIC_COLORS.dim(item.slug)}`);\n if (organizations.length > 1) {\n output.push(` ${SEMANTIC_COLORS.label('Org:')} ${item.org}`);\n }\n });\n } else if (isNarrowTerminal()) {\n // Use responsive table for narrow terminals\n if (organizations.length > 1) {\n const headers = ['ORGANIZATION', 'NAME', 'SLUG'].map(h => SEMANTIC_COLORS.heading(h));\n const dataRows: string[][] = pipelines.map((p: Pipeline) => [\n p.organization || SEMANTIC_COLORS.muted('-'),\n p.name || SEMANTIC_COLORS.muted('-'),\n p.slug ? SEMANTIC_COLORS.dim(p.slug) : SEMANTIC_COLORS.muted('-')\n ]);\n \n const columns = [\n { header: 'ORGANIZATION', priority: 2, minWidth: 8, truncate: true },\n { header: 'NAME', priority: 10, minWidth: 10, truncate: true },\n { header: 'SLUG', priority: 5, minWidth: 8, truncate: true }\n ];\n \n output.push(renderResponsiveTable(headers, dataRows, { columns }));\n } else {\n const headers = ['NAME', 'SLUG'].map(h => SEMANTIC_COLORS.heading(h));\n const dataRows: string[][] = pipelines.map((p: Pipeline) => [\n p.name || SEMANTIC_COLORS.muted('-'),\n p.slug ? SEMANTIC_COLORS.dim(p.slug) : SEMANTIC_COLORS.muted('-')\n ]);\n \n const columns = [\n { header: 'NAME', priority: 10, minWidth: 15, truncate: true },\n { header: 'SLUG', priority: 5, minWidth: 10, truncate: true }\n ];\n \n output.push(renderResponsiveTable(headers, dataRows, { columns }));\n }\n } else {\n // Use standard table for wide terminals\n const rows: string[][] = [];\n if (organizations.length > 1) {\n const headers = ['ORGANIZATION', 'NAME', 'SLUG'].map(h => SEMANTIC_COLORS.heading(h));\n rows.push(headers);\n pipelines.forEach((p: Pipeline) => {\n rows.push([\n p.organization || SEMANTIC_COLORS.muted('-'),\n p.name || SEMANTIC_COLORS.muted('-'),\n p.slug ? SEMANTIC_COLORS.dim(p.slug) : SEMANTIC_COLORS.muted('-')\n ]);\n });\n } else {\n const headers = ['NAME', 'SLUG'].map(h => SEMANTIC_COLORS.heading(h));\n rows.push(headers);\n pipelines.forEach((p: Pipeline) => {\n rows.push([\n p.name || SEMANTIC_COLORS.muted('-'),\n p.slug ? SEMANTIC_COLORS.dim(p.slug) : SEMANTIC_COLORS.muted('-')\n ]);\n });\n }\n output.push(renderTable(rows, { preserveWidths: true }));\n }\n \n // Summary line (dimmed)\n output.push('');\n \n // Check if we're showing a subset (we hit the limit and there might be more)\n // But NOT when filtering (filtered results are already a subset)\n const isShowingSubset = !options?.filterActive && (\n options?.hasMoreAvailable || \n (options?.truncated && pipelines.length >= (options?.requestedLimit || 0))\n );\n \n if (organizations.length === 1) {\n if (isShowingSubset) {\n output.push(SEMANTIC_COLORS.dim(\n `Showing ${SEMANTIC_COLORS.count(pipelines.length.toString())} pipelines from ${organizations[0]}`\n ));\n } else {\n output.push(SEMANTIC_COLORS.dim(\n `${SEMANTIC_COLORS.count(pipelines.length.toString())} ${pipelines.length === 1 ? 'pipeline' : 'pipelines'} in ${organizations[0]}`\n ));\n }\n } else {\n if (isShowingSubset) {\n output.push(SEMANTIC_COLORS.dim(\n `Showing ${SEMANTIC_COLORS.count(pipelines.length.toString())} pipelines from ${organizations.length} organizations`\n ));\n } else {\n output.push(SEMANTIC_COLORS.dim(\n `${SEMANTIC_COLORS.count(pipelines.length.toString())} pipelines across ${organizations.length} organizations`\n ));\n }\n }\n \n // Add contextual hints based on results\n const hints: string[] = [];\n \n // Add filter hints\n if (options?.filterActive && options?.filterText) {\n output.push(SEMANTIC_COLORS.dim(`Showing pipelines matching '${options.filterText}'`));\n hints.push('Remove --filter to see all pipelines');\n } else if (pipelines.length > 20) {\n // Many pipelines - suggest filtering\n hints.push('Use --filter <text> to search by name or description');\n }\n \n // Add organization hints\n if (organizations.length > 1 && !options?.orgSpecified) {\n hints.push('Use --org <name> to focus on a specific organization');\n if (pipelines.length > 10) {\n hints.push('Pipeline slugs are unique within each organization');\n }\n }\n \n // Add pagination hints\n if (options?.truncated || options?.hasMoreAvailable) {\n const currentCount = pipelines.length;\n const requestedLimit = options?.requestedLimit || currentCount;\n \n // Only show pagination hints if we actually hit the limit\n // (not if we got fewer results than requested)\n if (currentCount >= requestedLimit) {\n // Calculate reasonable next count suggestion\n let nextCount: number;\n if (requestedLimit < 100) {\n nextCount = Math.min(requestedLimit * 2, 100); // Double up to 100\n } else if (requestedLimit < 500) {\n nextCount = Math.min(requestedLimit + 100, 500); // Add 100 up to 500\n } else {\n nextCount = requestedLimit + 250; // Add 250 for larger requests\n }\n \n // Show pagination hint without duplicating the count\n if (options?.hasMoreAvailable || options?.truncated) {\n hints.push(`Use --count ${nextCount} to see more`);\n }\n }\n }\n \n // Display hints if any\n if (hints.length > 0) {\n output.push('');\n output.push(formatTips(hints, TipStyle.GROUPED));\n }\n \n return output.join('\\n');\n }\n} "]}
|
|
1
|
+
{"version":3,"file":"PlainTextFormatter.js","sourceRoot":"/","sources":["formatters/pipelines/PlainTextFormatter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAGxD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AACzG,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE5F,MAAM,OAAO,kBAAmB,SAAQ,iBAAiB;IACvD;QACE,KAAK,CAAC,YAAY,CAAC,CAAC;IACtB,CAAC;IAED,eAAe,CAAC,SAAqB,EAAE,aAAuB,EAAE,OAAkC;QAChG,kDAAkD;QAClD,IAAI,aAAa,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC/B,OAAO,gBAAgB,CACrB,wBAAwB,EACxB,CAAC,kDAAkD,CAAC,CACrD,CAAC;QACJ,CAAC;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,EAAE,aAAa,CAAC,EAAE,OAAO,CAAC,CAAC;IAC7F,CAAC;IAEO,mBAAmB,CAAC,aAAuB,EAAE,SAAqB,EAAE,OAAkC;QAC5G,MAAM,MAAM,GAAa,EAAE,CAAC;QAE5B,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC3B,0CAA0C;YAC1C,IAAI,OAAe,CAAC;YAC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,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC3B,CAAC;CACF","sourcesContent":["import { AbstractFormatter } from '../BaseFormatter.js';\nimport { PipelineFormatter, PipelineFormatterOptions } from './Formatter.js';\nimport { Pipeline } from '../../types/index.js';\nimport { renderTable } from '../../ui/table.js';\nimport { renderResponsiveTable, isNarrowTerminal, isMobileTerminal } from '../../ui/responsive-table.js';\nimport { SEMANTIC_COLORS, formatEmptyState, formatTips, TipStyle } from '../../ui/theme.js';\n\nexport class PlainTextFormatter extends AbstractFormatter implements PipelineFormatter {\n constructor() {\n super('plain-text');\n }\n\n formatPipelines(pipelines: Pipeline[], organizations: string[], options?: PipelineFormatterOptions): string {\n // If no organizations are found, handle that case\n if (organizations.length === 0) {\n return formatEmptyState(\n 'No organizations found',\n ['Check your API token has the correct permissions']\n );\n }\n \n return this.format(pipelines, this.formatPipelinesImpl.bind(this, organizations), options);\n }\n\n private formatPipelinesImpl(organizations: string[], pipelines: Pipeline[], options?: PipelineFormatterOptions): string {\n const output: string[] = [];\n \n if (pipelines.length === 0) {\n // Build context-aware empty state message\n let message: string;\n const suggestions: string[] = [];\n \n if (options?.filterActive && options?.filterText) {\n // Filter returned no results\n message = `No pipelines match filter '${SEMANTIC_COLORS.label(options.filterText)}'`;\n suggestions.push('Try a broader search term');\n suggestions.push('The filter searches pipeline names, slugs, and descriptions');\n suggestions.push('Remove the filter to see all pipelines');\n } else if (organizations.length === 1) {\n // Specific organization has no pipelines\n message = `No pipelines found in organization ${SEMANTIC_COLORS.label(organizations[0])}`;\n suggestions.push('Check the organization name is correct');\n suggestions.push('Verify you have access to pipelines in this organization');\n suggestions.push('Run \"bktide orgs\" to see available organizations');\n } else {\n // No pipelines across all organizations\n message = `No pipelines found across ${organizations.length === 0 ? 'any accessible' : organizations.length.toString()} organizations`;\n suggestions.push('Check your API token has the correct permissions');\n suggestions.push('Run \"bktide token --check\" to verify your access');\n if (organizations.length > 0) {\n suggestions.push('Some organizations may not have any pipelines configured');\n }\n }\n \n return formatEmptyState(message, suggestions);\n }\n\n // Build table rows\n // Check if we're on a mobile terminal\n if (isMobileTerminal()) {\n // Use a vertical list format for very narrow terminals\n const items = pipelines.map(p => ({\n name: p.name || 'Unknown',\n slug: p.slug || '-',\n org: p.organization || '-'\n }));\n \n items.forEach((item, i) => {\n if (i > 0) output.push(''); // Separator between items\n output.push(SEMANTIC_COLORS.heading(item.name));\n output.push(` ${SEMANTIC_COLORS.label('Slug:')} ${SEMANTIC_COLORS.dim(item.slug)}`);\n if (organizations.length > 1) {\n output.push(` ${SEMANTIC_COLORS.label('Org:')} ${item.org}`);\n }\n });\n } else if (isNarrowTerminal()) {\n // Use responsive table for narrow terminals\n if (organizations.length > 1) {\n const headers = ['ORGANIZATION', 'NAME', 'SLUG'].map(h => SEMANTIC_COLORS.heading(h));\n const dataRows: string[][] = pipelines.map((p: Pipeline) => [\n p.organization || SEMANTIC_COLORS.muted('-'),\n p.name || SEMANTIC_COLORS.muted('-'),\n p.slug ? SEMANTIC_COLORS.dim(p.slug) : SEMANTIC_COLORS.muted('-')\n ]);\n \n const columns = [\n { header: 'ORGANIZATION', priority: 2, minWidth: 8, truncate: true },\n { header: 'NAME', priority: 10, minWidth: 10, truncate: true },\n { header: 'SLUG', priority: 5, minWidth: 8, truncate: true }\n ];\n \n output.push(renderResponsiveTable(headers, dataRows, { columns }));\n } else {\n const headers = ['NAME', 'SLUG'].map(h => SEMANTIC_COLORS.heading(h));\n const dataRows: string[][] = pipelines.map((p: Pipeline) => [\n p.name || SEMANTIC_COLORS.muted('-'),\n p.slug ? SEMANTIC_COLORS.dim(p.slug) : SEMANTIC_COLORS.muted('-')\n ]);\n \n const columns = [\n { header: 'NAME', priority: 10, minWidth: 15, truncate: true },\n { header: 'SLUG', priority: 5, minWidth: 10, truncate: true }\n ];\n \n output.push(renderResponsiveTable(headers, dataRows, { columns }));\n }\n } else {\n // Use standard table for wide terminals\n const rows: string[][] = [];\n if (organizations.length > 1) {\n const headers = ['ORGANIZATION', 'NAME', 'SLUG'].map(h => SEMANTIC_COLORS.heading(h));\n rows.push(headers);\n pipelines.forEach((p: Pipeline) => {\n rows.push([\n p.organization || SEMANTIC_COLORS.muted('-'),\n p.name || SEMANTIC_COLORS.muted('-'),\n p.slug ? SEMANTIC_COLORS.dim(p.slug) : SEMANTIC_COLORS.muted('-')\n ]);\n });\n } else {\n const headers = ['NAME', 'SLUG'].map(h => SEMANTIC_COLORS.heading(h));\n rows.push(headers);\n pipelines.forEach((p: Pipeline) => {\n rows.push([\n p.name || SEMANTIC_COLORS.muted('-'),\n p.slug ? SEMANTIC_COLORS.dim(p.slug) : SEMANTIC_COLORS.muted('-')\n ]);\n });\n }\n output.push(renderTable(rows, { preserveWidths: true }));\n }\n \n // Summary line (dimmed)\n output.push('');\n \n // Check if we're showing a subset (we hit the limit and there might be more)\n // But NOT when filtering (filtered results are already a subset)\n const isShowingSubset = !options?.filterActive && (\n options?.hasMoreAvailable || \n (options?.truncated && pipelines.length >= (options?.requestedLimit || 0))\n );\n \n if (organizations.length === 1) {\n if (isShowingSubset) {\n output.push(SEMANTIC_COLORS.dim(\n `Showing ${SEMANTIC_COLORS.count(pipelines.length.toString())} pipelines from ${organizations[0]}`\n ));\n } else {\n output.push(SEMANTIC_COLORS.dim(\n `${SEMANTIC_COLORS.count(pipelines.length.toString())} ${pipelines.length === 1 ? 'pipeline' : 'pipelines'} in ${organizations[0]}`\n ));\n }\n } else {\n if (isShowingSubset) {\n output.push(SEMANTIC_COLORS.dim(\n `Showing ${SEMANTIC_COLORS.count(pipelines.length.toString())} pipelines from ${organizations.length} organizations`\n ));\n } else {\n output.push(SEMANTIC_COLORS.dim(\n `${SEMANTIC_COLORS.count(pipelines.length.toString())} pipelines across ${organizations.length} organizations`\n ));\n }\n }\n \n // Add contextual hints based on results\n const hints: string[] = [];\n \n // Add filter hints\n if (options?.filterActive && options?.filterText) {\n output.push(SEMANTIC_COLORS.dim(`Showing pipelines matching '${options.filterText}'`));\n hints.push(`Remove --filter to see all pipelines`);\n } else if (pipelines.length > 20) {\n // Many pipelines - suggest filtering\n hints.push(`Use --filter <text> to search by name or description`);\n }\n \n // Add organization hints\n if (organizations.length > 1 && !options?.orgSpecified) {\n hints.push(`Use --org <name> to focus on a specific organization`);\n }\n \n // Add pagination hints\n if (options?.truncated || options?.hasMoreAvailable) {\n const currentCount = pipelines.length;\n const requestedLimit = options?.requestedLimit || currentCount;\n \n // Only show pagination hints if we actually hit the limit\n // (not if we got fewer results than requested)\n if (currentCount >= requestedLimit) {\n // Calculate reasonable next count suggestion\n let nextCount: number;\n if (requestedLimit < 100) {\n nextCount = Math.min(requestedLimit * 2, 100); // Double up to 100\n } else if (requestedLimit < 500) {\n nextCount = Math.min(requestedLimit + 100, 500); // Add 100 up to 500\n } else {\n nextCount = requestedLimit + 250; // Add 250 for larger requests\n }\n \n // Show pagination hint without duplicating the count\n if (options?.hasMoreAvailable || options?.truncated) {\n hints.push(`Use --count ${nextCount} to see more`);\n }\n }\n }\n \n // Display hints if any\n if (hints.length > 0) {\n output.push('');\n output.push(formatTips(hints, TipStyle.GROUPED));\n }\n \n return output.join('\\n');\n }\n} "]}
|
package/dist/graphql/queries.js
CHANGED
|
@@ -135,4 +135,189 @@ export const GET_BUILD_ANNOTATIONS = gql `
|
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
137
|
`;
|
|
138
|
+
export const GET_BUILD_SUMMARY = gql `
|
|
139
|
+
query GetBuildSummary($slug: ID!) {
|
|
140
|
+
build(slug: $slug) {
|
|
141
|
+
id
|
|
142
|
+
number
|
|
143
|
+
state
|
|
144
|
+
branch
|
|
145
|
+
message
|
|
146
|
+
commit
|
|
147
|
+
createdAt
|
|
148
|
+
startedAt
|
|
149
|
+
finishedAt
|
|
150
|
+
canceledAt
|
|
151
|
+
url
|
|
152
|
+
blockedState
|
|
153
|
+
createdBy {
|
|
154
|
+
... on User {
|
|
155
|
+
id
|
|
156
|
+
name
|
|
157
|
+
email
|
|
158
|
+
avatar {
|
|
159
|
+
url
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
... on UnregisteredUser {
|
|
163
|
+
name
|
|
164
|
+
email
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
pipeline {
|
|
168
|
+
id
|
|
169
|
+
name
|
|
170
|
+
slug
|
|
171
|
+
}
|
|
172
|
+
organization {
|
|
173
|
+
id
|
|
174
|
+
name
|
|
175
|
+
slug
|
|
176
|
+
}
|
|
177
|
+
jobs(first: 100) {
|
|
178
|
+
edges {
|
|
179
|
+
node {
|
|
180
|
+
... on JobTypeCommand {
|
|
181
|
+
id
|
|
182
|
+
uuid
|
|
183
|
+
label
|
|
184
|
+
state
|
|
185
|
+
exitStatus
|
|
186
|
+
startedAt
|
|
187
|
+
finishedAt
|
|
188
|
+
passed
|
|
189
|
+
parallelGroupIndex
|
|
190
|
+
parallelGroupTotal
|
|
191
|
+
}
|
|
192
|
+
... on JobTypeWait {
|
|
193
|
+
id
|
|
194
|
+
label
|
|
195
|
+
}
|
|
196
|
+
... on JobTypeTrigger {
|
|
197
|
+
id
|
|
198
|
+
label
|
|
199
|
+
state
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
annotations(first: 50) {
|
|
205
|
+
edges {
|
|
206
|
+
node {
|
|
207
|
+
id
|
|
208
|
+
style
|
|
209
|
+
context
|
|
210
|
+
body {
|
|
211
|
+
html
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
`;
|
|
219
|
+
export const GET_BUILD_FULL = gql `
|
|
220
|
+
query GetBuildFull($slug: ID!) {
|
|
221
|
+
build(slug: $slug) {
|
|
222
|
+
id
|
|
223
|
+
number
|
|
224
|
+
state
|
|
225
|
+
branch
|
|
226
|
+
message
|
|
227
|
+
commit
|
|
228
|
+
createdAt
|
|
229
|
+
startedAt
|
|
230
|
+
finishedAt
|
|
231
|
+
canceledAt
|
|
232
|
+
url
|
|
233
|
+
blockedState
|
|
234
|
+
createdBy {
|
|
235
|
+
... on User {
|
|
236
|
+
id
|
|
237
|
+
name
|
|
238
|
+
email
|
|
239
|
+
avatar {
|
|
240
|
+
url
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
... on UnregisteredUser {
|
|
244
|
+
name
|
|
245
|
+
email
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
pipeline {
|
|
249
|
+
id
|
|
250
|
+
name
|
|
251
|
+
slug
|
|
252
|
+
repository {
|
|
253
|
+
url
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
organization {
|
|
257
|
+
id
|
|
258
|
+
name
|
|
259
|
+
slug
|
|
260
|
+
}
|
|
261
|
+
pullRequest {
|
|
262
|
+
id
|
|
263
|
+
}
|
|
264
|
+
jobs(first: 100) {
|
|
265
|
+
edges {
|
|
266
|
+
node {
|
|
267
|
+
... on JobTypeCommand {
|
|
268
|
+
id
|
|
269
|
+
uuid
|
|
270
|
+
label
|
|
271
|
+
command
|
|
272
|
+
state
|
|
273
|
+
exitStatus
|
|
274
|
+
startedAt
|
|
275
|
+
finishedAt
|
|
276
|
+
passed
|
|
277
|
+
retried
|
|
278
|
+
parallelGroupIndex
|
|
279
|
+
parallelGroupTotal
|
|
280
|
+
retrySource {
|
|
281
|
+
... on JobTypeCommand {
|
|
282
|
+
id
|
|
283
|
+
uuid
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
agent {
|
|
287
|
+
... on Agent {
|
|
288
|
+
id
|
|
289
|
+
name
|
|
290
|
+
hostname
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
... on JobTypeWait {
|
|
295
|
+
id
|
|
296
|
+
label
|
|
297
|
+
}
|
|
298
|
+
... on JobTypeTrigger {
|
|
299
|
+
id
|
|
300
|
+
label
|
|
301
|
+
state
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
annotations(first: 100) {
|
|
307
|
+
edges {
|
|
308
|
+
node {
|
|
309
|
+
id
|
|
310
|
+
style
|
|
311
|
+
context
|
|
312
|
+
body {
|
|
313
|
+
html
|
|
314
|
+
}
|
|
315
|
+
createdAt
|
|
316
|
+
updatedAt
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
`;
|
|
138
323
|
//# sourceMappingURL=queries.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queries.js","sourceRoot":"/","sources":["graphql/queries.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAEtC,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAA;;;;;;;;;;;;CAY5B,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;CAcnC,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;CAwB/B,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+B5B,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BnC,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;CAgBvC,CAAC","sourcesContent":["/**\n * Common GraphQL queries for the Buildkite API\n */\nimport { gql } from 'graphql-request';\n\nexport const GET_VIEWER = gql`\n query GetViewer {\n viewer {\n id\n user {\n id\n uuid\n name\n email\n }\n }\n }\n`;\n\nexport const GET_ORGANIZATIONS = gql`\n query GetOrganizations {\n viewer {\n organizations {\n edges {\n node {\n id\n name\n slug\n }\n }\n }\n }\n }\n`;\n\nexport const GET_PIPELINES = gql`\n query GetPipelines($organizationSlug: ID!, $first: Int, $after: String) {\n organization(slug: $organizationSlug) {\n pipelines(first: $first, after: $after, archived: false) {\n edges {\n node {\n uuid\n id\n name\n slug\n description\n url\n repository {\n url\n }\n }\n }\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n }\n }\n`;\n\nexport const GET_BUILDS = gql`\n query GetBuilds($pipelineSlug: String!, $organizationSlug: ID!, $first: Int) {\n organization(slug: $organizationSlug) {\n pipelines(first: 1, search: $pipelineSlug) {\n edges {\n node {\n builds(first: $first) {\n edges {\n node {\n id\n number\n url\n state\n message\n commit\n branch\n createdAt\n startedAt\n finishedAt\n }\n }\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n }\n }\n }\n }\n }\n`;\n\nexport const GET_VIEWER_BUILDS = gql`\n query GetViewerBuilds($first: Int!) {\n viewer {\n builds(first: $first) {\n edges {\n node {\n id\n number\n state\n url\n createdAt\n branch\n message\n pipeline {\n name\n slug\n }\n organization {\n name\n slug\n }\n }\n }\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n }\n }\n`;\n\nexport const GET_BUILD_ANNOTATIONS = gql`\n query GetBuildAnnotations($buildSlug: ID!) {\n build(slug: $buildSlug) {\n annotations(first: 100) {\n edges {\n node {\n context\n style\n body {\n html\n }\n }\n }\n }\n }\n }\n`; "]}
|
|
1
|
+
{"version":3,"file":"queries.js","sourceRoot":"/","sources":["graphql/queries.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAEtC,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAA;;;;;;;;;;;;CAY5B,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;CAcnC,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;CAwB/B,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+B5B,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BnC,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;CAgBvC,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgFnC,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuGhC,CAAC","sourcesContent":["/**\n * Common GraphQL queries for the Buildkite API\n */\nimport { gql } from 'graphql-request';\n\nexport const GET_VIEWER = gql`\n query GetViewer {\n viewer {\n id\n user {\n id\n uuid\n name\n email\n }\n }\n }\n`;\n\nexport const GET_ORGANIZATIONS = gql`\n query GetOrganizations {\n viewer {\n organizations {\n edges {\n node {\n id\n name\n slug\n }\n }\n }\n }\n }\n`;\n\nexport const GET_PIPELINES = gql`\n query GetPipelines($organizationSlug: ID!, $first: Int, $after: String) {\n organization(slug: $organizationSlug) {\n pipelines(first: $first, after: $after, archived: false) {\n edges {\n node {\n uuid\n id\n name\n slug\n description\n url\n repository {\n url\n }\n }\n }\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n }\n }\n`;\n\nexport const GET_BUILDS = gql`\n query GetBuilds($pipelineSlug: String!, $organizationSlug: ID!, $first: Int) {\n organization(slug: $organizationSlug) {\n pipelines(first: 1, search: $pipelineSlug) {\n edges {\n node {\n builds(first: $first) {\n edges {\n node {\n id\n number\n url\n state\n message\n commit\n branch\n createdAt\n startedAt\n finishedAt\n }\n }\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n }\n }\n }\n }\n }\n`;\n\nexport const GET_VIEWER_BUILDS = gql`\n query GetViewerBuilds($first: Int!) {\n viewer {\n builds(first: $first) {\n edges {\n node {\n id\n number\n state\n url\n createdAt\n branch\n message\n pipeline {\n name\n slug\n }\n organization {\n name\n slug\n }\n }\n }\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n }\n }\n`;\n\nexport const GET_BUILD_ANNOTATIONS = gql`\n query GetBuildAnnotations($buildSlug: ID!) {\n build(slug: $buildSlug) {\n annotations(first: 100) {\n edges {\n node {\n context\n style\n body {\n html\n }\n }\n }\n }\n }\n }\n`;\n\nexport const GET_BUILD_SUMMARY = gql`\n query GetBuildSummary($slug: ID!) {\n build(slug: $slug) {\n id\n number\n state\n branch\n message\n commit\n createdAt\n startedAt\n finishedAt\n canceledAt\n url\n blockedState\n createdBy {\n ... on User {\n id\n name\n email\n avatar {\n url\n }\n }\n ... on UnregisteredUser {\n name\n email\n }\n }\n pipeline {\n id\n name\n slug\n }\n organization {\n id\n name\n slug\n }\n jobs(first: 100) {\n edges {\n node {\n ... on JobTypeCommand {\n id\n uuid\n label\n state\n exitStatus\n startedAt\n finishedAt\n passed\n parallelGroupIndex\n parallelGroupTotal\n }\n ... on JobTypeWait {\n id\n label\n }\n ... on JobTypeTrigger {\n id\n label\n state\n }\n }\n }\n }\n annotations(first: 50) {\n edges {\n node {\n id\n style\n context\n body {\n html\n }\n }\n }\n }\n }\n }\n`;\n\nexport const GET_BUILD_FULL = gql`\n query GetBuildFull($slug: ID!) {\n build(slug: $slug) {\n id\n number\n state\n branch\n message\n commit\n createdAt\n startedAt\n finishedAt\n canceledAt\n url\n blockedState\n createdBy {\n ... on User {\n id\n name\n email\n avatar {\n url\n }\n }\n ... on UnregisteredUser {\n name\n email\n }\n }\n pipeline {\n id\n name\n slug\n repository {\n url\n }\n }\n organization {\n id\n name\n slug\n }\n pullRequest {\n id\n }\n jobs(first: 100) {\n edges {\n node {\n ... on JobTypeCommand {\n id\n uuid\n label\n command\n state\n exitStatus\n startedAt\n finishedAt\n passed\n retried\n parallelGroupIndex\n parallelGroupTotal\n retrySource {\n ... on JobTypeCommand {\n id\n uuid\n }\n }\n agent {\n ... on Agent {\n id\n name\n hostname\n }\n }\n }\n ... on JobTypeWait {\n id\n label\n }\n ... on JobTypeTrigger {\n id\n label\n state\n }\n }\n }\n }\n annotations(first: 100) {\n edges {\n node {\n id\n style\n context\n body {\n html\n }\n createdAt\n updatedAt\n }\n }\n }\n }\n }\n`; "]}
|