UNPKG

581 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.redactResponseBodyForLogging = void 0;
4function redactResponseBodyForLogging(body) {
5 if (typeof body !== "object") {
6 return body;
7 }
8 if ("kind" in body && body.kind === "Secret") {
9 const out = structuredClone(body);
10 for (const key of Object.keys(out.data)) {
11 out.data[key] = "[REDACTED]";
12 }
13 return out;
14 }
15 return body;
16}
17exports.redactResponseBodyForLogging = redactResponseBodyForLogging;
18//# sourceMappingURL=security.js.map
\No newline at end of file