@mcp-abap-adt/connection 1.5.0 → 1.5.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.
@@ -1 +1 @@
1
- {"version":3,"file":"RfcAbapConnection.d.ts","sourceRoot":"","sources":["../../src/connection/RfcAbapConnection.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,mBAAmB,EACnB,YAAY,EACb,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AA0F1D;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,iBAAkB,YAAW,cAAc;IAOpD,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,MAAM;IAPzB,OAAO,CAAC,SAAS,CAA2B;IAC5C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;IACnC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAsB;gBAG7B,MAAM,EAAE,SAAS,EACjB,MAAM,GAAE,OAAO,GAAG,IAAW;IAa1C,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IA8BxB,UAAU,IAAI,OAAO,CAAC,MAAM,CAAC;IAInC,YAAY,IAAI,MAAM,GAAG,IAAI;IAI7B,cAAc,CAAC,KAAK,EAAE,UAAU,GAAG,WAAW,GAAG,IAAI;IAI/C,cAAc,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,GAAG,GAAG,EACnC,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IA6I9B;;;OAGG;IACH,KAAK,IAAI,IAAI;IAIb;;OAEG;IACG,KAAK,IAAI,OA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AqB9B"}
@@ -131,7 +131,16 @@ class RfcAbapConnection {
131
131
  throw new Error('RFC connection is not open. Call connect() first.');
132
132
  }
133
133
  const method = options.method.toUpperCase();
134
- const uri = options.url;
134
+ // Encode query params into URI (axios does this automatically for HTTP,
135
+ // but RFC needs it done manually)
136
+ let uri = options.url;
137
+ if (options.params && typeof options.params === 'object') {
138
+ const entries = Object.entries(options.params).filter(([, v]) => v !== undefined && v !== null);
139
+ if (entries.length > 0) {
140
+ const qs = new URLSearchParams(entries.map(([k, v]) => [k, String(v)]));
141
+ uri += (uri.includes('?') ? '&' : '?') + qs.toString();
142
+ }
143
+ }
135
144
  // Note: sap-client is NOT added to URI for RFC connections.
136
145
  // The RFC session is already logged into the correct client
137
146
  // (via the 'client' param in RFC connection). Adding sap-client
@@ -155,6 +164,9 @@ class RfcAbapConnection {
155
164
  });
156
165
  }
157
166
  this.logger?.debug(`RFC → ${method} ${uri}`);
167
+ this.logger?.debug(`RFC → headers: ${JSON.stringify(headerFields)}`);
168
+ if (body)
169
+ this.logger?.debug(`RFC → body: ${body}`);
158
170
  try {
159
171
  const result = await this.rfcClient.call('SADT_REST_RFC_ENDPOINT', {
160
172
  REQUEST: {
@@ -207,6 +219,9 @@ class RfcAbapConnection {
207
219
  statusText = statusText || 'OK';
208
220
  }
209
221
  this.logger?.debug(`RFC ← ${statusCode} ${statusText} (${respBody.length} bytes)`);
222
+ this.logger?.debug(`RFC ← headers: ${JSON.stringify(respHeaders)}`);
223
+ if (respBody)
224
+ this.logger?.debug(`RFC ← body: ${respBody}`);
210
225
  const response = {
211
226
  data: respBody,
212
227
  status: statusCode,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mcp-abap-adt/connection",
3
- "version": "1.5.0",
3
+ "version": "1.5.2",
4
4
  "description": "ABAP connection layer for MCP ABAP ADT server",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",