UNPKG

@autorest/openapi-to-cadl

Version:

Autorest plugin to scaffold a Typespec definition from an OpenAPI document

23 lines 659 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.formatCadlFile = exports.formatFile = void 0; const prettier_1 = require("prettier"); function formatFile(content, filepath) { return (0, prettier_1.format)(content, { filepath, }); } exports.formatFile = formatFile; async function formatCadlFile(content, filepath) { try { return await (0, prettier_1.format)(content, { plugins: ["@typespec/prettier-plugin-typespec"], filepath, }); } catch (_a) { return content; } } exports.formatCadlFile = formatCadlFile; //# sourceMappingURL=format.js.map