Angular Modernizer
    Preparing search index...

    Interface ScanOrchestrationOptions

    Extended orchestration options for tools that scan a project in parallel.

    interface ScanOrchestrationOptions {
        autoSelectMode?: boolean;
        baseBranch?: string;
        batchSize?: number;
        enableMonitoring?: boolean;
        enableProgress?: boolean;
        excludePatterns?: string[];
        fallbackToWorkers?: boolean;
        incremental?: boolean;
        maxWorkers?: number;
        minFilesForWorkers?: number;
        onProgress?: (progress: ProgressEvent) => void;
        parallel?: boolean;
        pluginIds?: string[];
        resourceLimits?: { maxMemory?: number; maxWorkers?: number };
        signal?: AbortSignal;
        thresholds?: ModeThresholds;
        timeout?: number;
        tsConfigPath?: string;
        useWorkerThreads?: boolean;
        workerScriptPath?: string;
    }

    Hierarchy (View Summary)

    Index

    Properties

    autoSelectMode?: boolean

    Enable automatic mode selection based on project complexity, default: true. When enabled, the executor analyzes project metrics (file count, LOC, memory pressure) and automatically chooses between Promise-based and worker thread parallelism.

    Set to false to disable auto-selection and use Promise-based mode by default. If useWorkerThreads is explicitly set (true or false), this option is ignored.

    baseBranch?: string

    Git commit or branch to compare against in incremental mode.

    batchSize?: number

    Maximum files per worker batch (default: 10)

    enableMonitoring?: boolean

    Enable real-time memory monitoring in Promise mode, default: true. Monitors heap usage and projects peak memory to abort if critical threshold exceeded.

    enableProgress?: boolean

    Report progress while scanning.

    excludePatterns?: string[]

    Patterns of files to exclude.

    fallbackToWorkers?: boolean

    Allow automatic fallback to workers if Promise mode aborts, default: true. Only used when autoSelectMode is true and monitoring detects memory pressure.

    incremental?: boolean

    Analyze only changed files and their dependents.

    maxWorkers?: number

    Maximum concurrent workers (default: CPU cores - 1)

    minFilesForWorkers?: number

    Minimum number of files required to use worker threads (default: 200). Worker thread initialization has significant overhead (loading ts-morph project, plugins, etc.). For small file sets, Promise-based parallelism is faster. Set to 0 to always use workers when useWorkerThreads is true.

    onProgress?: (progress: ProgressEvent) => void

    Enable progress callbacks

    parallel?: boolean

    Run files in parallel.

    pluginIds?: string[]

    Plugin IDs to load in workers

    resourceLimits?: { maxMemory?: number; maxWorkers?: number }

    Resource limits for the scan.

    Type Declaration

    • OptionalmaxMemory?: number

      Maximum heap memory in bytes.

    • OptionalmaxWorkers?: number

      Maximum number of concurrent workers.

    signal?: AbortSignal

    Enable cancellation

    thresholds?: ModeThresholds

    Custom thresholds for automatic mode selection. Only used when autoSelectMode is true.

    timeout?: number

    Task timeout in milliseconds (default: 30000)

    tsConfigPath?: string

    TypeScript config path (required for worker threads)

    useWorkerThreads?: boolean

    Use worker threads for true parallelism

    workerScriptPath?: string

    Path to worker script (required for worker threads). Use getWorkerScriptPath() from @angular-modernizer/worker package.