renovate
Version:
Automated dependency updates. Flexible so you don't need to be.
22 lines (21 loc) • 589 B
JavaScript
import { regEx } from "../util/regex.js";
import prepareError from "./utils.js";
import { isString } from "@sindresorhus/is";
//#region lib/logger/err-serializer.ts
Error.stackTraceLimit = 20;
function errSerializer(err) {
const response = prepareError(err);
for (const field of [
"message",
"stack",
"stdout",
"stderr"
]) {
const val = response[field];
if (isString(val)) response[field] = val.replace(regEx(/https:\/\/[^@]*?@/g), "https://**redacted**@");
}
return response;
}
//#endregion
export { errSerializer as default };
//# sourceMappingURL=err-serializer.js.map