UNPKG

legal-markdown-js

Version:

Node.js implementation of LegalMarkdown for processing legal documents with markdown and YAML - Complete feature parity with Ruby version

39 lines • 1.47 kB
/** * @fileoverview Processing options prompts for Interactive CLI */ import { checkbox } from '@inquirer/prompts'; /** * Prompt user for processing options based on selected output formats */ export async function promptProcessingOptions(outputFormats) { console.log('\nāš™ļø Processing Options:\n'); // Build choices based on selected output formats const choices = [{ name: 'šŸ› Debug mode', value: 'debug', checked: false }]; // Add field tracking only if Markdown is selected if (outputFormats.markdown) { choices.push({ name: 'šŸ“ Field tracking in Markdown output', value: 'fieldTracking', checked: false, }); } // Add highlight only if HTML, PDF, or DOCX is selected - pre-selected by default if (outputFormats.html || outputFormats.pdf || outputFormats.docx) { choices.push({ name: 'šŸŽÆ Field highlighting in HTML/PDF/DOCX output', value: 'highlight', checked: true, }); } // If only debug is available, still show the checkbox for consistency const selectedOptions = await checkbox({ message: 'Select processing options:', choices, }); return { debug: selectedOptions.includes('debug'), fieldTracking: selectedOptions.includes('fieldTracking'), highlight: selectedOptions.includes('highlight'), }; } //# sourceMappingURL=processing-options.js.map