@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,204 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Core read operations - private implementations
|
|
4
|
+
* All read-only methods are implemented here once and reused by clients
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.getProgram = getProgram;
|
|
8
|
+
exports.getClass = getClass;
|
|
9
|
+
exports.getTable = getTable;
|
|
10
|
+
exports.getStructure = getStructure;
|
|
11
|
+
exports.getDomain = getDomain;
|
|
12
|
+
exports.getDataElement = getDataElement;
|
|
13
|
+
exports.getInterface = getInterface;
|
|
14
|
+
exports.getFunctionGroup = getFunctionGroup;
|
|
15
|
+
exports.getFunction = getFunction;
|
|
16
|
+
exports.getPackage = getPackage;
|
|
17
|
+
exports.getView = getView;
|
|
18
|
+
exports.fetchNodeStructure = fetchNodeStructure;
|
|
19
|
+
exports.getSystemInformation = getSystemInformation;
|
|
20
|
+
const internalUtils_1 = require("../utils/internalUtils");
|
|
21
|
+
const connection_1 = require("@mcp-abap-adt/connection");
|
|
22
|
+
/**
|
|
23
|
+
* Internal helper to make ADT request
|
|
24
|
+
*/
|
|
25
|
+
async function makeAdtRequest(connection, url, method = 'GET', timeout = 'default', data, params, headers) {
|
|
26
|
+
const timeoutValue = (0, connection_1.getTimeout)(timeout);
|
|
27
|
+
return connection.makeAdtRequest({
|
|
28
|
+
url,
|
|
29
|
+
method,
|
|
30
|
+
timeout: timeoutValue,
|
|
31
|
+
data,
|
|
32
|
+
params,
|
|
33
|
+
headers,
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Get base URL from connection
|
|
38
|
+
*/
|
|
39
|
+
async function getBaseUrl(connection) {
|
|
40
|
+
return connection.getBaseUrl();
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Get ABAP program source code
|
|
44
|
+
*/
|
|
45
|
+
async function getProgram(connection, programName) {
|
|
46
|
+
const baseUrl = await getBaseUrl(connection);
|
|
47
|
+
const encodedName = (0, internalUtils_1.encodeSapObjectName)(programName);
|
|
48
|
+
const url = `${baseUrl}/sap/bc/adt/programs/programs/${encodedName}/source/main`;
|
|
49
|
+
return makeAdtRequest(connection, url, 'GET', 'default');
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Get ABAP class source code
|
|
53
|
+
*/
|
|
54
|
+
async function getClass(connection, className) {
|
|
55
|
+
const baseUrl = await getBaseUrl(connection);
|
|
56
|
+
const encodedName = (0, internalUtils_1.encodeSapObjectName)(className);
|
|
57
|
+
const url = `${baseUrl}/sap/bc/adt/oo/classes/${encodedName}/source/main`;
|
|
58
|
+
return makeAdtRequest(connection, url, 'GET', 'default');
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Get ABAP table structure
|
|
62
|
+
*/
|
|
63
|
+
async function getTable(connection, tableName) {
|
|
64
|
+
const baseUrl = await getBaseUrl(connection);
|
|
65
|
+
const encodedName = (0, internalUtils_1.encodeSapObjectName)(tableName);
|
|
66
|
+
const url = `${baseUrl}/sap/bc/adt/ddic/tables/${encodedName}/source/main`;
|
|
67
|
+
return makeAdtRequest(connection, url, 'GET', 'default');
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Get ABAP structure
|
|
71
|
+
*/
|
|
72
|
+
async function getStructure(connection, structureName) {
|
|
73
|
+
const baseUrl = await getBaseUrl(connection);
|
|
74
|
+
const encodedName = (0, internalUtils_1.encodeSapObjectName)(structureName);
|
|
75
|
+
const url = `${baseUrl}/sap/bc/adt/ddic/structures/${encodedName}/source/main`;
|
|
76
|
+
return makeAdtRequest(connection, url, 'GET', 'default');
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Get ABAP domain
|
|
80
|
+
*/
|
|
81
|
+
async function getDomain(connection, domainName) {
|
|
82
|
+
const baseUrl = await getBaseUrl(connection);
|
|
83
|
+
const encodedName = (0, internalUtils_1.encodeSapObjectName)(domainName);
|
|
84
|
+
const url = `${baseUrl}/sap/bc/adt/ddic/domains/${encodedName}`;
|
|
85
|
+
return makeAdtRequest(connection, url, 'GET', 'default');
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Get ABAP data element
|
|
89
|
+
*/
|
|
90
|
+
async function getDataElement(connection, dataElementName) {
|
|
91
|
+
const baseUrl = await getBaseUrl(connection);
|
|
92
|
+
const encodedName = (0, internalUtils_1.encodeSapObjectName)(dataElementName);
|
|
93
|
+
const url = `${baseUrl}/sap/bc/adt/ddic/dataelements/${encodedName}`;
|
|
94
|
+
return makeAdtRequest(connection, url, 'GET', 'default');
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Get ABAP interface
|
|
98
|
+
*/
|
|
99
|
+
async function getInterface(connection, interfaceName) {
|
|
100
|
+
const baseUrl = await getBaseUrl(connection);
|
|
101
|
+
const encodedName = (0, internalUtils_1.encodeSapObjectName)(interfaceName);
|
|
102
|
+
const url = `${baseUrl}/sap/bc/adt/oo/interfaces/${encodedName}/source/main`;
|
|
103
|
+
return makeAdtRequest(connection, url, 'GET', 'default');
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Get ABAP function group
|
|
107
|
+
*/
|
|
108
|
+
async function getFunctionGroup(connection, functionGroupName) {
|
|
109
|
+
const baseUrl = await getBaseUrl(connection);
|
|
110
|
+
const encodedName = (0, internalUtils_1.encodeSapObjectName)(functionGroupName);
|
|
111
|
+
const url = `${baseUrl}/sap/bc/adt/functions/groups/${encodedName}`;
|
|
112
|
+
return makeAdtRequest(connection, url, 'GET', 'default');
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Get ABAP function module
|
|
116
|
+
*/
|
|
117
|
+
async function getFunction(connection, functionName, functionGroup) {
|
|
118
|
+
const baseUrl = await getBaseUrl(connection);
|
|
119
|
+
const encodedGroup = (0, internalUtils_1.encodeSapObjectName)(functionGroup);
|
|
120
|
+
const encodedName = (0, internalUtils_1.encodeSapObjectName)(functionName);
|
|
121
|
+
const url = `${baseUrl}/sap/bc/adt/functions/groups/${encodedGroup}/fmodules/${encodedName}`;
|
|
122
|
+
return makeAdtRequest(connection, url, 'GET', 'default');
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Get ABAP package
|
|
126
|
+
*/
|
|
127
|
+
async function getPackage(connection, packageName) {
|
|
128
|
+
const baseUrl = await getBaseUrl(connection);
|
|
129
|
+
const encodedName = (0, internalUtils_1.encodeSapObjectName)(packageName);
|
|
130
|
+
const url = `${baseUrl}/sap/bc/adt/packages/${encodedName}`;
|
|
131
|
+
return makeAdtRequest(connection, url, 'GET', 'default');
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Get ABAP view (CDS or Classic)
|
|
135
|
+
*/
|
|
136
|
+
async function getView(connection, viewName) {
|
|
137
|
+
const baseUrl = await getBaseUrl(connection);
|
|
138
|
+
const encodedName = (0, internalUtils_1.encodeSapObjectName)(viewName);
|
|
139
|
+
const url = `${baseUrl}/sap/bc/adt/ddic/ddl/sources/${encodedName}/source/main`;
|
|
140
|
+
return makeAdtRequest(connection, url, 'GET', 'default');
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Fetches node structure from SAP ADT repository
|
|
144
|
+
*/
|
|
145
|
+
async function fetchNodeStructure(connection, parentName, parentTechName, parentType, nodeKey, withShortDescriptions = true) {
|
|
146
|
+
const baseUrl = await getBaseUrl(connection);
|
|
147
|
+
const url = `${baseUrl}/sap/bc/adt/repository/nodestructure`;
|
|
148
|
+
const params = {
|
|
149
|
+
parent_name: parentName,
|
|
150
|
+
parent_tech_name: parentTechName,
|
|
151
|
+
parent_type: parentType,
|
|
152
|
+
withShortDescriptions: withShortDescriptions.toString()
|
|
153
|
+
};
|
|
154
|
+
const xmlBody = `<?xml version="1.0" encoding="UTF-8"?><asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
|
|
155
|
+
<asx:values>
|
|
156
|
+
<DATA>
|
|
157
|
+
<TV_NODEKEY>${nodeKey}</TV_NODEKEY>
|
|
158
|
+
</DATA>
|
|
159
|
+
</asx:values>
|
|
160
|
+
</asx:abap>`;
|
|
161
|
+
return makeAdtRequest(connection, url, 'POST', 'default', xmlBody, params);
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Get system information from SAP ADT (for cloud systems)
|
|
165
|
+
* Returns systemID and userName if available
|
|
166
|
+
*/
|
|
167
|
+
async function getSystemInformation(connection) {
|
|
168
|
+
try {
|
|
169
|
+
const baseUrl = await getBaseUrl(connection);
|
|
170
|
+
const url = `${baseUrl}/sap/bc/adt/core/http/systeminformation`;
|
|
171
|
+
const headers = {
|
|
172
|
+
'Accept': 'application/json'
|
|
173
|
+
};
|
|
174
|
+
const response = await makeAdtRequest(connection, url, 'GET', 'default', undefined, undefined, headers);
|
|
175
|
+
if (response.data && typeof response.data === 'object') {
|
|
176
|
+
return {
|
|
177
|
+
systemID: response.data.systemID,
|
|
178
|
+
userName: response.data.userName
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
return null;
|
|
182
|
+
}
|
|
183
|
+
catch (error) {
|
|
184
|
+
// If endpoint doesn't exist (on-premise), return null
|
|
185
|
+
return null;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
// TODO: Add more read operations as needed
|
|
189
|
+
// - getInclude
|
|
190
|
+
// - getIncludesList
|
|
191
|
+
// - getTypeInfo
|
|
192
|
+
// - getObjectInfo
|
|
193
|
+
// - getObjectStructure
|
|
194
|
+
// - getTransaction
|
|
195
|
+
// - getTableContents
|
|
196
|
+
// - getObjectsList
|
|
197
|
+
// - getObjectsByType
|
|
198
|
+
// - getProgFullCode
|
|
199
|
+
// - getSqlQuery
|
|
200
|
+
// - getWhereUsed
|
|
201
|
+
// - searchObject
|
|
202
|
+
// - getEnhancements
|
|
203
|
+
// - getTransport
|
|
204
|
+
// etc.
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared check run utilities
|
|
3
|
+
*/
|
|
4
|
+
import { AbapConnection } from '@mcp-abap-adt/connection';
|
|
5
|
+
import { AxiosResponse } from 'axios';
|
|
6
|
+
/**
|
|
7
|
+
* Get ADT URI for object type
|
|
8
|
+
*/
|
|
9
|
+
export declare function getObjectUri(objectType: string, objectName: string): string;
|
|
10
|
+
/**
|
|
11
|
+
* Build check run XML payload
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* Build XML body for checkRun request (checks code already in SAP system)
|
|
15
|
+
*
|
|
16
|
+
* Format: Simple URI + version
|
|
17
|
+
* - version="inactive": Checks saved but not activated code
|
|
18
|
+
* - version="active": Checks activated code
|
|
19
|
+
*
|
|
20
|
+
* SAP reads the code from system itself.
|
|
21
|
+
*/
|
|
22
|
+
export declare function buildCheckRunXml(objectUri: string, version?: string): string;
|
|
23
|
+
/**
|
|
24
|
+
* Build XML body for checkRun request with source code (live validation)
|
|
25
|
+
*
|
|
26
|
+
* Used for checking code that hasn't been saved to SAP yet.
|
|
27
|
+
* SAP will validate the provided source code instead of reading from system.
|
|
28
|
+
*
|
|
29
|
+
* @param objectUri - ADT URI of the object (e.g., /sap/bc/adt/oo/classes/zcl_test)
|
|
30
|
+
* @param sourceCode - Source code to validate
|
|
31
|
+
* @param version - 'active' or 'inactive' (typically 'active' for live validation)
|
|
32
|
+
*/
|
|
33
|
+
export declare function buildCheckRunXmlWithSource(objectUri: string, sourceCode: string, version?: string): string;
|
|
34
|
+
/**
|
|
35
|
+
* Parse check run response
|
|
36
|
+
*/
|
|
37
|
+
export declare function parseCheckRunResponse(response: AxiosResponse): {
|
|
38
|
+
success: boolean;
|
|
39
|
+
status: string;
|
|
40
|
+
message: string;
|
|
41
|
+
errors: any[];
|
|
42
|
+
warnings: any[];
|
|
43
|
+
info: any[];
|
|
44
|
+
total_messages: number;
|
|
45
|
+
has_errors: boolean;
|
|
46
|
+
has_warnings: boolean;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Run check run for any object type
|
|
50
|
+
*/
|
|
51
|
+
export declare function runCheckRun(connection: AbapConnection, objectType: string, objectName: string, version?: string, reporter?: string, sessionId?: string): Promise<AxiosResponse>;
|
|
52
|
+
/**
|
|
53
|
+
* Run a check on an object with unsaved source code (live validation).
|
|
54
|
+
*
|
|
55
|
+
* This function validates source code that hasn't been saved to SAP yet,
|
|
56
|
+
* similar to real-time validation in Eclipse ADT editor during typing.
|
|
57
|
+
*
|
|
58
|
+
* @param connection - The ABAP connection
|
|
59
|
+
* @param objectType - Type of object (e.g., 'class', 'program')
|
|
60
|
+
* @param objectName - Name of the object
|
|
61
|
+
* @param sourceCode - The source code to validate
|
|
62
|
+
* @param version - Version to validate against ('active' or 'inactive')
|
|
63
|
+
* @param reporter - Reporter type for check results
|
|
64
|
+
* @param sessionId - Optional session ID for session-based requests
|
|
65
|
+
* @returns Promise resolving to AxiosResponse with check results
|
|
66
|
+
*/
|
|
67
|
+
export declare function runCheckRunWithSource(connection: AbapConnection, objectType: string, objectName: string, sourceCode: string, version?: string, reporter?: string, sessionId?: string): Promise<AxiosResponse>;
|
|
68
|
+
//# sourceMappingURL=checkRun.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkRun.d.ts","sourceRoot":"","sources":["../../../src/core/shared/checkRun.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAItC;;GAEG;AACH,wBAAgB,YAAY,CAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CA2C3E;AAED;;GAEG;AACH;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,GAAE,MAAiB,GAAG,MAAM,CAKtF;AAED;;;;;;;;;GASG;AACH,wBAAgB,0BAA0B,CACxC,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EAClB,OAAO,GAAE,MAAiB,GACzB,MAAM,CAcR;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,aAAa,GAAG;IAC9D,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,GAAG,EAAE,CAAC;IACd,QAAQ,EAAE,GAAG,EAAE,CAAC;IAChB,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,OAAO,CAAC;CACvB,CAsGA;AAED;;GAEG;AACH,wBAAsB,WAAW,CAC/B,UAAU,EAAE,cAAc,EAC1B,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,OAAO,GAAE,MAAiB,EAC1B,QAAQ,GAAE,MAAuB,EACjC,SAAS,CAAC,EAAE,MAAM,GACjB,OAAO,CAAC,aAAa,CAAC,CAwBxB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,qBAAqB,CACzC,UAAU,EAAE,cAAc,EAC1B,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,OAAO,GAAE,MAAiB,EAC1B,QAAQ,GAAE,MAAuB,EACjC,SAAS,CAAC,EAAE,MAAM,GACjB,OAAO,CAAC,aAAa,CAAC,CAuBxB"}
|
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Shared check run utilities
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.getObjectUri = getObjectUri;
|
|
40
|
+
exports.buildCheckRunXml = buildCheckRunXml;
|
|
41
|
+
exports.buildCheckRunXmlWithSource = buildCheckRunXmlWithSource;
|
|
42
|
+
exports.parseCheckRunResponse = parseCheckRunResponse;
|
|
43
|
+
exports.runCheckRun = runCheckRun;
|
|
44
|
+
exports.runCheckRunWithSource = runCheckRunWithSource;
|
|
45
|
+
const fast_xml_parser_1 = require("fast-xml-parser");
|
|
46
|
+
const internalUtils_1 = require("../../utils/internalUtils");
|
|
47
|
+
/**
|
|
48
|
+
* Get ADT URI for object type
|
|
49
|
+
*/
|
|
50
|
+
function getObjectUri(objectType, objectName) {
|
|
51
|
+
const encodedName = (0, internalUtils_1.encodeSapObjectName)(objectName.toLowerCase());
|
|
52
|
+
switch (objectType.toLowerCase()) {
|
|
53
|
+
case 'class':
|
|
54
|
+
return `/sap/bc/adt/oo/classes/${encodedName}`;
|
|
55
|
+
case 'program':
|
|
56
|
+
return `/sap/bc/adt/programs/programs/${encodedName}`;
|
|
57
|
+
case 'interface':
|
|
58
|
+
return `/sap/bc/adt/oo/interfaces/${encodedName}`;
|
|
59
|
+
case 'function_group':
|
|
60
|
+
case 'fugr':
|
|
61
|
+
return `/sap/bc/adt/functions/groups/${encodedName}`;
|
|
62
|
+
case 'function_module':
|
|
63
|
+
case 'fugr/ff':
|
|
64
|
+
// Function module needs function group in format: "FUGR_NAME/FM_NAME"
|
|
65
|
+
if (!objectName.includes('/')) {
|
|
66
|
+
throw new Error('Function module requires function group. Use format: "functionGroupName/functionModuleName"');
|
|
67
|
+
}
|
|
68
|
+
const [fugrName, fmName] = objectName.split('/');
|
|
69
|
+
const encodedFugr = (0, internalUtils_1.encodeSapObjectName)(fugrName.toLowerCase());
|
|
70
|
+
const encodedFm = (0, internalUtils_1.encodeSapObjectName)(fmName.toLowerCase());
|
|
71
|
+
return `/sap/bc/adt/functions/groups/${encodedFugr}/fmodules/${encodedFm}`;
|
|
72
|
+
case 'table':
|
|
73
|
+
case 'tabl/dt':
|
|
74
|
+
return `/sap/bc/adt/ddic/tables/${encodedName}`;
|
|
75
|
+
case 'structure':
|
|
76
|
+
case 'stru/dt':
|
|
77
|
+
return `/sap/bc/adt/ddic/structures/${encodedName}`;
|
|
78
|
+
case 'view':
|
|
79
|
+
case 'ddls/df':
|
|
80
|
+
return `/sap/bc/adt/ddic/ddl/sources/${encodedName}`;
|
|
81
|
+
case 'domain':
|
|
82
|
+
return `/sap/bc/adt/ddic/domains/${encodedName}`;
|
|
83
|
+
case 'data_element':
|
|
84
|
+
case 'dtel':
|
|
85
|
+
return `/sap/bc/adt/ddic/dataelements/${encodedName}`;
|
|
86
|
+
case 'package':
|
|
87
|
+
case 'devc/k':
|
|
88
|
+
return `/sap/bc/adt/packages/${encodedName}`;
|
|
89
|
+
default:
|
|
90
|
+
throw new Error(`Unsupported object type: ${objectType}`);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Build check run XML payload
|
|
95
|
+
*/
|
|
96
|
+
/**
|
|
97
|
+
* Build XML body for checkRun request (checks code already in SAP system)
|
|
98
|
+
*
|
|
99
|
+
* Format: Simple URI + version
|
|
100
|
+
* - version="inactive": Checks saved but not activated code
|
|
101
|
+
* - version="active": Checks activated code
|
|
102
|
+
*
|
|
103
|
+
* SAP reads the code from system itself.
|
|
104
|
+
*/
|
|
105
|
+
function buildCheckRunXml(objectUri, version = 'active') {
|
|
106
|
+
return `<?xml version="1.0" encoding="UTF-8"?>
|
|
107
|
+
<chkrun:checkObjectList xmlns:chkrun="http://www.sap.com/adt/checkrun" xmlns:adtcore="http://www.sap.com/adt/core">
|
|
108
|
+
<chkrun:checkObject adtcore:uri="${objectUri}" chkrun:version="${version}"/>
|
|
109
|
+
</chkrun:checkObjectList>`;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Build XML body for checkRun request with source code (live validation)
|
|
113
|
+
*
|
|
114
|
+
* Used for checking code that hasn't been saved to SAP yet.
|
|
115
|
+
* SAP will validate the provided source code instead of reading from system.
|
|
116
|
+
*
|
|
117
|
+
* @param objectUri - ADT URI of the object (e.g., /sap/bc/adt/oo/classes/zcl_test)
|
|
118
|
+
* @param sourceCode - Source code to validate
|
|
119
|
+
* @param version - 'active' or 'inactive' (typically 'active' for live validation)
|
|
120
|
+
*/
|
|
121
|
+
function buildCheckRunXmlWithSource(objectUri, sourceCode, version = 'active') {
|
|
122
|
+
// Encode source code to base64
|
|
123
|
+
const base64Source = Buffer.from(sourceCode, 'utf-8').toString('base64');
|
|
124
|
+
return `<?xml version="1.0" encoding="UTF-8"?>
|
|
125
|
+
<chkrun:checkObjectList xmlns:chkrun="http://www.sap.com/adt/checkrun" xmlns:adtcore="http://www.sap.com/adt/core">
|
|
126
|
+
<chkrun:checkObject adtcore:uri="${objectUri}" chkrun:version="${version}">
|
|
127
|
+
<chkrun:artifacts>
|
|
128
|
+
<chkrun:artifact chkrun:contentType="text/plain; charset=utf-8" chkrun:uri="${objectUri}/source/main">
|
|
129
|
+
<chkrun:content>${base64Source}</chkrun:content>
|
|
130
|
+
</chkrun:artifact>
|
|
131
|
+
</chkrun:artifacts>
|
|
132
|
+
</chkrun:checkObject>
|
|
133
|
+
</chkrun:checkObjectList>`;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Parse check run response
|
|
137
|
+
*/
|
|
138
|
+
function parseCheckRunResponse(response) {
|
|
139
|
+
const parser = new fast_xml_parser_1.XMLParser({
|
|
140
|
+
ignoreAttributes: false,
|
|
141
|
+
attributeNamePrefix: '@_'
|
|
142
|
+
});
|
|
143
|
+
try {
|
|
144
|
+
const result = parser.parse(response.data);
|
|
145
|
+
let checkReport = result['chkrun:checkRunReports']?.['chkrun:checkReport'];
|
|
146
|
+
if (!checkReport) {
|
|
147
|
+
checkReport = result['checkRunReports']?.['checkReport'];
|
|
148
|
+
}
|
|
149
|
+
if (!checkReport) {
|
|
150
|
+
checkReport = result['chkrun:checkReport'];
|
|
151
|
+
}
|
|
152
|
+
if (!checkReport) {
|
|
153
|
+
return {
|
|
154
|
+
success: true,
|
|
155
|
+
status: 'no_report',
|
|
156
|
+
message: 'No check report in response (possibly no issues found)',
|
|
157
|
+
errors: [],
|
|
158
|
+
warnings: [],
|
|
159
|
+
info: [],
|
|
160
|
+
total_messages: 0,
|
|
161
|
+
has_errors: false,
|
|
162
|
+
has_warnings: false
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
const status = checkReport['@_chkrun:status'] || checkReport['chkrun:status'] || checkReport['@_status'] || checkReport['status'];
|
|
166
|
+
const statusText = checkReport['chkrun:statusText'] || checkReport['@_chkrun:statusText'] || checkReport['statusText'] || checkReport['@_statusText'] || '';
|
|
167
|
+
const messages = checkReport['chkrun:checkMessageList']?.['chkrun:checkMessage']
|
|
168
|
+
|| checkReport['checkMessageList']?.['checkMessage']
|
|
169
|
+
|| checkReport['chkrun:messages']?.['msg']
|
|
170
|
+
|| checkReport['messages']?.['msg']
|
|
171
|
+
|| checkReport['chkrun:messages']
|
|
172
|
+
|| checkReport['messages']
|
|
173
|
+
|| [];
|
|
174
|
+
const messageArray = Array.isArray(messages) ? messages : (messages ? [messages] : []);
|
|
175
|
+
const errors = [];
|
|
176
|
+
const warnings = [];
|
|
177
|
+
const info = [];
|
|
178
|
+
messageArray.forEach((msg) => {
|
|
179
|
+
if (!msg || typeof msg !== 'object')
|
|
180
|
+
return;
|
|
181
|
+
const msgType = msg['@_chkrun:type'] || msg['@_type'] || msg['type'];
|
|
182
|
+
const shortText = msg['@_chkrun:shortText'] || msg['shortText']?.['#text'] || msg['shortText'] || msg['shortText']?.['txt'] || '';
|
|
183
|
+
const line = msg['@_line'] || msg['line'];
|
|
184
|
+
const href = msg['@_chkrun:uri'] || msg['@_href'] || msg['href'];
|
|
185
|
+
const msgObj = {
|
|
186
|
+
type: msgType,
|
|
187
|
+
text: shortText,
|
|
188
|
+
line: line || '',
|
|
189
|
+
href: href || ''
|
|
190
|
+
};
|
|
191
|
+
if (msgType === 'E') {
|
|
192
|
+
errors.push(msgObj);
|
|
193
|
+
}
|
|
194
|
+
else if (msgType === 'W') {
|
|
195
|
+
warnings.push(msgObj);
|
|
196
|
+
}
|
|
197
|
+
else {
|
|
198
|
+
info.push(msgObj);
|
|
199
|
+
}
|
|
200
|
+
});
|
|
201
|
+
// If status is 'notProcessed', it's an error (object doesn't exist or can't be validated)
|
|
202
|
+
const hasErrors = errors.length > 0 || status === 'notProcessed';
|
|
203
|
+
const isSuccess = status === 'processed' && errors.length === 0;
|
|
204
|
+
return {
|
|
205
|
+
success: isSuccess,
|
|
206
|
+
status: status || 'no_report',
|
|
207
|
+
message: statusText,
|
|
208
|
+
errors,
|
|
209
|
+
warnings,
|
|
210
|
+
info,
|
|
211
|
+
total_messages: messageArray.length,
|
|
212
|
+
has_errors: hasErrors,
|
|
213
|
+
has_warnings: warnings.length > 0
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
catch (error) {
|
|
217
|
+
return {
|
|
218
|
+
success: false,
|
|
219
|
+
status: 'parse_error',
|
|
220
|
+
message: `Failed to parse check run response: ${error}`,
|
|
221
|
+
errors: [],
|
|
222
|
+
warnings: [],
|
|
223
|
+
info: [],
|
|
224
|
+
total_messages: 0,
|
|
225
|
+
has_errors: false,
|
|
226
|
+
has_warnings: false
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* Run check run for any object type
|
|
232
|
+
*/
|
|
233
|
+
async function runCheckRun(connection, objectType, objectName, version = 'active', reporter = 'abapCheckRun', sessionId) {
|
|
234
|
+
const objectUri = getObjectUri(objectType, objectName);
|
|
235
|
+
const xmlBody = buildCheckRunXml(objectUri, version);
|
|
236
|
+
const headers = {
|
|
237
|
+
'Accept': 'application/vnd.sap.adt.checkmessages+xml',
|
|
238
|
+
'Content-Type': 'application/vnd.sap.adt.checkobjects+xml'
|
|
239
|
+
};
|
|
240
|
+
const url = `/sap/bc/adt/checkruns?reporters=${reporter}`;
|
|
241
|
+
if (sessionId) {
|
|
242
|
+
const { makeAdtRequestWithSession } = await Promise.resolve().then(() => __importStar(require('../../utils/sessionUtils')));
|
|
243
|
+
return makeAdtRequestWithSession(connection, url, 'POST', sessionId, xmlBody, headers);
|
|
244
|
+
}
|
|
245
|
+
else {
|
|
246
|
+
const baseUrl = await connection.getBaseUrl();
|
|
247
|
+
return connection.makeAdtRequest({
|
|
248
|
+
url: `${baseUrl}${url}`,
|
|
249
|
+
method: 'POST',
|
|
250
|
+
timeout: (await Promise.resolve().then(() => __importStar(require('@mcp-abap-adt/connection')))).getTimeout('default'),
|
|
251
|
+
data: xmlBody,
|
|
252
|
+
headers
|
|
253
|
+
});
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* Run a check on an object with unsaved source code (live validation).
|
|
258
|
+
*
|
|
259
|
+
* This function validates source code that hasn't been saved to SAP yet,
|
|
260
|
+
* similar to real-time validation in Eclipse ADT editor during typing.
|
|
261
|
+
*
|
|
262
|
+
* @param connection - The ABAP connection
|
|
263
|
+
* @param objectType - Type of object (e.g., 'class', 'program')
|
|
264
|
+
* @param objectName - Name of the object
|
|
265
|
+
* @param sourceCode - The source code to validate
|
|
266
|
+
* @param version - Version to validate against ('active' or 'inactive')
|
|
267
|
+
* @param reporter - Reporter type for check results
|
|
268
|
+
* @param sessionId - Optional session ID for session-based requests
|
|
269
|
+
* @returns Promise resolving to AxiosResponse with check results
|
|
270
|
+
*/
|
|
271
|
+
async function runCheckRunWithSource(connection, objectType, objectName, sourceCode, version = 'active', reporter = 'abapCheckRun', sessionId) {
|
|
272
|
+
const objectUri = await getObjectUri(objectType, objectName);
|
|
273
|
+
const xmlBody = buildCheckRunXmlWithSource(objectUri, sourceCode, version);
|
|
274
|
+
const headers = {
|
|
275
|
+
'Content-Type': 'application/vnd.sap.adt.checkobjects+xml'
|
|
276
|
+
};
|
|
277
|
+
const url = `/sap/bc/adt/checkruns?reporters=${reporter}`;
|
|
278
|
+
if (sessionId) {
|
|
279
|
+
const { makeAdtRequestWithSession } = await Promise.resolve().then(() => __importStar(require('../../utils/sessionUtils')));
|
|
280
|
+
return makeAdtRequestWithSession(connection, url, 'POST', sessionId, xmlBody, headers);
|
|
281
|
+
}
|
|
282
|
+
else {
|
|
283
|
+
const baseUrl = await connection.getBaseUrl();
|
|
284
|
+
return connection.makeAdtRequest({
|
|
285
|
+
url: `${baseUrl}${url}`,
|
|
286
|
+
method: 'POST',
|
|
287
|
+
timeout: (await Promise.resolve().then(() => __importStar(require('@mcp-abap-adt/connection')))).getTimeout('default'),
|
|
288
|
+
data: xmlBody,
|
|
289
|
+
headers
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared utilities for reading object metadata
|
|
3
|
+
* Metadata endpoints return XML with object information (name, description, package, etc.)
|
|
4
|
+
* without source code
|
|
5
|
+
*/
|
|
6
|
+
import { AbapConnection } from '@mcp-abap-adt/connection';
|
|
7
|
+
import { AxiosResponse } from 'axios';
|
|
8
|
+
/**
|
|
9
|
+
* Get object metadata URI based on object type
|
|
10
|
+
*/
|
|
11
|
+
export declare function getObjectMetadataUri(objectType: string, objectName: string, functionGroup?: string): string;
|
|
12
|
+
/**
|
|
13
|
+
* Read object metadata (without source code)
|
|
14
|
+
*/
|
|
15
|
+
export declare function readObjectMetadata(connection: AbapConnection, objectType: string, objectName: string, functionGroup?: string): Promise<AxiosResponse>;
|
|
16
|
+
//# sourceMappingURL=readMetadata.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readMetadata.d.ts","sourceRoot":"","sources":["../../../src/core/shared/readMetadata.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,oBAAoB,CAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,CA4C3G;AAED;;GAEG;AACH,wBAAsB,kBAAkB,CACtC,UAAU,EAAE,cAAc,EAC1B,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,aAAa,CAAC,EAAE,MAAM,GACrB,OAAO,CAAC,aAAa,CAAC,CAaxB"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Shared utilities for reading object metadata
|
|
4
|
+
* Metadata endpoints return XML with object information (name, description, package, etc.)
|
|
5
|
+
* without source code
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.getObjectMetadataUri = getObjectMetadataUri;
|
|
9
|
+
exports.readObjectMetadata = readObjectMetadata;
|
|
10
|
+
const connection_1 = require("@mcp-abap-adt/connection");
|
|
11
|
+
const internalUtils_1 = require("../../utils/internalUtils");
|
|
12
|
+
/**
|
|
13
|
+
* Get object metadata URI based on object type
|
|
14
|
+
*/
|
|
15
|
+
function getObjectMetadataUri(objectType, objectName, functionGroup) {
|
|
16
|
+
const encodedName = (0, internalUtils_1.encodeSapObjectName)(objectName);
|
|
17
|
+
switch (objectType.toLowerCase()) {
|
|
18
|
+
case 'class':
|
|
19
|
+
case 'clas/oc':
|
|
20
|
+
return `/sap/bc/adt/oo/classes/${encodedName}`;
|
|
21
|
+
case 'program':
|
|
22
|
+
case 'prog/p':
|
|
23
|
+
return `/sap/bc/adt/programs/programs/${encodedName}`;
|
|
24
|
+
case 'interface':
|
|
25
|
+
case 'intf/if':
|
|
26
|
+
return `/sap/bc/adt/oo/interfaces/${encodedName}`;
|
|
27
|
+
case 'functionmodule':
|
|
28
|
+
case 'fugr/ff':
|
|
29
|
+
if (!functionGroup) {
|
|
30
|
+
throw new Error('Function group is required for function module');
|
|
31
|
+
}
|
|
32
|
+
const encodedGroup = (0, internalUtils_1.encodeSapObjectName)(functionGroup);
|
|
33
|
+
return `/sap/bc/adt/functions/groups/${encodedGroup}/fmodules/${encodedName}`;
|
|
34
|
+
case 'view':
|
|
35
|
+
case 'ddls/df':
|
|
36
|
+
return `/sap/bc/adt/ddic/ddl/sources/${encodedName}`;
|
|
37
|
+
case 'structure':
|
|
38
|
+
case 'stru/dt':
|
|
39
|
+
return `/sap/bc/adt/ddic/structures/${encodedName}`;
|
|
40
|
+
case 'table':
|
|
41
|
+
case 'tabl/dt':
|
|
42
|
+
return `/sap/bc/adt/ddic/tables/${encodedName}`;
|
|
43
|
+
case 'domain':
|
|
44
|
+
case 'doma/dd':
|
|
45
|
+
return `/sap/bc/adt/ddic/domains/${encodedName}`;
|
|
46
|
+
case 'dataelement':
|
|
47
|
+
case 'dtel':
|
|
48
|
+
return `/sap/bc/adt/ddic/dataelements/${encodedName}`;
|
|
49
|
+
case 'functiongroup':
|
|
50
|
+
case 'fugr':
|
|
51
|
+
return `/sap/bc/adt/functions/groups/${encodedName}`;
|
|
52
|
+
case 'package':
|
|
53
|
+
case 'devc/k':
|
|
54
|
+
return `/sap/bc/adt/packages/${encodedName}`;
|
|
55
|
+
default:
|
|
56
|
+
throw new Error(`Unsupported object type for metadata: ${objectType}`);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Read object metadata (without source code)
|
|
61
|
+
*/
|
|
62
|
+
async function readObjectMetadata(connection, objectType, objectName, functionGroup) {
|
|
63
|
+
const baseUrl = await connection.getBaseUrl();
|
|
64
|
+
const uri = getObjectMetadataUri(objectType, objectName, functionGroup);
|
|
65
|
+
const url = `${baseUrl}${uri}`;
|
|
66
|
+
return connection.makeAdtRequest({
|
|
67
|
+
url,
|
|
68
|
+
method: 'GET',
|
|
69
|
+
timeout: (0, connection_1.getTimeout)('default'),
|
|
70
|
+
headers: {
|
|
71
|
+
'Accept': 'application/xml'
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
}
|