@mcp-abap-adt/core 2.5.1 → 2.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.
- package/CHANGELOG.md +22 -0
- package/README.md +3 -0
- package/dist/handlers/bdef/handleCreateBehaviorDefinition.d.ts +50 -0
- package/dist/handlers/bdef/handleCreateBehaviorDefinition.d.ts.map +1 -0
- package/dist/handlers/bdef/handleCreateBehaviorDefinition.js +101 -0
- package/dist/handlers/bdef/handleGetBdef.d.ts +54 -0
- package/dist/handlers/bdef/handleGetBdef.d.ts.map +1 -0
- package/dist/handlers/bdef/handleGetBdef.js +89 -0
- package/dist/handlers/bdef/handleUpdateBehaviorDefinition.d.ts +37 -0
- package/dist/handlers/bdef/handleUpdateBehaviorDefinition.d.ts.map +1 -0
- package/dist/handlers/bdef/handleUpdateBehaviorDefinition.js +85 -0
- package/dist/handlers/behavior_definition/readonly/handleGetBdef.d.ts +54 -0
- package/dist/handlers/behavior_definition/readonly/handleGetBdef.d.ts.map +1 -0
- package/dist/handlers/behavior_definition/readonly/handleGetBdef.js +89 -0
- package/dist/handlers/class/handleCheckClass.d.ts +59 -0
- package/dist/handlers/class/handleCheckClass.d.ts.map +1 -0
- package/dist/handlers/class/handleCheckClass.js +138 -0
- package/dist/handlers/class/handleCreateClass.d.ts +80 -0
- package/dist/handlers/class/handleCreateClass.d.ts.map +1 -0
- package/dist/handlers/class/handleCreateClass.js +192 -0
- package/dist/handlers/class/handleGetClass.d.ts +16 -0
- package/dist/handlers/class/handleGetClass.d.ts.map +1 -0
- package/dist/handlers/class/handleGetClass.js +159 -0
- package/dist/handlers/class/handleUpdateClassSource.d.ts +44 -0
- package/dist/handlers/class/handleUpdateClassSource.d.ts.map +1 -0
- package/dist/handlers/class/handleUpdateClassSource.js +131 -0
- package/dist/handlers/class/handleValidateClass.d.ts +62 -0
- package/dist/handlers/class/handleValidateClass.d.ts.map +1 -0
- package/dist/handlers/class/handleValidateClass.js +136 -0
- package/dist/handlers/class/readonly/handleGetClass.d.ts +20 -0
- package/dist/handlers/class/readonly/handleGetClass.d.ts.map +1 -0
- package/dist/handlers/class/readonly/handleGetClass.js +159 -0
- package/dist/handlers/common/handleActivateObject.d.ts +62 -0
- package/dist/handlers/common/handleActivateObject.d.ts.map +1 -0
- package/dist/handlers/common/handleActivateObject.js +137 -0
- package/dist/handlers/common/handleCheckObject.d.ts +63 -0
- package/dist/handlers/common/handleCheckObject.d.ts.map +1 -0
- package/dist/handlers/common/handleCheckObject.js +197 -0
- package/dist/handlers/common/handleDeleteObject.d.ts +46 -0
- package/dist/handlers/common/handleDeleteObject.d.ts.map +1 -0
- package/dist/handlers/common/handleDeleteObject.js +176 -0
- package/dist/handlers/common/handleLockObject.d.ts +57 -0
- package/dist/handlers/common/handleLockObject.d.ts.map +1 -0
- package/dist/handlers/common/handleLockObject.js +195 -0
- package/dist/handlers/common/handleUnlockObject.d.ts +61 -0
- package/dist/handlers/common/handleUnlockObject.d.ts.map +1 -0
- package/dist/handlers/common/handleUnlockObject.js +178 -0
- package/dist/handlers/common/handleValidateObject.d.ts +58 -0
- package/dist/handlers/common/handleValidateObject.d.ts.map +1 -0
- package/dist/handlers/common/handleValidateObject.js +177 -0
- package/dist/handlers/data_element/handleCreateDataElement.d.ts +83 -0
- package/dist/handlers/data_element/handleCreateDataElement.d.ts.map +1 -0
- package/dist/handlers/data_element/handleCreateDataElement.js +180 -0
- package/dist/handlers/data_element/handleGetDataElement.d.ts +29 -0
- package/dist/handlers/data_element/handleGetDataElement.d.ts.map +1 -0
- package/dist/handlers/data_element/handleGetDataElement.js +173 -0
- package/dist/handlers/data_element/handleUpdateDataElement.d.ts +131 -0
- package/dist/handlers/data_element/handleUpdateDataElement.d.ts.map +1 -0
- package/dist/handlers/data_element/handleUpdateDataElement.js +258 -0
- package/dist/handlers/data_element/readonly/handleGetDataElement.d.ts +33 -0
- package/dist/handlers/data_element/readonly/handleGetDataElement.d.ts.map +1 -0
- package/dist/handlers/data_element/readonly/handleGetDataElement.js +173 -0
- package/dist/handlers/ddlx/handleCreateMetadataExtension.d.ts +41 -0
- package/dist/handlers/ddlx/handleCreateMetadataExtension.d.ts.map +1 -0
- package/dist/handlers/ddlx/handleCreateMetadataExtension.js +92 -0
- package/dist/handlers/ddlx/handleUpdateMetadataExtension.d.ts +37 -0
- package/dist/handlers/ddlx/handleUpdateMetadataExtension.d.ts.map +1 -0
- package/dist/handlers/ddlx/handleUpdateMetadataExtension.js +81 -0
- package/dist/handlers/domain/handleCreateDomain.d.ts +104 -0
- package/dist/handlers/domain/handleCreateDomain.d.ts.map +1 -0
- package/dist/handlers/domain/handleCreateDomain.js +187 -0
- package/dist/handlers/domain/handleGetDomain.d.ts +19 -0
- package/dist/handlers/domain/handleGetDomain.d.ts.map +1 -0
- package/dist/handlers/domain/handleGetDomain.js +138 -0
- package/dist/handlers/domain/handleUpdateDomain.d.ts +99 -0
- package/dist/handlers/domain/handleUpdateDomain.d.ts.map +1 -0
- package/dist/handlers/domain/handleUpdateDomain.js +204 -0
- package/dist/handlers/domain/readonly/handleGetDomain.d.ts +23 -0
- package/dist/handlers/domain/readonly/handleGetDomain.d.ts.map +1 -0
- package/dist/handlers/domain/readonly/handleGetDomain.js +138 -0
- package/dist/handlers/enhancement/handleGetEnhancementImpl.d.ts +69 -0
- package/dist/handlers/enhancement/handleGetEnhancementImpl.d.ts.map +1 -0
- package/dist/handlers/enhancement/handleGetEnhancementImpl.js +171 -0
- package/dist/handlers/enhancement/handleGetEnhancementSpot.d.ts +53 -0
- package/dist/handlers/enhancement/handleGetEnhancementSpot.d.ts.map +1 -0
- package/dist/handlers/enhancement/handleGetEnhancementSpot.js +153 -0
- package/dist/handlers/enhancement/handleGetEnhancements.d.ts +64 -0
- package/dist/handlers/enhancement/handleGetEnhancements.d.ts.map +1 -0
- package/dist/handlers/enhancement/handleGetEnhancements.js +599 -0
- package/dist/handlers/function/handleCheckFunctionModule.d.ts +59 -0
- package/dist/handlers/function/handleCheckFunctionModule.d.ts.map +1 -0
- package/dist/handlers/function/handleCheckFunctionModule.js +140 -0
- package/dist/handlers/function/handleCreateFunctionGroup.d.ts +52 -0
- package/dist/handlers/function/handleCreateFunctionGroup.d.ts.map +1 -0
- package/dist/handlers/function/handleCreateFunctionGroup.js +114 -0
- package/dist/handlers/function/handleCreateFunctionModule.d.ts +57 -0
- package/dist/handlers/function/handleCreateFunctionModule.d.ts.map +1 -0
- package/dist/handlers/function/handleCreateFunctionModule.js +137 -0
- package/dist/handlers/function/handleGetFunction.d.ts +17 -0
- package/dist/handlers/function/handleGetFunction.d.ts.map +1 -0
- package/dist/handlers/function/handleGetFunction.js +172 -0
- package/dist/handlers/function/handleGetFunctionGroup.d.ts +16 -0
- package/dist/handlers/function/handleGetFunctionGroup.d.ts.map +1 -0
- package/dist/handlers/function/handleGetFunctionGroup.js +132 -0
- package/dist/handlers/function/handleUpdateFunctionModuleSource.d.ts +54 -0
- package/dist/handlers/function/handleUpdateFunctionModuleSource.d.ts.map +1 -0
- package/dist/handlers/function/handleUpdateFunctionModuleSource.js +108 -0
- package/dist/handlers/function/handleValidateFunctionModule.d.ts +58 -0
- package/dist/handlers/function/handleValidateFunctionModule.d.ts.map +1 -0
- package/dist/handlers/function/handleValidateFunctionModule.js +132 -0
- package/dist/handlers/function/readonly/handleGetFunctionGroup.d.ts +16 -0
- package/dist/handlers/function/readonly/handleGetFunctionGroup.d.ts.map +1 -0
- package/dist/handlers/function/readonly/handleGetFunctionGroup.js +132 -0
- package/dist/handlers/include/handleGetInclude.d.ts +16 -0
- package/dist/handlers/include/handleGetInclude.d.ts.map +1 -0
- package/dist/handlers/include/handleGetInclude.js +81 -0
- package/dist/handlers/include/handleGetIncludesList.d.ts +36 -0
- package/dist/handlers/include/handleGetIncludesList.d.ts.map +1 -0
- package/dist/handlers/include/handleGetIncludesList.js +223 -0
- package/dist/handlers/interface/handleCreateInterface.d.ts +64 -0
- package/dist/handlers/interface/handleCreateInterface.d.ts.map +1 -0
- package/dist/handlers/interface/handleCreateInterface.js +175 -0
- package/dist/handlers/interface/handleGetInterface.d.ts +40 -0
- package/dist/handlers/interface/handleGetInterface.d.ts.map +1 -0
- package/dist/handlers/interface/handleGetInterface.js +134 -0
- package/dist/handlers/interface/handleUpdateInterfaceSource.d.ts +48 -0
- package/dist/handlers/interface/handleUpdateInterfaceSource.d.ts.map +1 -0
- package/dist/handlers/interface/handleUpdateInterfaceSource.js +127 -0
- package/dist/handlers/interface/readonly/handleGetInterface.d.ts +44 -0
- package/dist/handlers/interface/readonly/handleGetInterface.d.ts.map +1 -0
- package/dist/handlers/interface/readonly/handleGetInterface.js +134 -0
- package/dist/handlers/package/handleCreatePackage.d.ts +38 -0
- package/dist/handlers/package/handleCreatePackage.d.ts.map +1 -0
- package/dist/handlers/package/handleCreatePackage.js +127 -0
- package/dist/handlers/package/handleGetPackage.d.ts +16 -0
- package/dist/handlers/package/handleGetPackage.d.ts.map +1 -0
- package/dist/handlers/package/handleGetPackage.js +94 -0
- package/dist/handlers/package/readonly/handleGetPackage.d.ts +21 -0
- package/dist/handlers/package/readonly/handleGetPackage.d.ts.map +1 -0
- package/dist/handlers/package/readonly/handleGetPackage.js +94 -0
- package/dist/handlers/program/handleCreateProgram.d.ts +73 -0
- package/dist/handlers/program/handleCreateProgram.d.ts.map +1 -0
- package/dist/handlers/program/handleCreateProgram.js +220 -0
- package/dist/handlers/program/handleGetProgFullCode.d.ts +67 -0
- package/dist/handlers/program/handleGetProgFullCode.d.ts.map +1 -0
- package/dist/handlers/program/handleGetProgFullCode.js +249 -0
- package/dist/handlers/program/handleGetProgram.d.ts +16 -0
- package/dist/handlers/program/handleGetProgram.d.ts.map +1 -0
- package/dist/handlers/program/handleGetProgram.js +71 -0
- package/dist/handlers/program/handleUpdateProgramSource.d.ts +44 -0
- package/dist/handlers/program/handleUpdateProgramSource.d.ts.map +1 -0
- package/dist/handlers/program/handleUpdateProgramSource.js +121 -0
- package/dist/handlers/program/readonly/handleGetProgram.d.ts +20 -0
- package/dist/handlers/program/readonly/handleGetProgram.d.ts.map +1 -0
- package/dist/handlers/program/readonly/handleGetProgram.js +71 -0
- package/dist/handlers/search/handleGetObjectsByType.d.ts +42 -0
- package/dist/handlers/search/handleGetObjectsByType.d.ts.map +1 -0
- package/dist/handlers/search/handleGetObjectsByType.js +166 -0
- package/dist/handlers/search/handleGetObjectsList.d.ts +46 -0
- package/dist/handlers/search/handleGetObjectsList.d.ts.map +1 -0
- package/dist/handlers/search/handleGetObjectsList.js +145 -0
- package/dist/handlers/search/handleSearchObject.d.ts +28 -0
- package/dist/handlers/search/handleSearchObject.d.ts.map +1 -0
- package/dist/handlers/search/handleSearchObject.js +119 -0
- package/dist/handlers/service_definition/readonly/handleGetServiceDefinition.d.ts +17 -0
- package/dist/handlers/service_definition/readonly/handleGetServiceDefinition.d.ts.map +1 -0
- package/dist/handlers/service_definition/readonly/handleGetServiceDefinition.js +136 -0
- package/dist/handlers/structure/handleCreateStructure.d.ts +107 -0
- package/dist/handlers/structure/handleCreateStructure.d.ts.map +1 -0
- package/dist/handlers/structure/handleCreateStructure.js +184 -0
- package/dist/handlers/structure/handleGetStructure.d.ts +16 -0
- package/dist/handlers/structure/handleGetStructure.d.ts.map +1 -0
- package/dist/handlers/structure/handleGetStructure.js +139 -0
- package/dist/handlers/structure/readonly/handleGetStructure.d.ts +16 -0
- package/dist/handlers/structure/readonly/handleGetStructure.d.ts.map +1 -0
- package/dist/handlers/structure/readonly/handleGetStructure.js +139 -0
- package/dist/handlers/system/handleDescribeByList.d.ts +36 -0
- package/dist/handlers/system/handleDescribeByList.d.ts.map +1 -0
- package/dist/handlers/system/handleDescribeByList.js +121 -0
- package/dist/handlers/system/handleGetAbapAST.d.ts +26 -0
- package/dist/handlers/system/handleGetAbapAST.d.ts.map +1 -0
- package/dist/handlers/system/handleGetAbapAST.js +172 -0
- package/dist/handlers/system/handleGetAbapSemanticAnalysis.d.ts +26 -0
- package/dist/handlers/system/handleGetAbapSemanticAnalysis.d.ts.map +1 -0
- package/dist/handlers/system/handleGetAbapSemanticAnalysis.js +353 -0
- package/dist/handlers/system/handleGetAbapSystemSymbols.d.ts +26 -0
- package/dist/handlers/system/handleGetAbapSystemSymbols.d.ts.map +1 -0
- package/dist/handlers/system/handleGetAbapSystemSymbols.js +574 -0
- package/dist/handlers/system/handleGetAllTypes.d.ts +22 -0
- package/dist/handlers/system/handleGetAllTypes.d.ts.map +1 -0
- package/dist/handlers/system/handleGetAllTypes.js +102 -0
- package/dist/handlers/system/handleGetInactiveObjects.d.ts +20 -0
- package/dist/handlers/system/handleGetInactiveObjects.d.ts.map +1 -0
- package/dist/handlers/system/handleGetInactiveObjects.js +41 -0
- package/dist/handlers/system/handleGetObjectInfo.d.ts +41 -0
- package/dist/handlers/system/handleGetObjectInfo.d.ts.map +1 -0
- package/dist/handlers/system/handleGetObjectInfo.js +210 -0
- package/dist/handlers/system/handleGetObjectNodeFromCache.d.ts +40 -0
- package/dist/handlers/system/handleGetObjectNodeFromCache.d.ts.map +1 -0
- package/dist/handlers/system/handleGetObjectNodeFromCache.js +70 -0
- package/dist/handlers/system/handleGetObjectStructure.d.ts +26 -0
- package/dist/handlers/system/handleGetObjectStructure.d.ts.map +1 -0
- package/dist/handlers/system/handleGetObjectStructure.js +103 -0
- package/dist/handlers/system/handleGetSession.d.ts +33 -0
- package/dist/handlers/system/handleGetSession.d.ts.map +1 -0
- package/dist/handlers/system/handleGetSession.js +63 -0
- package/dist/handlers/system/handleGetSqlQuery.d.ts +49 -0
- package/dist/handlers/system/handleGetSqlQuery.d.ts.map +1 -0
- package/dist/handlers/system/handleGetSqlQuery.js +176 -0
- package/dist/handlers/system/handleGetTransaction.d.ts +42 -0
- package/dist/handlers/system/handleGetTransaction.d.ts.map +1 -0
- package/dist/handlers/system/handleGetTransaction.js +91 -0
- package/dist/handlers/system/handleGetTypeInfo.d.ts +69 -0
- package/dist/handlers/system/handleGetTypeInfo.d.ts.map +1 -0
- package/dist/handlers/system/handleGetTypeInfo.js +169 -0
- package/dist/handlers/system/handleGetWhereUsed.d.ts +69 -0
- package/dist/handlers/system/handleGetWhereUsed.d.ts.map +1 -0
- package/dist/handlers/system/handleGetWhereUsed.js +405 -0
- package/dist/handlers/table/handleCheckTable.d.ts +55 -0
- package/dist/handlers/table/handleCheckTable.d.ts.map +1 -0
- package/dist/handlers/table/handleCheckTable.js +138 -0
- package/dist/handlers/table/handleCreateTable.d.ts +42 -0
- package/dist/handlers/table/handleCreateTable.d.ts.map +1 -0
- package/dist/handlers/table/handleCreateTable.js +118 -0
- package/dist/handlers/table/handleGetTable.d.ts +16 -0
- package/dist/handlers/table/handleGetTable.d.ts.map +1 -0
- package/dist/handlers/table/handleGetTable.js +140 -0
- package/dist/handlers/table/handleGetTableContents.d.ts +56 -0
- package/dist/handlers/table/handleGetTableContents.d.ts.map +1 -0
- package/dist/handlers/table/handleGetTableContents.js +387 -0
- package/dist/handlers/table/handleValidateTable.d.ts +53 -0
- package/dist/handlers/table/handleValidateTable.d.ts.map +1 -0
- package/dist/handlers/table/handleValidateTable.js +125 -0
- package/dist/handlers/table/readonly/handleGetTable.d.ts +20 -0
- package/dist/handlers/table/readonly/handleGetTable.d.ts.map +1 -0
- package/dist/handlers/table/readonly/handleGetTable.js +140 -0
- package/dist/handlers/transport/handleCreateTransport.d.ts +50 -0
- package/dist/handlers/transport/handleCreateTransport.d.ts.map +1 -0
- package/dist/handlers/transport/handleCreateTransport.js +151 -0
- package/dist/handlers/transport/handleGetTransport.d.ts +44 -0
- package/dist/handlers/transport/handleGetTransport.d.ts.map +1 -0
- package/dist/handlers/transport/handleGetTransport.js +183 -0
- package/dist/handlers/view/handleCreateView.d.ts +52 -0
- package/dist/handlers/view/handleCreateView.d.ts.map +1 -0
- package/dist/handlers/view/handleCreateView.js +139 -0
- package/dist/handlers/view/handleGetView.d.ts +26 -0
- package/dist/handlers/view/handleGetView.d.ts.map +1 -0
- package/dist/handlers/view/handleGetView.js +349 -0
- package/dist/handlers/view/handleUpdateViewSource.d.ts +44 -0
- package/dist/handlers/view/handleUpdateViewSource.d.ts.map +1 -0
- package/dist/handlers/view/handleUpdateViewSource.js +136 -0
- package/dist/handlers/view/readonly/handleGetView.d.ts +26 -0
- package/dist/handlers/view/readonly/handleGetView.d.ts.map +1 -0
- package/dist/handlers/view/readonly/handleGetView.js +349 -0
- package/dist/index.d.ts +94 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2453 -0
- package/dist/lib/activationUtils.d.ts +59 -0
- package/dist/lib/activationUtils.d.ts.map +1 -0
- package/dist/lib/activationUtils.js +168 -0
- package/dist/lib/config/ArgumentsParser.d.ts +2 -0
- package/dist/lib/config/ArgumentsParser.d.ts.map +1 -1
- package/dist/lib/config/ArgumentsParser.js +11 -1
- package/dist/lib/config/ArgumentsParser.js.map +1 -1
- package/dist/lib/config/IServerConfig.d.ts +2 -0
- package/dist/lib/config/IServerConfig.d.ts.map +1 -1
- package/dist/lib/config/ServerConfigManager.d.ts.map +1 -1
- package/dist/lib/config/ServerConfigManager.js +3 -0
- package/dist/lib/config/ServerConfigManager.js.map +1 -1
- package/dist/lib/getFullCodeCache.d.ts +3 -0
- package/dist/lib/getFullCodeCache.d.ts.map +1 -0
- package/dist/lib/getFullCodeCache.js +56 -0
- package/dist/lib/toolsRegistry.d.ts +13 -0
- package/dist/lib/toolsRegistry.d.ts.map +1 -0
- package/dist/lib/toolsRegistry.js +410 -0
- package/dist/server/AuthBrokerConfig.d.ts.map +1 -1
- package/dist/server/AuthBrokerConfig.js +14 -9
- package/dist/server/AuthBrokerConfig.js.map +1 -1
- package/dist/server/BaseMcpServer.d.ts.map +1 -1
- package/dist/server/BaseMcpServer.js +6 -0
- package/dist/server/BaseMcpServer.js.map +1 -1
- package/dist/server/launcher.js +4 -4
- package/dist/server/launcher.js.map +1 -1
- package/dist/utils/lockStateManager.d.ts +64 -0
- package/dist/utils/lockStateManager.d.ts.map +1 -0
- package/dist/utils/lockStateManager.js +173 -0
- package/dist/utils/lockStateManager.js.map +1 -0
- package/docs/user-guide/AUTHENTICATION.md +7 -0
- package/docs/user-guide/CLI_OPTIONS.md +14 -0
- package/package.json +2 -1
- package/dist/handlers/service_binding/high/handleListServiceBindings.d.ts +0 -44
- package/dist/handlers/service_binding/high/handleListServiceBindings.d.ts.map +0 -1
- package/dist/handlers/service_binding/high/handleListServiceBindings.js +0 -211
- package/dist/handlers/service_binding/high/handleListServiceBindings.js.map +0 -1
- package/dist/handlers/service_binding/high/serviceBindingXmlBuilder.d.ts +0 -11
- package/dist/handlers/service_binding/high/serviceBindingXmlBuilder.d.ts.map +0 -1
- package/dist/handlers/service_binding/high/serviceBindingXmlBuilder.js +0 -27
- package/dist/handlers/service_binding/high/serviceBindingXmlBuilder.js.map +0 -1
- package/dist/handlers/system/readonly/handleRuntimeGetDumpByUri.d.ts +0 -27
- package/dist/handlers/system/readonly/handleRuntimeGetDumpByUri.d.ts.map +0 -1
- package/dist/handlers/system/readonly/handleRuntimeGetDumpByUri.js +0 -47
- package/dist/handlers/system/readonly/handleRuntimeGetDumpByUri.js.map +0 -1
- package/dist/handlers/system/readonly/runtimeDumpReadCompat.d.ts +0 -8
- package/dist/handlers/system/readonly/runtimeDumpReadCompat.d.ts.map +0 -1
- package/dist/handlers/system/readonly/runtimeDumpReadCompat.js +0 -55
- package/dist/handlers/system/readonly/runtimeDumpReadCompat.js.map +0 -1
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.TOOL_DEFINITION = void 0;
|
|
37
|
+
exports.handleGetTable = handleGetTable;
|
|
38
|
+
const utils_1 = require("../../../lib/utils");
|
|
39
|
+
const adt_clients_1 = require("@mcp-abap-adt/adt-clients");
|
|
40
|
+
const fast_xml_parser_1 = require("fast-xml-parser");
|
|
41
|
+
const writeResultToFile_1 = require("../../../lib/writeResultToFile");
|
|
42
|
+
const z = __importStar(require("zod"));
|
|
43
|
+
exports.TOOL_DEFINITION = {
|
|
44
|
+
name: "GetTable",
|
|
45
|
+
description: "[read-only] Retrieve ABAP table structure.",
|
|
46
|
+
inputSchema: {
|
|
47
|
+
table_name: z.string().describe("Name of the ABAP table")
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
function parseTableXml(xml) {
|
|
51
|
+
const parser = new fast_xml_parser_1.XMLParser({
|
|
52
|
+
ignoreAttributes: false,
|
|
53
|
+
attributeNamePrefix: '',
|
|
54
|
+
parseAttributeValue: true,
|
|
55
|
+
trimValues: true
|
|
56
|
+
});
|
|
57
|
+
const result = parser.parse(xml);
|
|
58
|
+
// DDIC Table (TABL/DT)
|
|
59
|
+
if (result['ddic:table']) {
|
|
60
|
+
const t = result['ddic:table'];
|
|
61
|
+
const fields = Array.isArray(t['ddic:fields']?.['ddic:field'])
|
|
62
|
+
? t['ddic:fields']['ddic:field']
|
|
63
|
+
: t['ddic:fields']?.['ddic:field']
|
|
64
|
+
? [t['ddic:fields']['ddic:field']]
|
|
65
|
+
: [];
|
|
66
|
+
return {
|
|
67
|
+
name: t['adtcore:name'],
|
|
68
|
+
objectType: 'table',
|
|
69
|
+
description: t['adtcore:description'],
|
|
70
|
+
package: t['adtcore:packageRef']?.['adtcore:name'] || null,
|
|
71
|
+
fields: fields.map(f => ({
|
|
72
|
+
name: f['ddic:name'],
|
|
73
|
+
dataType: f['ddic:dataType'],
|
|
74
|
+
length: parseInt(f['ddic:length'], 10),
|
|
75
|
+
decimals: parseInt(f['ddic:decimals'] || '0', 10),
|
|
76
|
+
key: f['ddic:keyFlag'] === 'true',
|
|
77
|
+
description: f['ddic:description']
|
|
78
|
+
}))
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
// fallback: return raw
|
|
82
|
+
return { raw: result };
|
|
83
|
+
}
|
|
84
|
+
async function handleGetTable(args) {
|
|
85
|
+
try {
|
|
86
|
+
if (!args?.table_name) {
|
|
87
|
+
throw new utils_1.McpError(utils_1.ErrorCode.InvalidParams, 'Table name is required');
|
|
88
|
+
}
|
|
89
|
+
const connection = (0, utils_1.getManagedConnection)();
|
|
90
|
+
const client = new adt_clients_1.CrudClient(connection);
|
|
91
|
+
await client.readTable(args.table_name);
|
|
92
|
+
const response = client.getReadResult();
|
|
93
|
+
if (!response) {
|
|
94
|
+
throw new utils_1.McpError(utils_1.ErrorCode.InternalError, 'Failed to read table');
|
|
95
|
+
}
|
|
96
|
+
// Parse XML responses; fall back to returning the payload as-is
|
|
97
|
+
if (typeof response.data === 'string' && response.data.trim().startsWith('<?xml')) {
|
|
98
|
+
const resultObj = parseTableXml(response.data);
|
|
99
|
+
const result = {
|
|
100
|
+
isError: false,
|
|
101
|
+
content: [
|
|
102
|
+
{
|
|
103
|
+
type: "text",
|
|
104
|
+
text: JSON.stringify(resultObj, null, 2)
|
|
105
|
+
}
|
|
106
|
+
]
|
|
107
|
+
};
|
|
108
|
+
if (args.filePath) {
|
|
109
|
+
(0, writeResultToFile_1.writeResultToFile)(JSON.stringify(result, null, 2), args.filePath);
|
|
110
|
+
}
|
|
111
|
+
return result;
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
const plainResult = {
|
|
115
|
+
isError: false,
|
|
116
|
+
content: [
|
|
117
|
+
{
|
|
118
|
+
type: "text",
|
|
119
|
+
text: response.data
|
|
120
|
+
}
|
|
121
|
+
]
|
|
122
|
+
};
|
|
123
|
+
if (args.filePath) {
|
|
124
|
+
(0, writeResultToFile_1.writeResultToFile)(response.data, args.filePath);
|
|
125
|
+
}
|
|
126
|
+
return plainResult;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
catch (error) {
|
|
130
|
+
return {
|
|
131
|
+
isError: true,
|
|
132
|
+
content: [
|
|
133
|
+
{
|
|
134
|
+
type: "text",
|
|
135
|
+
text: error instanceof Error ? error.message : String(error)
|
|
136
|
+
}
|
|
137
|
+
]
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CreateTransport Handler - Create new ABAP transport request via ADT API
|
|
3
|
+
*
|
|
4
|
+
* Uses TransportBuilder from @mcp-abap-adt/adt-clients for all operations.
|
|
5
|
+
* Session and lock management handled internally by builder.
|
|
6
|
+
*
|
|
7
|
+
* Workflow: create
|
|
8
|
+
*/
|
|
9
|
+
export declare const TOOL_DEFINITION: {
|
|
10
|
+
readonly name: "CreateTransport";
|
|
11
|
+
readonly description: "Create a new ABAP transport request in SAP system for development objects.";
|
|
12
|
+
readonly inputSchema: {
|
|
13
|
+
readonly type: "object";
|
|
14
|
+
readonly properties: {
|
|
15
|
+
readonly transport_type: {
|
|
16
|
+
readonly type: "string";
|
|
17
|
+
readonly description: "Transport type: 'workbench' (cross-client) or 'customizing' (client-specific)";
|
|
18
|
+
readonly enum: readonly ["workbench", "customizing"];
|
|
19
|
+
readonly default: "workbench";
|
|
20
|
+
};
|
|
21
|
+
readonly description: {
|
|
22
|
+
readonly type: "string";
|
|
23
|
+
readonly description: "Transport request description (mandatory)";
|
|
24
|
+
};
|
|
25
|
+
readonly target_system: {
|
|
26
|
+
readonly type: "string";
|
|
27
|
+
readonly description: "Target system for transport (optional, e.g., 'PRD', 'QAS'). If not provided or empty, uses 'LOCAL'";
|
|
28
|
+
};
|
|
29
|
+
readonly owner: {
|
|
30
|
+
readonly type: "string";
|
|
31
|
+
readonly description: "Transport owner (optional, defaults to current user)";
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
readonly required: readonly ["description"];
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Main handler for CreateTransport MCP tool
|
|
39
|
+
*
|
|
40
|
+
* Uses TransportBuilder from @mcp-abap-adt/adt-clients for all operations
|
|
41
|
+
* Session and lock management handled internally by builder
|
|
42
|
+
*/
|
|
43
|
+
export declare function handleCreateTransport(args: any): Promise<{
|
|
44
|
+
isError: boolean;
|
|
45
|
+
content: {
|
|
46
|
+
type: string;
|
|
47
|
+
text: any;
|
|
48
|
+
}[];
|
|
49
|
+
}>;
|
|
50
|
+
//# sourceMappingURL=handleCreateTransport.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handleCreateTransport.d.ts","sourceRoot":"","sources":["../../../src/handlers/transport/handleCreateTransport.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2BlB,CAAC;AAUX;;;;;GAKG;AACH,wBAAsB,qBAAqB,CAAC,IAAI,EAAE,GAAG;;;;;;GAqHpD"}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* CreateTransport Handler - Create new ABAP transport request via ADT API
|
|
4
|
+
*
|
|
5
|
+
* Uses TransportBuilder from @mcp-abap-adt/adt-clients for all operations.
|
|
6
|
+
* Session and lock management handled internally by builder.
|
|
7
|
+
*
|
|
8
|
+
* Workflow: create
|
|
9
|
+
*/
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
exports.TOOL_DEFINITION = void 0;
|
|
12
|
+
exports.handleCreateTransport = handleCreateTransport;
|
|
13
|
+
const utils_1 = require("../../lib/utils");
|
|
14
|
+
const utils_2 = require("../../lib/utils");
|
|
15
|
+
const adt_clients_1 = require("@mcp-abap-adt/adt-clients");
|
|
16
|
+
exports.TOOL_DEFINITION = {
|
|
17
|
+
name: "CreateTransport",
|
|
18
|
+
description: "Create a new ABAP transport request in SAP system for development objects.",
|
|
19
|
+
inputSchema: {
|
|
20
|
+
type: "object",
|
|
21
|
+
properties: {
|
|
22
|
+
transport_type: {
|
|
23
|
+
type: "string",
|
|
24
|
+
description: "Transport type: 'workbench' (cross-client) or 'customizing' (client-specific)",
|
|
25
|
+
enum: ["workbench", "customizing"],
|
|
26
|
+
default: "workbench"
|
|
27
|
+
},
|
|
28
|
+
description: {
|
|
29
|
+
type: "string",
|
|
30
|
+
description: "Transport request description (mandatory)"
|
|
31
|
+
},
|
|
32
|
+
target_system: {
|
|
33
|
+
type: "string",
|
|
34
|
+
description: "Target system for transport (optional, e.g., 'PRD', 'QAS'). If not provided or empty, uses 'LOCAL'"
|
|
35
|
+
},
|
|
36
|
+
owner: {
|
|
37
|
+
type: "string",
|
|
38
|
+
description: "Transport owner (optional, defaults to current user)"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
required: ["description"]
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Main handler for CreateTransport MCP tool
|
|
46
|
+
*
|
|
47
|
+
* Uses TransportBuilder from @mcp-abap-adt/adt-clients for all operations
|
|
48
|
+
* Session and lock management handled internally by builder
|
|
49
|
+
*/
|
|
50
|
+
async function handleCreateTransport(args) {
|
|
51
|
+
try {
|
|
52
|
+
// Validate required parameters
|
|
53
|
+
if (!args?.description) {
|
|
54
|
+
throw new utils_1.McpError(utils_1.ErrorCode.InvalidParams, 'Transport description is required');
|
|
55
|
+
}
|
|
56
|
+
const typedArgs = args;
|
|
57
|
+
const connection = (0, utils_2.getManagedConnection)();
|
|
58
|
+
utils_2.logger.info(`Starting transport creation: ${typedArgs.description}`);
|
|
59
|
+
try {
|
|
60
|
+
// Create client
|
|
61
|
+
const client = new adt_clients_1.CrudClient(connection);
|
|
62
|
+
// Create transport
|
|
63
|
+
await client.createTransport(typedArgs.description, typedArgs.transport_type === 'customizing' ? 'customizing' : 'workbench');
|
|
64
|
+
// Get create result
|
|
65
|
+
const createResult = client.getCreateResult();
|
|
66
|
+
utils_2.logger.info(`✅ CreateTransport completed successfully`);
|
|
67
|
+
// Parse response data if available
|
|
68
|
+
let transportInfo = {};
|
|
69
|
+
let transportNumber;
|
|
70
|
+
let taskNumber;
|
|
71
|
+
if (createResult?.data) {
|
|
72
|
+
if (typeof createResult.data === 'string') {
|
|
73
|
+
// If data is XML string, try to parse it
|
|
74
|
+
try {
|
|
75
|
+
const { XMLParser } = require('fast-xml-parser');
|
|
76
|
+
const parser = new XMLParser({
|
|
77
|
+
ignoreAttributes: false,
|
|
78
|
+
attributeNamePrefix: '',
|
|
79
|
+
parseAttributeValue: true,
|
|
80
|
+
});
|
|
81
|
+
const result = parser.parse(createResult.data);
|
|
82
|
+
const root = result['tm:root'] || result['root'];
|
|
83
|
+
const request = root?.['tm:request'] || {};
|
|
84
|
+
const task = request?.['tm:task'] || {};
|
|
85
|
+
transportInfo = {
|
|
86
|
+
transport_number: request['tm:number'] || transportNumber,
|
|
87
|
+
description: request['tm:desc'] || request['tm:description'] || typedArgs.description,
|
|
88
|
+
type: request['tm:type'],
|
|
89
|
+
target_system: request['tm:target'],
|
|
90
|
+
target_desc: request['tm:target_desc'],
|
|
91
|
+
cts_project: request['tm:cts_project'],
|
|
92
|
+
uri: request['tm:uri'],
|
|
93
|
+
owner: task['tm:owner'] || request['tm:owner'] || typedArgs.owner
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
catch (parseError) {
|
|
97
|
+
// If parsing fails, use basic info
|
|
98
|
+
transportInfo = {
|
|
99
|
+
transport_number: transportNumber,
|
|
100
|
+
description: typedArgs.description,
|
|
101
|
+
type: typedArgs.transport_type === 'customizing' ? 'T' : 'K',
|
|
102
|
+
owner: typedArgs.owner
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
else if (typeof createResult.data === 'object') {
|
|
107
|
+
transportInfo = createResult.data;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
// Use builder state if response parsing didn't provide transport number
|
|
111
|
+
if (!transportInfo.transport_number && transportNumber) {
|
|
112
|
+
transportInfo.transport_number = transportNumber;
|
|
113
|
+
}
|
|
114
|
+
if (!transportInfo.task_number && taskNumber) {
|
|
115
|
+
transportInfo.task_number = taskNumber;
|
|
116
|
+
}
|
|
117
|
+
return (0, utils_2.return_response)({
|
|
118
|
+
data: JSON.stringify({
|
|
119
|
+
success: true,
|
|
120
|
+
transport_request: transportInfo.transport_number || transportNumber,
|
|
121
|
+
task_number: transportInfo.task_number || taskNumber,
|
|
122
|
+
description: transportInfo.description || typedArgs.description,
|
|
123
|
+
type: transportInfo.type || (typedArgs.transport_type === 'customizing' ? 'T' : 'K'),
|
|
124
|
+
target_system: transportInfo.target_system || typedArgs.target_system || 'LOCAL',
|
|
125
|
+
target_desc: transportInfo.target_desc,
|
|
126
|
+
cts_project: transportInfo.cts_project,
|
|
127
|
+
owner: transportInfo.owner || typedArgs.owner,
|
|
128
|
+
uri: transportInfo.uri,
|
|
129
|
+
message: `Transport request ${transportInfo.transport_number || transportNumber || 'unknown'} created successfully`
|
|
130
|
+
}, null, 2),
|
|
131
|
+
status: createResult?.status || 200,
|
|
132
|
+
statusText: createResult?.statusText || 'OK',
|
|
133
|
+
headers: createResult?.headers || {},
|
|
134
|
+
config: createResult?.config || {}
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
catch (error) {
|
|
138
|
+
utils_2.logger.error(`Error creating transport:`, error);
|
|
139
|
+
const errorMessage = error.response?.data
|
|
140
|
+
? (typeof error.response.data === 'string' ? error.response.data : JSON.stringify(error.response.data))
|
|
141
|
+
: error.message || String(error);
|
|
142
|
+
throw new utils_1.McpError(utils_1.ErrorCode.InternalError, `Failed to create transport: ${errorMessage}`);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
catch (error) {
|
|
146
|
+
if (error instanceof utils_1.McpError) {
|
|
147
|
+
throw error;
|
|
148
|
+
}
|
|
149
|
+
return (0, utils_2.return_error)(error);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GetTransport Handler - Retrieve ABAP transport request information via ADT API
|
|
3
|
+
*
|
|
4
|
+
* Retrieves transport request details including:
|
|
5
|
+
* - Transport metadata (number, description, type, status)
|
|
6
|
+
* - Owner and target system information
|
|
7
|
+
* - Included objects and tasks
|
|
8
|
+
* - Change history
|
|
9
|
+
*/
|
|
10
|
+
export declare const TOOL_DEFINITION: {
|
|
11
|
+
readonly name: "GetTransport";
|
|
12
|
+
readonly description: "Retrieve ABAP transport request information including metadata, included objects, and status from SAP system.";
|
|
13
|
+
readonly inputSchema: {
|
|
14
|
+
readonly type: "object";
|
|
15
|
+
readonly properties: {
|
|
16
|
+
readonly transport_number: {
|
|
17
|
+
readonly type: "string";
|
|
18
|
+
readonly description: "Transport request number (e.g., E19K905635, DEVK905123)";
|
|
19
|
+
};
|
|
20
|
+
readonly include_objects: {
|
|
21
|
+
readonly type: "boolean";
|
|
22
|
+
readonly description: "Include list of objects in transport (default: true)";
|
|
23
|
+
readonly default: true;
|
|
24
|
+
};
|
|
25
|
+
readonly include_tasks: {
|
|
26
|
+
readonly type: "boolean";
|
|
27
|
+
readonly description: "Include list of tasks in transport (default: true)";
|
|
28
|
+
readonly default: true;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
readonly required: readonly ["transport_number"];
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Main handler for GetTransport MCP tool
|
|
36
|
+
*/
|
|
37
|
+
export declare function handleGetTransport(args: any): Promise<{
|
|
38
|
+
isError: boolean;
|
|
39
|
+
content: {
|
|
40
|
+
type: string;
|
|
41
|
+
text: any;
|
|
42
|
+
}[];
|
|
43
|
+
}>;
|
|
44
|
+
//# sourceMappingURL=handleGetTransport.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handleGetTransport.d.ts","sourceRoot":"","sources":["../../../src/handlers/transport/handleGetTransport.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAMH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;CAuBlB,CAAC;AAyGX;;GAEG;AACH,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,GAAG;;;;;;GA0DjD"}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* GetTransport Handler - Retrieve ABAP transport request information via ADT API
|
|
4
|
+
*
|
|
5
|
+
* Retrieves transport request details including:
|
|
6
|
+
* - Transport metadata (number, description, type, status)
|
|
7
|
+
* - Owner and target system information
|
|
8
|
+
* - Included objects and tasks
|
|
9
|
+
* - Change history
|
|
10
|
+
*/
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.TOOL_DEFINITION = void 0;
|
|
13
|
+
exports.handleGetTransport = handleGetTransport;
|
|
14
|
+
const utils_1 = require("../../lib/utils");
|
|
15
|
+
const utils_2 = require("../../lib/utils");
|
|
16
|
+
const fast_xml_parser_1 = require("fast-xml-parser");
|
|
17
|
+
exports.TOOL_DEFINITION = {
|
|
18
|
+
name: "GetTransport",
|
|
19
|
+
description: "Retrieve ABAP transport request information including metadata, included objects, and status from SAP system.",
|
|
20
|
+
inputSchema: {
|
|
21
|
+
type: "object",
|
|
22
|
+
properties: {
|
|
23
|
+
transport_number: {
|
|
24
|
+
type: "string",
|
|
25
|
+
description: "Transport request number (e.g., E19K905635, DEVK905123)"
|
|
26
|
+
},
|
|
27
|
+
include_objects: {
|
|
28
|
+
type: "boolean",
|
|
29
|
+
description: "Include list of objects in transport (default: true)",
|
|
30
|
+
default: true
|
|
31
|
+
},
|
|
32
|
+
include_tasks: {
|
|
33
|
+
type: "boolean",
|
|
34
|
+
description: "Include list of tasks in transport (default: true)",
|
|
35
|
+
default: true
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
required: ["transport_number"]
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Parse transport request XML response
|
|
43
|
+
*/
|
|
44
|
+
function parseTransportXml(xmlData, includeObjects = true, includeTasks = true) {
|
|
45
|
+
const parser = new fast_xml_parser_1.XMLParser({
|
|
46
|
+
ignoreAttributes: false,
|
|
47
|
+
attributeNamePrefix: '',
|
|
48
|
+
textNodeName: '_text',
|
|
49
|
+
parseAttributeValue: true,
|
|
50
|
+
isArray: (name, jpath, isLeafNode, isAttribute) => {
|
|
51
|
+
// Arrays for multiple objects/tasks
|
|
52
|
+
return ['tm:object', 'tm:task', 'object', 'task'].includes(name);
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
const result = parser.parse(xmlData);
|
|
56
|
+
const root = result['tm:root'] || result['root'];
|
|
57
|
+
if (!root) {
|
|
58
|
+
throw new utils_1.McpError(utils_1.ErrorCode.InternalError, 'Invalid transport XML structure - no tm:root found');
|
|
59
|
+
}
|
|
60
|
+
// Get detailed transport info from tm:request inside tm:root
|
|
61
|
+
const request = root['tm:request'] || {};
|
|
62
|
+
// Extract basic transport information from both root attributes and request details
|
|
63
|
+
const transportInfo = {
|
|
64
|
+
number: root['adtcore:name'] || request['tm:number'] || root['name'],
|
|
65
|
+
description: request['tm:desc'] || request['description'] || root['tm:description'],
|
|
66
|
+
type: request['tm:type'] || root['tm:object_type'] || root['type'],
|
|
67
|
+
status: request['tm:status'] || root['tm:status'],
|
|
68
|
+
status_text: request['tm:status_text'],
|
|
69
|
+
owner: request['tm:owner'] || root['tm:owner'],
|
|
70
|
+
target_system: request['tm:target'] || root['tm:target'],
|
|
71
|
+
target_desc: request['tm:target_desc'],
|
|
72
|
+
created_at: root['adtcore:createdAt'] || request['tm:createdAt'] || root['createdAt'],
|
|
73
|
+
created_by: root['adtcore:createdBy'] || request['tm:createdBy'] || root['createdBy'],
|
|
74
|
+
changed_at: root['adtcore:changedAt'] || request['tm:changedAt'] || root['changedAt'],
|
|
75
|
+
changed_by: root['adtcore:changedBy'] || request['tm:changedBy'] || root['changedBy'],
|
|
76
|
+
release_date: request['tm:releaseDate'] || root['releaseDate'],
|
|
77
|
+
client: request['tm:source_client'] || root['tm:client'],
|
|
78
|
+
cts_project: request['tm:cts_project'],
|
|
79
|
+
cts_project_desc: request['tm:cts_project_desc']
|
|
80
|
+
};
|
|
81
|
+
// Extract objects if requested
|
|
82
|
+
let objects = [];
|
|
83
|
+
if (includeObjects && request['tm:all_objects']) {
|
|
84
|
+
const objectList = request['tm:all_objects']['tm:abap_object'] || [];
|
|
85
|
+
objects = Array.isArray(objectList) ? objectList : [objectList];
|
|
86
|
+
objects = objects.map(obj => ({
|
|
87
|
+
name: obj['tm:name'],
|
|
88
|
+
type: obj['tm:type'],
|
|
89
|
+
wbtype: obj['tm:wbtype'],
|
|
90
|
+
pgmid: obj['tm:pgmid'],
|
|
91
|
+
description: obj['tm:obj_desc'],
|
|
92
|
+
position: obj['tm:position'],
|
|
93
|
+
lock_status: obj['tm:lock_status'],
|
|
94
|
+
info: obj['tm:obj_info']
|
|
95
|
+
}));
|
|
96
|
+
}
|
|
97
|
+
// Extract tasks if requested
|
|
98
|
+
let tasks = [];
|
|
99
|
+
if (includeTasks && request['tm:task']) {
|
|
100
|
+
const taskList = Array.isArray(request['tm:task']) ? request['tm:task'] : [request['tm:task']];
|
|
101
|
+
tasks = taskList.map(task => ({
|
|
102
|
+
number: task['tm:number'],
|
|
103
|
+
parent: task['tm:parent'],
|
|
104
|
+
description: task['tm:desc'],
|
|
105
|
+
type: task['tm:type'],
|
|
106
|
+
status: task['tm:status'],
|
|
107
|
+
status_text: task['tm:status_text'],
|
|
108
|
+
owner: task['tm:owner'],
|
|
109
|
+
target: task['tm:target'],
|
|
110
|
+
target_desc: task['tm:target_desc'],
|
|
111
|
+
client: task['tm:source_client'],
|
|
112
|
+
created_at: task['tm:lastchanged_timestamp'],
|
|
113
|
+
objects: task['tm:abap_object'] ? (Array.isArray(task['tm:abap_object']) ? task['tm:abap_object'] : [task['tm:abap_object']]).map(obj => ({
|
|
114
|
+
name: obj['tm:name'],
|
|
115
|
+
type: obj['tm:type'],
|
|
116
|
+
wbtype: obj['tm:wbtype'],
|
|
117
|
+
description: obj['tm:obj_desc'],
|
|
118
|
+
position: obj['tm:position']
|
|
119
|
+
})) : []
|
|
120
|
+
}));
|
|
121
|
+
}
|
|
122
|
+
return {
|
|
123
|
+
transport: transportInfo,
|
|
124
|
+
objects: includeObjects ? objects : undefined,
|
|
125
|
+
tasks: includeTasks ? tasks : undefined,
|
|
126
|
+
object_count: objects.length,
|
|
127
|
+
task_count: tasks.length
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Main handler for GetTransport MCP tool
|
|
132
|
+
*/
|
|
133
|
+
async function handleGetTransport(args) {
|
|
134
|
+
try {
|
|
135
|
+
// Validate required parameters
|
|
136
|
+
if (!args?.transport_number) {
|
|
137
|
+
throw new utils_1.McpError(utils_1.ErrorCode.InvalidParams, 'Transport number is required');
|
|
138
|
+
}
|
|
139
|
+
const typedArgs = args;
|
|
140
|
+
const includeObjects = typedArgs.include_objects !== false;
|
|
141
|
+
const includeTasks = typedArgs.include_tasks !== false;
|
|
142
|
+
console.log(`[DEBUG] GetTransport: ${typedArgs.transport_number}`);
|
|
143
|
+
console.log(`[DEBUG] Include objects: ${includeObjects}, Include tasks: ${includeTasks}`);
|
|
144
|
+
const baseUrl = await (0, utils_2.getBaseUrl)();
|
|
145
|
+
let url = `${baseUrl}/sap/bc/adt/cts/transportrequests/${typedArgs.transport_number}`;
|
|
146
|
+
// Add query parameters for additional information
|
|
147
|
+
const params = [];
|
|
148
|
+
if (includeObjects)
|
|
149
|
+
params.push('includeObjects=true');
|
|
150
|
+
if (includeTasks)
|
|
151
|
+
params.push('includeTasks=true');
|
|
152
|
+
if (params.length > 0) {
|
|
153
|
+
url += `?${params.join('&')}`;
|
|
154
|
+
}
|
|
155
|
+
const headers = {
|
|
156
|
+
'Accept': 'application/vnd.sap.adt.transportorganizer.v1+xml'
|
|
157
|
+
};
|
|
158
|
+
console.log(`[DEBUG] GET from: ${url}`);
|
|
159
|
+
// Get transport request
|
|
160
|
+
const response = await (0, utils_2.makeAdtRequestWithTimeout)(url, 'GET', 'default', null, undefined, headers);
|
|
161
|
+
console.log('[DEBUG] GetTransport response status:', response.status);
|
|
162
|
+
// Parse XML response
|
|
163
|
+
const transportData = parseTransportXml(response.data, includeObjects, includeTasks);
|
|
164
|
+
return (0, utils_2.return_response)({
|
|
165
|
+
data: JSON.stringify({
|
|
166
|
+
success: true,
|
|
167
|
+
transport_number: typedArgs.transport_number,
|
|
168
|
+
...transportData,
|
|
169
|
+
message: `Transport ${typedArgs.transport_number} retrieved successfully`
|
|
170
|
+
}, null, 2),
|
|
171
|
+
status: response.status,
|
|
172
|
+
statusText: response.statusText,
|
|
173
|
+
headers: response.headers,
|
|
174
|
+
config: response.config
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
catch (error) {
|
|
178
|
+
if (error instanceof utils_1.McpError) {
|
|
179
|
+
throw error;
|
|
180
|
+
}
|
|
181
|
+
return (0, utils_2.return_error)(error);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CreateView Handler - CDS/Classic View Creation via ADT API
|
|
3
|
+
*
|
|
4
|
+
* Uses ViewBuilder from @mcp-abap-adt/adt-clients for all operations.
|
|
5
|
+
* Session and lock management handled internally by builder.
|
|
6
|
+
*
|
|
7
|
+
* Workflow: validate -> create -> lock -> update -> check -> unlock -> (activate)
|
|
8
|
+
*/
|
|
9
|
+
export declare const TOOL_DEFINITION: {
|
|
10
|
+
readonly name: "CreateView";
|
|
11
|
+
readonly description: "Create CDS View or Classic View in SAP using DDL syntax. Both types use the same API workflow, differing only in DDL content (CDS has @AbapCatalog annotations).";
|
|
12
|
+
readonly inputSchema: {
|
|
13
|
+
readonly type: "object";
|
|
14
|
+
readonly properties: {
|
|
15
|
+
readonly view_name: {
|
|
16
|
+
readonly type: "string";
|
|
17
|
+
readonly description: "View name (e.g., ZOK_R_TEST_0002, Z_I_MY_VIEW). Must follow SAP naming conventions.";
|
|
18
|
+
};
|
|
19
|
+
readonly ddl_source: {
|
|
20
|
+
readonly type: "string";
|
|
21
|
+
readonly description: "Complete DDL source code. CDS: include @AbapCatalog.sqlViewName and other annotations. Classic: plain 'define view' statement.";
|
|
22
|
+
};
|
|
23
|
+
readonly package_name: {
|
|
24
|
+
readonly type: "string";
|
|
25
|
+
readonly description: "Package name (e.g., ZOK_LAB, $TMP for local objects)";
|
|
26
|
+
};
|
|
27
|
+
readonly transport_request: {
|
|
28
|
+
readonly type: "string";
|
|
29
|
+
readonly description: "Transport request number (e.g., E19K905635). Required for transportable packages.";
|
|
30
|
+
};
|
|
31
|
+
readonly description: {
|
|
32
|
+
readonly type: "string";
|
|
33
|
+
readonly description: "Optional description. If not provided, view_name will be used.";
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
readonly required: readonly ["view_name", "ddl_source", "package_name"];
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Main handler for CreateView MCP tool
|
|
41
|
+
*
|
|
42
|
+
* Uses ViewBuilder from @mcp-abap-adt/adt-clients for all operations
|
|
43
|
+
* Session and lock management handled internally by builder
|
|
44
|
+
*/
|
|
45
|
+
export declare function handleCreateView(params: any): Promise<{
|
|
46
|
+
isError: boolean;
|
|
47
|
+
content: {
|
|
48
|
+
type: string;
|
|
49
|
+
text: any;
|
|
50
|
+
}[];
|
|
51
|
+
}>;
|
|
52
|
+
//# sourceMappingURL=handleCreateView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handleCreateView.d.ts","sourceRoot":"","sources":["../../../src/handlers/view/handleCreateView.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAQH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BlB,CAAC;AAWX;;;;;GAKG;AACH,wBAAsB,gBAAgB,CAAC,MAAM,EAAE,GAAG;;;;;;GA0GjD"}
|