@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,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FunctionModuleBuilder - Fluent API for function module operations with Promise chaining
|
|
3
|
+
*
|
|
4
|
+
* Supports:
|
|
5
|
+
* - Method chaining: builder.validate().then(b => b.create()).then(b => b.lock())...
|
|
6
|
+
* - Error handling: .catch() for error callbacks
|
|
7
|
+
* - Cleanup: .finally() for guaranteed execution
|
|
8
|
+
* - Result storage: all results stored in logger/state
|
|
9
|
+
* - Chain interruption: chain stops on first error (standard Promise behavior)
|
|
10
|
+
*/
|
|
11
|
+
import { AbapConnection } from '@mcp-abap-adt/connection';
|
|
12
|
+
import { AxiosResponse } from 'axios';
|
|
13
|
+
import { ValidationResult } from '../shared/validation';
|
|
14
|
+
export interface FunctionModuleBuilderLogger {
|
|
15
|
+
debug?: (message: string, ...args: any[]) => void;
|
|
16
|
+
info?: (message: string, ...args: any[]) => void;
|
|
17
|
+
warn?: (message: string, ...args: any[]) => void;
|
|
18
|
+
error?: (message: string, ...args: any[]) => void;
|
|
19
|
+
}
|
|
20
|
+
export interface FunctionModuleBuilderConfig {
|
|
21
|
+
functionGroupName: string;
|
|
22
|
+
functionModuleName: string;
|
|
23
|
+
packageName?: string;
|
|
24
|
+
transportRequest?: string;
|
|
25
|
+
description?: string;
|
|
26
|
+
sourceCode?: string;
|
|
27
|
+
sessionId?: string;
|
|
28
|
+
onLock?: (lockHandle: string, sessionId: string) => void;
|
|
29
|
+
}
|
|
30
|
+
export interface FunctionModuleBuilderState {
|
|
31
|
+
validationResult?: ValidationResult;
|
|
32
|
+
createResult?: AxiosResponse;
|
|
33
|
+
lockHandle?: string;
|
|
34
|
+
updateResult?: AxiosResponse;
|
|
35
|
+
checkResult?: AxiosResponse;
|
|
36
|
+
unlockResult?: AxiosResponse;
|
|
37
|
+
activateResult?: AxiosResponse;
|
|
38
|
+
readResult?: AxiosResponse;
|
|
39
|
+
errors: Array<{
|
|
40
|
+
method: string;
|
|
41
|
+
error: Error;
|
|
42
|
+
timestamp: Date;
|
|
43
|
+
}>;
|
|
44
|
+
}
|
|
45
|
+
export declare class FunctionModuleBuilder {
|
|
46
|
+
private connection;
|
|
47
|
+
private logger;
|
|
48
|
+
private config;
|
|
49
|
+
private sourceCode?;
|
|
50
|
+
private lockHandle?;
|
|
51
|
+
private sessionId;
|
|
52
|
+
private state;
|
|
53
|
+
constructor(connection: AbapConnection, logger: FunctionModuleBuilderLogger, config: FunctionModuleBuilderConfig);
|
|
54
|
+
setPackage(packageName: string): this;
|
|
55
|
+
setRequest(transportRequest: string): this;
|
|
56
|
+
setFunctionGroup(functionGroupName: string): this;
|
|
57
|
+
setName(functionModuleName: string): this;
|
|
58
|
+
setCode(sourceCode: string): this;
|
|
59
|
+
setDescription(description: string): this;
|
|
60
|
+
validate(): Promise<this>;
|
|
61
|
+
create(): Promise<this>;
|
|
62
|
+
lock(): Promise<this>;
|
|
63
|
+
update(sourceCode?: string): Promise<this>;
|
|
64
|
+
check(version?: 'active' | 'inactive'): Promise<this>;
|
|
65
|
+
unlock(): Promise<this>;
|
|
66
|
+
activate(): Promise<this>;
|
|
67
|
+
read(version?: 'active' | 'inactive'): Promise<this>;
|
|
68
|
+
forceUnlock(): Promise<void>;
|
|
69
|
+
getState(): Readonly<FunctionModuleBuilderState>;
|
|
70
|
+
getFunctionModuleName(): string;
|
|
71
|
+
getFunctionGroupName(): string;
|
|
72
|
+
getLockHandle(): string | undefined;
|
|
73
|
+
getSessionId(): string;
|
|
74
|
+
getValidationResult(): ValidationResult | undefined;
|
|
75
|
+
getCreateResult(): AxiosResponse | undefined;
|
|
76
|
+
getUpdateResult(): AxiosResponse | undefined;
|
|
77
|
+
getCheckResult(): AxiosResponse | undefined;
|
|
78
|
+
getUnlockResult(): AxiosResponse | undefined;
|
|
79
|
+
getActivateResult(): AxiosResponse | undefined;
|
|
80
|
+
getReadResult(): AxiosResponse | undefined;
|
|
81
|
+
getErrors(): ReadonlyArray<{
|
|
82
|
+
method: string;
|
|
83
|
+
error: Error;
|
|
84
|
+
timestamp: Date;
|
|
85
|
+
}>;
|
|
86
|
+
getResults(): {
|
|
87
|
+
validation?: ValidationResult;
|
|
88
|
+
create?: AxiosResponse;
|
|
89
|
+
update?: AxiosResponse;
|
|
90
|
+
check?: AxiosResponse;
|
|
91
|
+
unlock?: AxiosResponse;
|
|
92
|
+
activate?: AxiosResponse;
|
|
93
|
+
lockHandle?: string;
|
|
94
|
+
errors: Array<{
|
|
95
|
+
method: string;
|
|
96
|
+
error: Error;
|
|
97
|
+
timestamp: Date;
|
|
98
|
+
}>;
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
//# sourceMappingURL=FunctionModuleBuilder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FunctionModuleBuilder.d.ts","sourceRoot":"","sources":["../../../src/core/functionModule/FunctionModuleBuilder.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* FunctionModuleBuilder - Fluent API for function module operations with Promise chaining
|
|
4
|
+
*
|
|
5
|
+
* Supports:
|
|
6
|
+
* - Method chaining: builder.validate().then(b => b.create()).then(b => b.lock())...
|
|
7
|
+
* - Error handling: .catch() for error callbacks
|
|
8
|
+
* - Cleanup: .finally() for guaranteed execution
|
|
9
|
+
* - Result storage: all results stored in logger/state
|
|
10
|
+
* - Chain interruption: chain stops on first error (standard Promise behavior)
|
|
11
|
+
*/
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.FunctionModuleBuilder = void 0;
|
|
14
|
+
const sessionUtils_1 = require("../../utils/sessionUtils");
|
|
15
|
+
const validation_1 = require("./validation");
|
|
16
|
+
const create_1 = require("./create");
|
|
17
|
+
const lock_1 = require("./lock");
|
|
18
|
+
const update_1 = require("./update");
|
|
19
|
+
const check_1 = require("./check");
|
|
20
|
+
const unlock_1 = require("./unlock");
|
|
21
|
+
const activation_1 = require("./activation");
|
|
22
|
+
const read_1 = require("./read");
|
|
23
|
+
class FunctionModuleBuilder {
|
|
24
|
+
connection;
|
|
25
|
+
logger;
|
|
26
|
+
config;
|
|
27
|
+
sourceCode;
|
|
28
|
+
lockHandle;
|
|
29
|
+
sessionId;
|
|
30
|
+
state;
|
|
31
|
+
constructor(connection, logger, config) {
|
|
32
|
+
this.connection = connection;
|
|
33
|
+
this.logger = logger;
|
|
34
|
+
this.config = { ...config };
|
|
35
|
+
this.sourceCode = config.sourceCode;
|
|
36
|
+
this.sessionId = config.sessionId || (0, sessionUtils_1.generateSessionId)();
|
|
37
|
+
this.state = {
|
|
38
|
+
errors: []
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
// Builder methods - return this for chaining
|
|
42
|
+
setPackage(packageName) {
|
|
43
|
+
this.config.packageName = packageName;
|
|
44
|
+
this.logger.debug?.('Package set:', packageName);
|
|
45
|
+
return this;
|
|
46
|
+
}
|
|
47
|
+
setRequest(transportRequest) {
|
|
48
|
+
this.config.transportRequest = transportRequest;
|
|
49
|
+
this.logger.debug?.('Transport request set:', transportRequest);
|
|
50
|
+
return this;
|
|
51
|
+
}
|
|
52
|
+
setFunctionGroup(functionGroupName) {
|
|
53
|
+
this.config.functionGroupName = functionGroupName;
|
|
54
|
+
this.logger.debug?.('Function group name set:', functionGroupName);
|
|
55
|
+
return this;
|
|
56
|
+
}
|
|
57
|
+
setName(functionModuleName) {
|
|
58
|
+
this.config.functionModuleName = functionModuleName;
|
|
59
|
+
this.logger.debug?.('Function module name set:', functionModuleName);
|
|
60
|
+
return this;
|
|
61
|
+
}
|
|
62
|
+
setCode(sourceCode) {
|
|
63
|
+
this.sourceCode = sourceCode;
|
|
64
|
+
this.logger.debug?.('Source code set, length:', sourceCode.length);
|
|
65
|
+
return this;
|
|
66
|
+
}
|
|
67
|
+
setDescription(description) {
|
|
68
|
+
this.config.description = description;
|
|
69
|
+
return this;
|
|
70
|
+
}
|
|
71
|
+
// Operation methods - return Promise<this> for Promise chaining
|
|
72
|
+
async validate() {
|
|
73
|
+
try {
|
|
74
|
+
this.logger.info?.('Validating function module:', this.config.functionModuleName);
|
|
75
|
+
const result = await (0, validation_1.validateFunctionModuleName)(this.connection, this.config.functionGroupName, this.config.functionModuleName, this.config.description);
|
|
76
|
+
this.state.validationResult = result;
|
|
77
|
+
this.logger.info?.('Validation successful:', result.valid);
|
|
78
|
+
return this;
|
|
79
|
+
}
|
|
80
|
+
catch (error) {
|
|
81
|
+
this.state.errors.push({
|
|
82
|
+
method: 'validate',
|
|
83
|
+
error: error instanceof Error ? error : new Error(String(error)),
|
|
84
|
+
timestamp: new Date()
|
|
85
|
+
});
|
|
86
|
+
this.logger.error?.('Validation failed:', error);
|
|
87
|
+
throw error; // Interrupts chain
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
async create() {
|
|
91
|
+
try {
|
|
92
|
+
if (!this.sourceCode) {
|
|
93
|
+
throw new Error('Source code is required before calling create(). Use setCode().');
|
|
94
|
+
}
|
|
95
|
+
this.logger.info?.('Creating function module:', this.config.functionModuleName);
|
|
96
|
+
const params = {
|
|
97
|
+
function_group_name: this.config.functionGroupName,
|
|
98
|
+
function_module_name: this.config.functionModuleName,
|
|
99
|
+
source_code: this.sourceCode,
|
|
100
|
+
package_name: this.config.packageName,
|
|
101
|
+
description: this.config.description,
|
|
102
|
+
transport_request: this.config.transportRequest,
|
|
103
|
+
activate: false // Don't activate in low-level function
|
|
104
|
+
};
|
|
105
|
+
const result = await (0, create_1.createFunctionModule)(this.connection, params);
|
|
106
|
+
this.state.createResult = result;
|
|
107
|
+
this.logger.info?.('Function module created successfully:', result.status);
|
|
108
|
+
return this;
|
|
109
|
+
}
|
|
110
|
+
catch (error) {
|
|
111
|
+
this.state.errors.push({
|
|
112
|
+
method: 'create',
|
|
113
|
+
error: error instanceof Error ? error : new Error(String(error)),
|
|
114
|
+
timestamp: new Date()
|
|
115
|
+
});
|
|
116
|
+
this.logger.error?.('Create failed:', error);
|
|
117
|
+
throw error; // Interrupts chain
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
async lock() {
|
|
121
|
+
try {
|
|
122
|
+
this.logger.info?.('Locking function module:', this.config.functionModuleName);
|
|
123
|
+
const lockHandle = await (0, lock_1.lockFunctionModule)(this.connection, this.config.functionGroupName, this.config.functionModuleName, this.sessionId);
|
|
124
|
+
this.lockHandle = lockHandle;
|
|
125
|
+
this.state.lockHandle = lockHandle;
|
|
126
|
+
// Register lock in persistent storage if callback provided
|
|
127
|
+
if (this.config.onLock) {
|
|
128
|
+
this.config.onLock(lockHandle, this.sessionId);
|
|
129
|
+
}
|
|
130
|
+
this.logger.info?.('Function module locked, handle:', lockHandle.substring(0, 10) + '...');
|
|
131
|
+
return this;
|
|
132
|
+
}
|
|
133
|
+
catch (error) {
|
|
134
|
+
this.state.errors.push({
|
|
135
|
+
method: 'lock',
|
|
136
|
+
error: error instanceof Error ? error : new Error(String(error)),
|
|
137
|
+
timestamp: new Date()
|
|
138
|
+
});
|
|
139
|
+
this.logger.error?.('Lock failed:', error);
|
|
140
|
+
throw error; // Interrupts chain
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
async update(sourceCode) {
|
|
144
|
+
try {
|
|
145
|
+
if (!this.lockHandle) {
|
|
146
|
+
throw new Error('Function module must be locked before update. Call lock() first.');
|
|
147
|
+
}
|
|
148
|
+
const code = sourceCode || this.sourceCode;
|
|
149
|
+
if (!code) {
|
|
150
|
+
throw new Error('Source code is required. Use setCode() or pass as parameter.');
|
|
151
|
+
}
|
|
152
|
+
this.logger.info?.('Updating function module source:', this.config.functionModuleName);
|
|
153
|
+
const result = await (0, update_1.updateFunctionModuleSourceInternal)(this.connection, this.config.functionGroupName, this.config.functionModuleName, this.lockHandle, code, this.sessionId, this.config.transportRequest);
|
|
154
|
+
this.state.updateResult = result;
|
|
155
|
+
this.logger.info?.('Function module updated successfully:', result.status);
|
|
156
|
+
return this;
|
|
157
|
+
}
|
|
158
|
+
catch (error) {
|
|
159
|
+
this.state.errors.push({
|
|
160
|
+
method: 'update',
|
|
161
|
+
error: error instanceof Error ? error : new Error(String(error)),
|
|
162
|
+
timestamp: new Date()
|
|
163
|
+
});
|
|
164
|
+
this.logger.error?.('Update failed:', error);
|
|
165
|
+
throw error; // Interrupts chain
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
async check(version = 'inactive') {
|
|
169
|
+
try {
|
|
170
|
+
this.logger.info?.('Checking function module:', this.config.functionModuleName, 'version:', version);
|
|
171
|
+
const result = await (0, check_1.checkFunctionModule)(this.connection, this.config.functionGroupName, this.config.functionModuleName, version, this.sessionId);
|
|
172
|
+
this.state.checkResult = result;
|
|
173
|
+
this.logger.info?.('Function module check successful:', result.status);
|
|
174
|
+
return this;
|
|
175
|
+
}
|
|
176
|
+
catch (error) {
|
|
177
|
+
this.state.errors.push({
|
|
178
|
+
method: 'check',
|
|
179
|
+
error: error instanceof Error ? error : new Error(String(error)),
|
|
180
|
+
timestamp: new Date()
|
|
181
|
+
});
|
|
182
|
+
this.logger.error?.('Check failed:', error);
|
|
183
|
+
throw error; // Interrupts chain
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
async unlock() {
|
|
187
|
+
try {
|
|
188
|
+
if (!this.lockHandle) {
|
|
189
|
+
throw new Error('Function module is not locked. Call lock() first.');
|
|
190
|
+
}
|
|
191
|
+
this.logger.info?.('Unlocking function module:', this.config.functionModuleName);
|
|
192
|
+
await (0, unlock_1.unlockFunctionModule)(this.connection, this.config.functionGroupName, this.config.functionModuleName, this.lockHandle, this.sessionId);
|
|
193
|
+
this.lockHandle = undefined;
|
|
194
|
+
this.state.lockHandle = undefined;
|
|
195
|
+
this.logger.info?.('Function module unlocked successfully');
|
|
196
|
+
return this;
|
|
197
|
+
}
|
|
198
|
+
catch (error) {
|
|
199
|
+
this.state.errors.push({
|
|
200
|
+
method: 'unlock',
|
|
201
|
+
error: error instanceof Error ? error : new Error(String(error)),
|
|
202
|
+
timestamp: new Date()
|
|
203
|
+
});
|
|
204
|
+
this.logger.error?.('Unlock failed:', error);
|
|
205
|
+
throw error; // Interrupts chain
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
async activate() {
|
|
209
|
+
try {
|
|
210
|
+
this.logger.info?.('Activating function module:', this.config.functionModuleName);
|
|
211
|
+
const result = await (0, activation_1.activateFunctionModule)(this.connection, this.config.functionGroupName, this.config.functionModuleName, this.sessionId);
|
|
212
|
+
this.state.activateResult = result;
|
|
213
|
+
this.logger.info?.('Function module activated successfully:', result.status);
|
|
214
|
+
return this;
|
|
215
|
+
}
|
|
216
|
+
catch (error) {
|
|
217
|
+
this.state.errors.push({
|
|
218
|
+
method: 'activate',
|
|
219
|
+
error: error instanceof Error ? error : new Error(String(error)),
|
|
220
|
+
timestamp: new Date()
|
|
221
|
+
});
|
|
222
|
+
this.logger.error?.('Activate failed:', error);
|
|
223
|
+
throw error; // Interrupts chain
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
async read(version = 'active') {
|
|
227
|
+
try {
|
|
228
|
+
this.logger.info?.('Reading function module:', this.config.functionModuleName);
|
|
229
|
+
const result = await (0, read_1.getFunctionSource)(this.connection, this.config.functionModuleName, this.config.functionGroupName, version);
|
|
230
|
+
this.state.readResult = result;
|
|
231
|
+
this.logger.info?.('Function module read successfully:', result.status);
|
|
232
|
+
return this;
|
|
233
|
+
}
|
|
234
|
+
catch (error) {
|
|
235
|
+
this.state.errors.push({
|
|
236
|
+
method: 'read',
|
|
237
|
+
error: error instanceof Error ? error : new Error(String(error)),
|
|
238
|
+
timestamp: new Date()
|
|
239
|
+
});
|
|
240
|
+
this.logger.error?.('Read failed:', error);
|
|
241
|
+
throw error; // Interrupts chain
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
async forceUnlock() {
|
|
245
|
+
if (!this.lockHandle) {
|
|
246
|
+
return;
|
|
247
|
+
}
|
|
248
|
+
try {
|
|
249
|
+
await (0, unlock_1.unlockFunctionModule)(this.connection, this.config.functionGroupName, this.config.functionModuleName, this.lockHandle, this.sessionId);
|
|
250
|
+
this.logger.info?.('Force unlock successful for', this.config.functionModuleName);
|
|
251
|
+
}
|
|
252
|
+
catch (error) {
|
|
253
|
+
this.logger.warn?.('Force unlock failed:', error);
|
|
254
|
+
}
|
|
255
|
+
finally {
|
|
256
|
+
this.lockHandle = undefined;
|
|
257
|
+
this.state.lockHandle = undefined;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
// Getters for accessing results
|
|
261
|
+
getState() {
|
|
262
|
+
return { ...this.state };
|
|
263
|
+
}
|
|
264
|
+
getFunctionModuleName() {
|
|
265
|
+
return this.config.functionModuleName;
|
|
266
|
+
}
|
|
267
|
+
getFunctionGroupName() {
|
|
268
|
+
return this.config.functionGroupName;
|
|
269
|
+
}
|
|
270
|
+
getLockHandle() {
|
|
271
|
+
return this.lockHandle;
|
|
272
|
+
}
|
|
273
|
+
getSessionId() {
|
|
274
|
+
return this.sessionId;
|
|
275
|
+
}
|
|
276
|
+
getValidationResult() {
|
|
277
|
+
return this.state.validationResult;
|
|
278
|
+
}
|
|
279
|
+
getCreateResult() {
|
|
280
|
+
return this.state.createResult;
|
|
281
|
+
}
|
|
282
|
+
getUpdateResult() {
|
|
283
|
+
return this.state.updateResult;
|
|
284
|
+
}
|
|
285
|
+
getCheckResult() {
|
|
286
|
+
return this.state.checkResult;
|
|
287
|
+
}
|
|
288
|
+
getUnlockResult() {
|
|
289
|
+
return this.state.unlockResult;
|
|
290
|
+
}
|
|
291
|
+
getActivateResult() {
|
|
292
|
+
return this.state.activateResult;
|
|
293
|
+
}
|
|
294
|
+
getReadResult() {
|
|
295
|
+
return this.state.readResult;
|
|
296
|
+
}
|
|
297
|
+
getErrors() {
|
|
298
|
+
return [...this.state.errors];
|
|
299
|
+
}
|
|
300
|
+
// Helper method to get all results
|
|
301
|
+
getResults() {
|
|
302
|
+
return {
|
|
303
|
+
validation: this.state.validationResult,
|
|
304
|
+
create: this.state.createResult,
|
|
305
|
+
update: this.state.updateResult,
|
|
306
|
+
check: this.state.checkResult,
|
|
307
|
+
unlock: this.state.unlockResult,
|
|
308
|
+
activate: this.state.activateResult,
|
|
309
|
+
lockHandle: this.lockHandle,
|
|
310
|
+
errors: [...this.state.errors]
|
|
311
|
+
};
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
exports.FunctionModuleBuilder = FunctionModuleBuilder;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FunctionModule activation operations
|
|
3
|
+
*/
|
|
4
|
+
import { AbapConnection } from '@mcp-abap-adt/connection';
|
|
5
|
+
import { AxiosResponse } from 'axios';
|
|
6
|
+
/**
|
|
7
|
+
* Activate function module
|
|
8
|
+
*/
|
|
9
|
+
export declare function activateFunctionModule(connection: AbapConnection, functionGroupName: string, functionModuleName: string, sessionId: string): Promise<AxiosResponse>;
|
|
10
|
+
//# sourceMappingURL=activation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"activation.d.ts","sourceRoot":"","sources":["../../../src/core/functionModule/activation.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAItC;;GAEG;AACH,wBAAsB,sBAAsB,CAC1C,UAAU,EAAE,cAAc,EAC1B,iBAAiB,EAAE,MAAM,EACzB,kBAAkB,EAAE,MAAM,EAC1B,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,aAAa,CAAC,CAMxB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* FunctionModule activation operations
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.activateFunctionModule = activateFunctionModule;
|
|
7
|
+
const internalUtils_1 = require("../../utils/internalUtils");
|
|
8
|
+
const activationUtils_1 = require("../../utils/activationUtils");
|
|
9
|
+
/**
|
|
10
|
+
* Activate function module
|
|
11
|
+
*/
|
|
12
|
+
async function activateFunctionModule(connection, functionGroupName, functionModuleName, sessionId) {
|
|
13
|
+
const encodedGroupName = (0, internalUtils_1.encodeSapObjectName)(functionGroupName).toLowerCase();
|
|
14
|
+
const encodedModuleName = (0, internalUtils_1.encodeSapObjectName)(functionModuleName).toLowerCase();
|
|
15
|
+
const objectUri = `/sap/bc/adt/functions/groups/${encodedGroupName}/fmodules/${encodedModuleName}`;
|
|
16
|
+
return await (0, activationUtils_1.activateObjectInSession)(connection, objectUri, functionModuleName, sessionId, true);
|
|
17
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FunctionModule check operations
|
|
3
|
+
*/
|
|
4
|
+
import { AbapConnection } from '@mcp-abap-adt/connection';
|
|
5
|
+
import { AxiosResponse } from 'axios';
|
|
6
|
+
/**
|
|
7
|
+
* Check function module code (syntax, compilation, rules)
|
|
8
|
+
*
|
|
9
|
+
* CheckRun validates everything: syntax, compilation errors, warnings, code quality rules.
|
|
10
|
+
*
|
|
11
|
+
* Can check:
|
|
12
|
+
* - Existing active function module: provide functionGroupName, functionModuleName, version='active'
|
|
13
|
+
* - Existing inactive function module: provide functionGroupName, functionModuleName, version='inactive'
|
|
14
|
+
*
|
|
15
|
+
* @param connection - SAP connection
|
|
16
|
+
* @param functionGroupName - Function group name
|
|
17
|
+
* @param functionModuleName - Function module name
|
|
18
|
+
* @param version - 'active' (activated version) or 'inactive' (saved but not activated)
|
|
19
|
+
* @param sessionId - Optional session ID
|
|
20
|
+
* @returns Check result with errors/warnings
|
|
21
|
+
*/
|
|
22
|
+
export declare function checkFunctionModule(connection: AbapConnection, functionGroupName: string, functionModuleName: string, version: 'active' | 'inactive', sessionId?: string): Promise<AxiosResponse>;
|
|
23
|
+
//# sourceMappingURL=check.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check.d.ts","sourceRoot":"","sources":["../../../src/core/functionModule/check.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAc,MAAM,0BAA0B,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAkBtC;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,mBAAmB,CACvC,UAAU,EAAE,cAAc,EAC1B,iBAAiB,EAAE,MAAM,EACzB,kBAAkB,EAAE,MAAM,EAC1B,OAAO,EAAE,QAAQ,GAAG,UAAU,EAC9B,SAAS,CAAC,EAAE,MAAM,GACjB,OAAO,CAAC,aAAa,CAAC,CAqDxB"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* FunctionModule check operations
|
|
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.checkFunctionModule = checkFunctionModule;
|
|
40
|
+
const connection_1 = require("@mcp-abap-adt/connection");
|
|
41
|
+
const internalUtils_1 = require("../../utils/internalUtils");
|
|
42
|
+
const checkRun_1 = require("../shared/checkRun");
|
|
43
|
+
/**
|
|
44
|
+
* Build check run XML payload for function module
|
|
45
|
+
*/
|
|
46
|
+
function buildCheckRunXml(functionGroupName, functionModuleName, version) {
|
|
47
|
+
const encodedGroup = (0, internalUtils_1.encodeSapObjectName)(functionGroupName).toLowerCase();
|
|
48
|
+
const encodedModule = (0, internalUtils_1.encodeSapObjectName)(functionModuleName).toLowerCase();
|
|
49
|
+
const objectUri = `/sap/bc/adt/functions/groups/${encodedGroup}/fmodules/${encodedModule}`;
|
|
50
|
+
return `<?xml version="1.0" encoding="UTF-8"?>
|
|
51
|
+
<chkrun:checkObjectList xmlns:chkrun="http://www.sap.com/adt/checkrun" xmlns:adtcore="http://www.sap.com/adt/core">
|
|
52
|
+
<chkrun:checkObject adtcore:uri="${objectUri}" chkrun:version="${version}"/>
|
|
53
|
+
</chkrun:checkObjectList>`;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Check function module code (syntax, compilation, rules)
|
|
57
|
+
*
|
|
58
|
+
* CheckRun validates everything: syntax, compilation errors, warnings, code quality rules.
|
|
59
|
+
*
|
|
60
|
+
* Can check:
|
|
61
|
+
* - Existing active function module: provide functionGroupName, functionModuleName, version='active'
|
|
62
|
+
* - Existing inactive function module: provide functionGroupName, functionModuleName, version='inactive'
|
|
63
|
+
*
|
|
64
|
+
* @param connection - SAP connection
|
|
65
|
+
* @param functionGroupName - Function group name
|
|
66
|
+
* @param functionModuleName - Function module name
|
|
67
|
+
* @param version - 'active' (activated version) or 'inactive' (saved but not activated)
|
|
68
|
+
* @param sessionId - Optional session ID
|
|
69
|
+
* @returns Check result with errors/warnings
|
|
70
|
+
*/
|
|
71
|
+
async function checkFunctionModule(connection, functionGroupName, functionModuleName, version, sessionId) {
|
|
72
|
+
const xmlBody = buildCheckRunXml(functionGroupName, functionModuleName, version);
|
|
73
|
+
const headers = {
|
|
74
|
+
'Accept': 'application/vnd.sap.adt.checkmessages+xml',
|
|
75
|
+
'Content-Type': 'application/vnd.sap.adt.checkobjects+xml'
|
|
76
|
+
};
|
|
77
|
+
const url = `/sap/bc/adt/checkruns?reporters=abapCheckRun`;
|
|
78
|
+
let response;
|
|
79
|
+
if (sessionId) {
|
|
80
|
+
const { makeAdtRequestWithSession } = await Promise.resolve().then(() => __importStar(require('../../utils/sessionUtils')));
|
|
81
|
+
response = await makeAdtRequestWithSession(connection, url, 'POST', sessionId, xmlBody, headers);
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
const baseUrl = await connection.getBaseUrl();
|
|
85
|
+
response = await connection.makeAdtRequest({
|
|
86
|
+
url: `${baseUrl}${url}`,
|
|
87
|
+
method: 'POST',
|
|
88
|
+
timeout: (0, connection_1.getTimeout)('default'),
|
|
89
|
+
data: xmlBody,
|
|
90
|
+
headers
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
const checkResult = (0, checkRun_1.parseCheckRunResponse)(response);
|
|
94
|
+
// Check result is OK if:
|
|
95
|
+
// 1. Message says "has been checked" or "was checked" - object was already checked, this is OK
|
|
96
|
+
// Problems are: ERROR and WARNING
|
|
97
|
+
// Only throw error if there are actual ERROR or WARNING messages
|
|
98
|
+
// If message indicates object was already checked, it's OK (even if has errors/warnings)
|
|
99
|
+
const isAlreadyChecked = checkResult.message?.toLowerCase().includes('has been checked') ||
|
|
100
|
+
checkResult.message?.toLowerCase().includes('was checked');
|
|
101
|
+
if (isAlreadyChecked) {
|
|
102
|
+
return response; // Object was already checked - this is OK
|
|
103
|
+
}
|
|
104
|
+
// Problems: ERROR (errors) and WARNING (warnings)
|
|
105
|
+
if (checkResult.errors.length > 0) {
|
|
106
|
+
throw new Error(`Function module check failed: ${checkResult.message || 'Unknown error'}`);
|
|
107
|
+
}
|
|
108
|
+
if (checkResult.warnings.length > 0) {
|
|
109
|
+
throw new Error(`Function module check failed: ${checkResult.message || 'Warnings found'}`);
|
|
110
|
+
}
|
|
111
|
+
// If status is 'notProcessed', it's an error
|
|
112
|
+
if (checkResult.status === 'notProcessed') {
|
|
113
|
+
throw new Error(`Function module check failed: ${checkResult.message || 'Object could not be processed'}`);
|
|
114
|
+
}
|
|
115
|
+
return response;
|
|
116
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FunctionModule create operations
|
|
3
|
+
*/
|
|
4
|
+
import { AbapConnection } from '@mcp-abap-adt/connection';
|
|
5
|
+
import { AxiosResponse } from 'axios';
|
|
6
|
+
import { CreateFunctionModuleParams } from './types';
|
|
7
|
+
/**
|
|
8
|
+
* Create ABAP function module
|
|
9
|
+
* Full workflow: create metadata -> lock -> upload source -> unlock -> activate
|
|
10
|
+
*/
|
|
11
|
+
export declare function createFunctionModule(connection: AbapConnection, params: CreateFunctionModuleParams): Promise<AxiosResponse>;
|
|
12
|
+
//# sourceMappingURL=create.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../src/core/functionModule/create.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAc,MAAM,0BAA0B,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAQtC,OAAO,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AA4ErD;;;GAGG;AACH,wBAAsB,oBAAoB,CACxC,UAAU,EAAE,cAAc,EAC1B,MAAM,EAAE,0BAA0B,GACjC,OAAO,CAAC,aAAa,CAAC,CAkHxB"}
|