trm-core 9.10.6 → 10.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -0
- package/changelog.txt +11 -0
- package/dist/actions/cg3y/download.js +34 -4
- package/dist/actions/cg3y/index.d.ts +23 -0
- package/dist/actions/cg3y/index.js +13 -10
- package/dist/actions/cg3z/index.d.ts +67 -3
- package/dist/actions/cg3z/index.js +25 -14
- package/dist/actions/cg3z/upload.d.ts +20 -0
- package/dist/actions/cg3z/upload.js +165 -36
- package/dist/actions/checkEngines/analyze.d.ts +11 -0
- package/dist/actions/checkEngines/analyze.js +294 -0
- package/dist/actions/checkEngines/index.d.ts +87 -0
- package/dist/actions/checkEngines/index.js +38 -0
- package/dist/actions/checkEngines/init.d.ts +11 -0
- package/dist/actions/checkEngines/init.js +45 -0
- package/dist/actions/checkPackageDependencies/analyze.d.ts +10 -0
- package/dist/actions/checkPackageDependencies/analyze.js +37 -39
- package/dist/actions/checkPackageDependencies/index.d.ts +56 -0
- package/dist/actions/checkPackageDependencies/index.js +13 -10
- package/dist/actions/checkPackageDependencies/init.d.ts +8 -0
- package/dist/actions/checkPackageDependencies/init.js +24 -2
- package/dist/actions/checkSapEntries/analyze.d.ts +12 -0
- package/dist/actions/checkSapEntries/analyze.js +63 -47
- package/dist/actions/checkSapEntries/index.d.ts +35 -0
- package/dist/actions/checkSapEntries/index.js +12 -10
- package/dist/actions/checkSapEntries/init.d.ts +8 -0
- package/dist/actions/checkSapEntries/init.js +10 -2
- package/dist/actions/commons/IActionContext.d.ts +10 -0
- package/dist/actions/commons/checkServerAuth.d.ts +7 -0
- package/dist/actions/commons/checkServerAuth.js +10 -5
- package/dist/actions/commons/index.d.ts +1 -1
- package/dist/actions/commons/index.js +1 -1
- package/dist/actions/commons/prompts/index.d.ts +1 -0
- package/dist/actions/commons/prompts/index.js +1 -0
- package/dist/actions/commons/prompts/setLandscapeTarget.d.ts +14 -0
- package/dist/actions/commons/prompts/setLandscapeTarget.js +40 -0
- package/dist/actions/commons/prompts/setTransportTarget.d.ts +15 -0
- package/dist/actions/commons/prompts/setTransportTarget.js +20 -2
- package/dist/actions/commons/setSystemPackages.d.ts +7 -0
- package/dist/actions/commons/setSystemPackages.js +12 -2
- package/dist/actions/commons/utils/actionLocks.d.ts +32 -0
- package/dist/actions/commons/utils/actionLocks.js +135 -0
- package/dist/actions/commons/utils/dirtyEntries.d.ts +12 -0
- package/dist/actions/commons/utils/dirtyEntries.js +54 -0
- package/dist/actions/commons/utils/index.d.ts +10 -0
- package/dist/actions/commons/utils/index.js +26 -0
- package/dist/actions/commons/utils/installRegistry.d.ts +18 -0
- package/dist/actions/commons/utils/installRegistry.js +46 -0
- package/dist/actions/commons/utils/installedDependency.d.ts +15 -0
- package/dist/actions/commons/utils/installedDependency.js +30 -0
- package/dist/actions/commons/utils/owningInstallation.d.ts +6 -0
- package/dist/actions/commons/utils/owningInstallation.js +47 -0
- package/dist/actions/commons/utils/packageCleanup.d.ts +168 -0
- package/dist/actions/commons/utils/packageCleanup.js +1017 -0
- package/dist/actions/commons/utils/releaseDeletionTransport.d.ts +5 -0
- package/dist/actions/commons/utils/releaseDeletionTransport.js +67 -0
- package/dist/actions/commons/utils/restoreTransport.d.ts +6 -0
- package/dist/actions/commons/utils/restoreTransport.js +50 -0
- package/dist/actions/commons/utils/retainedWorkflow.d.ts +6 -0
- package/dist/actions/commons/utils/retainedWorkflow.js +49 -0
- package/dist/actions/commons/utils/withScopedPrefix.d.ts +5 -0
- package/dist/actions/commons/utils/withScopedPrefix.js +32 -0
- package/dist/actions/commons/workflowCallbacks.d.ts +21 -0
- package/dist/actions/commons/workflowCallbacks.js +157 -0
- package/dist/actions/index.d.ts +3 -0
- package/dist/actions/index.js +5 -0
- package/dist/actions/install/addNamespace.d.ts +18 -0
- package/dist/actions/install/addNamespace.js +121 -51
- package/dist/actions/install/checkDependants.d.ts +15 -0
- package/dist/actions/install/checkDependants.js +74 -0
- package/dist/actions/install/checkDependencies.d.ts +11 -0
- package/dist/actions/install/checkDependencies.js +32 -13
- package/dist/actions/install/checkDependencyCycles.d.ts +17 -0
- package/dist/actions/install/checkDependencyCycles.js +105 -0
- package/dist/actions/install/checkEngines.d.ts +11 -0
- package/dist/actions/install/checkEngines.js +100 -0
- package/dist/actions/install/checkInstallDevclass.d.ts +24 -0
- package/dist/actions/install/checkInstallDevclass.js +110 -0
- package/dist/actions/install/checkSapEntries.d.ts +9 -0
- package/dist/actions/install/checkSapEntries.js +20 -12
- package/dist/actions/install/checkTransports.d.ts +34 -0
- package/dist/actions/install/checkTransports.js +329 -170
- package/dist/actions/install/cleanupCheckpoint.d.ts +11 -0
- package/dist/actions/install/cleanupCheckpoint.js +62 -0
- package/dist/actions/install/defaultTransportLayer.d.ts +5 -0
- package/dist/actions/install/defaultTransportLayer.js +36 -0
- package/dist/actions/install/executePostActivities.d.ts +6 -0
- package/dist/actions/install/executePostActivities.js +28 -38
- package/dist/actions/install/generateDevclass.d.ts +10 -0
- package/dist/actions/install/generateDevclass.js +66 -20
- package/dist/actions/install/generateLandscapeTransport.d.ts +23 -0
- package/dist/actions/install/generateLandscapeTransport.js +136 -0
- package/dist/actions/install/generateUpdateTransport.d.ts +20 -0
- package/dist/actions/install/generateUpdateTransport.js +122 -0
- package/dist/actions/install/importBatch.d.ts +22 -0
- package/dist/actions/install/importBatch.js +0 -0
- package/dist/actions/install/index.d.ts +273 -44
- package/dist/actions/install/index.js +139 -59
- package/dist/actions/install/init.d.ts +14 -0
- package/dist/actions/install/init.js +215 -108
- package/dist/actions/install/installDependencies.d.ts +14 -0
- package/dist/actions/install/installDependencies.js +122 -45
- package/dist/actions/install/lockResources.d.ts +8 -0
- package/dist/actions/install/lockResources.js +100 -0
- package/dist/actions/install/prepareCust.d.ts +13 -0
- package/dist/actions/install/prepareCust.js +138 -0
- package/dist/actions/install/prepareDevc.d.ts +15 -0
- package/dist/actions/install/prepareDevc.js +113 -0
- package/dist/actions/install/prepareLang.d.ts +13 -0
- package/dist/actions/install/prepareLang.js +110 -0
- package/dist/actions/install/prepareTadir.d.ts +13 -0
- package/dist/actions/install/prepareTadir.js +95 -0
- package/dist/actions/install/releaseLandscapeTransport.d.ts +11 -0
- package/dist/actions/install/releaseLandscapeTransport.js +79 -0
- package/dist/actions/install/setInstallDevclass.d.ts +10 -0
- package/dist/actions/install/setInstallDevclass.js +140 -54
- package/dist/actions/install/updatePackageData.d.ts +9 -0
- package/dist/actions/install/updatePackageData.js +117 -13
- package/dist/actions/installDependency/checkInstalledRelease.d.ts +13 -0
- package/dist/actions/installDependency/checkInstalledRelease.js +50 -0
- package/dist/actions/installDependency/confirmDowngrade.d.ts +11 -0
- package/dist/actions/installDependency/confirmDowngrade.js +53 -0
- package/dist/actions/installDependency/findInstallRelease.d.ts +24 -0
- package/dist/actions/installDependency/findInstallRelease.js +42 -19
- package/dist/actions/installDependency/index.d.ts +64 -3
- package/dist/actions/installDependency/index.js +30 -13
- package/dist/actions/installDependency/init.d.ts +14 -0
- package/dist/actions/installDependency/init.js +24 -3
- package/dist/actions/installDependency/installRelease.d.ts +6 -0
- package/dist/actions/installDependency/installRelease.js +22 -12
- package/dist/actions/publish/enginesUi.d.ts +53 -0
- package/dist/actions/publish/enginesUi.js +289 -0
- package/dist/actions/publish/findDependencies.d.ts +19 -0
- package/dist/actions/publish/findDependencies.js +72 -37
- package/dist/actions/publish/generateCustTransport.d.ts +6 -0
- package/dist/actions/publish/generateCustTransport.js +42 -19
- package/dist/actions/publish/generateDevcTransport.d.ts +6 -0
- package/dist/actions/publish/generateDevcTransport.js +16 -18
- package/dist/actions/publish/generateLangTransport.d.ts +6 -0
- package/dist/actions/publish/generateLangTransport.js +20 -23
- package/dist/actions/publish/generateTadirTransport.d.ts +6 -0
- package/dist/actions/publish/generateTadirTransport.js +18 -17
- package/dist/actions/publish/getSystemEngines.d.ts +27 -0
- package/dist/actions/publish/getSystemEngines.js +112 -0
- package/dist/actions/publish/index.d.ts +162 -37
- package/dist/actions/publish/index.js +51 -34
- package/dist/actions/publish/init.d.ts +28 -0
- package/dist/actions/publish/init.js +304 -120
- package/dist/actions/publish/lockResources.d.ts +4 -0
- package/dist/actions/{install/refreshTmsTxt.js → publish/lockResources.js} +14 -17
- package/dist/actions/publish/publishToRegistry.d.ts +8 -0
- package/dist/actions/publish/publishToRegistry.js +18 -8
- package/dist/actions/publish/releaseTransports.d.ts +6 -0
- package/dist/actions/publish/releaseTransports.js +48 -20
- package/dist/actions/publish/setCustomizingTransports.d.ts +6 -0
- package/dist/actions/publish/setCustomizingTransports.js +227 -101
- package/dist/actions/publish/setManifestValues.d.ts +22 -0
- package/dist/actions/publish/setManifestValues.js +455 -119
- package/dist/actions/publish/setOptionalPublishData.d.ts +11 -0
- package/dist/actions/publish/setOptionalPublishData.js +133 -0
- package/dist/actions/publish/updatePackageData.d.ts +8 -0
- package/dist/actions/publish/updatePackageData.js +20 -7
- package/dist/actions/stopWarning.d.ts +5 -0
- package/dist/actions/stopWarning.js +5 -0
- package/dist/actions/uninstall/checkDependants.d.ts +7 -0
- package/dist/actions/uninstall/checkDependants.js +55 -0
- package/dist/actions/uninstall/forwardDeletionTransport.d.ts +10 -0
- package/dist/actions/uninstall/forwardDeletionTransport.js +51 -0
- package/dist/actions/uninstall/generateDeletionTransport.d.ts +10 -0
- package/dist/actions/uninstall/generateDeletionTransport.js +45 -0
- package/dist/actions/uninstall/index.d.ts +153 -0
- package/dist/actions/uninstall/index.js +141 -0
- package/dist/actions/uninstall/init.d.ts +17 -0
- package/dist/actions/uninstall/init.js +146 -0
- package/dist/actions/uninstall/lockResources.d.ts +4 -0
- package/dist/actions/{publish/setTransportTarget.js → uninstall/lockResources.js} +16 -7
- package/dist/actions/uninstall/removePackageData.d.ts +9 -0
- package/dist/actions/uninstall/removePackageData.js +64 -0
- package/dist/actions/uninstall/uninstallNestedPackages.d.ts +26 -0
- package/dist/actions/uninstall/uninstallNestedPackages.js +174 -0
- package/dist/client/ClientError.d.ts +3 -1
- package/dist/client/ClientError.js +2 -1
- package/dist/client/RESTClient.d.ts +18 -5
- package/dist/client/RESTClient.js +194 -52
- package/dist/client/RESTClientError.d.ts +1 -2
- package/dist/client/RESTClientError.js +3 -2
- package/dist/client/RFCClient.d.ts +28 -7
- package/dist/client/RFCClient.js +325 -77
- package/dist/client/RFCClientError.d.ts +1 -1
- package/dist/client/RFCClientError.js +2 -2
- package/dist/client/TransportEntries.d.ts +8 -0
- package/dist/client/TransportEntries.js +2 -0
- package/dist/client/components/BORM_ID.d.ts +1 -0
- package/dist/client/components/BORM_ID.js +2 -0
- package/dist/client/components/BORM_NAME.d.ts +1 -0
- package/dist/client/components/BORM_NAME.js +2 -0
- package/dist/client/components/BORM_NAMEL.d.ts +1 -0
- package/dist/client/components/BORM_NAMEL.js +2 -0
- package/dist/client/components/BORM_VEND.d.ts +1 -0
- package/dist/client/components/BORM_VEND.js +2 -0
- package/dist/client/components/BORM_VERS.d.ts +1 -0
- package/dist/client/components/BORM_VERS.js +2 -0
- package/dist/client/components/CWBNTNUMM.d.ts +1 -0
- package/dist/client/components/CWBNTNUMM.js +2 -0
- package/dist/client/components/CWBNTSTAT.d.ts +1 -0
- package/dist/client/components/CWBNTSTAT.js +2 -0
- package/dist/client/components/CWBNTVERS.d.ts +1 -0
- package/dist/client/components/CWBNTVERS.js +2 -0
- package/dist/client/components/CWBPRSTAT.d.ts +1 -0
- package/dist/client/components/CWBPRSTAT.js +2 -0
- package/dist/client/components/INSTSTATE.d.ts +1 -0
- package/dist/client/components/INSTSTATE.js +2 -0
- package/dist/client/components/RELC_TYPE.d.ts +1 -0
- package/dist/client/components/RELC_TYPE.js +2 -0
- package/dist/client/components/SAPPATCHLV.d.ts +1 -0
- package/dist/client/components/SAPPATCHLV.js +2 -0
- package/dist/client/components/SAPRELEASE.d.ts +1 -0
- package/dist/client/components/SAPRELEASE.js +2 -0
- package/dist/client/components/SYSYSID.d.ts +1 -0
- package/dist/client/components/SYSYSID.js +2 -0
- package/dist/client/components/ZTRM_INSTALLTR_TYPE.d.ts +1 -0
- package/dist/client/components/ZTRM_INSTALLTR_TYPE.js +2 -0
- package/dist/client/components/index.d.ts +15 -0
- package/dist/client/components/index.js +15 -0
- package/dist/client/index.d.ts +1 -0
- package/dist/client/index.js +1 -0
- package/dist/client/messageLog.d.ts +7 -0
- package/dist/client/messageLog.js +21 -0
- package/dist/client/struct/ActionLockKey.d.ts +6 -0
- package/dist/client/struct/ActionLockKey.js +2 -0
- package/dist/client/struct/CVERS.d.ts +7 -0
- package/dist/client/struct/CVERS.js +2 -0
- package/dist/client/struct/CWBNTCUST.d.ts +6 -0
- package/dist/client/struct/CWBNTCUST.js +2 -0
- package/dist/client/struct/CWBNTHEAD.d.ts +5 -0
- package/dist/client/struct/CWBNTHEAD.js +2 -0
- package/dist/client/struct/E070.d.ts +2 -1
- package/dist/client/struct/E071K.d.ts +9 -0
- package/dist/client/struct/E071K.js +2 -0
- package/dist/client/struct/PRDVERS.d.ts +9 -0
- package/dist/client/struct/PRDVERS.js +2 -0
- package/dist/client/struct/SCOMPKDTLN.d.ts +21 -0
- package/dist/client/struct/STMSCALERT.d.ts +21 -0
- package/dist/client/struct/STMSCALERT.js +2 -0
- package/dist/client/struct/STMS_TP_IMPORT.d.ts +14 -0
- package/dist/client/struct/STMS_TP_IMPORT.js +2 -0
- package/dist/client/struct/STMS_TR_REQUEST.d.ts +8 -0
- package/dist/client/struct/STMS_TR_REQUEST.js +2 -0
- package/dist/client/struct/TDEVC.d.ts +38 -0
- package/dist/client/struct/TPLOGPTR.d.ts +13 -0
- package/dist/client/struct/TPLOGPTR.js +2 -0
- package/dist/client/struct/TPSTDOUT.d.ts +3 -0
- package/dist/client/struct/TPSTDOUT.js +2 -0
- package/dist/client/struct/ZTRM_INSTALLTR.d.ts +8 -0
- package/dist/client/struct/ZTRM_INSTALLTR.js +2 -0
- package/dist/client/struct/index.d.ts +12 -0
- package/dist/client/struct/index.js +12 -0
- package/dist/commons/checkCoreTrmDependencies.js +1 -1
- package/dist/commons/getAxiosInstance.js +8 -17
- package/dist/commons/getNodePackage.js +7 -0
- package/dist/commons/getPackageHierarchy.js +2 -0
- package/dist/commons/getPackagesNamespace.d.ts +9 -0
- package/dist/commons/getPackagesNamespace.js +19 -0
- package/dist/commons/index.d.ts +4 -0
- package/dist/commons/index.js +4 -0
- package/dist/commons/packageDataFromTdevc.d.ts +12 -0
- package/dist/commons/packageDataFromTdevc.js +25 -0
- package/dist/commons/resolveCoreVersion.d.ts +10 -0
- package/dist/commons/resolveCoreVersion.js +24 -0
- package/dist/commons/summarizeForLog.d.ts +22 -0
- package/dist/commons/summarizeForLog.js +120 -0
- package/dist/connection/OpenRFCConnect.d.ts +13 -0
- package/dist/connection/OpenRFCConnect.js +23 -0
- package/dist/connection/index.d.ts +1 -0
- package/dist/connection/index.js +17 -0
- package/dist/dependencies/PackageDependencies.d.ts +2 -0
- package/dist/dependencies/PackageDependencies.js +24 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/lockfile/Lockfile.d.ts +23 -1
- package/dist/lockfile/Lockfile.js +45 -9
- package/dist/manifest/Manifest.d.ts +9 -5
- package/dist/manifest/Manifest.js +82 -29
- package/dist/manifest/PostActivity.js +3 -3
- package/dist/manifest/TrmManifest.d.ts +0 -2
- package/dist/manifest/TrmManifestBase.d.ts +2 -0
- package/dist/manifest/TrmManifestEngines.d.ts +64 -0
- package/dist/manifest/TrmManifestEngines.js +2 -0
- package/dist/manifest/engines/index.d.ts +2 -0
- package/dist/manifest/engines/index.js +18 -0
- package/dist/manifest/engines/sapRange.d.ts +38 -0
- package/dist/manifest/engines/sapRange.js +135 -0
- package/dist/manifest/engines/validateEngines.d.ts +44 -0
- package/dist/manifest/engines/validateEngines.js +282 -0
- package/dist/manifest/index.d.ts +3 -0
- package/dist/manifest/index.js +3 -0
- package/dist/manifest/sapEntries.d.ts +14 -0
- package/dist/manifest/sapEntries.js +63 -0
- package/dist/protocol/Protocol.js +7 -0
- package/dist/registry/AbstractRegistry.d.ts +18 -3
- package/dist/registry/FileSystem.d.ts +22 -13
- package/dist/registry/FileSystem.js +69 -18
- package/dist/registry/RegistryDeletionTransportUnauthorizedError.d.ts +4 -0
- package/dist/registry/RegistryDeletionTransportUnauthorizedError.js +12 -0
- package/dist/registry/RegistryDeletionTransportUnavailableError.d.ts +9 -0
- package/dist/registry/RegistryDeletionTransportUnavailableError.js +17 -0
- package/dist/registry/RegistryPackageNotFoundError.d.ts +7 -0
- package/dist/registry/RegistryPackageNotFoundError.js +14 -0
- package/dist/registry/RegistryV2.d.ts +15 -5
- package/dist/registry/RegistryV2.js +308 -48
- package/dist/registry/index.d.ts +4 -0
- package/dist/registry/index.js +4 -0
- package/dist/registry/registryKey.d.ts +7 -0
- package/dist/registry/registryKey.js +21 -0
- package/dist/systemConnector/ActionLock.d.ts +1 -0
- package/dist/systemConnector/ActionLock.js +2 -0
- package/dist/systemConnector/ISystemConnector.d.ts +21 -4
- package/dist/systemConnector/ISystemConnectorBase.d.ts +16 -0
- package/dist/systemConnector/InstallTransport.d.ts +6 -0
- package/dist/systemConnector/InstallTransport.js +2 -0
- package/dist/systemConnector/OpenRFCSystemConnector.d.ts +12 -0
- package/dist/systemConnector/OpenRFCSystemConnector.js +51 -0
- package/dist/systemConnector/RESTSystemConnector.d.ts +22 -7
- package/dist/systemConnector/RESTSystemConnector.js +95 -23
- package/dist/systemConnector/RFCConnection.d.ts +0 -1
- package/dist/systemConnector/RFCSystemConnector.d.ts +25 -7
- package/dist/systemConnector/RFCSystemConnector.js +75 -16
- package/dist/systemConnector/SystemConnector.d.ts +38 -6
- package/dist/systemConnector/SystemConnector.js +138 -12
- package/dist/systemConnector/SystemConnectorBase.d.ts +24 -1
- package/dist/systemConnector/SystemConnectorBase.js +174 -22
- package/dist/systemConnector/index.d.ts +3 -0
- package/dist/systemConnector/index.js +3 -0
- package/dist/transport/E071KOwner.d.ts +10 -0
- package/dist/transport/E071KOwner.js +15 -0
- package/dist/transport/R3transLogParser.d.ts +19 -0
- package/dist/transport/R3transLogParser.js +148 -0
- package/dist/transport/Transport.d.ts +36 -3
- package/dist/transport/Transport.js +304 -138
- package/dist/transport/index.d.ts +2 -0
- package/dist/transport/index.js +2 -0
- package/dist/trmPackage/TransportBinary.d.ts +4 -1
- package/dist/trmPackage/TrmArtifact.d.ts +12 -8
- package/dist/trmPackage/TrmArtifact.js +93 -74
- package/dist/trmPackage/TrmPackage.d.ts +20 -6
- package/dist/trmPackage/TrmPackage.js +27 -1
- package/dist/validators/validateDevclass.js +4 -0
- package/package.json +15 -7
- package/dist/actions/commons/trmServerPa.d.ts +0 -3
- package/dist/actions/commons/trmServerPa.js +0 -40
- package/dist/actions/install/checkAlreadyInstalled.d.ts +0 -3
- package/dist/actions/install/checkAlreadyInstalled.js +0 -71
- package/dist/actions/install/checkObjectTypes.d.ts +0 -3
- package/dist/actions/install/checkObjectTypes.js +0 -50
- package/dist/actions/install/checkObjectsLock.d.ts +0 -3
- package/dist/actions/install/checkObjectsLock.js +0 -52
- package/dist/actions/install/generateInstallTransports.d.ts +0 -3
- package/dist/actions/install/generateInstallTransports.js +0 -128
- package/dist/actions/install/importCustTransport.d.ts +0 -3
- package/dist/actions/install/importCustTransport.js +0 -73
- package/dist/actions/install/importDevcTransport.d.ts +0 -3
- package/dist/actions/install/importDevcTransport.js +0 -93
- package/dist/actions/install/importLangTransport.d.ts +0 -3
- package/dist/actions/install/importLangTransport.js +0 -72
- package/dist/actions/install/importTadirTransport.d.ts +0 -3
- package/dist/actions/install/importTadirTransport.js +0 -83
- package/dist/actions/install/readDevc.d.ts +0 -3
- package/dist/actions/install/readDevc.js +0 -33
- package/dist/actions/install/readTadir.d.ts +0 -3
- package/dist/actions/install/readTadir.js +0 -101
- package/dist/actions/install/refreshTmsTxt.d.ts +0 -3
- package/dist/actions/install/releaseInstallTransport.d.ts +0 -3
- package/dist/actions/install/releaseInstallTransport.js +0 -80
- package/dist/actions/publish/checkAllObjectsReleased.d.ts +0 -3
- package/dist/actions/publish/checkAllObjectsReleased.js +0 -46
- package/dist/actions/publish/getSourceCode.d.ts +0 -3
- package/dist/actions/publish/getSourceCode.js +0 -49
- package/dist/actions/publish/setChangelog.d.ts +0 -3
- package/dist/actions/publish/setChangelog.js +0 -69
- package/dist/actions/publish/setDevclass.d.ts +0 -3
- package/dist/actions/publish/setDevclass.js +0 -74
- package/dist/actions/publish/setReadme.d.ts +0 -3
- package/dist/actions/publish/setReadme.js +0 -52
- package/dist/actions/publish/setTransportTarget.d.ts +0 -3
|
@@ -3,19 +3,26 @@ import * as struct from "./struct";
|
|
|
3
3
|
import { IClient } from "./IClient";
|
|
4
4
|
import { AxiosInstance } from "axios";
|
|
5
5
|
import { Login, RESTClientError, SapMessage } from ".";
|
|
6
|
-
import { TrmPackageUpdateData } from "../systemConnector";
|
|
6
|
+
import { TrmPackageMetadataRestoreData, TrmPackageUpdateData } from "../systemConnector";
|
|
7
|
+
import { TransportEntries } from "./TransportEntries";
|
|
8
|
+
import { ActionLockKey } from "./struct/ActionLockKey";
|
|
7
9
|
export declare class RESTClient implements IClient {
|
|
8
10
|
endpoint: string;
|
|
9
11
|
rfcdest: components.RFCDEST;
|
|
10
12
|
private _login;
|
|
11
13
|
private _cLangu;
|
|
14
|
+
acquireActionLocks(keys: ActionLockKey[], ownerToken: string, actionName: string): Promise<void>;
|
|
15
|
+
releaseActionLocks(keys: ActionLockKey[], ownerToken: string): Promise<void>;
|
|
12
16
|
protected _axiosInstance: AxiosInstance;
|
|
13
17
|
private _connected;
|
|
14
18
|
constructor(endpoint: string, rfcdest: components.RFCDEST, _login: Login, _cLangu: string);
|
|
15
19
|
open(): Promise<void>;
|
|
16
20
|
checkConnection(): Promise<boolean>;
|
|
17
21
|
getMessage(data: SapMessage): Promise<string>;
|
|
18
|
-
readTable(tableName: components.TABNAME, fields: struct.RFC_DB_FLD[], options?: string
|
|
22
|
+
readTable(tableName: components.TABNAME, fields: struct.RFC_DB_FLD[], options?: string, paging?: {
|
|
23
|
+
offset: number;
|
|
24
|
+
limit: number;
|
|
25
|
+
}): Promise<any[]>;
|
|
19
26
|
getFileSystem(): Promise<struct.FILESYS>;
|
|
20
27
|
getDirTrans(): Promise<components.PFEVALUE>;
|
|
21
28
|
getBinaryFile(filePath: string): Promise<Buffer>;
|
|
@@ -27,18 +34,23 @@ export declare class RESTClient implements IClient {
|
|
|
27
34
|
getDevclassObjects(devclass: components.DEVCLASS): Promise<struct.TADIR[]>;
|
|
28
35
|
removeComments(trkorr: components.TRKORR, object: components.TROBJTYPE): Promise<void>;
|
|
29
36
|
addToTransportRequest(trkorr: components.TRKORR, content: struct.E071[], lock: boolean): Promise<void>;
|
|
37
|
+
lockTransportObjs(trkorr: components.TRKORR): Promise<void>;
|
|
30
38
|
repositoryEnvironment(objectType: components.SEU_OBJ, objectName: components.SOBJ_NAME): Promise<struct.SENVI[]>;
|
|
31
39
|
deleteTrkorr(trkorr: components.TRKORR): Promise<void>;
|
|
32
40
|
releaseTrkorr(trkorr: components.TRKORR, lock: boolean, timeout?: number): Promise<void>;
|
|
33
41
|
readTmsQueue(target: components.TMSSYSNAM): Promise<struct.STMSIQREQ[]>;
|
|
42
|
+
deleteTemporaryPackage(devclass: components.DEVCLASS): Promise<void>;
|
|
34
43
|
createPackage(scompkdtln: struct.SCOMPKDTLN): Promise<void>;
|
|
35
44
|
tdevcInterface(devclass: components.DEVCLASS, parentcl?: components.DEVCLASS, rmParentCl?: boolean, devlayer?: components.DEVLAYER): Promise<void>;
|
|
36
45
|
getDefaultTransportLayer(): Promise<components.DEVLAYER>;
|
|
37
46
|
tadirInterface(tadir: struct.TADIR): Promise<void>;
|
|
38
|
-
dequeueTransport(trkorr: components.TRKORR): Promise<void>;
|
|
39
47
|
forwardTransport(trkorr: components.TRKORR, target: components.TMSSYSNAM, source: components.TMSSYSNAM, importAgain?: boolean): Promise<void>;
|
|
40
|
-
importTransport(trkorr: components.TRKORR, system: components.TMSSYSNAM): Promise<void>;
|
|
48
|
+
importTransport(trkorr: components.TRKORR, system: components.TMSSYSNAM, test: boolean): Promise<struct.STMS_TP_IMPORT | void>;
|
|
49
|
+
importTransportMultiple(trkorr: components.TRKORR[], system: components.TMSSYSNAM, test: boolean): Promise<struct.STMS_TP_IMPORT | void>;
|
|
41
50
|
setInstallDevc(installDevc: struct.ZTRM_INSTALLDEVC[]): Promise<void>;
|
|
51
|
+
deleteInstallDevc(installDevc: struct.ZTRM_INSTALLDEVC[]): Promise<void>;
|
|
52
|
+
restoreInstallMetadata(data: TrmPackageMetadataRestoreData): Promise<void>;
|
|
53
|
+
setInstallTransports(packageName: components.ZTRM_PACKAGE_NAME, packageRegistry: components.ZTRM_PACKAGE_REGISTRY, installTr: struct.ZTRM_INSTALLTR[]): Promise<void>;
|
|
42
54
|
getObjectsList(): Promise<struct.KO100[]>;
|
|
43
55
|
getTrmServerVersion(): Promise<string>;
|
|
44
56
|
getTrmRestVersion(): Promise<string>;
|
|
@@ -46,7 +58,7 @@ export declare class RESTClient implements IClient {
|
|
|
46
58
|
renameTransportRequest(trkorr: components.TRKORR, as4text: components.AS4TEXT): Promise<void>;
|
|
47
59
|
addTranslationToTr(trkorr: components.TRKORR, devclassFilter: struct.LXE_TT_PACKG_LINE[]): Promise<void>;
|
|
48
60
|
trCopy(from: components.TRKORR, to: components.TRKORR, doc?: boolean): Promise<void>;
|
|
49
|
-
getDest(): Promise<
|
|
61
|
+
getDest(): Promise<components.SYSYSID>;
|
|
50
62
|
getTransportObjectsBulk(trkorr: components.TRKORR): Promise<struct.TADIR[]>;
|
|
51
63
|
getExistingObjectsBulk(objects: struct.TADIR[]): Promise<struct.TADIR[]>;
|
|
52
64
|
addNamespace(namespace: components.NAMESPACE, replicense: components.TRNLICENSE, texts: struct.TRNSPACETT[]): Promise<void>;
|
|
@@ -58,6 +70,7 @@ export declare class RESTClient implements IClient {
|
|
|
58
70
|
zip: Buffer;
|
|
59
71
|
objects: struct.ZTY_SER_OBJ[];
|
|
60
72
|
}>;
|
|
73
|
+
getTransportEntries(trkorr: components.TRKORR): Promise<TransportEntries>;
|
|
61
74
|
executePostActivity(data: Buffer, pre?: boolean): Promise<{
|
|
62
75
|
messages: struct.SYMSG[];
|
|
63
76
|
execute?: boolean;
|
|
@@ -48,9 +48,38 @@ const FormData = __importStar(require("form-data"));
|
|
|
48
48
|
const trm_commons_1 = require("trm-commons");
|
|
49
49
|
const _1 = require(".");
|
|
50
50
|
const parse_multipart_data_1 = require("parse-multipart-data");
|
|
51
|
+
const messageLog_1 = require("./messageLog");
|
|
51
52
|
const https_1 = require("https");
|
|
52
53
|
const AXIOS_CTX = "RestServer";
|
|
54
|
+
function getErrorMessage(error) {
|
|
55
|
+
return error instanceof Error ? error.message : String(error);
|
|
56
|
+
}
|
|
53
57
|
class RESTClient {
|
|
58
|
+
acquireActionLocks(keys, ownerToken, actionName) {
|
|
59
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
60
|
+
yield this._axiosInstance.post('/acquire_act_locks', {
|
|
61
|
+
owner_token: ownerToken,
|
|
62
|
+
action_name: actionName,
|
|
63
|
+
keys: keys.map(key => ({
|
|
64
|
+
resource_type: key.resourceType,
|
|
65
|
+
resource_hash: key.resourceHash,
|
|
66
|
+
resource_name: key.resourceName
|
|
67
|
+
}))
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
releaseActionLocks(keys, ownerToken) {
|
|
72
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
73
|
+
yield this._axiosInstance.post('/release_act_locks', {
|
|
74
|
+
owner_token: ownerToken,
|
|
75
|
+
keys: keys.map(key => ({
|
|
76
|
+
resource_type: key.resourceType,
|
|
77
|
+
resource_hash: key.resourceHash,
|
|
78
|
+
resource_name: key.resourceName
|
|
79
|
+
}))
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
}
|
|
54
83
|
constructor(endpoint, rfcdest, _login, _cLangu) {
|
|
55
84
|
this.endpoint = endpoint;
|
|
56
85
|
this.rfcdest = rfcdest;
|
|
@@ -67,7 +96,7 @@ class RESTClient {
|
|
|
67
96
|
username: this._login.user,
|
|
68
97
|
password: this._login.passwd
|
|
69
98
|
},
|
|
70
|
-
timeout: 30000,
|
|
99
|
+
timeout: 30000, //default timeout
|
|
71
100
|
httpsAgent: new https_1.Agent({
|
|
72
101
|
rejectUnauthorized: false
|
|
73
102
|
})
|
|
@@ -83,10 +112,10 @@ class RESTClient {
|
|
|
83
112
|
});
|
|
84
113
|
}
|
|
85
114
|
catch (e) {
|
|
86
|
-
throw new _1.RESTClientError("ZNO_CONN", null, e, e
|
|
115
|
+
throw new _1.RESTClientError("ZNO_CONN", null, e, getErrorMessage(e), "/");
|
|
87
116
|
}
|
|
88
117
|
if (response.status !== 200) {
|
|
89
|
-
throw new _1.RESTClientError("ZNO_CONN", null, null, `Couldn't reach ${this.endpoint}
|
|
118
|
+
throw new _1.RESTClientError("ZNO_CONN", null, null, `Couldn't reach ${this.endpoint}!`, "/");
|
|
90
119
|
}
|
|
91
120
|
else {
|
|
92
121
|
this._connected = true;
|
|
@@ -100,45 +129,55 @@ class RESTClient {
|
|
|
100
129
|
class: undefined,
|
|
101
130
|
no: undefined
|
|
102
131
|
};
|
|
103
|
-
if (error.name === `Trm${AXIOS_CTX}Error`) {
|
|
132
|
+
if (error && error.name === `Trm${AXIOS_CTX}Error`) {
|
|
104
133
|
axiosError = error.axiosError;
|
|
105
134
|
}
|
|
106
135
|
else {
|
|
107
136
|
axiosError = error;
|
|
108
137
|
}
|
|
109
|
-
if (axiosError.config.url === '/read_table') {
|
|
110
|
-
|
|
138
|
+
if (axiosError && axiosError.config && axiosError.config.url === '/read_table') {
|
|
139
|
+
var requestData;
|
|
140
|
+
try {
|
|
141
|
+
requestData = typeof axiosError.config.data === 'string' ? JSON.parse(axiosError.config.data) : axiosError.config.data;
|
|
142
|
+
}
|
|
143
|
+
catch (parseError) {
|
|
144
|
+
requestData = undefined;
|
|
145
|
+
}
|
|
146
|
+
if (requestData && requestData.query_table === 'T100') {
|
|
111
147
|
throw error;
|
|
112
148
|
}
|
|
113
149
|
}
|
|
114
|
-
|
|
150
|
+
const responseData = axiosError && axiosError.response && axiosError.response.data;
|
|
151
|
+
if (responseData && responseData.message) {
|
|
115
152
|
sapMessage = {
|
|
116
|
-
no: `${
|
|
117
|
-
class:
|
|
118
|
-
v1:
|
|
119
|
-
v2:
|
|
120
|
-
v3:
|
|
121
|
-
v4:
|
|
153
|
+
no: `${responseData.message.msgno}`,
|
|
154
|
+
class: responseData.message.msgid,
|
|
155
|
+
v1: responseData.message.msgv1,
|
|
156
|
+
v2: responseData.message.msgv2,
|
|
157
|
+
v3: responseData.message.msgv3,
|
|
158
|
+
v4: responseData.message.msgv4
|
|
122
159
|
};
|
|
123
160
|
try {
|
|
124
|
-
message
|
|
161
|
+
// An exception raised without a message: its reason is the response status text.
|
|
162
|
+
message = `${responseData.message.msgid || ''}`.trim()
|
|
163
|
+
? yield this.getMessage(sapMessage)
|
|
164
|
+
: `SAP error ${axiosError.response.statusText || axiosError.response.status} (no message)`;
|
|
125
165
|
}
|
|
126
166
|
catch (k) {
|
|
127
167
|
messageError = k;
|
|
128
|
-
message = `Couldn't read error message ${
|
|
168
|
+
message = `Couldn't read error message ${responseData.message.msgid} ${responseData.message.msgno} ${responseData.message.msgv1} ${responseData.message.msgv2} ${responseData.message.msgv3} ${responseData.message.msgv4}`;
|
|
129
169
|
}
|
|
130
170
|
}
|
|
131
171
|
else {
|
|
132
172
|
throw error;
|
|
133
173
|
}
|
|
134
|
-
var rfcClientError = new _1.RESTClientError(error
|
|
174
|
+
var rfcClientError = new _1.RESTClientError(getErrorMessage(error), sapMessage, axiosError, message);
|
|
135
175
|
if (messageError) {
|
|
136
176
|
rfcClientError.messageError = messageError.toString();
|
|
137
177
|
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
trm_commons_1.Logger.error(rfcClientError.toString(), true);
|
|
178
|
+
rfcClientError.messageLog = (0, messageLog_1.parseMessageLog)(responseData.log);
|
|
179
|
+
trm_commons_1.Logger.log(rfcClientError.toString(), true);
|
|
180
|
+
(0, messageLog_1.logMessageLog)(rfcClientError);
|
|
142
181
|
throw rfcClientError;
|
|
143
182
|
}));
|
|
144
183
|
}
|
|
@@ -179,13 +218,15 @@ class RESTClient {
|
|
|
179
218
|
}
|
|
180
219
|
});
|
|
181
220
|
}
|
|
182
|
-
readTable(tableName, fields, options) {
|
|
221
|
+
readTable(tableName, fields, options, paging) {
|
|
183
222
|
return __awaiter(this, void 0, void 0, function* () {
|
|
184
223
|
try {
|
|
185
224
|
var sqlOutput = [];
|
|
186
225
|
const delimiter = '|';
|
|
187
226
|
var aOptions = [];
|
|
188
227
|
if (options) {
|
|
228
|
+
//line must not exceede 72 chars length
|
|
229
|
+
//it must not break on an operator
|
|
189
230
|
const aSplit = options.split(/\s+AND\s+/);
|
|
190
231
|
if (aSplit.length > 1) {
|
|
191
232
|
aSplit.forEach((s, i) => {
|
|
@@ -203,12 +244,34 @@ class RESTClient {
|
|
|
203
244
|
};
|
|
204
245
|
});
|
|
205
246
|
}
|
|
247
|
+
//lines exceeding 72 chars are split on OR operator
|
|
248
|
+
aOptions = aOptions.reduce((acc, o) => {
|
|
249
|
+
if (o.text.length > 72) {
|
|
250
|
+
o.text.split(/\s+OR\s+/).forEach((s, i) => acc.push({ text: i === 0 ? s.trim() : `OR ${s.trim()}` }));
|
|
251
|
+
}
|
|
252
|
+
else {
|
|
253
|
+
acc.push(o);
|
|
254
|
+
}
|
|
255
|
+
return acc;
|
|
256
|
+
}, []);
|
|
257
|
+
/*aOptions = (options.match(/.{1,72}/g)).map(s => {
|
|
258
|
+
return {
|
|
259
|
+
text: s
|
|
260
|
+
}
|
|
261
|
+
}) || [];*/
|
|
206
262
|
}
|
|
207
263
|
const result = yield this._axiosInstance.get('/read_table', {
|
|
208
264
|
params: {
|
|
209
265
|
rfcdest: this.rfcdest
|
|
210
266
|
},
|
|
211
|
-
data: {
|
|
267
|
+
data: paging ? {
|
|
268
|
+
query_table: tableName.toUpperCase(),
|
|
269
|
+
delimiter,
|
|
270
|
+
options: aOptions,
|
|
271
|
+
fields: fields,
|
|
272
|
+
rowskips: paging.offset,
|
|
273
|
+
rowcount: paging.limit
|
|
274
|
+
} : {
|
|
212
275
|
query_table: tableName.toUpperCase(),
|
|
213
276
|
delimiter,
|
|
214
277
|
options: aOptions,
|
|
@@ -219,7 +282,7 @@ class RESTClient {
|
|
|
219
282
|
var sqlLine = {};
|
|
220
283
|
const waSplit = tab512.wa.split(delimiter);
|
|
221
284
|
result.data.fields.forEach((field, index) => {
|
|
222
|
-
sqlLine[field.fieldname] = waSplit[index].trim();
|
|
285
|
+
sqlLine[field.fieldname] = (waSplit[index] || '').trim();
|
|
223
286
|
});
|
|
224
287
|
sqlOutput.push(sqlLine);
|
|
225
288
|
});
|
|
@@ -264,13 +327,8 @@ class RESTClient {
|
|
|
264
327
|
writeBinaryFile(filePath, binary) {
|
|
265
328
|
return __awaiter(this, void 0, void 0, function* () {
|
|
266
329
|
const formData = new FormData.default();
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
filename = /[^\\\/]+$/gmi.exec(filePath)[0];
|
|
270
|
-
}
|
|
271
|
-
catch (e) {
|
|
272
|
-
filename = 'UNKNOWN_FILENAME';
|
|
273
|
-
}
|
|
330
|
+
const filenameMatch = /[^\\\/]+$/gmi.exec(filePath);
|
|
331
|
+
const filename = filenameMatch ? filenameMatch[0] : 'UNKNOWN_FILENAME';
|
|
274
332
|
formData.append('file', binary, filename);
|
|
275
333
|
formData.append('file_path', filePath);
|
|
276
334
|
yield this._axiosInstance.post('/write_binary_file', formData, {
|
|
@@ -291,7 +349,7 @@ class RESTClient {
|
|
|
291
349
|
return __awaiter(this, void 0, void 0, function* () {
|
|
292
350
|
const result = (yield this._axiosInstance.post('/create_import_tr', {
|
|
293
351
|
text: text,
|
|
294
|
-
target: target.trim().toUpperCase()
|
|
352
|
+
target: target ? target.trim().toUpperCase() : ''
|
|
295
353
|
})).data;
|
|
296
354
|
return result.trkorr;
|
|
297
355
|
});
|
|
@@ -300,7 +358,7 @@ class RESTClient {
|
|
|
300
358
|
return __awaiter(this, void 0, void 0, function* () {
|
|
301
359
|
const result = (yield this._axiosInstance.post('/create_cust_tr', {
|
|
302
360
|
text: text,
|
|
303
|
-
target: target.trim().toUpperCase()
|
|
361
|
+
target: target ? target.trim().toUpperCase() : ''
|
|
304
362
|
})).data;
|
|
305
363
|
return result.trkorr;
|
|
306
364
|
});
|
|
@@ -348,6 +406,13 @@ class RESTClient {
|
|
|
348
406
|
});
|
|
349
407
|
});
|
|
350
408
|
}
|
|
409
|
+
lockTransportObjs(trkorr) {
|
|
410
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
411
|
+
yield this._axiosInstance.post('/lock_tr_objects', {
|
|
412
|
+
trkorr: trkorr.trim().toUpperCase()
|
|
413
|
+
});
|
|
414
|
+
});
|
|
415
|
+
}
|
|
351
416
|
repositoryEnvironment(objectType, objectName) {
|
|
352
417
|
return __awaiter(this, void 0, void 0, function* () {
|
|
353
418
|
const result = (yield this._axiosInstance.get('/repository_environment', {
|
|
@@ -376,7 +441,7 @@ class RESTClient {
|
|
|
376
441
|
yield this._axiosInstance.post('/release_tr', {
|
|
377
442
|
trkorr: trkorr.trim().toUpperCase(),
|
|
378
443
|
lock: lock ? 'X' : ' '
|
|
379
|
-
}, {
|
|
444
|
+
}, timeout === undefined ? undefined : {
|
|
380
445
|
timeout: timeout * 1000
|
|
381
446
|
});
|
|
382
447
|
});
|
|
@@ -391,6 +456,15 @@ class RESTClient {
|
|
|
391
456
|
return result.requests;
|
|
392
457
|
});
|
|
393
458
|
}
|
|
459
|
+
deleteTemporaryPackage(devclass) {
|
|
460
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
461
|
+
yield this._axiosInstance.delete('/delete_tmp_package', {
|
|
462
|
+
data: {
|
|
463
|
+
devclass: devclass.trim().toUpperCase()
|
|
464
|
+
}
|
|
465
|
+
});
|
|
466
|
+
});
|
|
467
|
+
}
|
|
394
468
|
createPackage(scompkdtln) {
|
|
395
469
|
return __awaiter(this, void 0, void 0, function* () {
|
|
396
470
|
yield this._axiosInstance.post('/create_package', scompkdtln);
|
|
@@ -424,13 +498,6 @@ class RESTClient {
|
|
|
424
498
|
});
|
|
425
499
|
});
|
|
426
500
|
}
|
|
427
|
-
dequeueTransport(trkorr) {
|
|
428
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
429
|
-
yield this._axiosInstance.post('/dequeue_tr', {
|
|
430
|
-
trkorr: trkorr.trim().toUpperCase()
|
|
431
|
-
});
|
|
432
|
-
});
|
|
433
|
-
}
|
|
434
501
|
forwardTransport(trkorr_1, target_1, source_1) {
|
|
435
502
|
return __awaiter(this, arguments, void 0, function* (trkorr, target, source, importAgain = true) {
|
|
436
503
|
yield this._axiosInstance.post('/forward_tr', {
|
|
@@ -441,12 +508,28 @@ class RESTClient {
|
|
|
441
508
|
});
|
|
442
509
|
});
|
|
443
510
|
}
|
|
444
|
-
importTransport(trkorr, system) {
|
|
511
|
+
importTransport(trkorr, system, test) {
|
|
445
512
|
return __awaiter(this, void 0, void 0, function* () {
|
|
446
|
-
yield this._axiosInstance.post('/import_tr', {
|
|
513
|
+
const result = (yield this._axiosInstance.post('/import_tr', {
|
|
447
514
|
system: system.trim().toUpperCase(),
|
|
448
|
-
trkorr: trkorr.trim().toUpperCase()
|
|
449
|
-
|
|
515
|
+
trkorr: trkorr.trim().toUpperCase(),
|
|
516
|
+
test: test ? 'X' : ' '
|
|
517
|
+
})).data;
|
|
518
|
+
if (result && result.testResult) {
|
|
519
|
+
return result.testResult;
|
|
520
|
+
}
|
|
521
|
+
});
|
|
522
|
+
}
|
|
523
|
+
importTransportMultiple(trkorr, system, test) {
|
|
524
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
525
|
+
const result = (yield this._axiosInstance.post('/import_tr_multiple', {
|
|
526
|
+
system: system.trim().toUpperCase(),
|
|
527
|
+
trkorr: trkorr.map(value => value.trim().toUpperCase()),
|
|
528
|
+
test: test ? 'X' : ' '
|
|
529
|
+
})).data;
|
|
530
|
+
if (result && result.testResult) {
|
|
531
|
+
return result.testResult;
|
|
532
|
+
}
|
|
450
533
|
});
|
|
451
534
|
}
|
|
452
535
|
setInstallDevc(installDevc) {
|
|
@@ -456,6 +539,36 @@ class RESTClient {
|
|
|
456
539
|
});
|
|
457
540
|
});
|
|
458
541
|
}
|
|
542
|
+
deleteInstallDevc(installDevc) {
|
|
543
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
544
|
+
yield this._axiosInstance.delete('/delete_install_devc', {
|
|
545
|
+
data: {
|
|
546
|
+
installdevc: installDevc
|
|
547
|
+
}
|
|
548
|
+
});
|
|
549
|
+
});
|
|
550
|
+
}
|
|
551
|
+
restoreInstallMetadata(data) {
|
|
552
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
553
|
+
var _a;
|
|
554
|
+
yield this._axiosInstance.put('/set_install_devc', {
|
|
555
|
+
// JSON carries the manifest xstring as base64: a Buffer would serialize as an object and be stored empty.
|
|
556
|
+
package: Object.assign(Object.assign({}, data.package), { manifest: (_a = data.package.manifest) === null || _a === void 0 ? void 0 : _a.toString('base64') }),
|
|
557
|
+
package_exists: data.packageExists ? 'X' : ' ',
|
|
558
|
+
installdevc: data.installDevc,
|
|
559
|
+
installtr: data.installTr || []
|
|
560
|
+
});
|
|
561
|
+
});
|
|
562
|
+
}
|
|
563
|
+
setInstallTransports(packageName, packageRegistry, installTr) {
|
|
564
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
565
|
+
yield this._axiosInstance.put('/set_install_tr', {
|
|
566
|
+
package_name: packageName,
|
|
567
|
+
package_registry: packageRegistry,
|
|
568
|
+
installtr: installTr
|
|
569
|
+
});
|
|
570
|
+
});
|
|
571
|
+
}
|
|
459
572
|
getObjectsList() {
|
|
460
573
|
return __awaiter(this, void 0, void 0, function* () {
|
|
461
574
|
const result = (yield this._axiosInstance.get('/list_object_types')).data;
|
|
@@ -527,9 +640,14 @@ class RESTClient {
|
|
|
527
640
|
}
|
|
528
641
|
getExistingObjectsBulk(objects) {
|
|
529
642
|
return __awaiter(this, void 0, void 0, function* () {
|
|
643
|
+
//the request is mapped onto TADIR fields: object names are matched by OBJ_NAME
|
|
530
644
|
const result = (yield this._axiosInstance.get('/get_existing_objs_bulk', {
|
|
531
645
|
data: {
|
|
532
|
-
objects
|
|
646
|
+
objects: objects.map(o => ({
|
|
647
|
+
pgmid: o.pgmid,
|
|
648
|
+
object: o.object,
|
|
649
|
+
obj_name: o.objName
|
|
650
|
+
}))
|
|
533
651
|
}
|
|
534
652
|
})).data;
|
|
535
653
|
return result.tadir;
|
|
@@ -554,8 +672,8 @@ class RESTClient {
|
|
|
554
672
|
return __awaiter(this, void 0, void 0, function* () {
|
|
555
673
|
yield this._axiosInstance.delete('/delete_tms_transport', {
|
|
556
674
|
data: {
|
|
557
|
-
trkorr,
|
|
558
|
-
system
|
|
675
|
+
trkorr: trkorr.trim().toUpperCase(),
|
|
676
|
+
system: system.trim().toUpperCase()
|
|
559
677
|
}
|
|
560
678
|
});
|
|
561
679
|
});
|
|
@@ -595,18 +713,38 @@ class RESTClient {
|
|
|
595
713
|
}
|
|
596
714
|
});
|
|
597
715
|
try {
|
|
598
|
-
const
|
|
716
|
+
const contentType = headers && headers['content-type'];
|
|
717
|
+
const boundaryMatch = contentType && contentType.toString().match(/boundary=(?:"([^"]+)"|([^;\s]+))/i);
|
|
718
|
+
if (!boundaryMatch) {
|
|
719
|
+
throw new Error('Multipart boundary is missing');
|
|
720
|
+
}
|
|
721
|
+
const boundary = boundaryMatch[1] || boundaryMatch[2];
|
|
599
722
|
const parsedData = (0, parse_multipart_data_1.parse)(data, boundary);
|
|
723
|
+
const zipPart = parsedData.find(o => o.name === 'zip');
|
|
724
|
+
const objectsPart = parsedData.find(o => o.name === 'objects');
|
|
725
|
+
if (!zipPart || !objectsPart) {
|
|
726
|
+
throw new Error('Multipart response is missing zip or objects');
|
|
727
|
+
}
|
|
728
|
+
const objects = JSON.parse(objectsPart.data.toString());
|
|
729
|
+
if (!Array.isArray(objects)) {
|
|
730
|
+
throw new Error('Multipart objects payload is not an array');
|
|
731
|
+
}
|
|
600
732
|
return {
|
|
601
|
-
zip:
|
|
602
|
-
objects
|
|
733
|
+
zip: zipPart.data,
|
|
734
|
+
objects
|
|
603
735
|
};
|
|
604
736
|
}
|
|
605
737
|
catch (e) {
|
|
606
|
-
throw new _1.RESTClientError("ZPARSE_API_DATA", null,
|
|
738
|
+
throw new _1.RESTClientError("ZPARSE_API_DATA", null, e, `Can't parse API data: ${getErrorMessage(e)}`, "/get_abapgit_source");
|
|
607
739
|
}
|
|
608
740
|
});
|
|
609
741
|
}
|
|
742
|
+
getTransportEntries(trkorr) {
|
|
743
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
744
|
+
const result = (yield this._axiosInstance.get('/get_transport_entries', { data: { trkorr } })).data;
|
|
745
|
+
return (0, commons_1.normalize)(result);
|
|
746
|
+
});
|
|
747
|
+
}
|
|
610
748
|
executePostActivity(data, pre) {
|
|
611
749
|
return __awaiter(this, void 0, void 0, function* () {
|
|
612
750
|
const formData = new FormData.default();
|
|
@@ -643,7 +781,11 @@ class RESTClient {
|
|
|
643
781
|
return true;
|
|
644
782
|
}
|
|
645
783
|
catch (e) {
|
|
646
|
-
|
|
784
|
+
// Only a SAP error is an authorization result: anything else (e.g. a timeout) is rethrown.
|
|
785
|
+
if (e instanceof _1.RESTClientError) {
|
|
786
|
+
return e;
|
|
787
|
+
}
|
|
788
|
+
throw e;
|
|
647
789
|
}
|
|
648
790
|
});
|
|
649
791
|
}
|
|
@@ -5,6 +5,5 @@ export declare class RESTClientError extends ClientError {
|
|
|
5
5
|
exceptionType: string;
|
|
6
6
|
sapMessage: SapMessage;
|
|
7
7
|
restError: AxiosError;
|
|
8
|
-
|
|
9
|
-
constructor(exceptionType: string, sapMessage: SapMessage, restError: AxiosError, message?: string);
|
|
8
|
+
constructor(exceptionType: string, sapMessage: SapMessage, restError: AxiosError, message?: string, resource?: string);
|
|
10
9
|
}
|
|
@@ -3,8 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.RESTClientError = void 0;
|
|
4
4
|
const ClientError_1 = require("./ClientError");
|
|
5
5
|
class RESTClientError extends ClientError_1.ClientError {
|
|
6
|
-
constructor(exceptionType, sapMessage, restError, message) {
|
|
7
|
-
|
|
6
|
+
constructor(exceptionType, sapMessage, restError, message, resource) {
|
|
7
|
+
var _a;
|
|
8
|
+
super(exceptionType, sapMessage, message, resource !== null && resource !== void 0 ? resource : (_a = restError === null || restError === void 0 ? void 0 : restError.config) === null || _a === void 0 ? void 0 : _a.url);
|
|
8
9
|
this.exceptionType = exceptionType;
|
|
9
10
|
this.sapMessage = sapMessage;
|
|
10
11
|
this.restError = restError;
|
|
@@ -2,24 +2,37 @@ import * as components from "./components";
|
|
|
2
2
|
import * as struct from "./struct";
|
|
3
3
|
import { IClient } from "./IClient";
|
|
4
4
|
import { RFCClientError, SapMessage } from ".";
|
|
5
|
-
import { TrmPackageUpdateData } from "../systemConnector";
|
|
5
|
+
import { TrmPackageMetadataRestoreData, TrmPackageUpdateData } from "../systemConnector";
|
|
6
|
+
import { TransportEntries } from "./TransportEntries";
|
|
7
|
+
import { ActionLockKey } from "./struct/ActionLockKey";
|
|
8
|
+
/**
|
|
9
|
+
* Loads a node-rfc compatible library (a module exporting the RFC `Client`).
|
|
10
|
+
*/
|
|
11
|
+
export type RFCLibraryLoader = () => Promise<any>;
|
|
6
12
|
export declare class RFCClient implements IClient {
|
|
7
13
|
private _rfcClientArgs;
|
|
8
14
|
private _cLangu;
|
|
9
15
|
private _globalNodeModulesPath?;
|
|
16
|
+
private _rfcLibraryLoader?;
|
|
17
|
+
acquireActionLocks(keys: ActionLockKey[], ownerToken: string, actionName: string): Promise<void>;
|
|
18
|
+
releaseActionLocks(keys: ActionLockKey[], ownerToken: string): Promise<void>;
|
|
10
19
|
protected _rfcClient: any;
|
|
11
|
-
private
|
|
12
|
-
constructor(_rfcClientArgs: any, _cLangu: string, traceDir?: string, _globalNodeModulesPath?: string);
|
|
20
|
+
private _connectionResponseLogged;
|
|
21
|
+
constructor(_rfcClientArgs: any, _cLangu: string, traceDir?: string, _globalNodeModulesPath?: string, _rfcLibraryLoader?: RFCLibraryLoader);
|
|
22
|
+
private getRfcLibrary;
|
|
13
23
|
private getRfcClient;
|
|
14
24
|
open(): Promise<void>;
|
|
15
25
|
close(): Promise<void>;
|
|
16
26
|
checkConnection(): Promise<boolean>;
|
|
17
|
-
private sanitizeDebugResponse;
|
|
18
27
|
private _call;
|
|
28
|
+
private _getExceptionLog;
|
|
19
29
|
private _getMessage;
|
|
20
30
|
getMessage(data: SapMessage): Promise<string>;
|
|
21
31
|
private _readTable;
|
|
22
|
-
readTable(tableName: components.TABNAME, fields: struct.RFC_DB_FLD[], options?: string
|
|
32
|
+
readTable(tableName: components.TABNAME, fields: struct.RFC_DB_FLD[], options?: string, paging?: {
|
|
33
|
+
offset: number;
|
|
34
|
+
limit: number;
|
|
35
|
+
}): Promise<any[]>;
|
|
23
36
|
getFileSystem(): Promise<struct.FILESYS>;
|
|
24
37
|
getDirTrans(): Promise<components.PFEVALUE>;
|
|
25
38
|
getBinaryFile(filePath: string): Promise<Buffer>;
|
|
@@ -31,19 +44,26 @@ export declare class RFCClient implements IClient {
|
|
|
31
44
|
getDevclassObjects(devclass: components.DEVCLASS): Promise<struct.TADIR[]>;
|
|
32
45
|
removeComments(trkorr: components.TRKORR, object: components.TROBJTYPE): Promise<void>;
|
|
33
46
|
addToTransportRequest(trkorr: components.TRKORR, content: struct.E071[], lock: boolean): Promise<void>;
|
|
47
|
+
lockTransportObjs(trkorr: components.TRKORR): Promise<void>;
|
|
34
48
|
repositoryEnvironment(objectType: components.SEU_OBJ, objectName: components.SOBJ_NAME): Promise<struct.SENVI[]>;
|
|
35
49
|
deleteTrkorr(trkorr: components.TRKORR): Promise<void>;
|
|
36
50
|
releaseTrkorr(trkorr: components.TRKORR, lock: boolean, timeout?: number): Promise<void>;
|
|
37
51
|
readTmsQueue(target: components.TMSSYSNAM): Promise<struct.STMSIQREQ[]>;
|
|
52
|
+
deleteTemporaryPackage(devclass: components.DEVCLASS): Promise<void>;
|
|
38
53
|
createPackage(scompkdtln: struct.SCOMPKDTLN): Promise<void>;
|
|
39
54
|
tdevcInterface(devclass: components.DEVCLASS, parentcl?: components.DEVCLASS, rmParentCl?: boolean, devlayer?: components.DEVLAYER): Promise<void>;
|
|
40
55
|
getDefaultTransportLayer(): Promise<components.DEVLAYER>;
|
|
41
56
|
tadirInterface(tadir: struct.TADIR): Promise<void>;
|
|
42
|
-
dequeueTransport(trkorr: components.TRKORR): Promise<void>;
|
|
43
57
|
forwardTransport(trkorr: components.TRKORR, target: components.TMSSYSNAM, source: components.TMSSYSNAM, importAgain?: boolean): Promise<void>;
|
|
44
|
-
|
|
58
|
+
private parseImportTransportResult;
|
|
59
|
+
importTransport(trkorr: components.TRKORR, system: components.TMSSYSNAM, test: boolean): Promise<struct.STMS_TP_IMPORT | void>;
|
|
60
|
+
importTransportMultiple(trkorr: components.TRKORR[], system: components.TMSSYSNAM, test: boolean): Promise<struct.STMS_TP_IMPORT | void>;
|
|
45
61
|
setInstallDevc(installDevc: struct.ZTRM_INSTALLDEVC[]): Promise<void>;
|
|
62
|
+
deleteInstallDevc(installDevc: struct.ZTRM_INSTALLDEVC[]): Promise<void>;
|
|
63
|
+
restoreInstallMetadata(data: TrmPackageMetadataRestoreData): Promise<void>;
|
|
64
|
+
setInstallTransports(packageName: components.ZTRM_PACKAGE_NAME, packageRegistry: components.ZTRM_PACKAGE_REGISTRY, installTr: struct.ZTRM_INSTALLTR[]): Promise<void>;
|
|
46
65
|
getObjectsList(): Promise<struct.KO100[]>;
|
|
66
|
+
getDest(): Promise<components.SYSYSID>;
|
|
47
67
|
getTrmServerVersion(): Promise<string>;
|
|
48
68
|
getTrmRestVersion(): Promise<string>;
|
|
49
69
|
trmServerPing(): Promise<string>;
|
|
@@ -59,6 +79,7 @@ export declare class RFCClient implements IClient {
|
|
|
59
79
|
zip: Buffer;
|
|
60
80
|
objects: struct.ZTY_SER_OBJ[];
|
|
61
81
|
}>;
|
|
82
|
+
getTransportEntries(trkorr: components.TRKORR): Promise<TransportEntries>;
|
|
62
83
|
executePostActivity(data: Buffer, pre?: boolean): Promise<{
|
|
63
84
|
messages: struct.SYMSG[];
|
|
64
85
|
execute?: boolean;
|