@mcp-abap-adt/adt-clients 5.4.2 → 5.4.3

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":"AdtAccessControl.d.ts","sourceRoot":"","sources":["../../../src/core/accessControl/AdtAccessControl.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAEV,eAAe,EACf,UAAU,EACV,oBAAoB,EACpB,OAAO,EACR,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAEjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAWpD,OAAO,KAAK,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAKzE,qBAAa,gBACX,YAAW,UAAU,CAAC,oBAAoB,EAAE,mBAAmB,CAAC;IAEhE,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAkB;IAC7C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAU;IAClC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAoB;IAClD,SAAgB,UAAU,EAAE,MAAM,CAAmB;gBAGnD,UAAU,EAAE,eAAe,EAC3B,MAAM,CAAC,EAAE,OAAO,EAChB,aAAa,CAAC,EAAE,iBAAiB;IAOnC;;OAEG;IACG,QAAQ,CACZ,MAAM,EAAE,OAAO,CAAC,oBAAoB,CAAC,GACpC,OAAO,CAAC,mBAAmB,CAAC;IA6B/B;;OAEG;IACG,MAAM,CACV,MAAM,EAAE,oBAAoB,EAC5B,OAAO,CAAC,EAAE,oBAAoB,GAC7B,OAAO,CAAC,mBAAmB,CAAC;IAoC/B;;OAEG;IACG,IAAI,CACR,MAAM,EAAE,OAAO,CAAC,oBAAoB,CAAC,EACrC,OAAO,CAAC,EAAE,QAAQ,GAAG,UAAU,EAC/B,OAAO,CAAC,EAAE,YAAY,GACrB,OAAO,CAAC,mBAAmB,GAAG,SAAS,CAAC;IA2B3C;;OAEG;IACG,YAAY,CAChB,MAAM,EAAE,OAAO,CAAC,oBAAoB,CAAC,EACrC,OAAO,CAAC,EAAE,YAAY,GACrB,OAAO,CAAC,mBAAmB,CAAC;IAkC/B;;OAEG;IACG,aAAa,CACjB,MAAM,EAAE,OAAO,CAAC,oBAAoB,CAAC,EACrC,OAAO,CAAC,EAAE;QAAE,eAAe,CAAC,EAAE,OAAO,CAAA;KAAE,GACtC,OAAO,CAAC,mBAAmB,CAAC;IAkC/B;;;;OAIG;IACG,MAAM,CACV,MAAM,EAAE,OAAO,CAAC,oBAAoB,CAAC,EACrC,OAAO,CAAC,EAAE,oBAAoB,GAC7B,OAAO,CAAC,mBAAmB,CAAC;IA8M/B;;OAEG;IACG,MAAM,CACV,MAAM,EAAE,OAAO,CAAC,oBAAoB,CAAC,GACpC,OAAO,CAAC,mBAAmB,CAAC;IAmC/B;;;OAGG;IACG,QAAQ,CACZ,MAAM,EAAE,OAAO,CAAC,oBAAoB,CAAC,GACpC,OAAO,CAAC,mBAAmB,CAAC;IAqB/B;;OAEG;IACG,KAAK,CACT,MAAM,EAAE,OAAO,CAAC,oBAAoB,CAAC,EACrC,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,mBAAmB,CAAC;IAkB/B;;OAEG;IACG,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC,oBAAoB,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC;IAclE;;OAEG;IACG,MAAM,CACV,MAAM,EAAE,OAAO,CAAC,oBAAoB,CAAC,EACrC,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,mBAAmB,CAAC;CAiBhC"}
1
+ {"version":3,"file":"AdtAccessControl.d.ts","sourceRoot":"","sources":["../../../src/core/accessControl/AdtAccessControl.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAEV,eAAe,EAC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AAe,CAAC,EAAE,OAAO,CAAA;KAAE,GACtC,OAAO,CAAC,mBAAmB,CAAC;IAkC/B;;;;OAIG;IACG,MAAM,CACV,MAAM,EAAE,OAAO,CAAC,oBAAoB,CAAC,EACrC,OAAO,CAAC,EAAE,oBAAoB,GAC7B,OAAO,CAAC,mBAAmB,CAAC;IAiN/B;;OAEG;IACG,MAAM,CACV,MAAM,EAAE,OAAO,CAAC,oBAAoB,CAAC,GACpC,OAAO,CAAC,mBAAmB,CAAC;IAmC/B;;;OAGG;IACG,QAAQ,CACZ,MAAM,EAAE,OAAO,CAAC,oBAAoB,CAAC,GACpC,OAAO,CAAC,mBAAmB,CAAC;IAqB/B;;OAEG;IACG,KAAK,CACT,MAAM,EAAE,OAAO,CAAC,oBAAoB,CAAC,EACrC,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,mBAAmB,CAAC;IAoB/B;;OAEG;IACG,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC,oBAAoB,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC;IAclE;;OAEG;IACG,MAAM,CACV,MAAM,EAAE,OAAO,CAAC,oBAAoB,CAAC,EACrC,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,mBAAmB,CAAC;CAiBhC"}
@@ -232,7 +232,7 @@ class AdtAccessControl {
232
232
  const codeToCheck = options?.sourceCode || config.sourceCode;
233
233
  if (codeToCheck) {
234
234
  this.logger?.info?.('Step 2: Checking inactive version with update content');
235
- await (0, check_1.checkAccessControl)(this.connection, config.accessControlName, 'inactive', codeToCheck);
235
+ await (0, check_1.checkAccessControl)(this.connection, config.accessControlName, 'inactive', codeToCheck, this.logger);
236
236
  this.logger?.info?.('Check inactive with update content passed');
237
237
  }
238
238
  // 3. Update
@@ -266,7 +266,7 @@ class AdtAccessControl {
266
266
  }
267
267
  // 5. Final check (no stateful needed)
268
268
  this.logger?.info?.('Step 5: Final check');
269
- await (0, check_1.checkAccessControl)(this.connection, config.accessControlName, 'inactive');
269
+ await (0, check_1.checkAccessControl)(this.connection, config.accessControlName, 'inactive', undefined, this.logger);
270
270
  this.logger?.info?.('Final check passed');
271
271
  // 6. Activate (if requested, no stateful needed - uses same session/cookies)
272
272
  if (options?.activateOnUpdate) {
@@ -397,7 +397,7 @@ class AdtAccessControl {
397
397
  }
398
398
  // Map status to version
399
399
  const version = status === 'active' ? 'active' : 'inactive';
400
- state.checkResult = await (0, check_1.checkAccessControl)(this.connection, config.accessControlName, version);
400
+ state.checkResult = await (0, check_1.checkAccessControl)(this.connection, config.accessControlName, version, undefined, this.logger);
401
401
  return state;
402
402
  }
403
403
  /**
@@ -1,6 +1,13 @@
1
- import type { IAdtResponse as AxiosResponse, IAbapConnection } from '@mcp-abap-adt/interfaces';
1
+ import type { IAdtResponse as AxiosResponse, IAbapConnection, ILogger } from '@mcp-abap-adt/interfaces';
2
2
  /**
3
3
  * Check access control syntax
4
+ *
5
+ * Retries once on transient `status='notProcessed'` with empty errors —
6
+ * observed on cloud trial under full-suite load, where the CHECK reporter
7
+ * occasionally returns has_errors=true without findings because async
8
+ * validation has not materialized yet (#20). After the retry, if the state
9
+ * persists with no real errors, downgrade to a warning and return the
10
+ * response instead of throwing with an empty message.
4
11
  */
5
- export declare function checkAccessControl(connection: IAbapConnection, accessControlName: string, version?: string, sourceCode?: string): Promise<AxiosResponse>;
12
+ export declare function checkAccessControl(connection: IAbapConnection, accessControlName: string, version?: string, sourceCode?: string, logger?: ILogger): Promise<AxiosResponse>;
6
13
  //# sourceMappingURL=check.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"check.d.ts","sourceRoot":"","sources":["../../../src/core/accessControl/check.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,IAAI,aAAa,EAC7B,eAAe,EAChB,MAAM,0BAA0B,CAAC;AAGlC;;GAEG;AACH,wBAAsB,kBAAkB,CACtC,UAAU,EAAE,eAAe,EAC3B,iBAAiB,EAAE,MAAM,EACzB,OAAO,GAAE,MAAmB,EAC5B,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,aAAa,CAAC,CAiBxB"}
1
+ {"version":3,"file":"check.d.ts","sourceRoot":"","sources":["../../../src/core/accessControl/check.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,IAAI,aAAa,EAC7B,eAAe,EACf,OAAO,EACR,MAAM,0BAA0B,CAAC;AAOlC;;;;;;;;;GASG;AACH,wBAAsB,kBAAkB,CACtC,UAAU,EAAE,eAAe,EAC3B,iBAAiB,EAAE,MAAM,EACzB,OAAO,GAAE,MAAmB,EAC5B,UAAU,CAAC,EAAE,MAAM,EACnB,MAAM,CAAC,EAAE,OAAO,GACf,OAAO,CAAC,aAAa,CAAC,CA2CxB"}
@@ -2,15 +2,42 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.checkAccessControl = checkAccessControl;
4
4
  const checkRun_1 = require("../../utils/checkRun");
5
+ function delay(ms) {
6
+ return new Promise((resolve) => setTimeout(resolve, ms));
7
+ }
5
8
  /**
6
9
  * Check access control syntax
10
+ *
11
+ * Retries once on transient `status='notProcessed'` with empty errors —
12
+ * observed on cloud trial under full-suite load, where the CHECK reporter
13
+ * occasionally returns has_errors=true without findings because async
14
+ * validation has not materialized yet (#20). After the retry, if the state
15
+ * persists with no real errors, downgrade to a warning and return the
16
+ * response instead of throwing with an empty message.
7
17
  */
8
- async function checkAccessControl(connection, accessControlName, version = 'inactive', sourceCode) {
9
- const response = await (0, checkRun_1.runCheckRun)(connection, 'access_control', accessControlName, version, 'abapCheckRun', sourceCode);
10
- const checkResult = (0, checkRun_1.parseCheckRunResponse)(response);
11
- if (checkResult.has_errors) {
12
- const errorMessages = checkResult.errors.map((err) => err.text).join('; ');
13
- throw new Error(`Access control check failed: ${errorMessages}`);
18
+ async function checkAccessControl(connection, accessControlName, version = 'inactive', sourceCode, logger) {
19
+ for (let attempt = 0; attempt < 2; attempt++) {
20
+ const response = await (0, checkRun_1.runCheckRun)(connection, 'access_control', accessControlName, version, 'abapCheckRun', sourceCode);
21
+ const checkResult = (0, checkRun_1.parseCheckRunResponse)(response);
22
+ if (!checkResult.has_errors) {
23
+ return response;
24
+ }
25
+ if (checkResult.errors.length > 0) {
26
+ const errorMessages = checkResult.errors
27
+ .map((err) => err.text)
28
+ .join('; ');
29
+ throw new Error(`Access control check failed: ${errorMessages}`);
30
+ }
31
+ // has_errors=true but errors is empty — driven by status='notProcessed'
32
+ // in parseCheckRunResponse. Likely transient under load.
33
+ if (attempt === 0) {
34
+ logger?.warn?.(`Access control check returned has_errors=true with empty errors (status=${checkResult.status}, message=${checkResult.message || 'none'}); retrying once`);
35
+ await delay(2000);
36
+ continue;
37
+ }
38
+ logger?.warn?.(`Access control check still has_errors=true with empty errors after retry (status=${checkResult.status}, message=${checkResult.message || 'none'}); treating as transient and continuing`);
39
+ return response;
14
40
  }
15
- return response;
41
+ // Unreachable: loop returns on every path
42
+ throw new Error(`Access control check failed: unexpected control flow for ${accessControlName}`);
16
43
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mcp-abap-adt/adt-clients",
3
- "version": "5.4.2",
3
+ "version": "5.4.3",
4
4
  "description": "ADT clients for SAP ABAP systems - AdtClient and AdtRuntimeClient",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",