trm-core 9.10.6 → 10.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -0
- package/changelog.txt +11 -0
- package/dist/actions/cg3y/download.js +34 -4
- package/dist/actions/cg3y/index.d.ts +23 -0
- package/dist/actions/cg3y/index.js +13 -10
- package/dist/actions/cg3z/index.d.ts +67 -3
- package/dist/actions/cg3z/index.js +25 -14
- package/dist/actions/cg3z/upload.d.ts +20 -0
- package/dist/actions/cg3z/upload.js +165 -36
- package/dist/actions/checkEngines/analyze.d.ts +11 -0
- package/dist/actions/checkEngines/analyze.js +294 -0
- package/dist/actions/checkEngines/index.d.ts +87 -0
- package/dist/actions/checkEngines/index.js +38 -0
- package/dist/actions/checkEngines/init.d.ts +11 -0
- package/dist/actions/checkEngines/init.js +45 -0
- package/dist/actions/checkPackageDependencies/analyze.d.ts +10 -0
- package/dist/actions/checkPackageDependencies/analyze.js +37 -39
- package/dist/actions/checkPackageDependencies/index.d.ts +56 -0
- package/dist/actions/checkPackageDependencies/index.js +13 -10
- package/dist/actions/checkPackageDependencies/init.d.ts +8 -0
- package/dist/actions/checkPackageDependencies/init.js +24 -2
- package/dist/actions/checkSapEntries/analyze.d.ts +12 -0
- package/dist/actions/checkSapEntries/analyze.js +63 -47
- package/dist/actions/checkSapEntries/index.d.ts +35 -0
- package/dist/actions/checkSapEntries/index.js +12 -10
- package/dist/actions/checkSapEntries/init.d.ts +8 -0
- package/dist/actions/checkSapEntries/init.js +10 -2
- package/dist/actions/commons/IActionContext.d.ts +10 -0
- package/dist/actions/commons/checkServerAuth.d.ts +7 -0
- package/dist/actions/commons/checkServerAuth.js +10 -5
- package/dist/actions/commons/index.d.ts +1 -1
- package/dist/actions/commons/index.js +1 -1
- package/dist/actions/commons/prompts/index.d.ts +1 -0
- package/dist/actions/commons/prompts/index.js +1 -0
- package/dist/actions/commons/prompts/setLandscapeTarget.d.ts +14 -0
- package/dist/actions/commons/prompts/setLandscapeTarget.js +40 -0
- package/dist/actions/commons/prompts/setTransportTarget.d.ts +15 -0
- package/dist/actions/commons/prompts/setTransportTarget.js +20 -2
- package/dist/actions/commons/setSystemPackages.d.ts +7 -0
- package/dist/actions/commons/setSystemPackages.js +12 -2
- package/dist/actions/commons/utils/actionLocks.d.ts +32 -0
- package/dist/actions/commons/utils/actionLocks.js +135 -0
- package/dist/actions/commons/utils/dirtyEntries.d.ts +12 -0
- package/dist/actions/commons/utils/dirtyEntries.js +54 -0
- package/dist/actions/commons/utils/index.d.ts +10 -0
- package/dist/actions/commons/utils/index.js +26 -0
- package/dist/actions/commons/utils/installRegistry.d.ts +18 -0
- package/dist/actions/commons/utils/installRegistry.js +46 -0
- package/dist/actions/commons/utils/installedDependency.d.ts +15 -0
- package/dist/actions/commons/utils/installedDependency.js +30 -0
- package/dist/actions/commons/utils/owningInstallation.d.ts +6 -0
- package/dist/actions/commons/utils/owningInstallation.js +47 -0
- package/dist/actions/commons/utils/packageCleanup.d.ts +168 -0
- package/dist/actions/commons/utils/packageCleanup.js +1017 -0
- package/dist/actions/commons/utils/releaseDeletionTransport.d.ts +5 -0
- package/dist/actions/commons/utils/releaseDeletionTransport.js +67 -0
- package/dist/actions/commons/utils/restoreTransport.d.ts +6 -0
- package/dist/actions/commons/utils/restoreTransport.js +50 -0
- package/dist/actions/commons/utils/retainedWorkflow.d.ts +6 -0
- package/dist/actions/commons/utils/retainedWorkflow.js +49 -0
- package/dist/actions/commons/utils/withScopedPrefix.d.ts +5 -0
- package/dist/actions/commons/utils/withScopedPrefix.js +32 -0
- package/dist/actions/commons/workflowCallbacks.d.ts +21 -0
- package/dist/actions/commons/workflowCallbacks.js +157 -0
- package/dist/actions/index.d.ts +3 -0
- package/dist/actions/index.js +5 -0
- package/dist/actions/install/addNamespace.d.ts +18 -0
- package/dist/actions/install/addNamespace.js +121 -51
- package/dist/actions/install/checkDependants.d.ts +15 -0
- package/dist/actions/install/checkDependants.js +74 -0
- package/dist/actions/install/checkDependencies.d.ts +11 -0
- package/dist/actions/install/checkDependencies.js +32 -13
- package/dist/actions/install/checkDependencyCycles.d.ts +17 -0
- package/dist/actions/install/checkDependencyCycles.js +105 -0
- package/dist/actions/install/checkEngines.d.ts +11 -0
- package/dist/actions/install/checkEngines.js +100 -0
- package/dist/actions/install/checkInstallDevclass.d.ts +24 -0
- package/dist/actions/install/checkInstallDevclass.js +110 -0
- package/dist/actions/install/checkSapEntries.d.ts +9 -0
- package/dist/actions/install/checkSapEntries.js +20 -12
- package/dist/actions/install/checkTransports.d.ts +34 -0
- package/dist/actions/install/checkTransports.js +329 -170
- package/dist/actions/install/cleanupCheckpoint.d.ts +11 -0
- package/dist/actions/install/cleanupCheckpoint.js +62 -0
- package/dist/actions/install/defaultTransportLayer.d.ts +5 -0
- package/dist/actions/install/defaultTransportLayer.js +36 -0
- package/dist/actions/install/executePostActivities.d.ts +6 -0
- package/dist/actions/install/executePostActivities.js +28 -38
- package/dist/actions/install/generateDevclass.d.ts +10 -0
- package/dist/actions/install/generateDevclass.js +66 -20
- package/dist/actions/install/generateLandscapeTransport.d.ts +23 -0
- package/dist/actions/install/generateLandscapeTransport.js +136 -0
- package/dist/actions/install/generateUpdateTransport.d.ts +20 -0
- package/dist/actions/install/generateUpdateTransport.js +122 -0
- package/dist/actions/install/importBatch.d.ts +22 -0
- package/dist/actions/install/importBatch.js +0 -0
- package/dist/actions/install/index.d.ts +273 -44
- package/dist/actions/install/index.js +139 -59
- package/dist/actions/install/init.d.ts +14 -0
- package/dist/actions/install/init.js +215 -108
- package/dist/actions/install/installDependencies.d.ts +14 -0
- package/dist/actions/install/installDependencies.js +122 -45
- package/dist/actions/install/lockResources.d.ts +8 -0
- package/dist/actions/install/lockResources.js +100 -0
- package/dist/actions/install/prepareCust.d.ts +13 -0
- package/dist/actions/install/prepareCust.js +138 -0
- package/dist/actions/install/prepareDevc.d.ts +15 -0
- package/dist/actions/install/prepareDevc.js +113 -0
- package/dist/actions/install/prepareLang.d.ts +13 -0
- package/dist/actions/install/prepareLang.js +110 -0
- package/dist/actions/install/prepareTadir.d.ts +13 -0
- package/dist/actions/install/prepareTadir.js +95 -0
- package/dist/actions/install/releaseLandscapeTransport.d.ts +11 -0
- package/dist/actions/install/releaseLandscapeTransport.js +79 -0
- package/dist/actions/install/setInstallDevclass.d.ts +10 -0
- package/dist/actions/install/setInstallDevclass.js +140 -54
- package/dist/actions/install/updatePackageData.d.ts +9 -0
- package/dist/actions/install/updatePackageData.js +117 -13
- package/dist/actions/installDependency/checkInstalledRelease.d.ts +13 -0
- package/dist/actions/installDependency/checkInstalledRelease.js +50 -0
- package/dist/actions/installDependency/confirmDowngrade.d.ts +11 -0
- package/dist/actions/installDependency/confirmDowngrade.js +53 -0
- package/dist/actions/installDependency/findInstallRelease.d.ts +24 -0
- package/dist/actions/installDependency/findInstallRelease.js +42 -19
- package/dist/actions/installDependency/index.d.ts +64 -3
- package/dist/actions/installDependency/index.js +30 -13
- package/dist/actions/installDependency/init.d.ts +14 -0
- package/dist/actions/installDependency/init.js +24 -3
- package/dist/actions/installDependency/installRelease.d.ts +6 -0
- package/dist/actions/installDependency/installRelease.js +22 -12
- package/dist/actions/publish/enginesUi.d.ts +53 -0
- package/dist/actions/publish/enginesUi.js +289 -0
- package/dist/actions/publish/findDependencies.d.ts +19 -0
- package/dist/actions/publish/findDependencies.js +72 -37
- package/dist/actions/publish/generateCustTransport.d.ts +6 -0
- package/dist/actions/publish/generateCustTransport.js +42 -19
- package/dist/actions/publish/generateDevcTransport.d.ts +6 -0
- package/dist/actions/publish/generateDevcTransport.js +16 -18
- package/dist/actions/publish/generateLangTransport.d.ts +6 -0
- package/dist/actions/publish/generateLangTransport.js +20 -23
- package/dist/actions/publish/generateTadirTransport.d.ts +6 -0
- package/dist/actions/publish/generateTadirTransport.js +18 -17
- package/dist/actions/publish/getSystemEngines.d.ts +27 -0
- package/dist/actions/publish/getSystemEngines.js +112 -0
- package/dist/actions/publish/index.d.ts +162 -37
- package/dist/actions/publish/index.js +51 -34
- package/dist/actions/publish/init.d.ts +28 -0
- package/dist/actions/publish/init.js +304 -120
- package/dist/actions/publish/lockResources.d.ts +4 -0
- package/dist/actions/{install/refreshTmsTxt.js → publish/lockResources.js} +14 -17
- package/dist/actions/publish/publishToRegistry.d.ts +8 -0
- package/dist/actions/publish/publishToRegistry.js +18 -8
- package/dist/actions/publish/releaseTransports.d.ts +6 -0
- package/dist/actions/publish/releaseTransports.js +48 -20
- package/dist/actions/publish/setCustomizingTransports.d.ts +6 -0
- package/dist/actions/publish/setCustomizingTransports.js +227 -101
- package/dist/actions/publish/setManifestValues.d.ts +22 -0
- package/dist/actions/publish/setManifestValues.js +455 -119
- package/dist/actions/publish/setOptionalPublishData.d.ts +11 -0
- package/dist/actions/publish/setOptionalPublishData.js +133 -0
- package/dist/actions/publish/updatePackageData.d.ts +8 -0
- package/dist/actions/publish/updatePackageData.js +20 -7
- package/dist/actions/stopWarning.d.ts +5 -0
- package/dist/actions/stopWarning.js +5 -0
- package/dist/actions/uninstall/checkDependants.d.ts +7 -0
- package/dist/actions/uninstall/checkDependants.js +55 -0
- package/dist/actions/uninstall/forwardDeletionTransport.d.ts +10 -0
- package/dist/actions/uninstall/forwardDeletionTransport.js +51 -0
- package/dist/actions/uninstall/generateDeletionTransport.d.ts +10 -0
- package/dist/actions/uninstall/generateDeletionTransport.js +45 -0
- package/dist/actions/uninstall/index.d.ts +153 -0
- package/dist/actions/uninstall/index.js +141 -0
- package/dist/actions/uninstall/init.d.ts +17 -0
- package/dist/actions/uninstall/init.js +146 -0
- package/dist/actions/uninstall/lockResources.d.ts +4 -0
- package/dist/actions/{publish/setTransportTarget.js → uninstall/lockResources.js} +16 -7
- package/dist/actions/uninstall/removePackageData.d.ts +9 -0
- package/dist/actions/uninstall/removePackageData.js +64 -0
- package/dist/actions/uninstall/uninstallNestedPackages.d.ts +26 -0
- package/dist/actions/uninstall/uninstallNestedPackages.js +174 -0
- package/dist/client/ClientError.d.ts +3 -1
- package/dist/client/ClientError.js +2 -1
- package/dist/client/RESTClient.d.ts +18 -5
- package/dist/client/RESTClient.js +194 -52
- package/dist/client/RESTClientError.d.ts +1 -2
- package/dist/client/RESTClientError.js +3 -2
- package/dist/client/RFCClient.d.ts +28 -7
- package/dist/client/RFCClient.js +325 -77
- package/dist/client/RFCClientError.d.ts +1 -1
- package/dist/client/RFCClientError.js +2 -2
- package/dist/client/TransportEntries.d.ts +8 -0
- package/dist/client/TransportEntries.js +2 -0
- package/dist/client/components/BORM_ID.d.ts +1 -0
- package/dist/client/components/BORM_ID.js +2 -0
- package/dist/client/components/BORM_NAME.d.ts +1 -0
- package/dist/client/components/BORM_NAME.js +2 -0
- package/dist/client/components/BORM_NAMEL.d.ts +1 -0
- package/dist/client/components/BORM_NAMEL.js +2 -0
- package/dist/client/components/BORM_VEND.d.ts +1 -0
- package/dist/client/components/BORM_VEND.js +2 -0
- package/dist/client/components/BORM_VERS.d.ts +1 -0
- package/dist/client/components/BORM_VERS.js +2 -0
- package/dist/client/components/CWBNTNUMM.d.ts +1 -0
- package/dist/client/components/CWBNTNUMM.js +2 -0
- package/dist/client/components/CWBNTSTAT.d.ts +1 -0
- package/dist/client/components/CWBNTSTAT.js +2 -0
- package/dist/client/components/CWBNTVERS.d.ts +1 -0
- package/dist/client/components/CWBNTVERS.js +2 -0
- package/dist/client/components/CWBPRSTAT.d.ts +1 -0
- package/dist/client/components/CWBPRSTAT.js +2 -0
- package/dist/client/components/INSTSTATE.d.ts +1 -0
- package/dist/client/components/INSTSTATE.js +2 -0
- package/dist/client/components/RELC_TYPE.d.ts +1 -0
- package/dist/client/components/RELC_TYPE.js +2 -0
- package/dist/client/components/SAPPATCHLV.d.ts +1 -0
- package/dist/client/components/SAPPATCHLV.js +2 -0
- package/dist/client/components/SAPRELEASE.d.ts +1 -0
- package/dist/client/components/SAPRELEASE.js +2 -0
- package/dist/client/components/SYSYSID.d.ts +1 -0
- package/dist/client/components/SYSYSID.js +2 -0
- package/dist/client/components/ZTRM_INSTALLTR_TYPE.d.ts +1 -0
- package/dist/client/components/ZTRM_INSTALLTR_TYPE.js +2 -0
- package/dist/client/components/index.d.ts +15 -0
- package/dist/client/components/index.js +15 -0
- package/dist/client/index.d.ts +1 -0
- package/dist/client/index.js +1 -0
- package/dist/client/messageLog.d.ts +7 -0
- package/dist/client/messageLog.js +21 -0
- package/dist/client/struct/ActionLockKey.d.ts +6 -0
- package/dist/client/struct/ActionLockKey.js +2 -0
- package/dist/client/struct/CVERS.d.ts +7 -0
- package/dist/client/struct/CVERS.js +2 -0
- package/dist/client/struct/CWBNTCUST.d.ts +6 -0
- package/dist/client/struct/CWBNTCUST.js +2 -0
- package/dist/client/struct/CWBNTHEAD.d.ts +5 -0
- package/dist/client/struct/CWBNTHEAD.js +2 -0
- package/dist/client/struct/E070.d.ts +2 -1
- package/dist/client/struct/E071K.d.ts +9 -0
- package/dist/client/struct/E071K.js +2 -0
- package/dist/client/struct/PRDVERS.d.ts +9 -0
- package/dist/client/struct/PRDVERS.js +2 -0
- package/dist/client/struct/SCOMPKDTLN.d.ts +21 -0
- package/dist/client/struct/STMSCALERT.d.ts +21 -0
- package/dist/client/struct/STMSCALERT.js +2 -0
- package/dist/client/struct/STMS_TP_IMPORT.d.ts +14 -0
- package/dist/client/struct/STMS_TP_IMPORT.js +2 -0
- package/dist/client/struct/STMS_TR_REQUEST.d.ts +8 -0
- package/dist/client/struct/STMS_TR_REQUEST.js +2 -0
- package/dist/client/struct/TDEVC.d.ts +38 -0
- package/dist/client/struct/TPLOGPTR.d.ts +13 -0
- package/dist/client/struct/TPLOGPTR.js +2 -0
- package/dist/client/struct/TPSTDOUT.d.ts +3 -0
- package/dist/client/struct/TPSTDOUT.js +2 -0
- package/dist/client/struct/ZTRM_INSTALLTR.d.ts +8 -0
- package/dist/client/struct/ZTRM_INSTALLTR.js +2 -0
- package/dist/client/struct/index.d.ts +12 -0
- package/dist/client/struct/index.js +12 -0
- package/dist/commons/checkCoreTrmDependencies.js +1 -1
- package/dist/commons/getAxiosInstance.js +8 -17
- package/dist/commons/getNodePackage.js +7 -0
- package/dist/commons/getPackageHierarchy.js +2 -0
- package/dist/commons/getPackagesNamespace.d.ts +9 -0
- package/dist/commons/getPackagesNamespace.js +19 -0
- package/dist/commons/index.d.ts +4 -0
- package/dist/commons/index.js +4 -0
- package/dist/commons/packageDataFromTdevc.d.ts +12 -0
- package/dist/commons/packageDataFromTdevc.js +25 -0
- package/dist/commons/resolveCoreVersion.d.ts +10 -0
- package/dist/commons/resolveCoreVersion.js +24 -0
- package/dist/commons/summarizeForLog.d.ts +22 -0
- package/dist/commons/summarizeForLog.js +120 -0
- package/dist/connection/OpenRFCConnect.d.ts +13 -0
- package/dist/connection/OpenRFCConnect.js +23 -0
- package/dist/connection/index.d.ts +1 -0
- package/dist/connection/index.js +17 -0
- package/dist/dependencies/PackageDependencies.d.ts +2 -0
- package/dist/dependencies/PackageDependencies.js +24 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/lockfile/Lockfile.d.ts +23 -1
- package/dist/lockfile/Lockfile.js +45 -9
- package/dist/manifest/Manifest.d.ts +9 -5
- package/dist/manifest/Manifest.js +82 -29
- package/dist/manifest/PostActivity.js +3 -3
- package/dist/manifest/TrmManifest.d.ts +0 -2
- package/dist/manifest/TrmManifestBase.d.ts +2 -0
- package/dist/manifest/TrmManifestEngines.d.ts +64 -0
- package/dist/manifest/TrmManifestEngines.js +2 -0
- package/dist/manifest/engines/index.d.ts +2 -0
- package/dist/manifest/engines/index.js +18 -0
- package/dist/manifest/engines/sapRange.d.ts +38 -0
- package/dist/manifest/engines/sapRange.js +135 -0
- package/dist/manifest/engines/validateEngines.d.ts +44 -0
- package/dist/manifest/engines/validateEngines.js +282 -0
- package/dist/manifest/index.d.ts +3 -0
- package/dist/manifest/index.js +3 -0
- package/dist/manifest/sapEntries.d.ts +14 -0
- package/dist/manifest/sapEntries.js +63 -0
- package/dist/protocol/Protocol.js +7 -0
- package/dist/registry/AbstractRegistry.d.ts +18 -3
- package/dist/registry/FileSystem.d.ts +22 -13
- package/dist/registry/FileSystem.js +69 -18
- package/dist/registry/RegistryDeletionTransportUnauthorizedError.d.ts +4 -0
- package/dist/registry/RegistryDeletionTransportUnauthorizedError.js +12 -0
- package/dist/registry/RegistryDeletionTransportUnavailableError.d.ts +9 -0
- package/dist/registry/RegistryDeletionTransportUnavailableError.js +17 -0
- package/dist/registry/RegistryPackageNotFoundError.d.ts +7 -0
- package/dist/registry/RegistryPackageNotFoundError.js +14 -0
- package/dist/registry/RegistryV2.d.ts +15 -5
- package/dist/registry/RegistryV2.js +308 -48
- package/dist/registry/index.d.ts +4 -0
- package/dist/registry/index.js +4 -0
- package/dist/registry/registryKey.d.ts +7 -0
- package/dist/registry/registryKey.js +21 -0
- package/dist/systemConnector/ActionLock.d.ts +1 -0
- package/dist/systemConnector/ActionLock.js +2 -0
- package/dist/systemConnector/ISystemConnector.d.ts +21 -4
- package/dist/systemConnector/ISystemConnectorBase.d.ts +16 -0
- package/dist/systemConnector/InstallTransport.d.ts +6 -0
- package/dist/systemConnector/InstallTransport.js +2 -0
- package/dist/systemConnector/OpenRFCSystemConnector.d.ts +12 -0
- package/dist/systemConnector/OpenRFCSystemConnector.js +51 -0
- package/dist/systemConnector/RESTSystemConnector.d.ts +22 -7
- package/dist/systemConnector/RESTSystemConnector.js +95 -23
- package/dist/systemConnector/RFCConnection.d.ts +0 -1
- package/dist/systemConnector/RFCSystemConnector.d.ts +25 -7
- package/dist/systemConnector/RFCSystemConnector.js +75 -16
- package/dist/systemConnector/SystemConnector.d.ts +38 -6
- package/dist/systemConnector/SystemConnector.js +138 -12
- package/dist/systemConnector/SystemConnectorBase.d.ts +24 -1
- package/dist/systemConnector/SystemConnectorBase.js +174 -22
- package/dist/systemConnector/index.d.ts +3 -0
- package/dist/systemConnector/index.js +3 -0
- package/dist/transport/E071KOwner.d.ts +10 -0
- package/dist/transport/E071KOwner.js +15 -0
- package/dist/transport/R3transLogParser.d.ts +19 -0
- package/dist/transport/R3transLogParser.js +148 -0
- package/dist/transport/Transport.d.ts +36 -3
- package/dist/transport/Transport.js +304 -138
- package/dist/transport/index.d.ts +2 -0
- package/dist/transport/index.js +2 -0
- package/dist/trmPackage/TransportBinary.d.ts +4 -1
- package/dist/trmPackage/TrmArtifact.d.ts +12 -8
- package/dist/trmPackage/TrmArtifact.js +93 -74
- package/dist/trmPackage/TrmPackage.d.ts +20 -6
- package/dist/trmPackage/TrmPackage.js +27 -1
- package/dist/validators/validateDevclass.js +4 -0
- package/package.json +15 -7
- package/dist/actions/commons/trmServerPa.d.ts +0 -3
- package/dist/actions/commons/trmServerPa.js +0 -40
- package/dist/actions/install/checkAlreadyInstalled.d.ts +0 -3
- package/dist/actions/install/checkAlreadyInstalled.js +0 -71
- package/dist/actions/install/checkObjectTypes.d.ts +0 -3
- package/dist/actions/install/checkObjectTypes.js +0 -50
- package/dist/actions/install/checkObjectsLock.d.ts +0 -3
- package/dist/actions/install/checkObjectsLock.js +0 -52
- package/dist/actions/install/generateInstallTransports.d.ts +0 -3
- package/dist/actions/install/generateInstallTransports.js +0 -128
- package/dist/actions/install/importCustTransport.d.ts +0 -3
- package/dist/actions/install/importCustTransport.js +0 -73
- package/dist/actions/install/importDevcTransport.d.ts +0 -3
- package/dist/actions/install/importDevcTransport.js +0 -93
- package/dist/actions/install/importLangTransport.d.ts +0 -3
- package/dist/actions/install/importLangTransport.js +0 -72
- package/dist/actions/install/importTadirTransport.d.ts +0 -3
- package/dist/actions/install/importTadirTransport.js +0 -83
- package/dist/actions/install/readDevc.d.ts +0 -3
- package/dist/actions/install/readDevc.js +0 -33
- package/dist/actions/install/readTadir.d.ts +0 -3
- package/dist/actions/install/readTadir.js +0 -101
- package/dist/actions/install/refreshTmsTxt.d.ts +0 -3
- package/dist/actions/install/releaseInstallTransport.d.ts +0 -3
- package/dist/actions/install/releaseInstallTransport.js +0 -80
- package/dist/actions/publish/checkAllObjectsReleased.d.ts +0 -3
- package/dist/actions/publish/checkAllObjectsReleased.js +0 -46
- package/dist/actions/publish/getSourceCode.d.ts +0 -3
- package/dist/actions/publish/getSourceCode.js +0 -49
- package/dist/actions/publish/setChangelog.d.ts +0 -3
- package/dist/actions/publish/setChangelog.js +0 -69
- package/dist/actions/publish/setDevclass.d.ts +0 -3
- package/dist/actions/publish/setDevclass.js +0 -74
- package/dist/actions/publish/setReadme.d.ts +0 -3
- package/dist/actions/publish/setReadme.js +0 -52
- package/dist/actions/publish/setTransportTarget.d.ts +0 -3
|
@@ -1,113 +1,342 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Package } from "trm-registry-types";
|
|
2
|
+
import { Lockfile } from "../../lockfile";
|
|
3
|
+
import { AbstractRegistry } from "../../registry";
|
|
2
4
|
import { Transport } from "../../transport";
|
|
3
|
-
import { TransportBinary,
|
|
5
|
+
import { TransportBinary, TrmPackage } from "../../trmPackage";
|
|
4
6
|
import { TrmManifest, TrmManifestDependency } from "../../manifest";
|
|
5
|
-
import { IActionContext } from "..";
|
|
6
|
-
import { DEVCLASS, E071, NAMESPACE, TADIR, TDEVC, TDEVCT } from "../../client";
|
|
7
7
|
import { PackageHierarchy } from "../../commons";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
8
|
+
import { IActionContext } from "../commons";
|
|
9
|
+
import { DEVCLASS, E071, TADIR, TDEVC, TDEVCT, ZTRM_INSTALLDEVC } from "../../client";
|
|
10
|
+
import { InstallTransport, TrmPackageUpdateData } from "../../systemConnector";
|
|
11
|
+
import { ActionLockScope } from "../commons/utils";
|
|
12
|
+
/** Maps a publisher ABAP package to the package that should receive its objects during installation. */
|
|
11
13
|
export type InstallPackageReplacements = {
|
|
14
|
+
/**
|
|
15
|
+
* Original ABAP package name stored in the published artifact.
|
|
16
|
+
*/
|
|
12
17
|
originalDevclass: string;
|
|
18
|
+
/**
|
|
19
|
+
* Target ABAP package name to use on the receiving system.
|
|
20
|
+
*/
|
|
13
21
|
installDevclass: string;
|
|
14
22
|
};
|
|
23
|
+
/** Shared execution settings for package and dependency installation actions. */
|
|
15
24
|
export type InstallActionInputContextData = {
|
|
25
|
+
/**
|
|
26
|
+
* Snapshot of packages installed on the target system. When omitted, the action queries SAP.
|
|
27
|
+
*/
|
|
16
28
|
systemPackages?: TrmPackage[];
|
|
17
|
-
|
|
18
|
-
|
|
29
|
+
/**
|
|
30
|
+
* Disable interactive prompts. Any required choice without an explicit value then causes an error.
|
|
31
|
+
*/
|
|
19
32
|
noInquirer?: boolean;
|
|
20
|
-
|
|
33
|
+
/**
|
|
34
|
+
* Directory in which transport-release logs and temporary files are written.
|
|
35
|
+
*/
|
|
36
|
+
logTemporaryFolder?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Version of trm-core in use, checked against the `trm-core` engine of the package.
|
|
39
|
+
* Supply it when the client resolves trm-core itself; defaults to the version read from trm-core package.json.
|
|
40
|
+
*/
|
|
41
|
+
coreVersion?: string;
|
|
21
42
|
};
|
|
43
|
+
/** Options controlling package validation, transport import, and target package mapping. */
|
|
22
44
|
export type InstallActionInputInstallData = {
|
|
45
|
+
/**
|
|
46
|
+
* Set by an install for the dependency installs it runs: the dependencies the user already
|
|
47
|
+
* confirmed. A dependency install doesn't ask again for these.
|
|
48
|
+
*/
|
|
49
|
+
approvedDependencies?: string[];
|
|
50
|
+
/**
|
|
51
|
+
* Import-related data.
|
|
52
|
+
*/
|
|
23
53
|
import?: {
|
|
54
|
+
/**
|
|
55
|
+
* Skip the optional language transport. When unset, the user is asked (default: import);
|
|
56
|
+
* without prompts (`noInquirer`) the transport is imported.
|
|
57
|
+
*/
|
|
24
58
|
noLang?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Skip all customizing transports. When unset, the user is asked for each transport
|
|
61
|
+
* (default: import); without prompts (`noInquirer`) all of them are imported.
|
|
62
|
+
* On update, the customizing of the installed release is then kept.
|
|
63
|
+
*/
|
|
25
64
|
noCust?: boolean;
|
|
26
|
-
replaceExistingTransports?: boolean;
|
|
27
65
|
};
|
|
66
|
+
/**
|
|
67
|
+
* Optional checks to perform during installation.
|
|
68
|
+
*/
|
|
28
69
|
checks?: {
|
|
70
|
+
/**
|
|
71
|
+
* Lockfile used to pin the release and dependency versions and verify their integrity.
|
|
72
|
+
* The package must be the lockfile root: when `packageData.version` is omitted the root
|
|
73
|
+
* version is installed, and an explicit version, distribution tag, local artifact, registry,
|
|
74
|
+
* or integrity that doesn't match the root aborts the install before any change.
|
|
75
|
+
*/
|
|
29
76
|
lockfile?: Lockfile;
|
|
77
|
+
/**
|
|
78
|
+
* Skip validation of required SAP table entries. Defaults to `false`.
|
|
79
|
+
*/
|
|
30
80
|
noSapEntries?: boolean;
|
|
31
|
-
|
|
81
|
+
/**
|
|
82
|
+
* Skip validation of the manifest engines (SAP components, products, notes, tables). Defaults to `false`.
|
|
83
|
+
*/
|
|
84
|
+
noEngines?: boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Skip package dependency validation and installation. Defaults to `false`.
|
|
87
|
+
*/
|
|
32
88
|
noDependencies?: boolean;
|
|
89
|
+
/**
|
|
90
|
+
* Allow a dependency install to replace a newer installed release without confirmation.
|
|
91
|
+
* Defaults to `false`: the user is prompted, and without a prompt the install is aborted.
|
|
92
|
+
*/
|
|
93
|
+
allowDowngrade?: boolean;
|
|
94
|
+
/**
|
|
95
|
+
* Skip the safety check for repository objects that would be overwritten. Defaults to `false`.
|
|
96
|
+
*/
|
|
33
97
|
noExistingObjects?: boolean;
|
|
34
98
|
};
|
|
99
|
+
/**
|
|
100
|
+
* Options related to the devclass installation.
|
|
101
|
+
*/
|
|
35
102
|
installDevclass?: {
|
|
103
|
+
/**
|
|
104
|
+
* Preserve publisher package names instead of mapping objects into an install package.
|
|
105
|
+
*/
|
|
36
106
|
keepOriginal?: boolean;
|
|
107
|
+
/**
|
|
108
|
+
* Transport layer assigned to generated transportable target packages. When omitted, the system default
|
|
109
|
+
* is resolved only if such packages have to be created.
|
|
110
|
+
*/
|
|
37
111
|
transportLayer?: string;
|
|
112
|
+
/**
|
|
113
|
+
* Explicit publisher-to-target package mappings. Ignored when `keepOriginal` is `true`.
|
|
114
|
+
*/
|
|
38
115
|
replacements?: InstallPackageReplacements[];
|
|
116
|
+
/**
|
|
117
|
+
* Do not register the package namespace on the target system. When unset and the namespace
|
|
118
|
+
* is missing, the user is asked (default: import); without prompts (`noInquirer`) it is imported.
|
|
119
|
+
*/
|
|
39
120
|
skipNamespace?: boolean;
|
|
40
121
|
};
|
|
41
|
-
|
|
42
|
-
|
|
122
|
+
/**
|
|
123
|
+
* Landscape transport-related options.
|
|
124
|
+
*/
|
|
125
|
+
landscapeTransport?: {
|
|
126
|
+
/**
|
|
127
|
+
* TMS target for the generated landscape transport. It is selected interactively when omitted.
|
|
128
|
+
* When omitted and the system has no transport targets, it is treated as the final system
|
|
129
|
+
* of the landscape and no landscape transport is generated.
|
|
130
|
+
*/
|
|
43
131
|
targetSystem?: string;
|
|
44
132
|
};
|
|
133
|
+
/**
|
|
134
|
+
* Skip every post-install activity declared in the manifest. Defaults to `false`.
|
|
135
|
+
*/
|
|
45
136
|
skipPostActivities?: boolean;
|
|
46
137
|
};
|
|
138
|
+
/** Input required to install a TRM package release into the connected SAP system. */
|
|
47
139
|
export interface InstallActionInput {
|
|
140
|
+
/** Optional shared execution settings. */
|
|
48
141
|
contextData?: InstallActionInputContextData;
|
|
142
|
+
/**
|
|
143
|
+
* Data related to the package being installed.
|
|
144
|
+
*/
|
|
49
145
|
packageData: {
|
|
146
|
+
/**
|
|
147
|
+
* Registry package name. For local registries, the manifest name becomes authoritative.
|
|
148
|
+
*/
|
|
50
149
|
name: string;
|
|
150
|
+
/**
|
|
151
|
+
* Release version or registry selector. Defaults to the lockfile root version when
|
|
152
|
+
* `installData.checks.lockfile` is set, otherwise to `latest`.
|
|
153
|
+
*/
|
|
51
154
|
version?: string;
|
|
155
|
+
/**
|
|
156
|
+
* Registry from which metadata and the release artifact are fetched.
|
|
157
|
+
*/
|
|
52
158
|
registry: AbstractRegistry;
|
|
159
|
+
/**
|
|
160
|
+
* Allow reinstalling the same version. Defaults to `false`; dirty local changes still
|
|
161
|
+
* require interactive confirmation and therefore abort when prompts are disabled.
|
|
162
|
+
*/
|
|
53
163
|
overwrite?: boolean;
|
|
164
|
+
/**
|
|
165
|
+
* Expected release integrity (SHA-512, base64), for example from a lockfile. When set, the
|
|
166
|
+
* install aborts before any change unless the release fetched from the registry matches it.
|
|
167
|
+
*/
|
|
168
|
+
integrity?: string;
|
|
54
169
|
};
|
|
170
|
+
/** Optional validation, import, package-mapping, and post-activity settings. */
|
|
55
171
|
installData?: InstallActionInputInstallData;
|
|
172
|
+
/**
|
|
173
|
+
* Set by a dependency install: the release is selected by the dependency range and the
|
|
174
|
+
* lockfile dependency entries, so the lockfile root (`name`, `version`, `registry`, `integrity`)
|
|
175
|
+
* is not applied to it.
|
|
176
|
+
*/
|
|
177
|
+
dependency?: boolean;
|
|
56
178
|
}
|
|
57
179
|
type TransportRuntime = {
|
|
58
180
|
binaries?: TransportBinary;
|
|
59
181
|
instance?: Transport;
|
|
60
182
|
};
|
|
61
183
|
type WorkflowRuntime = {
|
|
62
|
-
stopWarningShown: boolean;
|
|
63
|
-
registry: AbstractRegistry;
|
|
64
|
-
update: boolean;
|
|
65
184
|
isTrmServer: boolean;
|
|
66
185
|
isTrmRest: boolean;
|
|
67
|
-
|
|
186
|
+
isLocal: boolean;
|
|
187
|
+
update: TrmPackage;
|
|
188
|
+
package: {
|
|
68
189
|
data: Package;
|
|
69
|
-
|
|
70
|
-
artifact: TrmArtifact;
|
|
71
|
-
contents: boolean;
|
|
190
|
+
hierarchy: PackageHierarchy;
|
|
72
191
|
};
|
|
73
|
-
|
|
192
|
+
transports: {
|
|
74
193
|
devc: TransportRuntime;
|
|
75
194
|
tadir: TransportRuntime;
|
|
76
|
-
lang
|
|
77
|
-
cust
|
|
195
|
+
lang?: TransportRuntime;
|
|
196
|
+
cust?: TransportRuntime[];
|
|
78
197
|
};
|
|
79
|
-
|
|
80
|
-
|
|
198
|
+
dele?: Transport;
|
|
199
|
+
transportEntries: {
|
|
81
200
|
tdevct: TDEVCT[];
|
|
82
|
-
tadir: TADIR[];
|
|
83
|
-
e071: E071[];
|
|
84
201
|
};
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
202
|
+
dependencies: InstallDependencyEntry[];
|
|
203
|
+
namespace: string;
|
|
204
|
+
/** Registry the package is recorded under: the real registry of a local (.trm) artifact. */
|
|
205
|
+
installRegistry: AbstractRegistry;
|
|
206
|
+
previousInstallPackages: InstallPackageReplacements[];
|
|
207
|
+
/** Transports recorded for the installed release being updated. */
|
|
208
|
+
previousInstallTransports: InstallTransport[];
|
|
209
|
+
dependencyRollbacks: Array<() => Promise<void>>;
|
|
210
|
+
dependencyReleases: Array<() => Promise<void>>;
|
|
211
|
+
/** Packages installed by the dependency installs, transitive ones included, merged into the package snapshot. */
|
|
212
|
+
installedDependencies: TrmPackage[];
|
|
213
|
+
/** Package snapshot before the dependency installs, restored after they are rolled back. */
|
|
214
|
+
systemPackagesBeforeDependencies?: TrmPackage[];
|
|
215
|
+
rootDevclassBeforeImport?: TDEVC;
|
|
216
|
+
stopWarningShown: boolean;
|
|
217
|
+
/** Customizing transports of the release the user chose not to import (or skipped by noCust / non-interactive mode). */
|
|
218
|
+
skippedCust?: string[];
|
|
219
|
+
/** Release objects found on the system by check-transports, accepted before locking. */
|
|
220
|
+
existingObjects?: TADIR[];
|
|
221
|
+
/** Custom namespaces locked by this install or by the install it is a dependency of. */
|
|
222
|
+
lockedNamespaces?: string[];
|
|
223
|
+
/** Required SAP entries missing on the system: the install is aborted by check-engines, with the unmet engines. */
|
|
224
|
+
missingSapEntries?: number;
|
|
225
|
+
};
|
|
226
|
+
/** Dependency queued for install: missing from the system, or installed in an incompatible version. */
|
|
227
|
+
export type InstallDependencyEntry = {
|
|
228
|
+
dependency: TrmManifestDependency;
|
|
229
|
+
status: 'notFound' | 'versionMismatch';
|
|
230
|
+
/** Version on the system; set for `versionMismatch`. */
|
|
231
|
+
installedVersion?: string;
|
|
232
|
+
};
|
|
233
|
+
type WorkflowRevert = {
|
|
234
|
+
transports: {
|
|
235
|
+
devc: TransportBinary;
|
|
236
|
+
tadir: TransportBinary;
|
|
237
|
+
lang?: TransportBinary;
|
|
238
|
+
cust?: TransportBinary[];
|
|
95
239
|
};
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
240
|
+
cleanupTransport?: Transport;
|
|
241
|
+
cleanupImported?: boolean;
|
|
242
|
+
cleanupSucceeded?: boolean;
|
|
243
|
+
importStarted?: boolean;
|
|
244
|
+
importedEntries?: E071[];
|
|
245
|
+
/** Imported customizing transports, copied into the rollback cleanup transport with their keys. */
|
|
246
|
+
importedCustomizing?: Transport[];
|
|
247
|
+
/**
|
|
248
|
+
* Imported objects, SAP packages included, that were already on the system before the import,
|
|
249
|
+
* with their previous TADIR row. The rollback cleanup never deletes them.
|
|
250
|
+
*/
|
|
251
|
+
existingObjectsTadir?: TADIR[];
|
|
252
|
+
/** Transport of copies backing up {@link WorkflowRevert.existingObjectsTadir}, tracked before it is released. */
|
|
253
|
+
existingObjectsBackupTransport?: Transport;
|
|
254
|
+
/** Previous version of the existing objects, re-imported once the rollback cleanup succeeded. */
|
|
255
|
+
existingObjectsBackup?: TransportBinary;
|
|
256
|
+
packageHierarchy?: TDEVC[];
|
|
257
|
+
packageTransportLayers?: Array<{
|
|
258
|
+
devclass: DEVCLASS;
|
|
259
|
+
transportLayer: string;
|
|
260
|
+
}>;
|
|
261
|
+
createdTransports?: {
|
|
262
|
+
devc?: Transport;
|
|
263
|
+
tadir?: Transport;
|
|
264
|
+
lang?: Transport;
|
|
265
|
+
cust: Transport[];
|
|
100
266
|
};
|
|
267
|
+
sapPackages: DEVCLASS[];
|
|
268
|
+
stagingPackages?: DEVCLASS[];
|
|
269
|
+
dele?: TransportBinary;
|
|
270
|
+
deleImportStarted?: boolean;
|
|
271
|
+
deleInTargetTms?: boolean;
|
|
272
|
+
/** Set before the landscape transport is released, as SAP may export it and still fail. */
|
|
273
|
+
landscapeReleaseStarted?: boolean;
|
|
274
|
+
cleanupOriginalTadir?: TADIR[];
|
|
275
|
+
cleanupTemporaryPackages?: TDEVC[];
|
|
276
|
+
updateCleanupTransport?: Transport;
|
|
277
|
+
updateTablesBackupTransport?: Transport;
|
|
278
|
+
retainedTables?: TransportBinary;
|
|
279
|
+
retainedTableObjects?: Pick<E071, 'pgmid' | 'object' | 'objName'>[];
|
|
280
|
+
metadataWriteStarted?: boolean;
|
|
281
|
+
/** Set before the install transports are written, as SAP may commit them and still fail. */
|
|
282
|
+
metadataTransportsWriteStarted?: boolean;
|
|
283
|
+
metadataPackageRegistry?: string;
|
|
284
|
+
/** Install package mappings written by this install. */
|
|
285
|
+
metadataInstallDevc?: ZTRM_INSTALLDEVC[];
|
|
286
|
+
metadataPackageRow?: TrmPackageUpdateData;
|
|
287
|
+
/** TRM packages table row stored before an upgrade wrote its own; undefined when none was stored. */
|
|
288
|
+
metadataPreviousPackageRow?: TrmPackageUpdateData;
|
|
289
|
+
/** Set once the stored row was read: only then can an upgrade revert restore the metadata. */
|
|
290
|
+
metadataPreviousPackageRead?: boolean;
|
|
291
|
+
namespace?: string;
|
|
101
292
|
};
|
|
293
|
+
/** Result of a successful {@link install} action. */
|
|
102
294
|
export type InstallActionOutput = {
|
|
295
|
+
/** Normalized manifest of the installed release. */
|
|
103
296
|
manifest: TrmManifest;
|
|
104
|
-
|
|
105
|
-
|
|
297
|
+
/** Generated landscape transport, when the installation produced one. */
|
|
298
|
+
transport?: Transport;
|
|
106
299
|
};
|
|
300
|
+
/** Internal state shared by package-install workflow steps and rollback handlers. */
|
|
107
301
|
export interface InstallWorkflowContext extends IActionContext {
|
|
302
|
+
lockScope?: ActionLockScope;
|
|
303
|
+
/** Custom namespaces already locked by the parent installs of a dependency install. */
|
|
304
|
+
inheritedNamespaceLocks?: string[];
|
|
305
|
+
/** Original action input; optional groups are normalized during initialization. */
|
|
108
306
|
rawInput: InstallActionInput;
|
|
307
|
+
/** Resolved release, package hierarchy, transports, dependencies, and system metadata. */
|
|
109
308
|
runtime?: WorkflowRuntime;
|
|
309
|
+
/** Data retained so completed steps can be rolled back after a later failure. */
|
|
310
|
+
revert?: WorkflowRevert;
|
|
311
|
+
/** Installation result assembled by the workflow. */
|
|
110
312
|
output?: InstallActionOutput;
|
|
111
313
|
}
|
|
314
|
+
/**
|
|
315
|
+
* Installs a TRM package release into the currently connected SAP system.
|
|
316
|
+
*
|
|
317
|
+
* The workflow authorizes the user, fetches and validates the release, checks dependencies
|
|
318
|
+
* (aborting on cyclic dependency graphs before anything is installed) and required SAP entries, maps ABAP packages, imports the artifact transports, executes
|
|
319
|
+
* post-install activities, and records the installed package. Completed reversible steps are
|
|
320
|
+
* rolled back when a later step fails.
|
|
321
|
+
*
|
|
322
|
+
* This operation changes the target SAP system. Do not interrupt it while transports are being
|
|
323
|
+
* generated, imported, or released.
|
|
324
|
+
*
|
|
325
|
+
* @param inputData Package identity, registry, and installation options.
|
|
326
|
+
* @returns The installed release manifest and, when generated, its landscape transport.
|
|
327
|
+
* @throws When authorization, release validation, safety checks, dependency installation,
|
|
328
|
+
* transport processing, or post-install work fails.
|
|
329
|
+
*/
|
|
112
330
|
export declare function install(inputData: InstallActionInput): Promise<InstallActionOutput>;
|
|
331
|
+
/**
|
|
332
|
+
* Internal transactional entry point used when a parent install must retain rollback ownership.
|
|
333
|
+
* `inheritedNamespaceLocks` are the namespaces the parent installs hold locked until they finish.
|
|
334
|
+
*/
|
|
335
|
+
export declare function installWithRollback(inputData: InstallActionInput, inheritedNamespaceLocks?: string[]): Promise<{
|
|
336
|
+
output: InstallActionOutput;
|
|
337
|
+
/** Packages installed by the install's own dependency installs, transitive ones included. */
|
|
338
|
+
installedPackages: TrmPackage[];
|
|
339
|
+
rollback: () => Promise<void>;
|
|
340
|
+
release: () => Promise<void>;
|
|
341
|
+
}>;
|
|
113
342
|
export {};
|
|
@@ -8,81 +8,161 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
12
|
exports.install = install;
|
|
16
|
-
|
|
17
|
-
const
|
|
18
|
-
const trm_commons_1 = require("trm-commons");
|
|
13
|
+
exports.installWithRollback = installWithRollback;
|
|
14
|
+
const commons_1 = require("../commons");
|
|
19
15
|
const init_1 = require("./init");
|
|
20
|
-
const
|
|
21
|
-
const setSystemPackages_1 = require("../commons/setSystemPackages");
|
|
22
|
-
const checkAlreadyInstalled_1 = require("./checkAlreadyInstalled");
|
|
16
|
+
const checkTransports_1 = require("./checkTransports");
|
|
23
17
|
const checkSapEntries_1 = require("./checkSapEntries");
|
|
18
|
+
const checkEngines_1 = require("./checkEngines");
|
|
24
19
|
const checkDependencies_1 = require("./checkDependencies");
|
|
20
|
+
const checkDependencyCycles_1 = require("./checkDependencyCycles");
|
|
25
21
|
const installDependencies_1 = require("./installDependencies");
|
|
26
|
-
const checkTransports_1 = require("./checkTransports");
|
|
27
|
-
const readDevc_1 = require("./readDevc");
|
|
28
22
|
const setInstallDevclass_1 = require("./setInstallDevclass");
|
|
29
|
-
const
|
|
30
|
-
const generateDevclass_1 = require("./generateDevclass");
|
|
31
|
-
const readTadir_1 = require("./readTadir");
|
|
32
|
-
const importDevcTransport_1 = require("./importDevcTransport");
|
|
23
|
+
const checkInstallDevclass_1 = require("./checkInstallDevclass");
|
|
33
24
|
const addNamespace_1 = require("./addNamespace");
|
|
34
|
-
const
|
|
35
|
-
const
|
|
36
|
-
const
|
|
25
|
+
const generateDevclass_1 = require("./generateDevclass");
|
|
26
|
+
const prepareDevc_1 = require("./prepareDevc");
|
|
27
|
+
const prepareTadir_1 = require("./prepareTadir");
|
|
28
|
+
const prepareLang_1 = require("./prepareLang");
|
|
29
|
+
const prepareCust_1 = require("./prepareCust");
|
|
30
|
+
const importBatch_1 = require("./importBatch");
|
|
31
|
+
const generateLandscapeTransport_1 = require("./generateLandscapeTransport");
|
|
37
32
|
const updatePackageData_1 = require("./updatePackageData");
|
|
38
|
-
const generateInstallTransports_1 = require("./generateInstallTransports");
|
|
39
|
-
const refreshTmsTxt_1 = require("./refreshTmsTxt");
|
|
40
33
|
const executePostActivities_1 = require("./executePostActivities");
|
|
41
|
-
const
|
|
42
|
-
const
|
|
34
|
+
const releaseLandscapeTransport_1 = require("./releaseLandscapeTransport");
|
|
35
|
+
const generateUpdateTransport_1 = require("./generateUpdateTransport");
|
|
36
|
+
const checkDependants_1 = require("./checkDependants");
|
|
37
|
+
const utils_1 = require("../commons/utils");
|
|
38
|
+
const utils_2 = require("../commons/utils");
|
|
39
|
+
const lockResources_1 = require("./lockResources");
|
|
40
|
+
const cleanupCheckpoint_1 = require("./cleanupCheckpoint");
|
|
43
41
|
;
|
|
44
42
|
const WORKFLOW_NAME = 'install';
|
|
43
|
+
/**
|
|
44
|
+
* Installs a TRM package release into the currently connected SAP system.
|
|
45
|
+
*
|
|
46
|
+
* The workflow authorizes the user, fetches and validates the release, checks dependencies
|
|
47
|
+
* (aborting on cyclic dependency graphs before anything is installed) and required SAP entries, maps ABAP packages, imports the artifact transports, executes
|
|
48
|
+
* post-install activities, and records the installed package. Completed reversible steps are
|
|
49
|
+
* rolled back when a later step fails.
|
|
50
|
+
*
|
|
51
|
+
* This operation changes the target SAP system. Do not interrupt it while transports are being
|
|
52
|
+
* generated, imported, or released.
|
|
53
|
+
*
|
|
54
|
+
* @param inputData Package identity, registry, and installation options.
|
|
55
|
+
* @returns The installed release manifest and, when generated, its landscape transport.
|
|
56
|
+
* @throws When authorization, release validation, safety checks, dependency installation,
|
|
57
|
+
* transport processing, or post-install work fails.
|
|
58
|
+
*/
|
|
45
59
|
function install(inputData) {
|
|
46
60
|
return __awaiter(this, void 0, void 0, function* () {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
61
|
+
return (yield runInstall(inputData, false)).output;
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
const installWorkflow = [
|
|
65
|
+
commons_1.checkServerAuth,
|
|
66
|
+
commons_1.setSystemPackages,
|
|
67
|
+
init_1.init,
|
|
68
|
+
checkDependants_1.checkDependants,
|
|
69
|
+
checkTransports_1.checkTransports,
|
|
70
|
+
checkSapEntries_1.checkSapEntries,
|
|
71
|
+
checkEngines_1.checkEngines,
|
|
72
|
+
checkDependencies_1.checkDependencies,
|
|
73
|
+
checkDependencyCycles_1.checkDependencyCycles,
|
|
74
|
+
setInstallDevclass_1.setInstallDevclass,
|
|
75
|
+
checkInstallDevclass_1.checkInstallDevclass,
|
|
76
|
+
lockResources_1.lockResources,
|
|
77
|
+
installDependencies_1.installDependencies,
|
|
78
|
+
cleanupCheckpoint_1.cleanupCheckpoint,
|
|
79
|
+
addNamespace_1.addNamespace,
|
|
80
|
+
generateDevclass_1.generateDevclass,
|
|
81
|
+
generateUpdateTransport_1.generateUpdateTransport,
|
|
82
|
+
prepareDevc_1.prepareDevc,
|
|
83
|
+
prepareTadir_1.prepareTadir,
|
|
84
|
+
prepareLang_1.prepareLang,
|
|
85
|
+
prepareCust_1.prepareCust,
|
|
86
|
+
importBatch_1.importBatch,
|
|
87
|
+
generateLandscapeTransport_1.generateLandscapeTransport,
|
|
88
|
+
executePostActivities_1.executePostActivities,
|
|
89
|
+
releaseLandscapeTransport_1.releaseLandscapeTransport,
|
|
90
|
+
updatePackageData_1.updatePackageData
|
|
91
|
+
];
|
|
92
|
+
function runInstall(inputData_1, retainRollback_1) {
|
|
93
|
+
return __awaiter(this, arguments, void 0, function* (inputData, retainRollback, inheritedNamespaceLocks = []) {
|
|
94
|
+
var _a;
|
|
95
|
+
const lockScope = new utils_2.ActionLockScope(WORKFLOW_NAME);
|
|
96
|
+
const context = { rawInput: inputData, lockScope, inheritedNamespaceLocks };
|
|
97
|
+
//a local artifact is locked under the package it installs, as a remote install of it would be
|
|
98
|
+
const lockPackage = yield (0, utils_2.resolveInstallPackage)(inputData.packageData.registry, inputData.packageData.name);
|
|
99
|
+
yield lockScope.acquire([(0, utils_2.packageLockResource)(lockPackage.registry, lockPackage.name)]);
|
|
100
|
+
const release = () => __awaiter(this, void 0, void 0, function* () {
|
|
101
|
+
var _a;
|
|
102
|
+
let firstError;
|
|
103
|
+
for (const releaseDependency of [...(((_a = context.runtime) === null || _a === void 0 ? void 0 : _a.dependencyReleases) || [])].reverse()) {
|
|
104
|
+
try {
|
|
105
|
+
yield releaseDependency();
|
|
106
|
+
}
|
|
107
|
+
catch (error) {
|
|
108
|
+
firstError || (firstError = error);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
try {
|
|
112
|
+
yield lockScope.release();
|
|
113
|
+
}
|
|
114
|
+
catch (error) {
|
|
115
|
+
firstError || (firstError = error);
|
|
116
|
+
}
|
|
117
|
+
if (firstError)
|
|
118
|
+
throw firstError;
|
|
77
119
|
});
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
120
|
+
if (!retainRollback) {
|
|
121
|
+
return (0, utils_2.withLockRelease)(release, () => __awaiter(this, void 0, void 0, function* () {
|
|
122
|
+
const result = yield (0, commons_1.executeWorkflow)(WORKFLOW_NAME, installWorkflow, context, commons_1.workflowCallbacks);
|
|
123
|
+
return { output: result.output };
|
|
124
|
+
}));
|
|
125
|
+
}
|
|
126
|
+
let retained;
|
|
127
|
+
try {
|
|
128
|
+
retained = yield (0, utils_1.executeRetainedWorkflow)(WORKFLOW_NAME, installWorkflow, context, commons_1.workflowCallbacks);
|
|
129
|
+
}
|
|
130
|
+
catch (error) {
|
|
131
|
+
yield (0, utils_2.releaseLogged)(release);
|
|
132
|
+
throw error;
|
|
133
|
+
}
|
|
134
|
+
// The locks stay held until the parent calls release (or rollback).
|
|
82
135
|
return {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
136
|
+
output: retained.context.output,
|
|
137
|
+
installedPackages: ((_a = retained.context.runtime) === null || _a === void 0 ? void 0 : _a.installedDependencies) || [],
|
|
138
|
+
release,
|
|
139
|
+
rollback: () => __awaiter(this, void 0, void 0, function* () {
|
|
140
|
+
let firstError;
|
|
141
|
+
try {
|
|
142
|
+
yield retained.rollback();
|
|
143
|
+
}
|
|
144
|
+
catch (error) {
|
|
145
|
+
firstError = error;
|
|
146
|
+
}
|
|
147
|
+
try {
|
|
148
|
+
yield release();
|
|
149
|
+
}
|
|
150
|
+
catch (error) {
|
|
151
|
+
firstError || (firstError = error);
|
|
152
|
+
}
|
|
153
|
+
if (firstError)
|
|
154
|
+
throw firstError;
|
|
155
|
+
})
|
|
86
156
|
};
|
|
87
157
|
});
|
|
88
158
|
}
|
|
159
|
+
/**
|
|
160
|
+
* Internal transactional entry point used when a parent install must retain rollback ownership.
|
|
161
|
+
* `inheritedNamespaceLocks` are the namespaces the parent installs hold locked until they finish.
|
|
162
|
+
*/
|
|
163
|
+
function installWithRollback(inputData_1) {
|
|
164
|
+
return __awaiter(this, arguments, void 0, function* (inputData, inheritedNamespaceLocks = []) {
|
|
165
|
+
const retained = yield runInstall(inputData, true, inheritedNamespaceLocks);
|
|
166
|
+
return { output: retained.output, installedPackages: retained.installedPackages, rollback: retained.rollback, release: retained.release };
|
|
167
|
+
});
|
|
168
|
+
}
|
|
@@ -1,3 +1,17 @@
|
|
|
1
1
|
import { Step } from "@simonegaffurini/sammarksworkflow";
|
|
2
2
|
import { InstallWorkflowContext } from ".";
|
|
3
|
+
/**
|
|
4
|
+
* Workflow step that fetches the release, validates install settings, and initializes rollback state.
|
|
5
|
+
*
|
|
6
|
+
* 1- fill context data
|
|
7
|
+
*
|
|
8
|
+
* 2- fill missing input data
|
|
9
|
+
*
|
|
10
|
+
* 3- check install transport layer
|
|
11
|
+
*
|
|
12
|
+
* 4- check/set system target
|
|
13
|
+
*
|
|
14
|
+
* 5- check if already installed
|
|
15
|
+
*
|
|
16
|
+
*/
|
|
3
17
|
export declare const init: Step<InstallWorkflowContext>;
|