citty-test-utils
Version:
Unified testing framework for CLI applications with auto-detecting local/cleanroom execution, vitest config integration, and simplified scenario DSL.
32 lines (26 loc) • 703 B
JavaScript
// src/commands/info/config.js - Info config verb command
import { defineCommand } from 'citty'
export const configCommand = defineCommand({
meta: {
name: 'config',
description: 'Show config information',
},
run: async (ctx) => {
const { json, verbose } = ctx.args
if (verbose) {
console.error('Showing config information')
}
const result = {
command: 'config',
status: 'pending',
message: 'config information will be implemented',
timestamp: new Date().toISOString(),
}
if (json) {
console.log(JSON.stringify(result))
} else {
console.log(`config information: ${result.status}`)
}
},
})