/** * CLI command for transforming production jobs into test configurations. * * The job:to-test command takes a production job definition and transforms it * for testing purposes. This is a pure transformation - no API calls are made. * * Key features: * - Replace sources with dataset queries or add record limits * - Replace sinks with synchronous test sinks or test dataset sinks * - Add test tagging to track test data * - Show diff of transformations * - Output to file or stdout * * Example usage: * grepr job:to-test prod.json --execution SYNCHRONOUS --output test.json * grepr job:to-test prod.json --dataset-id my_dataset --start 2025-01-01T00:00:00Z \ * --end 2025-01-01T01:00:00Z --show-diff */ import { Command } from 'commander'; import { ICommand } from '../lib/command-registry.js'; import { MergeConfiguration } from '../types.js'; /** * Command implementation for job:to-test. * * This command registers itself with the CLI and handles: * - Option parsing and validation * - Job file loading * - Transformation execution * - Output formatting and writing */ export declare class JobToTestCommand implements ICommand { /** * Registers the job:to-test command with the CLI program. * * @param program - The commander program to add the command to * @param _mergeConfiguration - Configuration merger (unused by this command) */ addToProgram(program: Command, _mergeConfiguration: MergeConfiguration): void; /** * Validates command options for consistency and completeness. * * Validation rules: * - Cannot use both --sample-data-file and --dataset-id (mutually exclusive) * - --dataset-id requires --start and --end * - --execution must be SYNCHRONOUS or ASYNCHRONOUS * - --processing must be BATCH or STREAMING * * @param options - The command options to validate * @throws Error if validation fails */ private validateOptions; /** * Loads and validates a job definition from a JSON file. * * The file must exist and contain valid JSON with required fields: * - name: Job name * - execution: Execution type * - processing: Processing type * * @param jobFile - Path to the job definition file * @returns The loaded job definition * @throws Error if file not found, invalid JSON, or missing required fields */ private loadJobFromFile; /** * Formats the transformed job as JSON string. * * @param transformedJob - The job to format * @param pretty - Whether to pretty-print (2-space indentation) or compact * @returns JSON string representation of the job */ private formatOutput; } //# sourceMappingURL=job-to-test-command.d.ts.map