@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,118 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Class create operations
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.createClass = createClass;
|
|
7
|
+
const sessionUtils_1 = require("../../utils/sessionUtils");
|
|
8
|
+
const systemInfo_1 = require("../shared/systemInfo");
|
|
9
|
+
const debugEnabled = process.env.DEBUG_TESTS === 'true';
|
|
10
|
+
const logger = {
|
|
11
|
+
debug: debugEnabled ? console.log : () => { },
|
|
12
|
+
error: debugEnabled ? console.error : () => { },
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Create class object with metadata
|
|
16
|
+
*/
|
|
17
|
+
async function createClassObject(connection, args, sessionId) {
|
|
18
|
+
const description = args.description || args.class_name || '';
|
|
19
|
+
const url = `/sap/bc/adt/oo/classes${args.transport_request ? `?corrNr=${args.transport_request}` : ''}`;
|
|
20
|
+
// Get masterSystem and responsible (only for cloud systems)
|
|
21
|
+
// On cloud, getSystemInformation returns systemID and userName
|
|
22
|
+
// On on-premise, it returns null, so we don't add these attributes
|
|
23
|
+
let masterSystem = args.master_system;
|
|
24
|
+
let username = args.responsible;
|
|
25
|
+
const systemInfo = await (0, systemInfo_1.getSystemInformation)(connection);
|
|
26
|
+
if (systemInfo) {
|
|
27
|
+
masterSystem = masterSystem || systemInfo.systemID;
|
|
28
|
+
username = username || systemInfo.userName;
|
|
29
|
+
}
|
|
30
|
+
// Only use masterSystem from getSystemInformation (cloud), not from env
|
|
31
|
+
// username can fallback to env if not provided
|
|
32
|
+
username = username || process.env.SAP_USERNAME || process.env.SAP_USER || '';
|
|
33
|
+
const finalAttr = args.final ? 'true' : 'false';
|
|
34
|
+
const visibilityAttr = args.create_protected ? 'protected' : 'public';
|
|
35
|
+
const superClassXml = args.superclass
|
|
36
|
+
? `<class:superClassRef adtcore:name="${args.superclass}"/>`
|
|
37
|
+
: '<class:superClassRef/>';
|
|
38
|
+
const masterSystemAttr = masterSystem ? ` adtcore:masterSystem="${masterSystem}"` : '';
|
|
39
|
+
const responsibleAttr = username ? ` adtcore:responsible="${username}"` : '';
|
|
40
|
+
const metadataXml = `<?xml version="1.0" encoding="UTF-8"?><class:abapClass xmlns:class="http://www.sap.com/adt/oo/classes" xmlns:adtcore="http://www.sap.com/adt/core" adtcore:description="${description}" adtcore:language="EN" adtcore:name="${args.class_name}" adtcore:type="CLAS/OC" adtcore:masterLanguage="EN"${masterSystemAttr}${responsibleAttr} class:final="${finalAttr}" class:visibility="${visibilityAttr}">
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
<adtcore:packageRef adtcore:name="${args.package_name}"/>
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
<class:include adtcore:name="CLAS/OC" adtcore:type="CLAS/OC" class:includeType="testclasses"/>
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
${superClassXml}
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
</class:abapClass>`;
|
|
57
|
+
const headers = {
|
|
58
|
+
'Accept': 'application/vnd.sap.adt.oo.classes.v4+xml',
|
|
59
|
+
'Content-Type': 'application/vnd.sap.adt.oo.classes.v4+xml'
|
|
60
|
+
};
|
|
61
|
+
// Log request details for debugging authorization issues
|
|
62
|
+
const baseUrl = await connection.getBaseUrl();
|
|
63
|
+
const fullUrl = `${baseUrl}${url}`;
|
|
64
|
+
logger.debug(`[DEBUG] Creating class - URL: ${fullUrl}`);
|
|
65
|
+
logger.debug(`[DEBUG] Creating class - Method: POST`);
|
|
66
|
+
logger.debug(`[DEBUG] Creating class - Headers:`, JSON.stringify(headers, null, 2));
|
|
67
|
+
logger.debug(`[DEBUG] Creating class - Body (first 500 chars):`, metadataXml.substring(0, 500));
|
|
68
|
+
try {
|
|
69
|
+
const response = await (0, sessionUtils_1.makeAdtRequestWithSession)(connection, url, 'POST', sessionId, metadataXml, headers);
|
|
70
|
+
return response;
|
|
71
|
+
}
|
|
72
|
+
catch (error) {
|
|
73
|
+
// Log error details for debugging
|
|
74
|
+
if (error.response) {
|
|
75
|
+
logger.error(`[ERROR] Create class failed - Status: ${error.response.status}`);
|
|
76
|
+
logger.error(`[ERROR] Create class failed - StatusText: ${error.response.statusText}`);
|
|
77
|
+
logger.error(`[ERROR] Create class failed - Response headers:`, JSON.stringify(error.response.headers, null, 2));
|
|
78
|
+
logger.error(`[ERROR] Create class failed - Response data (first 1000 chars):`, typeof error.response.data === 'string'
|
|
79
|
+
? error.response.data.substring(0, 1000)
|
|
80
|
+
: JSON.stringify(error.response.data).substring(0, 1000));
|
|
81
|
+
}
|
|
82
|
+
throw error;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Create ABAP class object (metadata only)
|
|
87
|
+
* Low-level function - only creates the class object with metadata
|
|
88
|
+
*
|
|
89
|
+
* To complete class creation workflow:
|
|
90
|
+
* 1. createClass() - create object
|
|
91
|
+
* 2. lockClass() - lock for modification
|
|
92
|
+
* 3. updateClass() - upload source code
|
|
93
|
+
* 4. unlockClass() - unlock
|
|
94
|
+
* 5. activateClass() - activate (optional)
|
|
95
|
+
*/
|
|
96
|
+
async function createClass(connection, params) {
|
|
97
|
+
if (!params.class_name) {
|
|
98
|
+
throw new Error('Class name is required');
|
|
99
|
+
}
|
|
100
|
+
if (params.class_name.length > 30) {
|
|
101
|
+
throw new Error('Class name must not exceed 30 characters');
|
|
102
|
+
}
|
|
103
|
+
if (!params.package_name) {
|
|
104
|
+
throw new Error('package_name is required');
|
|
105
|
+
}
|
|
106
|
+
const className = params.class_name.toUpperCase();
|
|
107
|
+
const sessionId = (0, sessionUtils_1.generateSessionId)();
|
|
108
|
+
// Create class object with metadata
|
|
109
|
+
const createResponse = await createClassObject(connection, params, sessionId);
|
|
110
|
+
if (createResponse.status < 200 || createResponse.status >= 300) {
|
|
111
|
+
const errorMessage = createResponse.data
|
|
112
|
+
? (typeof createResponse.data === 'string' ? createResponse.data : JSON.stringify(createResponse.data))
|
|
113
|
+
: createResponse.statusText;
|
|
114
|
+
throw new Error(`Failed to create class ${className}: ${errorMessage}`);
|
|
115
|
+
}
|
|
116
|
+
// Return response from SAP
|
|
117
|
+
return createResponse;
|
|
118
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Class operations - exports
|
|
3
|
+
*/
|
|
4
|
+
export * from './create';
|
|
5
|
+
export * from './update';
|
|
6
|
+
export * from './read';
|
|
7
|
+
export * from './lock';
|
|
8
|
+
export * from './unlock';
|
|
9
|
+
export * from './activation';
|
|
10
|
+
export * from './check';
|
|
11
|
+
export * from './run';
|
|
12
|
+
export * from './validation';
|
|
13
|
+
export { ClassBuilder, type ClassBuilderConfig, type ClassBuilderLogger, type ClassBuilderState } from './ClassBuilder';
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/class/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,YAAY,EAAE,KAAK,kBAAkB,EAAE,KAAK,kBAAkB,EAAE,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Class operations - exports
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
17
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
18
|
+
};
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
exports.ClassBuilder = void 0;
|
|
21
|
+
__exportStar(require("./create"), exports);
|
|
22
|
+
__exportStar(require("./update"), exports);
|
|
23
|
+
__exportStar(require("./read"), exports);
|
|
24
|
+
__exportStar(require("./lock"), exports);
|
|
25
|
+
__exportStar(require("./unlock"), exports);
|
|
26
|
+
__exportStar(require("./activation"), exports);
|
|
27
|
+
__exportStar(require("./check"), exports);
|
|
28
|
+
__exportStar(require("./run"), exports);
|
|
29
|
+
__exportStar(require("./validation"), exports);
|
|
30
|
+
var ClassBuilder_1 = require("./ClassBuilder");
|
|
31
|
+
Object.defineProperty(exports, "ClassBuilder", { enumerable: true, get: function () { return ClassBuilder_1.ClassBuilder; } });
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Class lock operations
|
|
3
|
+
*/
|
|
4
|
+
import { AbapConnection } from '@mcp-abap-adt/connection';
|
|
5
|
+
import { AxiosResponse } from 'axios';
|
|
6
|
+
/**
|
|
7
|
+
* Lock class for modification
|
|
8
|
+
* Returns lock handle that must be used in subsequent requests
|
|
9
|
+
*/
|
|
10
|
+
export declare function lockClass(connection: AbapConnection, className: string, sessionId: string): Promise<string>;
|
|
11
|
+
/**
|
|
12
|
+
* Lock class for editing (for update)
|
|
13
|
+
* Returns lock handle and transport number
|
|
14
|
+
*/
|
|
15
|
+
export declare function lockClassForUpdate(connection: AbapConnection, className: string, sessionId: string): Promise<{
|
|
16
|
+
response: AxiosResponse;
|
|
17
|
+
lockHandle: string;
|
|
18
|
+
corrNr?: string;
|
|
19
|
+
}>;
|
|
20
|
+
//# sourceMappingURL=lock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lock.d.ts","sourceRoot":"","sources":["../../../src/core/class/lock.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAKtC;;;GAGG;AACH,wBAAsB,SAAS,CAC7B,UAAU,EAAE,cAAc,EAC1B,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,MAAM,CAAC,CAmBjB;AAED;;;GAGG;AACH,wBAAsB,kBAAkB,CACtC,UAAU,EAAE,cAAc,EAC1B,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC;IAAE,QAAQ,EAAE,aAAa,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAoB3E"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Class lock operations
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.lockClass = lockClass;
|
|
7
|
+
exports.lockClassForUpdate = lockClassForUpdate;
|
|
8
|
+
const fast_xml_parser_1 = require("fast-xml-parser");
|
|
9
|
+
const internalUtils_1 = require("../../utils/internalUtils");
|
|
10
|
+
const sessionUtils_1 = require("../../utils/sessionUtils");
|
|
11
|
+
/**
|
|
12
|
+
* Lock class for modification
|
|
13
|
+
* Returns lock handle that must be used in subsequent requests
|
|
14
|
+
*/
|
|
15
|
+
async function lockClass(connection, className, sessionId) {
|
|
16
|
+
const url = `/sap/bc/adt/oo/classes/${(0, internalUtils_1.encodeSapObjectName)(className).toLowerCase()}?_action=LOCK&accessMode=MODIFY`;
|
|
17
|
+
const headers = {
|
|
18
|
+
'Accept': 'application/vnd.sap.as+xml;charset=UTF-8;dataname=com.sap.adt.lock.result;q=0.8, application/vnd.sap.as+xml;charset=UTF-8;dataname=com.sap.adt.lock.result2;q=0.9'
|
|
19
|
+
};
|
|
20
|
+
const response = await (0, sessionUtils_1.makeAdtRequestWithSession)(connection, url, 'POST', sessionId, null, headers);
|
|
21
|
+
// Parse lock handle from XML response
|
|
22
|
+
const parser = new fast_xml_parser_1.XMLParser({ ignoreAttributes: false, attributeNamePrefix: '' });
|
|
23
|
+
const result = parser.parse(response.data);
|
|
24
|
+
const lockHandle = result?.['asx:abap']?.['asx:values']?.['DATA']?.['LOCK_HANDLE'];
|
|
25
|
+
if (!lockHandle) {
|
|
26
|
+
throw new Error('Failed to obtain lock handle from SAP. Class may be locked by another user.');
|
|
27
|
+
}
|
|
28
|
+
return lockHandle;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Lock class for editing (for update)
|
|
32
|
+
* Returns lock handle and transport number
|
|
33
|
+
*/
|
|
34
|
+
async function lockClassForUpdate(connection, className, sessionId) {
|
|
35
|
+
const url = `/sap/bc/adt/oo/classes/${(0, internalUtils_1.encodeSapObjectName)(className).toLowerCase()}?_action=LOCK&accessMode=MODIFY`;
|
|
36
|
+
const headers = {
|
|
37
|
+
'Accept': 'application/vnd.sap.as+xml;charset=UTF-8;dataname=com.sap.adt.lock.result;q=0.8, application/vnd.sap.as+xml;charset=UTF-8;dataname=com.sap.adt.lock.result2;q=0.9'
|
|
38
|
+
};
|
|
39
|
+
const response = await (0, sessionUtils_1.makeAdtRequestWithSession)(connection, url, 'POST', sessionId, null, headers);
|
|
40
|
+
// Parse lock handle and transport number from XML response
|
|
41
|
+
const parser = new fast_xml_parser_1.XMLParser({ ignoreAttributes: false, attributeNamePrefix: '@_' });
|
|
42
|
+
const result = parser.parse(response.data);
|
|
43
|
+
const lockHandle = result?.['asx:abap']?.['asx:values']?.['DATA']?.['LOCK_HANDLE'];
|
|
44
|
+
const corrNr = result?.['asx:abap']?.['asx:values']?.['DATA']?.['CORRNR'];
|
|
45
|
+
if (!lockHandle) {
|
|
46
|
+
throw new Error('Failed to obtain lock handle from SAP. Class may be locked by another user.');
|
|
47
|
+
}
|
|
48
|
+
return { response, lockHandle, corrNr };
|
|
49
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Class read operations
|
|
3
|
+
*/
|
|
4
|
+
import { AbapConnection } from '@mcp-abap-adt/connection';
|
|
5
|
+
import { AxiosResponse } from 'axios';
|
|
6
|
+
/**
|
|
7
|
+
* Get ABAP class metadata (without source code)
|
|
8
|
+
* @param connection - SAP connection
|
|
9
|
+
* @param className - Class name
|
|
10
|
+
*/
|
|
11
|
+
export declare function getClassMetadata(connection: AbapConnection, className: string): Promise<AxiosResponse>;
|
|
12
|
+
/**
|
|
13
|
+
* Get ABAP class source code
|
|
14
|
+
* @param connection - SAP connection
|
|
15
|
+
* @param className - Class name
|
|
16
|
+
* @param version - 'active' (default) or 'inactive' to read modified but not activated version
|
|
17
|
+
*/
|
|
18
|
+
export declare function getClassSource(connection: AbapConnection, className: string, version?: 'active' | 'inactive'): Promise<AxiosResponse>;
|
|
19
|
+
/**
|
|
20
|
+
* Get ABAP class (source code by default for backward compatibility)
|
|
21
|
+
* @param connection - SAP connection
|
|
22
|
+
* @param className - Class name
|
|
23
|
+
* @param version - 'active' (default) or 'inactive' to read modified but not activated version
|
|
24
|
+
* @deprecated Use getClassSource() or getClassMetadata() instead
|
|
25
|
+
*/
|
|
26
|
+
export declare function getClass(connection: AbapConnection, className: string, version?: 'active' | 'inactive'): Promise<AxiosResponse>;
|
|
27
|
+
/**
|
|
28
|
+
* Get transport request for ABAP class
|
|
29
|
+
* @param connection - SAP connection
|
|
30
|
+
* @param className - Class name
|
|
31
|
+
* @returns Transport request information
|
|
32
|
+
*/
|
|
33
|
+
export declare function getClassTransport(connection: AbapConnection, className: string): Promise<AxiosResponse>;
|
|
34
|
+
//# sourceMappingURL=read.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"read.d.ts","sourceRoot":"","sources":["../../../src/core/class/read.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAc,MAAM,0BAA0B,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAKtC;;;;GAIG;AACH,wBAAsB,gBAAgB,CACpC,UAAU,EAAE,cAAc,EAC1B,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,aAAa,CAAC,CAExB;AAED;;;;;GAKG;AACH,wBAAsB,cAAc,CAClC,UAAU,EAAE,cAAc,EAC1B,SAAS,EAAE,MAAM,EACjB,OAAO,GAAE,QAAQ,GAAG,UAAqB,GACxC,OAAO,CAAC,aAAa,CAAC,CAExB;AAED;;;;;;GAMG;AACH,wBAAsB,QAAQ,CAC5B,UAAU,EAAE,cAAc,EAC1B,SAAS,EAAE,MAAM,EACjB,OAAO,GAAE,QAAQ,GAAG,UAAqB,GACxC,OAAO,CAAC,aAAa,CAAC,CAExB;AAED;;;;;GAKG;AACH,wBAAsB,iBAAiB,CACrC,UAAU,EAAE,cAAc,EAC1B,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,aAAa,CAAC,CAaxB"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Class read operations
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getClassMetadata = getClassMetadata;
|
|
7
|
+
exports.getClassSource = getClassSource;
|
|
8
|
+
exports.getClass = getClass;
|
|
9
|
+
exports.getClassTransport = getClassTransport;
|
|
10
|
+
const connection_1 = require("@mcp-abap-adt/connection");
|
|
11
|
+
const internalUtils_1 = require("../../utils/internalUtils");
|
|
12
|
+
const readMetadata_1 = require("../shared/readMetadata");
|
|
13
|
+
const readSource_1 = require("../shared/readSource");
|
|
14
|
+
/**
|
|
15
|
+
* Get ABAP class metadata (without source code)
|
|
16
|
+
* @param connection - SAP connection
|
|
17
|
+
* @param className - Class name
|
|
18
|
+
*/
|
|
19
|
+
async function getClassMetadata(connection, className) {
|
|
20
|
+
return (0, readMetadata_1.readObjectMetadata)(connection, 'class', className);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Get ABAP class source code
|
|
24
|
+
* @param connection - SAP connection
|
|
25
|
+
* @param className - Class name
|
|
26
|
+
* @param version - 'active' (default) or 'inactive' to read modified but not activated version
|
|
27
|
+
*/
|
|
28
|
+
async function getClassSource(connection, className, version = 'active') {
|
|
29
|
+
return (0, readSource_1.readObjectSource)(connection, 'class', className, undefined, version);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Get ABAP class (source code by default for backward compatibility)
|
|
33
|
+
* @param connection - SAP connection
|
|
34
|
+
* @param className - Class name
|
|
35
|
+
* @param version - 'active' (default) or 'inactive' to read modified but not activated version
|
|
36
|
+
* @deprecated Use getClassSource() or getClassMetadata() instead
|
|
37
|
+
*/
|
|
38
|
+
async function getClass(connection, className, version = 'active') {
|
|
39
|
+
return getClassSource(connection, className, version);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Get transport request for ABAP class
|
|
43
|
+
* @param connection - SAP connection
|
|
44
|
+
* @param className - Class name
|
|
45
|
+
* @returns Transport request information
|
|
46
|
+
*/
|
|
47
|
+
async function getClassTransport(connection, className) {
|
|
48
|
+
const baseUrl = await connection.getBaseUrl();
|
|
49
|
+
const encodedName = (0, internalUtils_1.encodeSapObjectName)(className);
|
|
50
|
+
const url = `${baseUrl}/sap/bc/adt/oo/classes/${encodedName}/transport`;
|
|
51
|
+
return connection.makeAdtRequest({
|
|
52
|
+
url,
|
|
53
|
+
method: 'GET',
|
|
54
|
+
timeout: (0, connection_1.getTimeout)('default'),
|
|
55
|
+
headers: {
|
|
56
|
+
'Accept': 'application/vnd.sap.adt.transportorganizer.v1+xml'
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Class run operations - execute ABAP classes that implement if_oo_adt_classrun
|
|
3
|
+
*/
|
|
4
|
+
import { AbapConnection } from '@mcp-abap-adt/connection';
|
|
5
|
+
import { AxiosResponse } from 'axios';
|
|
6
|
+
/**
|
|
7
|
+
* Run an ABAP class that implements if_oo_adt_classrun interface.
|
|
8
|
+
*
|
|
9
|
+
* This executes the class's main() method and returns console output.
|
|
10
|
+
* The class must implement if_oo_adt_classrun interface to be executable.
|
|
11
|
+
*
|
|
12
|
+
* Endpoint: POST /sap/bc/adt/oo/classrun/{className}
|
|
13
|
+
*
|
|
14
|
+
* Use cases:
|
|
15
|
+
* - Execute test/demo classes
|
|
16
|
+
* - Run data migration scripts
|
|
17
|
+
* - Execute batch processing classes
|
|
18
|
+
* - Quick code testing without creating programs
|
|
19
|
+
*
|
|
20
|
+
* @param connection - SAP connection
|
|
21
|
+
* @param className - Name of the class to run (must implement if_oo_adt_classrun)
|
|
22
|
+
* @param runnable - Optional flag to check if class is runnable (default: true, throws error if false)
|
|
23
|
+
* @param sessionId - Optional session ID for session-based requests
|
|
24
|
+
* @returns Response with console output from the class execution
|
|
25
|
+
* @throws Error if runnable is false, or if class doesn't implement if_oo_adt_classrun or execution fails
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```typescript
|
|
29
|
+
* // Class must implement if_oo_adt_classrun:
|
|
30
|
+
* // CLASS zcl_test DEFINITION PUBLIC FINAL CREATE PUBLIC.
|
|
31
|
+
* // PUBLIC SECTION.
|
|
32
|
+
* // INTERFACES if_oo_adt_classrun.
|
|
33
|
+
* // ENDCLASS.
|
|
34
|
+
* //
|
|
35
|
+
* // CLASS zcl_test IMPLEMENTATION.
|
|
36
|
+
* // METHOD if_oo_adt_classrun~main.
|
|
37
|
+
* // out->write( 'Hello World' ).
|
|
38
|
+
* // ENDMETHOD.
|
|
39
|
+
* // ENDCLASS.
|
|
40
|
+
*
|
|
41
|
+
* const result = await runClass(connection, 'ZCL_TEST', true);
|
|
42
|
+
* console.log(result.data); // Console output from the class
|
|
43
|
+
*
|
|
44
|
+
* // Check if class is runnable before attempting to run
|
|
45
|
+
* if (classConfig.runnable) {
|
|
46
|
+
* const result = await runClass(connection, 'ZCL_TEST', true);
|
|
47
|
+
* }
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
export declare function runClass(connection: AbapConnection, className: string, runnable?: boolean, sessionId?: string): Promise<AxiosResponse>;
|
|
51
|
+
//# sourceMappingURL=run.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../src/core/class/run.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,wBAAsB,QAAQ,CAC5B,UAAU,EAAE,cAAc,EAC1B,SAAS,EAAE,MAAM,EACjB,QAAQ,GAAE,OAAc,EACxB,SAAS,CAAC,EAAE,MAAM,GACjB,OAAO,CAAC,aAAa,CAAC,CAuBxB"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Class run operations - execute ABAP classes that implement if_oo_adt_classrun
|
|
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.runClass = runClass;
|
|
40
|
+
/**
|
|
41
|
+
* Run an ABAP class that implements if_oo_adt_classrun interface.
|
|
42
|
+
*
|
|
43
|
+
* This executes the class's main() method and returns console output.
|
|
44
|
+
* The class must implement if_oo_adt_classrun interface to be executable.
|
|
45
|
+
*
|
|
46
|
+
* Endpoint: POST /sap/bc/adt/oo/classrun/{className}
|
|
47
|
+
*
|
|
48
|
+
* Use cases:
|
|
49
|
+
* - Execute test/demo classes
|
|
50
|
+
* - Run data migration scripts
|
|
51
|
+
* - Execute batch processing classes
|
|
52
|
+
* - Quick code testing without creating programs
|
|
53
|
+
*
|
|
54
|
+
* @param connection - SAP connection
|
|
55
|
+
* @param className - Name of the class to run (must implement if_oo_adt_classrun)
|
|
56
|
+
* @param runnable - Optional flag to check if class is runnable (default: true, throws error if false)
|
|
57
|
+
* @param sessionId - Optional session ID for session-based requests
|
|
58
|
+
* @returns Response with console output from the class execution
|
|
59
|
+
* @throws Error if runnable is false, or if class doesn't implement if_oo_adt_classrun or execution fails
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* ```typescript
|
|
63
|
+
* // Class must implement if_oo_adt_classrun:
|
|
64
|
+
* // CLASS zcl_test DEFINITION PUBLIC FINAL CREATE PUBLIC.
|
|
65
|
+
* // PUBLIC SECTION.
|
|
66
|
+
* // INTERFACES if_oo_adt_classrun.
|
|
67
|
+
* // ENDCLASS.
|
|
68
|
+
* //
|
|
69
|
+
* // CLASS zcl_test IMPLEMENTATION.
|
|
70
|
+
* // METHOD if_oo_adt_classrun~main.
|
|
71
|
+
* // out->write( 'Hello World' ).
|
|
72
|
+
* // ENDMETHOD.
|
|
73
|
+
* // ENDCLASS.
|
|
74
|
+
*
|
|
75
|
+
* const result = await runClass(connection, 'ZCL_TEST', true);
|
|
76
|
+
* console.log(result.data); // Console output from the class
|
|
77
|
+
*
|
|
78
|
+
* // Check if class is runnable before attempting to run
|
|
79
|
+
* if (classConfig.runnable) {
|
|
80
|
+
* const result = await runClass(connection, 'ZCL_TEST', true);
|
|
81
|
+
* }
|
|
82
|
+
* ```
|
|
83
|
+
*/
|
|
84
|
+
async function runClass(connection, className, runnable = true, sessionId) {
|
|
85
|
+
if (!runnable) {
|
|
86
|
+
throw new Error(`Class ${className} is not marked as runnable (does not implement if_oo_adt_classrun)`);
|
|
87
|
+
}
|
|
88
|
+
const url = `/sap/bc/adt/oo/classrun/${className}`;
|
|
89
|
+
const headers = {
|
|
90
|
+
'Accept': 'text/plain'
|
|
91
|
+
};
|
|
92
|
+
if (sessionId) {
|
|
93
|
+
const { makeAdtRequestWithSession } = await Promise.resolve().then(() => __importStar(require('../../utils/sessionUtils')));
|
|
94
|
+
return makeAdtRequestWithSession(connection, url, 'POST', sessionId, '', headers);
|
|
95
|
+
}
|
|
96
|
+
else {
|
|
97
|
+
const baseUrl = await connection.getBaseUrl();
|
|
98
|
+
return connection.makeAdtRequest({
|
|
99
|
+
url: `${baseUrl}${url}`,
|
|
100
|
+
method: 'POST',
|
|
101
|
+
timeout: (await Promise.resolve().then(() => __importStar(require('@mcp-abap-adt/connection')))).getTimeout('default'),
|
|
102
|
+
headers
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Class unlock operations
|
|
3
|
+
*/
|
|
4
|
+
import { AbapConnection } from '@mcp-abap-adt/connection';
|
|
5
|
+
import { AxiosResponse } from 'axios';
|
|
6
|
+
/**
|
|
7
|
+
* Unlock class
|
|
8
|
+
* Must use same session and lock handle from lock operation
|
|
9
|
+
*/
|
|
10
|
+
export declare function unlockClass(connection: AbapConnection, className: string, lockHandle: string, sessionId: string): Promise<AxiosResponse>;
|
|
11
|
+
//# sourceMappingURL=unlock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unlock.d.ts","sourceRoot":"","sources":["../../../src/core/class/unlock.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAItC;;;GAGG;AACH,wBAAsB,WAAW,CAC/B,UAAU,EAAE,cAAc,EAC1B,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,aAAa,CAAC,CAIxB"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Class unlock operations
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.unlockClass = unlockClass;
|
|
7
|
+
const internalUtils_1 = require("../../utils/internalUtils");
|
|
8
|
+
const sessionUtils_1 = require("../../utils/sessionUtils");
|
|
9
|
+
/**
|
|
10
|
+
* Unlock class
|
|
11
|
+
* Must use same session and lock handle from lock operation
|
|
12
|
+
*/
|
|
13
|
+
async function unlockClass(connection, className, lockHandle, sessionId) {
|
|
14
|
+
const url = `/sap/bc/adt/oo/classes/${(0, internalUtils_1.encodeSapObjectName)(className).toLowerCase()}?_action=UNLOCK&lockHandle=${lockHandle}`;
|
|
15
|
+
return (0, sessionUtils_1.makeAdtRequestWithSession)(connection, url, 'POST', sessionId, null);
|
|
16
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Class update operations
|
|
3
|
+
*/
|
|
4
|
+
import { AbapConnection } from '@mcp-abap-adt/connection';
|
|
5
|
+
import { AxiosResponse } from 'axios';
|
|
6
|
+
/**
|
|
7
|
+
* Update class source code (low-level function)
|
|
8
|
+
* Requires class to be locked first
|
|
9
|
+
*/
|
|
10
|
+
export declare function updateClass(connection: AbapConnection, className: string, sourceCode: string, lockHandle: string, sessionId: string, transportRequest?: string): Promise<AxiosResponse>;
|
|
11
|
+
//# sourceMappingURL=update.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../src/core/class/update.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAItC;;;GAGG;AACH,wBAAsB,WAAW,CAC/B,UAAU,EAAE,cAAc,EAC1B,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EACjB,gBAAgB,CAAC,EAAE,MAAM,GACxB,OAAO,CAAC,aAAa,CAAC,CAqBxB"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Class update operations
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.updateClass = updateClass;
|
|
7
|
+
const internalUtils_1 = require("../../utils/internalUtils");
|
|
8
|
+
const sessionUtils_1 = require("../../utils/sessionUtils");
|
|
9
|
+
/**
|
|
10
|
+
* Update class source code (low-level function)
|
|
11
|
+
* Requires class to be locked first
|
|
12
|
+
*/
|
|
13
|
+
async function updateClass(connection, className, sourceCode, lockHandle, sessionId, transportRequest) {
|
|
14
|
+
if (!sourceCode) {
|
|
15
|
+
throw new Error('source_code is required');
|
|
16
|
+
}
|
|
17
|
+
if (!lockHandle) {
|
|
18
|
+
throw new Error('lockHandle is required');
|
|
19
|
+
}
|
|
20
|
+
const encodedName = (0, internalUtils_1.encodeSapObjectName)(className).toLowerCase();
|
|
21
|
+
let url = `/sap/bc/adt/oo/classes/${encodedName}/source/main?lockHandle=${lockHandle}`;
|
|
22
|
+
if (transportRequest) {
|
|
23
|
+
url += `&corrNr=${transportRequest}`;
|
|
24
|
+
}
|
|
25
|
+
const headers = {
|
|
26
|
+
'Content-Type': 'text/plain; charset=utf-8',
|
|
27
|
+
'Accept': 'text/plain'
|
|
28
|
+
};
|
|
29
|
+
return await (0, sessionUtils_1.makeAdtRequestWithSession)(connection, url, 'PUT', sessionId, sourceCode, headers);
|
|
30
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Class validation
|
|
3
|
+
*/
|
|
4
|
+
import { AbapConnection } from '@mcp-abap-adt/connection';
|
|
5
|
+
import { AxiosResponse } from 'axios';
|
|
6
|
+
import { ValidationResult } from '../shared/validation';
|
|
7
|
+
export type { ValidationResult } from '../shared/validation';
|
|
8
|
+
/**
|
|
9
|
+
* Validate class name and superclass
|
|
10
|
+
* Uses ADT validation endpoint: /sap/bc/adt/oo/validation/objectname
|
|
11
|
+
*/
|
|
12
|
+
export declare function validateClassName(connection: AbapConnection, className: string, packageName?: string, description?: string, superClass?: string): Promise<ValidationResult>;
|
|
13
|
+
/**
|
|
14
|
+
* Validate class source code.
|
|
15
|
+
*
|
|
16
|
+
* If sourceCode is provided: validates unsaved code (live validation with artifacts)
|
|
17
|
+
* If sourceCode is not provided: validates existing class code in SAP system (without artifacts)
|
|
18
|
+
*
|
|
19
|
+
* @param connection - SAP connection
|
|
20
|
+
* @param className - Class name
|
|
21
|
+
* @param sourceCode - Optional: source code to validate. If omitted, validates existing class in SAP
|
|
22
|
+
* @param version - 'active' (default) or 'inactive' - version context for validation
|
|
23
|
+
* @param sessionId - Optional session ID
|
|
24
|
+
* @returns Check result with errors/warnings
|
|
25
|
+
* @throws Error if validation finds syntax errors
|
|
26
|
+
*/
|
|
27
|
+
export declare function validateClassSource(connection: AbapConnection, className: string, sourceCode?: string, version?: 'inactive' | 'active', sessionId?: string): Promise<AxiosResponse>;
|
|
28
|
+
//# sourceMappingURL=validation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../src/core/class/validation.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAc,MAAM,0BAA0B,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAGtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAIxD,YAAY,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAQ7D;;;GAGG;AACH,wBAAsB,iBAAiB,CACrC,UAAU,EAAE,cAAc,EAC1B,SAAS,EAAE,MAAM,EACjB,WAAW,CAAC,EAAE,MAAM,EACpB,WAAW,CAAC,EAAE,MAAM,EACpB,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,gBAAgB,CAAC,CA0M3B;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,mBAAmB,CACvC,UAAU,EAAE,cAAc,EAC1B,SAAS,EAAE,MAAM,EACjB,UAAU,CAAC,EAAE,MAAM,EACnB,OAAO,GAAE,UAAU,GAAG,QAAmB,EACzC,SAAS,CAAC,EAAE,MAAM,GACjB,OAAO,CAAC,aAAa,CAAC,CAoBxB"}
|