bktide
Version:
Command-line interface for Buildkite CI/CD workflows with rich shell completions (Fish, Bash, Zsh) and Alfred workflow integration for macOS power users
28 lines • 1.01 kB
JavaScript
export * from './Formatter.js';
export * from './PlainTextFormatter.js';
export * from './JsonFormatter.js';
export * from './AlfredFormatter.js';
import { PlainTextFormatter } from './PlainTextFormatter.js';
import { JsonFormatter } from './JsonFormatter.js';
import { AlfredFormatter } from './AlfredFormatter.js';
import { logger } from '../../services/logger.js';
/**
* Factory function to create the appropriate formatter for pipelines
* @param format The format to use
* @returns A PipelineFormatter instance
*/
export function getPipelineFormatter(format = 'plain') {
switch (format.toLowerCase()) {
case 'plain':
case 'text':
return new PlainTextFormatter();
case 'json':
return new JsonFormatter();
case 'alfred':
return new AlfredFormatter();
default:
logger.warn(`Unknown format '${format}', defaulting to plain text`);
return new PlainTextFormatter();
}
}
//# sourceMappingURL=index.js.map