@mcp-abap-adt/core 2.5.0 → 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 +49 -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/compact/high/compactSchemas.d.ts +218 -9
- package/dist/handlers/compact/high/compactSchemas.d.ts.map +1 -1
- package/dist/handlers/compact/high/compactSchemas.js +410 -134
- package/dist/handlers/compact/high/compactSchemas.js.map +1 -1
- package/dist/handlers/compact/high/handleHandlerActivate.d.ts +7 -1
- package/dist/handlers/compact/high/handleHandlerActivate.d.ts.map +1 -1
- package/dist/handlers/compact/high/handleHandlerActivate.js +1 -1
- package/dist/handlers/compact/high/handleHandlerActivate.js.map +1 -1
- package/dist/handlers/compact/high/handleHandlerCdsUnitTestResult.d.ts +4 -1
- package/dist/handlers/compact/high/handleHandlerCdsUnitTestResult.d.ts.map +1 -1
- package/dist/handlers/compact/high/handleHandlerCdsUnitTestResult.js +1 -1
- package/dist/handlers/compact/high/handleHandlerCdsUnitTestResult.js.map +1 -1
- package/dist/handlers/compact/high/handleHandlerCdsUnitTestStatus.d.ts +3 -1
- package/dist/handlers/compact/high/handleHandlerCdsUnitTestStatus.d.ts.map +1 -1
- package/dist/handlers/compact/high/handleHandlerCdsUnitTestStatus.js +1 -1
- package/dist/handlers/compact/high/handleHandlerCdsUnitTestStatus.js.map +1 -1
- package/dist/handlers/compact/high/handleHandlerCheckRun.d.ts +7 -1
- package/dist/handlers/compact/high/handleHandlerCheckRun.d.ts.map +1 -1
- package/dist/handlers/compact/high/handleHandlerCheckRun.js +1 -1
- package/dist/handlers/compact/high/handleHandlerCheckRun.js.map +1 -1
- package/dist/handlers/compact/high/handleHandlerCreate.d.ts +23 -1
- package/dist/handlers/compact/high/handleHandlerCreate.d.ts.map +1 -1
- package/dist/handlers/compact/high/handleHandlerCreate.js +1 -1
- package/dist/handlers/compact/high/handleHandlerCreate.js.map +1 -1
- package/dist/handlers/compact/high/handleHandlerDelete.d.ts +7 -1
- package/dist/handlers/compact/high/handleHandlerDelete.d.ts.map +1 -1
- package/dist/handlers/compact/high/handleHandlerDelete.js +1 -1
- package/dist/handlers/compact/high/handleHandlerDelete.js.map +1 -1
- package/dist/handlers/compact/high/handleHandlerDumpList.d.ts +6 -1
- package/dist/handlers/compact/high/handleHandlerDumpList.d.ts.map +1 -1
- package/dist/handlers/compact/high/handleHandlerDumpList.js +1 -1
- package/dist/handlers/compact/high/handleHandlerDumpList.js.map +1 -1
- package/dist/handlers/compact/high/handleHandlerDumpView.d.ts +3 -1
- package/dist/handlers/compact/high/handleHandlerDumpView.d.ts.map +1 -1
- package/dist/handlers/compact/high/handleHandlerDumpView.js +1 -1
- package/dist/handlers/compact/high/handleHandlerDumpView.js.map +1 -1
- package/dist/handlers/compact/high/handleHandlerGet.d.ts +60 -1
- package/dist/handlers/compact/high/handleHandlerGet.d.ts.map +1 -1
- package/dist/handlers/compact/high/handleHandlerGet.js +1 -1
- package/dist/handlers/compact/high/handleHandlerGet.js.map +1 -1
- package/dist/handlers/compact/high/handleHandlerLock.d.ts +7 -1
- package/dist/handlers/compact/high/handleHandlerLock.d.ts.map +1 -1
- package/dist/handlers/compact/high/handleHandlerLock.js +1 -1
- package/dist/handlers/compact/high/handleHandlerLock.js.map +1 -1
- package/dist/handlers/compact/high/handleHandlerProfileList.d.ts +1 -1
- package/dist/handlers/compact/high/handleHandlerProfileList.js +1 -1
- package/dist/handlers/compact/high/handleHandlerProfileList.js.map +1 -1
- package/dist/handlers/compact/high/handleHandlerProfileRun.d.ts +17 -1
- package/dist/handlers/compact/high/handleHandlerProfileRun.d.ts.map +1 -1
- package/dist/handlers/compact/high/handleHandlerProfileRun.js +1 -1
- package/dist/handlers/compact/high/handleHandlerProfileRun.js.map +1 -1
- package/dist/handlers/compact/high/handleHandlerProfileView.d.ts +7 -1
- package/dist/handlers/compact/high/handleHandlerProfileView.d.ts.map +1 -1
- package/dist/handlers/compact/high/handleHandlerProfileView.js +1 -1
- package/dist/handlers/compact/high/handleHandlerProfileView.js.map +1 -1
- package/dist/handlers/compact/high/handleHandlerServiceBindingListTypes.d.ts +2 -1
- package/dist/handlers/compact/high/handleHandlerServiceBindingListTypes.d.ts.map +1 -1
- package/dist/handlers/compact/high/handleHandlerServiceBindingListTypes.js +1 -1
- package/dist/handlers/compact/high/handleHandlerServiceBindingListTypes.js.map +1 -1
- package/dist/handlers/compact/high/handleHandlerServiceBindingValidate.d.ts +6 -1
- package/dist/handlers/compact/high/handleHandlerServiceBindingValidate.d.ts.map +1 -1
- package/dist/handlers/compact/high/handleHandlerServiceBindingValidate.js +1 -1
- package/dist/handlers/compact/high/handleHandlerServiceBindingValidate.js.map +1 -1
- package/dist/handlers/compact/high/handleHandlerTransportCreate.d.ts +5 -1
- package/dist/handlers/compact/high/handleHandlerTransportCreate.d.ts.map +1 -1
- package/dist/handlers/compact/high/handleHandlerTransportCreate.js +1 -1
- package/dist/handlers/compact/high/handleHandlerTransportCreate.js.map +1 -1
- package/dist/handlers/compact/high/handleHandlerUnitTestResult.d.ts +4 -1
- package/dist/handlers/compact/high/handleHandlerUnitTestResult.d.ts.map +1 -1
- package/dist/handlers/compact/high/handleHandlerUnitTestResult.js +1 -1
- package/dist/handlers/compact/high/handleHandlerUnitTestResult.js.map +1 -1
- package/dist/handlers/compact/high/handleHandlerUnitTestRun.d.ts +18 -1
- package/dist/handlers/compact/high/handleHandlerUnitTestRun.d.ts.map +1 -1
- package/dist/handlers/compact/high/handleHandlerUnitTestRun.js +1 -1
- package/dist/handlers/compact/high/handleHandlerUnitTestRun.js.map +1 -1
- package/dist/handlers/compact/high/handleHandlerUnitTestStatus.d.ts +3 -1
- package/dist/handlers/compact/high/handleHandlerUnitTestStatus.d.ts.map +1 -1
- package/dist/handlers/compact/high/handleHandlerUnitTestStatus.js +1 -1
- package/dist/handlers/compact/high/handleHandlerUnitTestStatus.js.map +1 -1
- package/dist/handlers/compact/high/handleHandlerUnlock.d.ts +7 -1
- package/dist/handlers/compact/high/handleHandlerUnlock.d.ts.map +1 -1
- package/dist/handlers/compact/high/handleHandlerUnlock.js +1 -1
- package/dist/handlers/compact/high/handleHandlerUnlock.js.map +1 -1
- package/dist/handlers/compact/high/handleHandlerUpdate.d.ts +21 -1
- package/dist/handlers/compact/high/handleHandlerUpdate.d.ts.map +1 -1
- package/dist/handlers/compact/high/handleHandlerUpdate.js +1 -1
- package/dist/handlers/compact/high/handleHandlerUpdate.js.map +1 -1
- package/dist/handlers/compact/high/handleHandlerValidate.d.ts +22 -10
- package/dist/handlers/compact/high/handleHandlerValidate.d.ts.map +1 -1
- package/dist/handlers/compact/high/handleHandlerValidate.js +1 -1
- package/dist/handlers/compact/high/handleHandlerValidate.js.map +1 -1
- 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/AVAILABLE_TOOLS.md +189 -174
- package/docs/user-guide/AVAILABLE_TOOLS_COMPACT.md +189 -174
- package/docs/user-guide/AVAILABLE_TOOLS_HIGH.md +189 -174
- 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,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CheckClass Handler - Syntax check for ABAP class via ADT API
|
|
3
|
+
*
|
|
4
|
+
* Uses checkClass from @mcp-abap-adt/adt-clients/core/class for class-specific checking.
|
|
5
|
+
* Supports checking existing classes or hypothetical source code.
|
|
6
|
+
*/
|
|
7
|
+
export declare const TOOL_DEFINITION: {
|
|
8
|
+
readonly name: "CheckClass";
|
|
9
|
+
readonly description: "Perform syntax check on an ABAP class. Can check existing class (active/inactive) or hypothetical source code. Returns syntax errors, warnings, and messages. Can use session_id and session_state from GetSession to maintain the same session.";
|
|
10
|
+
readonly inputSchema: {
|
|
11
|
+
readonly type: "object";
|
|
12
|
+
readonly properties: {
|
|
13
|
+
readonly class_name: {
|
|
14
|
+
readonly type: "string";
|
|
15
|
+
readonly description: "Class name (e.g., ZCL_MY_CLASS)";
|
|
16
|
+
};
|
|
17
|
+
readonly version: {
|
|
18
|
+
readonly type: "string";
|
|
19
|
+
readonly description: "Version to check: 'active' (last activated) or 'inactive' (current unsaved). Default: active";
|
|
20
|
+
readonly enum: readonly ["active", "inactive"];
|
|
21
|
+
};
|
|
22
|
+
readonly source_code: {
|
|
23
|
+
readonly type: "string";
|
|
24
|
+
readonly description: "Optional: source code to validate. If provided, validates hypothetical code without creating object.";
|
|
25
|
+
};
|
|
26
|
+
readonly session_id: {
|
|
27
|
+
readonly type: "string";
|
|
28
|
+
readonly description: "Session ID from GetSession. If not provided, a new session will be created.";
|
|
29
|
+
};
|
|
30
|
+
readonly session_state: {
|
|
31
|
+
readonly type: "object";
|
|
32
|
+
readonly description: "Session state from GetSession (cookies, csrf_token, cookie_store). Required if session_id is provided.";
|
|
33
|
+
readonly properties: {
|
|
34
|
+
readonly cookies: {
|
|
35
|
+
readonly type: "string";
|
|
36
|
+
};
|
|
37
|
+
readonly csrf_token: {
|
|
38
|
+
readonly type: "string";
|
|
39
|
+
};
|
|
40
|
+
readonly cookie_store: {
|
|
41
|
+
readonly type: "object";
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
readonly required: readonly ["class_name"];
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Main handler for CheckClass MCP tool
|
|
51
|
+
*/
|
|
52
|
+
export declare function handleCheckClass(args: any): Promise<{
|
|
53
|
+
isError: boolean;
|
|
54
|
+
content: {
|
|
55
|
+
type: string;
|
|
56
|
+
text: any;
|
|
57
|
+
}[];
|
|
58
|
+
}>;
|
|
59
|
+
//# sourceMappingURL=handleCheckClass.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handleCheckClass.d.ts","sourceRoot":"","sources":["../../../src/handlers/class/handleCheckClass.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmClB,CAAC;AAcX;;GAEG;AACH,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,GAAG;;;;;;GAsG/C"}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* CheckClass Handler - Syntax check for ABAP class via ADT API
|
|
4
|
+
*
|
|
5
|
+
* Uses checkClass from @mcp-abap-adt/adt-clients/core/class for class-specific checking.
|
|
6
|
+
* Supports checking existing classes or hypothetical source code.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.TOOL_DEFINITION = void 0;
|
|
10
|
+
exports.handleCheckClass = handleCheckClass;
|
|
11
|
+
const utils_1 = require("../../lib/utils");
|
|
12
|
+
const adt_clients_1 = require("@mcp-abap-adt/adt-clients");
|
|
13
|
+
const checkRunParser_1 = require("../../lib/checkRunParser");
|
|
14
|
+
exports.TOOL_DEFINITION = {
|
|
15
|
+
name: "CheckClass",
|
|
16
|
+
description: "Perform syntax check on an ABAP class. Can check existing class (active/inactive) or hypothetical source code. Returns syntax errors, warnings, and messages. Can use session_id and session_state from GetSession to maintain the same session.",
|
|
17
|
+
inputSchema: {
|
|
18
|
+
type: "object",
|
|
19
|
+
properties: {
|
|
20
|
+
class_name: {
|
|
21
|
+
type: "string",
|
|
22
|
+
description: "Class name (e.g., ZCL_MY_CLASS)"
|
|
23
|
+
},
|
|
24
|
+
version: {
|
|
25
|
+
type: "string",
|
|
26
|
+
description: "Version to check: 'active' (last activated) or 'inactive' (current unsaved). Default: active",
|
|
27
|
+
enum: ["active", "inactive"]
|
|
28
|
+
},
|
|
29
|
+
source_code: {
|
|
30
|
+
type: "string",
|
|
31
|
+
description: "Optional: source code to validate. If provided, validates hypothetical code without creating object."
|
|
32
|
+
},
|
|
33
|
+
session_id: {
|
|
34
|
+
type: "string",
|
|
35
|
+
description: "Session ID from GetSession. If not provided, a new session will be created."
|
|
36
|
+
},
|
|
37
|
+
session_state: {
|
|
38
|
+
type: "object",
|
|
39
|
+
description: "Session state from GetSession (cookies, csrf_token, cookie_store). Required if session_id is provided.",
|
|
40
|
+
properties: {
|
|
41
|
+
cookies: { type: "string" },
|
|
42
|
+
csrf_token: { type: "string" },
|
|
43
|
+
cookie_store: { type: "object" }
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
required: ["class_name"]
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Main handler for CheckClass MCP tool
|
|
52
|
+
*/
|
|
53
|
+
async function handleCheckClass(args) {
|
|
54
|
+
try {
|
|
55
|
+
const { class_name, version = 'active', source_code, session_id, session_state } = args;
|
|
56
|
+
if (!class_name) {
|
|
57
|
+
return (0, utils_1.return_error)(new Error('class_name is required'));
|
|
58
|
+
}
|
|
59
|
+
const checkVersion = (version && ['active', 'inactive'].includes(version.toLowerCase()))
|
|
60
|
+
? version.toLowerCase()
|
|
61
|
+
: 'active';
|
|
62
|
+
const connection = (0, utils_1.getManagedConnection)();
|
|
63
|
+
// Restore session state if provided
|
|
64
|
+
if (session_id && session_state) {
|
|
65
|
+
connection.setSessionState({
|
|
66
|
+
cookies: session_state.cookies || null,
|
|
67
|
+
csrfToken: session_state.csrf_token || null,
|
|
68
|
+
cookieStore: session_state.cookie_store || {}
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
// Ensure connection is established
|
|
73
|
+
await connection.connect();
|
|
74
|
+
}
|
|
75
|
+
const className = class_name.toUpperCase();
|
|
76
|
+
utils_1.logger.info(`Starting class check: ${className} (version: ${checkVersion}, has source: ${!!source_code})`);
|
|
77
|
+
try {
|
|
78
|
+
const client = new adt_clients_1.CrudClient(connection);
|
|
79
|
+
await client.checkClass(className);
|
|
80
|
+
const response = client.getCheckResult();
|
|
81
|
+
if (!response) {
|
|
82
|
+
throw new Error('Class check did not return a response');
|
|
83
|
+
}
|
|
84
|
+
// Parse check results
|
|
85
|
+
const checkResult = (0, checkRunParser_1.parseCheckRunResponse)(response);
|
|
86
|
+
// Get updated session state after check
|
|
87
|
+
const updatedSessionState = connection.getSessionState();
|
|
88
|
+
utils_1.logger.info(`✅ CheckClass completed: ${className}`);
|
|
89
|
+
utils_1.logger.info(` Status: ${checkResult.status}`);
|
|
90
|
+
utils_1.logger.info(` Errors: ${checkResult.errors.length}, Warnings: ${checkResult.warnings.length}`);
|
|
91
|
+
return (0, utils_1.return_response)({
|
|
92
|
+
data: JSON.stringify({
|
|
93
|
+
success: checkResult.success,
|
|
94
|
+
class_name: className,
|
|
95
|
+
version: checkVersion,
|
|
96
|
+
check_result: checkResult,
|
|
97
|
+
session_id: session_id,
|
|
98
|
+
session_state: updatedSessionState ? {
|
|
99
|
+
cookies: updatedSessionState.cookies,
|
|
100
|
+
csrf_token: updatedSessionState.csrfToken,
|
|
101
|
+
cookie_store: updatedSessionState.cookieStore
|
|
102
|
+
} : null,
|
|
103
|
+
message: checkResult.success
|
|
104
|
+
? `Class ${className} has no syntax errors`
|
|
105
|
+
: `Class ${className} has ${checkResult.errors.length} error(s) and ${checkResult.warnings.length} warning(s)`
|
|
106
|
+
}, null, 2)
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
catch (error) {
|
|
110
|
+
utils_1.logger.error(`Error checking class ${className}:`, error);
|
|
111
|
+
let errorMessage = `Failed to check class: ${error.message || String(error)}`;
|
|
112
|
+
if (error.response?.status === 404) {
|
|
113
|
+
errorMessage = `Class ${className} not found.`;
|
|
114
|
+
}
|
|
115
|
+
else if (error.response?.data && typeof error.response.data === 'string') {
|
|
116
|
+
try {
|
|
117
|
+
const { XMLParser } = require('fast-xml-parser');
|
|
118
|
+
const parser = new XMLParser({
|
|
119
|
+
ignoreAttributes: false,
|
|
120
|
+
attributeNamePrefix: '@_'
|
|
121
|
+
});
|
|
122
|
+
const errorData = parser.parse(error.response.data);
|
|
123
|
+
const errorMsg = errorData['exc:exception']?.message?.['#text'] || errorData['exc:exception']?.message;
|
|
124
|
+
if (errorMsg) {
|
|
125
|
+
errorMessage = `SAP Error: ${errorMsg}`;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
catch (parseError) {
|
|
129
|
+
// Ignore parse errors
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
return (0, utils_1.return_error)(new Error(errorMessage));
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
catch (error) {
|
|
136
|
+
return (0, utils_1.return_error)(error);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CreateClass Handler - ABAP Class Creation via ADT API
|
|
3
|
+
*
|
|
4
|
+
* Uses CrudClient from @mcp-abap-adt/adt-clients for all operations.
|
|
5
|
+
* Session and lock management handled internally.
|
|
6
|
+
*
|
|
7
|
+
* Workflow: create -> lock -> update -> check -> unlock -> (activate)
|
|
8
|
+
*/
|
|
9
|
+
export declare const TOOL_DEFINITION: {
|
|
10
|
+
readonly name: "CreateClass";
|
|
11
|
+
readonly description: "Create a new ABAP class in SAP system with source code. Supports public/protected/private sections, interfaces, and inheritance. Uses stateful session for proper lock management.";
|
|
12
|
+
readonly inputSchema: {
|
|
13
|
+
readonly type: "object";
|
|
14
|
+
readonly properties: {
|
|
15
|
+
readonly class_name: {
|
|
16
|
+
readonly type: "string";
|
|
17
|
+
readonly description: "Class name (e.g., ZCL_TEST_CLASS_001). Must follow SAP naming conventions (start with Z or Y).";
|
|
18
|
+
};
|
|
19
|
+
readonly description: {
|
|
20
|
+
readonly type: "string";
|
|
21
|
+
readonly description: "Class description. If not provided, class_name will be used.";
|
|
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 superclass: {
|
|
32
|
+
readonly type: "string";
|
|
33
|
+
readonly description: "Optional superclass name for inheritance (e.g., CL_OBJECT)";
|
|
34
|
+
};
|
|
35
|
+
readonly final: {
|
|
36
|
+
readonly type: "boolean";
|
|
37
|
+
readonly description: "Mark class as final (cannot be inherited). Default: false";
|
|
38
|
+
};
|
|
39
|
+
readonly abstract: {
|
|
40
|
+
readonly type: "boolean";
|
|
41
|
+
readonly description: "Mark class as abstract (cannot be instantiated). Default: false";
|
|
42
|
+
};
|
|
43
|
+
readonly create_protected: {
|
|
44
|
+
readonly type: "boolean";
|
|
45
|
+
readonly description: "Constructor visibility is protected. Default: false (public)";
|
|
46
|
+
};
|
|
47
|
+
readonly source_code: {
|
|
48
|
+
readonly type: "string";
|
|
49
|
+
readonly description: "Complete ABAP class source code including CLASS DEFINITION and IMPLEMENTATION sections. If not provided, generates minimal template.";
|
|
50
|
+
};
|
|
51
|
+
readonly activate: {
|
|
52
|
+
readonly type: "boolean";
|
|
53
|
+
readonly description: "Activate class after creation. Default: true. Set to false for batch operations (activate multiple objects later).";
|
|
54
|
+
};
|
|
55
|
+
readonly master_system: {
|
|
56
|
+
readonly type: "string";
|
|
57
|
+
readonly description: "Master system ID (e.g., 'TRL' for cloud trial). Optional - will be retrieved from system if not provided.";
|
|
58
|
+
};
|
|
59
|
+
readonly responsible: {
|
|
60
|
+
readonly type: "string";
|
|
61
|
+
readonly description: "User responsible for the object (e.g., 'CB9980002377'). Optional - will be retrieved from system if not provided.";
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
readonly required: readonly ["class_name", "package_name"];
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* Main handler for creating ABAP classes
|
|
69
|
+
*
|
|
70
|
+
* Uses ClassBuilder from @mcp-abap-adt/adt-clients for all operations
|
|
71
|
+
* Session and lock management handled internally by builder
|
|
72
|
+
*/
|
|
73
|
+
export declare function handleCreateClass(params: any): Promise<{
|
|
74
|
+
isError: boolean;
|
|
75
|
+
content: {
|
|
76
|
+
type: string;
|
|
77
|
+
text: any;
|
|
78
|
+
}[];
|
|
79
|
+
}>;
|
|
80
|
+
//# sourceMappingURL=handleCreateClass.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handleCreateClass.d.ts","sourceRoot":"","sources":["../../../src/handlers/class/handleCreateClass.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAQH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyDlB,CAAC;AAuCX;;;;;GAKG;AACH,wBAAsB,iBAAiB,CAAC,MAAM,EAAE,GAAG;;;;;;GA8GlD"}
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* CreateClass Handler - ABAP Class Creation via ADT API
|
|
4
|
+
*
|
|
5
|
+
* Uses CrudClient from @mcp-abap-adt/adt-clients for all operations.
|
|
6
|
+
* Session and lock management handled internally.
|
|
7
|
+
*
|
|
8
|
+
* Workflow: create -> lock -> update -> check -> unlock -> (activate)
|
|
9
|
+
*/
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
exports.TOOL_DEFINITION = void 0;
|
|
12
|
+
exports.handleCreateClass = handleCreateClass;
|
|
13
|
+
const utils_1 = require("../../lib/utils");
|
|
14
|
+
const transportValidation_js_1 = require("../../utils/transportValidation.js");
|
|
15
|
+
const fast_xml_parser_1 = require("fast-xml-parser");
|
|
16
|
+
const adt_clients_1 = require("@mcp-abap-adt/adt-clients");
|
|
17
|
+
exports.TOOL_DEFINITION = {
|
|
18
|
+
name: "CreateClass",
|
|
19
|
+
description: "Create a new ABAP class in SAP system with source code. Supports public/protected/private sections, interfaces, and inheritance. Uses stateful session for proper lock management.",
|
|
20
|
+
inputSchema: {
|
|
21
|
+
type: "object",
|
|
22
|
+
properties: {
|
|
23
|
+
class_name: {
|
|
24
|
+
type: "string",
|
|
25
|
+
description: "Class name (e.g., ZCL_TEST_CLASS_001). Must follow SAP naming conventions (start with Z or Y)."
|
|
26
|
+
},
|
|
27
|
+
description: {
|
|
28
|
+
type: "string",
|
|
29
|
+
description: "Class description. If not provided, class_name will be used."
|
|
30
|
+
},
|
|
31
|
+
package_name: {
|
|
32
|
+
type: "string",
|
|
33
|
+
description: "Package name (e.g., ZOK_LAB, $TMP for local objects)"
|
|
34
|
+
},
|
|
35
|
+
transport_request: {
|
|
36
|
+
type: "string",
|
|
37
|
+
description: "Transport request number (e.g., E19K905635). Required for transportable packages."
|
|
38
|
+
},
|
|
39
|
+
superclass: {
|
|
40
|
+
type: "string",
|
|
41
|
+
description: "Optional superclass name for inheritance (e.g., CL_OBJECT)"
|
|
42
|
+
},
|
|
43
|
+
final: {
|
|
44
|
+
type: "boolean",
|
|
45
|
+
description: "Mark class as final (cannot be inherited). Default: false"
|
|
46
|
+
},
|
|
47
|
+
abstract: {
|
|
48
|
+
type: "boolean",
|
|
49
|
+
description: "Mark class as abstract (cannot be instantiated). Default: false"
|
|
50
|
+
},
|
|
51
|
+
create_protected: {
|
|
52
|
+
type: "boolean",
|
|
53
|
+
description: "Constructor visibility is protected. Default: false (public)"
|
|
54
|
+
},
|
|
55
|
+
source_code: {
|
|
56
|
+
type: "string",
|
|
57
|
+
description: "Complete ABAP class source code including CLASS DEFINITION and IMPLEMENTATION sections. If not provided, generates minimal template."
|
|
58
|
+
},
|
|
59
|
+
activate: {
|
|
60
|
+
type: "boolean",
|
|
61
|
+
description: "Activate class after creation. Default: true. Set to false for batch operations (activate multiple objects later)."
|
|
62
|
+
},
|
|
63
|
+
master_system: {
|
|
64
|
+
type: "string",
|
|
65
|
+
description: "Master system ID (e.g., 'TRL' for cloud trial). Optional - will be retrieved from system if not provided."
|
|
66
|
+
},
|
|
67
|
+
responsible: {
|
|
68
|
+
type: "string",
|
|
69
|
+
description: "User responsible for the object (e.g., 'CB9980002377'). Optional - will be retrieved from system if not provided."
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
required: ["class_name", "package_name"]
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* Generate minimal class source code if not provided
|
|
77
|
+
*/
|
|
78
|
+
function generateClassTemplate(className, description) {
|
|
79
|
+
return `CLASS ${className} DEFINITION
|
|
80
|
+
PUBLIC
|
|
81
|
+
FINAL
|
|
82
|
+
CREATE PUBLIC .
|
|
83
|
+
|
|
84
|
+
PUBLIC SECTION.
|
|
85
|
+
METHODS: constructor.
|
|
86
|
+
PROTECTED SECTION.
|
|
87
|
+
PRIVATE SECTION.
|
|
88
|
+
ENDCLASS.
|
|
89
|
+
|
|
90
|
+
CLASS ${className} IMPLEMENTATION.
|
|
91
|
+
METHOD constructor.
|
|
92
|
+
" ${description}
|
|
93
|
+
ENDMETHOD.
|
|
94
|
+
ENDCLASS.`;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Main handler for creating ABAP classes
|
|
98
|
+
*
|
|
99
|
+
* Uses ClassBuilder from @mcp-abap-adt/adt-clients for all operations
|
|
100
|
+
* Session and lock management handled internally by builder
|
|
101
|
+
*/
|
|
102
|
+
async function handleCreateClass(params) {
|
|
103
|
+
const args = params;
|
|
104
|
+
// Validate required parameters
|
|
105
|
+
if (!args.class_name || !args.package_name) {
|
|
106
|
+
return (0, utils_1.return_error)(new Error("Missing required parameters: class_name and package_name"));
|
|
107
|
+
}
|
|
108
|
+
// Validate transport_request: required for non-$TMP packages
|
|
109
|
+
try {
|
|
110
|
+
(0, transportValidation_js_1.validateTransportRequest)(args.package_name, args.transport_request);
|
|
111
|
+
}
|
|
112
|
+
catch (error) {
|
|
113
|
+
return (0, utils_1.return_error)(error);
|
|
114
|
+
}
|
|
115
|
+
const className = args.class_name.toUpperCase();
|
|
116
|
+
const connection = (0, utils_1.getManagedConnection)();
|
|
117
|
+
utils_1.logger.info(`Starting class creation: ${className}`);
|
|
118
|
+
try {
|
|
119
|
+
// Generate source code if not provided
|
|
120
|
+
const sourceCode = args.source_code || generateClassTemplate(className, args.description || className);
|
|
121
|
+
const shouldActivate = args.activate !== false; // Default to true if not specified
|
|
122
|
+
// Use CrudClient for all operations
|
|
123
|
+
const client = new adt_clients_1.CrudClient(connection);
|
|
124
|
+
await client
|
|
125
|
+
.createClass(className, args.description || className, args.package_name, args.transport_request, {
|
|
126
|
+
superclass: args.superclass,
|
|
127
|
+
final: args.final || false,
|
|
128
|
+
abstract: args.abstract || false,
|
|
129
|
+
createProtected: args.create_protected || false,
|
|
130
|
+
masterSystem: args.master_system,
|
|
131
|
+
responsible: args.responsible
|
|
132
|
+
})
|
|
133
|
+
.then(c => c.lockClass(className))
|
|
134
|
+
.then(c => c.updateClass(className, sourceCode))
|
|
135
|
+
.then(c => c.checkClass(className))
|
|
136
|
+
.then(c => c.unlockClass(className))
|
|
137
|
+
.then(c => shouldActivate ? c.activateClass(className) : Promise.resolve(c))
|
|
138
|
+
.catch(error => {
|
|
139
|
+
utils_1.logger.error('Class creation chain failed:', error);
|
|
140
|
+
throw error;
|
|
141
|
+
});
|
|
142
|
+
// Parse activation warnings if activation was performed
|
|
143
|
+
let activationWarnings = [];
|
|
144
|
+
if (shouldActivate && client.getActivateResult()) {
|
|
145
|
+
const activateResponse = client.getActivateResult();
|
|
146
|
+
if (typeof activateResponse.data === 'string' && activateResponse.data.includes('<chkl:messages')) {
|
|
147
|
+
const parser = new fast_xml_parser_1.XMLParser({ ignoreAttributes: false, attributeNamePrefix: '@_' });
|
|
148
|
+
const result = parser.parse(activateResponse.data);
|
|
149
|
+
const messages = result?.['chkl:messages']?.['msg'];
|
|
150
|
+
if (messages) {
|
|
151
|
+
const msgArray = Array.isArray(messages) ? messages : [messages];
|
|
152
|
+
activationWarnings = msgArray.map((msg) => `${msg['@_type']}: ${msg['shortText']?.['txt'] || 'Unknown'}`);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
// Return success result
|
|
157
|
+
const stepsCompleted = ['validate', 'create', 'lock', 'update', 'check', 'unlock'];
|
|
158
|
+
if (shouldActivate) {
|
|
159
|
+
stepsCompleted.push('activate');
|
|
160
|
+
}
|
|
161
|
+
const result = {
|
|
162
|
+
success: true,
|
|
163
|
+
class_name: className,
|
|
164
|
+
package_name: args.package_name,
|
|
165
|
+
transport_request: args.transport_request || null,
|
|
166
|
+
type: 'CLAS/OC',
|
|
167
|
+
message: shouldActivate
|
|
168
|
+
? `Class ${className} created and activated successfully`
|
|
169
|
+
: `Class ${className} created successfully (not activated)`,
|
|
170
|
+
uri: `/sap/bc/adt/oo/classes/${(0, utils_1.encodeSapObjectName)(className).toLowerCase()}`,
|
|
171
|
+
steps_completed: stepsCompleted,
|
|
172
|
+
activation_warnings: activationWarnings.length > 0 ? activationWarnings : undefined,
|
|
173
|
+
superclass: args.superclass || null,
|
|
174
|
+
final: args.final || false,
|
|
175
|
+
abstract: args.abstract || false
|
|
176
|
+
};
|
|
177
|
+
return (0, utils_1.return_response)({
|
|
178
|
+
data: JSON.stringify(result, null, 2),
|
|
179
|
+
status: 200,
|
|
180
|
+
statusText: 'OK',
|
|
181
|
+
headers: {},
|
|
182
|
+
config: {}
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
catch (error) {
|
|
186
|
+
utils_1.logger.error(`Error creating class ${className}:`, error);
|
|
187
|
+
const errorMessage = error.response?.data
|
|
188
|
+
? (typeof error.response.data === 'string' ? error.response.data : JSON.stringify(error.response.data))
|
|
189
|
+
: error.message || String(error);
|
|
190
|
+
return (0, utils_1.return_error)(new Error(`Failed to create class ${className}: ${errorMessage}`));
|
|
191
|
+
}
|
|
192
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
export declare const TOOL_DEFINITION: {
|
|
3
|
+
readonly name: "GetClass";
|
|
4
|
+
readonly description: "Retrieve ABAP class source code.";
|
|
5
|
+
readonly inputSchema: {
|
|
6
|
+
readonly class_name: z.ZodString;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
export declare function handleGetClass(args: any): Promise<{
|
|
10
|
+
isError: boolean;
|
|
11
|
+
content: {
|
|
12
|
+
type: string;
|
|
13
|
+
text: any;
|
|
14
|
+
}[];
|
|
15
|
+
}>;
|
|
16
|
+
//# sourceMappingURL=handleGetClass.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handleGetClass.d.ts","sourceRoot":"","sources":["../../../src/handlers/class/handleGetClass.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,eAAO,MAAM,eAAe;;;;;;CAMlB,CAAC;AA2DX,wBAAsB,cAAc,CAAC,IAAI,EAAE,GAAG;;;;;;GAsD7C"}
|
|
@@ -0,0 +1,159 @@
|
|
|
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.handleGetClass = handleGetClass;
|
|
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: "GetClass",
|
|
45
|
+
description: "Retrieve ABAP class source code.",
|
|
46
|
+
inputSchema: {
|
|
47
|
+
class_name: z.string().describe("Name of the ABAP class")
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
function parseClassXml(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
|
+
// ADT Class XML (CLAS/OC)
|
|
59
|
+
if (result['oo:class']) {
|
|
60
|
+
const c = result['oo:class'];
|
|
61
|
+
// Method implementations extracted from the XML payload
|
|
62
|
+
let methodImpls = [];
|
|
63
|
+
const implSection = c['oo:methodImplementations']?.['oo:methodImplementation'];
|
|
64
|
+
if (Array.isArray(implSection)) {
|
|
65
|
+
methodImpls = implSection.map(m => ({
|
|
66
|
+
name: m['adtcore:name'],
|
|
67
|
+
source: m['oo:source']
|
|
68
|
+
}));
|
|
69
|
+
}
|
|
70
|
+
else if (implSection) {
|
|
71
|
+
methodImpls = [{
|
|
72
|
+
name: implSection['adtcore:name'],
|
|
73
|
+
source: implSection['oo:source']
|
|
74
|
+
}];
|
|
75
|
+
}
|
|
76
|
+
return {
|
|
77
|
+
name: c['adtcore:name'],
|
|
78
|
+
objectType: 'class',
|
|
79
|
+
description: c['adtcore:description'],
|
|
80
|
+
package: c['adtcore:packageRef']?.['adtcore:name'] || null,
|
|
81
|
+
superClass: c['oo:superClass']?.['adtcore:name'] || null,
|
|
82
|
+
interfaces: Array.isArray(c['oo:interfaces']?.['oo:interface'])
|
|
83
|
+
? c['oo:interfaces']['oo:interface'].map(i => i['adtcore:name'])
|
|
84
|
+
: c['oo:interfaces']?.['oo:interface']
|
|
85
|
+
? [c['oo:interfaces']['oo:interface']['adtcore:name']]
|
|
86
|
+
: [],
|
|
87
|
+
methods: Array.isArray(c['oo:methods']?.['oo:method'])
|
|
88
|
+
? c['oo:methods']['oo:method'].map(m => m['adtcore:name'])
|
|
89
|
+
: c['oo:methods']?.['oo:method']
|
|
90
|
+
? [c['oo:methods']['oo:method']['adtcore:name']]
|
|
91
|
+
: [],
|
|
92
|
+
attributes: Array.isArray(c['oo:attributes']?.['oo:attribute'])
|
|
93
|
+
? c['oo:attributes']['oo:attribute'].map(a => a['adtcore:name'])
|
|
94
|
+
: c['oo:attributes']?.['oo:attribute']
|
|
95
|
+
? [c['oo:attributes']['oo:attribute']['adtcore:name']]
|
|
96
|
+
: [],
|
|
97
|
+
methodImplementations: methodImpls
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
// fallback: return raw
|
|
101
|
+
return { raw: result };
|
|
102
|
+
}
|
|
103
|
+
async function handleGetClass(args) {
|
|
104
|
+
try {
|
|
105
|
+
if (!args?.class_name) {
|
|
106
|
+
throw new utils_1.McpError(utils_1.ErrorCode.InvalidParams, 'Class name is required');
|
|
107
|
+
}
|
|
108
|
+
const connection = (0, utils_1.getManagedConnection)();
|
|
109
|
+
const client = new adt_clients_1.CrudClient(connection);
|
|
110
|
+
await client.readClass(args.class_name);
|
|
111
|
+
const response = client.getReadResult();
|
|
112
|
+
if (!response) {
|
|
113
|
+
throw new utils_1.McpError(utils_1.ErrorCode.InternalError, 'Failed to read class');
|
|
114
|
+
}
|
|
115
|
+
// Parse XML responses; otherwise return the payload unchanged
|
|
116
|
+
if (typeof response.data === 'string' && response.data.trim().startsWith('<?xml')) {
|
|
117
|
+
const resultObj = parseClassXml(response.data);
|
|
118
|
+
const result = {
|
|
119
|
+
isError: false,
|
|
120
|
+
content: [
|
|
121
|
+
{
|
|
122
|
+
type: "text",
|
|
123
|
+
text: JSON.stringify(resultObj, null, 2)
|
|
124
|
+
}
|
|
125
|
+
]
|
|
126
|
+
};
|
|
127
|
+
if (args.filePath) {
|
|
128
|
+
(0, writeResultToFile_1.writeResultToFile)(JSON.stringify(result, null, 2), args.filePath);
|
|
129
|
+
}
|
|
130
|
+
return result;
|
|
131
|
+
}
|
|
132
|
+
else {
|
|
133
|
+
// Plain text responses still follow the MCP wrapper format
|
|
134
|
+
if (args.filePath) {
|
|
135
|
+
(0, writeResultToFile_1.writeResultToFile)(response.data, args.filePath);
|
|
136
|
+
}
|
|
137
|
+
return {
|
|
138
|
+
isError: false,
|
|
139
|
+
content: [
|
|
140
|
+
{
|
|
141
|
+
type: "text",
|
|
142
|
+
text: response.data
|
|
143
|
+
}
|
|
144
|
+
]
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
catch (error) {
|
|
149
|
+
return {
|
|
150
|
+
isError: true,
|
|
151
|
+
content: [
|
|
152
|
+
{
|
|
153
|
+
type: "text",
|
|
154
|
+
text: error instanceof Error ? error.message : String(error)
|
|
155
|
+
}
|
|
156
|
+
]
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
}
|