@softwareventures/maintain-project
Version:
Automatically create and maintain TypeScript projects with standard settings for Software Ventures Limited
16 lines • 566 B
JavaScript
import { JSDOM } from "jsdom";
import { failure, mapResultFn } from "../result/result.js";
import { readProjectText } from "./read-text.js";
export async function readProjectXml(project, path) {
return readProjectText(project, path)
.then(mapResultFn(text => new JSDOM(text, { contentType: "application/xml" })))
.catch(reason => {
if (reason instanceof DOMException) {
return failure([{ type: "invalid-xml", path }]);
}
else {
throw reason;
}
});
}
//# sourceMappingURL=read-xml.js.map