Angular Modernizer
    Preparing search index...

    Executes multi-step migration workflows with dependency management, retries, checkpoints and resume.

    Each step calls a tool through the ToolExecutor. Steps run in dependency order according to the WorkflowExecutionStrategy. A failed step is retried per WorkflowStep.retry; a failed required step ends the workflow, a failed optional step is recorded as skipped. Checkpoints are created after steps with checkpoint: true and, with config.autoCheckpoint, after every fifth completed step.

    execute does not throw for step failures: they are reported in the WorkflowExecutionResult.

    import { WorkflowEngine, type ToolExecutor } from '@angular-modernizer/orchestration';

    const executor: ToolExecutor = {
    executeTool: async (toolName, args) => {
    // Dispatch to the tool implementation
    return { toolName, args };
    },
    };
    const engine = new WorkflowEngine(executor);

    const result = await engine.execute({
    id: 'inject-migration',
    name: 'Inject migration',
    description: 'Transform one service, then build',
    steps: [
    {
    id: 'transform',
    name: 'Transform',
    description: 'Constructor injection to inject()',
    tool: 'transform-code',
    args: {
    filePath: 'src/app/user.service.ts',
    transformation: 'constructor-to-inject',
    },
    dependencies: [],
    },
    {
    id: 'build',
    name: 'Build',
    description: 'Check the build',
    tool: 'run-build',
    args: { rootPath: '/path/to/project' },
    dependencies: ['transform'],
    },
    ],
    });
    console.log(result.status, result.metrics);
    Index

    Constructors

    Methods

    Constructors

    Methods