@mcp-abap-adt/core 2.5.2 → 2.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +33 -0
- package/dist/handlers/behavior_definition/high/handleUpdateBehaviorDefinition.d.ts +4 -0
- package/dist/handlers/behavior_definition/high/handleUpdateBehaviorDefinition.d.ts.map +1 -1
- package/dist/handlers/behavior_definition/high/handleUpdateBehaviorDefinition.js +5 -0
- package/dist/handlers/behavior_definition/high/handleUpdateBehaviorDefinition.js.map +1 -1
- package/dist/handlers/class/high/handleUpdateClass.d.ts +5 -0
- package/dist/handlers/class/high/handleUpdateClass.d.ts.map +1 -1
- package/dist/handlers/class/high/handleUpdateClass.js +9 -3
- package/dist/handlers/class/high/handleUpdateClass.js.map +1 -1
- package/dist/handlers/data_element/high/handleCreateDataElement.d.ts.map +1 -1
- package/dist/handlers/data_element/high/handleCreateDataElement.js +1 -0
- package/dist/handlers/data_element/high/handleCreateDataElement.js.map +1 -1
- package/dist/handlers/domain/high/handleCreateDomain.d.ts.map +1 -1
- package/dist/handlers/domain/high/handleCreateDomain.js +1 -0
- package/dist/handlers/domain/high/handleCreateDomain.js.map +1 -1
- package/dist/handlers/domain/high/handleUpdateDomain.d.ts.map +1 -1
- package/dist/handlers/domain/high/handleUpdateDomain.js +1 -0
- package/dist/handlers/domain/high/handleUpdateDomain.js.map +1 -1
- package/dist/handlers/function/high/handleCreateFunctionModule.d.ts.map +1 -1
- package/dist/handlers/function/high/handleCreateFunctionModule.js +1 -0
- package/dist/handlers/function/high/handleCreateFunctionModule.js.map +1 -1
- package/dist/handlers/interface/high/handleCreateInterface.d.ts.map +1 -1
- package/dist/handlers/interface/high/handleCreateInterface.js +5 -3
- package/dist/handlers/interface/high/handleCreateInterface.js.map +1 -1
- package/dist/handlers/program/high/handleCreateProgram.d.ts.map +1 -1
- package/dist/handlers/program/high/handleCreateProgram.js +5 -3
- package/dist/handlers/program/high/handleCreateProgram.js.map +1 -1
- package/dist/handlers/program/high/handleUpdateProgram.d.ts +4 -0
- package/dist/handlers/program/high/handleUpdateProgram.d.ts.map +1 -1
- package/dist/handlers/program/high/handleUpdateProgram.js +9 -3
- package/dist/handlers/program/high/handleUpdateProgram.js.map +1 -1
- package/dist/handlers/service_binding/high/handleListServiceBindings.d.ts +44 -0
- package/dist/handlers/service_binding/high/handleListServiceBindings.d.ts.map +1 -0
- package/dist/handlers/service_binding/high/handleListServiceBindings.js +211 -0
- package/dist/handlers/service_binding/high/handleListServiceBindings.js.map +1 -0
- package/dist/handlers/service_binding/high/serviceBindingXmlBuilder.d.ts +11 -0
- package/dist/handlers/service_binding/high/serviceBindingXmlBuilder.d.ts.map +1 -0
- package/dist/handlers/service_binding/high/serviceBindingXmlBuilder.js +27 -0
- package/dist/handlers/service_binding/high/serviceBindingXmlBuilder.js.map +1 -0
- package/dist/handlers/service_definition/high/handleUpdateServiceDefinition.d.ts.map +1 -1
- package/dist/handlers/service_definition/high/handleUpdateServiceDefinition.js +5 -3
- package/dist/handlers/service_definition/high/handleUpdateServiceDefinition.js.map +1 -1
- package/dist/handlers/structure/high/handleUpdateStructure.d.ts.map +1 -1
- package/dist/handlers/structure/high/handleUpdateStructure.js +5 -3
- package/dist/handlers/structure/high/handleUpdateStructure.js.map +1 -1
- package/dist/handlers/system/readonly/handleRuntimeGetDumpByUri.d.ts +27 -0
- package/dist/handlers/system/readonly/handleRuntimeGetDumpByUri.d.ts.map +1 -0
- package/dist/handlers/system/readonly/handleRuntimeGetDumpByUri.js +47 -0
- package/dist/handlers/system/readonly/handleRuntimeGetDumpByUri.js.map +1 -0
- package/dist/handlers/system/readonly/runtimeDumpReadCompat.d.ts +8 -0
- package/dist/handlers/system/readonly/runtimeDumpReadCompat.d.ts.map +1 -0
- package/dist/handlers/system/readonly/runtimeDumpReadCompat.js +55 -0
- package/dist/handlers/system/readonly/runtimeDumpReadCompat.js.map +1 -0
- package/dist/handlers/table/high/handleCreateTable.d.ts.map +1 -1
- package/dist/handlers/table/high/handleCreateTable.js +5 -3
- package/dist/handlers/table/high/handleCreateTable.js.map +1 -1
- package/dist/handlers/transport/readonly/handleListTransports.d.ts +38 -0
- package/dist/handlers/transport/readonly/handleListTransports.d.ts.map +1 -0
- package/dist/handlers/transport/readonly/handleListTransports.js +94 -0
- package/dist/handlers/transport/readonly/handleListTransports.js.map +1 -0
- package/dist/handlers/transport/readonly/handleResolveTransport.d.ts +42 -0
- package/dist/handlers/transport/readonly/handleResolveTransport.d.ts.map +1 -0
- package/dist/handlers/transport/readonly/handleResolveTransport.js +75 -0
- package/dist/handlers/transport/readonly/handleResolveTransport.js.map +1 -0
- package/dist/handlers/view/high/handleCreateView.d.ts.map +1 -1
- package/dist/handlers/view/high/handleCreateView.js +5 -3
- package/dist/handlers/view/high/handleCreateView.js.map +1 -1
- package/dist/handlers/view/high/handleUpdateView.d.ts +4 -0
- package/dist/handlers/view/high/handleUpdateView.d.ts.map +1 -1
- package/dist/handlers/view/high/handleUpdateView.js +9 -3
- package/dist/handlers/view/high/handleUpdateView.js.map +1 -1
- package/dist/lib/handlers/groups/ReadOnlyHandlersGroup.d.ts.map +1 -1
- package/dist/lib/handlers/groups/ReadOnlyHandlersGroup.js +9 -0
- package/dist/lib/handlers/groups/ReadOnlyHandlersGroup.js.map +1 -1
- package/docs/user-guide/AVAILABLE_TOOLS.md +20 -3
- package/docs/user-guide/AVAILABLE_TOOLS_COMPACT.md +1 -1
- package/docs/user-guide/AVAILABLE_TOOLS_HIGH.md +5 -1
- package/docs/user-guide/AVAILABLE_TOOLS_LOW.md +1 -1
- package/docs/user-guide/AVAILABLE_TOOLS_READONLY.md +15 -2
- package/package.json +3 -3
- package/dist/handlers/bdef/handleCreateBehaviorDefinition.d.ts +0 -50
- package/dist/handlers/bdef/handleCreateBehaviorDefinition.d.ts.map +0 -1
- package/dist/handlers/bdef/handleCreateBehaviorDefinition.js +0 -101
- package/dist/handlers/bdef/handleGetBdef.d.ts +0 -54
- package/dist/handlers/bdef/handleGetBdef.d.ts.map +0 -1
- package/dist/handlers/bdef/handleGetBdef.js +0 -89
- package/dist/handlers/bdef/handleUpdateBehaviorDefinition.d.ts +0 -37
- package/dist/handlers/bdef/handleUpdateBehaviorDefinition.d.ts.map +0 -1
- package/dist/handlers/bdef/handleUpdateBehaviorDefinition.js +0 -85
- package/dist/handlers/behavior_definition/readonly/handleGetBdef.d.ts +0 -54
- package/dist/handlers/behavior_definition/readonly/handleGetBdef.d.ts.map +0 -1
- package/dist/handlers/behavior_definition/readonly/handleGetBdef.js +0 -89
- package/dist/handlers/class/handleCheckClass.d.ts +0 -59
- package/dist/handlers/class/handleCheckClass.d.ts.map +0 -1
- package/dist/handlers/class/handleCheckClass.js +0 -138
- package/dist/handlers/class/handleCreateClass.d.ts +0 -80
- package/dist/handlers/class/handleCreateClass.d.ts.map +0 -1
- package/dist/handlers/class/handleCreateClass.js +0 -192
- package/dist/handlers/class/handleGetClass.d.ts +0 -16
- package/dist/handlers/class/handleGetClass.d.ts.map +0 -1
- package/dist/handlers/class/handleGetClass.js +0 -159
- package/dist/handlers/class/handleUpdateClassSource.d.ts +0 -44
- package/dist/handlers/class/handleUpdateClassSource.d.ts.map +0 -1
- package/dist/handlers/class/handleUpdateClassSource.js +0 -131
- package/dist/handlers/class/handleValidateClass.d.ts +0 -62
- package/dist/handlers/class/handleValidateClass.d.ts.map +0 -1
- package/dist/handlers/class/handleValidateClass.js +0 -136
- package/dist/handlers/class/readonly/handleGetClass.d.ts +0 -20
- package/dist/handlers/class/readonly/handleGetClass.d.ts.map +0 -1
- package/dist/handlers/class/readonly/handleGetClass.js +0 -159
- package/dist/handlers/common/handleActivateObject.d.ts +0 -62
- package/dist/handlers/common/handleActivateObject.d.ts.map +0 -1
- package/dist/handlers/common/handleActivateObject.js +0 -137
- package/dist/handlers/common/handleCheckObject.d.ts +0 -63
- package/dist/handlers/common/handleCheckObject.d.ts.map +0 -1
- package/dist/handlers/common/handleCheckObject.js +0 -197
- package/dist/handlers/common/handleDeleteObject.d.ts +0 -46
- package/dist/handlers/common/handleDeleteObject.d.ts.map +0 -1
- package/dist/handlers/common/handleDeleteObject.js +0 -176
- package/dist/handlers/common/handleLockObject.d.ts +0 -57
- package/dist/handlers/common/handleLockObject.d.ts.map +0 -1
- package/dist/handlers/common/handleLockObject.js +0 -195
- package/dist/handlers/common/handleUnlockObject.d.ts +0 -61
- package/dist/handlers/common/handleUnlockObject.d.ts.map +0 -1
- package/dist/handlers/common/handleUnlockObject.js +0 -178
- package/dist/handlers/common/handleValidateObject.d.ts +0 -58
- package/dist/handlers/common/handleValidateObject.d.ts.map +0 -1
- package/dist/handlers/common/handleValidateObject.js +0 -177
- package/dist/handlers/data_element/handleCreateDataElement.d.ts +0 -83
- package/dist/handlers/data_element/handleCreateDataElement.d.ts.map +0 -1
- package/dist/handlers/data_element/handleCreateDataElement.js +0 -180
- package/dist/handlers/data_element/handleGetDataElement.d.ts +0 -29
- package/dist/handlers/data_element/handleGetDataElement.d.ts.map +0 -1
- package/dist/handlers/data_element/handleGetDataElement.js +0 -173
- package/dist/handlers/data_element/handleUpdateDataElement.d.ts +0 -131
- package/dist/handlers/data_element/handleUpdateDataElement.d.ts.map +0 -1
- package/dist/handlers/data_element/handleUpdateDataElement.js +0 -258
- package/dist/handlers/data_element/readonly/handleGetDataElement.d.ts +0 -33
- package/dist/handlers/data_element/readonly/handleGetDataElement.d.ts.map +0 -1
- package/dist/handlers/data_element/readonly/handleGetDataElement.js +0 -173
- package/dist/handlers/ddlx/handleCreateMetadataExtension.d.ts +0 -41
- package/dist/handlers/ddlx/handleCreateMetadataExtension.d.ts.map +0 -1
- package/dist/handlers/ddlx/handleCreateMetadataExtension.js +0 -92
- package/dist/handlers/ddlx/handleUpdateMetadataExtension.d.ts +0 -37
- package/dist/handlers/ddlx/handleUpdateMetadataExtension.d.ts.map +0 -1
- package/dist/handlers/ddlx/handleUpdateMetadataExtension.js +0 -81
- package/dist/handlers/domain/handleCreateDomain.d.ts +0 -104
- package/dist/handlers/domain/handleCreateDomain.d.ts.map +0 -1
- package/dist/handlers/domain/handleCreateDomain.js +0 -187
- package/dist/handlers/domain/handleGetDomain.d.ts +0 -19
- package/dist/handlers/domain/handleGetDomain.d.ts.map +0 -1
- package/dist/handlers/domain/handleGetDomain.js +0 -138
- package/dist/handlers/domain/handleUpdateDomain.d.ts +0 -99
- package/dist/handlers/domain/handleUpdateDomain.d.ts.map +0 -1
- package/dist/handlers/domain/handleUpdateDomain.js +0 -204
- package/dist/handlers/domain/readonly/handleGetDomain.d.ts +0 -23
- package/dist/handlers/domain/readonly/handleGetDomain.d.ts.map +0 -1
- package/dist/handlers/domain/readonly/handleGetDomain.js +0 -138
- package/dist/handlers/enhancement/handleGetEnhancementImpl.d.ts +0 -69
- package/dist/handlers/enhancement/handleGetEnhancementImpl.d.ts.map +0 -1
- package/dist/handlers/enhancement/handleGetEnhancementImpl.js +0 -171
- package/dist/handlers/enhancement/handleGetEnhancementSpot.d.ts +0 -53
- package/dist/handlers/enhancement/handleGetEnhancementSpot.d.ts.map +0 -1
- package/dist/handlers/enhancement/handleGetEnhancementSpot.js +0 -153
- package/dist/handlers/enhancement/handleGetEnhancements.d.ts +0 -64
- package/dist/handlers/enhancement/handleGetEnhancements.d.ts.map +0 -1
- package/dist/handlers/enhancement/handleGetEnhancements.js +0 -599
- package/dist/handlers/function/handleCheckFunctionModule.d.ts +0 -59
- package/dist/handlers/function/handleCheckFunctionModule.d.ts.map +0 -1
- package/dist/handlers/function/handleCheckFunctionModule.js +0 -140
- package/dist/handlers/function/handleCreateFunctionGroup.d.ts +0 -52
- package/dist/handlers/function/handleCreateFunctionGroup.d.ts.map +0 -1
- package/dist/handlers/function/handleCreateFunctionGroup.js +0 -114
- package/dist/handlers/function/handleCreateFunctionModule.d.ts +0 -57
- package/dist/handlers/function/handleCreateFunctionModule.d.ts.map +0 -1
- package/dist/handlers/function/handleCreateFunctionModule.js +0 -137
- package/dist/handlers/function/handleGetFunction.d.ts +0 -17
- package/dist/handlers/function/handleGetFunction.d.ts.map +0 -1
- package/dist/handlers/function/handleGetFunction.js +0 -172
- package/dist/handlers/function/handleGetFunctionGroup.d.ts +0 -16
- package/dist/handlers/function/handleGetFunctionGroup.d.ts.map +0 -1
- package/dist/handlers/function/handleGetFunctionGroup.js +0 -132
- package/dist/handlers/function/handleUpdateFunctionModuleSource.d.ts +0 -54
- package/dist/handlers/function/handleUpdateFunctionModuleSource.d.ts.map +0 -1
- package/dist/handlers/function/handleUpdateFunctionModuleSource.js +0 -108
- package/dist/handlers/function/handleValidateFunctionModule.d.ts +0 -58
- package/dist/handlers/function/handleValidateFunctionModule.d.ts.map +0 -1
- package/dist/handlers/function/handleValidateFunctionModule.js +0 -132
- package/dist/handlers/function/readonly/handleGetFunctionGroup.d.ts +0 -16
- package/dist/handlers/function/readonly/handleGetFunctionGroup.d.ts.map +0 -1
- package/dist/handlers/function/readonly/handleGetFunctionGroup.js +0 -132
- package/dist/handlers/include/handleGetInclude.d.ts +0 -16
- package/dist/handlers/include/handleGetInclude.d.ts.map +0 -1
- package/dist/handlers/include/handleGetInclude.js +0 -81
- package/dist/handlers/include/handleGetIncludesList.d.ts +0 -36
- package/dist/handlers/include/handleGetIncludesList.d.ts.map +0 -1
- package/dist/handlers/include/handleGetIncludesList.js +0 -223
- package/dist/handlers/interface/handleCreateInterface.d.ts +0 -64
- package/dist/handlers/interface/handleCreateInterface.d.ts.map +0 -1
- package/dist/handlers/interface/handleCreateInterface.js +0 -175
- package/dist/handlers/interface/handleGetInterface.d.ts +0 -40
- package/dist/handlers/interface/handleGetInterface.d.ts.map +0 -1
- package/dist/handlers/interface/handleGetInterface.js +0 -134
- package/dist/handlers/interface/handleUpdateInterfaceSource.d.ts +0 -48
- package/dist/handlers/interface/handleUpdateInterfaceSource.d.ts.map +0 -1
- package/dist/handlers/interface/handleUpdateInterfaceSource.js +0 -127
- package/dist/handlers/interface/readonly/handleGetInterface.d.ts +0 -44
- package/dist/handlers/interface/readonly/handleGetInterface.d.ts.map +0 -1
- package/dist/handlers/interface/readonly/handleGetInterface.js +0 -134
- package/dist/handlers/package/handleCreatePackage.d.ts +0 -38
- package/dist/handlers/package/handleCreatePackage.d.ts.map +0 -1
- package/dist/handlers/package/handleCreatePackage.js +0 -127
- package/dist/handlers/package/handleGetPackage.d.ts +0 -16
- package/dist/handlers/package/handleGetPackage.d.ts.map +0 -1
- package/dist/handlers/package/handleGetPackage.js +0 -94
- package/dist/handlers/package/readonly/handleGetPackage.d.ts +0 -21
- package/dist/handlers/package/readonly/handleGetPackage.d.ts.map +0 -1
- package/dist/handlers/package/readonly/handleGetPackage.js +0 -94
- package/dist/handlers/program/handleCreateProgram.d.ts +0 -73
- package/dist/handlers/program/handleCreateProgram.d.ts.map +0 -1
- package/dist/handlers/program/handleCreateProgram.js +0 -220
- package/dist/handlers/program/handleGetProgFullCode.d.ts +0 -67
- package/dist/handlers/program/handleGetProgFullCode.d.ts.map +0 -1
- package/dist/handlers/program/handleGetProgFullCode.js +0 -249
- package/dist/handlers/program/handleGetProgram.d.ts +0 -16
- package/dist/handlers/program/handleGetProgram.d.ts.map +0 -1
- package/dist/handlers/program/handleGetProgram.js +0 -71
- package/dist/handlers/program/handleUpdateProgramSource.d.ts +0 -44
- package/dist/handlers/program/handleUpdateProgramSource.d.ts.map +0 -1
- package/dist/handlers/program/handleUpdateProgramSource.js +0 -121
- package/dist/handlers/program/readonly/handleGetProgram.d.ts +0 -20
- package/dist/handlers/program/readonly/handleGetProgram.d.ts.map +0 -1
- package/dist/handlers/program/readonly/handleGetProgram.js +0 -71
- package/dist/handlers/search/handleGetObjectsByType.d.ts +0 -42
- package/dist/handlers/search/handleGetObjectsByType.d.ts.map +0 -1
- package/dist/handlers/search/handleGetObjectsByType.js +0 -166
- package/dist/handlers/search/handleGetObjectsList.d.ts +0 -46
- package/dist/handlers/search/handleGetObjectsList.d.ts.map +0 -1
- package/dist/handlers/search/handleGetObjectsList.js +0 -145
- package/dist/handlers/search/handleSearchObject.d.ts +0 -28
- package/dist/handlers/search/handleSearchObject.d.ts.map +0 -1
- package/dist/handlers/search/handleSearchObject.js +0 -119
- package/dist/handlers/service_definition/readonly/handleGetServiceDefinition.d.ts +0 -17
- package/dist/handlers/service_definition/readonly/handleGetServiceDefinition.d.ts.map +0 -1
- package/dist/handlers/service_definition/readonly/handleGetServiceDefinition.js +0 -136
- package/dist/handlers/structure/handleCreateStructure.d.ts +0 -107
- package/dist/handlers/structure/handleCreateStructure.d.ts.map +0 -1
- package/dist/handlers/structure/handleCreateStructure.js +0 -184
- package/dist/handlers/structure/handleGetStructure.d.ts +0 -16
- package/dist/handlers/structure/handleGetStructure.d.ts.map +0 -1
- package/dist/handlers/structure/handleGetStructure.js +0 -139
- package/dist/handlers/structure/readonly/handleGetStructure.d.ts +0 -16
- package/dist/handlers/structure/readonly/handleGetStructure.d.ts.map +0 -1
- package/dist/handlers/structure/readonly/handleGetStructure.js +0 -139
- package/dist/handlers/system/handleDescribeByList.d.ts +0 -36
- package/dist/handlers/system/handleDescribeByList.d.ts.map +0 -1
- package/dist/handlers/system/handleDescribeByList.js +0 -121
- package/dist/handlers/system/handleGetAbapAST.d.ts +0 -26
- package/dist/handlers/system/handleGetAbapAST.d.ts.map +0 -1
- package/dist/handlers/system/handleGetAbapAST.js +0 -172
- package/dist/handlers/system/handleGetAbapSemanticAnalysis.d.ts +0 -26
- package/dist/handlers/system/handleGetAbapSemanticAnalysis.d.ts.map +0 -1
- package/dist/handlers/system/handleGetAbapSemanticAnalysis.js +0 -353
- package/dist/handlers/system/handleGetAbapSystemSymbols.d.ts +0 -26
- package/dist/handlers/system/handleGetAbapSystemSymbols.d.ts.map +0 -1
- package/dist/handlers/system/handleGetAbapSystemSymbols.js +0 -574
- package/dist/handlers/system/handleGetAllTypes.d.ts +0 -22
- package/dist/handlers/system/handleGetAllTypes.d.ts.map +0 -1
- package/dist/handlers/system/handleGetAllTypes.js +0 -102
- package/dist/handlers/system/handleGetInactiveObjects.d.ts +0 -20
- package/dist/handlers/system/handleGetInactiveObjects.d.ts.map +0 -1
- package/dist/handlers/system/handleGetInactiveObjects.js +0 -41
- package/dist/handlers/system/handleGetObjectInfo.d.ts +0 -41
- package/dist/handlers/system/handleGetObjectInfo.d.ts.map +0 -1
- package/dist/handlers/system/handleGetObjectInfo.js +0 -210
- package/dist/handlers/system/handleGetObjectNodeFromCache.d.ts +0 -40
- package/dist/handlers/system/handleGetObjectNodeFromCache.d.ts.map +0 -1
- package/dist/handlers/system/handleGetObjectNodeFromCache.js +0 -70
- package/dist/handlers/system/handleGetObjectStructure.d.ts +0 -26
- package/dist/handlers/system/handleGetObjectStructure.d.ts.map +0 -1
- package/dist/handlers/system/handleGetObjectStructure.js +0 -103
- package/dist/handlers/system/handleGetSession.d.ts +0 -33
- package/dist/handlers/system/handleGetSession.d.ts.map +0 -1
- package/dist/handlers/system/handleGetSession.js +0 -63
- package/dist/handlers/system/handleGetSqlQuery.d.ts +0 -49
- package/dist/handlers/system/handleGetSqlQuery.d.ts.map +0 -1
- package/dist/handlers/system/handleGetSqlQuery.js +0 -176
- package/dist/handlers/system/handleGetTransaction.d.ts +0 -42
- package/dist/handlers/system/handleGetTransaction.d.ts.map +0 -1
- package/dist/handlers/system/handleGetTransaction.js +0 -91
- package/dist/handlers/system/handleGetTypeInfo.d.ts +0 -69
- package/dist/handlers/system/handleGetTypeInfo.d.ts.map +0 -1
- package/dist/handlers/system/handleGetTypeInfo.js +0 -169
- package/dist/handlers/system/handleGetWhereUsed.d.ts +0 -69
- package/dist/handlers/system/handleGetWhereUsed.d.ts.map +0 -1
- package/dist/handlers/system/handleGetWhereUsed.js +0 -405
- package/dist/handlers/table/handleCheckTable.d.ts +0 -55
- package/dist/handlers/table/handleCheckTable.d.ts.map +0 -1
- package/dist/handlers/table/handleCheckTable.js +0 -138
- package/dist/handlers/table/handleCreateTable.d.ts +0 -42
- package/dist/handlers/table/handleCreateTable.d.ts.map +0 -1
- package/dist/handlers/table/handleCreateTable.js +0 -118
- package/dist/handlers/table/handleGetTable.d.ts +0 -16
- package/dist/handlers/table/handleGetTable.d.ts.map +0 -1
- package/dist/handlers/table/handleGetTable.js +0 -140
- package/dist/handlers/table/handleGetTableContents.d.ts +0 -56
- package/dist/handlers/table/handleGetTableContents.d.ts.map +0 -1
- package/dist/handlers/table/handleGetTableContents.js +0 -387
- package/dist/handlers/table/handleValidateTable.d.ts +0 -53
- package/dist/handlers/table/handleValidateTable.d.ts.map +0 -1
- package/dist/handlers/table/handleValidateTable.js +0 -125
- package/dist/handlers/table/readonly/handleGetTable.d.ts +0 -20
- package/dist/handlers/table/readonly/handleGetTable.d.ts.map +0 -1
- package/dist/handlers/table/readonly/handleGetTable.js +0 -140
- package/dist/handlers/transport/handleCreateTransport.d.ts +0 -50
- package/dist/handlers/transport/handleCreateTransport.d.ts.map +0 -1
- package/dist/handlers/transport/handleCreateTransport.js +0 -151
- package/dist/handlers/transport/handleGetTransport.d.ts +0 -44
- package/dist/handlers/transport/handleGetTransport.d.ts.map +0 -1
- package/dist/handlers/transport/handleGetTransport.js +0 -183
- package/dist/handlers/view/handleCreateView.d.ts +0 -52
- package/dist/handlers/view/handleCreateView.d.ts.map +0 -1
- package/dist/handlers/view/handleCreateView.js +0 -139
- package/dist/handlers/view/handleGetView.d.ts +0 -26
- package/dist/handlers/view/handleGetView.d.ts.map +0 -1
- package/dist/handlers/view/handleGetView.js +0 -349
- package/dist/handlers/view/handleUpdateViewSource.d.ts +0 -44
- package/dist/handlers/view/handleUpdateViewSource.d.ts.map +0 -1
- package/dist/handlers/view/handleUpdateViewSource.js +0 -136
- package/dist/handlers/view/readonly/handleGetView.d.ts +0 -26
- package/dist/handlers/view/readonly/handleGetView.d.ts.map +0 -1
- package/dist/handlers/view/readonly/handleGetView.js +0 -349
- package/dist/index.d.ts +0 -94
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -2453
- package/dist/lib/activationUtils.d.ts +0 -59
- package/dist/lib/activationUtils.d.ts.map +0 -1
- package/dist/lib/activationUtils.js +0 -168
- package/dist/lib/getFullCodeCache.d.ts +0 -3
- package/dist/lib/getFullCodeCache.d.ts.map +0 -1
- package/dist/lib/getFullCodeCache.js +0 -56
- package/dist/lib/toolsRegistry.d.ts +0 -13
- package/dist/lib/toolsRegistry.d.ts.map +0 -1
- package/dist/lib/toolsRegistry.js +0 -410
- package/dist/utils/lockStateManager.d.ts +0 -64
- package/dist/utils/lockStateManager.d.ts.map +0 -1
- package/dist/utils/lockStateManager.js +0 -173
- package/dist/utils/lockStateManager.js.map +0 -1
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* UpdateViewSource Handler - Update Existing CDS/Classic View DDL Source
|
|
4
|
-
*
|
|
5
|
-
* Uses ViewBuilder from @mcp-abap-adt/adt-clients for all operations.
|
|
6
|
-
* Session and lock management handled internally by builder.
|
|
7
|
-
*
|
|
8
|
-
* Workflow: validate -> lock -> update -> check -> unlock -> (activate)
|
|
9
|
-
*/
|
|
10
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
-
exports.TOOL_DEFINITION = void 0;
|
|
12
|
-
exports.handleUpdateViewSource = handleUpdateViewSource;
|
|
13
|
-
const utils_1 = require("../../lib/utils");
|
|
14
|
-
const fast_xml_parser_1 = require("fast-xml-parser");
|
|
15
|
-
const adt_clients_1 = require("@mcp-abap-adt/adt-clients");
|
|
16
|
-
exports.TOOL_DEFINITION = {
|
|
17
|
-
name: "UpdateViewSource",
|
|
18
|
-
description: "Update DDL source code of an existing CDS View or Classic View. Locks the view, uploads new DDL source, and unlocks. Optionally activates after update. Use this to modify existing views without re-creating metadata.",
|
|
19
|
-
inputSchema: {
|
|
20
|
-
type: "object",
|
|
21
|
-
properties: {
|
|
22
|
-
view_name: {
|
|
23
|
-
type: "string",
|
|
24
|
-
description: "View name (e.g., ZOK_R_TEST_0002). View must already exist."
|
|
25
|
-
},
|
|
26
|
-
ddl_source: {
|
|
27
|
-
type: "string",
|
|
28
|
-
description: "Complete DDL source code. CDS: include @AbapCatalog.sqlViewName and other annotations. Classic: plain 'define view' statement."
|
|
29
|
-
},
|
|
30
|
-
activate: {
|
|
31
|
-
type: "boolean",
|
|
32
|
-
description: "Activate view after source update. Default: false. Set to true to activate immediately, or use ActivateObject for batch activation."
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
required: ["view_name", "ddl_source"]
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
/**
|
|
39
|
-
* Main handler for UpdateViewSource MCP tool
|
|
40
|
-
*
|
|
41
|
-
* Uses ViewBuilder from @mcp-abap-adt/adt-clients for all operations
|
|
42
|
-
* Session and lock management handled internally by builder
|
|
43
|
-
*/
|
|
44
|
-
async function handleUpdateViewSource(params) {
|
|
45
|
-
try {
|
|
46
|
-
const args = params;
|
|
47
|
-
// Validate required parameters
|
|
48
|
-
if (!args.view_name || !args.ddl_source) {
|
|
49
|
-
return (0, utils_1.return_error)(new Error("Missing required parameters: view_name and ddl_source"));
|
|
50
|
-
}
|
|
51
|
-
const connection = (0, utils_1.getManagedConnection)();
|
|
52
|
-
const viewName = args.view_name.toUpperCase();
|
|
53
|
-
utils_1.logger.info(`Starting view source update: ${viewName}`);
|
|
54
|
-
try {
|
|
55
|
-
// Create client
|
|
56
|
-
const client = new adt_clients_1.CrudClient(connection);
|
|
57
|
-
const shouldActivate = args.activate === true; // Default to false if not specified
|
|
58
|
-
// Validate
|
|
59
|
-
await client.validateView(viewName);
|
|
60
|
-
// Lock
|
|
61
|
-
await client.lockView(viewName);
|
|
62
|
-
const lockHandle = client.getLockHandle();
|
|
63
|
-
try {
|
|
64
|
-
// Update with DDL source
|
|
65
|
-
await client.updateView(viewName, args.ddl_source, lockHandle);
|
|
66
|
-
// Check
|
|
67
|
-
await client.checkView(viewName);
|
|
68
|
-
// Unlock
|
|
69
|
-
await client.unlockView(viewName, lockHandle);
|
|
70
|
-
// Activate if requested
|
|
71
|
-
if (shouldActivate) {
|
|
72
|
-
await client.activateView(viewName);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
catch (error) {
|
|
76
|
-
// Try to unlock on error
|
|
77
|
-
try {
|
|
78
|
-
await client.unlockView(viewName, lockHandle);
|
|
79
|
-
}
|
|
80
|
-
catch (unlockError) {
|
|
81
|
-
utils_1.logger.error('Failed to unlock view after error:', unlockError);
|
|
82
|
-
}
|
|
83
|
-
throw error;
|
|
84
|
-
}
|
|
85
|
-
// Parse activation warnings if activation was performed
|
|
86
|
-
let activationWarnings = [];
|
|
87
|
-
if (shouldActivate && client.getActivateResult()) {
|
|
88
|
-
const activateResponse = client.getActivateResult();
|
|
89
|
-
if (typeof activateResponse.data === 'string' && activateResponse.data.includes('<chkl:messages')) {
|
|
90
|
-
const parser = new fast_xml_parser_1.XMLParser({ ignoreAttributes: false, attributeNamePrefix: '@_' });
|
|
91
|
-
const result = parser.parse(activateResponse.data);
|
|
92
|
-
const messages = result?.['chkl:messages']?.['msg'];
|
|
93
|
-
if (messages) {
|
|
94
|
-
const msgArray = Array.isArray(messages) ? messages : [messages];
|
|
95
|
-
activationWarnings = msgArray.map((msg) => `${msg['@_type']}: ${msg['shortText']?.['txt'] || 'Unknown'}`);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
utils_1.logger.info(`✅ UpdateViewSource completed successfully: ${viewName}`);
|
|
100
|
-
// Return success result
|
|
101
|
-
const stepsCompleted = ['validate', 'lock', 'update', 'check', 'unlock'];
|
|
102
|
-
if (shouldActivate) {
|
|
103
|
-
stepsCompleted.push('activate');
|
|
104
|
-
}
|
|
105
|
-
const result = {
|
|
106
|
-
success: true,
|
|
107
|
-
view_name: viewName,
|
|
108
|
-
type: 'DDLS/DF',
|
|
109
|
-
message: shouldActivate
|
|
110
|
-
? `View ${viewName} source updated and activated successfully`
|
|
111
|
-
: `View ${viewName} source updated successfully (not activated)`,
|
|
112
|
-
uri: `/sap/bc/adt/ddic/ddl/sources/${(0, utils_1.encodeSapObjectName)(viewName)}`,
|
|
113
|
-
steps_completed: stepsCompleted,
|
|
114
|
-
activation_warnings: activationWarnings.length > 0 ? activationWarnings : undefined,
|
|
115
|
-
source_size_bytes: args.ddl_source.length
|
|
116
|
-
};
|
|
117
|
-
return (0, utils_1.return_response)({
|
|
118
|
-
data: JSON.stringify(result, null, 2),
|
|
119
|
-
status: 200,
|
|
120
|
-
statusText: 'OK',
|
|
121
|
-
headers: {},
|
|
122
|
-
config: {}
|
|
123
|
-
});
|
|
124
|
-
}
|
|
125
|
-
catch (error) {
|
|
126
|
-
utils_1.logger.error(`Error updating view source ${viewName}:`, error);
|
|
127
|
-
const errorMessage = error.response?.data
|
|
128
|
-
? (typeof error.response.data === 'string' ? error.response.data : JSON.stringify(error.response.data))
|
|
129
|
-
: error.message || String(error);
|
|
130
|
-
return (0, utils_1.return_error)(new Error(`Failed to update view ${viewName}: ${errorMessage}`));
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
catch (error) {
|
|
134
|
-
return (0, utils_1.return_error)(error);
|
|
135
|
-
}
|
|
136
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* GetView Handler - ABAP Database View Retrieval via ADT API
|
|
3
|
-
*
|
|
4
|
-
* APPROACH:
|
|
5
|
-
* - Similar to GetTable pattern: GET request to retrieve view definition
|
|
6
|
-
* - View-specific XML structure with ddic:view namespace
|
|
7
|
-
* - Parse tables, fields, joins, and selection conditions
|
|
8
|
-
* - Support for both normal views and maintenance views
|
|
9
|
-
*/
|
|
10
|
-
import * as z from 'zod';
|
|
11
|
-
export declare const TOOL_DEFINITION: {
|
|
12
|
-
readonly name: "GetView";
|
|
13
|
-
readonly description: "[read-only] Retrieve ABAP database view definition including tables, fields, joins, and selection conditions.";
|
|
14
|
-
readonly inputSchema: {
|
|
15
|
-
readonly view_name: z.ZodString;
|
|
16
|
-
readonly filePath: z.ZodOptional<z.ZodString>;
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
export declare function handleGetView(args: any): Promise<{
|
|
20
|
-
isError: boolean;
|
|
21
|
-
content: {
|
|
22
|
-
type: string;
|
|
23
|
-
text: any;
|
|
24
|
-
}[];
|
|
25
|
-
}>;
|
|
26
|
-
//# sourceMappingURL=handleGetView.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"handleGetView.d.ts","sourceRoot":"","sources":["../../../../src/handlers/view/readonly/handleGetView.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAMH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,eAAO,MAAM,eAAe;;;;;;;CAOlB,CAAC;AAsLX,wBAAsB,aAAa,CAAC,IAAI,EAAE,GAAG;;;;;;GAqI5C"}
|
|
@@ -1,349 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* GetView Handler - ABAP Database View Retrieval via ADT API
|
|
4
|
-
*
|
|
5
|
-
* APPROACH:
|
|
6
|
-
* - Similar to GetTable pattern: GET request to retrieve view definition
|
|
7
|
-
* - View-specific XML structure with ddic:view namespace
|
|
8
|
-
* - Parse tables, fields, joins, and selection conditions
|
|
9
|
-
* - Support for both normal views and maintenance views
|
|
10
|
-
*/
|
|
11
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
12
|
-
if (k2 === undefined) k2 = k;
|
|
13
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
14
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
15
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
16
|
-
}
|
|
17
|
-
Object.defineProperty(o, k2, desc);
|
|
18
|
-
}) : (function(o, m, k, k2) {
|
|
19
|
-
if (k2 === undefined) k2 = k;
|
|
20
|
-
o[k2] = m[k];
|
|
21
|
-
}));
|
|
22
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
23
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
24
|
-
}) : function(o, v) {
|
|
25
|
-
o["default"] = v;
|
|
26
|
-
});
|
|
27
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
28
|
-
var ownKeys = function(o) {
|
|
29
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
30
|
-
var ar = [];
|
|
31
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
32
|
-
return ar;
|
|
33
|
-
};
|
|
34
|
-
return ownKeys(o);
|
|
35
|
-
};
|
|
36
|
-
return function (mod) {
|
|
37
|
-
if (mod && mod.__esModule) return mod;
|
|
38
|
-
var result = {};
|
|
39
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
40
|
-
__setModuleDefault(result, mod);
|
|
41
|
-
return result;
|
|
42
|
-
};
|
|
43
|
-
})();
|
|
44
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
|
-
exports.TOOL_DEFINITION = void 0;
|
|
46
|
-
exports.handleGetView = handleGetView;
|
|
47
|
-
const utils_1 = require("../../../lib/utils");
|
|
48
|
-
const utils_2 = require("../../../lib/utils");
|
|
49
|
-
const fast_xml_parser_1 = require("fast-xml-parser");
|
|
50
|
-
const writeResultToFile_1 = require("../../../lib/writeResultToFile");
|
|
51
|
-
const z = __importStar(require("zod"));
|
|
52
|
-
exports.TOOL_DEFINITION = {
|
|
53
|
-
name: "GetView",
|
|
54
|
-
description: "[read-only] Retrieve ABAP database view definition including tables, fields, joins, and selection conditions.",
|
|
55
|
-
inputSchema: {
|
|
56
|
-
view_name: z.string().describe("Name of the ABAP database view"),
|
|
57
|
-
filePath: z.string().optional().describe("Optional file path to write the result to")
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
/**
|
|
61
|
-
* Parse database view XML structure
|
|
62
|
-
*/
|
|
63
|
-
function parseViewXml(xml) {
|
|
64
|
-
const parser = new fast_xml_parser_1.XMLParser({
|
|
65
|
-
ignoreAttributes: false,
|
|
66
|
-
attributeNamePrefix: '',
|
|
67
|
-
parseAttributeValue: true,
|
|
68
|
-
trimValues: true
|
|
69
|
-
});
|
|
70
|
-
const result = parser.parse(xml);
|
|
71
|
-
// DDIC Database View (VIEW/DV)
|
|
72
|
-
if (result['ddic:view']) {
|
|
73
|
-
const v = result['ddic:view'];
|
|
74
|
-
// Parse view tables
|
|
75
|
-
const tables = Array.isArray(v['ddic:tables']?.['ddic:table'])
|
|
76
|
-
? v['ddic:tables']['ddic:table']
|
|
77
|
-
: v['ddic:tables']?.['ddic:table']
|
|
78
|
-
? [v['ddic:tables']['ddic:table']]
|
|
79
|
-
: [];
|
|
80
|
-
// Parse view fields
|
|
81
|
-
const fields = Array.isArray(v['ddic:fields']?.['ddic:field'])
|
|
82
|
-
? v['ddic:fields']['ddic:field']
|
|
83
|
-
: v['ddic:fields']?.['ddic:field']
|
|
84
|
-
? [v['ddic:fields']['ddic:field']]
|
|
85
|
-
: [];
|
|
86
|
-
// Parse joins
|
|
87
|
-
const joins = Array.isArray(v['ddic:joins']?.['ddic:join'])
|
|
88
|
-
? v['ddic:joins']['ddic:join']
|
|
89
|
-
: v['ddic:joins']?.['ddic:join']
|
|
90
|
-
? [v['ddic:joins']['ddic:join']]
|
|
91
|
-
: [];
|
|
92
|
-
// Parse selection conditions
|
|
93
|
-
const conditions = Array.isArray(v['ddic:conditions']?.['ddic:condition'])
|
|
94
|
-
? v['ddic:conditions']['ddic:condition']
|
|
95
|
-
: v['ddic:conditions']?.['ddic:condition']
|
|
96
|
-
? [v['ddic:conditions']['ddic:condition']]
|
|
97
|
-
: [];
|
|
98
|
-
return {
|
|
99
|
-
name: v['adtcore:name'],
|
|
100
|
-
objectType: 'view',
|
|
101
|
-
description: v['adtcore:description'],
|
|
102
|
-
package: v['adtcore:packageRef']?.['adtcore:name'] || null,
|
|
103
|
-
viewType: v['ddic:viewType'] || 'database_view',
|
|
104
|
-
maintenanceAllowed: v['ddic:maintenanceAllowed'] === 'true',
|
|
105
|
-
tables: tables.map(t => ({
|
|
106
|
-
name: t['ddic:tableName'] || t['ddic:name'],
|
|
107
|
-
alias: t['ddic:alias'],
|
|
108
|
-
position: parseInt(t['ddic:position'] || '0', 10)
|
|
109
|
-
})),
|
|
110
|
-
fields: fields.map(f => ({
|
|
111
|
-
name: f['ddic:fieldName'] || f['ddic:name'],
|
|
112
|
-
table: f['ddic:tableName'],
|
|
113
|
-
alias: f['ddic:alias'],
|
|
114
|
-
dataType: f['ddic:dataType'],
|
|
115
|
-
length: parseInt(f['ddic:length'] || '0', 10),
|
|
116
|
-
decimals: parseInt(f['ddic:decimals'] || '0', 10),
|
|
117
|
-
key: f['ddic:keyFlag'] === 'true',
|
|
118
|
-
aggregation: f['ddic:aggregation'],
|
|
119
|
-
description: f['ddic:description']
|
|
120
|
-
})),
|
|
121
|
-
joins: joins.map(j => ({
|
|
122
|
-
leftTable: j['ddic:leftTable'],
|
|
123
|
-
rightTable: j['ddic:rightTable'],
|
|
124
|
-
joinType: j['ddic:joinType'] || 'INNER',
|
|
125
|
-
condition: j['ddic:condition']
|
|
126
|
-
})),
|
|
127
|
-
conditions: conditions.map(c => ({
|
|
128
|
-
field: c['ddic:fieldName'],
|
|
129
|
-
operator: c['ddic:operator'],
|
|
130
|
-
value: c['ddic:value'],
|
|
131
|
-
table: c['ddic:tableName']
|
|
132
|
-
})),
|
|
133
|
-
generatedSql: v['ddic:generatedSql']
|
|
134
|
-
};
|
|
135
|
-
}
|
|
136
|
-
// Fallback for other view types or unstructured XML
|
|
137
|
-
if (result['asx:abap']?.['asx:values']) {
|
|
138
|
-
// Handle ABAP serialized view data
|
|
139
|
-
const abapData = result['asx:abap']['asx:values'];
|
|
140
|
-
return {
|
|
141
|
-
objectType: 'view',
|
|
142
|
-
abap_structure: abapData,
|
|
143
|
-
raw: result
|
|
144
|
-
};
|
|
145
|
-
}
|
|
146
|
-
// Complete fallback: return raw XML structure
|
|
147
|
-
return {
|
|
148
|
-
raw: result,
|
|
149
|
-
note: 'Unrecognized view XML structure, returning raw parsed content'
|
|
150
|
-
};
|
|
151
|
-
}
|
|
152
|
-
/**
|
|
153
|
-
* Parse view object properties XML from ADT repository information system
|
|
154
|
-
*/
|
|
155
|
-
function parseViewPropertiesXml(xml) {
|
|
156
|
-
const parser = new fast_xml_parser_1.XMLParser({
|
|
157
|
-
ignoreAttributes: false,
|
|
158
|
-
attributeNamePrefix: "@_"
|
|
159
|
-
});
|
|
160
|
-
const result = parser.parse(xml);
|
|
161
|
-
if (result['opr:objectProperties']?.['opr:object']) {
|
|
162
|
-
const obj = result['opr:objectProperties']['opr:object'];
|
|
163
|
-
const properties = result['opr:objectProperties']['opr:property'] || [];
|
|
164
|
-
return {
|
|
165
|
-
name: obj['@_name'],
|
|
166
|
-
text: obj['@_text'],
|
|
167
|
-
package: obj['@_package'],
|
|
168
|
-
type: obj['@_type'],
|
|
169
|
-
expandable: obj['@_expandable'],
|
|
170
|
-
properties: Array.isArray(properties) ? properties.map(prop => ({
|
|
171
|
-
facet: prop['@_facet'],
|
|
172
|
-
name: prop['@_name'],
|
|
173
|
-
displayName: prop['@_displayName'],
|
|
174
|
-
text: prop['@_text'],
|
|
175
|
-
hasChildrenOfSameFacet: prop['@_hasChildrenOfSameFacet']
|
|
176
|
-
})) : []
|
|
177
|
-
};
|
|
178
|
-
}
|
|
179
|
-
return {
|
|
180
|
-
raw: result,
|
|
181
|
-
note: 'Unrecognized object properties XML structure'
|
|
182
|
-
};
|
|
183
|
-
}
|
|
184
|
-
/**
|
|
185
|
-
* Get database view contents (actual data)
|
|
186
|
-
*/
|
|
187
|
-
async function getViewContents(viewName, maxRows = 100) {
|
|
188
|
-
try {
|
|
189
|
-
// Use SQL query handler to get view data
|
|
190
|
-
const sqlQuery = `SELECT * FROM ${viewName}`;
|
|
191
|
-
const url = `${await (0, utils_2.getBaseUrl)()}/sap/bc/adt/datapreview/freestyle`;
|
|
192
|
-
const response = await (0, utils_2.makeAdtRequestWithTimeout)(url, 'POST', 'default', {
|
|
193
|
-
'Content-Type': 'text/plain; charset=utf-8'
|
|
194
|
-
}, sqlQuery);
|
|
195
|
-
// Safely handle response data to avoid circular reference issues
|
|
196
|
-
let responseData;
|
|
197
|
-
try {
|
|
198
|
-
if (typeof response.data === 'object' && response.data !== null) {
|
|
199
|
-
// Try to safely serialize the object
|
|
200
|
-
responseData = JSON.parse(JSON.stringify(response.data));
|
|
201
|
-
}
|
|
202
|
-
else {
|
|
203
|
-
responseData = response.data;
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
catch (serializationError) {
|
|
207
|
-
// If serialization fails, convert to string
|
|
208
|
-
responseData = String(response.data);
|
|
209
|
-
}
|
|
210
|
-
return {
|
|
211
|
-
query: sqlQuery,
|
|
212
|
-
maxRows: maxRows,
|
|
213
|
-
data: responseData,
|
|
214
|
-
dataType: typeof response.data,
|
|
215
|
-
note: 'View contents retrieved successfully'
|
|
216
|
-
};
|
|
217
|
-
}
|
|
218
|
-
catch (error) {
|
|
219
|
-
return {
|
|
220
|
-
error: error instanceof Error ? error.message : String(error),
|
|
221
|
-
note: 'Could not retrieve view data - view might not be activated or accessible'
|
|
222
|
-
};
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
async function handleGetView(args) {
|
|
226
|
-
try {
|
|
227
|
-
if (!args?.view_name) {
|
|
228
|
-
throw new utils_1.McpError(utils_1.ErrorCode.InvalidParams, 'View name is required');
|
|
229
|
-
}
|
|
230
|
-
const results = {
|
|
231
|
-
view_name: args.view_name,
|
|
232
|
-
timestamp: new Date().toISOString()
|
|
233
|
-
};
|
|
234
|
-
// Step 1: Detect view type and get definition
|
|
235
|
-
let definitionSuccess = false;
|
|
236
|
-
let viewType = 'unknown';
|
|
237
|
-
// Try CDS View first (modern views with DDL source)
|
|
238
|
-
try {
|
|
239
|
-
const cdsUrl = `${await (0, utils_2.getBaseUrl)()}/sap/bc/adt/ddic/ddl/sources/${(0, utils_2.encodeSapObjectName)(args.view_name)}`;
|
|
240
|
-
const cdsResponse = await (0, utils_2.makeAdtRequestWithTimeout)(cdsUrl, 'GET', 'default');
|
|
241
|
-
if (cdsResponse.status === 200 && typeof cdsResponse.data === 'string') {
|
|
242
|
-
viewType = 'CDS_VIEW';
|
|
243
|
-
results.definition = {
|
|
244
|
-
source: 'cds_ddl',
|
|
245
|
-
type: 'CDS View',
|
|
246
|
-
ddl_source: cdsResponse.data,
|
|
247
|
-
note: 'Modern CDS View with DDL source code'
|
|
248
|
-
};
|
|
249
|
-
definitionSuccess = true;
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
catch (cdsError) {
|
|
253
|
-
// Not a CDS view or not accessible, try database view
|
|
254
|
-
}
|
|
255
|
-
// Try Database View (classic views with metadata only)
|
|
256
|
-
if (!definitionSuccess) {
|
|
257
|
-
try {
|
|
258
|
-
const objectUri = `/sap/bc/adt/vit/wb/object_type/viewdv/object_name/${args.view_name}`;
|
|
259
|
-
const encodedUri = encodeURIComponent(objectUri);
|
|
260
|
-
const propertiesUrl = `${await (0, utils_2.getBaseUrl)()}/sap/bc/adt/repository/informationsystem/objectproperties/values?uri=${encodedUri}`;
|
|
261
|
-
const propertiesResponse = await (0, utils_2.makeAdtRequestWithTimeout)(propertiesUrl, 'GET', 'default');
|
|
262
|
-
if (typeof propertiesResponse.data === 'string' && propertiesResponse.data.trim().startsWith('<?xml')) {
|
|
263
|
-
const viewProperties = parseViewPropertiesXml(propertiesResponse.data);
|
|
264
|
-
viewType = 'DATABASE_VIEW';
|
|
265
|
-
results.definition = {
|
|
266
|
-
source: 'database_view_properties',
|
|
267
|
-
type: 'Database View',
|
|
268
|
-
...viewProperties,
|
|
269
|
-
note: 'Classic database view with metadata only'
|
|
270
|
-
};
|
|
271
|
-
definitionSuccess = true;
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
catch (dbViewError) {
|
|
275
|
-
results.definition = {
|
|
276
|
-
error: dbViewError instanceof Error ? dbViewError.message : String(dbViewError),
|
|
277
|
-
note: 'Could not retrieve view as CDS or Database View'
|
|
278
|
-
};
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
// Step 2: Try to get view contents (optional, may fail if view is not accessible)
|
|
282
|
-
try {
|
|
283
|
-
const maxRows = args.max_rows || 100;
|
|
284
|
-
const contentsResult = await getViewContents(args.view_name, maxRows);
|
|
285
|
-
results.contents = contentsResult;
|
|
286
|
-
}
|
|
287
|
-
catch (contentsError) {
|
|
288
|
-
results.contents = {
|
|
289
|
-
error: contentsError instanceof Error ? contentsError.message : String(contentsError),
|
|
290
|
-
note: 'Could not retrieve view contents - this is normal for some view types'
|
|
291
|
-
};
|
|
292
|
-
}
|
|
293
|
-
// Add view type to results
|
|
294
|
-
results.view_type = viewType;
|
|
295
|
-
results.detection_note = viewType === 'CDS_VIEW'
|
|
296
|
-
? 'Modern CDS View detected - has DDL source code'
|
|
297
|
-
: viewType === 'DATABASE_VIEW'
|
|
298
|
-
? 'Classic Database View detected - metadata only'
|
|
299
|
-
: 'Could not determine view type';
|
|
300
|
-
// Safely serialize results to avoid circular reference issues
|
|
301
|
-
let serializedResults;
|
|
302
|
-
try {
|
|
303
|
-
serializedResults = JSON.stringify(results, null, 2);
|
|
304
|
-
}
|
|
305
|
-
catch (jsonError) {
|
|
306
|
-
// If JSON serialization fails, create a safe version
|
|
307
|
-
const safeResults = {
|
|
308
|
-
view_name: results.view_name,
|
|
309
|
-
timestamp: results.timestamp,
|
|
310
|
-
view_type: results.view_type,
|
|
311
|
-
detection_note: results.detection_note,
|
|
312
|
-
definition: {
|
|
313
|
-
source: results.definition?.source || 'unknown',
|
|
314
|
-
type: results.definition?.type || 'unknown',
|
|
315
|
-
note: results.definition?.note || 'No additional info',
|
|
316
|
-
error: results.definition?.error || null
|
|
317
|
-
},
|
|
318
|
-
contents: {
|
|
319
|
-
error: results.contents?.error || 'Serialization failed',
|
|
320
|
-
note: 'Could not serialize view contents - possible circular reference',
|
|
321
|
-
dataType: results.contents?.dataType || 'unknown'
|
|
322
|
-
},
|
|
323
|
-
serialization_error: jsonError instanceof Error ? jsonError.message : String(jsonError)
|
|
324
|
-
};
|
|
325
|
-
serializedResults = JSON.stringify(safeResults, null, 2);
|
|
326
|
-
}
|
|
327
|
-
const finalResult = {
|
|
328
|
-
isError: false,
|
|
329
|
-
content: [{
|
|
330
|
-
type: "text",
|
|
331
|
-
text: serializedResults
|
|
332
|
-
}]
|
|
333
|
-
};
|
|
334
|
-
// Write to file if path provided
|
|
335
|
-
if (args.filePath) {
|
|
336
|
-
(0, writeResultToFile_1.writeResultToFile)(serializedResults, args.filePath);
|
|
337
|
-
}
|
|
338
|
-
return finalResult;
|
|
339
|
-
}
|
|
340
|
-
catch (error) {
|
|
341
|
-
return {
|
|
342
|
-
isError: true,
|
|
343
|
-
content: [{
|
|
344
|
-
type: "text",
|
|
345
|
-
text: `GetView failed: ${error instanceof Error ? error.message : String(error)}`
|
|
346
|
-
}]
|
|
347
|
-
};
|
|
348
|
-
}
|
|
349
|
-
}
|
package/dist/index.d.ts
DELETED
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { SapConfig, AbapConnection } from "@mcp-abap-adt/connection";
|
|
3
|
-
type TransportConfig = {
|
|
4
|
-
type: "stdio";
|
|
5
|
-
} | {
|
|
6
|
-
type: "streamable-http";
|
|
7
|
-
host: string;
|
|
8
|
-
port: number;
|
|
9
|
-
enableJsonResponse: boolean;
|
|
10
|
-
allowedOrigins?: string[];
|
|
11
|
-
allowedHosts?: string[];
|
|
12
|
-
enableDnsRebindingProtection: boolean;
|
|
13
|
-
} | {
|
|
14
|
-
type: "sse";
|
|
15
|
-
host: string;
|
|
16
|
-
port: number;
|
|
17
|
-
allowedOrigins?: string[];
|
|
18
|
-
allowedHosts?: string[];
|
|
19
|
-
enableDnsRebindingProtection: boolean;
|
|
20
|
-
};
|
|
21
|
-
export interface ServerOptions {
|
|
22
|
-
sapConfig?: SapConfig;
|
|
23
|
-
connection?: AbapConnection;
|
|
24
|
-
transportConfig?: TransportConfig;
|
|
25
|
-
allowProcessExit?: boolean;
|
|
26
|
-
registerSignalHandlers?: boolean;
|
|
27
|
-
}
|
|
28
|
-
export declare function setSapConfigOverride(config?: SapConfig): void;
|
|
29
|
-
export declare function setAbapConnectionOverride(connection?: AbapConnection): void;
|
|
30
|
-
export declare function getConfig(): SapConfig;
|
|
31
|
-
/**
|
|
32
|
-
* Server class for interacting with ABAP systems via ADT.
|
|
33
|
-
*/
|
|
34
|
-
export declare class mcp_abap_adt_server {
|
|
35
|
-
private readonly allowProcessExit;
|
|
36
|
-
private readonly registerSignalHandlers;
|
|
37
|
-
private mcpServer;
|
|
38
|
-
private sapConfig;
|
|
39
|
-
private readonly hasEnvFile;
|
|
40
|
-
private transportConfig;
|
|
41
|
-
private httpServer?;
|
|
42
|
-
private shuttingDown;
|
|
43
|
-
private streamableHttpSessions;
|
|
44
|
-
private sseSessions;
|
|
45
|
-
private applyAuthHeaders;
|
|
46
|
-
private processJwtConfigUpdate;
|
|
47
|
-
private processBasicAuthConfigUpdate;
|
|
48
|
-
/**
|
|
49
|
-
* Check if connection is from localhost
|
|
50
|
-
*/
|
|
51
|
-
private isLocalConnection;
|
|
52
|
-
/**
|
|
53
|
-
* Check if request has SAP connection headers
|
|
54
|
-
*/
|
|
55
|
-
private hasSapHeaders;
|
|
56
|
-
/**
|
|
57
|
-
* Constructor for the mcp_abap_adt_server class.
|
|
58
|
-
*/
|
|
59
|
-
constructor(options?: ServerOptions);
|
|
60
|
-
/**
|
|
61
|
-
* Creates a new McpServer instance with all handlers registered
|
|
62
|
-
* Used for SSE sessions where each session needs its own server instance
|
|
63
|
-
* @private
|
|
64
|
-
*/
|
|
65
|
-
private createMcpServerForSession;
|
|
66
|
-
/**
|
|
67
|
-
* Converts JSON Schema to Zod schema object (not z.object(), but object with Zod fields)
|
|
68
|
-
* SDK expects inputSchema to be an object with Zod schemas as values, not z.object()
|
|
69
|
-
*/
|
|
70
|
-
private jsonSchemaToZod;
|
|
71
|
-
/**
|
|
72
|
-
* Helper function to register a tool on McpServer
|
|
73
|
-
* Wraps handler to convert our response format to MCP format
|
|
74
|
-
*/
|
|
75
|
-
private registerToolOnServer;
|
|
76
|
-
/**
|
|
77
|
-
* Registers all tools on a McpServer instance
|
|
78
|
-
* Used for both main server and per-session servers
|
|
79
|
-
*/
|
|
80
|
-
private registerAllToolsOnServer;
|
|
81
|
-
/**
|
|
82
|
-
* Sets up handlers for new McpServer using registerTool (recommended API)
|
|
83
|
-
* @private
|
|
84
|
-
*/
|
|
85
|
-
private setupMcpServerHandlers;
|
|
86
|
-
private setupSignalHandlers;
|
|
87
|
-
private shutdown;
|
|
88
|
-
/**
|
|
89
|
-
* Starts the MCP server and connects it to the transport.
|
|
90
|
-
*/
|
|
91
|
-
run(): Promise<void>;
|
|
92
|
-
}
|
|
93
|
-
export {};
|
|
94
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAuMA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AA2pBrE,KAAK,eAAe,GAChB;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,GACjB;IACA,IAAI,EAAE,iBAAiB,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,kBAAkB,EAAE,OAAO,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,4BAA4B,EAAE,OAAO,CAAC;CACvC,GACC;IACA,IAAI,EAAE,KAAK,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,4BAA4B,EAAE,OAAO,CAAC;CACvC,CAAC;AAqJJ,MAAM,WAAW,aAAa;IAC5B,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,UAAU,CAAC,EAAE,cAAc,CAAC;IAC5B,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAClC;AAED,wBAAgB,oBAAoB,CAAC,MAAM,CAAC,EAAE,SAAS,QAGtD;AAED,wBAAgB,yBAAyB,CAAC,UAAU,CAAC,EAAE,cAAc,QAEpE;AA+BD,wBAAgB,SAAS,IAAI,SAAS,CAqIrC;AAED;;GAEG;AACH,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAU;IAC3C,OAAO,CAAC,QAAQ,CAAC,sBAAsB,CAAU;IACjD,OAAO,CAAC,SAAS,CAAY;IAC7B,OAAO,CAAC,SAAS,CAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAU;IACrC,OAAO,CAAC,eAAe,CAAkB;IACzC,OAAO,CAAC,UAAU,CAAC,CAAa;IAChC,OAAO,CAAC,YAAY,CAAS;IAG7B,OAAO,CAAC,sBAAsB,CAMzB;IAGL,OAAO,CAAC,WAAW,CAGd;IACL,OAAO,CAAC,gBAAgB;IAwDxB,OAAO,CAAC,sBAAsB;IA2E9B,OAAO,CAAC,4BAA4B;IAoEpC;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAmBzB;;OAEG;IACH,OAAO,CAAC,aAAa;IASrB;;OAEG;gBACS,OAAO,CAAC,EAAE,aAAa;IAyHnC;;;;OAIG;IACH,OAAO,CAAC,yBAAyB;IAYjC;;;OAGG;IACH,OAAO,CAAC,eAAe;IAoJvB;;;OAGG;IACH,OAAO,CAAC,oBAAoB;IAqD5B;;;OAGG;IACH,OAAO,CAAC,wBAAwB;IA2MhC;;;OAGG;IACH,OAAO,CAAC,sBAAsB;IAM9B,OAAO,CAAC,mBAAmB;YAsBb,QAAQ;IA6CtB;;OAEG;IACG,GAAG;CA4dV"}
|