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
|
@@ -10,213 +10,372 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.checkTransports = void 0;
|
|
13
|
+
exports.checkObjectsLocks = checkObjectsLocks;
|
|
14
|
+
exports.findExistingObjects = findExistingObjects;
|
|
15
|
+
exports.existenceCheckObjects = existenceCheckObjects;
|
|
13
16
|
const trm_commons_1 = require("trm-commons");
|
|
14
17
|
const transport_1 = require("../../transport");
|
|
15
|
-
const commons_1 = require("../../commons");
|
|
16
18
|
const trm_commons_2 = require("trm-commons");
|
|
17
19
|
const systemConnector_1 = require("../../systemConnector");
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
trm_commons_1.Logger.loading(`Reading transports contents...`);
|
|
25
|
-
try {
|
|
26
|
-
context.runtime.packageTransportsData = (yield context.rawInput.packageData.registry.contents(context.rawInput.packageData.name, context.rawInput.packageData.version || 'latest'));
|
|
27
|
-
context.runtime.remotePackageData.contents = true;
|
|
28
|
-
}
|
|
29
|
-
catch (e) {
|
|
30
|
-
context.runtime.remotePackageData.contents = false;
|
|
31
|
-
const options = context.rawInput.contextData.r3transOptions;
|
|
32
|
-
trm_commons_1.Logger.log(`Loading R3Trans with options ${JSON.stringify(options)}`, true);
|
|
33
|
-
trm_commons_1.Logger.log(`R3TRANS_HOME ${process.env.R3TRANS_HOME}`, true);
|
|
34
|
-
context.runtime.r3trans = new node_r3trans_1.R3trans(options);
|
|
35
|
-
const r3transVersion = yield context.runtime.r3trans.getVersion();
|
|
36
|
-
const unicode = yield context.runtime.r3trans.isUnicode();
|
|
37
|
-
trm_commons_1.Logger.info(r3transVersion, context.rawInput.contextData.noR3transInfo);
|
|
38
|
-
trm_commons_1.Logger.log(`R3Trans unicode?: ${unicode}`, true);
|
|
39
|
-
}
|
|
40
|
-
trm_commons_1.Logger.loading(`Validating package transports...`);
|
|
41
|
-
const aTransports = yield context.runtime.remotePackageData.artifact.getTransportBinaries(context.rawInput.contextData.r3transOptions, context.runtime.remotePackageData.contents);
|
|
42
|
-
trm_commons_1.Logger.log(`Package content: ${aTransports.map(o => {
|
|
20
|
+
const commons_1 = require("../../commons");
|
|
21
|
+
const utils_1 = require("../commons/utils");
|
|
22
|
+
/** Throws when any of the objects is locked in a SAP transport request. */
|
|
23
|
+
function checkObjectsLocks(e071) {
|
|
24
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
25
|
+
const locks = yield systemConnector_1.SystemConnector.getObjectsLocks(e071.map(o => {
|
|
43
26
|
return {
|
|
44
|
-
|
|
45
|
-
|
|
27
|
+
PGMID: o.pgmid,
|
|
28
|
+
OBJECT: o.object,
|
|
29
|
+
OBJ_NAME: o.objName
|
|
46
30
|
};
|
|
47
|
-
})
|
|
48
|
-
if (
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
else {
|
|
55
|
-
trm_commons_1.Logger.error(`Transport ${transport.trkorr} is invalid.`, true);
|
|
56
|
-
throw new Error(`Package contains invalid transports`);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
31
|
+
}));
|
|
32
|
+
if (locks.length > 0) {
|
|
33
|
+
locks.forEach(l => {
|
|
34
|
+
trm_commons_1.Logger.error(`${l.pgmid} ${l.object} ${l.objName} is currently locked in transport ${l.trkorr}`, { important: true });
|
|
35
|
+
});
|
|
36
|
+
throw new Error(`Install aborted. To continue, all objects must be released`);
|
|
59
37
|
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
/** Returns the objects of the release that already exist on the target system. */
|
|
41
|
+
function findExistingObjects(context, tadir) {
|
|
42
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
+
const checkTadir = tadir.map(o => {
|
|
44
|
+
return Object.assign(Object.assign({}, o), {
|
|
45
|
+
devclass: context.runtime.isTrmServer || context.runtime.isTrmRest ? (0, commons_1.adjustTrmServerRestDevclass)(o.devclass) : o.devclass
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
if (!systemConnector_1.SystemConnector.getSupportedBulk().getExistingObjects) {
|
|
49
|
+
return systemConnector_1.SystemConnector.getExistingObjects(checkTadir);
|
|
67
50
|
}
|
|
68
51
|
else {
|
|
69
|
-
|
|
70
|
-
trm_commons_1.Logger.log(`DEVC transport is ${context.runtime.packageTransports.devc.binaries.trkorr}.`, true);
|
|
71
|
-
if (context.rawInput.installData.installDevclass.keepOriginal) {
|
|
72
|
-
checkExistance.push(context.runtime.packageTransports.devc.binaries.trkorr);
|
|
73
|
-
}
|
|
52
|
+
return systemConnector_1.SystemConnector.getExistingObjectsBulk(checkTadir);
|
|
74
53
|
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Objects of the release whose existence blocks an install. SAP packages are left out: the release
|
|
58
|
+
* carries their original names, while the install packages are chosen later and checked by
|
|
59
|
+
* check-install-devclass.
|
|
60
|
+
*/
|
|
61
|
+
function existenceCheckObjects(tadir) {
|
|
62
|
+
return tadir.filter(o => !(o.pgmid.trim().toUpperCase() === 'R3TR' && o.object.trim().toUpperCase() === 'DEVC'));
|
|
63
|
+
}
|
|
64
|
+
/** Labels a customizing transport by number, so transports with the same description can be told apart. */
|
|
65
|
+
function custLabel(transport) {
|
|
66
|
+
return transport.description ? `${transport.trkorr} "${transport.description}"` : transport.trkorr;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Workflow step that validates artifact transports and classifies them by TRM identifier.
|
|
70
|
+
* A package must contain exactly one DEVC transport and one TADIR transport.
|
|
71
|
+
*
|
|
72
|
+
* Optionally, one LANG (Translation) and one (or more) CUST (Customizing) transport.
|
|
73
|
+
*
|
|
74
|
+
* 1- fill lang import
|
|
75
|
+
*
|
|
76
|
+
* 2- fill cust import
|
|
77
|
+
*
|
|
78
|
+
* 3- get entries of requested transports
|
|
79
|
+
*
|
|
80
|
+
* 4- check devc and tadir existance
|
|
81
|
+
*
|
|
82
|
+
* 5- set original hierarchy
|
|
83
|
+
*
|
|
84
|
+
* 6- check objects aren't locked
|
|
85
|
+
*
|
|
86
|
+
* 7- check all object types are supported
|
|
87
|
+
*
|
|
88
|
+
* 8- check objects existance
|
|
89
|
+
*
|
|
90
|
+
*/
|
|
91
|
+
exports.checkTransports = {
|
|
92
|
+
name: 'check-transports',
|
|
93
|
+
run: (context) => __awaiter(void 0, void 0, void 0, function* () {
|
|
94
|
+
let mergedE071 = [];
|
|
95
|
+
let mergedTDEVC = [];
|
|
96
|
+
let mergedTADIR = [];
|
|
97
|
+
function mergeEntries(entries) {
|
|
98
|
+
mergedE071 = mergedE071.concat(entries.e071 || []);
|
|
99
|
+
mergedTDEVC = mergedTDEVC.concat(entries.tdevc || []);
|
|
100
|
+
context.runtime.transportEntries.tdevct = context.runtime.transportEntries.tdevct.concat(entries.tdevct || []);
|
|
101
|
+
mergedTADIR = mergedTADIR.concat(entries.tadir || []);
|
|
78
102
|
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
103
|
+
//1- fill lang import
|
|
104
|
+
let importLang = context.rawInput.installData.import.noLang === false;
|
|
105
|
+
if (context.rawInput.installData.import.noLang === undefined && context.runtime.package.data.transports.find(o => o.type === transport_1.TrmTransportIdentifier.LANG)) {
|
|
106
|
+
if (!context.rawInput.contextData.noInquirer) {
|
|
107
|
+
importLang = (yield trm_commons_2.Inquirer.prompt({
|
|
108
|
+
name: 'importLang',
|
|
109
|
+
type: 'confirm',
|
|
110
|
+
message: `Do you want to import the package translations?`,
|
|
111
|
+
default: true
|
|
112
|
+
})).importLang;
|
|
113
|
+
}
|
|
114
|
+
else {
|
|
115
|
+
//no prompts: import, as when noLang is false
|
|
116
|
+
importLang = true;
|
|
87
117
|
}
|
|
88
118
|
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
119
|
+
//2- fill cust import
|
|
120
|
+
const custTransports = context.runtime.package.data.transports.filter(o => o.type === transport_1.TrmTransportIdentifier.CUST);
|
|
121
|
+
let skippedCust = [];
|
|
122
|
+
if (context.rawInput.installData.import.noCust === undefined) {
|
|
123
|
+
if (!context.rawInput.contextData.noInquirer && trm_commons_2.Inquirer.isUi()) {
|
|
124
|
+
if (custTransports.length > 0) {
|
|
125
|
+
const importCust = (yield trm_commons_2.Inquirer.prompt({
|
|
126
|
+
name: 'importCust',
|
|
127
|
+
type: 'select',
|
|
128
|
+
message: `Select customizing to import`,
|
|
129
|
+
choices: custTransports.map(o => ({
|
|
130
|
+
name: custLabel(o),
|
|
131
|
+
value: o.trkorr
|
|
132
|
+
})),
|
|
133
|
+
default: custTransports.map(o => o.trkorr)
|
|
134
|
+
})).importCust || [];
|
|
135
|
+
skippedCust = custTransports.filter(o => !importCust.includes(o.trkorr)).map(o => o.trkorr);
|
|
98
136
|
}
|
|
99
137
|
}
|
|
100
|
-
if (!context.rawInput.
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
context.runtime.packageTransportsData.e071 = context.runtime.packageTransportsData.e071.concat(langE071);
|
|
138
|
+
else if (!context.rawInput.contextData.noInquirer) {
|
|
139
|
+
for (const cust of custTransports) {
|
|
140
|
+
const importCust = (yield trm_commons_2.Inquirer.prompt({
|
|
141
|
+
name: 'importCust',
|
|
142
|
+
type: 'confirm',
|
|
143
|
+
message: `Do you want to import customizing ${custLabel(cust)}?`,
|
|
144
|
+
default: true
|
|
145
|
+
})).importCust;
|
|
146
|
+
if (!importCust) {
|
|
147
|
+
skippedCust.push(cust.trkorr);
|
|
148
|
+
}
|
|
112
149
|
}
|
|
113
150
|
}
|
|
151
|
+
//no prompts: import all, as when noCust is false
|
|
114
152
|
}
|
|
115
|
-
if (
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
153
|
+
else if (context.rawInput.installData.import.noCust) {
|
|
154
|
+
skippedCust = custTransports.map(o => o.trkorr);
|
|
155
|
+
}
|
|
156
|
+
context.runtime.skippedCust = skippedCust;
|
|
157
|
+
//3- get entries of requested transports
|
|
158
|
+
if (context.runtime.isLocal) {
|
|
159
|
+
trm_commons_1.Logger.loading(`Extracting package transports contents...`);
|
|
160
|
+
const artifact = yield context.rawInput.packageData.registry.downloadArtifact(context.runtime.package.data.manifest.name, context.runtime.package.data.manifest.version);
|
|
161
|
+
const binaries = yield artifact.getTransportBinaries();
|
|
162
|
+
binaries.forEach(o => {
|
|
163
|
+
switch (o.type) {
|
|
164
|
+
case transport_1.TrmTransportIdentifier.DEVC:
|
|
165
|
+
context.runtime.transports.devc = {
|
|
166
|
+
binaries: o
|
|
167
|
+
};
|
|
168
|
+
mergeEntries(o.entries);
|
|
169
|
+
break;
|
|
170
|
+
case transport_1.TrmTransportIdentifier.TADIR:
|
|
171
|
+
context.runtime.transports.tadir = {
|
|
172
|
+
binaries: o
|
|
173
|
+
};
|
|
174
|
+
mergeEntries(o.entries);
|
|
175
|
+
break;
|
|
176
|
+
case transport_1.TrmTransportIdentifier.LANG:
|
|
177
|
+
if (importLang) {
|
|
178
|
+
context.runtime.transports.lang = {
|
|
179
|
+
binaries: o
|
|
180
|
+
};
|
|
181
|
+
mergeEntries(o.entries);
|
|
182
|
+
}
|
|
183
|
+
break;
|
|
184
|
+
case transport_1.TrmTransportIdentifier.CUST:
|
|
185
|
+
if (!skippedCust.includes(o.trkorr)) {
|
|
186
|
+
context.runtime.transports.cust.push({
|
|
187
|
+
binaries: o
|
|
188
|
+
});
|
|
189
|
+
mergeEntries(o.entries);
|
|
190
|
+
}
|
|
191
|
+
break;
|
|
192
|
+
default:
|
|
193
|
+
break;
|
|
124
194
|
}
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
else {
|
|
198
|
+
//here we're just reading entries: actual download of transport is done after confirming import of each is allowed
|
|
199
|
+
trm_commons_1.Logger.loading(`Reading package transports contents...`);
|
|
200
|
+
for (const transport of context.runtime.package.data.transports) {
|
|
201
|
+
let readEntries = true;
|
|
202
|
+
if (!importLang && transport.type === transport_1.TrmTransportIdentifier.LANG) {
|
|
203
|
+
readEntries = false;
|
|
204
|
+
}
|
|
205
|
+
if (skippedCust.includes(transport.trkorr)) {
|
|
206
|
+
readEntries = false;
|
|
207
|
+
}
|
|
208
|
+
if (readEntries) {
|
|
209
|
+
const entries = yield context.rawInput.packageData.registry.transportEntries(context.runtime.package.data.manifest.name, context.runtime.package.data.manifest.version, transport.trkorr);
|
|
210
|
+
const binaries = {
|
|
211
|
+
binaries: undefined,
|
|
212
|
+
entries,
|
|
213
|
+
trkorr: transport.trkorr,
|
|
214
|
+
type: transport.type
|
|
130
215
|
};
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
216
|
+
switch (transport.type) {
|
|
217
|
+
case transport_1.TrmTransportIdentifier.DEVC:
|
|
218
|
+
context.runtime.transports.devc = { binaries };
|
|
219
|
+
mergeEntries(entries);
|
|
220
|
+
break;
|
|
221
|
+
case transport_1.TrmTransportIdentifier.TADIR:
|
|
222
|
+
context.runtime.transports.tadir = { binaries };
|
|
223
|
+
mergeEntries(entries);
|
|
224
|
+
break;
|
|
225
|
+
case transport_1.TrmTransportIdentifier.LANG:
|
|
226
|
+
context.runtime.transports.lang = { binaries };
|
|
227
|
+
mergeEntries(entries);
|
|
228
|
+
break;
|
|
229
|
+
case transport_1.TrmTransportIdentifier.CUST:
|
|
230
|
+
context.runtime.transports.cust.push({ binaries });
|
|
231
|
+
mergeEntries(entries);
|
|
232
|
+
break;
|
|
233
|
+
default:
|
|
234
|
+
break;
|
|
138
235
|
}
|
|
139
|
-
trm_commons_1.Logger.log(`CUST E071: ${JSON.stringify(custE071)}`, true);
|
|
140
|
-
context.runtime.packageTransportsData.e071 = context.runtime.packageTransportsData.e071.concat(custE071);
|
|
141
236
|
}
|
|
142
237
|
}
|
|
143
238
|
}
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
239
|
+
//4- check devc and tadir existance
|
|
240
|
+
if (!context.runtime.transports.devc) {
|
|
241
|
+
throw new Error(`Package transport (type DEVC) was not found.`);
|
|
242
|
+
}
|
|
243
|
+
if (!context.runtime.transports.tadir) {
|
|
244
|
+
throw new Error(`Workbench transport (type TADIR) was not found.`);
|
|
245
|
+
}
|
|
246
|
+
if (mergedE071.length === 0) {
|
|
247
|
+
throw new Error(`Package transports contain no objects.`);
|
|
248
|
+
}
|
|
249
|
+
//5- set original hierarchy
|
|
250
|
+
try {
|
|
251
|
+
context.runtime.package.hierarchy = (0, commons_1.getPackageHierarchy)(mergedTDEVC);
|
|
252
|
+
}
|
|
253
|
+
catch (e) {
|
|
254
|
+
throw new Error(`Original SAP packages hierarchy inconsistency: ${e.toString()}`);
|
|
148
255
|
}
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
256
|
+
//6- check objects aren't locked
|
|
257
|
+
//all e071 type R3TR, excluding DEVC. DEVC will be checked for locks later when user may decide new package names
|
|
258
|
+
trm_commons_1.Logger.loading(`Checking objects locks...`);
|
|
259
|
+
yield checkObjectsLocks(mergedE071);
|
|
260
|
+
trm_commons_1.Logger.log(`All objects released, DEVC locks will be checked later`, true);
|
|
261
|
+
//7- check all object types are supported
|
|
262
|
+
trm_commons_1.Logger.loading(`Checking objects support...`);
|
|
263
|
+
const missingTypes = [];
|
|
264
|
+
const systemObjectList = yield systemConnector_1.SystemConnector.getObjectsList();
|
|
265
|
+
mergedE071.filter(o => o.pgmid !== '*').forEach(o => {
|
|
266
|
+
if (!systemObjectList.find(k => k.pgmid === o.pgmid && k.object === o.object) && !missingTypes.includes(`${o.pgmid} ${o.object}`)) {
|
|
267
|
+
missingTypes.push(`${o.pgmid} ${o.object}`);
|
|
155
268
|
}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
else {
|
|
175
|
-
trm_commons_1.Logger.log(`${trkorr} is linked to another package, will later be migrated`, true);
|
|
176
|
-
rewrite = true;
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
else if (trmRelevant) {
|
|
180
|
-
trm_commons_1.Logger.log(`${trkorr} is TRM relevant but no linked package (could be DEVC, LANG etc..).`, true);
|
|
181
|
-
context.runtime.generatedData.tmsTxtRefresh.push(oTransport);
|
|
269
|
+
});
|
|
270
|
+
if (missingTypes.length > 0) {
|
|
271
|
+
throw new Error(`Package contains objects that aren't supported in your system: ${missingTypes.join(', ')}`);
|
|
272
|
+
}
|
|
273
|
+
//8- check objects existance
|
|
274
|
+
const checkedTadir = existenceCheckObjects(mergedTADIR);
|
|
275
|
+
const existingObjects = checkedTadir.length > 0 ? yield findExistingObjects(context, checkedTadir) : [];
|
|
276
|
+
// lock-resources checks again, once locked, that no other object appeared
|
|
277
|
+
context.runtime.existingObjects = existingObjects;
|
|
278
|
+
trm_commons_1.Logger.log(`TADIR object that already exist in system: ${JSON.stringify(existingObjects)}`, true);
|
|
279
|
+
//if updating and existing object is part of the package (devclass in hierarchy) ok, else throw error
|
|
280
|
+
if (existingObjects.length > 0) {
|
|
281
|
+
// Name the installed TRM package that contains each existing object: it can't be taken over silently.
|
|
282
|
+
const owners = new Map();
|
|
283
|
+
for (const o of existingObjects) {
|
|
284
|
+
const owner = o.devclass ? yield (0, utils_1.getOwningInstallation)(o.devclass, context.rawInput.contextData.systemPackages || [], context.runtime.update) : undefined;
|
|
285
|
+
if (owner) {
|
|
286
|
+
owners.set(o, owner.packageName);
|
|
182
287
|
}
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
288
|
+
}
|
|
289
|
+
const label = (o) => `${o.pgmid} ${o.object} ${o.objName}${owners.has(o) ? ` (TRM package ${owners.get(o)})` : ''}`;
|
|
290
|
+
const ownerNames = [...new Set(owners.values())];
|
|
291
|
+
const ownersHint = ownerNames.length > 0
|
|
292
|
+
? `\n${ownerNames.map(o => `"${o}"`).join(', ')} still ${ownerNames.length === 1 ? 'contains' : 'contain'} these objects: upgrade ${ownerNames.length === 1 ? 'it' : 'them'} to a release that no longer ships them, or uninstall ${ownerNames.length === 1 ? 'it' : 'them'}, then install again.`
|
|
293
|
+
: '';
|
|
294
|
+
const sObjs = existingObjects.map(label).join('\n') + ownersHint;
|
|
295
|
+
if (context.runtime.update) {
|
|
296
|
+
//the installed package being updated (a same-named package of another registry is a different package)
|
|
297
|
+
const rootPackage = context.runtime.update;
|
|
298
|
+
if (rootPackage) {
|
|
299
|
+
const rootDevclass = rootPackage.getDevclass();
|
|
300
|
+
if (rootDevclass) {
|
|
301
|
+
const subpackages = (yield systemConnector_1.SystemConnector.getSubpackages(rootDevclass)).map(o => o.devclass);
|
|
302
|
+
const outside = existingObjects.filter(o => {
|
|
303
|
+
if (subpackages.includes(o.devclass) || rootDevclass === o.devclass) {
|
|
304
|
+
trm_commons_1.Logger.log(`${o.pgmid} ${o.object} ${o.objName} already in system but devclass ${o.devclass} is part of the same trm package in update`, true);
|
|
305
|
+
return false;
|
|
306
|
+
}
|
|
307
|
+
return true;
|
|
308
|
+
});
|
|
309
|
+
// Objects of the installed release that the customer moved to another (non-TRM) SAP package:
|
|
310
|
+
// overwriting them moves them back, so it can be confirmed. Anything else can't be taken over.
|
|
311
|
+
const installedKeys = new Set(outside.length > 0 && rootPackage.getTransport()
|
|
312
|
+
? (yield rootPackage.getTransport().getE071()).map(e => `${e.pgmid}|${e.object}|${e.objName}`.toUpperCase())
|
|
313
|
+
: []);
|
|
314
|
+
const movedOut = outside.filter(o => !owners.has(o) && installedKeys.has(`${o.pgmid}|${o.object}|${o.objName}`.toUpperCase()));
|
|
315
|
+
const foreign = outside.filter(o => !movedOut.includes(o));
|
|
316
|
+
const noExistingObjects = context.rawInput.installData.checks.noExistingObjects;
|
|
317
|
+
foreign.forEach(o => {
|
|
318
|
+
if (noExistingObjects) {
|
|
319
|
+
trm_commons_1.Logger.warning(`${label(o)} already exist on target system ${systemConnector_1.SystemConnector.getDest()}`, { important: true });
|
|
320
|
+
}
|
|
321
|
+
else {
|
|
322
|
+
trm_commons_1.Logger.error(`${label(o)} already exist on target system ${systemConnector_1.SystemConnector.getDest()}`, { important: true });
|
|
323
|
+
}
|
|
324
|
+
});
|
|
325
|
+
if (foreign.length > 0 && !noExistingObjects) {
|
|
326
|
+
throw new Error(`Cannot overwrite existing objects.${ownersHint}`);
|
|
327
|
+
}
|
|
328
|
+
if (movedOut.length > 0 && !noExistingObjects) {
|
|
329
|
+
const movedList = movedOut.map(o => `${o.pgmid} ${o.object} ${o.objName} (now in SAP package ${o.devclass})`).join('\n');
|
|
330
|
+
trm_commons_1.Logger.warning(`${movedOut.length} object(s) of the installed release were moved outside its SAP packages:\n${movedList}`, { important: true });
|
|
331
|
+
if (context.rawInput.contextData.noInquirer) {
|
|
332
|
+
throw new Error(`Cannot overwrite objects moved outside ${rootPackage.packageName}: confirm interactively, or install with the noExistingObjects check.`);
|
|
333
|
+
}
|
|
334
|
+
const { overwriteMoved } = yield trm_commons_2.Inquirer.prompt({
|
|
335
|
+
name: 'overwriteMoved',
|
|
336
|
+
type: 'confirm',
|
|
337
|
+
message: `Overwrite them and move them back into the SAP packages of ${rootPackage.packageName}?`,
|
|
338
|
+
default: false
|
|
339
|
+
});
|
|
340
|
+
if (!overwriteMoved) {
|
|
341
|
+
throw new Error(`Install aborted.`);
|
|
342
|
+
}
|
|
343
|
+
}
|
|
186
344
|
}
|
|
187
345
|
else {
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
}
|
|
191
|
-
if (rewrite) {
|
|
192
|
-
trm_commons_1.Logger.warning(`Transport ${trkorr} already exists in target system ${systemConnector_1.SystemConnector.getDest()}`);
|
|
193
|
-
trm_commons_1.Logger.warning(`If you continue, TRM will replace the content of transport ${trkorr} with the content of the transport with the same number of package "${context.runtime.remotePackageData.manifest.name}".`);
|
|
194
|
-
trm_commons_1.Logger.warning(`All of its original content (objects or customizing) will remain untouched, however you may need to manually create a new transport for it.`);
|
|
195
|
-
trm_commons_1.Logger.warning(`Consider doing a copy now before the install will replace it.`);
|
|
196
|
-
if (!context.rawInput.installData.import.replaceExistingTransports) {
|
|
197
|
-
var continueInstall;
|
|
198
|
-
if (!context.rawInput.contextData.noInquirer) {
|
|
199
|
-
continueInstall = (yield trm_commons_2.Inquirer.prompt({
|
|
200
|
-
name: `continue`,
|
|
201
|
-
message: `Continue install?`,
|
|
202
|
-
type: `confirm`,
|
|
203
|
-
default: true
|
|
204
|
-
})).continue;
|
|
205
|
-
}
|
|
206
|
-
else {
|
|
207
|
-
continueInstall = false;
|
|
346
|
+
if (context.rawInput.installData.checks.noExistingObjects) {
|
|
347
|
+
trm_commons_1.Logger.warning(`${existingObjects.length} object(s) already exist on target system ${systemConnector_1.SystemConnector.getDest()}:\n${sObjs}`, { important: true });
|
|
208
348
|
}
|
|
209
|
-
if (
|
|
210
|
-
|
|
349
|
+
else if (context.rawInput.contextData.noInquirer) {
|
|
350
|
+
//can't confirm the overwrite without a prompt: fail closed
|
|
351
|
+
throw new Error(`Couldn't determine root SAP package for "${rootPackage.packageName}", ${existingObjects.length} object(s) already exist on target system ${systemConnector_1.SystemConnector.getDest()}:\n${sObjs}`);
|
|
211
352
|
}
|
|
212
353
|
else {
|
|
213
|
-
|
|
354
|
+
const ow = (yield trm_commons_2.Inquirer.prompt({
|
|
355
|
+
message: `Couldn't determine root SAP package for "${rootPackage.packageName}", ${existingObjects.length} object(s) already exist on target system ${systemConnector_1.SystemConnector.getDest()}. Continue?`,
|
|
356
|
+
type: 'confirm',
|
|
357
|
+
name: 'ow',
|
|
358
|
+
default: true
|
|
359
|
+
})).ow;
|
|
360
|
+
if (!ow) {
|
|
361
|
+
throw new Error(`${existingObjects.length} object(s) already exist on target system ${systemConnector_1.SystemConnector.getDest()}:\n${sObjs}`);
|
|
362
|
+
}
|
|
214
363
|
}
|
|
215
364
|
}
|
|
216
365
|
}
|
|
366
|
+
else {
|
|
367
|
+
if (!context.rawInput.installData.checks.noExistingObjects) {
|
|
368
|
+
throw new Error(`${existingObjects.length} object(s) already exist on target system ${systemConnector_1.SystemConnector.getDest()}:\n${sObjs}`);
|
|
369
|
+
}
|
|
370
|
+
}
|
|
217
371
|
}
|
|
218
372
|
else {
|
|
219
|
-
|
|
373
|
+
if (context.rawInput.installData.checks.noExistingObjects) {
|
|
374
|
+
trm_commons_1.Logger.warning(`${existingObjects.length} object(s) already exist on target system ${systemConnector_1.SystemConnector.getDest()}:\n${sObjs}`, { important: true });
|
|
375
|
+
}
|
|
376
|
+
else {
|
|
377
|
+
throw new Error(`${existingObjects.length} object(s) already exist on target system ${systemConnector_1.SystemConnector.getDest()}, install without object check (expert mode):\n${sObjs}`);
|
|
378
|
+
}
|
|
220
379
|
}
|
|
221
380
|
}
|
|
222
381
|
})
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Step } from "@simonegaffurini/sammarksworkflow";
|
|
2
|
+
import { InstallWorkflowContext } from ".";
|
|
3
|
+
/**
|
|
4
|
+
* Workflow step that changes nothing: its revert cleans up what the install itself changed.
|
|
5
|
+
*
|
|
6
|
+
* It runs right after `install-dependencies`, so a rollback cleans up the generated SAP packages
|
|
7
|
+
* and namespace, and restores the package transport layers and hierarchy, before the dependencies
|
|
8
|
+
* are rolled back (a dependency rollback may delete the namespace these packages are in).
|
|
9
|
+
* Every restore is attempted; the first failure is thrown afterwards.
|
|
10
|
+
*/
|
|
11
|
+
export declare const cleanupCheckpoint: Step<InstallWorkflowContext>;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.cleanupCheckpoint = void 0;
|
|
13
|
+
const systemConnector_1 = require("../../systemConnector");
|
|
14
|
+
const importBatch_1 = require("./importBatch");
|
|
15
|
+
/**
|
|
16
|
+
* Workflow step that changes nothing: its revert cleans up what the install itself changed.
|
|
17
|
+
*
|
|
18
|
+
* It runs right after `install-dependencies`, so a rollback cleans up the generated SAP packages
|
|
19
|
+
* and namespace, and restores the package transport layers and hierarchy, before the dependencies
|
|
20
|
+
* are rolled back (a dependency rollback may delete the namespace these packages are in).
|
|
21
|
+
* Every restore is attempted; the first failure is thrown afterwards.
|
|
22
|
+
*/
|
|
23
|
+
exports.cleanupCheckpoint = {
|
|
24
|
+
name: 'cleanup-checkpoint',
|
|
25
|
+
run: () => __awaiter(void 0, void 0, void 0, function* () {
|
|
26
|
+
// Nothing to do: the step only orders the revert.
|
|
27
|
+
}),
|
|
28
|
+
revert: (context) => __awaiter(void 0, void 0, void 0, function* () {
|
|
29
|
+
if (!context.revert.cleanupImported && (context.revert.importStarted || context.revert.importedEntries.length > 0
|
|
30
|
+
|| context.revert.cleanupTransport || context.revert.namespace || context.revert.sapPackages.length > 0)) {
|
|
31
|
+
yield (0, importBatch_1.deleteImportedEntries)(context);
|
|
32
|
+
}
|
|
33
|
+
if (context.revert.cleanupImported && !context.revert.cleanupSucceeded) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
let firstError;
|
|
37
|
+
for (const layer of context.revert.packageTransportLayers || []) {
|
|
38
|
+
try {
|
|
39
|
+
yield systemConnector_1.SystemConnector.setPackageTransportLayer(layer.devclass, layer.transportLayer);
|
|
40
|
+
}
|
|
41
|
+
catch (error) {
|
|
42
|
+
firstError || (firstError = error);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
for (const pkg of context.revert.packageHierarchy || []) {
|
|
46
|
+
try {
|
|
47
|
+
if (pkg.parentcl) {
|
|
48
|
+
yield systemConnector_1.SystemConnector.setPackageSuperpackage(pkg.devclass, pkg.parentcl);
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
yield systemConnector_1.SystemConnector.clearPackageSuperpackage(pkg.devclass);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
catch (error) {
|
|
55
|
+
firstError || (firstError = error);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
if (firstError) {
|
|
59
|
+
throw firstError;
|
|
60
|
+
}
|
|
61
|
+
})
|
|
62
|
+
};
|