mume-with-litvis
Version:
Fork of mume with added http://litvis.org/
21 lines • 690 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const stream_1 = require("stream");
const fetch = require("node-fetch");
class PlantUMLServerTask {
constructor(serverURL) {
this.serverURL = serverURL;
}
generateSVG(content) {
const contentStream = new stream_1.Readable();
contentStream.setEncoding("utf-8");
contentStream.push(content);
contentStream.push(null); // Mark end of stream
return fetch(this.serverURL, {
method: "POST",
body: contentStream,
}).then((res) => res.text());
}
}
exports.default = PlantUMLServerTask;
//# sourceMappingURL=puml-server.js.map