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
|
@@ -0,0 +1,36 @@
|
|
|
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.getDefaultTransportLayer = getDefaultTransportLayer;
|
|
13
|
+
const trm_commons_1 = require("trm-commons");
|
|
14
|
+
const systemConnector_1 = require("../../systemConnector");
|
|
15
|
+
/**
|
|
16
|
+
* Reads the system's default transport layer, used for transportable packages when the install
|
|
17
|
+
* input doesn't specify one.
|
|
18
|
+
*/
|
|
19
|
+
function getDefaultTransportLayer() {
|
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
trm_commons_1.Logger.loading(`Checking transport layer...`);
|
|
22
|
+
let defaultTransportLayer;
|
|
23
|
+
try {
|
|
24
|
+
defaultTransportLayer = yield systemConnector_1.SystemConnector.getDefaultTransportLayer();
|
|
25
|
+
}
|
|
26
|
+
catch (e) {
|
|
27
|
+
trm_commons_1.Logger.error(e.toString(), true);
|
|
28
|
+
throw new Error(`Couldn't determine system's default transport layer.`);
|
|
29
|
+
}
|
|
30
|
+
if (!defaultTransportLayer) {
|
|
31
|
+
throw new Error(`System has no default transport layer, specify one.`);
|
|
32
|
+
}
|
|
33
|
+
trm_commons_1.Logger.log(`System default transport layer: ${defaultTransportLayer}`, true);
|
|
34
|
+
return defaultTransportLayer;
|
|
35
|
+
});
|
|
36
|
+
}
|
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
import { Step } from "@simonegaffurini/sammarksworkflow";
|
|
2
2
|
import { InstallWorkflowContext } from ".";
|
|
3
|
+
/**
|
|
4
|
+
* Workflow step that executes post-install activities declared by the package manifest.
|
|
5
|
+
*
|
|
6
|
+
* 1- execute post activities
|
|
7
|
+
*
|
|
8
|
+
*/
|
|
3
9
|
export declare const executePostActivities: Step<InstallWorkflowContext>;
|
|
@@ -12,7 +12,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.executePostActivities = void 0;
|
|
13
13
|
const trm_commons_1 = require("trm-commons");
|
|
14
14
|
const manifest_1 = require("../../manifest");
|
|
15
|
-
|
|
15
|
+
/**
|
|
16
|
+
* Workflow step that executes post-install activities declared by the package manifest.
|
|
17
|
+
*
|
|
18
|
+
* 1- execute post activities
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
16
21
|
exports.executePostActivities = {
|
|
17
22
|
name: 'execute-post-activities',
|
|
18
23
|
filter: (context) => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -20,52 +25,37 @@ exports.executePostActivities = {
|
|
|
20
25
|
trm_commons_1.Logger.log(`Skipping post activities (user input)`, true);
|
|
21
26
|
return false;
|
|
22
27
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
return true;
|
|
26
|
-
}
|
|
27
|
-
else {
|
|
28
|
-
trm_commons_1.Logger.log(`Skipping post activities (none defined)`, true);
|
|
29
|
-
return false;
|
|
30
|
-
}
|
|
28
|
+
if (context.runtime.package.data.manifest.postActivities && context.runtime.package.data.manifest.postActivities.length > 0) {
|
|
29
|
+
return true;
|
|
31
30
|
}
|
|
31
|
+
trm_commons_1.Logger.log(`Skipping post activities (none defined)`, true);
|
|
32
|
+
return false;
|
|
32
33
|
}),
|
|
33
34
|
run: (context) => __awaiter(void 0, void 0, void 0, function* () {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
for (
|
|
35
|
+
//1- execute post activities
|
|
36
|
+
let counter = 0;
|
|
37
|
+
for (const data of context.runtime.package.data.manifest.postActivities) {
|
|
37
38
|
counter++;
|
|
38
|
-
trm_commons_1.Logger.setPrefix(`(${counter}/${context.runtime.
|
|
39
|
+
trm_commons_1.Logger.setPrefix(`(${counter}/${context.runtime.package.data.manifest.postActivities.length}) `);
|
|
39
40
|
try {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
param.value
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}
|
|
50
|
-
break;
|
|
51
|
-
case '&INSTALL_CUST_TRANSPORT&':
|
|
52
|
-
try {
|
|
53
|
-
param.value = context.runtime.installData.transports.find(o => o.type === transport_1.TrmTransportIdentifier.CUST).transport.trkorr;
|
|
54
|
-
}
|
|
55
|
-
catch (x) {
|
|
56
|
-
throw new Error(`Cannot find install customizing transport number`);
|
|
57
|
-
}
|
|
58
|
-
break;
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
const postActivity = new manifest_1.PostActivity(data);
|
|
41
|
+
const activity = Object.assign(Object.assign({}, data), { parameters: Array.isArray(data.parameters)
|
|
42
|
+
? data.parameters.map(param => {
|
|
43
|
+
var _a;
|
|
44
|
+
return (Object.assign(Object.assign({}, param), { value: param.value === '&LANDSCAPE_TRANSPORT&'
|
|
45
|
+
? (_a = context.output.transport) === null || _a === void 0 ? void 0 : _a.trkorr
|
|
46
|
+
: param.value }));
|
|
47
|
+
})
|
|
48
|
+
: data.parameters });
|
|
49
|
+
const postActivity = new manifest_1.PostActivity(activity);
|
|
63
50
|
yield postActivity.execute();
|
|
64
51
|
}
|
|
65
52
|
catch (e) {
|
|
66
|
-
trm_commons_1.Logger.error(`Failed execution of post activity: ${e.message}
|
|
53
|
+
trm_commons_1.Logger.error(`Failed execution of post activity: ${e.message}`, { important: true });
|
|
54
|
+
throw e;
|
|
55
|
+
}
|
|
56
|
+
finally {
|
|
57
|
+
trm_commons_1.Logger.removePrefix();
|
|
67
58
|
}
|
|
68
|
-
trm_commons_1.Logger.removePrefix();
|
|
69
59
|
}
|
|
70
60
|
})
|
|
71
61
|
};
|
|
@@ -1,3 +1,13 @@
|
|
|
1
1
|
import { Step } from "@simonegaffurini/sammarksworkflow";
|
|
2
2
|
import { InstallWorkflowContext } from ".";
|
|
3
|
+
/**
|
|
4
|
+
* Workflow step that validates target SAP packages and creates any that are missing.
|
|
5
|
+
*
|
|
6
|
+
* 1- find packages to generate
|
|
7
|
+
*
|
|
8
|
+
* 2- generate missing packages (the default transport layer is resolved only for transportable packages)
|
|
9
|
+
*
|
|
10
|
+
* 3- build the package hierarchy, based on the original
|
|
11
|
+
*
|
|
12
|
+
*/
|
|
3
13
|
export declare const generateDevclass: Step<InstallWorkflowContext>;
|
|
@@ -14,11 +14,22 @@ const trm_commons_1 = require("trm-commons");
|
|
|
14
14
|
const commons_1 = require("../../commons");
|
|
15
15
|
const systemConnector_1 = require("../../systemConnector");
|
|
16
16
|
const stopWarning_1 = require("../stopWarning");
|
|
17
|
+
const defaultTransportLayer_1 = require("./defaultTransportLayer");
|
|
18
|
+
/**
|
|
19
|
+
* Workflow step that validates target SAP packages and creates any that are missing.
|
|
20
|
+
*
|
|
21
|
+
* 1- find packages to generate
|
|
22
|
+
*
|
|
23
|
+
* 2- generate missing packages (the default transport layer is resolved only for transportable packages)
|
|
24
|
+
*
|
|
25
|
+
* 3- build the package hierarchy, based on the original
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
17
28
|
exports.generateDevclass = {
|
|
18
29
|
name: 'generate-devclass',
|
|
19
30
|
filter: (context) => __awaiter(void 0, void 0, void 0, function* () {
|
|
20
31
|
if (context.rawInput.installData.installDevclass.keepOriginal || context.runtime.isTrmServer) {
|
|
21
|
-
trm_commons_1.Logger.log(`Skipping generate devclass
|
|
32
|
+
trm_commons_1.Logger.log(`Skipping generate devclass (user input)`, true);
|
|
22
33
|
return false;
|
|
23
34
|
}
|
|
24
35
|
else {
|
|
@@ -26,40 +37,73 @@ exports.generateDevclass = {
|
|
|
26
37
|
}
|
|
27
38
|
}),
|
|
28
39
|
run: (context) => __awaiter(void 0, void 0, void 0, function* () {
|
|
29
|
-
var _a, _b;
|
|
30
|
-
|
|
31
|
-
trm_commons_1.Logger.loading(`Checking
|
|
32
|
-
|
|
40
|
+
var _a, _b, _c;
|
|
41
|
+
//1- find packages to generated
|
|
42
|
+
trm_commons_1.Logger.loading(`Checking SAP packages...`);
|
|
43
|
+
const generate = [];
|
|
44
|
+
const existing = new Set();
|
|
33
45
|
for (const replacement of context.rawInput.installData.installDevclass.replacements) {
|
|
34
46
|
trm_commons_1.Logger.loading(`Checking existance of devclass ${replacement.installDevclass}...`, true);
|
|
35
47
|
const oDevclass = yield systemConnector_1.SystemConnector.getDevclass(replacement.installDevclass);
|
|
36
48
|
if (oDevclass) {
|
|
37
49
|
trm_commons_1.Logger.log(`Devclass ${replacement.installDevclass} exists, skipping generation`, true);
|
|
50
|
+
existing.add(replacement.installDevclass);
|
|
51
|
+
if (!context.revert.packageHierarchy.some(pkg => pkg.devclass === oDevclass.devclass)) {
|
|
52
|
+
context.revert.packageHierarchy.push(oDevclass);
|
|
53
|
+
}
|
|
38
54
|
}
|
|
39
55
|
else {
|
|
40
56
|
trm_commons_1.Logger.log(`Devclass ${replacement.installDevclass} doesn't exist, will be generated`, true);
|
|
41
57
|
generate.push(replacement.installDevclass);
|
|
42
58
|
}
|
|
43
59
|
}
|
|
60
|
+
if (existing.size > 0) {
|
|
61
|
+
trm_commons_1.Logger.loading(`Checking objects locks...`);
|
|
62
|
+
const locks = yield systemConnector_1.SystemConnector.getObjectsLocks(Array.from(existing, devclass => ({
|
|
63
|
+
PGMID: 'R3TR',
|
|
64
|
+
OBJECT: 'DEVC',
|
|
65
|
+
OBJ_NAME: devclass
|
|
66
|
+
})));
|
|
67
|
+
if (locks.length > 0) {
|
|
68
|
+
locks.forEach(lock => {
|
|
69
|
+
trm_commons_1.Logger.error(`${lock.pgmid} ${lock.object} ${lock.objName} is currently locked in transport ${lock.trkorr}`, { important: true });
|
|
70
|
+
});
|
|
71
|
+
throw new Error(`Install aborted. To continue, all ABAP packages must be released`);
|
|
72
|
+
}
|
|
73
|
+
trm_commons_1.Logger.log(`All existing SAP packages released, continue`, true);
|
|
74
|
+
}
|
|
75
|
+
//2- generate missing packages
|
|
44
76
|
if (generate.length > 0) {
|
|
77
|
+
const dlvunit = context.runtime.namespace === '$' ? 'LOCAL' : 'HOME';
|
|
78
|
+
if (dlvunit !== 'LOCAL' && !context.rawInput.installData.installDevclass.transportLayer) {
|
|
79
|
+
context.rawInput.installData.installDevclass.transportLayer = yield (0, defaultTransportLayer_1.getDefaultTransportLayer)();
|
|
80
|
+
trm_commons_1.Logger.log(`Setting transport layer to default: ${context.rawInput.installData.installDevclass.transportLayer}`, true);
|
|
81
|
+
}
|
|
45
82
|
if (!context.runtime.stopWarningShown) {
|
|
46
83
|
context.runtime.stopWarningShown = true;
|
|
47
84
|
(0, stopWarning_1.stopWarning)('install');
|
|
48
85
|
}
|
|
49
|
-
const dlvunit = context.runtime.installData.namespace === '$' ? 'LOCAL' : 'HOME';
|
|
50
86
|
for (const devclass of generate) {
|
|
51
87
|
trm_commons_1.Logger.loading(`Creating package ${devclass}...`);
|
|
52
88
|
const originalDevclass = context.rawInput.installData.installDevclass.replacements.find(o => o.installDevclass === devclass).originalDevclass;
|
|
53
89
|
trm_commons_1.Logger.log(`Original devclass ${originalDevclass}`, true);
|
|
54
|
-
const
|
|
55
|
-
|
|
90
|
+
const originalPackageData = (_a = context.runtime.transports.devc.binaries.entries.tdevc) === null || _a === void 0 ? void 0 : _a.find((o) => o.devclass === originalDevclass);
|
|
91
|
+
if (!originalPackageData) {
|
|
92
|
+
throw new Error(`Original TDEVC data for package ${originalDevclass} was not found.`);
|
|
93
|
+
}
|
|
94
|
+
const ctext = ((_b = context.runtime.transportEntries.tdevct.find(o => o.devclass === originalDevclass)) === null || _b === void 0 ? void 0 : _b.ctext) || `TRM ${context.rawInput.packageData.name}`;
|
|
95
|
+
// Track before the mutating await because the package may have been
|
|
96
|
+
// created even when the connector response fails.
|
|
97
|
+
if (!context.revert.sapPackages.includes(devclass)) {
|
|
98
|
+
context.revert.sapPackages.push(devclass);
|
|
99
|
+
}
|
|
100
|
+
yield systemConnector_1.SystemConnector.createPackage((0, commons_1.packageDataFromTdevc)(originalPackageData, {
|
|
56
101
|
as4user: systemConnector_1.SystemConnector.getLogonUser(),
|
|
57
|
-
pdevclass: context.rawInput.installData.installDevclass.transportLayer,
|
|
102
|
+
pdevclass: context.rawInput.installData.installDevclass.transportLayer || '',
|
|
58
103
|
devclass,
|
|
59
104
|
ctext,
|
|
60
105
|
dlvunit
|
|
61
|
-
});
|
|
62
|
-
context.runtime.generatedData.devclass.push(devclass);
|
|
106
|
+
}));
|
|
63
107
|
if (dlvunit !== 'LOCAL') {
|
|
64
108
|
yield systemConnector_1.SystemConnector.tadirInterface({
|
|
65
109
|
pgmid: 'R3TR',
|
|
@@ -71,15 +115,15 @@ exports.generateDevclass = {
|
|
|
71
115
|
}
|
|
72
116
|
}
|
|
73
117
|
}
|
|
74
|
-
|
|
118
|
+
//3- build the package hierarchy, based on the original
|
|
119
|
+
trm_commons_1.Logger.loading(`Updating SAP packages hierarchy...`);
|
|
75
120
|
const aDummyTdevc = [];
|
|
76
|
-
|
|
77
|
-
const originalPackageHierarchy = (0, commons_1.getPackageHierarchy)(context.runtime.packageTransportsData.tdevc);
|
|
121
|
+
let parentcl;
|
|
78
122
|
for (const packageReplacement of context.rawInput.installData.installDevclass.replacements) {
|
|
79
123
|
parentcl = '';
|
|
80
|
-
const originalRoot =
|
|
124
|
+
const originalRoot = context.runtime.package.hierarchy.devclass === packageReplacement.originalDevclass;
|
|
81
125
|
if (!originalRoot) {
|
|
82
|
-
const originalParentCl = context.runtime.
|
|
126
|
+
const originalParentCl = (0, commons_1.getParentFromHierarchy)(context.runtime.package.hierarchy, packageReplacement.originalDevclass);
|
|
83
127
|
if (originalParentCl) {
|
|
84
128
|
parentcl = context.rawInput.installData.installDevclass.replacements.find(o => o.originalDevclass === originalParentCl).installDevclass;
|
|
85
129
|
}
|
|
@@ -87,11 +131,12 @@ exports.generateDevclass = {
|
|
|
87
131
|
aDummyTdevc.push({
|
|
88
132
|
devclass: packageReplacement.installDevclass,
|
|
89
133
|
parentcl: parentcl,
|
|
90
|
-
dlvunit: '',
|
|
91
|
-
tpclass: ''
|
|
134
|
+
dlvunit: '', // not used
|
|
135
|
+
tpclass: '' // not used
|
|
92
136
|
});
|
|
93
137
|
}
|
|
94
138
|
const installPackageHierarchy = (0, commons_1.getPackageHierarchy)(aDummyTdevc);
|
|
139
|
+
//clear all parentcl, except for root
|
|
95
140
|
if (!context.runtime.stopWarningShown) {
|
|
96
141
|
context.runtime.stopWarningShown = true;
|
|
97
142
|
(0, stopWarning_1.stopWarning)('install');
|
|
@@ -102,11 +147,12 @@ exports.generateDevclass = {
|
|
|
102
147
|
yield systemConnector_1.SystemConnector.clearPackageSuperpackage(packageReplacement.installDevclass);
|
|
103
148
|
}
|
|
104
149
|
}
|
|
150
|
+
//add parentcl
|
|
105
151
|
for (const packageReplacement of context.rawInput.installData.installDevclass.replacements) {
|
|
106
152
|
const installRoot = installPackageHierarchy.devclass === packageReplacement.installDevclass;
|
|
107
|
-
const originalParentCl = context.runtime.
|
|
153
|
+
const originalParentCl = (0, commons_1.getParentFromHierarchy)(context.runtime.package.hierarchy, packageReplacement.originalDevclass);
|
|
108
154
|
if (originalParentCl) {
|
|
109
|
-
const installParentCl = (
|
|
155
|
+
const installParentCl = (_c = context.rawInput.installData.installDevclass.replacements.find(o => o.originalDevclass === originalParentCl)) === null || _c === void 0 ? void 0 : _c.installDevclass;
|
|
110
156
|
if (installParentCl) {
|
|
111
157
|
if (!installRoot) {
|
|
112
158
|
yield systemConnector_1.SystemConnector.setPackageSuperpackage(packageReplacement.installDevclass, installParentCl);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Step } from "@simonegaffurini/sammarksworkflow";
|
|
2
|
+
import { InstallWorkflowContext } from ".";
|
|
3
|
+
/**
|
|
4
|
+
* Workflow step that creates the landscape transport used to carry installed changes onward.
|
|
5
|
+
*
|
|
6
|
+
* 1- generate landscape transport
|
|
7
|
+
*
|
|
8
|
+
* 2- add sap packages
|
|
9
|
+
*
|
|
10
|
+
* 3- add workbench objects
|
|
11
|
+
*
|
|
12
|
+
* 4- add namespace (if generated)
|
|
13
|
+
*
|
|
14
|
+
* 5- add translations (if imported)
|
|
15
|
+
*
|
|
16
|
+
* 6- add customizing (if imported)
|
|
17
|
+
*
|
|
18
|
+
* 7- add comments and documentation
|
|
19
|
+
*
|
|
20
|
+
* 8- lock objects
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
export declare const generateLandscapeTransport: Step<InstallWorkflowContext>;
|
|
@@ -0,0 +1,136 @@
|
|
|
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.generateLandscapeTransport = void 0;
|
|
13
|
+
const trm_commons_1 = require("trm-commons");
|
|
14
|
+
const transport_1 = require("../../transport");
|
|
15
|
+
const manifest_1 = require("../../manifest");
|
|
16
|
+
const systemConnector_1 = require("../../systemConnector");
|
|
17
|
+
const utils_1 = require("../commons/utils");
|
|
18
|
+
/**
|
|
19
|
+
* Workflow step that creates the landscape transport used to carry installed changes onward.
|
|
20
|
+
*
|
|
21
|
+
* 1- generate landscape transport
|
|
22
|
+
*
|
|
23
|
+
* 2- add sap packages
|
|
24
|
+
*
|
|
25
|
+
* 3- add workbench objects
|
|
26
|
+
*
|
|
27
|
+
* 4- add namespace (if generated)
|
|
28
|
+
*
|
|
29
|
+
* 5- add translations (if imported)
|
|
30
|
+
*
|
|
31
|
+
* 6- add customizing (if imported)
|
|
32
|
+
*
|
|
33
|
+
* 7- add comments and documentation
|
|
34
|
+
*
|
|
35
|
+
* 8- lock objects
|
|
36
|
+
*
|
|
37
|
+
*/
|
|
38
|
+
exports.generateLandscapeTransport = {
|
|
39
|
+
name: 'generate-landscape-transport',
|
|
40
|
+
filter: (context) => __awaiter(void 0, void 0, void 0, function* () {
|
|
41
|
+
if (context.runtime.namespace === '$') {
|
|
42
|
+
trm_commons_1.Logger.log(`Skipping install transport generation (package is temporary)`, true);
|
|
43
|
+
return false;
|
|
44
|
+
}
|
|
45
|
+
else if (!context.rawInput.installData.landscapeTransport.targetSystem) {
|
|
46
|
+
trm_commons_1.Logger.log(`Skipping install transport generation (system has no transport targets)`, true);
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
return true;
|
|
51
|
+
}
|
|
52
|
+
}),
|
|
53
|
+
run: (context) => __awaiter(void 0, void 0, void 0, function* () {
|
|
54
|
+
//1- generate landscape transport
|
|
55
|
+
trm_commons_1.Logger.loading(`Generating landscape transport...`);
|
|
56
|
+
context.output.transport = yield transport_1.Transport.createWb({
|
|
57
|
+
text: `@X1@TRM ${context.runtime.package.data.manifest.name} ${context.runtime.package.data.manifest.version}`,
|
|
58
|
+
target: context.rawInput.installData.landscapeTransport.targetSystem
|
|
59
|
+
});
|
|
60
|
+
//2- add sap packages
|
|
61
|
+
trm_commons_1.Logger.loading(`Locking transport...`);
|
|
62
|
+
if (context.rawInput.installData.installDevclass.keepOriginal) {
|
|
63
|
+
trm_commons_1.Logger.loading(`Including objects from DEVC transport...`, true);
|
|
64
|
+
yield context.output.transport.addObjectsFromTransport(context.runtime.transports.devc.instance.trkorr);
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
trm_commons_1.Logger.loading(`Adding package replacements...`, true);
|
|
68
|
+
yield context.output.transport.addObjects(context.rawInput.installData.installDevclass.replacements.map(o => {
|
|
69
|
+
return {
|
|
70
|
+
pgmid: 'R3TR',
|
|
71
|
+
object: 'DEVC',
|
|
72
|
+
objName: o.installDevclass
|
|
73
|
+
};
|
|
74
|
+
}), true);
|
|
75
|
+
}
|
|
76
|
+
//3- add workbench objects
|
|
77
|
+
trm_commons_1.Logger.loading(`Including objects from TADIR transport...`, true);
|
|
78
|
+
yield context.output.transport.addObjectsFromTransport(context.runtime.transports.tadir.instance.trkorr);
|
|
79
|
+
//4- add namespace (if generated)
|
|
80
|
+
//revert namespace is used as the soruce of an actual namespace that was generated
|
|
81
|
+
//using context.runtime.namespace would be wrong because it's the package namespace, but it doesn't necessarily mean it was generated
|
|
82
|
+
//check addNamespace step for clarification
|
|
83
|
+
if (context.revert.namespace) {
|
|
84
|
+
trm_commons_1.Logger.loading(`Checking namespace ${context.revert.namespace} lock...`, true);
|
|
85
|
+
const nspcLock = yield systemConnector_1.SystemConnector.getObjectsLocks([{
|
|
86
|
+
PGMID: 'R3TR',
|
|
87
|
+
OBJECT: 'NSPC',
|
|
88
|
+
OBJ_NAME: context.revert.namespace
|
|
89
|
+
}]);
|
|
90
|
+
if (nspcLock.length === 0) {
|
|
91
|
+
trm_commons_1.Logger.loading(`Adding namespace ${context.revert.namespace}...`, true);
|
|
92
|
+
yield context.output.transport.addObjects([{
|
|
93
|
+
pgmid: 'R3TR',
|
|
94
|
+
object: 'NSPC',
|
|
95
|
+
objName: context.revert.namespace
|
|
96
|
+
}], true);
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
const lockTransports = [...new Set(nspcLock.map(o => o.trkorr))].join(', ');
|
|
100
|
+
trm_commons_1.Logger.warning(`Namespace ${context.revert.namespace} is locked in transport ${lockTransports} and won't be included in the landscape transport.`, { important: true });
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
//5- add translations (if imported)
|
|
104
|
+
if (context.runtime.transports.lang) {
|
|
105
|
+
trm_commons_1.Logger.loading(`Including objects from LANG transport...`, true);
|
|
106
|
+
yield context.output.transport.addObjectsFromTransport(context.runtime.transports.lang.instance.trkorr);
|
|
107
|
+
}
|
|
108
|
+
//6- add customizing (if imported)
|
|
109
|
+
trm_commons_1.Logger.loading(`Including objects from ${context.runtime.transports.cust.length} CUST transports...`, true);
|
|
110
|
+
for (const cust of context.runtime.transports.cust) {
|
|
111
|
+
yield context.output.transport.addObjectsFromTransport(cust.instance.trkorr);
|
|
112
|
+
}
|
|
113
|
+
//7- add comments and documentation
|
|
114
|
+
yield context.output.transport.removeComments(); //start clean without TRM comments
|
|
115
|
+
yield context.output.transport.addComment(`name=${context.runtime.package.data.manifest.name}`);
|
|
116
|
+
yield context.output.transport.addComment(`version=${context.runtime.package.data.manifest.version}`);
|
|
117
|
+
//if previous package was temporary, don't add deletion entries
|
|
118
|
+
if ((0, utils_1.isDeletionForwardable)(context)) {
|
|
119
|
+
//avoiding the transport attribute and CTS dependency (requires a CTS project...)
|
|
120
|
+
//this is the easy solution
|
|
121
|
+
//for a clean upgrade, first deletion transport then landscape transport should be imported
|
|
122
|
+
yield context.output.transport.addComment(`upgrade=${context.revert.dele.trkorr}`);
|
|
123
|
+
}
|
|
124
|
+
yield context.output.transport.setDocumentation(new manifest_1.Manifest(context.runtime.package.data.manifest).getAbapXml());
|
|
125
|
+
//8- lock objects
|
|
126
|
+
//what is lockable gets locked here
|
|
127
|
+
//all workbench should be lockable here
|
|
128
|
+
yield context.output.transport.lock();
|
|
129
|
+
}),
|
|
130
|
+
revert: (context) => __awaiter(void 0, void 0, void 0, function* () {
|
|
131
|
+
if (context.output.transport && (yield context.output.transport.canBeDeleted())) {
|
|
132
|
+
yield context.output.transport.delete();
|
|
133
|
+
context.output.transport = undefined;
|
|
134
|
+
}
|
|
135
|
+
})
|
|
136
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Step } from "@simonegaffurini/sammarksworkflow";
|
|
2
|
+
import { InstallWorkflowContext } from ".";
|
|
3
|
+
export { deleteTemporaryCleanupPackages } from "../commons/utils";
|
|
4
|
+
/**
|
|
5
|
+
* Whether an upgrade keeps the customizing of the installed release: customizing of the incoming
|
|
6
|
+
* release is skipped (noCust) or one of its transports was not imported. Deleting the installed
|
|
7
|
+
* rows would then leave them missing.
|
|
8
|
+
*/
|
|
9
|
+
export declare function keepsInstalledCustomizing(context: InstallWorkflowContext): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Workflow step that creates a transport for objects removed by an upgrade.
|
|
12
|
+
* It's necessary when:
|
|
13
|
+
* - upgrading/downgrading a package: to ensure old entries are cleaned up
|
|
14
|
+
* - sap packages were changes after upgrade/downgrade: to ensure empty packages are cleaned up
|
|
15
|
+
* For these reasons, it's not generated on first install.
|
|
16
|
+
*
|
|
17
|
+
* The cleanup itself is shared with the uninstall action, which removes the installed
|
|
18
|
+
* release without an incoming one.
|
|
19
|
+
*/
|
|
20
|
+
export declare const generateUpdateTransport: Step<InstallWorkflowContext>;
|
|
@@ -0,0 +1,122 @@
|
|
|
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.generateUpdateTransport = exports.deleteTemporaryCleanupPackages = void 0;
|
|
13
|
+
exports.keepsInstalledCustomizing = keepsInstalledCustomizing;
|
|
14
|
+
const trm_commons_1 = require("trm-commons");
|
|
15
|
+
const stopWarning_1 = require("../stopWarning");
|
|
16
|
+
const transport_1 = require("../../transport");
|
|
17
|
+
const systemConnector_1 = require("../../systemConnector");
|
|
18
|
+
const utils_1 = require("../commons/utils");
|
|
19
|
+
var utils_2 = require("../commons/utils");
|
|
20
|
+
Object.defineProperty(exports, "deleteTemporaryCleanupPackages", { enumerable: true, get: function () { return utils_2.deleteTemporaryCleanupPackages; } });
|
|
21
|
+
function flattenDevclasses(pkg) {
|
|
22
|
+
return [pkg.devclass, ...pkg.sub.flatMap(flattenDevclasses)];
|
|
23
|
+
}
|
|
24
|
+
/** Table content of the customizing transports the upgrade imports, from their transport entries. */
|
|
25
|
+
function incomingCustomizingRows(context) {
|
|
26
|
+
var _a;
|
|
27
|
+
return (((_a = context.runtime.transports) === null || _a === void 0 ? void 0 : _a.cust) || []).flatMap(cust => {
|
|
28
|
+
var _a;
|
|
29
|
+
const entries = ((_a = cust.binaries) === null || _a === void 0 ? void 0 : _a.entries) || {};
|
|
30
|
+
// Registry entries are camel-cased: E071K becomes e071K.
|
|
31
|
+
const keys = (entries.e071K || entries.e071k || []).map((key) => ({
|
|
32
|
+
table: (key.objname || key.mastername || '').trim(),
|
|
33
|
+
tabkey: (key.tabkey || '').trim()
|
|
34
|
+
}));
|
|
35
|
+
const wholeTables = (entries.e071 || [])
|
|
36
|
+
.filter((o) => (o.object || '').trim().toUpperCase() === 'TABU' && (o.objfunc || '').trim().toUpperCase() !== 'K')
|
|
37
|
+
.map((o) => ({ table: (o.objName || '').trim() }));
|
|
38
|
+
return [...keys, ...wholeTables];
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Whether an upgrade keeps the customizing of the installed release: customizing of the incoming
|
|
43
|
+
* release is skipped (noCust) or one of its transports was not imported. Deleting the installed
|
|
44
|
+
* rows would then leave them missing.
|
|
45
|
+
*/
|
|
46
|
+
function keepsInstalledCustomizing(context) {
|
|
47
|
+
var _a, _b;
|
|
48
|
+
return !!((_b = (_a = context.rawInput.installData) === null || _a === void 0 ? void 0 : _a.import) === null || _b === void 0 ? void 0 : _b.noCust) || (context.runtime.skippedCust || []).length > 0;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Workflow step that creates a transport for objects removed by an upgrade.
|
|
52
|
+
* It's necessary when:
|
|
53
|
+
* - upgrading/downgrading a package: to ensure old entries are cleaned up
|
|
54
|
+
* - sap packages were changes after upgrade/downgrade: to ensure empty packages are cleaned up
|
|
55
|
+
* For these reasons, it's not generated on first install.
|
|
56
|
+
*
|
|
57
|
+
* The cleanup itself is shared with the uninstall action, which removes the installed
|
|
58
|
+
* release without an incoming one.
|
|
59
|
+
*/
|
|
60
|
+
exports.generateUpdateTransport = {
|
|
61
|
+
name: 'generate-update-transport',
|
|
62
|
+
filter: (context) => __awaiter(void 0, void 0, void 0, function* () {
|
|
63
|
+
//a local (.trm) upgrade generates its deletion transport through the registry the artifact was published to
|
|
64
|
+
if (context.runtime.update) {
|
|
65
|
+
return true;
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
trm_commons_1.Logger.log(`Skipping generate deletion transport (first install?)`, true);
|
|
69
|
+
return false;
|
|
70
|
+
}
|
|
71
|
+
}),
|
|
72
|
+
run: (context) => __awaiter(void 0, void 0, void 0, function* () {
|
|
73
|
+
var _a, _b, _c, _d;
|
|
74
|
+
if (!context.runtime.stopWarningShown) {
|
|
75
|
+
context.runtime.stopWarningShown = true;
|
|
76
|
+
(0, stopWarning_1.stopWarning)('install');
|
|
77
|
+
}
|
|
78
|
+
// The cleanup deletes and re-imports the root package: read it now, so the import can put it back
|
|
79
|
+
// under the superpackage it has on this system (prepare-devc reads it after the cleanup).
|
|
80
|
+
if (((_b = (_a = context.rawInput.installData) === null || _a === void 0 ? void 0 : _a.installDevclass) === null || _b === void 0 ? void 0 : _b.keepOriginal) && !context.runtime.rootDevclassBeforeImport) {
|
|
81
|
+
context.runtime.rootDevclassBeforeImport = yield systemConnector_1.SystemConnector.getDevclass(context.runtime.package.hierarchy.devclass);
|
|
82
|
+
}
|
|
83
|
+
// Read the target lazily: a failure reading the previous release must still be tracked first.
|
|
84
|
+
const installDevclass = (_c = context.rawInput.installData) === null || _c === void 0 ? void 0 : _c.installDevclass;
|
|
85
|
+
const importData = (_d = context.rawInput.installData) === null || _d === void 0 ? void 0 : _d.import;
|
|
86
|
+
const keepCustomizing = keepsInstalledCustomizing(context);
|
|
87
|
+
if (keepCustomizing) {
|
|
88
|
+
const skipped = context.runtime.skippedCust || [];
|
|
89
|
+
trm_commons_1.Logger.warning(`Customizing transports are skipped${skipped.length > 0 ? ` (${skipped.join(', ')})` : ''}: the customizing of the installed release is kept.`, { important: true });
|
|
90
|
+
}
|
|
91
|
+
yield (0, utils_1.cleanupInstalledPackage)(context, {
|
|
92
|
+
get incomingObjects() {
|
|
93
|
+
return context.runtime.transports.tadir.binaries.entries.tadir || [];
|
|
94
|
+
},
|
|
95
|
+
get keptDevclasses() {
|
|
96
|
+
return installDevclass.keepOriginal
|
|
97
|
+
? flattenDevclasses(context.runtime.package.hierarchy)
|
|
98
|
+
: installDevclass.replacements.map(replacement => replacement.installDevclass);
|
|
99
|
+
},
|
|
100
|
+
prefix: `(${transport_1.Transport.getTransportIcon()} Upgrade cleanup) `,
|
|
101
|
+
actionName: 'Update',
|
|
102
|
+
requireDeletion: false,
|
|
103
|
+
// Old customizing is deleted before the new customizing is imported: rows the new
|
|
104
|
+
// release still ships are written again. Without that import, nothing would restore them.
|
|
105
|
+
keepCustomizing,
|
|
106
|
+
get incomingCustomizing() {
|
|
107
|
+
return incomingCustomizingRows(context);
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
}),
|
|
111
|
+
revert: (context) => __awaiter(void 0, void 0, void 0, function* () {
|
|
112
|
+
// Rollback of the imported objects ran first: when it failed, they are still on the system
|
|
113
|
+
// and the previous release must not be restored over them.
|
|
114
|
+
const restore = !(context.revert.cleanupImported && !context.revert.cleanupSucceeded);
|
|
115
|
+
yield (0, utils_1.revertInstalledPackageCleanup)(context, restore);
|
|
116
|
+
// Objects might still be assigned to a staging package if restoring failed or was skipped:
|
|
117
|
+
// only delete staging packages after a complete restore.
|
|
118
|
+
if (restore) {
|
|
119
|
+
yield (0, utils_1.deleteCleanupStagingPackages)(context);
|
|
120
|
+
}
|
|
121
|
+
})
|
|
122
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Step } from "@simonegaffurini/sammarksworkflow";
|
|
2
|
+
import { InstallWorkflowContext } from ".";
|
|
3
|
+
export declare function deleteImportedEntries(context: InstallWorkflowContext): Promise<void>;
|
|
4
|
+
/**
|
|
5
|
+
* Workflow step that imports every prepared transport in one TMS batch.
|
|
6
|
+
*
|
|
7
|
+
* 1- collect prepared transport instances
|
|
8
|
+
*
|
|
9
|
+
* 2- back up imported objects already on the system
|
|
10
|
+
*
|
|
11
|
+
* 3- resolve the transport layer of the imported SAP packages
|
|
12
|
+
*
|
|
13
|
+
* 4- import transports in batch
|
|
14
|
+
*
|
|
15
|
+
* 5- reconnect when system is not stateless
|
|
16
|
+
*
|
|
17
|
+
* 6- finalize SAP Packages import
|
|
18
|
+
*
|
|
19
|
+
* 7- finalize workbench import
|
|
20
|
+
*
|
|
21
|
+
*/
|
|
22
|
+
export declare const importBatch: Step<InstallWorkflowContext>;
|
|
Binary file
|