trm-core 9.10.6 → 10.0.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/README.md +20 -0
- package/changelog.txt +3 -6
- 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 -56
- 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
package/dist/client/RFCClient.js
CHANGED
|
@@ -52,31 +52,71 @@ const fs_1 = require("fs");
|
|
|
52
52
|
const path_1 = __importDefault(require("path"));
|
|
53
53
|
const _1 = require(".");
|
|
54
54
|
const xml = __importStar(require("xml-js"));
|
|
55
|
+
const messageLog_1 = require("./messageLog");
|
|
55
56
|
const nodeRfcLib = 'node-rfc';
|
|
57
|
+
const connectionCheckTimeoutSeconds = 3;
|
|
58
|
+
function getErrorMessage(error) {
|
|
59
|
+
return error instanceof Error ? error.message : String(error);
|
|
60
|
+
}
|
|
56
61
|
class RFCClient {
|
|
57
|
-
|
|
62
|
+
acquireActionLocks(keys, ownerToken, actionName) {
|
|
63
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
64
|
+
yield this._call("/ATRM/ACQUIRE_ACT_LOCKS", {
|
|
65
|
+
owner_token: ownerToken,
|
|
66
|
+
action_name: actionName,
|
|
67
|
+
keys: keys.map(key => ({
|
|
68
|
+
resource_type: key.resourceType,
|
|
69
|
+
resource_hash: key.resourceHash,
|
|
70
|
+
resource_name: key.resourceName
|
|
71
|
+
}))
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
releaseActionLocks(keys, ownerToken) {
|
|
76
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
77
|
+
yield this._call("/ATRM/RELEASE_ACT_LOCKS", {
|
|
78
|
+
owner_token: ownerToken,
|
|
79
|
+
keys: keys.map(key => ({
|
|
80
|
+
resource_type: key.resourceType,
|
|
81
|
+
resource_hash: key.resourceHash,
|
|
82
|
+
resource_name: key.resourceName
|
|
83
|
+
}))
|
|
84
|
+
});
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
constructor(_rfcClientArgs, _cLangu, traceDir, _globalNodeModulesPath, _rfcLibraryLoader) {
|
|
58
88
|
this._rfcClientArgs = _rfcClientArgs;
|
|
59
89
|
this._cLangu = _cLangu;
|
|
60
90
|
this._globalNodeModulesPath = _globalNodeModulesPath;
|
|
61
|
-
this.
|
|
91
|
+
this._rfcLibraryLoader = _rfcLibraryLoader;
|
|
92
|
+
this._connectionResponseLogged = false;
|
|
62
93
|
try {
|
|
63
94
|
process.env["RFC_TRACE_DIR"] = traceDir || process.cwd();
|
|
64
95
|
}
|
|
65
96
|
catch (e) {
|
|
97
|
+
//not sure if this could cause an error!
|
|
66
98
|
trm_commons_1.Logger.warning(`Couldn't set RFC trace!`, true);
|
|
67
|
-
trm_commons_1.Logger.error(e
|
|
99
|
+
trm_commons_1.Logger.error(getErrorMessage(e), true);
|
|
68
100
|
}
|
|
69
101
|
trm_commons_1.Logger.log(`RFC_TRACE_DIR: ${process.env["RFC_TRACE_DIR"]}`, true);
|
|
70
102
|
}
|
|
103
|
+
getRfcLibrary() {
|
|
104
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
105
|
+
if (this._rfcLibraryLoader) {
|
|
106
|
+
return this._rfcLibraryLoader();
|
|
107
|
+
}
|
|
108
|
+
const libPath = path_1.default.join(this._globalNodeModulesPath || (0, trm_commons_1.getGlobalNodeModules)(), nodeRfcLib);
|
|
109
|
+
trm_commons_1.Logger.log(`Node RFC lib path: ${libPath}`, true);
|
|
110
|
+
if (!(0, fs_1.existsSync)(libPath)) {
|
|
111
|
+
throw new _1.RFCClientError("ZRFC_LIB_NOT_FOUND", null, null, `${nodeRfcLib} not found. Run command "npm install ${nodeRfcLib} -g" to continue.`);
|
|
112
|
+
}
|
|
113
|
+
return Promise.resolve(`${libPath}`).then(s => __importStar(require(s)));
|
|
114
|
+
});
|
|
115
|
+
}
|
|
71
116
|
getRfcClient() {
|
|
72
117
|
return __awaiter(this, void 0, void 0, function* () {
|
|
73
118
|
if (!this._rfcClient) {
|
|
74
|
-
|
|
75
|
-
trm_commons_1.Logger.log(`Node RFC lib path: ${libPath}`, true);
|
|
76
|
-
if (!(0, fs_1.existsSync)(libPath)) {
|
|
77
|
-
throw new _1.RFCClientError("ZRFC_LIB_NOT_FOUND", null, null, `${nodeRfcLib} not found. Run command "npm install ${nodeRfcLib} -g" to continue.`);
|
|
78
|
-
}
|
|
79
|
-
this._rfcClient = new (yield Promise.resolve(`${libPath}`).then(s => __importStar(require(s)))).Client(this._rfcClientArgs);
|
|
119
|
+
this._rfcClient = new (yield this.getRfcLibrary()).Client(this._rfcClientArgs);
|
|
80
120
|
}
|
|
81
121
|
return this._rfcClient;
|
|
82
122
|
});
|
|
@@ -89,7 +129,7 @@ class RFCClient {
|
|
|
89
129
|
trm_commons_1.Logger.success(`RFC open`, true);
|
|
90
130
|
}
|
|
91
131
|
catch (e) {
|
|
92
|
-
throw new _1.RFCClientError("ZNO_CONN", null, e, e
|
|
132
|
+
throw new _1.RFCClientError("ZNO_CONN", null, e, getErrorMessage(e));
|
|
93
133
|
}
|
|
94
134
|
});
|
|
95
135
|
}
|
|
@@ -101,41 +141,20 @@ class RFCClient {
|
|
|
101
141
|
trm_commons_1.Logger.success(`RFC closed`, true);
|
|
102
142
|
}
|
|
103
143
|
catch (e) {
|
|
104
|
-
throw new _1.RFCClientError("ZNO_CLOSE", null, e, e
|
|
144
|
+
throw new _1.RFCClientError("ZNO_CLOSE", null, e, getErrorMessage(e));
|
|
105
145
|
}
|
|
106
146
|
});
|
|
107
147
|
}
|
|
108
148
|
checkConnection() {
|
|
109
149
|
return __awaiter(this, void 0, void 0, function* () {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
else {
|
|
115
|
-
trm_commons_1.Logger.warning(`RFC closed`, true);
|
|
116
|
-
}
|
|
117
|
-
this._aliveCheck = true;
|
|
150
|
+
const result = yield this._call("STFC_CONNECTION", { requtext: 'This is TRM' }, connectionCheckTimeoutSeconds);
|
|
151
|
+
if (!this._connectionResponseLogged && result && result.resptext) {
|
|
152
|
+
trm_commons_1.Logger.log(result.resptext, true);
|
|
153
|
+
this._connectionResponseLogged = true;
|
|
118
154
|
}
|
|
119
|
-
return
|
|
155
|
+
return true;
|
|
120
156
|
});
|
|
121
157
|
}
|
|
122
|
-
sanitizeDebugResponse(obj) {
|
|
123
|
-
if (Buffer.isBuffer(obj)) {
|
|
124
|
-
try {
|
|
125
|
-
return `<file of ${obj.byteLength} bytes>`;
|
|
126
|
-
}
|
|
127
|
-
catch (_a) {
|
|
128
|
-
return "<file of unknown bytes>";
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
if (Array.isArray(obj)) {
|
|
132
|
-
return obj.map(v => this.sanitizeDebugResponse(v));
|
|
133
|
-
}
|
|
134
|
-
if (obj && typeof obj === "object") {
|
|
135
|
-
return Object.fromEntries(Object.entries(obj).map(([k, v]) => [k, this.sanitizeDebugResponse(v)]));
|
|
136
|
-
}
|
|
137
|
-
return obj;
|
|
138
|
-
}
|
|
139
158
|
_call(fm_1, arg_1, timeout_1, noErrorParsing_1) {
|
|
140
159
|
return __awaiter(this, arguments, void 0, function* (fm, arg, timeout, noErrorParsing, retryCount = 0) {
|
|
141
160
|
var argNormalized;
|
|
@@ -143,7 +162,7 @@ class RFCClient {
|
|
|
143
162
|
var emptyKeys = [];
|
|
144
163
|
argNormalized = (0, commons_1.normalize)(arg, 'upper');
|
|
145
164
|
Object.keys(argNormalized).forEach(key => {
|
|
146
|
-
if (argNormalized[key] === undefined || argNormalized === null) {
|
|
165
|
+
if (argNormalized[key] === undefined || argNormalized[key] === null) {
|
|
147
166
|
emptyKeys.push(key);
|
|
148
167
|
}
|
|
149
168
|
});
|
|
@@ -161,14 +180,18 @@ class RFCClient {
|
|
|
161
180
|
};
|
|
162
181
|
}
|
|
163
182
|
try {
|
|
164
|
-
trm_commons_1.Logger.loading(`Executing RFC, FM ${fm}, args ${JSON.stringify(argNormalized)}, opts ${JSON.stringify(callOptions)}`, true);
|
|
183
|
+
trm_commons_1.Logger.loading(`Executing RFC, FM ${fm}, args ${JSON.stringify((0, commons_1.summarizeForLog)(argNormalized))}, opts ${JSON.stringify((0, commons_1.summarizeForLog)(callOptions))}`, true);
|
|
165
184
|
const response = yield (yield this.getRfcClient()).call(fm, argNormalized, callOptions);
|
|
166
185
|
const responseNormalized = (0, commons_1.normalize)(response);
|
|
167
|
-
|
|
186
|
+
if (fm !== "STFC_CONNECTION") {
|
|
187
|
+
trm_commons_1.Logger.success(`RFC response: ${JSON.stringify((0, commons_1.summarizeForLog)(responseNormalized))}`, true);
|
|
188
|
+
}
|
|
168
189
|
return responseNormalized;
|
|
169
190
|
}
|
|
170
191
|
catch (e) {
|
|
171
|
-
if (e
|
|
192
|
+
if (getErrorMessage(e) === 'device or resource busy: device or resource busy' && retryCount < 10) {
|
|
193
|
+
//node-rfc #327 this issue is not yet solved
|
|
194
|
+
//for the time being try recalling
|
|
172
195
|
trm_commons_1.Logger.log('device or resource busy, retrying', true);
|
|
173
196
|
yield new Promise(res => {
|
|
174
197
|
setTimeout(res, 1000);
|
|
@@ -199,18 +222,40 @@ class RFCClient {
|
|
|
199
222
|
}
|
|
200
223
|
}
|
|
201
224
|
else {
|
|
202
|
-
message = e
|
|
225
|
+
message = getErrorMessage(e);
|
|
203
226
|
}
|
|
204
|
-
var rfcClientError = new _1.RFCClientError(e.key, sapMessage, e, message);
|
|
227
|
+
var rfcClientError = new _1.RFCClientError(e.key, sapMessage, e, message, fm);
|
|
205
228
|
if (messageError) {
|
|
206
229
|
rfcClientError.messageError = messageError;
|
|
207
230
|
}
|
|
208
|
-
|
|
231
|
+
if (sapMessage.no && sapMessage.class) {
|
|
232
|
+
rfcClientError.messageLog = yield this._getExceptionLog(fm, e.key);
|
|
233
|
+
}
|
|
234
|
+
trm_commons_1.Logger.log(rfcClientError.toString(), true);
|
|
235
|
+
(0, messageLog_1.logMessageLog)(rfcClientError);
|
|
209
236
|
throw rfcClientError;
|
|
210
237
|
}
|
|
211
238
|
}
|
|
212
239
|
});
|
|
213
240
|
}
|
|
241
|
+
_getExceptionLog(fm, exceptionKey) {
|
|
242
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
243
|
+
//classic RFC exceptions only carry the T100 message: the /ATRM/CX_EXCEPTION log
|
|
244
|
+
//stays in the function group memory of this RFC session and is read with a follow-up call
|
|
245
|
+
if (typeof fm !== 'string' || !fm.startsWith('/ATRM/') || fm === '/ATRM/GET_EXCEPTION_LOG' || exceptionKey === 'TRM_RFC_UNAUTHORIZED') {
|
|
246
|
+
return undefined;
|
|
247
|
+
}
|
|
248
|
+
try {
|
|
249
|
+
const result = yield this._call('/ATRM/GET_EXCEPTION_LOG', undefined, undefined, true);
|
|
250
|
+
return (0, messageLog_1.parseMessageLog)(result === null || result === void 0 ? void 0 : result.log);
|
|
251
|
+
}
|
|
252
|
+
catch (e) {
|
|
253
|
+
//older trm-server releases don't have this function
|
|
254
|
+
trm_commons_1.Logger.warning(`Couldn't read exception log: ${getErrorMessage(e)}`, true);
|
|
255
|
+
return undefined;
|
|
256
|
+
}
|
|
257
|
+
});
|
|
258
|
+
}
|
|
214
259
|
_getMessage(noErrorParsing, data) {
|
|
215
260
|
return __awaiter(this, void 0, void 0, function* () {
|
|
216
261
|
var msgnr = data.no;
|
|
@@ -245,13 +290,15 @@ class RFCClient {
|
|
|
245
290
|
return this._getMessage(false, data);
|
|
246
291
|
});
|
|
247
292
|
}
|
|
248
|
-
_readTable(noErrorParsing, tableName, fields, options) {
|
|
293
|
+
_readTable(noErrorParsing, tableName, fields, options, paging) {
|
|
249
294
|
return __awaiter(this, void 0, void 0, function* () {
|
|
250
295
|
var sqlOutput = [];
|
|
251
296
|
const delimiter = '|';
|
|
252
297
|
var aOptions = [];
|
|
253
298
|
tableName = tableName.toUpperCase();
|
|
254
299
|
if (options) {
|
|
300
|
+
//line must not exceede 72 chars length
|
|
301
|
+
//it must not break on an operator
|
|
255
302
|
const aSplit = options.split(/\s+AND\s+/);
|
|
256
303
|
if (aSplit.length > 1) {
|
|
257
304
|
aSplit.forEach((s, i) => {
|
|
@@ -269,20 +316,40 @@ class RFCClient {
|
|
|
269
316
|
};
|
|
270
317
|
});
|
|
271
318
|
}
|
|
319
|
+
//lines exceeding 72 chars are split on OR operator
|
|
320
|
+
aOptions = aOptions.reduce((acc, o) => {
|
|
321
|
+
if (o.text.length > 72) {
|
|
322
|
+
o.text.split(/\s+OR\s+/).forEach((s, i) => acc.push({ text: i === 0 ? s.trim() : `OR ${s.trim()}` }));
|
|
323
|
+
}
|
|
324
|
+
else {
|
|
325
|
+
acc.push(o);
|
|
326
|
+
}
|
|
327
|
+
return acc;
|
|
328
|
+
}, []);
|
|
329
|
+
/*aOptions = (options.match(/.{1,72}/g)).map(s => {
|
|
330
|
+
return {
|
|
331
|
+
text: s
|
|
332
|
+
}
|
|
333
|
+
}) || [];*/
|
|
272
334
|
}
|
|
273
335
|
try {
|
|
274
|
-
const
|
|
336
|
+
const params = {
|
|
275
337
|
query_table: tableName,
|
|
276
338
|
delimiter,
|
|
277
339
|
options: aOptions,
|
|
278
340
|
fields
|
|
279
|
-
}
|
|
341
|
+
};
|
|
342
|
+
if (paging) {
|
|
343
|
+
params.rowskips = paging.offset;
|
|
344
|
+
params.rowcount = paging.limit;
|
|
345
|
+
}
|
|
346
|
+
const result = yield this._call("RFC_READ_TABLE", params, undefined, noErrorParsing);
|
|
280
347
|
const data = result['data'];
|
|
281
348
|
data.forEach(tab512 => {
|
|
282
349
|
var sqlLine = {};
|
|
283
350
|
const waSplit = tab512.wa.split(delimiter);
|
|
284
351
|
result.fields.forEach((field, index) => {
|
|
285
|
-
sqlLine[field.fieldname] = waSplit[index].trim();
|
|
352
|
+
sqlLine[field.fieldname] = (waSplit[index] || '').trim();
|
|
286
353
|
});
|
|
287
354
|
sqlOutput.push(sqlLine);
|
|
288
355
|
});
|
|
@@ -298,9 +365,9 @@ class RFCClient {
|
|
|
298
365
|
}
|
|
299
366
|
});
|
|
300
367
|
}
|
|
301
|
-
readTable(tableName, fields, options) {
|
|
368
|
+
readTable(tableName, fields, options, paging) {
|
|
302
369
|
return __awaiter(this, void 0, void 0, function* () {
|
|
303
|
-
return this._readTable(false, tableName, fields, options);
|
|
370
|
+
return this._readTable(false, tableName, fields, options, paging);
|
|
304
371
|
});
|
|
305
372
|
}
|
|
306
373
|
getFileSystem() {
|
|
@@ -344,7 +411,7 @@ class RFCClient {
|
|
|
344
411
|
return __awaiter(this, void 0, void 0, function* () {
|
|
345
412
|
const result = yield this._call("/ATRM/CREATE_IMPORT_TR", {
|
|
346
413
|
text: text,
|
|
347
|
-
target: target.trim().toUpperCase()
|
|
414
|
+
target: target ? target.trim().toUpperCase() : ''
|
|
348
415
|
});
|
|
349
416
|
return result['trkorr'];
|
|
350
417
|
});
|
|
@@ -353,7 +420,7 @@ class RFCClient {
|
|
|
353
420
|
return __awaiter(this, void 0, void 0, function* () {
|
|
354
421
|
const result = yield this._call("/ATRM/CREATE_CUST_TR", {
|
|
355
422
|
text: text,
|
|
356
|
-
target: target.trim().toUpperCase()
|
|
423
|
+
target: target ? target.trim().toUpperCase() : ''
|
|
357
424
|
});
|
|
358
425
|
return result['trkorr'];
|
|
359
426
|
});
|
|
@@ -397,6 +464,13 @@ class RFCClient {
|
|
|
397
464
|
});
|
|
398
465
|
});
|
|
399
466
|
}
|
|
467
|
+
lockTransportObjs(trkorr) {
|
|
468
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
469
|
+
yield this._call("/ATRM/LOCK_TRANSPORT_OBJS", {
|
|
470
|
+
trkorr: trkorr.trim().toUpperCase()
|
|
471
|
+
});
|
|
472
|
+
});
|
|
473
|
+
}
|
|
400
474
|
repositoryEnvironment(objectType, objectName) {
|
|
401
475
|
return __awaiter(this, void 0, void 0, function* () {
|
|
402
476
|
const result = yield this._call("REPOSITORY_ENVIRONMENT_RFC", {
|
|
@@ -429,6 +503,13 @@ class RFCClient {
|
|
|
429
503
|
return result['requests'];
|
|
430
504
|
});
|
|
431
505
|
}
|
|
506
|
+
deleteTemporaryPackage(devclass) {
|
|
507
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
508
|
+
yield this._call("/ATRM/DELETE_TMP_PACKAGE", {
|
|
509
|
+
devclass: devclass.trim().toUpperCase()
|
|
510
|
+
});
|
|
511
|
+
});
|
|
512
|
+
}
|
|
432
513
|
createPackage(scompkdtln) {
|
|
433
514
|
return __awaiter(this, void 0, void 0, function* () {
|
|
434
515
|
yield this._call("/ATRM/CREATE_PACKAGE", {
|
|
@@ -464,13 +545,6 @@ class RFCClient {
|
|
|
464
545
|
});
|
|
465
546
|
});
|
|
466
547
|
}
|
|
467
|
-
dequeueTransport(trkorr) {
|
|
468
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
469
|
-
yield this._call("/ATRM/DEQUEUE_TR", {
|
|
470
|
-
trkorr: trkorr.trim().toUpperCase()
|
|
471
|
-
});
|
|
472
|
-
});
|
|
473
|
-
}
|
|
474
548
|
forwardTransport(trkorr_1, target_1, source_1) {
|
|
475
549
|
return __awaiter(this, arguments, void 0, function* (trkorr, target, source, importAgain = true) {
|
|
476
550
|
yield this._call("/ATRM/FORWARD_TR", {
|
|
@@ -481,12 +555,102 @@ class RFCClient {
|
|
|
481
555
|
});
|
|
482
556
|
});
|
|
483
557
|
}
|
|
484
|
-
|
|
558
|
+
parseImportTransportResult(data, resource) {
|
|
559
|
+
try {
|
|
560
|
+
if (data === undefined || data === null || data.toString().trim() === '') {
|
|
561
|
+
throw new Error('Empty import result');
|
|
562
|
+
}
|
|
563
|
+
const parsed = xml.xml2js(data.toString(), { compact: true });
|
|
564
|
+
const importResult = parsed['asx:abap'] && parsed['asx:abap']['asx:values'] && parsed['asx:abap']['asx:values']['IMPORT'];
|
|
565
|
+
if (!importResult || !importResult.REQUEST || !importResult.ALERT) {
|
|
566
|
+
throw new Error('Unexpected ABAP XML import result');
|
|
567
|
+
}
|
|
568
|
+
const text = (node) => node && node['_text'] !== undefined ? String(node['_text']) : '';
|
|
569
|
+
const tableRows = (node, rowName) => {
|
|
570
|
+
const rows = node && node[rowName];
|
|
571
|
+
if (!rows) {
|
|
572
|
+
return [];
|
|
573
|
+
}
|
|
574
|
+
return Array.isArray(rows) ? rows : [rows];
|
|
575
|
+
};
|
|
576
|
+
return {
|
|
577
|
+
request: {
|
|
578
|
+
trkorr: text(importResult.REQUEST.TRKORR),
|
|
579
|
+
tarcli: text(importResult.REQUEST.TARCLI),
|
|
580
|
+
project: text(importResult.REQUEST.PROJECT),
|
|
581
|
+
preflg: text(importResult.REQUEST.PREFLG),
|
|
582
|
+
owner: text(importResult.REQUEST.OWNER)
|
|
583
|
+
},
|
|
584
|
+
tpRetCode: text(importResult.TP_RET_CODE),
|
|
585
|
+
tpAlog: text(importResult.TP_ALOG),
|
|
586
|
+
tpSlog: text(importResult.TP_SLOG),
|
|
587
|
+
tpPid: text(importResult.TP_PID),
|
|
588
|
+
tpStdout: tableRows(importResult.TP_STDOUT, 'TPSTDOUT').map(item => ({
|
|
589
|
+
line: text(item.LINE)
|
|
590
|
+
})),
|
|
591
|
+
tpLogptr: tableRows(importResult.TP_LOGPTR, 'TPLOGPTR').map(item => ({
|
|
592
|
+
trkorr: text(item.TRKORR),
|
|
593
|
+
owner: text(item.OWNER),
|
|
594
|
+
sysname: text(item.SYSNAME),
|
|
595
|
+
step: text(item.STEP),
|
|
596
|
+
retcode: text(item.RETCODE),
|
|
597
|
+
logdate: text(item.LOGDATE),
|
|
598
|
+
logtime: text(item.LOGTIME),
|
|
599
|
+
osuser: text(item.OSUSER),
|
|
600
|
+
hostname: text(item.HOSTNAME),
|
|
601
|
+
client: text(item.CLIENT)
|
|
602
|
+
})),
|
|
603
|
+
alert: {
|
|
604
|
+
id: text(importResult.ALERT.ID),
|
|
605
|
+
domnam: text(importResult.ALERT.DOMNAM),
|
|
606
|
+
sysnam: text(importResult.ALERT.SYSNAM),
|
|
607
|
+
client: text(importResult.ALERT.CLIENT),
|
|
608
|
+
service: text(importResult.ALERT.SERVICE),
|
|
609
|
+
function: text(importResult.ALERT.FUNCTION),
|
|
610
|
+
error: text(importResult.ALERT.ERROR),
|
|
611
|
+
severity: text(importResult.ALERT.SEVERITY),
|
|
612
|
+
text: text(importResult.ALERT.TEXT),
|
|
613
|
+
msgid: text(importResult.ALERT.MSGID),
|
|
614
|
+
msgty: text(importResult.ALERT.MSGTY),
|
|
615
|
+
msgno: text(importResult.ALERT.MSGNO),
|
|
616
|
+
msgv1: text(importResult.ALERT.MSGV1),
|
|
617
|
+
msgv2: text(importResult.ALERT.MSGV2),
|
|
618
|
+
msgv3: text(importResult.ALERT.MSGV3),
|
|
619
|
+
msgv4: text(importResult.ALERT.MSGV4),
|
|
620
|
+
methodptr: text(importResult.ALERT.METHODPTR),
|
|
621
|
+
properties: text(importResult.ALERT.PROPERTIES)
|
|
622
|
+
}
|
|
623
|
+
};
|
|
624
|
+
}
|
|
625
|
+
catch (error) {
|
|
626
|
+
if (error instanceof _1.RFCClientError) {
|
|
627
|
+
throw error;
|
|
628
|
+
}
|
|
629
|
+
throw new _1.RFCClientError("ZPARSE_API_DATA", null, error, `Can't parse import result: ${getErrorMessage(error)}`, resource);
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
importTransport(trkorr, system, test) {
|
|
485
633
|
return __awaiter(this, void 0, void 0, function* () {
|
|
486
|
-
yield this._call("/ATRM/IMPORT_TR", {
|
|
634
|
+
const result = yield this._call("/ATRM/IMPORT_TR", {
|
|
487
635
|
system: system.trim().toUpperCase(),
|
|
488
|
-
trkorr: trkorr.trim().toUpperCase()
|
|
636
|
+
trkorr: trkorr.trim().toUpperCase(),
|
|
637
|
+
test: test ? 'X' : ' '
|
|
489
638
|
});
|
|
639
|
+
if (result && result.testResult) {
|
|
640
|
+
return this.parseImportTransportResult(result['testResult'], '/ATRM/IMPORT_TR');
|
|
641
|
+
}
|
|
642
|
+
});
|
|
643
|
+
}
|
|
644
|
+
importTransportMultiple(trkorr, system, test) {
|
|
645
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
646
|
+
const result = yield this._call("/ATRM/IMPORT_TR_MULTIPLE", {
|
|
647
|
+
system: system.trim().toUpperCase(),
|
|
648
|
+
trkorr: trkorr.map(value => value.trim().toUpperCase()),
|
|
649
|
+
test: test ? 'X' : ' '
|
|
650
|
+
});
|
|
651
|
+
if (result && result.testResult) {
|
|
652
|
+
return this.parseImportTransportResult(result['testResult'], '/ATRM/IMPORT_TR_MULTIPLE');
|
|
653
|
+
}
|
|
490
654
|
});
|
|
491
655
|
}
|
|
492
656
|
setInstallDevc(installDevc) {
|
|
@@ -496,12 +660,54 @@ class RFCClient {
|
|
|
496
660
|
});
|
|
497
661
|
});
|
|
498
662
|
}
|
|
663
|
+
deleteInstallDevc(installDevc) {
|
|
664
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
665
|
+
yield this._call("/ATRM/DELETE_INSTALL_DEVC", {
|
|
666
|
+
installdevc: installDevc
|
|
667
|
+
});
|
|
668
|
+
});
|
|
669
|
+
}
|
|
670
|
+
restoreInstallMetadata(data) {
|
|
671
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
672
|
+
yield this._call("/ATRM/SET_INSTALL_DEVC", {
|
|
673
|
+
package: data.package,
|
|
674
|
+
package_exists: data.packageExists ? 'X' : ' ',
|
|
675
|
+
installdevc: data.installDevc,
|
|
676
|
+
installtr: data.installTr || []
|
|
677
|
+
});
|
|
678
|
+
});
|
|
679
|
+
}
|
|
680
|
+
setInstallTransports(packageName, packageRegistry, installTr) {
|
|
681
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
682
|
+
yield this._call("/ATRM/SET_INSTALL_TR", {
|
|
683
|
+
package_name: packageName,
|
|
684
|
+
package_registry: packageRegistry,
|
|
685
|
+
installtr: installTr
|
|
686
|
+
});
|
|
687
|
+
});
|
|
688
|
+
}
|
|
499
689
|
getObjectsList() {
|
|
500
690
|
return __awaiter(this, void 0, void 0, function* () {
|
|
501
691
|
const result = yield this._call("/ATRM/LIST_OBJECT_TYPES");
|
|
502
692
|
return result['objectText'];
|
|
503
693
|
});
|
|
504
694
|
}
|
|
695
|
+
getDest() {
|
|
696
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
697
|
+
try {
|
|
698
|
+
const result = yield this._call("/ATRM/GET_DEST");
|
|
699
|
+
return result['dest'];
|
|
700
|
+
}
|
|
701
|
+
catch (e) {
|
|
702
|
+
//trm-server not installed, outdated or not authorized: read the system ID with the standard RFC
|
|
703
|
+
if (e instanceof _1.RFCClientError && (e.exceptionType === 'FU_NOT_FOUND' || e.exceptionType === 'TRM_RFC_UNAUTHORIZED')) {
|
|
704
|
+
const result = yield this._call("RFC_SYSTEM_INFO");
|
|
705
|
+
return result['rfcsiExport']['rfcsysid'];
|
|
706
|
+
}
|
|
707
|
+
throw e;
|
|
708
|
+
}
|
|
709
|
+
});
|
|
710
|
+
}
|
|
505
711
|
getTrmServerVersion() {
|
|
506
712
|
return __awaiter(this, void 0, void 0, function* () {
|
|
507
713
|
const result = yield this._call("/ATRM/VERSION");
|
|
@@ -563,8 +769,8 @@ class RFCClient {
|
|
|
563
769
|
deleteTmsTransport(trkorr, system) {
|
|
564
770
|
return __awaiter(this, void 0, void 0, function* () {
|
|
565
771
|
yield this._call("/ATRM/DEL_TRANSPORT_TMS", {
|
|
566
|
-
trkorr: trkorr,
|
|
567
|
-
system: system
|
|
772
|
+
trkorr: trkorr.trim().toUpperCase(),
|
|
773
|
+
system: system.trim().toUpperCase()
|
|
568
774
|
});
|
|
569
775
|
});
|
|
570
776
|
}
|
|
@@ -588,20 +794,58 @@ class RFCClient {
|
|
|
588
794
|
const result = yield this._call("/ATRM/GET_ABAPGIT_SOURCE", {
|
|
589
795
|
devclass: devclass
|
|
590
796
|
});
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
797
|
+
try {
|
|
798
|
+
if (!Buffer.isBuffer(result['zip']) || result['objects'] === undefined || result['objects'] === null) {
|
|
799
|
+
throw new Error('Missing zip or objects payload');
|
|
800
|
+
}
|
|
801
|
+
const sXml = result['objects'].toString().replace(/&/g, "&").replace(/-/g, "-");
|
|
802
|
+
const oAbapXml = xml.xml2js(sXml, { compact: true });
|
|
803
|
+
const objectItems = oAbapXml['asx:abap'] && oAbapXml['asx:abap']['asx:values'] && oAbapXml['asx:abap']['asx:values']['OBJECTS'] && oAbapXml['asx:abap']['asx:values']['OBJECTS'].item;
|
|
804
|
+
const items = objectItems ? (Array.isArray(objectItems) ? objectItems : [objectItems]) : [];
|
|
805
|
+
const text = (node) => node && node['_text'] !== undefined ? String(node['_text']) : '';
|
|
594
806
|
return {
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
807
|
+
zip: result['zip'],
|
|
808
|
+
objects: items.map(o => ({
|
|
809
|
+
pgmid: text(o['PGMID']),
|
|
810
|
+
object: text(o['OBJECT']),
|
|
811
|
+
objName: text(o['OBJ_NAME']),
|
|
812
|
+
fullPath: text(o['FULL_PATH'])
|
|
813
|
+
}))
|
|
599
814
|
};
|
|
600
|
-
}
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
815
|
+
}
|
|
816
|
+
catch (error) {
|
|
817
|
+
throw new _1.RFCClientError("ZPARSE_API_DATA", null, error, `Can't parse API data: ${getErrorMessage(error)}`, "/ATRM/GET_ABAPGIT_SOURCE");
|
|
818
|
+
}
|
|
819
|
+
});
|
|
820
|
+
}
|
|
821
|
+
getTransportEntries(trkorr) {
|
|
822
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
823
|
+
var _a, _b;
|
|
824
|
+
const result = yield this._call("/ATRM/GET_TRANSPORT_ENTRIES", { trkorr });
|
|
825
|
+
try {
|
|
826
|
+
if (!Buffer.isBuffer(result['entries'])) {
|
|
827
|
+
throw new Error('Missing entries payload');
|
|
828
|
+
}
|
|
829
|
+
const parsed = xml.xml2js(result['entries'].toString().replace(/&/g, "&").replace(/-/g, "-"), { compact: true });
|
|
830
|
+
const root = (_b = (_a = parsed['asx:abap']) === null || _a === void 0 ? void 0 : _a['asx:values']) === null || _b === void 0 ? void 0 : _b['ENTRIES'];
|
|
831
|
+
// asXML names table rows after the DDIC row type (e.g. <E071><E071>...), or <item> when it has none
|
|
832
|
+
const rows = (name) => {
|
|
833
|
+
const table = (root === null || root === void 0 ? void 0 : root[name]) || {};
|
|
834
|
+
const rowName = Object.keys(table).find(key => !key.startsWith('_'));
|
|
835
|
+
const value = rowName ? table[rowName] : undefined;
|
|
836
|
+
const items = value ? (Array.isArray(value) ? value : [value]) : [];
|
|
837
|
+
return items.map(item => Object.fromEntries(Object.entries(item).map(([key, node]) => [key, (node === null || node === void 0 ? void 0 : node._text) === undefined ? '' : String(node._text)])));
|
|
838
|
+
};
|
|
839
|
+
return (0, commons_1.normalize)({
|
|
840
|
+
e071: rows('E071'),
|
|
841
|
+
tdevc: rows('TDEVC'),
|
|
842
|
+
tdevct: rows('TDEVCT'),
|
|
843
|
+
tadir: rows('TADIR')
|
|
844
|
+
});
|
|
845
|
+
}
|
|
846
|
+
catch (error) {
|
|
847
|
+
throw new _1.RFCClientError("ZPARSE_API_DATA", null, error, `Can't parse API data: ${getErrorMessage(error)}`, "/ATRM/GET_TRANSPORT_ENTRIES");
|
|
848
|
+
}
|
|
605
849
|
});
|
|
606
850
|
}
|
|
607
851
|
executePostActivity(data, pre) {
|
|
@@ -636,7 +880,11 @@ class RFCClient {
|
|
|
636
880
|
return true;
|
|
637
881
|
}
|
|
638
882
|
catch (e) {
|
|
639
|
-
|
|
883
|
+
// Only a SAP error is an authorization result: anything else (e.g. a timeout) is rethrown.
|
|
884
|
+
if (e instanceof _1.RFCClientError) {
|
|
885
|
+
return e;
|
|
886
|
+
}
|
|
887
|
+
throw e;
|
|
640
888
|
}
|
|
641
889
|
});
|
|
642
890
|
}
|
|
@@ -4,5 +4,5 @@ export declare class RFCClientError extends ClientError {
|
|
|
4
4
|
exceptionType: string;
|
|
5
5
|
sapMessage: SapMessage;
|
|
6
6
|
rfcError: any;
|
|
7
|
-
constructor(exceptionType: string, sapMessage: SapMessage, rfcError: any, message?: string);
|
|
7
|
+
constructor(exceptionType: string, sapMessage: SapMessage, rfcError: any, message?: string, resource?: string);
|
|
8
8
|
}
|
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.RFCClientError = void 0;
|
|
4
4
|
const ClientError_1 = require("./ClientError");
|
|
5
5
|
class RFCClientError extends ClientError_1.ClientError {
|
|
6
|
-
constructor(exceptionType, sapMessage, rfcError, message) {
|
|
7
|
-
super(exceptionType, sapMessage, message);
|
|
6
|
+
constructor(exceptionType, sapMessage, rfcError, message, resource) {
|
|
7
|
+
super(exceptionType, sapMessage, message, resource);
|
|
8
8
|
this.exceptionType = exceptionType;
|
|
9
9
|
this.sapMessage = sapMessage;
|
|
10
10
|
this.rfcError = rfcError;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type BORM_ID = string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type BORM_NAME = string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type BORM_NAMEL = string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type BORM_VEND = string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type BORM_VERS = string;
|