midline-agent 0.1.7 → 0.1.8

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/dist/agent.js CHANGED
@@ -9,8 +9,11 @@ class MidlineAgent {
9
9
  static init(config) {
10
10
  this.config = {
11
11
  endpoint: "https://api.usemidline.com/api/api-monitor/events",
12
- maskFields: ["password", "token", ...(config.maskFields || [])],
13
12
  ...config,
13
+ // Deliberately after the spread. `password` and `token` are always
14
+ // masked; a caller-supplied list extends that set rather than replacing
15
+ // it, which is what happened while this sat above `...config`.
16
+ maskFields: [...new Set(["password", "token", ...(config.maskFields || [])])],
14
17
  };
15
18
  this.startQueue();
16
19
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "midline-agent",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "description": "Express.js SDK for Midline — request & error monitoring with security detection",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/agent.ts CHANGED
@@ -9,8 +9,11 @@ export class MidlineAgent {
9
9
  static init(config: MidlineConfig) {
10
10
  this.config = {
11
11
  endpoint: "https://api.usemidline.com/api/api-monitor/events",
12
- maskFields: ["password", "token", ...(config.maskFields || [])],
13
12
  ...config,
13
+ // Deliberately after the spread. `password` and `token` are always
14
+ // masked; a caller-supplied list extends that set rather than replacing
15
+ // it, which is what happened while this sat above `...config`.
16
+ maskFields: [...new Set(["password", "token", ...(config.maskFields || [])])],
14
17
  };
15
18
 
16
19
  this.startQueue();