function executeOne$$1(configOrCommand) {
    return __awaiter(this, void 0, void 0, function* () {
        const config = asExecuteConfig$$1(configOrCommand);
        let result = {
            stderr: [],
            stdout: [],
            outputFiles: [],
            exitCode: 1,
        };
        try {
            config.inputFiles = config.inputFiles || [];
            const command = asCommand(config.commands)[0];
            const t0 = performance.now();
            executeListeners.forEach(listener => listener.beforeExecute({ command, took: performance.now() - t0, id: t0 }));
            result = yield call(config.inputFiles, command.map(c => c + ''));
            executeListeners.forEach(listener => listener.afterExecute({ command, took: performance.now() - t0, id: t0 }));
            if (result.exitCode) {
                return Object.assign({}, result, { errors: ['exit code: ' + result.exitCode + ' stderr: ' + result.stderr.join('\n')] });
            }
            return Object.assign({}, result, { errors: [undefined] });
        }
        catch (error) {
            return Object.assign({}, result, { errors: [error + ', exit code: ' + result.exitCode + ', stderr: ' + result.stderr.join('\n')] });
        }
    });
}
Execute first command in given config.