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 +4 -1
- package/package.json +1 -1
- package/src/agent.ts +4 -1
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
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();
|