@mcp-abap-adt/adt-clients 5.2.0 → 5.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.
Files changed (101) hide show
  1. package/README.md +2 -0
  2. package/dist/clients/AdtAbapGitClient.d.ts +28 -0
  3. package/dist/clients/AdtAbapGitClient.d.ts.map +1 -0
  4. package/dist/clients/AdtAbapGitClient.js +70 -0
  5. package/dist/clients/AdtClient.d.ts +6 -0
  6. package/dist/clients/AdtClient.d.ts.map +1 -1
  7. package/dist/clients/AdtClient.js +8 -0
  8. package/dist/clients/abapGit/checkExternalRepo.d.ts +4 -0
  9. package/dist/clients/abapGit/checkExternalRepo.d.ts.map +1 -0
  10. package/dist/clients/abapGit/checkExternalRepo.js +23 -0
  11. package/dist/clients/abapGit/getErrorLog.d.ts +4 -0
  12. package/dist/clients/abapGit/getErrorLog.d.ts.map +1 -0
  13. package/dist/clients/abapGit/getErrorLog.js +24 -0
  14. package/dist/clients/abapGit/index.d.ts +3 -0
  15. package/dist/clients/abapGit/index.d.ts.map +1 -0
  16. package/dist/clients/abapGit/index.js +5 -0
  17. package/dist/clients/abapGit/link.d.ts +4 -0
  18. package/dist/clients/abapGit/link.d.ts.map +1 -0
  19. package/dist/clients/abapGit/link.js +16 -0
  20. package/dist/clients/abapGit/listRepos.d.ts +4 -0
  21. package/dist/clients/abapGit/listRepos.d.ts.map +1 -0
  22. package/dist/clients/abapGit/listRepos.js +15 -0
  23. package/dist/clients/abapGit/poll.d.ts +9 -0
  24. package/dist/clients/abapGit/poll.d.ts.map +1 -0
  25. package/dist/clients/abapGit/poll.js +76 -0
  26. package/dist/clients/abapGit/pull.d.ts +4 -0
  27. package/dist/clients/abapGit/pull.d.ts.map +1 -0
  28. package/dist/clients/abapGit/pull.js +44 -0
  29. package/dist/clients/abapGit/types.d.ts +94 -0
  30. package/dist/clients/abapGit/types.d.ts.map +1 -0
  31. package/dist/clients/abapGit/types.js +16 -0
  32. package/dist/clients/abapGit/unlink.d.ts +4 -0
  33. package/dist/clients/abapGit/unlink.d.ts.map +1 -0
  34. package/dist/clients/abapGit/unlink.js +24 -0
  35. package/dist/clients/abapGit/xmlBuilder.d.ts +13 -0
  36. package/dist/clients/abapGit/xmlBuilder.d.ts.map +1 -0
  37. package/dist/clients/abapGit/xmlBuilder.js +61 -0
  38. package/dist/clients/abapGit/xmlParser.d.ts +20 -0
  39. package/dist/clients/abapGit/xmlParser.d.ts.map +1 -0
  40. package/dist/clients/abapGit/xmlParser.js +99 -0
  41. package/dist/constants/contentTypes.d.ts +14 -0
  42. package/dist/constants/contentTypes.d.ts.map +1 -1
  43. package/dist/constants/contentTypes.js +24 -1
  44. package/dist/core/featureToggle/AdtFeatureToggle.d.ts +106 -0
  45. package/dist/core/featureToggle/AdtFeatureToggle.d.ts.map +1 -0
  46. package/dist/core/featureToggle/AdtFeatureToggle.js +539 -0
  47. package/dist/core/featureToggle/activation.d.ts +9 -0
  48. package/dist/core/featureToggle/activation.d.ts.map +1 -0
  49. package/dist/core/featureToggle/activation.js +72 -0
  50. package/dist/core/featureToggle/check.d.ts +13 -0
  51. package/dist/core/featureToggle/check.d.ts.map +1 -0
  52. package/dist/core/featureToggle/check.js +60 -0
  53. package/dist/core/featureToggle/checkState.d.ts +6 -0
  54. package/dist/core/featureToggle/checkState.d.ts.map +1 -0
  55. package/dist/core/featureToggle/checkState.js +35 -0
  56. package/dist/core/featureToggle/create.d.ts +4 -0
  57. package/dist/core/featureToggle/create.d.ts.map +1 -0
  58. package/dist/core/featureToggle/create.js +23 -0
  59. package/dist/core/featureToggle/delete.d.ts +14 -0
  60. package/dist/core/featureToggle/delete.d.ts.map +1 -0
  61. package/dist/core/featureToggle/delete.js +74 -0
  62. package/dist/core/featureToggle/getState.d.ts +4 -0
  63. package/dist/core/featureToggle/getState.d.ts.map +1 -0
  64. package/dist/core/featureToggle/getState.js +42 -0
  65. package/dist/core/featureToggle/index.d.ts +3 -0
  66. package/dist/core/featureToggle/index.d.ts.map +1 -0
  67. package/dist/core/featureToggle/index.js +5 -0
  68. package/dist/core/featureToggle/lock.d.ts +3 -0
  69. package/dist/core/featureToggle/lock.d.ts.map +1 -0
  70. package/dist/core/featureToggle/lock.js +31 -0
  71. package/dist/core/featureToggle/read.d.ts +6 -0
  72. package/dist/core/featureToggle/read.d.ts.map +1 -0
  73. package/dist/core/featureToggle/read.js +16 -0
  74. package/dist/core/featureToggle/readSource.d.ts +3 -0
  75. package/dist/core/featureToggle/readSource.d.ts.map +1 -0
  76. package/dist/core/featureToggle/readSource.js +16 -0
  77. package/dist/core/featureToggle/switch.d.ts +4 -0
  78. package/dist/core/featureToggle/switch.d.ts.map +1 -0
  79. package/dist/core/featureToggle/switch.js +25 -0
  80. package/dist/core/featureToggle/types.d.ts +123 -0
  81. package/dist/core/featureToggle/types.d.ts.map +1 -0
  82. package/dist/core/featureToggle/types.js +11 -0
  83. package/dist/core/featureToggle/unlock.d.ts +3 -0
  84. package/dist/core/featureToggle/unlock.d.ts.map +1 -0
  85. package/dist/core/featureToggle/unlock.js +15 -0
  86. package/dist/core/featureToggle/update.d.ts +4 -0
  87. package/dist/core/featureToggle/update.d.ts.map +1 -0
  88. package/dist/core/featureToggle/update.js +26 -0
  89. package/dist/core/featureToggle/updateSource.d.ts +4 -0
  90. package/dist/core/featureToggle/updateSource.d.ts.map +1 -0
  91. package/dist/core/featureToggle/updateSource.js +23 -0
  92. package/dist/core/featureToggle/validation.d.ts +3 -0
  93. package/dist/core/featureToggle/validation.d.ts.map +1 -0
  94. package/dist/core/featureToggle/validation.js +16 -0
  95. package/dist/core/featureToggle/xmlBuilder.d.ts +11 -0
  96. package/dist/core/featureToggle/xmlBuilder.d.ts.map +1 -0
  97. package/dist/core/featureToggle/xmlBuilder.js +43 -0
  98. package/dist/index.d.ts +3 -0
  99. package/dist/index.d.ts.map +1 -1
  100. package/dist/index.js +3 -1
  101. package/package.json +1 -4
package/README.md CHANGED
@@ -14,6 +14,7 @@ TypeScript clients for SAP ABAP Development Tools (ADT).
14
14
  - `AdtRuntimeClientBatch` – batch mode for runtime operations
15
15
  - `AdtRuntimeClientExperimental` – runtime APIs in progress (for example AMDP debugger)
16
16
  - `AdtClientsWS` – realtime WebSocket facade for event-driven workflows
17
+ - `AdtAbapGitClient` – standalone client for SAP-official ADT-integrated abapGit (`/sap/bc/adt/abapgit/*`); available on cloud and modern on-prem (ABAP Platform 2022+)
17
18
  - ✅ **ABAP Unit test support** – run and manage ABAP Unit tests (class and CDS view tests)
18
19
  - ✅ **Stateful session management** – maintains `sap-adt-connection-id` across operations
19
20
  - ✅ **Lock registry** – persistent `.locks/active-locks.json` with CLI tools for recovery
@@ -141,6 +142,7 @@ npm install @mcp-abap-adt/adt-clients
141
142
  | Metadata Extensions (DDLX) | ✅ |
142
143
  | Packages (DEVC) | ✅ |
143
144
  | Authorization Fields (SUSO / AUTH) | ✅ |
145
+ | Feature Toggles (FTG2/FT) | ✅ |
144
146
  | Transports (TRNS) | ✅ |
145
147
 
146
148
  ## Quick Start
@@ -0,0 +1,28 @@
1
+ /**
2
+ * ADT-integrated abapGit client.
3
+ *
4
+ * Standalone top-level class — NOT a factory on AdtClient (which is
5
+ * reserved for IAdtObject<Config, State> implementations only).
6
+ * Consumers instantiate directly: new AdtAbapGitClient(connection, logger, options).
7
+ *
8
+ * Implements IAdtAbapGitClient. HTTP operations are delegated to
9
+ * low-level functions in ./abapGit/*; this class owns the options,
10
+ * enforces the public contract, and keeps the call sites cast-free
11
+ * by implementing the specialized interface.
12
+ */
13
+ import type { IAbapConnection, ILogger } from '@mcp-abap-adt/interfaces';
14
+ import type { IAbapGitErrorLogEntry, IAbapGitExternalRepoCredentials, IAbapGitExternalRepoInfo, IAbapGitLinkArgs, IAbapGitPullArgs, IAbapGitPullResult, IAbapGitRepoStatus, IAbapGitUnlinkArgs, IAdtAbapGitClient, IAdtAbapGitClientOptions } from './abapGit/types';
15
+ export declare class AdtAbapGitClient implements IAdtAbapGitClient {
16
+ private readonly connection;
17
+ private readonly logger?;
18
+ private readonly contentTypeVersion;
19
+ constructor(connection: IAbapConnection, logger?: ILogger, options?: IAdtAbapGitClientOptions);
20
+ link(args: IAbapGitLinkArgs): Promise<void>;
21
+ pull(args: IAbapGitPullArgs): Promise<IAbapGitPullResult>;
22
+ unlink(args: IAbapGitUnlinkArgs): Promise<void>;
23
+ listRepos(): Promise<IAbapGitRepoStatus[]>;
24
+ getRepo(packageName: string): Promise<IAbapGitRepoStatus | undefined>;
25
+ getErrorLog(packageName: string): Promise<IAbapGitErrorLogEntry[]>;
26
+ checkExternalRepo(args: IAbapGitExternalRepoCredentials): Promise<IAbapGitExternalRepoInfo>;
27
+ }
28
+ //# sourceMappingURL=AdtAbapGitClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AdtAbapGitClient.d.ts","sourceRoot":"","sources":["../../src/clients/AdtAbapGitClient.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAMzE,OAAO,KAAK,EACV,qBAAqB,EACrB,+BAA+B,EAC/B,wBAAwB,EACxB,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,wBAAwB,EACzB,MAAM,iBAAiB,CAAC;AAyBzB,qBAAa,gBAAiB,YAAW,iBAAiB;IACxD,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAkB;IAC7C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAU;IAClC,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAc;gBAG/C,UAAU,EAAE,eAAe,EAC3B,MAAM,CAAC,EAAE,OAAO,EAChB,OAAO,CAAC,EAAE,wBAAwB;IAO9B,IAAI,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;IAO3C,IAAI,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAKzD,MAAM,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;IAK/C,SAAS,IAAI,OAAO,CAAC,kBAAkB,EAAE,CAAC;IAK1C,OAAO,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,GAAG,SAAS,CAAC;IAOrE,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,EAAE,CAAC;IAIlE,iBAAiB,CACrB,IAAI,EAAE,+BAA+B,GACpC,OAAO,CAAC,wBAAwB,CAAC;CAGrC"}
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+ /**
3
+ * ADT-integrated abapGit client.
4
+ *
5
+ * Standalone top-level class — NOT a factory on AdtClient (which is
6
+ * reserved for IAdtObject<Config, State> implementations only).
7
+ * Consumers instantiate directly: new AdtAbapGitClient(connection, logger, options).
8
+ *
9
+ * Implements IAdtAbapGitClient. HTTP operations are delegated to
10
+ * low-level functions in ./abapGit/*; this class owns the options,
11
+ * enforces the public contract, and keeps the call sites cast-free
12
+ * by implementing the specialized interface.
13
+ */
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.AdtAbapGitClient = void 0;
16
+ const checkExternalRepo_1 = require("./abapGit/checkExternalRepo");
17
+ const getErrorLog_1 = require("./abapGit/getErrorLog");
18
+ const link_1 = require("./abapGit/link");
19
+ const listRepos_1 = require("./abapGit/listRepos");
20
+ const pull_1 = require("./abapGit/pull");
21
+ const unlink_1 = require("./abapGit/unlink");
22
+ function toPublicRepoStatus(r) {
23
+ return {
24
+ package: r.package,
25
+ url: r.url,
26
+ branchName: r.branchName,
27
+ status: r.status,
28
+ statusText: r.statusText,
29
+ createdBy: r.createdBy,
30
+ createdAt: r.createdAt,
31
+ repositoryId: r.repositoryId,
32
+ };
33
+ }
34
+ class AdtAbapGitClient {
35
+ connection;
36
+ logger;
37
+ contentTypeVersion;
38
+ constructor(connection, logger, options) {
39
+ this.connection = connection;
40
+ this.logger = logger;
41
+ this.contentTypeVersion = options?.contentTypeVersion ?? 'v3';
42
+ }
43
+ async link(args) {
44
+ this.logger?.debug?.(`AdtAbapGitClient.link: package=${args.package} url=${args.url}`);
45
+ await (0, link_1.linkRepo)(this.connection, args, this.contentTypeVersion);
46
+ }
47
+ async pull(args) {
48
+ this.logger?.debug?.(`AdtAbapGitClient.pull: package=${args.package}`);
49
+ return (0, pull_1.pullRepo)(this.connection, args, this.contentTypeVersion);
50
+ }
51
+ async unlink(args) {
52
+ this.logger?.debug?.(`AdtAbapGitClient.unlink: package=${args.package}`);
53
+ await (0, unlink_1.unlinkRepo)(this.connection, args);
54
+ }
55
+ async listRepos() {
56
+ const rows = await (0, listRepos_1.listRepos)(this.connection);
57
+ return rows.map(toPublicRepoStatus);
58
+ }
59
+ async getRepo(packageName) {
60
+ const repos = await this.listRepos();
61
+ return repos.find((r) => r.package.toUpperCase() === packageName.toUpperCase());
62
+ }
63
+ async getErrorLog(packageName) {
64
+ return (0, getErrorLog_1.getErrorLog)(this.connection, packageName);
65
+ }
66
+ async checkExternalRepo(args) {
67
+ return (0, checkExternalRepo_1.checkExternalRepo)(this.connection, args);
68
+ }
69
+ }
70
+ exports.AdtAbapGitClient = AdtAbapGitClient;
@@ -21,6 +21,7 @@ import { type IClassConfig, type IClassState, type ILocalDefinitionsConfig, type
21
21
  import { type IDataElementConfig, type IDataElementState } from '../core/dataElement';
22
22
  import { type IDomainConfig, type IDomainState } from '../core/domain';
23
23
  import { type IEnhancementConfig, type IEnhancementState } from '../core/enhancement';
24
+ import { type IFeatureToggleObject } from '../core/featureToggle';
24
25
  import { type IFunctionGroupConfig, type IFunctionGroupState } from '../core/functionGroup';
25
26
  import { type IFunctionIncludeConfig, type IFunctionIncludeState } from '../core/functionInclude';
26
27
  import { type IFunctionModuleConfig, type IFunctionModuleState } from '../core/functionModule';
@@ -177,6 +178,11 @@ export declare class AdtClient {
177
178
  * @returns IAdtObject instance for Enhancement operations
178
179
  */
179
180
  getEnhancement(): IAdtObject<IEnhancementConfig, IEnhancementState>;
181
+ /**
182
+ * Get high-level operations for FeatureToggle objects
183
+ * @returns IFeatureToggleObject instance for FeatureToggle operations
184
+ */
185
+ getFeatureToggle(): IFeatureToggleObject;
180
186
  /**
181
187
  * Get high-level operations for UnitTest objects
182
188
  * @returns IAdtObject instance for UnitTest operations
@@ -1 +1 @@
1
- {"version":3,"file":"AdtClient.d.ts","sourceRoot":"","sources":["../../src/clients/AdtClient.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EACV,eAAe,EACf,UAAU,EACV,OAAO,EACR,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAEL,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACzB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAEL,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,EAC9B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAEL,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,EAC9B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAEL,KAAK,6BAA6B,EAClC,KAAK,4BAA4B,EAClC,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAML,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,uBAAuB,EAC5B,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACvB,MAAM,eAAe,CAAC;AACvB,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACvB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,YAAY,EAClB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACvB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEL,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACzB,MAAM,uBAAuB,CAAC;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OAGG;IACH,WAAW,IAAI,UAAU,CAAC,eAAe,EAAE,cAAc,CAAC;IAI1D;;;OAGG;IACH,cAAc,IAAI,UAAU,CAAC,kBAAkB,EAAE,iBAAiB,CAAC;IAInE;;;OAGG;IACH,UAAU,IAAI,UAAU;IAIxB;;;;;;;;;;;OAWG;IACH,QAAQ,IAAI,QAAQ;IAIpB;;;OAGG;IACH,iBAAiB,IAAI,UAAU,CAAC,qBAAqB,EAAE,WAAW,CAAC;IASnE;;;OAGG;IACH,aAAa,IAAI,UAAU,CAAC,iBAAiB,EAAE,WAAW,CAAC;IAS3D;;;OAGG;IACH,mBAAmB,IAAI,UAAU,CAAC,uBAAuB,EAAE,WAAW,CAAC;IASvE;;;OAGG;IACH,cAAc,IAAI,UAAU,CAAC,kBAAkB,EAAE,WAAW,CAAC;CAQ9D"}
@@ -23,6 +23,7 @@ const class_1 = require("../core/class");
23
23
  const dataElement_1 = require("../core/dataElement");
24
24
  const domain_1 = require("../core/domain");
25
25
  const enhancement_1 = require("../core/enhancement");
26
+ const featureToggle_1 = require("../core/featureToggle");
26
27
  const functionGroup_1 = require("../core/functionGroup");
27
28
  const functionInclude_1 = require("../core/functionInclude");
28
29
  const functionModule_1 = require("../core/functionModule");
@@ -240,6 +241,13 @@ class AdtClient {
240
241
  getEnhancement() {
241
242
  return new enhancement_1.AdtEnhancement(this.connection, this.logger, this.systemContext);
242
243
  }
244
+ /**
245
+ * Get high-level operations for FeatureToggle objects
246
+ * @returns IFeatureToggleObject instance for FeatureToggle operations
247
+ */
248
+ getFeatureToggle() {
249
+ return new featureToggle_1.AdtFeatureToggle(this.connection, this.logger, this.systemContext);
250
+ }
243
251
  /**
244
252
  * Get high-level operations for UnitTest objects
245
253
  * @returns IAdtObject instance for UnitTest operations
@@ -0,0 +1,4 @@
1
+ import type { IAbapConnection } from '@mcp-abap-adt/interfaces';
2
+ import type { IAbapGitExternalRepoCredentials, IAbapGitExternalRepoInfo } from './types';
3
+ export declare function checkExternalRepo(connection: IAbapConnection, args: IAbapGitExternalRepoCredentials): Promise<IAbapGitExternalRepoInfo>;
4
+ //# sourceMappingURL=checkExternalRepo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkExternalRepo.d.ts","sourceRoot":"","sources":["../../../src/clients/abapGit/checkExternalRepo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAMhE,OAAO,KAAK,EACV,+BAA+B,EAC/B,wBAAwB,EACzB,MAAM,SAAS,CAAC;AAIjB,wBAAsB,iBAAiB,CACrC,UAAU,EAAE,eAAe,EAC3B,IAAI,EAAE,+BAA+B,GACpC,OAAO,CAAC,wBAAwB,CAAC,CAenC"}
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.checkExternalRepo = checkExternalRepo;
4
+ const contentTypes_1 = require("../../constants/contentTypes");
5
+ const timeouts_1 = require("../../utils/timeouts");
6
+ const xmlBuilder_1 = require("./xmlBuilder");
7
+ const xmlParser_1 = require("./xmlParser");
8
+ async function checkExternalRepo(connection, args) {
9
+ // Phase Z confirmed: request/response use DIFFERENT media-type families.
10
+ // Content-Type = application/abapgit.adt.repo.info.ext.request.v2+xml
11
+ // Accept = application/abapgit.adt.repo.info.ext.response.v2+xml
12
+ const resp = await connection.makeAdtRequest({
13
+ method: 'POST',
14
+ url: '/sap/bc/adt/abapgit/externalrepoinfo',
15
+ timeout: (0, timeouts_1.getTimeout)('default'),
16
+ headers: {
17
+ 'Content-Type': contentTypes_1.CT_ABAPGIT_EXTERNAL_REPO_INFO_REQUEST_V2,
18
+ Accept: contentTypes_1.ACCEPT_ABAPGIT_EXTERNAL_REPO_INFO_RESPONSE_V2,
19
+ },
20
+ data: (0, xmlBuilder_1.buildExternalRepoInfoBody)(args),
21
+ });
22
+ return (0, xmlParser_1.parseExternalRepoInfo)(String(resp.data));
23
+ }
@@ -0,0 +1,4 @@
1
+ import type { IAbapConnection } from '@mcp-abap-adt/interfaces';
2
+ import type { IAbapGitErrorLogEntry } from './types';
3
+ export declare function getErrorLog(connection: IAbapConnection, packageName: string): Promise<IAbapGitErrorLogEntry[]>;
4
+ //# sourceMappingURL=getErrorLog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getErrorLog.d.ts","sourceRoot":"","sources":["../../../src/clients/abapGit/getErrorLog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAIhE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAGrD,wBAAsB,WAAW,CAC/B,UAAU,EAAE,eAAe,EAC3B,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,qBAAqB,EAAE,CAAC,CAoBlC"}
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getErrorLog = getErrorLog;
4
+ const contentTypes_1 = require("../../constants/contentTypes");
5
+ const timeouts_1 = require("../../utils/timeouts");
6
+ const listRepos_1 = require("./listRepos");
7
+ const xmlParser_1 = require("./xmlParser");
8
+ async function getErrorLog(connection, packageName) {
9
+ const repos = await (0, listRepos_1.listRepos)(connection);
10
+ const match = repos.find((r) => r.package.toUpperCase() === packageName.toUpperCase());
11
+ if (!match) {
12
+ throw new Error(`abapGit repository for package '${packageName}' not found`);
13
+ }
14
+ if (!match.atomLinks.logLink) {
15
+ return [];
16
+ }
17
+ const resp = await connection.makeAdtRequest({
18
+ method: 'GET',
19
+ url: match.atomLinks.logLink,
20
+ timeout: (0, timeouts_1.getTimeout)('default'),
21
+ headers: { Accept: contentTypes_1.CT_ABAPGIT_REPO_OBJECT_V2 },
22
+ });
23
+ return (0, xmlParser_1.parseErrorLog)(String(resp.data));
24
+ }
@@ -0,0 +1,3 @@
1
+ export { AdtAbapGitClient } from '../AdtAbapGitClient';
2
+ export type { AbapGitStatus, IAbapGitErrorLogEntry, IAbapGitExternalRepoBranch, IAbapGitExternalRepoCredentials, IAbapGitExternalRepoInfo, IAbapGitLinkArgs, IAbapGitPullArgs, IAbapGitPullResult, IAbapGitRepoStatus, IAbapGitUnlinkArgs, IAdtAbapGitClient, IAdtAbapGitClientOptions, } from './types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/clients/abapGit/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,YAAY,EACV,aAAa,EACb,qBAAqB,EACrB,0BAA0B,EAC1B,+BAA+B,EAC/B,wBAAwB,EACxB,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,wBAAwB,GACzB,MAAM,SAAS,CAAC"}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AdtAbapGitClient = void 0;
4
+ var AdtAbapGitClient_1 = require("../AdtAbapGitClient");
5
+ Object.defineProperty(exports, "AdtAbapGitClient", { enumerable: true, get: function () { return AdtAbapGitClient_1.AdtAbapGitClient; } });
@@ -0,0 +1,4 @@
1
+ import type { IAbapConnection } from '@mcp-abap-adt/interfaces';
2
+ import type { IAbapGitLinkArgs } from './types';
3
+ export declare function linkRepo(connection: IAbapConnection, args: IAbapGitLinkArgs, contentTypeVersion?: 'v3' | 'v4'): Promise<void>;
4
+ //# sourceMappingURL=link.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../../src/clients/abapGit/link.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAMhE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAGhD,wBAAsB,QAAQ,CAC5B,UAAU,EAAE,eAAe,EAC3B,IAAI,EAAE,gBAAgB,EACtB,kBAAkB,GAAE,IAAI,GAAG,IAAW,GACrC,OAAO,CAAC,IAAI,CAAC,CAUf"}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.linkRepo = linkRepo;
4
+ const contentTypes_1 = require("../../constants/contentTypes");
5
+ const timeouts_1 = require("../../utils/timeouts");
6
+ const xmlBuilder_1 = require("./xmlBuilder");
7
+ async function linkRepo(connection, args, contentTypeVersion = 'v3') {
8
+ const ct = contentTypeVersion === 'v4' ? contentTypes_1.CT_ABAPGIT_REPO_V4 : contentTypes_1.CT_ABAPGIT_REPO_V3;
9
+ await connection.makeAdtRequest({
10
+ method: 'POST',
11
+ url: '/sap/bc/adt/abapgit/repos',
12
+ timeout: (0, timeouts_1.getTimeout)('default'),
13
+ headers: { 'Content-Type': ct, Accept: ct },
14
+ data: (0, xmlBuilder_1.buildLinkBody)(args),
15
+ });
16
+ }
@@ -0,0 +1,4 @@
1
+ import type { IAbapConnection } from '@mcp-abap-adt/interfaces';
2
+ import { type IRepoEntityParsed } from './xmlParser';
3
+ export declare function listRepos(connection: IAbapConnection): Promise<IRepoEntityParsed[]>;
4
+ //# sourceMappingURL=listRepos.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"listRepos.d.ts","sourceRoot":"","sources":["../../../src/clients/abapGit/listRepos.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAGhE,OAAO,EAAE,KAAK,iBAAiB,EAAiB,MAAM,aAAa,CAAC;AAEpE,wBAAsB,SAAS,CAC7B,UAAU,EAAE,eAAe,GAC1B,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAQ9B"}
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.listRepos = listRepos;
4
+ const contentTypes_1 = require("../../constants/contentTypes");
5
+ const timeouts_1 = require("../../utils/timeouts");
6
+ const xmlParser_1 = require("./xmlParser");
7
+ async function listRepos(connection) {
8
+ const resp = await connection.makeAdtRequest({
9
+ method: 'GET',
10
+ url: '/sap/bc/adt/abapgit/repos',
11
+ timeout: (0, timeouts_1.getTimeout)('default'),
12
+ headers: { Accept: contentTypes_1.ACCEPT_ABAPGIT_REPOS_V2 },
13
+ });
14
+ return (0, xmlParser_1.parseRepoList)(String(resp.data));
15
+ }
@@ -0,0 +1,9 @@
1
+ import type { IAbapConnection } from '@mcp-abap-adt/interfaces';
2
+ import type { IAbapGitRepoStatus } from './types';
3
+ export declare function pollUntilTerminal(connection: IAbapConnection, packageName: string, opts?: {
4
+ pollIntervalMs?: number;
5
+ maxPollDurationMs?: number;
6
+ signal?: AbortSignal;
7
+ onProgress?: (status: IAbapGitRepoStatus) => void;
8
+ }): Promise<IAbapGitRepoStatus>;
9
+ //# sourceMappingURL=poll.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"poll.d.ts","sourceRoot":"","sources":["../../../src/clients/abapGit/poll.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAEhE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAiClD,wBAAsB,iBAAiB,CACrC,UAAU,EAAE,eAAe,EAC3B,WAAW,EAAE,MAAM,EACnB,IAAI,CAAC,EAAE;IACL,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAC;CACnD,GACA,OAAO,CAAC,kBAAkB,CAAC,CAkD7B"}
@@ -0,0 +1,76 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.pollUntilTerminal = pollUntilTerminal;
4
+ const listRepos_1 = require("./listRepos");
5
+ const DEFAULT_POLL_INTERVAL_MS = 1000;
6
+ const DEFAULT_MAX_DURATION_MS = 10 * 60 * 1000;
7
+ class AbapGitAbortError extends Error {
8
+ name = 'AbortError';
9
+ lastKnownStatus;
10
+ }
11
+ class AbapGitTimeoutError extends Error {
12
+ name = 'TimeoutError';
13
+ lastKnownStatus;
14
+ }
15
+ async function sleep(ms, signal) {
16
+ return new Promise((resolve, reject) => {
17
+ if (signal?.aborted) {
18
+ reject(new AbapGitAbortError('aborted'));
19
+ return;
20
+ }
21
+ const timer = setTimeout(() => {
22
+ signal?.removeEventListener('abort', onAbort);
23
+ resolve();
24
+ }, ms);
25
+ const onAbort = () => {
26
+ clearTimeout(timer);
27
+ reject(new AbapGitAbortError('aborted'));
28
+ };
29
+ signal?.addEventListener('abort', onAbort, { once: true });
30
+ });
31
+ }
32
+ async function pollUntilTerminal(connection, packageName, opts) {
33
+ const interval = opts?.pollIntervalMs ?? DEFAULT_POLL_INTERVAL_MS;
34
+ const maxDuration = opts?.maxPollDurationMs ?? DEFAULT_MAX_DURATION_MS;
35
+ const deadline = Date.now() + maxDuration;
36
+ let lastKnown;
37
+ while (true) {
38
+ if (opts?.signal?.aborted) {
39
+ const err = new AbapGitAbortError('aborted');
40
+ err.lastKnownStatus = lastKnown;
41
+ throw err;
42
+ }
43
+ if (Date.now() > deadline) {
44
+ const err = new AbapGitTimeoutError(`abapGit pull did not finish within ${maxDuration}ms`);
45
+ err.lastKnownStatus = lastKnown;
46
+ throw err;
47
+ }
48
+ const repos = await (0, listRepos_1.listRepos)(connection);
49
+ const match = repos.find((r) => r.package.toUpperCase() === packageName.toUpperCase());
50
+ if (match) {
51
+ lastKnown = {
52
+ package: match.package,
53
+ url: match.url,
54
+ branchName: match.branchName,
55
+ status: match.status,
56
+ statusText: match.statusText,
57
+ createdBy: match.createdBy,
58
+ createdAt: match.createdAt,
59
+ repositoryId: match.repositoryId,
60
+ };
61
+ opts?.onProgress?.(lastKnown);
62
+ if (match.status !== 'R') {
63
+ return lastKnown;
64
+ }
65
+ }
66
+ try {
67
+ await sleep(interval, opts?.signal);
68
+ }
69
+ catch (sleepErr) {
70
+ if (sleepErr instanceof AbapGitAbortError) {
71
+ sleepErr.lastKnownStatus = lastKnown;
72
+ }
73
+ throw sleepErr;
74
+ }
75
+ }
76
+ }
@@ -0,0 +1,4 @@
1
+ import type { IAbapConnection } from '@mcp-abap-adt/interfaces';
2
+ import type { IAbapGitPullArgs, IAbapGitPullResult } from './types';
3
+ export declare function pullRepo(connection: IAbapConnection, args: IAbapGitPullArgs, contentTypeVersion?: 'v3' | 'v4'): Promise<IAbapGitPullResult>;
4
+ //# sourceMappingURL=pull.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pull.d.ts","sourceRoot":"","sources":["../../../src/clients/abapGit/pull.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAShE,OAAO,KAAK,EACV,gBAAgB,EAChB,kBAAkB,EAEnB,MAAM,SAAS,CAAC;AAGjB,wBAAsB,QAAQ,CAC5B,UAAU,EAAE,eAAe,EAC3B,IAAI,EAAE,gBAAgB,EACtB,kBAAkB,GAAE,IAAI,GAAG,IAAW,GACrC,OAAO,CAAC,kBAAkB,CAAC,CAgD7B"}
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.pullRepo = pullRepo;
4
+ const contentTypes_1 = require("../../constants/contentTypes");
5
+ const timeouts_1 = require("../../utils/timeouts");
6
+ const getErrorLog_1 = require("./getErrorLog");
7
+ const listRepos_1 = require("./listRepos");
8
+ const poll_1 = require("./poll");
9
+ const xmlBuilder_1 = require("./xmlBuilder");
10
+ async function pullRepo(connection, args, contentTypeVersion = 'v3') {
11
+ const repos = await (0, listRepos_1.listRepos)(connection);
12
+ const match = repos.find((r) => r.package.toUpperCase() === args.package.toUpperCase());
13
+ if (!match) {
14
+ throw new Error(`abapGit repository for package '${args.package}' not found`);
15
+ }
16
+ if (!match.atomLinks.pullLink) {
17
+ throw new Error(`abapGit repository '${args.package}': response missing pull_link atom link`);
18
+ }
19
+ const resolvedBranch = args.branchName ?? match.branchName;
20
+ const ct = contentTypeVersion === 'v4' ? contentTypes_1.CT_ABAPGIT_REPO_V4 : contentTypes_1.CT_ABAPGIT_REPO_V3;
21
+ await connection.makeAdtRequest({
22
+ method: 'POST',
23
+ url: match.atomLinks.pullLink,
24
+ timeout: (0, timeouts_1.getTimeout)('default'),
25
+ headers: { 'Content-Type': ct, Accept: ct },
26
+ data: (0, xmlBuilder_1.buildPullBody)(args, resolvedBranch),
27
+ });
28
+ const terminal = await (0, poll_1.pollUntilTerminal)(connection, args.package, {
29
+ pollIntervalMs: args.pollIntervalMs,
30
+ maxPollDurationMs: args.maxPollDurationMs,
31
+ signal: args.signal,
32
+ onProgress: args.onProgress,
33
+ });
34
+ const result = { finalStatus: terminal };
35
+ if (terminal.status === 'E' || terminal.status === 'A') {
36
+ try {
37
+ result.errorLog = await (0, getErrorLog_1.getErrorLog)(connection, args.package);
38
+ }
39
+ catch {
40
+ // Error log is best-effort. If it fails, return the result without it.
41
+ }
42
+ }
43
+ return result;
44
+ }
@@ -0,0 +1,94 @@
1
+ /**
2
+ * abapGit client type definitions.
3
+ *
4
+ * Public surface (IAdtAbapGitClient) covers the ADT-integrated abapGit
5
+ * (/sap/bc/adt/abapgit/*). link and pull match sapcli parity; unlink,
6
+ * listRepos, getRepo, getErrorLog, and checkExternalRepo extend beyond
7
+ * sapcli with discovery-evidenced endpoints.
8
+ *
9
+ * Pull is asynchronous server-side. The client-side wait loop respects
10
+ * AbortSignal and a max-duration cap; aborting or timing out stops the
11
+ * client wait only — the server-side job may still be running, and
12
+ * callers must poll getRepo(package) until status != 'R' before
13
+ * re-issuing pull or unlink.
14
+ */
15
+ export type AbapGitStatus = 'R' | 'E' | 'A' | string;
16
+ export interface IAbapGitRepoStatus {
17
+ package: string;
18
+ url: string;
19
+ branchName: string;
20
+ status: AbapGitStatus;
21
+ statusText: string;
22
+ createdBy?: string;
23
+ createdAt?: string;
24
+ repositoryId?: string;
25
+ }
26
+ export interface IAbapGitErrorLogEntry {
27
+ msgType: 'E' | 'W' | 'I' | 'S' | string;
28
+ objectType: string;
29
+ objectName: string;
30
+ messageText: string;
31
+ }
32
+ export interface IAbapGitLinkArgs {
33
+ package: string;
34
+ url: string;
35
+ branchName?: string;
36
+ remoteUser?: string;
37
+ remotePassword?: string;
38
+ transportRequest?: string;
39
+ }
40
+ export interface IAbapGitPullArgs {
41
+ package: string;
42
+ branchName?: string;
43
+ remoteUser?: string;
44
+ remotePassword?: string;
45
+ transportRequest?: string;
46
+ pollIntervalMs?: number;
47
+ maxPollDurationMs?: number;
48
+ signal?: AbortSignal;
49
+ onProgress?: (status: IAbapGitRepoStatus) => void;
50
+ }
51
+ export interface IAbapGitPullResult {
52
+ finalStatus: IAbapGitRepoStatus;
53
+ errorLog?: IAbapGitErrorLogEntry[];
54
+ }
55
+ export interface IAbapGitUnlinkArgs {
56
+ package: string;
57
+ transportRequest?: string;
58
+ }
59
+ export interface IAbapGitExternalRepoCredentials {
60
+ url: string;
61
+ remoteUser?: string;
62
+ remotePassword?: string;
63
+ }
64
+ export interface IAbapGitExternalRepoBranch {
65
+ name: string;
66
+ sha1: string;
67
+ isHead: boolean;
68
+ type?: string;
69
+ }
70
+ export interface IAbapGitExternalRepoInfo {
71
+ branches: IAbapGitExternalRepoBranch[];
72
+ accessMode?: 'PUBLIC' | 'PRIVATE' | string;
73
+ }
74
+ export interface IAbapGitAbortedError extends Error {
75
+ name: 'AbortError';
76
+ lastKnownStatus?: IAbapGitRepoStatus;
77
+ }
78
+ export interface IAbapGitTimeoutError extends Error {
79
+ name: 'TimeoutError';
80
+ lastKnownStatus?: IAbapGitRepoStatus;
81
+ }
82
+ export interface IAdtAbapGitClientOptions {
83
+ contentTypeVersion?: 'v3' | 'v4';
84
+ }
85
+ export interface IAdtAbapGitClient {
86
+ link(args: IAbapGitLinkArgs): Promise<void>;
87
+ pull(args: IAbapGitPullArgs): Promise<IAbapGitPullResult>;
88
+ unlink(args: IAbapGitUnlinkArgs): Promise<void>;
89
+ listRepos(): Promise<IAbapGitRepoStatus[]>;
90
+ getRepo(packageName: string): Promise<IAbapGitRepoStatus | undefined>;
91
+ getErrorLog(packageName: string): Promise<IAbapGitErrorLogEntry[]>;
92
+ checkExternalRepo(args: IAbapGitExternalRepoCredentials): Promise<IAbapGitExternalRepoInfo>;
93
+ }
94
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/clients/abapGit/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,MAAM,MAAM,aAAa,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,MAAM,CAAC;AAErD,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,aAAa,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,MAAM,CAAC;IACxC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MA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ACjD,IAAI,EAAE,cAAc,CAAC;IACrB,eAAe,CAAC,EAAE,kBAAkB,CAAC;CACtC;AAED,MAAM,WAAW,wBAAwB;IACvC,kBAAkB,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;CAClC;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5C,IAAI,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;IAC1D,MAAM,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAChD,SAAS,IAAI,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAAC;IAC3C,OAAO,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,GAAG,SAAS,CAAC,CAAC;IACtE,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,EAAE,CAAC,CAAC;IACnE,iBAAiB,CACf,IAAI,EAAE,+BAA+B,GACpC,OAAO,CAAC,wBAAwB,CAAC,CAAC;CACtC"}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ /**
3
+ * abapGit client type definitions.
4
+ *
5
+ * Public surface (IAdtAbapGitClient) covers the ADT-integrated abapGit
6
+ * (/sap/bc/adt/abapgit/*). link and pull match sapcli parity; unlink,
7
+ * listRepos, getRepo, getErrorLog, and checkExternalRepo extend beyond
8
+ * sapcli with discovery-evidenced endpoints.
9
+ *
10
+ * Pull is asynchronous server-side. The client-side wait loop respects
11
+ * AbortSignal and a max-duration cap; aborting or timing out stops the
12
+ * client wait only — the server-side job may still be running, and
13
+ * callers must poll getRepo(package) until status != 'R' before
14
+ * re-issuing pull or unlink.
15
+ */
16
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ import type { IAbapConnection } from '@mcp-abap-adt/interfaces';
2
+ import type { IAbapGitUnlinkArgs } from './types';
3
+ export declare function unlinkRepo(connection: IAbapConnection, args: IAbapGitUnlinkArgs): Promise<void>;
4
+ //# sourceMappingURL=unlink.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unlink.d.ts","sourceRoot":"","sources":["../../../src/clients/abapGit/unlink.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAGhE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAElD,wBAAsB,UAAU,CAC9B,UAAU,EAAE,eAAe,EAC3B,IAAI,EAAE,kBAAkB,GACvB,OAAO,CAAC,IAAI,CAAC,CAuBf"}
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.unlinkRepo = unlinkRepo;
4
+ const timeouts_1 = require("../../utils/timeouts");
5
+ const listRepos_1 = require("./listRepos");
6
+ async function unlinkRepo(connection, args) {
7
+ const repos = await (0, listRepos_1.listRepos)(connection);
8
+ const match = repos.find((r) => r.package.toUpperCase() === args.package.toUpperCase());
9
+ if (!match) {
10
+ throw new Error(`abapGit repository for package '${args.package}' not found`);
11
+ }
12
+ if (!match.repositoryId) {
13
+ throw new Error(`abapGit repository '${args.package}': response missing <abapgitrepo:key>`);
14
+ }
15
+ const params = {};
16
+ if (args.transportRequest)
17
+ params.corrNr = args.transportRequest;
18
+ await connection.makeAdtRequest({
19
+ method: 'DELETE',
20
+ url: `/sap/bc/adt/abapgit/repos/${encodeURIComponent(match.repositoryId)}`,
21
+ timeout: (0, timeouts_1.getTimeout)('default'),
22
+ params,
23
+ });
24
+ }