@backstage/backend-app-api 0.7.1 → 0.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @backstage/backend-app-api
2
2
 
3
+ ## 0.7.2
4
+
5
+ ### Patch Changes
6
+
7
+ - b6b59c5: Redact `meta` fields too with the logger
8
+
3
9
  ## 0.7.1
4
10
 
5
11
  ### Patch Changes
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/backend-app-api",
3
- "version": "0.7.1",
3
+ "version": "0.7.2",
4
4
  "main": "../dist/alpha.cjs.js",
5
5
  "types": "../dist/alpha.d.ts"
6
6
  }
package/dist/index.cjs.js CHANGED
@@ -857,16 +857,21 @@ const _WinstonLogger = class _WinstonLogger {
857
857
  static redacter() {
858
858
  const redactionSet = /* @__PURE__ */ new Set();
859
859
  let redactionPattern = void 0;
860
- return {
861
- format: winston.format((info) => {
862
- if (redactionPattern && typeof info.message === "string") {
863
- info.message = info.message.replace(redactionPattern, "[REDACTED]");
864
- }
865
- if (redactionPattern && typeof info.stack === "string") {
866
- info.stack = info.stack.replace(redactionPattern, "[REDACTED]");
860
+ const replace = (obj) => {
861
+ var _a;
862
+ for (const key in obj) {
863
+ if (obj.hasOwnProperty(key)) {
864
+ if (typeof obj[key] === "object") {
865
+ obj[key] = replace(obj[key]);
866
+ } else if (typeof obj[key] === "string") {
867
+ obj[key] = (_a = obj[key]) == null ? void 0 : _a.replace(redactionPattern, "[REDACTED]");
868
+ }
867
869
  }
868
- return info;
869
- })(),
870
+ }
871
+ return obj;
872
+ };
873
+ return {
874
+ format: winston.format(replace)(),
870
875
  add(newRedactions) {
871
876
  let added = 0;
872
877
  for (const redactionToTrim of newRedactions) {