Skip to main content
Glama
gilberth

MCP Cloudflare DNS Server

output-error-handler.js980 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.OutputErrorHandler = void 0; const observables_1 = require("../observables"); /** * Kills processes and aborts further command spawning on output stream error (namely, SIGPIPE). */ class OutputErrorHandler { outputStream; abortController; constructor({ abortController, outputStream, }) { this.abortController = abortController; this.outputStream = outputStream; } handle(commands) { const subscription = (0, observables_1.fromSharedEvent)(this.outputStream, 'error').subscribe(() => { commands.forEach((command) => command.kill()); // Avoid further commands from spawning, e.g. if `RestartProcess` is used. this.abortController.abort(); }); return { commands, onFinish: () => subscription.unsubscribe(), }; } } exports.OutputErrorHandler = OutputErrorHandler;

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/gilberth/mcp-cloudflare'

If you have feedback or need assistance with the MCP directory API, please join our Discord server