@mcp-abap-adt/adt-clients 0.1.0
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/LICENSE +22 -0
- package/README.md +184 -0
- package/bin/README.md +368 -0
- package/bin/lock-object.js +274 -0
- package/bin/manage-locks.js +331 -0
- package/bin/manage-sessions.js +235 -0
- package/bin/unlock-object.js +291 -0
- package/bin/unlock-test-objects.js +248 -0
- package/dist/clients/CrudClient.d.ts +48 -0
- package/dist/clients/CrudClient.d.ts.map +1 -0
- package/dist/clients/CrudClient.js +135 -0
- package/dist/clients/LockClient.d.ts +28 -0
- package/dist/clients/LockClient.d.ts.map +1 -0
- package/dist/clients/LockClient.js +141 -0
- package/dist/clients/ManagementClient.d.ts +34 -0
- package/dist/clients/ManagementClient.d.ts.map +1 -0
- package/dist/clients/ManagementClient.js +80 -0
- package/dist/clients/ReadOnlyClient.d.ts +70 -0
- package/dist/clients/ReadOnlyClient.d.ts.map +1 -0
- package/dist/clients/ReadOnlyClient.js +141 -0
- package/dist/clients/ValidationClient.d.ts +8 -0
- package/dist/clients/ValidationClient.d.ts.map +1 -0
- package/dist/clients/ValidationClient.js +14 -0
- package/dist/core/class/ClassBuilder.d.ts +140 -0
- package/dist/core/class/ClassBuilder.d.ts.map +1 -0
- package/dist/core/class/ClassBuilder.js +400 -0
- package/dist/core/class/activation.d.ts +11 -0
- package/dist/core/class/activation.d.ts.map +1 -0
- package/dist/core/class/activation.js +16 -0
- package/dist/core/class/check.d.ts +24 -0
- package/dist/core/class/check.d.ts.map +1 -0
- package/dist/core/class/check.js +73 -0
- package/dist/core/class/create.d.ts +30 -0
- package/dist/core/class/create.d.ts.map +1 -0
- package/dist/core/class/create.js +118 -0
- package/dist/core/class/index.d.ts +14 -0
- package/dist/core/class/index.d.ts.map +1 -0
- package/dist/core/class/index.js +31 -0
- package/dist/core/class/lock.d.ts +20 -0
- package/dist/core/class/lock.d.ts.map +1 -0
- package/dist/core/class/lock.js +49 -0
- package/dist/core/class/read.d.ts +34 -0
- package/dist/core/class/read.d.ts.map +1 -0
- package/dist/core/class/read.js +59 -0
- package/dist/core/class/run.d.ts +51 -0
- package/dist/core/class/run.d.ts.map +1 -0
- package/dist/core/class/run.js +105 -0
- package/dist/core/class/unlock.d.ts +11 -0
- package/dist/core/class/unlock.d.ts.map +1 -0
- package/dist/core/class/unlock.js +16 -0
- package/dist/core/class/update.d.ts +11 -0
- package/dist/core/class/update.d.ts.map +1 -0
- package/dist/core/class/update.js +30 -0
- package/dist/core/class/validation.d.ts +28 -0
- package/dist/core/class/validation.d.ts.map +1 -0
- package/dist/core/class/validation.js +269 -0
- package/dist/core/dataElement/DataElementBuilder.d.ts +113 -0
- package/dist/core/dataElement/DataElementBuilder.d.ts.map +1 -0
- package/dist/core/dataElement/DataElementBuilder.js +449 -0
- package/dist/core/dataElement/activation.d.ts +11 -0
- package/dist/core/dataElement/activation.d.ts.map +1 -0
- package/dist/core/dataElement/activation.js +123 -0
- package/dist/core/dataElement/check.d.ts +12 -0
- package/dist/core/dataElement/check.d.ts.map +1 -0
- package/dist/core/dataElement/check.js +32 -0
- package/dist/core/dataElement/create.d.ts +12 -0
- package/dist/core/dataElement/create.d.ts.map +1 -0
- package/dist/core/dataElement/create.js +259 -0
- package/dist/core/dataElement/delete.d.ts +14 -0
- package/dist/core/dataElement/delete.d.ts.map +1 -0
- package/dist/core/dataElement/delete.js +21 -0
- package/dist/core/dataElement/index.d.ts +14 -0
- package/dist/core/dataElement/index.d.ts.map +1 -0
- package/dist/core/dataElement/index.js +31 -0
- package/dist/core/dataElement/lock.d.ts +10 -0
- package/dist/core/dataElement/lock.d.ts.map +1 -0
- package/dist/core/dataElement/lock.js +31 -0
- package/dist/core/dataElement/read.d.ts +17 -0
- package/dist/core/dataElement/read.d.ts.map +1 -0
- package/dist/core/dataElement/read.js +42 -0
- package/dist/core/dataElement/types.d.ts +64 -0
- package/dist/core/dataElement/types.d.ts.map +1 -0
- package/dist/core/dataElement/types.js +5 -0
- package/dist/core/dataElement/unlock.d.ts +11 -0
- package/dist/core/dataElement/unlock.d.ts.map +1 -0
- package/dist/core/dataElement/unlock.js +17 -0
- package/dist/core/dataElement/update.d.ts +29 -0
- package/dist/core/dataElement/update.d.ts.map +1 -0
- package/dist/core/dataElement/update.js +269 -0
- package/dist/core/delete.d.ts +22 -0
- package/dist/core/delete.d.ts.map +1 -0
- package/dist/core/delete.js +148 -0
- package/dist/core/domain/DomainBuilder.d.ts +135 -0
- package/dist/core/domain/DomainBuilder.d.ts.map +1 -0
- package/dist/core/domain/DomainBuilder.js +430 -0
- package/dist/core/domain/activation.d.ts +11 -0
- package/dist/core/domain/activation.d.ts.map +1 -0
- package/dist/core/domain/activation.js +16 -0
- package/dist/core/domain/check.d.ts +16 -0
- package/dist/core/domain/check.d.ts.map +1 -0
- package/dist/core/domain/check.js +36 -0
- package/dist/core/domain/create.d.ts +21 -0
- package/dist/core/domain/create.d.ts.map +1 -0
- package/dist/core/domain/create.js +172 -0
- package/dist/core/domain/delete.d.ts +14 -0
- package/dist/core/domain/delete.d.ts.map +1 -0
- package/dist/core/domain/delete.js +21 -0
- package/dist/core/domain/index.d.ts +14 -0
- package/dist/core/domain/index.d.ts.map +1 -0
- package/dist/core/domain/index.js +31 -0
- package/dist/core/domain/lock.d.ts +15 -0
- package/dist/core/domain/lock.d.ts.map +1 -0
- package/dist/core/domain/lock.js +61 -0
- package/dist/core/domain/read.d.ts +17 -0
- package/dist/core/domain/read.d.ts.map +1 -0
- package/dist/core/domain/read.js +42 -0
- package/dist/core/domain/types.d.ts +38 -0
- package/dist/core/domain/types.d.ts.map +1 -0
- package/dist/core/domain/types.js +5 -0
- package/dist/core/domain/unlock.d.ts +11 -0
- package/dist/core/domain/unlock.d.ts.map +1 -0
- package/dist/core/domain/unlock.js +17 -0
- package/dist/core/domain/update.d.ts +12 -0
- package/dist/core/domain/update.d.ts.map +1 -0
- package/dist/core/domain/update.js +144 -0
- package/dist/core/functionGroup/FunctionGroupBuilder.d.ts +91 -0
- package/dist/core/functionGroup/FunctionGroupBuilder.d.ts.map +1 -0
- package/dist/core/functionGroup/FunctionGroupBuilder.js +268 -0
- package/dist/core/functionGroup/activation.d.ts +10 -0
- package/dist/core/functionGroup/activation.d.ts.map +1 -0
- package/dist/core/functionGroup/activation.js +30 -0
- package/dist/core/functionGroup/check.d.ts +24 -0
- package/dist/core/functionGroup/check.d.ts.map +1 -0
- package/dist/core/functionGroup/check.js +91 -0
- package/dist/core/functionGroup/create.d.ts +12 -0
- package/dist/core/functionGroup/create.d.ts.map +1 -0
- package/dist/core/functionGroup/create.js +90 -0
- package/dist/core/functionGroup/delete.d.ts +14 -0
- package/dist/core/functionGroup/delete.d.ts.map +1 -0
- package/dist/core/functionGroup/delete.js +21 -0
- package/dist/core/functionGroup/index.d.ts +15 -0
- package/dist/core/functionGroup/index.d.ts.map +1 -0
- package/dist/core/functionGroup/index.js +32 -0
- package/dist/core/functionGroup/lock.d.ts +25 -0
- package/dist/core/functionGroup/lock.d.ts.map +1 -0
- package/dist/core/functionGroup/lock.js +50 -0
- package/dist/core/functionGroup/read.d.ts +17 -0
- package/dist/core/functionGroup/read.d.ts.map +1 -0
- package/dist/core/functionGroup/read.js +42 -0
- package/dist/core/functionGroup/types.d.ts +11 -0
- package/dist/core/functionGroup/types.d.ts.map +1 -0
- package/dist/core/functionGroup/types.js +5 -0
- package/dist/core/functionGroup/unlock.d.ts +5 -0
- package/dist/core/functionGroup/unlock.d.ts.map +1 -0
- package/dist/core/functionGroup/unlock.js +8 -0
- package/dist/core/functionGroup/update.d.ts +20 -0
- package/dist/core/functionGroup/update.d.ts.map +1 -0
- package/dist/core/functionGroup/update.js +119 -0
- package/dist/core/functionGroup/validation.d.ts +10 -0
- package/dist/core/functionGroup/validation.d.ts.map +1 -0
- package/dist/core/functionGroup/validation.js +17 -0
- package/dist/core/functionModule/FunctionModuleBuilder.d.ts +101 -0
- package/dist/core/functionModule/FunctionModuleBuilder.d.ts.map +1 -0
- package/dist/core/functionModule/FunctionModuleBuilder.js +314 -0
- package/dist/core/functionModule/activation.d.ts +10 -0
- package/dist/core/functionModule/activation.d.ts.map +1 -0
- package/dist/core/functionModule/activation.js +17 -0
- package/dist/core/functionModule/check.d.ts +23 -0
- package/dist/core/functionModule/check.d.ts.map +1 -0
- package/dist/core/functionModule/check.js +116 -0
- package/dist/core/functionModule/create.d.ts +12 -0
- package/dist/core/functionModule/create.d.ts.map +1 -0
- package/dist/core/functionModule/create.js +158 -0
- package/dist/core/functionModule/delete.d.ts +15 -0
- package/dist/core/functionModule/delete.d.ts.map +1 -0
- package/dist/core/functionModule/delete.js +25 -0
- package/dist/core/functionModule/index.d.ts +15 -0
- package/dist/core/functionModule/index.d.ts.map +1 -0
- package/dist/core/functionModule/index.js +32 -0
- package/dist/core/functionModule/lock.d.ts +18 -0
- package/dist/core/functionModule/lock.d.ts.map +1 -0
- package/dist/core/functionModule/lock.js +52 -0
- package/dist/core/functionModule/read.d.ts +31 -0
- package/dist/core/functionModule/read.d.ts.map +1 -0
- package/dist/core/functionModule/read.js +57 -0
- package/dist/core/functionModule/types.d.ts +19 -0
- package/dist/core/functionModule/types.d.ts.map +1 -0
- package/dist/core/functionModule/types.js +5 -0
- package/dist/core/functionModule/unlock.d.ts +10 -0
- package/dist/core/functionModule/unlock.d.ts.map +1 -0
- package/dist/core/functionModule/unlock.js +20 -0
- package/dist/core/functionModule/update.d.ts +17 -0
- package/dist/core/functionModule/update.d.ts.map +1 -0
- package/dist/core/functionModule/update.js +103 -0
- package/dist/core/functionModule/validation.d.ts +27 -0
- package/dist/core/functionModule/validation.d.ts.map +1 -0
- package/dist/core/functionModule/validation.js +107 -0
- package/dist/core/interface/InterfaceBuilder.d.ts +98 -0
- package/dist/core/interface/InterfaceBuilder.d.ts.map +1 -0
- package/dist/core/interface/InterfaceBuilder.js +311 -0
- package/dist/core/interface/activation.d.ts +11 -0
- package/dist/core/interface/activation.d.ts.map +1 -0
- package/dist/core/interface/activation.js +16 -0
- package/dist/core/interface/check.d.ts +10 -0
- package/dist/core/interface/check.d.ts.map +1 -0
- package/dist/core/interface/check.js +18 -0
- package/dist/core/interface/create.d.ts +12 -0
- package/dist/core/interface/create.d.ts.map +1 -0
- package/dist/core/interface/create.js +119 -0
- package/dist/core/interface/delete.d.ts +20 -0
- package/dist/core/interface/delete.d.ts.map +1 -0
- package/dist/core/interface/delete.js +47 -0
- package/dist/core/interface/index.d.ts +15 -0
- package/dist/core/interface/index.d.ts.map +1 -0
- package/dist/core/interface/index.js +32 -0
- package/dist/core/interface/lock.d.ts +23 -0
- package/dist/core/interface/lock.d.ts.map +1 -0
- package/dist/core/interface/lock.js +51 -0
- package/dist/core/interface/read.d.ts +26 -0
- package/dist/core/interface/read.d.ts.map +1 -0
- package/dist/core/interface/read.js +51 -0
- package/dist/core/interface/types.d.ts +19 -0
- package/dist/core/interface/types.d.ts.map +1 -0
- package/dist/core/interface/types.js +5 -0
- package/dist/core/interface/unlock.d.ts +11 -0
- package/dist/core/interface/unlock.d.ts.map +1 -0
- package/dist/core/interface/unlock.js +35 -0
- package/dist/core/interface/update.d.ts +12 -0
- package/dist/core/interface/update.d.ts.map +1 -0
- package/dist/core/interface/update.js +82 -0
- package/dist/core/interface/validation.d.ts +10 -0
- package/dist/core/interface/validation.d.ts.map +1 -0
- package/dist/core/interface/validation.js +17 -0
- package/dist/core/managementOperations.d.ts +34 -0
- package/dist/core/managementOperations.d.ts.map +1 -0
- package/dist/core/managementOperations.js +136 -0
- package/dist/core/package/PackageBuilder.d.ts +129 -0
- package/dist/core/package/PackageBuilder.d.ts.map +1 -0
- package/dist/core/package/PackageBuilder.js +386 -0
- package/dist/core/package/check.d.ts +9 -0
- package/dist/core/package/check.d.ts.map +1 -0
- package/dist/core/package/check.js +29 -0
- package/dist/core/package/create.d.ts +12 -0
- package/dist/core/package/create.d.ts.map +1 -0
- package/dist/core/package/create.js +145 -0
- package/dist/core/package/delete.d.ts +27 -0
- package/dist/core/package/delete.d.ts.map +1 -0
- package/dist/core/package/delete.js +138 -0
- package/dist/core/package/index.d.ts +15 -0
- package/dist/core/package/index.d.ts.map +1 -0
- package/dist/core/package/index.js +32 -0
- package/dist/core/package/lock.d.ts +10 -0
- package/dist/core/package/lock.d.ts.map +1 -0
- package/dist/core/package/lock.js +28 -0
- package/dist/core/package/read.d.ts +17 -0
- package/dist/core/package/read.d.ts.map +1 -0
- package/dist/core/package/read.js +42 -0
- package/dist/core/package/transportCheck.d.ts +10 -0
- package/dist/core/package/transportCheck.d.ts.map +1 -0
- package/dist/core/package/transportCheck.js +52 -0
- package/dist/core/package/types.d.ts +15 -0
- package/dist/core/package/types.d.ts.map +1 -0
- package/dist/core/package/types.js +5 -0
- package/dist/core/package/unlock.d.ts +11 -0
- package/dist/core/package/unlock.d.ts.map +1 -0
- package/dist/core/package/unlock.js +16 -0
- package/dist/core/package/update.d.ts +19 -0
- package/dist/core/package/update.d.ts.map +1 -0
- package/dist/core/package/update.js +125 -0
- package/dist/core/package/validation.d.ts +14 -0
- package/dist/core/package/validation.d.ts.map +1 -0
- package/dist/core/package/validation.js +72 -0
- package/dist/core/program/ProgramBuilder.d.ts +102 -0
- package/dist/core/program/ProgramBuilder.d.ts.map +1 -0
- package/dist/core/program/ProgramBuilder.js +321 -0
- package/dist/core/program/activation.d.ts +11 -0
- package/dist/core/program/activation.d.ts.map +1 -0
- package/dist/core/program/activation.js +16 -0
- package/dist/core/program/check.d.ts +10 -0
- package/dist/core/program/check.d.ts.map +1 -0
- package/dist/core/program/check.js +18 -0
- package/dist/core/program/create.d.ts +23 -0
- package/dist/core/program/create.d.ts.map +1 -0
- package/dist/core/program/create.js +159 -0
- package/dist/core/program/delete.d.ts +14 -0
- package/dist/core/program/delete.d.ts.map +1 -0
- package/dist/core/program/delete.js +21 -0
- package/dist/core/program/index.d.ts +14 -0
- package/dist/core/program/index.d.ts.map +1 -0
- package/dist/core/program/index.js +31 -0
- package/dist/core/program/lock.d.ts +20 -0
- package/dist/core/program/lock.d.ts.map +1 -0
- package/dist/core/program/lock.js +49 -0
- package/dist/core/program/read.d.ts +26 -0
- package/dist/core/program/read.d.ts.map +1 -0
- package/dist/core/program/read.js +51 -0
- package/dist/core/program/unlock.d.ts +11 -0
- package/dist/core/program/unlock.d.ts.map +1 -0
- package/dist/core/program/unlock.js +16 -0
- package/dist/core/program/update.d.ts +16 -0
- package/dist/core/program/update.d.ts.map +1 -0
- package/dist/core/program/update.js +82 -0
- package/dist/core/program/validation.d.ts +10 -0
- package/dist/core/program/validation.d.ts.map +1 -0
- package/dist/core/program/validation.js +17 -0
- package/dist/core/readOperations.d.ts +63 -0
- package/dist/core/readOperations.d.ts.map +1 -0
- package/dist/core/readOperations.js +204 -0
- package/dist/core/shared/checkRun.d.ts +68 -0
- package/dist/core/shared/checkRun.d.ts.map +1 -0
- package/dist/core/shared/checkRun.js +292 -0
- package/dist/core/shared/readMetadata.d.ts +16 -0
- package/dist/core/shared/readMetadata.d.ts.map +1 -0
- package/dist/core/shared/readMetadata.js +74 -0
- package/dist/core/shared/readSource.d.ts +21 -0
- package/dist/core/shared/readSource.d.ts.map +1 -0
- package/dist/core/shared/readSource.js +83 -0
- package/dist/core/shared/search.d.ts +26 -0
- package/dist/core/shared/search.d.ts.map +1 -0
- package/dist/core/shared/search.js +32 -0
- package/dist/core/shared/sqlQuery.d.ts +22 -0
- package/dist/core/shared/sqlQuery.d.ts.map +1 -0
- package/dist/core/shared/sqlQuery.js +36 -0
- package/dist/core/shared/systemInfo.d.ts +22 -0
- package/dist/core/shared/systemInfo.d.ts.map +1 -0
- package/dist/core/shared/systemInfo.js +67 -0
- package/dist/core/shared/tableContents.d.ts +22 -0
- package/dist/core/shared/tableContents.d.ts.map +1 -0
- package/dist/core/shared/tableContents.js +89 -0
- package/dist/core/shared/validation.d.ts +26 -0
- package/dist/core/shared/validation.d.ts.map +1 -0
- package/dist/core/shared/validation.js +134 -0
- package/dist/core/shared/whereUsed.d.ts +19 -0
- package/dist/core/shared/whereUsed.d.ts.map +1 -0
- package/dist/core/shared/whereUsed.js +88 -0
- package/dist/core/structure/StructureBuilder.d.ts +124 -0
- package/dist/core/structure/StructureBuilder.d.ts.map +1 -0
- package/dist/core/structure/StructureBuilder.js +357 -0
- package/dist/core/structure/activation.d.ts +10 -0
- package/dist/core/structure/activation.d.ts.map +1 -0
- package/dist/core/structure/activation.js +15 -0
- package/dist/core/structure/check.d.ts +12 -0
- package/dist/core/structure/check.d.ts.map +1 -0
- package/dist/core/structure/check.js +44 -0
- package/dist/core/structure/create.d.ts +12 -0
- package/dist/core/structure/create.d.ts.map +1 -0
- package/dist/core/structure/create.js +136 -0
- package/dist/core/structure/delete.d.ts +14 -0
- package/dist/core/structure/delete.d.ts.map +1 -0
- package/dist/core/structure/delete.js +21 -0
- package/dist/core/structure/index.d.ts +15 -0
- package/dist/core/structure/index.d.ts.map +1 -0
- package/dist/core/structure/index.js +32 -0
- package/dist/core/structure/lock.d.ts +10 -0
- package/dist/core/structure/lock.d.ts.map +1 -0
- package/dist/core/structure/lock.js +28 -0
- package/dist/core/structure/read.d.ts +26 -0
- package/dist/core/structure/read.d.ts.map +1 -0
- package/dist/core/structure/read.js +51 -0
- package/dist/core/structure/types.d.ts +33 -0
- package/dist/core/structure/types.d.ts.map +1 -0
- package/dist/core/structure/types.js +5 -0
- package/dist/core/structure/unlock.d.ts +11 -0
- package/dist/core/structure/unlock.d.ts.map +1 -0
- package/dist/core/structure/unlock.js +16 -0
- package/dist/core/structure/update.d.ts +11 -0
- package/dist/core/structure/update.d.ts.map +1 -0
- package/dist/core/structure/update.js +26 -0
- package/dist/core/structure/validation.d.ts +10 -0
- package/dist/core/structure/validation.d.ts.map +1 -0
- package/dist/core/structure/validation.js +17 -0
- package/dist/core/table/TableBuilder.d.ts +115 -0
- package/dist/core/table/TableBuilder.d.ts.map +1 -0
- package/dist/core/table/TableBuilder.js +328 -0
- package/dist/core/table/activation.d.ts +10 -0
- package/dist/core/table/activation.d.ts.map +1 -0
- package/dist/core/table/activation.js +15 -0
- package/dist/core/table/check.d.ts +11 -0
- package/dist/core/table/check.d.ts.map +1 -0
- package/dist/core/table/check.js +30 -0
- package/dist/core/table/create.d.ts +12 -0
- package/dist/core/table/create.d.ts.map +1 -0
- package/dist/core/table/create.js +182 -0
- package/dist/core/table/delete.d.ts +14 -0
- package/dist/core/table/delete.d.ts.map +1 -0
- package/dist/core/table/delete.js +21 -0
- package/dist/core/table/index.d.ts +15 -0
- package/dist/core/table/index.d.ts.map +1 -0
- package/dist/core/table/index.js +32 -0
- package/dist/core/table/lock.d.ts +9 -0
- package/dist/core/table/lock.d.ts.map +1 -0
- package/dist/core/table/lock.js +29 -0
- package/dist/core/table/read.d.ts +26 -0
- package/dist/core/table/read.d.ts.map +1 -0
- package/dist/core/table/read.js +51 -0
- package/dist/core/table/types.d.ts +10 -0
- package/dist/core/table/types.d.ts.map +1 -0
- package/dist/core/table/types.js +5 -0
- package/dist/core/table/unlock.d.ts +15 -0
- package/dist/core/table/unlock.d.ts.map +1 -0
- package/dist/core/table/unlock.js +32 -0
- package/dist/core/table/update.d.ts +16 -0
- package/dist/core/table/update.d.ts.map +1 -0
- package/dist/core/table/update.js +32 -0
- package/dist/core/table/validation.d.ts +10 -0
- package/dist/core/table/validation.d.ts.map +1 -0
- package/dist/core/table/validation.js +17 -0
- package/dist/core/transport/TransportBuilder.d.ts +85 -0
- package/dist/core/transport/TransportBuilder.d.ts.map +1 -0
- package/dist/core/transport/TransportBuilder.js +154 -0
- package/dist/core/transport/create.d.ts +11 -0
- package/dist/core/transport/create.d.ts.map +1 -0
- package/dist/core/transport/create.js +157 -0
- package/dist/core/transport/index.d.ts +8 -0
- package/dist/core/transport/index.d.ts.map +1 -0
- package/dist/core/transport/index.js +25 -0
- package/dist/core/transport/read.d.ts +10 -0
- package/dist/core/transport/read.d.ts.map +1 -0
- package/dist/core/transport/read.js +22 -0
- package/dist/core/transport/types.d.ts +10 -0
- package/dist/core/transport/types.d.ts.map +1 -0
- package/dist/core/transport/types.js +5 -0
- package/dist/core/view/ViewBuilder.d.ts +117 -0
- package/dist/core/view/ViewBuilder.d.ts.map +1 -0
- package/dist/core/view/ViewBuilder.js +335 -0
- package/dist/core/view/activation.d.ts +10 -0
- package/dist/core/view/activation.d.ts.map +1 -0
- package/dist/core/view/activation.js +15 -0
- package/dist/core/view/check.d.ts +7 -0
- package/dist/core/view/check.d.ts.map +1 -0
- package/dist/core/view/check.js +57 -0
- package/dist/core/view/create.d.ts +12 -0
- package/dist/core/view/create.d.ts.map +1 -0
- package/dist/core/view/create.js +88 -0
- package/dist/core/view/delete.d.ts +14 -0
- package/dist/core/view/delete.d.ts.map +1 -0
- package/dist/core/view/delete.js +21 -0
- package/dist/core/view/index.d.ts +15 -0
- package/dist/core/view/index.d.ts.map +1 -0
- package/dist/core/view/index.js +32 -0
- package/dist/core/view/lock.d.ts +18 -0
- package/dist/core/view/lock.d.ts.map +1 -0
- package/dist/core/view/lock.js +45 -0
- package/dist/core/view/read.d.ts +26 -0
- package/dist/core/view/read.d.ts.map +1 -0
- package/dist/core/view/read.js +51 -0
- package/dist/core/view/types.d.ts +19 -0
- package/dist/core/view/types.d.ts.map +1 -0
- package/dist/core/view/types.js +5 -0
- package/dist/core/view/unlock.d.ts +10 -0
- package/dist/core/view/unlock.d.ts.map +1 -0
- package/dist/core/view/unlock.js +15 -0
- package/dist/core/view/update.d.ts +12 -0
- package/dist/core/view/update.d.ts.map +1 -0
- package/dist/core/view/update.js +89 -0
- package/dist/core/view/validation.d.ts +10 -0
- package/dist/core/view/validation.d.ts.map +1 -0
- package/dist/core/view/validation.js +17 -0
- package/dist/core.d.ts +133 -0
- package/dist/core.d.ts.map +1 -0
- package/dist/core.js +175 -0
- package/dist/index.d.ts +38 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +60 -0
- package/dist/utils/activationUtils.d.ts +44 -0
- package/dist/utils/activationUtils.d.ts.map +1 -0
- package/dist/utils/activationUtils.js +127 -0
- package/dist/utils/internalUtils.d.ts +12 -0
- package/dist/utils/internalUtils.d.ts.map +1 -0
- package/dist/utils/internalUtils.js +16 -0
- package/dist/utils/lockStateManager.d.ts +64 -0
- package/dist/utils/lockStateManager.d.ts.map +1 -0
- package/dist/utils/lockStateManager.js +172 -0
- package/dist/utils/sessionUtils.d.ts +69 -0
- package/dist/utils/sessionUtils.d.ts.map +1 -0
- package/dist/utils/sessionUtils.js +134 -0
- package/package.json +75 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared utilities for reading object source code
|
|
3
|
+
* Source endpoints return source code text (plain text or XML)
|
|
4
|
+
* Only available for objects that have source code
|
|
5
|
+
*/
|
|
6
|
+
import { AbapConnection } from '@mcp-abap-adt/connection';
|
|
7
|
+
import { AxiosResponse } from 'axios';
|
|
8
|
+
/**
|
|
9
|
+
* Get object source URI based on object type
|
|
10
|
+
*/
|
|
11
|
+
export declare function getObjectSourceUri(objectType: string, objectName: string, functionGroup?: string, version?: 'active' | 'inactive'): string;
|
|
12
|
+
/**
|
|
13
|
+
* Check if object type supports source code reading
|
|
14
|
+
*/
|
|
15
|
+
export declare function supportsSourceCode(objectType: string): boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Read object source code
|
|
18
|
+
* Only works for objects that have source code (class, program, interface, etc.)
|
|
19
|
+
*/
|
|
20
|
+
export declare function readObjectSource(connection: AbapConnection, objectType: string, objectName: string, functionGroup?: string, version?: 'active' | 'inactive'): Promise<AxiosResponse>;
|
|
21
|
+
//# sourceMappingURL=readSource.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readSource.d.ts","sourceRoot":"","sources":["../../../src/core/shared/readSource.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAc,MAAM,0BAA0B,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAGtC;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,aAAa,CAAC,EAAE,MAAM,EACtB,OAAO,GAAE,QAAQ,GAAG,UAAqB,GACxC,MAAM,CAiCR;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAW9D;AAED;;;GAGG;AACH,wBAAsB,gBAAgB,CACpC,UAAU,EAAE,cAAc,EAC1B,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,aAAa,CAAC,EAAE,MAAM,EACtB,OAAO,GAAE,QAAQ,GAAG,UAAqB,GACxC,OAAO,CAAC,aAAa,CAAC,CAiBxB"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Shared utilities for reading object source code
|
|
4
|
+
* Source endpoints return source code text (plain text or XML)
|
|
5
|
+
* Only available for objects that have source code
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.getObjectSourceUri = getObjectSourceUri;
|
|
9
|
+
exports.supportsSourceCode = supportsSourceCode;
|
|
10
|
+
exports.readObjectSource = readObjectSource;
|
|
11
|
+
const connection_1 = require("@mcp-abap-adt/connection");
|
|
12
|
+
const internalUtils_1 = require("../../utils/internalUtils");
|
|
13
|
+
/**
|
|
14
|
+
* Get object source URI based on object type
|
|
15
|
+
*/
|
|
16
|
+
function getObjectSourceUri(objectType, objectName, functionGroup, version = 'active') {
|
|
17
|
+
const encodedName = (0, internalUtils_1.encodeSapObjectName)(objectName);
|
|
18
|
+
const versionParam = version === 'inactive' ? '?version=inactive' : '';
|
|
19
|
+
switch (objectType.toLowerCase()) {
|
|
20
|
+
case 'class':
|
|
21
|
+
case 'clas/oc':
|
|
22
|
+
return `/sap/bc/adt/oo/classes/${encodedName}/source/main${versionParam}`;
|
|
23
|
+
case 'program':
|
|
24
|
+
case 'prog/p':
|
|
25
|
+
return `/sap/bc/adt/programs/programs/${encodedName}/source/main`;
|
|
26
|
+
case 'interface':
|
|
27
|
+
case 'intf/if':
|
|
28
|
+
return `/sap/bc/adt/oo/interfaces/${encodedName}/source/main`;
|
|
29
|
+
case 'functionmodule':
|
|
30
|
+
case 'fugr/ff':
|
|
31
|
+
if (!functionGroup) {
|
|
32
|
+
throw new Error('Function group is required for function module');
|
|
33
|
+
}
|
|
34
|
+
const encodedGroup = (0, internalUtils_1.encodeSapObjectName)(functionGroup);
|
|
35
|
+
return `/sap/bc/adt/functions/groups/${encodedGroup}/fmodules/${encodedName}/source/main${versionParam}`;
|
|
36
|
+
case 'view':
|
|
37
|
+
case 'ddls/df':
|
|
38
|
+
return `/sap/bc/adt/ddic/ddl/sources/${encodedName}/source/main`;
|
|
39
|
+
case 'structure':
|
|
40
|
+
case 'stru/dt':
|
|
41
|
+
return `/sap/bc/adt/ddic/structures/${encodedName}/source/main`;
|
|
42
|
+
case 'table':
|
|
43
|
+
case 'tabl/dt':
|
|
44
|
+
return `/sap/bc/adt/ddic/tables/${encodedName}/source/main`;
|
|
45
|
+
default:
|
|
46
|
+
throw new Error(`Object type ${objectType} does not support source code reading`);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Check if object type supports source code reading
|
|
51
|
+
*/
|
|
52
|
+
function supportsSourceCode(objectType) {
|
|
53
|
+
const supportedTypes = [
|
|
54
|
+
'class', 'clas/oc',
|
|
55
|
+
'program', 'prog/p',
|
|
56
|
+
'interface', 'intf/if',
|
|
57
|
+
'functionmodule', 'fugr/ff',
|
|
58
|
+
'view', 'ddls/df',
|
|
59
|
+
'structure', 'stru/dt',
|
|
60
|
+
'table', 'tabl/dt'
|
|
61
|
+
];
|
|
62
|
+
return supportedTypes.includes(objectType.toLowerCase());
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Read object source code
|
|
66
|
+
* Only works for objects that have source code (class, program, interface, etc.)
|
|
67
|
+
*/
|
|
68
|
+
async function readObjectSource(connection, objectType, objectName, functionGroup, version = 'active') {
|
|
69
|
+
if (!supportsSourceCode(objectType)) {
|
|
70
|
+
throw new Error(`Object type ${objectType} does not support source code reading`);
|
|
71
|
+
}
|
|
72
|
+
const baseUrl = await connection.getBaseUrl();
|
|
73
|
+
const uri = getObjectSourceUri(objectType, objectName, functionGroup, version);
|
|
74
|
+
const url = `${baseUrl}${uri}`;
|
|
75
|
+
return connection.makeAdtRequest({
|
|
76
|
+
url,
|
|
77
|
+
method: 'GET',
|
|
78
|
+
timeout: (0, connection_1.getTimeout)('default'),
|
|
79
|
+
headers: {
|
|
80
|
+
'Accept': 'text/plain'
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Search operations for ABAP objects
|
|
3
|
+
*/
|
|
4
|
+
import { AbapConnection } from '@mcp-abap-adt/connection';
|
|
5
|
+
import { AxiosResponse } from 'axios';
|
|
6
|
+
export interface SearchObjectsParams {
|
|
7
|
+
query: string;
|
|
8
|
+
objectType?: string;
|
|
9
|
+
maxResults?: number;
|
|
10
|
+
}
|
|
11
|
+
export interface SearchResult {
|
|
12
|
+
name: string;
|
|
13
|
+
type: string;
|
|
14
|
+
description: string;
|
|
15
|
+
packageName?: string;
|
|
16
|
+
uri?: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Search for ABAP objects by name pattern
|
|
20
|
+
*
|
|
21
|
+
* @param connection - ABAP connection
|
|
22
|
+
* @param params - Search parameters
|
|
23
|
+
* @returns Search results
|
|
24
|
+
*/
|
|
25
|
+
export declare function searchObjects(connection: AbapConnection, params: SearchObjectsParams): Promise<AxiosResponse>;
|
|
26
|
+
//# sourceMappingURL=search.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../../src/core/shared/search.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAc,MAAM,0BAA0B,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAGtC,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED;;;;;;GAMG;AACH,wBAAsB,aAAa,CACjC,UAAU,EAAE,cAAc,EAC1B,MAAM,EAAE,mBAAmB,GAC1B,OAAO,CAAC,aAAa,CAAC,CAmBxB"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Search operations for ABAP objects
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.searchObjects = searchObjects;
|
|
7
|
+
const connection_1 = require("@mcp-abap-adt/connection");
|
|
8
|
+
const internalUtils_1 = require("../../utils/internalUtils");
|
|
9
|
+
/**
|
|
10
|
+
* Search for ABAP objects by name pattern
|
|
11
|
+
*
|
|
12
|
+
* @param connection - ABAP connection
|
|
13
|
+
* @param params - Search parameters
|
|
14
|
+
* @returns Search results
|
|
15
|
+
*/
|
|
16
|
+
async function searchObjects(connection, params) {
|
|
17
|
+
const baseUrl = await connection.getBaseUrl();
|
|
18
|
+
const encodedQuery = (0, internalUtils_1.encodeSapObjectName)(params.query);
|
|
19
|
+
const maxResults = params.maxResults || 100;
|
|
20
|
+
let url = `${baseUrl}/sap/bc/adt/repository/informationsystem/search?operation=quickSearch&query=${encodedQuery}&maxResults=${maxResults}`;
|
|
21
|
+
if (params.objectType) {
|
|
22
|
+
url += `&objectType=${(0, internalUtils_1.encodeSapObjectName)(params.objectType)}`;
|
|
23
|
+
}
|
|
24
|
+
return connection.makeAdtRequest({
|
|
25
|
+
url,
|
|
26
|
+
method: 'GET',
|
|
27
|
+
timeout: (0, connection_1.getTimeout)('default'),
|
|
28
|
+
headers: {
|
|
29
|
+
'Accept': 'application/xml'
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SQL query operations via ADT Data Preview API
|
|
3
|
+
*
|
|
4
|
+
* ⚠️ ABAP Cloud Limitation: Direct execution of SQL queries through ADT Data Preview
|
|
5
|
+
* is blocked by SAP BTP backend policies when using JWT/XSUAA authentication.
|
|
6
|
+
* This function works only for on-premise systems with basic authentication.
|
|
7
|
+
*/
|
|
8
|
+
import { AbapConnection } from '@mcp-abap-adt/connection';
|
|
9
|
+
import { AxiosResponse } from 'axios';
|
|
10
|
+
export interface GetSqlQueryParams {
|
|
11
|
+
sql_query: string;
|
|
12
|
+
row_number?: number;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Execute freestyle SQL query via SAP ADT Data Preview API
|
|
16
|
+
*
|
|
17
|
+
* @param connection - ABAP connection
|
|
18
|
+
* @param params - SQL query parameters
|
|
19
|
+
* @returns Query results
|
|
20
|
+
*/
|
|
21
|
+
export declare function getSqlQuery(connection: AbapConnection, params: GetSqlQueryParams): Promise<AxiosResponse>;
|
|
22
|
+
//# sourceMappingURL=sqlQuery.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sqlQuery.d.ts","sourceRoot":"","sources":["../../../src/core/shared/sqlQuery.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,cAAc,EAAc,MAAM,0BAA0B,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;GAMG;AACH,wBAAsB,WAAW,CAC/B,UAAU,EAAE,cAAc,EAC1B,MAAM,EAAE,iBAAiB,GACxB,OAAO,CAAC,aAAa,CAAC,CAmBxB"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* SQL query operations via ADT Data Preview API
|
|
4
|
+
*
|
|
5
|
+
* ⚠️ ABAP Cloud Limitation: Direct execution of SQL queries through ADT Data Preview
|
|
6
|
+
* is blocked by SAP BTP backend policies when using JWT/XSUAA authentication.
|
|
7
|
+
* This function works only for on-premise systems with basic authentication.
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.getSqlQuery = getSqlQuery;
|
|
11
|
+
const connection_1 = require("@mcp-abap-adt/connection");
|
|
12
|
+
/**
|
|
13
|
+
* Execute freestyle SQL query via SAP ADT Data Preview API
|
|
14
|
+
*
|
|
15
|
+
* @param connection - ABAP connection
|
|
16
|
+
* @param params - SQL query parameters
|
|
17
|
+
* @returns Query results
|
|
18
|
+
*/
|
|
19
|
+
async function getSqlQuery(connection, params) {
|
|
20
|
+
if (!params.sql_query) {
|
|
21
|
+
throw new Error('SQL query is required');
|
|
22
|
+
}
|
|
23
|
+
const baseUrl = await connection.getBaseUrl();
|
|
24
|
+
const rowNumber = params.row_number || 100;
|
|
25
|
+
const url = `${baseUrl}/sap/bc/adt/datapreview/freestyle?rowNumber=${rowNumber}`;
|
|
26
|
+
return connection.makeAdtRequest({
|
|
27
|
+
url,
|
|
28
|
+
method: 'POST',
|
|
29
|
+
timeout: (0, connection_1.getTimeout)('long'),
|
|
30
|
+
data: params.sql_query,
|
|
31
|
+
headers: {
|
|
32
|
+
'Content-Type': 'text/plain; charset=utf-8',
|
|
33
|
+
'Accept': 'application/xml'
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared system information utilities
|
|
3
|
+
*/
|
|
4
|
+
import { AbapConnection } from '@mcp-abap-adt/connection';
|
|
5
|
+
/**
|
|
6
|
+
* Get system information from SAP ADT (for cloud systems)
|
|
7
|
+
* Returns systemID and userName if available
|
|
8
|
+
*/
|
|
9
|
+
export declare function getSystemInformation(connection: AbapConnection): Promise<{
|
|
10
|
+
systemID?: string;
|
|
11
|
+
userName?: string;
|
|
12
|
+
client?: string;
|
|
13
|
+
language?: string;
|
|
14
|
+
userFullName?: string;
|
|
15
|
+
} | null>;
|
|
16
|
+
/**
|
|
17
|
+
* Check if the system is a BTP ABAP Cloud Environment
|
|
18
|
+
* Returns true if the systeminformation endpoint is available (cloud system)
|
|
19
|
+
* Returns false if the endpoint doesn't exist (on-premise system)
|
|
20
|
+
*/
|
|
21
|
+
export declare function isCloudEnvironment(connection: AbapConnection): Promise<boolean>;
|
|
22
|
+
//# sourceMappingURL=systemInfo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"systemInfo.d.ts","sourceRoot":"","sources":["../../../src/core/shared/systemInfo.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAc,MAAM,0BAA0B,CAAC;AAGtE;;;GAGG;AACH,wBAAsB,oBAAoB,CACxC,UAAU,EAAE,cAAc,GACzB,OAAO,CAAC;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAAC,CAiDrH;AAED;;;;GAIG;AACH,wBAAsB,kBAAkB,CAAC,UAAU,EAAE,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC,CAGrF"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Shared system information utilities
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getSystemInformation = getSystemInformation;
|
|
7
|
+
exports.isCloudEnvironment = isCloudEnvironment;
|
|
8
|
+
const connection_1 = require("@mcp-abap-adt/connection");
|
|
9
|
+
/**
|
|
10
|
+
* Get system information from SAP ADT (for cloud systems)
|
|
11
|
+
* Returns systemID and userName if available
|
|
12
|
+
*/
|
|
13
|
+
async function getSystemInformation(connection) {
|
|
14
|
+
try {
|
|
15
|
+
const baseUrl = await connection.getBaseUrl();
|
|
16
|
+
const url = `${baseUrl}/sap/bc/adt/core/http/systeminformation`;
|
|
17
|
+
const headers = {
|
|
18
|
+
'Accept': 'application/vnd.sap.adt.core.http.systeminformation.v1+json'
|
|
19
|
+
};
|
|
20
|
+
// Add cache busting parameter like Eclipse does
|
|
21
|
+
const params = {
|
|
22
|
+
'_': Date.now()
|
|
23
|
+
};
|
|
24
|
+
const response = await connection.makeAdtRequest({
|
|
25
|
+
url,
|
|
26
|
+
method: 'GET',
|
|
27
|
+
timeout: (0, connection_1.getTimeout)('default'),
|
|
28
|
+
headers,
|
|
29
|
+
params
|
|
30
|
+
});
|
|
31
|
+
// Parse response - can be JSON or XML
|
|
32
|
+
let data = response.data;
|
|
33
|
+
if (typeof data === 'string') {
|
|
34
|
+
try {
|
|
35
|
+
// Try to parse as JSON
|
|
36
|
+
data = JSON.parse(data);
|
|
37
|
+
}
|
|
38
|
+
catch {
|
|
39
|
+
// If not JSON, might be XML or error - return null
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
if (data && typeof data === 'object') {
|
|
44
|
+
return {
|
|
45
|
+
systemID: data.systemID,
|
|
46
|
+
userName: data.userName,
|
|
47
|
+
userFullName: data.userFullName,
|
|
48
|
+
client: data.client,
|
|
49
|
+
language: data.language
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
catch (error) {
|
|
55
|
+
// If endpoint doesn't exist (on-premise) or returns error, return null
|
|
56
|
+
return null;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Check if the system is a BTP ABAP Cloud Environment
|
|
61
|
+
* Returns true if the systeminformation endpoint is available (cloud system)
|
|
62
|
+
* Returns false if the endpoint doesn't exist (on-premise system)
|
|
63
|
+
*/
|
|
64
|
+
async function isCloudEnvironment(connection) {
|
|
65
|
+
const systemInfo = await getSystemInformation(connection);
|
|
66
|
+
return systemInfo !== null;
|
|
67
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Table contents operations via ADT Data Preview API
|
|
3
|
+
*
|
|
4
|
+
* ⚠️ ABAP Cloud Limitation: Direct access to table data through ADT Data Preview
|
|
5
|
+
* is blocked by SAP BTP backend policies when using JWT/XSUAA authentication.
|
|
6
|
+
* This function works only for on-premise systems with basic authentication.
|
|
7
|
+
*/
|
|
8
|
+
import { AbapConnection } from '@mcp-abap-adt/connection';
|
|
9
|
+
import { AxiosResponse } from 'axios';
|
|
10
|
+
export interface GetTableContentsParams {
|
|
11
|
+
table_name: string;
|
|
12
|
+
max_rows?: number;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Get table contents via ADT Data Preview API
|
|
16
|
+
*
|
|
17
|
+
* @param connection - ABAP connection
|
|
18
|
+
* @param params - Table contents parameters
|
|
19
|
+
* @returns Table contents
|
|
20
|
+
*/
|
|
21
|
+
export declare function getTableContents(connection: AbapConnection, params: GetTableContentsParams): Promise<AxiosResponse>;
|
|
22
|
+
//# sourceMappingURL=tableContents.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tableContents.d.ts","sourceRoot":"","sources":["../../../src/core/shared/tableContents.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,cAAc,EAAc,MAAM,0BAA0B,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAGtC,MAAM,WAAW,sBAAsB;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;GAMG;AACH,wBAAsB,gBAAgB,CACpC,UAAU,EAAE,cAAc,EAC1B,MAAM,EAAE,sBAAsB,GAC7B,OAAO,CAAC,aAAa,CAAC,CA8ExB"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Table contents operations via ADT Data Preview API
|
|
4
|
+
*
|
|
5
|
+
* ⚠️ ABAP Cloud Limitation: Direct access to table data through ADT Data Preview
|
|
6
|
+
* is blocked by SAP BTP backend policies when using JWT/XSUAA authentication.
|
|
7
|
+
* This function works only for on-premise systems with basic authentication.
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.getTableContents = getTableContents;
|
|
11
|
+
const connection_1 = require("@mcp-abap-adt/connection");
|
|
12
|
+
const internalUtils_1 = require("../../utils/internalUtils");
|
|
13
|
+
/**
|
|
14
|
+
* Get table contents via ADT Data Preview API
|
|
15
|
+
*
|
|
16
|
+
* @param connection - ABAP connection
|
|
17
|
+
* @param params - Table contents parameters
|
|
18
|
+
* @returns Table contents
|
|
19
|
+
*/
|
|
20
|
+
async function getTableContents(connection, params) {
|
|
21
|
+
if (!params.table_name) {
|
|
22
|
+
throw new Error('Table name is required');
|
|
23
|
+
}
|
|
24
|
+
const baseUrl = await connection.getBaseUrl();
|
|
25
|
+
const maxRows = params.max_rows || 100;
|
|
26
|
+
const encodedName = (0, internalUtils_1.encodeSapObjectName)(params.table_name);
|
|
27
|
+
// First, get table structure to know all fields
|
|
28
|
+
const structureUrl = `${baseUrl}/sap/bc/adt/ddic/tables/${encodedName}/source/main`;
|
|
29
|
+
// Get table structure
|
|
30
|
+
const structureResponse = await connection.makeAdtRequest({
|
|
31
|
+
url: structureUrl,
|
|
32
|
+
method: 'GET',
|
|
33
|
+
timeout: (0, connection_1.getTimeout)('default'),
|
|
34
|
+
headers: {}
|
|
35
|
+
});
|
|
36
|
+
// Parse table structure to extract field names
|
|
37
|
+
const structureText = structureResponse.data;
|
|
38
|
+
const fields = [];
|
|
39
|
+
// Extract field names from ABAP table definition
|
|
40
|
+
// Support both old and new CDS view syntax
|
|
41
|
+
if (structureText.includes('define table')) {
|
|
42
|
+
// New CDS syntax
|
|
43
|
+
const lines = structureText.split('\n');
|
|
44
|
+
for (const line of lines) {
|
|
45
|
+
const trimmedLine = line.trim();
|
|
46
|
+
const fieldMatch = trimmedLine.match(/^(key\s+)?([a-z0-9_]+)\s*:\s*[a-z0-9_]+/i);
|
|
47
|
+
if (fieldMatch) {
|
|
48
|
+
const fieldName = fieldMatch[2].trim().toUpperCase();
|
|
49
|
+
if (fieldName && fieldName.length > 0) {
|
|
50
|
+
fields.push(`${params.table_name}~${fieldName}`);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
// Old ABAP syntax
|
|
57
|
+
const patterns = [
|
|
58
|
+
/^\s+([A-Z0-9_]+)\s*:\s*(TYPE|LIKE)/gmi,
|
|
59
|
+
/^\s+([A-Z0-9_]+)\s+(TYPE|LIKE)/gmi,
|
|
60
|
+
/^\s+([A-Z0-9_]+)\s*:\s*[A-Z0-9_]+/gmi
|
|
61
|
+
];
|
|
62
|
+
for (const pattern of patterns) {
|
|
63
|
+
let match;
|
|
64
|
+
while ((match = pattern.exec(structureText)) !== null) {
|
|
65
|
+
const fieldName = match[1].trim().toUpperCase();
|
|
66
|
+
if (fieldName && fieldName.length > 0 && !fields.includes(`${params.table_name}~${fieldName}`)) {
|
|
67
|
+
fields.push(`${params.table_name}~${fieldName}`);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
if (fields.length === 0) {
|
|
73
|
+
throw new Error('Could not extract field names from table structure');
|
|
74
|
+
}
|
|
75
|
+
// Build SQL query with explicit field list
|
|
76
|
+
const sqlQuery = `SELECT ${fields.join(', ')} FROM ${params.table_name}`;
|
|
77
|
+
// Execute SQL query via Data Preview API
|
|
78
|
+
const url = `${baseUrl}/sap/bc/adt/datapreview/freestyle?rowNumber=${maxRows}`;
|
|
79
|
+
return connection.makeAdtRequest({
|
|
80
|
+
url,
|
|
81
|
+
method: 'POST',
|
|
82
|
+
timeout: (0, connection_1.getTimeout)('long'),
|
|
83
|
+
data: sqlQuery,
|
|
84
|
+
headers: {
|
|
85
|
+
'Content-Type': 'text/plain; charset=utf-8',
|
|
86
|
+
'Accept': 'application/xml'
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared validation utilities for SAP object names
|
|
3
|
+
*/
|
|
4
|
+
import { AbapConnection } from '@mcp-abap-adt/connection';
|
|
5
|
+
export interface ValidationResult {
|
|
6
|
+
valid: boolean;
|
|
7
|
+
severity?: 'ERROR' | 'WARNING' | 'INFO';
|
|
8
|
+
message?: string;
|
|
9
|
+
longText?: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Validate object name using SAP ADT validation endpoint
|
|
13
|
+
*
|
|
14
|
+
* @param connection - ABAP connection
|
|
15
|
+
* @param objectType - SAP object type (e.g., 'FUGR/FF', 'CLAS/OC', 'PROG/P')
|
|
16
|
+
* @param objectName - Name to validate
|
|
17
|
+
* @param additionalParams - Additional validation parameters (e.g., fugrname, description)
|
|
18
|
+
* @returns ValidationResult with status and messages
|
|
19
|
+
*/
|
|
20
|
+
export declare function validateObjectName(connection: AbapConnection, objectType: string, objectName: string, additionalParams?: Record<string, string>): Promise<ValidationResult>;
|
|
21
|
+
/**
|
|
22
|
+
* Validate and throw error if name is invalid
|
|
23
|
+
* Useful for enforcing validation before object creation
|
|
24
|
+
*/
|
|
25
|
+
export declare function validateAndThrow(validationResult: ValidationResult, objectType: string): Promise<void>;
|
|
26
|
+
//# sourceMappingURL=validation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../src/core/shared/validation.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAc,MAAM,0BAA0B,CAAC;AAItE,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;IACxC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;;GAQG;AACH,wBAAsB,kBAAkB,CACtC,UAAU,EAAE,cAAc,EAC1B,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GACxC,OAAO,CAAC,gBAAgB,CAAC,CA2G3B;AAED;;;GAGG;AACH,wBAAsB,gBAAgB,CACpC,gBAAgB,EAAE,gBAAgB,EAClC,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,IAAI,CAAC,CAef"}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Shared validation utilities for SAP object names
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.validateObjectName = validateObjectName;
|
|
7
|
+
exports.validateAndThrow = validateAndThrow;
|
|
8
|
+
const connection_1 = require("@mcp-abap-adt/connection");
|
|
9
|
+
const fast_xml_parser_1 = require("fast-xml-parser");
|
|
10
|
+
const internalUtils_1 = require("../../utils/internalUtils");
|
|
11
|
+
/**
|
|
12
|
+
* Validate object name using SAP ADT validation endpoint
|
|
13
|
+
*
|
|
14
|
+
* @param connection - ABAP connection
|
|
15
|
+
* @param objectType - SAP object type (e.g., 'FUGR/FF', 'CLAS/OC', 'PROG/P')
|
|
16
|
+
* @param objectName - Name to validate
|
|
17
|
+
* @param additionalParams - Additional validation parameters (e.g., fugrname, description)
|
|
18
|
+
* @returns ValidationResult with status and messages
|
|
19
|
+
*/
|
|
20
|
+
async function validateObjectName(connection, objectType, objectName, additionalParams) {
|
|
21
|
+
const baseUrl = await connection.getBaseUrl();
|
|
22
|
+
const encodedName = (0, internalUtils_1.encodeSapObjectName)(objectName);
|
|
23
|
+
// Build query parameters
|
|
24
|
+
const params = new URLSearchParams({
|
|
25
|
+
objtype: objectType,
|
|
26
|
+
objname: encodedName,
|
|
27
|
+
...additionalParams
|
|
28
|
+
});
|
|
29
|
+
const url = `${baseUrl}/sap/bc/adt/functions/validation?${params.toString()}`;
|
|
30
|
+
try {
|
|
31
|
+
const response = await connection.makeAdtRequest({
|
|
32
|
+
url,
|
|
33
|
+
method: 'POST',
|
|
34
|
+
timeout: (0, connection_1.getTimeout)('default'),
|
|
35
|
+
headers: {
|
|
36
|
+
'Accept': 'application/vnd.sap.as+xml;charset=UTF-8;dataname=com.sap.adt.StatusMessage'
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
// Parse validation response
|
|
40
|
+
const parser = new fast_xml_parser_1.XMLParser({
|
|
41
|
+
ignoreAttributes: false,
|
|
42
|
+
attributeNamePrefix: '@_'
|
|
43
|
+
});
|
|
44
|
+
const result = parser.parse(response.data);
|
|
45
|
+
const data = result['asx:abap']?.['asx:values']?.['DATA'];
|
|
46
|
+
if (data) {
|
|
47
|
+
const severity = data['SEVERITY'];
|
|
48
|
+
const shortText = data['SHORT_TEXT'];
|
|
49
|
+
const longText = data['LONG_TEXT'];
|
|
50
|
+
return {
|
|
51
|
+
valid: severity !== 'ERROR',
|
|
52
|
+
severity,
|
|
53
|
+
message: shortText,
|
|
54
|
+
longText
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
// No validation data means name is valid
|
|
58
|
+
return { valid: true };
|
|
59
|
+
}
|
|
60
|
+
catch (error) {
|
|
61
|
+
// If validation endpoint returns 404, it may not be supported in this SAP version
|
|
62
|
+
if (error.response?.status === 404) {
|
|
63
|
+
// Silently pass - older SAP systems may not have validation endpoint
|
|
64
|
+
return { valid: true };
|
|
65
|
+
}
|
|
66
|
+
// For 400 errors, try to extract meaningful error message
|
|
67
|
+
if (error.response?.status === 400) {
|
|
68
|
+
let errorMessage = 'Validation request failed with status 400';
|
|
69
|
+
if (error.response?.data) {
|
|
70
|
+
if (typeof error.response.data === 'string') {
|
|
71
|
+
// Try to parse XML error
|
|
72
|
+
try {
|
|
73
|
+
const parser = new fast_xml_parser_1.XMLParser({ ignoreAttributes: false, attributeNamePrefix: '@_' });
|
|
74
|
+
const parsed = parser.parse(error.response.data);
|
|
75
|
+
const errorText = parsed['exc:exception']?.message?.['#text'] ||
|
|
76
|
+
parsed['exc:exception']?.message ||
|
|
77
|
+
parsed['exc:exception']?.reason?.['#text'] ||
|
|
78
|
+
parsed['exc:exception']?.reason;
|
|
79
|
+
if (errorText) {
|
|
80
|
+
errorMessage = errorText;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
catch {
|
|
84
|
+
// Not XML, use raw message
|
|
85
|
+
errorMessage = error.response.data.substring(0, 200);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
else if (typeof error.response.data === 'object') {
|
|
89
|
+
errorMessage = JSON.stringify(error.response.data).substring(0, 200);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
// If validation is not supported for this object type, return valid (skip validation)
|
|
93
|
+
const errorMsgLower = errorMessage.toLowerCase();
|
|
94
|
+
if (errorMsgLower.includes('not supported') ||
|
|
95
|
+
(errorMsgLower.includes('object type') && errorMsgLower.includes('not supported'))) {
|
|
96
|
+
return { valid: true }; // Skip validation if not supported
|
|
97
|
+
}
|
|
98
|
+
return {
|
|
99
|
+
valid: false,
|
|
100
|
+
severity: 'ERROR',
|
|
101
|
+
message: errorMessage
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
// For other errors, check if it's about unsupported object type
|
|
105
|
+
const errorMsg = error.message || '';
|
|
106
|
+
if (errorMsg.toLowerCase().includes('not supported') ||
|
|
107
|
+
(errorMsg.toLowerCase().includes('object type') && errorMsg.toLowerCase().includes('not supported'))) {
|
|
108
|
+
return { valid: true }; // Skip validation if not supported
|
|
109
|
+
}
|
|
110
|
+
// For other errors, return as validation failure
|
|
111
|
+
return {
|
|
112
|
+
valid: false,
|
|
113
|
+
severity: 'ERROR',
|
|
114
|
+
message: error.message || 'Validation request failed'
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Validate and throw error if name is invalid
|
|
120
|
+
* Useful for enforcing validation before object creation
|
|
121
|
+
*/
|
|
122
|
+
async function validateAndThrow(validationResult, objectType) {
|
|
123
|
+
if (!validationResult.valid) {
|
|
124
|
+
throw new Error(`${objectType} name validation failed: ${validationResult.message}`);
|
|
125
|
+
}
|
|
126
|
+
// Also throw on critical warnings (SAP naming range violations)
|
|
127
|
+
if (validationResult.severity === 'WARNING' && validationResult.message) {
|
|
128
|
+
if (validationResult.message.includes('reserved for SAP') ||
|
|
129
|
+
validationResult.message.includes('naming range') ||
|
|
130
|
+
validationResult.message.includes('Y_ or Z_')) {
|
|
131
|
+
throw new Error(`${objectType} name validation failed: ${validationResult.message}. Use Y_ or Z_ prefix (with underscore).`);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where-used operations for ABAP objects
|
|
3
|
+
*/
|
|
4
|
+
import { AbapConnection } from '@mcp-abap-adt/connection';
|
|
5
|
+
import { AxiosResponse } from 'axios';
|
|
6
|
+
export interface GetWhereUsedParams {
|
|
7
|
+
object_name: string;
|
|
8
|
+
object_type: string;
|
|
9
|
+
detailed?: boolean;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Get where-used references for ABAP object
|
|
13
|
+
*
|
|
14
|
+
* @param connection - ABAP connection
|
|
15
|
+
* @param params - Where-used parameters
|
|
16
|
+
* @returns Where-used references
|
|
17
|
+
*/
|
|
18
|
+
export declare function getWhereUsed(connection: AbapConnection, params: GetWhereUsedParams): Promise<AxiosResponse>;
|
|
19
|
+
//# sourceMappingURL=whereUsed.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"whereUsed.d.ts","sourceRoot":"","sources":["../../../src/core/shared/whereUsed.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAc,MAAM,0BAA0B,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAGtC,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAuDD;;;;;;GAMG;AACH,wBAAsB,YAAY,CAChC,UAAU,EAAE,cAAc,EAC1B,MAAM,EAAE,kBAAkB,GACzB,OAAO,CAAC,aAAa,CAAC,CAwBxB"}
|