export class ExecutionGatewayBase {
    executor;
    constructor(executor) {
        this.executor = executor;
    }
    async execute(actions, context) {
        const result = {
            total: actions.length,
            succeeded: 0,
            failed: 0,
            skipped: 0,
        };
        for (const action of actions) {
            const command = this.buildCommand(action, context);
            if (command === null) {
                result.skipped++;
                continue;
            }
            try {
                this.executor(command.command, command.args, context.localPath);
                result.succeeded++;
            }
            catch {
                result.failed++;
            }
        }
        return result;
    }
}
//# sourceMappingURL=executionGateway.base.js.map