@app.json/cloudformation
Version:
Plugin for @app.json/cli that parses CloudFormation templates and extract config information
15 lines (14 loc) • 570 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var cloudformation_js_yaml_schema_1 = require("cloudformation-js-yaml-schema");
var fs_1 = require("fs");
var js_yaml_1 = require("js-yaml");
// todo: share this with nx-sam
function loadCloudFormationTemplate(templatePath) {
var yaml = fs_1.readFileSync(templatePath, { encoding: 'utf-8' });
var cf = js_yaml_1.load(yaml, {
schema: cloudformation_js_yaml_schema_1.CLOUDFORMATION_SCHEMA
});
return cf;
}
exports.loadCloudFormationTemplate = loadCloudFormationTemplate;