trm-core 8.4.0 → 8.4.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.
package/changelog.txt CHANGED
@@ -8,6 +8,10 @@ Legend
8
8
  + : added
9
9
  - : removed
10
10
 
11
+ 2026-03-03 v8.4.1
12
+ -------------------
13
+ * rfc debug logger hide buffers
14
+
11
15
  2026-03-03 v8.4.0
12
16
  -------------------
13
17
  * print message on install
@@ -13,6 +13,7 @@ export declare class RFCClient implements IClient {
13
13
  open(): Promise<void>;
14
14
  close(): Promise<void>;
15
15
  checkConnection(): Promise<boolean>;
16
+ private sanitizeDebugResponse;
16
17
  private _call;
17
18
  private _getMessage;
18
19
  getMessage(data: SapMessage): Promise<string>;
@@ -119,6 +119,23 @@ class RFCClient {
119
119
  return (yield this.getRfcClient()).alive;
120
120
  });
121
121
  }
122
+ sanitizeDebugResponse(obj) {
123
+ if (Buffer.isBuffer(obj)) {
124
+ try {
125
+ return `<file of ${obj.byteLength} bytes>`;
126
+ }
127
+ catch (_a) {
128
+ return "<file of unknown bytes>";
129
+ }
130
+ }
131
+ if (Array.isArray(obj)) {
132
+ return obj.map(v => this.sanitizeDebugResponse(v));
133
+ }
134
+ if (obj && typeof obj === "object") {
135
+ return Object.fromEntries(Object.entries(obj).map(([k, v]) => [k, this.sanitizeDebugResponse(v)]));
136
+ }
137
+ return obj;
138
+ }
122
139
  _call(fm_1, arg_1, timeout_1, noErrorParsing_1) {
123
140
  return __awaiter(this, arguments, void 0, function* (fm, arg, timeout, noErrorParsing, retryCount = 0) {
124
141
  var argNormalized;
@@ -147,7 +164,7 @@ class RFCClient {
147
164
  trm_commons_1.Logger.loading(`Executing RFC, FM ${fm}, args ${JSON.stringify(argNormalized)}, opts ${JSON.stringify(callOptions)}`, true);
148
165
  const response = yield (yield this.getRfcClient()).call(fm, argNormalized, callOptions);
149
166
  const responseNormalized = (0, commons_1.normalize)(response);
150
- trm_commons_1.Logger.success(`RFC resonse: ${JSON.stringify(responseNormalized)}`, true);
167
+ trm_commons_1.Logger.success(`RFC resonse: ${JSON.stringify(this.sanitizeDebugResponse(responseNormalized))}`, true);
151
168
  return responseNormalized;
152
169
  }
153
170
  catch (e) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trm-core",
3
- "version": "8.4.0",
3
+ "version": "8.4.1",
4
4
  "description": "TRM (Transport Request Manager) Core",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",