targetprocess-mcp-server 2.7.0 → 2.7.1

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.
Files changed (2) hide show
  1. package/build/tp.js +4 -3
  2. package/package.json +1 -1
package/build/tp.js CHANGED
@@ -25,9 +25,10 @@ export class TpClient {
25
25
  return _url + "/?" + _urlParams.join("&");
26
26
  }
27
27
  // Strips the access_token value out of a URL before it's logged, so the
28
- // live TP credential never ends up in stderr/log files.
28
+ // live TP credential never ends up in stderr/log files. Matches on the
29
+ // parameter name, not the token value: params() percent-encodes the token.
29
30
  redact(url) {
30
- return url.replace(this.token, "***");
31
+ return url.replace(/([?&]access_token=)[^&]*/gi, "$1***");
31
32
  }
32
33
  // @ts-ignore
33
34
  async getAll(params) {
@@ -50,7 +51,7 @@ export class TpClient {
50
51
  async get(params) {
51
52
  params.param["access_token"] = this.token;
52
53
  let _url = this.params(params);
53
- console.error(JSON.stringify({ "TP_GET_URL": _url }));
54
+ console.error(JSON.stringify({ "TP_GET_URL": this.redact(_url) }));
54
55
  try {
55
56
  const response = await fetch(_url, {
56
57
  method: "GET",
package/package.json CHANGED
@@ -27,7 +27,7 @@
27
27
  "engines": {
28
28
  "node": ">=20.x"
29
29
  },
30
- "version": "2.7.0",
30
+ "version": "2.7.1",
31
31
  "description": "MCP server for Tartget Process",
32
32
  "main": "build/index.js",
33
33
  "keywords": [