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
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Step } from "@simonegaffurini/sammarksworkflow";
|
|
2
|
+
import { PublishWorkflowContext } from ".";
|
|
3
|
+
/**
|
|
4
|
+
* Workflow step that collects optional readme and changelog Markdown for remote registries.
|
|
5
|
+
*
|
|
6
|
+
* 1- set readme
|
|
7
|
+
*
|
|
8
|
+
* 2- set changelog
|
|
9
|
+
*
|
|
10
|
+
*/
|
|
11
|
+
export declare const setOptionalReleaseData: Step<PublishWorkflowContext>;
|
|
@@ -0,0 +1,133 @@
|
|
|
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.setOptionalReleaseData = void 0;
|
|
13
|
+
const trm_commons_1 = require("trm-commons");
|
|
14
|
+
const registry_1 = require("../../registry");
|
|
15
|
+
/**
|
|
16
|
+
* Workflow step that collects optional readme and changelog Markdown for remote registries.
|
|
17
|
+
*
|
|
18
|
+
* 1- set readme
|
|
19
|
+
*
|
|
20
|
+
* 2- set changelog
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
exports.setOptionalReleaseData = {
|
|
24
|
+
name: 'set-optional-release-data',
|
|
25
|
+
filter: (context) => __awaiter(void 0, void 0, void 0, function* () {
|
|
26
|
+
if (context.rawInput.packageData.registry.getRegistryType() === registry_1.RegistryType.LOCAL) {
|
|
27
|
+
trm_commons_1.Logger.log(`Skipping optional release data input (registry is local)`, true);
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
}),
|
|
34
|
+
run: (context) => __awaiter(void 0, void 0, void 0, function* () {
|
|
35
|
+
const readmeTemplate = `#${context.rawInput.packageData.name}`;
|
|
36
|
+
const changelogTemplate = `${context.rawInput.packageData.name} changelog
|
|
37
|
+
=================
|
|
38
|
+
|
|
39
|
+
Legend
|
|
40
|
+
------
|
|
41
|
+
\`\`\`
|
|
42
|
+
* : fixed
|
|
43
|
+
! : changed
|
|
44
|
+
+ : added
|
|
45
|
+
- : removed
|
|
46
|
+
\`\`\`
|
|
47
|
+
|
|
48
|
+
${new Date().toISOString().split('T')[0]} v${context.rawInput.packageData.version}
|
|
49
|
+
-------------------
|
|
50
|
+
\`\`\`
|
|
51
|
+
...
|
|
52
|
+
\`\`\`
|
|
53
|
+
`;
|
|
54
|
+
//1- set readme
|
|
55
|
+
if (context.rawInput.publishData.readme === undefined) {
|
|
56
|
+
if (!context.rawInput.contextData.noInquirer && trm_commons_1.Inquirer.isUi()) {
|
|
57
|
+
context.rawInput.publishData.readme = (yield trm_commons_1.Inquirer.prompt([{
|
|
58
|
+
message: `Do you want to write a ${context.runtime.latest.data ? 'new ' : ''}readme?`,
|
|
59
|
+
type: 'confirm',
|
|
60
|
+
name: 'editReadme',
|
|
61
|
+
default: false
|
|
62
|
+
}, {
|
|
63
|
+
message: 'Write readme',
|
|
64
|
+
type: 'editor',
|
|
65
|
+
name: 'readme',
|
|
66
|
+
when: (hash) => {
|
|
67
|
+
return hash.editReadme;
|
|
68
|
+
},
|
|
69
|
+
ui: {
|
|
70
|
+
kind: 'markdown',
|
|
71
|
+
value: readmeTemplate
|
|
72
|
+
}
|
|
73
|
+
}])).readme;
|
|
74
|
+
}
|
|
75
|
+
else if (!context.rawInput.contextData.noInquirer) {
|
|
76
|
+
context.rawInput.publishData.readme = (yield trm_commons_1.Inquirer.prompt([{
|
|
77
|
+
message: `Do you want to write a ${context.runtime.latest.data ? 'new ' : ''}readme?`,
|
|
78
|
+
type: 'confirm',
|
|
79
|
+
name: 'editReadme',
|
|
80
|
+
default: false
|
|
81
|
+
}, {
|
|
82
|
+
message: 'Write readme',
|
|
83
|
+
type: 'editor',
|
|
84
|
+
name: 'readme',
|
|
85
|
+
postfix: '.md',
|
|
86
|
+
when: (hash) => {
|
|
87
|
+
return hash.editReadme;
|
|
88
|
+
},
|
|
89
|
+
default: readmeTemplate
|
|
90
|
+
}])).readme;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
//2- set changelog
|
|
94
|
+
if (context.rawInput.publishData.changelog === undefined) {
|
|
95
|
+
if (!context.rawInput.contextData.noInquirer && trm_commons_1.Inquirer.isUi()) {
|
|
96
|
+
context.rawInput.publishData.changelog = (yield trm_commons_1.Inquirer.prompt([{
|
|
97
|
+
message: `Do you want to write a release changelog?`,
|
|
98
|
+
type: 'confirm',
|
|
99
|
+
name: 'editChangelog',
|
|
100
|
+
default: false
|
|
101
|
+
}, {
|
|
102
|
+
message: 'Write changelog',
|
|
103
|
+
type: 'editor',
|
|
104
|
+
name: 'changelog',
|
|
105
|
+
when: (hash) => {
|
|
106
|
+
return hash.editChangelog;
|
|
107
|
+
},
|
|
108
|
+
ui: {
|
|
109
|
+
kind: 'markdown',
|
|
110
|
+
value: changelogTemplate
|
|
111
|
+
}
|
|
112
|
+
}])).changelog;
|
|
113
|
+
}
|
|
114
|
+
else if (!context.rawInput.contextData.noInquirer) {
|
|
115
|
+
context.rawInput.publishData.changelog = (yield trm_commons_1.Inquirer.prompt([{
|
|
116
|
+
message: `Do you want to write a release changelog?`,
|
|
117
|
+
type: 'confirm',
|
|
118
|
+
name: 'editChangelog',
|
|
119
|
+
default: false
|
|
120
|
+
}, {
|
|
121
|
+
message: 'Write changelog',
|
|
122
|
+
type: 'editor',
|
|
123
|
+
name: 'changelog',
|
|
124
|
+
postfix: '.md',
|
|
125
|
+
when: (hash) => {
|
|
126
|
+
return hash.editChangelog;
|
|
127
|
+
},
|
|
128
|
+
default: changelogTemplate
|
|
129
|
+
}])).changelog;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
})
|
|
133
|
+
};
|
|
@@ -1,3 +1,11 @@
|
|
|
1
1
|
import { Step } from "@simonegaffurini/sammarksworkflow";
|
|
2
2
|
import { PublishWorkflowContext } from ".";
|
|
3
|
+
/**
|
|
4
|
+
* Workflow step that records the published release in the origin system's TRM package table.
|
|
5
|
+
*
|
|
6
|
+
* Creates/update record in TRM packages table
|
|
7
|
+
*
|
|
8
|
+
* 1- commit new values
|
|
9
|
+
*
|
|
10
|
+
*/
|
|
3
11
|
export declare const updatePackageData: Step<PublishWorkflowContext>;
|
|
@@ -14,25 +14,38 @@ const trm_commons_1 = require("trm-commons");
|
|
|
14
14
|
const systemConnector_1 = require("../../systemConnector");
|
|
15
15
|
const crypto_1 = require("crypto");
|
|
16
16
|
const registry_1 = require("../../registry");
|
|
17
|
+
/**
|
|
18
|
+
* Workflow step that records the published release in the origin system's TRM package table.
|
|
19
|
+
*
|
|
20
|
+
* Creates/update record in TRM packages table
|
|
21
|
+
*
|
|
22
|
+
* 1- commit new values
|
|
23
|
+
*
|
|
24
|
+
*/
|
|
17
25
|
exports.updatePackageData = {
|
|
18
26
|
name: 'update-package-data',
|
|
19
27
|
run: (context) => __awaiter(void 0, void 0, void 0, function* () {
|
|
20
|
-
|
|
28
|
+
var _a;
|
|
21
29
|
try {
|
|
22
30
|
trm_commons_1.Logger.loading(`Finalizing publish...`);
|
|
23
|
-
|
|
31
|
+
//1- commit new values
|
|
32
|
+
//registry may have modified the artifact during publish: its integrity takes precedence
|
|
33
|
+
const integrity = (_a = context.output.trmPackage.getPublishedIntegrity()) !== null && _a !== void 0 ? _a : (0, crypto_1.createHash)("sha512").update(context.output.trmArtifact.binary).digest("base64");
|
|
24
34
|
yield systemConnector_1.SystemConnector.updateTrmPackageData({
|
|
25
35
|
package_name: context.rawInput.packageData.name,
|
|
26
|
-
package_registry:
|
|
27
|
-
manifest: Buffer.from(context.runtime.
|
|
28
|
-
trkorr: context.runtime.
|
|
36
|
+
package_registry: (0, registry_1.registryKey)(context.rawInput.packageData.registry),
|
|
37
|
+
manifest: Buffer.from(context.runtime.manifestXml, 'utf8'),
|
|
38
|
+
trkorr: context.runtime.transports.tadir.trkorr,
|
|
29
39
|
integrity: integrity,
|
|
30
40
|
devclass: context.rawInput.packageData.devclass
|
|
31
41
|
});
|
|
32
42
|
}
|
|
33
43
|
catch (e) {
|
|
34
|
-
|
|
35
|
-
|
|
44
|
+
const packageName = context.rawInput.packageData.name;
|
|
45
|
+
const packageVersion = context.runtime.manifest.version;
|
|
46
|
+
trm_commons_1.Logger.error(`An error occurred during publish finalize. ${packageName} v${packageVersion} has been published, however package on ${systemConnector_1.SystemConnector.getDest()} is inconsistent.`, { important: true });
|
|
47
|
+
trm_commons_1.Logger.error(`Install ${packageName} v${packageVersion} on ${systemConnector_1.SystemConnector.getDest()} to synchronize its package data.`, { important: true });
|
|
48
|
+
trm_commons_1.Logger.error(String(e), true);
|
|
36
49
|
}
|
|
37
50
|
})
|
|
38
51
|
};
|
|
@@ -6,6 +6,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.stopWarning = stopWarning;
|
|
7
7
|
const trm_commons_1 = require("trm-commons");
|
|
8
8
|
const chalk_1 = __importDefault(require("chalk"));
|
|
9
|
+
/**
|
|
10
|
+
* Logs the standard warning shown before a state-changing action starts.
|
|
11
|
+
*
|
|
12
|
+
* @param action Human-readable action name included in the warning.
|
|
13
|
+
*/
|
|
9
14
|
function stopWarning(action) {
|
|
10
15
|
trm_commons_1.Logger.warning(`Starting ${chalk_1.default.bold(action)}!! Do not interrupt the process as it may leave inconsistencies!`);
|
|
11
16
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Step } from "@simonegaffurini/sammarksworkflow";
|
|
2
|
+
import { UninstallWorkflowContext } from ".";
|
|
3
|
+
/**
|
|
4
|
+
* Asks for confirmation before deleting a package that other installed packages depend on.
|
|
5
|
+
* Without prompts, the uninstall is aborted. Packages deleted by the same run are not dependants.
|
|
6
|
+
*/
|
|
7
|
+
export declare const checkDependants: Step<UninstallWorkflowContext>;
|
|
@@ -0,0 +1,55 @@
|
|
|
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.checkDependants = void 0;
|
|
13
|
+
const trm_commons_1 = require("trm-commons");
|
|
14
|
+
const checkDependants_1 = require("../install/checkDependants");
|
|
15
|
+
const trmPackage_1 = require("../../trmPackage");
|
|
16
|
+
/**
|
|
17
|
+
* Asks for confirmation before deleting a package that other installed packages depend on.
|
|
18
|
+
* Without prompts, the uninstall is aborted. Packages deleted by the same run are not dependants.
|
|
19
|
+
*/
|
|
20
|
+
exports.checkDependants = {
|
|
21
|
+
name: 'check-dependants',
|
|
22
|
+
filter: (context) => __awaiter(void 0, void 0, void 0, function* () {
|
|
23
|
+
if (context.rawInput.uninstallData.checks.noDependants) {
|
|
24
|
+
trm_commons_1.Logger.log(`Skipping check dependants (user input)`, true);
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
}),
|
|
31
|
+
run: (context) => __awaiter(void 0, void 0, void 0, function* () {
|
|
32
|
+
const deletedPackage = context.runtime.update;
|
|
33
|
+
// Packages deleted by the same run don't count: the ones this is installed under, and the nested ones.
|
|
34
|
+
const deleting = [...(context.uninstallingPackages || []), ...context.runtime.nestedPackages.all];
|
|
35
|
+
const dependants = (0, checkDependants_1.getDependants)(context.rawInput.contextData.systemPackages, deletedPackage)
|
|
36
|
+
.filter(dependant => !deleting.some(pkg => trmPackage_1.TrmPackage.compare(pkg, dependant.package)));
|
|
37
|
+
if (dependants.length === 0) {
|
|
38
|
+
trm_commons_1.Logger.info(`No installed packages depend on "${deletedPackage.packageName}".`, true);
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
dependants.forEach(dependant => trm_commons_1.Logger.warning(`Dependant "${dependant.package.packageName}" requires "${deletedPackage.packageName}" ${dependant.range}.`, { important: true }));
|
|
42
|
+
let ignoreDependants = false;
|
|
43
|
+
if (!context.rawInput.contextData.noInquirer) {
|
|
44
|
+
ignoreDependants = (yield trm_commons_1.Inquirer.prompt({
|
|
45
|
+
message: `${dependants.length} installed package(s) depend on "${deletedPackage.packageName}" and might stop working. Continue with uninstall?`,
|
|
46
|
+
type: 'confirm',
|
|
47
|
+
default: false,
|
|
48
|
+
name: 'ignoreDependants'
|
|
49
|
+
})).ignoreDependants;
|
|
50
|
+
}
|
|
51
|
+
if (!ignoreDependants) {
|
|
52
|
+
throw new Error(`Uninstall aborted: installed packages depend on "${deletedPackage.packageName}".`);
|
|
53
|
+
}
|
|
54
|
+
})
|
|
55
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Step } from "@simonegaffurini/sammarksworkflow";
|
|
2
|
+
import { UninstallWorkflowContext } from ".";
|
|
3
|
+
/**
|
|
4
|
+
* Workflow step that adds the deletion transport to the landscape target import queue,
|
|
5
|
+
* so the package is deleted from the following systems too.
|
|
6
|
+
*
|
|
7
|
+
* It's the same forward performed by install when upgrading a package (see `releaseLandscapeTransport`).
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
export declare const forwardDeletionTransport: Step<UninstallWorkflowContext>;
|
|
@@ -0,0 +1,51 @@
|
|
|
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.forwardDeletionTransport = void 0;
|
|
13
|
+
const trm_commons_1 = require("trm-commons");
|
|
14
|
+
const transport_1 = require("../../transport");
|
|
15
|
+
const utils_1 = require("../commons/utils");
|
|
16
|
+
/**
|
|
17
|
+
* Workflow step that adds the deletion transport to the landscape target import queue,
|
|
18
|
+
* so the package is deleted from the following systems too.
|
|
19
|
+
*
|
|
20
|
+
* It's the same forward performed by install when upgrading a package (see `releaseLandscapeTransport`).
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
exports.forwardDeletionTransport = {
|
|
24
|
+
name: 'forward-deletion-transport',
|
|
25
|
+
filter: (context) => __awaiter(void 0, void 0, void 0, function* () {
|
|
26
|
+
if (!context.rawInput.uninstallData.landscapeTransport.targetSystem) {
|
|
27
|
+
trm_commons_1.Logger.log(`Skipping forward of deletion transport (system has no transport targets)`, true);
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
else if (!(0, utils_1.isDeletionForwardable)(context)) {
|
|
31
|
+
trm_commons_1.Logger.log(`Skipping forward of deletion transport (package is temporary)`, true);
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
}),
|
|
38
|
+
run: (context) => __awaiter(void 0, void 0, void 0, function* () {
|
|
39
|
+
const targetSystem = context.rawInput.uninstallData.landscapeTransport.targetSystem;
|
|
40
|
+
yield (0, utils_1.withScopedPrefix)(`(${transport_1.Transport.getTransportIcon()} Landscape) `, () => __awaiter(void 0, void 0, void 0, function* () {
|
|
41
|
+
trm_commons_1.Logger.loading(`Forwarding ${context.revert.dele.trkorr} to ${targetSystem}...`);
|
|
42
|
+
yield (0, utils_1.forwardDeletionTransport)(context, targetSystem);
|
|
43
|
+
context.output.targetSystem = targetSystem;
|
|
44
|
+
trm_commons_1.Logger.success(`Transport ${context.revert.dele.trkorr} added to ${targetSystem} import queue`, true);
|
|
45
|
+
}));
|
|
46
|
+
}),
|
|
47
|
+
revert: (context) => __awaiter(void 0, void 0, void 0, function* () {
|
|
48
|
+
yield (0, utils_1.revertForwardedDeletionTransport)(context, context.rawInput.uninstallData.landscapeTransport.targetSystem);
|
|
49
|
+
context.output.targetSystem = undefined;
|
|
50
|
+
})
|
|
51
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Step } from "@simonegaffurini/sammarksworkflow";
|
|
2
|
+
import { UninstallWorkflowContext } from ".";
|
|
3
|
+
/**
|
|
4
|
+
* Workflow step that removes every object of the installed release through a deletion transport.
|
|
5
|
+
*
|
|
6
|
+
* It's the same cleanup performed by install when upgrading a package (see `generateUpdateTransport`),
|
|
7
|
+
* where nothing is kept because there's no incoming release.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
export declare const generateDeletionTransport: Step<UninstallWorkflowContext>;
|
|
@@ -0,0 +1,45 @@
|
|
|
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.generateDeletionTransport = void 0;
|
|
13
|
+
const stopWarning_1 = require("../stopWarning");
|
|
14
|
+
const transport_1 = require("../../transport");
|
|
15
|
+
const utils_1 = require("../commons/utils");
|
|
16
|
+
/**
|
|
17
|
+
* Workflow step that removes every object of the installed release through a deletion transport.
|
|
18
|
+
*
|
|
19
|
+
* It's the same cleanup performed by install when upgrading a package (see `generateUpdateTransport`),
|
|
20
|
+
* where nothing is kept because there's no incoming release.
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
exports.generateDeletionTransport = {
|
|
24
|
+
name: 'generate-deletion-transport',
|
|
25
|
+
run: (context) => __awaiter(void 0, void 0, void 0, function* () {
|
|
26
|
+
if (!context.runtime.stopWarningShown) {
|
|
27
|
+
context.runtime.stopWarningShown = true;
|
|
28
|
+
(0, stopWarning_1.stopWarning)('uninstall');
|
|
29
|
+
}
|
|
30
|
+
yield (0, utils_1.cleanupInstalledPackage)(context, {
|
|
31
|
+
incomingObjects: [],
|
|
32
|
+
keptDevclasses: [],
|
|
33
|
+
prefix: `(${transport_1.Transport.getTransportIcon()} Uninstall) `,
|
|
34
|
+
actionName: 'Uninstall',
|
|
35
|
+
requireDeletion: true
|
|
36
|
+
});
|
|
37
|
+
context.output.transport = context.runtime.dele;
|
|
38
|
+
}),
|
|
39
|
+
revert: (context) => __awaiter(void 0, void 0, void 0, function* () {
|
|
40
|
+
// Objects might still be assigned to a staging package if restoring failed:
|
|
41
|
+
// only delete staging packages after a complete restore.
|
|
42
|
+
yield (0, utils_1.revertInstalledPackageCleanup)(context);
|
|
43
|
+
yield (0, utils_1.deleteCleanupStagingPackages)(context);
|
|
44
|
+
})
|
|
45
|
+
};
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { AbstractRegistry } from "../../registry";
|
|
2
|
+
import { Transport } from "../../transport";
|
|
3
|
+
import { TrmPackage } from "../../trmPackage";
|
|
4
|
+
import { TrmManifest } from "../../manifest";
|
|
5
|
+
import { InstallTransport, TrmPackageUpdateData } from "../../systemConnector";
|
|
6
|
+
import { E071 } from "../../client";
|
|
7
|
+
import { IActionContext } from "../commons";
|
|
8
|
+
import { ActionLockScope, PackageCleanupRevert } from "../commons/utils";
|
|
9
|
+
import { InstallPackageReplacements } from "../install";
|
|
10
|
+
/** Shared execution settings for the package uninstall action. */
|
|
11
|
+
export type UninstallActionInputContextData = {
|
|
12
|
+
/**
|
|
13
|
+
* Snapshot of packages installed on the target system. When omitted, the action queries SAP.
|
|
14
|
+
*/
|
|
15
|
+
systemPackages?: TrmPackage[];
|
|
16
|
+
/**
|
|
17
|
+
* Disable interactive prompts. Any required choice without an explicit value then causes an error.
|
|
18
|
+
*/
|
|
19
|
+
noInquirer?: boolean;
|
|
20
|
+
};
|
|
21
|
+
/** Options controlling package uninstall validation. */
|
|
22
|
+
export type UninstallActionInputUninstallData = {
|
|
23
|
+
/**
|
|
24
|
+
* Optional checks to perform before uninstalling.
|
|
25
|
+
*/
|
|
26
|
+
checks?: {
|
|
27
|
+
/**
|
|
28
|
+
* Skip the check for installed packages that depend on the uninstalled package. Defaults to `false`.
|
|
29
|
+
* When the check runs and finds dependants, the uninstall requires confirmation (aborted without prompts).
|
|
30
|
+
*/
|
|
31
|
+
noDependants?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Uninstall the package even when it has changes made on the target system (dirty entries),
|
|
34
|
+
* without asking for confirmation. Defaults to `false`: dirty packages then require
|
|
35
|
+
* confirmation (aborted without prompts).
|
|
36
|
+
*/
|
|
37
|
+
ignoreDirty?: boolean;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Landscape transport-related options.
|
|
41
|
+
*/
|
|
42
|
+
landscapeTransport?: {
|
|
43
|
+
/**
|
|
44
|
+
* TMS target that receives the deletion transport. It is selected interactively when omitted.
|
|
45
|
+
* When omitted and the system has no transport targets, it is treated as the final system
|
|
46
|
+
* of the landscape and the deletion transport is not forwarded.
|
|
47
|
+
*/
|
|
48
|
+
targetSystem?: string;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
/** Input required to uninstall a TRM package from the connected SAP system. */
|
|
52
|
+
export interface UninstallActionInput {
|
|
53
|
+
/** Optional shared execution settings. */
|
|
54
|
+
contextData?: UninstallActionInputContextData;
|
|
55
|
+
/**
|
|
56
|
+
* Data related to the package being uninstalled.
|
|
57
|
+
*/
|
|
58
|
+
packageData: {
|
|
59
|
+
/**
|
|
60
|
+
* Name of the installed package.
|
|
61
|
+
*/
|
|
62
|
+
name: string;
|
|
63
|
+
/**
|
|
64
|
+
* Registry the package was installed from. It generates the deletion transport,
|
|
65
|
+
* so it can't be a local (file system) registry.
|
|
66
|
+
*/
|
|
67
|
+
registry: AbstractRegistry;
|
|
68
|
+
};
|
|
69
|
+
/** Optional validation settings. */
|
|
70
|
+
uninstallData?: UninstallActionInputUninstallData;
|
|
71
|
+
}
|
|
72
|
+
type WorkflowRuntime = {
|
|
73
|
+
/** Installed release being uninstalled (same role as the release replaced by an install update). */
|
|
74
|
+
update: TrmPackage;
|
|
75
|
+
previousInstallPackages: InstallPackageReplacements[];
|
|
76
|
+
/** Transports recorded for the installed release. */
|
|
77
|
+
previousInstallTransports: InstallTransport[];
|
|
78
|
+
dele?: Transport;
|
|
79
|
+
stopWarningShown: boolean;
|
|
80
|
+
/** TRM packages installed in the SAP packages of the uninstalled one; the outermost ones are uninstalled directly. */
|
|
81
|
+
nestedPackages: {
|
|
82
|
+
outermost: TrmPackage[];
|
|
83
|
+
all: TrmPackage[];
|
|
84
|
+
};
|
|
85
|
+
/** Rollbacks of the uninstalls of the TRM packages installed under this one, in execution order. */
|
|
86
|
+
nestedRollbacks: Array<() => Promise<void>>;
|
|
87
|
+
/** Lock releases of the uninstalls of the TRM packages installed under this one. */
|
|
88
|
+
nestedReleases: Array<() => Promise<void>>;
|
|
89
|
+
/** Objects removed by the deletion transports of the TRM packages installed under this one. */
|
|
90
|
+
deletedObjects?: E071[];
|
|
91
|
+
};
|
|
92
|
+
type WorkflowRevert = PackageCleanupRevert & {
|
|
93
|
+
metadataRemoveStarted?: boolean;
|
|
94
|
+
metadataPreviousPackageRow?: TrmPackageUpdateData;
|
|
95
|
+
};
|
|
96
|
+
/** Result of a successful {@link uninstall} action. */
|
|
97
|
+
export type UninstallActionOutput = {
|
|
98
|
+
/** Manifest of the uninstalled release. */
|
|
99
|
+
manifest: TrmManifest;
|
|
100
|
+
/** Deletion transport imported into the connected system. */
|
|
101
|
+
transport?: Transport;
|
|
102
|
+
/** Landscape target system whose import queue received the deletion transport, when forwarded. */
|
|
103
|
+
targetSystem?: string;
|
|
104
|
+
};
|
|
105
|
+
/** Internal state shared by package-uninstall workflow steps and rollback handlers. */
|
|
106
|
+
export interface UninstallWorkflowContext extends IActionContext {
|
|
107
|
+
lockScope?: ActionLockScope;
|
|
108
|
+
/** Original action input; optional groups are normalized during initialization. */
|
|
109
|
+
rawInput: UninstallActionInput;
|
|
110
|
+
/** Other packages uninstalled by the same run (the packages it's installed under, and their nested ones): they're not dependants. */
|
|
111
|
+
uninstallingPackages?: TrmPackage[];
|
|
112
|
+
/** Installed package and its install mappings. */
|
|
113
|
+
runtime?: WorkflowRuntime;
|
|
114
|
+
/** Data retained so completed steps can be rolled back after a later failure. */
|
|
115
|
+
revert?: WorkflowRevert;
|
|
116
|
+
/** Uninstall result assembled by the workflow. */
|
|
117
|
+
output?: UninstallActionOutput;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Uninstalls a TRM package from the currently connected SAP system.
|
|
121
|
+
*
|
|
122
|
+
* This is the opposite of {@link install}: the workflow authorizes the user, checks that no
|
|
123
|
+
* installed package depends on it, removes the objects of the installed release through a
|
|
124
|
+
* registry-generated deletion transport, forwards that transport to the landscape target
|
|
125
|
+
* system so the package is uninstalled there too, and removes the TRM package record. The object
|
|
126
|
+
* cleanup is the same performed when an install upgrades a package, with no incoming release.
|
|
127
|
+
* Other TRM packages installed in its SAP packages, at any depth, are uninstalled first by the same
|
|
128
|
+
* action, with the same options.
|
|
129
|
+
* Completed reversible steps are rolled back when a later step fails.
|
|
130
|
+
*
|
|
131
|
+
* This operation changes the target SAP system. Do not interrupt it while transports are being
|
|
132
|
+
* generated, imported, or released.
|
|
133
|
+
*
|
|
134
|
+
* @param inputData Package identity, registry, and uninstall options.
|
|
135
|
+
* @returns The uninstalled release manifest, the imported deletion transport, and the landscape
|
|
136
|
+
* target it was forwarded to.
|
|
137
|
+
* @throws When authorization, dependants check, deletion transport processing, or the
|
|
138
|
+
* package record removal fails.
|
|
139
|
+
*/
|
|
140
|
+
export declare function uninstall(inputData: UninstallActionInput): Promise<UninstallActionOutput>;
|
|
141
|
+
/**
|
|
142
|
+
* Internal transactional entry point used when a parent uninstall must retain rollback ownership:
|
|
143
|
+
* the package is uninstalled, its locks stay held until `release`, and `rollback` restores it.
|
|
144
|
+
*
|
|
145
|
+
* @param uninstallingPackages Other packages uninstalled by the same run, ignored as dependants.
|
|
146
|
+
* @param parentLockScope Lock scope of the parent uninstall: its locks are taken in it and released by the parent.
|
|
147
|
+
*/
|
|
148
|
+
export declare function uninstallWithRollback(inputData: UninstallActionInput, uninstallingPackages: TrmPackage[], parentLockScope?: ActionLockScope): Promise<{
|
|
149
|
+
output: UninstallActionOutput;
|
|
150
|
+
rollback: () => Promise<void>;
|
|
151
|
+
release: () => Promise<void>;
|
|
152
|
+
}>;
|
|
153
|
+
export {};
|