1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.redactResponseBodyForLogging = void 0;
|
4 | function 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 | }
|
17 | exports.redactResponseBodyForLogging = redactResponseBodyForLogging;
|
18 |
|
\ | No newline at end of file |