UNPKG

@dot-event/kubes

Version:

dot-event kubernetes operation

31 lines (26 loc) 606 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.writeYaml = writeYaml; var _path = require("path"); async function writeYaml(path) { const { cwd, events, props, yaml } = this; const body = yaml[path]; if (body.kind === "Secret") { for (const key in body.data) { body.data[key] = Buffer.from(body.data[key]).toString("base64"); } } await events.fsWriteYaml(props, { ensure: true, path: (0, _path.join)(cwd, "build", path.replace(/[^/]+\//i, "")), yaml: yaml[path] }); } //# sourceMappingURL=writeYaml.js.map