trm-core 9.10.6 → 10.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -0
- package/changelog.txt +3 -6
- package/dist/actions/cg3y/download.js +34 -4
- package/dist/actions/cg3y/index.d.ts +23 -0
- package/dist/actions/cg3y/index.js +13 -10
- package/dist/actions/cg3z/index.d.ts +67 -3
- package/dist/actions/cg3z/index.js +25 -14
- package/dist/actions/cg3z/upload.d.ts +20 -0
- package/dist/actions/cg3z/upload.js +165 -36
- package/dist/actions/checkEngines/analyze.d.ts +11 -0
- package/dist/actions/checkEngines/analyze.js +294 -0
- package/dist/actions/checkEngines/index.d.ts +87 -0
- package/dist/actions/checkEngines/index.js +38 -0
- package/dist/actions/checkEngines/init.d.ts +11 -0
- package/dist/actions/checkEngines/init.js +45 -0
- package/dist/actions/checkPackageDependencies/analyze.d.ts +10 -0
- package/dist/actions/checkPackageDependencies/analyze.js +37 -39
- package/dist/actions/checkPackageDependencies/index.d.ts +56 -0
- package/dist/actions/checkPackageDependencies/index.js +13 -10
- package/dist/actions/checkPackageDependencies/init.d.ts +8 -0
- package/dist/actions/checkPackageDependencies/init.js +24 -2
- package/dist/actions/checkSapEntries/analyze.d.ts +12 -0
- package/dist/actions/checkSapEntries/analyze.js +63 -47
- package/dist/actions/checkSapEntries/index.d.ts +35 -0
- package/dist/actions/checkSapEntries/index.js +12 -10
- package/dist/actions/checkSapEntries/init.d.ts +8 -0
- package/dist/actions/checkSapEntries/init.js +10 -2
- package/dist/actions/commons/IActionContext.d.ts +10 -0
- package/dist/actions/commons/checkServerAuth.d.ts +7 -0
- package/dist/actions/commons/checkServerAuth.js +10 -5
- package/dist/actions/commons/index.d.ts +1 -1
- package/dist/actions/commons/index.js +1 -1
- package/dist/actions/commons/prompts/index.d.ts +1 -0
- package/dist/actions/commons/prompts/index.js +1 -0
- package/dist/actions/commons/prompts/setLandscapeTarget.d.ts +14 -0
- package/dist/actions/commons/prompts/setLandscapeTarget.js +40 -0
- package/dist/actions/commons/prompts/setTransportTarget.d.ts +15 -0
- package/dist/actions/commons/prompts/setTransportTarget.js +20 -2
- package/dist/actions/commons/setSystemPackages.d.ts +7 -0
- package/dist/actions/commons/setSystemPackages.js +12 -2
- package/dist/actions/commons/utils/actionLocks.d.ts +32 -0
- package/dist/actions/commons/utils/actionLocks.js +135 -0
- package/dist/actions/commons/utils/dirtyEntries.d.ts +12 -0
- package/dist/actions/commons/utils/dirtyEntries.js +54 -0
- package/dist/actions/commons/utils/index.d.ts +10 -0
- package/dist/actions/commons/utils/index.js +26 -0
- package/dist/actions/commons/utils/installRegistry.d.ts +18 -0
- package/dist/actions/commons/utils/installRegistry.js +46 -0
- package/dist/actions/commons/utils/installedDependency.d.ts +15 -0
- package/dist/actions/commons/utils/installedDependency.js +30 -0
- package/dist/actions/commons/utils/owningInstallation.d.ts +6 -0
- package/dist/actions/commons/utils/owningInstallation.js +47 -0
- package/dist/actions/commons/utils/packageCleanup.d.ts +168 -0
- package/dist/actions/commons/utils/packageCleanup.js +1017 -0
- package/dist/actions/commons/utils/releaseDeletionTransport.d.ts +5 -0
- package/dist/actions/commons/utils/releaseDeletionTransport.js +67 -0
- package/dist/actions/commons/utils/restoreTransport.d.ts +6 -0
- package/dist/actions/commons/utils/restoreTransport.js +50 -0
- package/dist/actions/commons/utils/retainedWorkflow.d.ts +6 -0
- package/dist/actions/commons/utils/retainedWorkflow.js +49 -0
- package/dist/actions/commons/utils/withScopedPrefix.d.ts +5 -0
- package/dist/actions/commons/utils/withScopedPrefix.js +32 -0
- package/dist/actions/commons/workflowCallbacks.d.ts +21 -0
- package/dist/actions/commons/workflowCallbacks.js +157 -0
- package/dist/actions/index.d.ts +3 -0
- package/dist/actions/index.js +5 -0
- package/dist/actions/install/addNamespace.d.ts +18 -0
- package/dist/actions/install/addNamespace.js +121 -51
- package/dist/actions/install/checkDependants.d.ts +15 -0
- package/dist/actions/install/checkDependants.js +74 -0
- package/dist/actions/install/checkDependencies.d.ts +11 -0
- package/dist/actions/install/checkDependencies.js +32 -13
- package/dist/actions/install/checkDependencyCycles.d.ts +17 -0
- package/dist/actions/install/checkDependencyCycles.js +105 -0
- package/dist/actions/install/checkEngines.d.ts +11 -0
- package/dist/actions/install/checkEngines.js +100 -0
- package/dist/actions/install/checkInstallDevclass.d.ts +24 -0
- package/dist/actions/install/checkInstallDevclass.js +110 -0
- package/dist/actions/install/checkSapEntries.d.ts +9 -0
- package/dist/actions/install/checkSapEntries.js +20 -12
- package/dist/actions/install/checkTransports.d.ts +34 -0
- package/dist/actions/install/checkTransports.js +329 -170
- package/dist/actions/install/cleanupCheckpoint.d.ts +11 -0
- package/dist/actions/install/cleanupCheckpoint.js +62 -0
- package/dist/actions/install/defaultTransportLayer.d.ts +5 -0
- package/dist/actions/install/defaultTransportLayer.js +36 -0
- package/dist/actions/install/executePostActivities.d.ts +6 -0
- package/dist/actions/install/executePostActivities.js +28 -38
- package/dist/actions/install/generateDevclass.d.ts +10 -0
- package/dist/actions/install/generateDevclass.js +66 -20
- package/dist/actions/install/generateLandscapeTransport.d.ts +23 -0
- package/dist/actions/install/generateLandscapeTransport.js +136 -0
- package/dist/actions/install/generateUpdateTransport.d.ts +20 -0
- package/dist/actions/install/generateUpdateTransport.js +122 -0
- package/dist/actions/install/importBatch.d.ts +22 -0
- package/dist/actions/install/importBatch.js +0 -0
- package/dist/actions/install/index.d.ts +273 -44
- package/dist/actions/install/index.js +139 -59
- package/dist/actions/install/init.d.ts +14 -0
- package/dist/actions/install/init.js +215 -108
- package/dist/actions/install/installDependencies.d.ts +14 -0
- package/dist/actions/install/installDependencies.js +122 -45
- package/dist/actions/install/lockResources.d.ts +8 -0
- package/dist/actions/install/lockResources.js +100 -0
- package/dist/actions/install/prepareCust.d.ts +13 -0
- package/dist/actions/install/prepareCust.js +138 -0
- package/dist/actions/install/prepareDevc.d.ts +15 -0
- package/dist/actions/install/prepareDevc.js +113 -0
- package/dist/actions/install/prepareLang.d.ts +13 -0
- package/dist/actions/install/prepareLang.js +110 -0
- package/dist/actions/install/prepareTadir.d.ts +13 -0
- package/dist/actions/install/prepareTadir.js +95 -0
- package/dist/actions/install/releaseLandscapeTransport.d.ts +11 -0
- package/dist/actions/install/releaseLandscapeTransport.js +79 -0
- package/dist/actions/install/setInstallDevclass.d.ts +10 -0
- package/dist/actions/install/setInstallDevclass.js +140 -54
- package/dist/actions/install/updatePackageData.d.ts +9 -0
- package/dist/actions/install/updatePackageData.js +117 -13
- package/dist/actions/installDependency/checkInstalledRelease.d.ts +13 -0
- package/dist/actions/installDependency/checkInstalledRelease.js +50 -0
- package/dist/actions/installDependency/confirmDowngrade.d.ts +11 -0
- package/dist/actions/installDependency/confirmDowngrade.js +53 -0
- package/dist/actions/installDependency/findInstallRelease.d.ts +24 -0
- package/dist/actions/installDependency/findInstallRelease.js +42 -19
- package/dist/actions/installDependency/index.d.ts +64 -3
- package/dist/actions/installDependency/index.js +30 -13
- package/dist/actions/installDependency/init.d.ts +14 -0
- package/dist/actions/installDependency/init.js +24 -3
- package/dist/actions/installDependency/installRelease.d.ts +6 -0
- package/dist/actions/installDependency/installRelease.js +22 -12
- package/dist/actions/publish/enginesUi.d.ts +53 -0
- package/dist/actions/publish/enginesUi.js +289 -0
- package/dist/actions/publish/findDependencies.d.ts +19 -0
- package/dist/actions/publish/findDependencies.js +72 -37
- package/dist/actions/publish/generateCustTransport.d.ts +6 -0
- package/dist/actions/publish/generateCustTransport.js +42 -19
- package/dist/actions/publish/generateDevcTransport.d.ts +6 -0
- package/dist/actions/publish/generateDevcTransport.js +16 -18
- package/dist/actions/publish/generateLangTransport.d.ts +6 -0
- package/dist/actions/publish/generateLangTransport.js +20 -23
- package/dist/actions/publish/generateTadirTransport.d.ts +6 -0
- package/dist/actions/publish/generateTadirTransport.js +18 -17
- package/dist/actions/publish/getSystemEngines.d.ts +27 -0
- package/dist/actions/publish/getSystemEngines.js +112 -0
- package/dist/actions/publish/index.d.ts +162 -37
- package/dist/actions/publish/index.js +51 -34
- package/dist/actions/publish/init.d.ts +28 -0
- package/dist/actions/publish/init.js +304 -120
- package/dist/actions/publish/lockResources.d.ts +4 -0
- package/dist/actions/{install/refreshTmsTxt.js → publish/lockResources.js} +14 -17
- package/dist/actions/publish/publishToRegistry.d.ts +8 -0
- package/dist/actions/publish/publishToRegistry.js +18 -8
- package/dist/actions/publish/releaseTransports.d.ts +6 -0
- package/dist/actions/publish/releaseTransports.js +48 -20
- package/dist/actions/publish/setCustomizingTransports.d.ts +6 -0
- package/dist/actions/publish/setCustomizingTransports.js +227 -101
- package/dist/actions/publish/setManifestValues.d.ts +22 -0
- package/dist/actions/publish/setManifestValues.js +455 -119
- package/dist/actions/publish/setOptionalPublishData.d.ts +11 -0
- package/dist/actions/publish/setOptionalPublishData.js +133 -0
- package/dist/actions/publish/updatePackageData.d.ts +8 -0
- package/dist/actions/publish/updatePackageData.js +20 -7
- package/dist/actions/stopWarning.d.ts +5 -0
- package/dist/actions/stopWarning.js +5 -0
- package/dist/actions/uninstall/checkDependants.d.ts +7 -0
- package/dist/actions/uninstall/checkDependants.js +55 -0
- package/dist/actions/uninstall/forwardDeletionTransport.d.ts +10 -0
- package/dist/actions/uninstall/forwardDeletionTransport.js +51 -0
- package/dist/actions/uninstall/generateDeletionTransport.d.ts +10 -0
- package/dist/actions/uninstall/generateDeletionTransport.js +45 -0
- package/dist/actions/uninstall/index.d.ts +153 -0
- package/dist/actions/uninstall/index.js +141 -0
- package/dist/actions/uninstall/init.d.ts +17 -0
- package/dist/actions/uninstall/init.js +146 -0
- package/dist/actions/uninstall/lockResources.d.ts +4 -0
- package/dist/actions/{publish/setTransportTarget.js → uninstall/lockResources.js} +16 -7
- package/dist/actions/uninstall/removePackageData.d.ts +9 -0
- package/dist/actions/uninstall/removePackageData.js +64 -0
- package/dist/actions/uninstall/uninstallNestedPackages.d.ts +26 -0
- package/dist/actions/uninstall/uninstallNestedPackages.js +174 -0
- package/dist/client/ClientError.d.ts +3 -1
- package/dist/client/ClientError.js +2 -1
- package/dist/client/RESTClient.d.ts +18 -5
- package/dist/client/RESTClient.js +194 -56
- package/dist/client/RESTClientError.d.ts +1 -2
- package/dist/client/RESTClientError.js +3 -2
- package/dist/client/RFCClient.d.ts +28 -7
- package/dist/client/RFCClient.js +325 -77
- package/dist/client/RFCClientError.d.ts +1 -1
- package/dist/client/RFCClientError.js +2 -2
- package/dist/client/TransportEntries.d.ts +8 -0
- package/dist/client/TransportEntries.js +2 -0
- package/dist/client/components/BORM_ID.d.ts +1 -0
- package/dist/client/components/BORM_ID.js +2 -0
- package/dist/client/components/BORM_NAME.d.ts +1 -0
- package/dist/client/components/BORM_NAME.js +2 -0
- package/dist/client/components/BORM_NAMEL.d.ts +1 -0
- package/dist/client/components/BORM_NAMEL.js +2 -0
- package/dist/client/components/BORM_VEND.d.ts +1 -0
- package/dist/client/components/BORM_VEND.js +2 -0
- package/dist/client/components/BORM_VERS.d.ts +1 -0
- package/dist/client/components/BORM_VERS.js +2 -0
- package/dist/client/components/CWBNTNUMM.d.ts +1 -0
- package/dist/client/components/CWBNTNUMM.js +2 -0
- package/dist/client/components/CWBNTSTAT.d.ts +1 -0
- package/dist/client/components/CWBNTSTAT.js +2 -0
- package/dist/client/components/CWBNTVERS.d.ts +1 -0
- package/dist/client/components/CWBNTVERS.js +2 -0
- package/dist/client/components/CWBPRSTAT.d.ts +1 -0
- package/dist/client/components/CWBPRSTAT.js +2 -0
- package/dist/client/components/INSTSTATE.d.ts +1 -0
- package/dist/client/components/INSTSTATE.js +2 -0
- package/dist/client/components/RELC_TYPE.d.ts +1 -0
- package/dist/client/components/RELC_TYPE.js +2 -0
- package/dist/client/components/SAPPATCHLV.d.ts +1 -0
- package/dist/client/components/SAPPATCHLV.js +2 -0
- package/dist/client/components/SAPRELEASE.d.ts +1 -0
- package/dist/client/components/SAPRELEASE.js +2 -0
- package/dist/client/components/SYSYSID.d.ts +1 -0
- package/dist/client/components/SYSYSID.js +2 -0
- package/dist/client/components/ZTRM_INSTALLTR_TYPE.d.ts +1 -0
- package/dist/client/components/ZTRM_INSTALLTR_TYPE.js +2 -0
- package/dist/client/components/index.d.ts +15 -0
- package/dist/client/components/index.js +15 -0
- package/dist/client/index.d.ts +1 -0
- package/dist/client/index.js +1 -0
- package/dist/client/messageLog.d.ts +7 -0
- package/dist/client/messageLog.js +21 -0
- package/dist/client/struct/ActionLockKey.d.ts +6 -0
- package/dist/client/struct/ActionLockKey.js +2 -0
- package/dist/client/struct/CVERS.d.ts +7 -0
- package/dist/client/struct/CVERS.js +2 -0
- package/dist/client/struct/CWBNTCUST.d.ts +6 -0
- package/dist/client/struct/CWBNTCUST.js +2 -0
- package/dist/client/struct/CWBNTHEAD.d.ts +5 -0
- package/dist/client/struct/CWBNTHEAD.js +2 -0
- package/dist/client/struct/E070.d.ts +2 -1
- package/dist/client/struct/E071K.d.ts +9 -0
- package/dist/client/struct/E071K.js +2 -0
- package/dist/client/struct/PRDVERS.d.ts +9 -0
- package/dist/client/struct/PRDVERS.js +2 -0
- package/dist/client/struct/SCOMPKDTLN.d.ts +21 -0
- package/dist/client/struct/STMSCALERT.d.ts +21 -0
- package/dist/client/struct/STMSCALERT.js +2 -0
- package/dist/client/struct/STMS_TP_IMPORT.d.ts +14 -0
- package/dist/client/struct/STMS_TP_IMPORT.js +2 -0
- package/dist/client/struct/STMS_TR_REQUEST.d.ts +8 -0
- package/dist/client/struct/STMS_TR_REQUEST.js +2 -0
- package/dist/client/struct/TDEVC.d.ts +38 -0
- package/dist/client/struct/TPLOGPTR.d.ts +13 -0
- package/dist/client/struct/TPLOGPTR.js +2 -0
- package/dist/client/struct/TPSTDOUT.d.ts +3 -0
- package/dist/client/struct/TPSTDOUT.js +2 -0
- package/dist/client/struct/ZTRM_INSTALLTR.d.ts +8 -0
- package/dist/client/struct/ZTRM_INSTALLTR.js +2 -0
- package/dist/client/struct/index.d.ts +12 -0
- package/dist/client/struct/index.js +12 -0
- package/dist/commons/checkCoreTrmDependencies.js +1 -1
- package/dist/commons/getAxiosInstance.js +8 -17
- package/dist/commons/getNodePackage.js +7 -0
- package/dist/commons/getPackageHierarchy.js +2 -0
- package/dist/commons/getPackagesNamespace.d.ts +9 -0
- package/dist/commons/getPackagesNamespace.js +19 -0
- package/dist/commons/index.d.ts +4 -0
- package/dist/commons/index.js +4 -0
- package/dist/commons/packageDataFromTdevc.d.ts +12 -0
- package/dist/commons/packageDataFromTdevc.js +25 -0
- package/dist/commons/resolveCoreVersion.d.ts +10 -0
- package/dist/commons/resolveCoreVersion.js +24 -0
- package/dist/commons/summarizeForLog.d.ts +22 -0
- package/dist/commons/summarizeForLog.js +120 -0
- package/dist/connection/OpenRFCConnect.d.ts +13 -0
- package/dist/connection/OpenRFCConnect.js +23 -0
- package/dist/connection/index.d.ts +1 -0
- package/dist/connection/index.js +17 -0
- package/dist/dependencies/PackageDependencies.d.ts +2 -0
- package/dist/dependencies/PackageDependencies.js +24 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/lockfile/Lockfile.d.ts +23 -1
- package/dist/lockfile/Lockfile.js +45 -9
- package/dist/manifest/Manifest.d.ts +9 -5
- package/dist/manifest/Manifest.js +82 -29
- package/dist/manifest/PostActivity.js +3 -3
- package/dist/manifest/TrmManifest.d.ts +0 -2
- package/dist/manifest/TrmManifestBase.d.ts +2 -0
- package/dist/manifest/TrmManifestEngines.d.ts +64 -0
- package/dist/manifest/TrmManifestEngines.js +2 -0
- package/dist/manifest/engines/index.d.ts +2 -0
- package/dist/manifest/engines/index.js +18 -0
- package/dist/manifest/engines/sapRange.d.ts +38 -0
- package/dist/manifest/engines/sapRange.js +135 -0
- package/dist/manifest/engines/validateEngines.d.ts +44 -0
- package/dist/manifest/engines/validateEngines.js +282 -0
- package/dist/manifest/index.d.ts +3 -0
- package/dist/manifest/index.js +3 -0
- package/dist/manifest/sapEntries.d.ts +14 -0
- package/dist/manifest/sapEntries.js +63 -0
- package/dist/protocol/Protocol.js +7 -0
- package/dist/registry/AbstractRegistry.d.ts +18 -3
- package/dist/registry/FileSystem.d.ts +22 -13
- package/dist/registry/FileSystem.js +69 -18
- package/dist/registry/RegistryDeletionTransportUnauthorizedError.d.ts +4 -0
- package/dist/registry/RegistryDeletionTransportUnauthorizedError.js +12 -0
- package/dist/registry/RegistryDeletionTransportUnavailableError.d.ts +9 -0
- package/dist/registry/RegistryDeletionTransportUnavailableError.js +17 -0
- package/dist/registry/RegistryPackageNotFoundError.d.ts +7 -0
- package/dist/registry/RegistryPackageNotFoundError.js +14 -0
- package/dist/registry/RegistryV2.d.ts +15 -5
- package/dist/registry/RegistryV2.js +308 -48
- package/dist/registry/index.d.ts +4 -0
- package/dist/registry/index.js +4 -0
- package/dist/registry/registryKey.d.ts +7 -0
- package/dist/registry/registryKey.js +21 -0
- package/dist/systemConnector/ActionLock.d.ts +1 -0
- package/dist/systemConnector/ActionLock.js +2 -0
- package/dist/systemConnector/ISystemConnector.d.ts +21 -4
- package/dist/systemConnector/ISystemConnectorBase.d.ts +16 -0
- package/dist/systemConnector/InstallTransport.d.ts +6 -0
- package/dist/systemConnector/InstallTransport.js +2 -0
- package/dist/systemConnector/OpenRFCSystemConnector.d.ts +12 -0
- package/dist/systemConnector/OpenRFCSystemConnector.js +51 -0
- package/dist/systemConnector/RESTSystemConnector.d.ts +22 -7
- package/dist/systemConnector/RESTSystemConnector.js +95 -23
- package/dist/systemConnector/RFCConnection.d.ts +0 -1
- package/dist/systemConnector/RFCSystemConnector.d.ts +25 -7
- package/dist/systemConnector/RFCSystemConnector.js +75 -16
- package/dist/systemConnector/SystemConnector.d.ts +38 -6
- package/dist/systemConnector/SystemConnector.js +138 -12
- package/dist/systemConnector/SystemConnectorBase.d.ts +24 -1
- package/dist/systemConnector/SystemConnectorBase.js +174 -22
- package/dist/systemConnector/index.d.ts +3 -0
- package/dist/systemConnector/index.js +3 -0
- package/dist/transport/E071KOwner.d.ts +10 -0
- package/dist/transport/E071KOwner.js +15 -0
- package/dist/transport/R3transLogParser.d.ts +19 -0
- package/dist/transport/R3transLogParser.js +148 -0
- package/dist/transport/Transport.d.ts +36 -3
- package/dist/transport/Transport.js +304 -138
- package/dist/transport/index.d.ts +2 -0
- package/dist/transport/index.js +2 -0
- package/dist/trmPackage/TransportBinary.d.ts +4 -1
- package/dist/trmPackage/TrmArtifact.d.ts +12 -8
- package/dist/trmPackage/TrmArtifact.js +93 -74
- package/dist/trmPackage/TrmPackage.d.ts +20 -6
- package/dist/trmPackage/TrmPackage.js +27 -1
- package/dist/validators/validateDevclass.js +4 -0
- package/package.json +15 -7
- package/dist/actions/commons/trmServerPa.d.ts +0 -3
- package/dist/actions/commons/trmServerPa.js +0 -40
- package/dist/actions/install/checkAlreadyInstalled.d.ts +0 -3
- package/dist/actions/install/checkAlreadyInstalled.js +0 -71
- package/dist/actions/install/checkObjectTypes.d.ts +0 -3
- package/dist/actions/install/checkObjectTypes.js +0 -50
- package/dist/actions/install/checkObjectsLock.d.ts +0 -3
- package/dist/actions/install/checkObjectsLock.js +0 -52
- package/dist/actions/install/generateInstallTransports.d.ts +0 -3
- package/dist/actions/install/generateInstallTransports.js +0 -128
- package/dist/actions/install/importCustTransport.d.ts +0 -3
- package/dist/actions/install/importCustTransport.js +0 -73
- package/dist/actions/install/importDevcTransport.d.ts +0 -3
- package/dist/actions/install/importDevcTransport.js +0 -93
- package/dist/actions/install/importLangTransport.d.ts +0 -3
- package/dist/actions/install/importLangTransport.js +0 -72
- package/dist/actions/install/importTadirTransport.d.ts +0 -3
- package/dist/actions/install/importTadirTransport.js +0 -83
- package/dist/actions/install/readDevc.d.ts +0 -3
- package/dist/actions/install/readDevc.js +0 -33
- package/dist/actions/install/readTadir.d.ts +0 -3
- package/dist/actions/install/readTadir.js +0 -101
- package/dist/actions/install/refreshTmsTxt.d.ts +0 -3
- package/dist/actions/install/releaseInstallTransport.d.ts +0 -3
- package/dist/actions/install/releaseInstallTransport.js +0 -80
- package/dist/actions/publish/checkAllObjectsReleased.d.ts +0 -3
- package/dist/actions/publish/checkAllObjectsReleased.js +0 -46
- package/dist/actions/publish/getSourceCode.d.ts +0 -3
- package/dist/actions/publish/getSourceCode.js +0 -49
- package/dist/actions/publish/setChangelog.d.ts +0 -3
- package/dist/actions/publish/setChangelog.js +0 -69
- package/dist/actions/publish/setDevclass.d.ts +0 -3
- package/dist/actions/publish/setDevclass.js +0 -74
- package/dist/actions/publish/setReadme.d.ts +0 -3
- package/dist/actions/publish/setReadme.js +0 -52
- package/dist/actions/publish/setTransportTarget.d.ts +0 -3
|
@@ -13,25 +13,35 @@ exports.publishToRegistry = void 0;
|
|
|
13
13
|
const trm_commons_1 = require("trm-commons");
|
|
14
14
|
const trmPackage_1 = require("../../trmPackage");
|
|
15
15
|
const manifest_1 = require("../../manifest");
|
|
16
|
+
/**
|
|
17
|
+
* Workflow step that builds the binary TRM artifact and uploads the release to its registry.
|
|
18
|
+
*
|
|
19
|
+
* 1- generate TRM artifact
|
|
20
|
+
*
|
|
21
|
+
* 2- publish to registry
|
|
22
|
+
*
|
|
23
|
+
*/
|
|
16
24
|
exports.publishToRegistry = {
|
|
17
25
|
name: 'publish-to-registry',
|
|
18
26
|
run: (context) => __awaiter(void 0, void 0, void 0, function* () {
|
|
19
|
-
|
|
27
|
+
//1- generate TRM artifact
|
|
20
28
|
trm_commons_1.Logger.loading(`Creating TRM package...`);
|
|
21
|
-
context.
|
|
22
|
-
transports: context.runtime.
|
|
23
|
-
manifest: new manifest_1.Manifest(context.runtime.
|
|
24
|
-
sourceCode: context.runtime.
|
|
29
|
+
context.output.trmArtifact = yield trmPackage_1.TrmArtifact.create({
|
|
30
|
+
transports: context.runtime.aggregatedTransports,
|
|
31
|
+
manifest: new manifest_1.Manifest(context.runtime.manifest),
|
|
32
|
+
sourceCode: context.runtime.abapGit.sourceCode
|
|
25
33
|
});
|
|
34
|
+
//2- publish to registry
|
|
26
35
|
if (context.rawInput.packageData.tags.length > 0) {
|
|
27
36
|
trm_commons_1.Logger.info(`Publishing with tag${context.rawInput.packageData.tags.length === 1 ? '' : 's'}: ${context.rawInput.packageData.tags.join(', ')}`);
|
|
28
37
|
}
|
|
29
38
|
trm_commons_1.Logger.loading(`Publishing...`);
|
|
30
|
-
yield context.
|
|
31
|
-
artifact: context.
|
|
39
|
+
yield context.output.trmPackage.publish({
|
|
40
|
+
artifact: context.output.trmArtifact,
|
|
32
41
|
readme: context.rawInput.publishData.readme,
|
|
33
42
|
tags: context.rawInput.packageData.tags,
|
|
34
|
-
changelog: context.rawInput.publishData.changelog
|
|
43
|
+
changelog: context.rawInput.publishData.changelog,
|
|
44
|
+
retainedCustomizing: context.runtime.customizing.retained.map(o => o.trkorr)
|
|
35
45
|
});
|
|
36
46
|
})
|
|
37
47
|
};
|
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
import { Step } from "@simonegaffurini/sammarksworkflow";
|
|
2
2
|
import { PublishWorkflowContext } from ".";
|
|
3
|
+
/**
|
|
4
|
+
* Workflow step that annotates and releases every generated publish transport.
|
|
5
|
+
*
|
|
6
|
+
* 1- release
|
|
7
|
+
*
|
|
8
|
+
*/
|
|
3
9
|
export declare const releaseTransports: Step<PublishWorkflowContext>;
|
|
@@ -12,31 +12,59 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.releaseTransports = void 0;
|
|
13
13
|
const trm_commons_1 = require("trm-commons");
|
|
14
14
|
const transport_1 = require("../../transport");
|
|
15
|
+
/**
|
|
16
|
+
* Workflow step that annotates and releases every generated publish transport.
|
|
17
|
+
*
|
|
18
|
+
* 1- release
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
15
21
|
exports.releaseTransports = {
|
|
16
22
|
name: 'release-transport',
|
|
17
23
|
run: (context) => __awaiter(void 0, void 0, void 0, function* () {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
context.runtime.systemData.releasedTransports.push(context.runtime.systemData.langTransport);
|
|
24
|
+
//1- release
|
|
25
|
+
context.runtime.aggregatedTransports = [context.runtime.transports.tadir, context.runtime.transports.devc];
|
|
26
|
+
if (context.runtime.transports.lang) {
|
|
27
|
+
context.runtime.aggregatedTransports.push(context.runtime.transports.lang);
|
|
23
28
|
}
|
|
24
|
-
context.runtime.
|
|
25
|
-
context.runtime.systemData.releasedTransports.push(context.runtime.systemData.devcTransport);
|
|
29
|
+
context.runtime.aggregatedTransports = context.runtime.aggregatedTransports.concat(context.runtime.transports.cust);
|
|
26
30
|
var counter = 0;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
31
|
+
const originalLoggerPrefix = trm_commons_1.Logger.getPrefix();
|
|
32
|
+
const originalInquirerPrefix = trm_commons_1.Inquirer.getPrefix();
|
|
33
|
+
try {
|
|
34
|
+
for (var transport of context.runtime.aggregatedTransports) {
|
|
35
|
+
counter++;
|
|
36
|
+
const prefix = `(${counter}/${context.runtime.aggregatedTransports.length}) `;
|
|
37
|
+
trm_commons_1.Logger.setPrefix(prefix);
|
|
38
|
+
trm_commons_1.Inquirer.setPrefix(prefix);
|
|
39
|
+
yield transport.addComment(`name=${context.rawInput.packageData.name}`);
|
|
40
|
+
yield transport.addComment(`version=${context.rawInput.packageData.version}`);
|
|
41
|
+
yield transport.setDocumentation(context.runtime.manifestXml);
|
|
42
|
+
trm_commons_1.Logger.log(`Ready to release transport ${transport.trkorr}, ${transport.trmIdentifier}`, true);
|
|
43
|
+
trm_commons_1.Logger.loading(`${transport_1.Transport.getTransportIcon()} Releasing ${transport.trkorr}...`);
|
|
44
|
+
yield transport.release(false, false, context.rawInput.contextData.logTemporaryFolder);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
finally {
|
|
48
|
+
trm_commons_1.Logger.setPrefix(originalLoggerPrefix);
|
|
49
|
+
trm_commons_1.Inquirer.setPrefix(originalInquirerPrefix);
|
|
50
|
+
}
|
|
51
|
+
}),
|
|
52
|
+
revert: (context) => __awaiter(void 0, void 0, void 0, function* () {
|
|
53
|
+
// A release can fail after earlier requests were already released. Walk every
|
|
54
|
+
// request independently so one status/delete failure does not hide later cleanup.
|
|
55
|
+
let firstError;
|
|
56
|
+
for (const transport of context.runtime.aggregatedTransports || []) {
|
|
57
|
+
try {
|
|
58
|
+
if (yield transport.canBeDeleted()) {
|
|
59
|
+
yield transport.delete();
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
catch (error) {
|
|
63
|
+
firstError || (firstError = error);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
if (firstError) {
|
|
67
|
+
throw firstError;
|
|
40
68
|
}
|
|
41
69
|
})
|
|
42
70
|
};
|
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
import { Step } from "@simonegaffurini/sammarksworkflow";
|
|
2
2
|
import { PublishWorkflowContext } from ".";
|
|
3
|
+
/** Keyword of `dropCustomizingTransports` that drops every transport carried over from the latest release. */
|
|
4
|
+
export declare const DROP_ALL_CUSTOMIZING = "ALL";
|
|
5
|
+
/**
|
|
6
|
+
* Retain customizing transports from the latest release (except those the caller drops), validate
|
|
7
|
+
* transports supplied by the user, and optionally let the user update the selection.
|
|
8
|
+
*/
|
|
3
9
|
export declare const setCustomizingTransports: Step<PublishWorkflowContext>;
|
|
@@ -9,130 +9,256 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.setCustomizingTransports = void 0;
|
|
12
|
+
exports.setCustomizingTransports = exports.DROP_ALL_CUSTOMIZING = void 0;
|
|
13
13
|
const trm_commons_1 = require("trm-commons");
|
|
14
14
|
const transport_1 = require("../../transport");
|
|
15
|
+
const ADD_OPTION = "add";
|
|
16
|
+
const DONE_OPTION = "done";
|
|
17
|
+
const normalizeTrkorr = (trkorr) => trkorr.trim().toUpperCase();
|
|
18
|
+
/** Keyword of `dropCustomizingTransports` that drops every transport carried over from the latest release. */
|
|
19
|
+
exports.DROP_ALL_CUSTOMIZING = "ALL";
|
|
20
|
+
/**
|
|
21
|
+
* Resolve the carried-over transports to drop. Every identifier must name a customizing transport
|
|
22
|
+
* of the latest release (or be the `all` keyword), and none may also be requested as an addition.
|
|
23
|
+
*/
|
|
24
|
+
const resolveDroppedTransports = (dropInput, latestByTrkorr, requested) => {
|
|
25
|
+
const dropList = [...new Set((dropInput !== null && dropInput !== void 0 ? dropInput : []).map(normalizeTrkorr).filter(trkorr => trkorr.length > 0))];
|
|
26
|
+
if (dropList.includes(exports.DROP_ALL_CUSTOMIZING)) {
|
|
27
|
+
if (dropList.length > 1) {
|
|
28
|
+
throw new Error(`Customizing transports to drop: "${exports.DROP_ALL_CUSTOMIZING.toLowerCase()}" cannot be combined with transport requests`);
|
|
29
|
+
}
|
|
30
|
+
dropList.splice(0, 1, ...latestByTrkorr.keys());
|
|
31
|
+
}
|
|
32
|
+
const unknown = dropList.filter(trkorr => !latestByTrkorr.has(trkorr));
|
|
33
|
+
if (unknown.length > 0) {
|
|
34
|
+
const carriedOver = [...latestByTrkorr.keys()];
|
|
35
|
+
throw new Error(`Cannot drop ${unknown.join(", ")}: not a customizing transport of the latest release (${carriedOver.length > 0 ? `carried over: ${carriedOver.join(", ")}` : "none carried over"})`);
|
|
36
|
+
}
|
|
37
|
+
const conflicting = dropList.filter(trkorr => requested.includes(trkorr));
|
|
38
|
+
if (conflicting.length > 0) {
|
|
39
|
+
throw new Error(`Cannot both add and drop customizing transport ${conflicting.join(", ")}`);
|
|
40
|
+
}
|
|
41
|
+
return new Set(dropList);
|
|
42
|
+
};
|
|
43
|
+
const validateCustomizingTransport = (transport) => __awaiter(void 0, void 0, void 0, function* () {
|
|
44
|
+
const aggregate = [transport, ...(yield transport.getTasks())];
|
|
45
|
+
if ((yield transport.getE070()).trfunction !== "W") {
|
|
46
|
+
//a workbench transport can still be considered customizing if every object it carries
|
|
47
|
+
//is table content (i.e. has a matching E071K key entry) rather than a real repository object
|
|
48
|
+
for (const item of aggregate) {
|
|
49
|
+
const [e071, e071k] = yield Promise.all([item.getE071(), item.getE071K()]);
|
|
50
|
+
const realObject = e071
|
|
51
|
+
.filter(o => o.pgmid !== '*')
|
|
52
|
+
.find(o => !e071k.map(transport_1.getE071KOwner).some(k => k.pgmid === o.pgmid && k.object === o.object && k.objName === o.objName));
|
|
53
|
+
if (realObject) {
|
|
54
|
+
throw new Error(`Transport request must be of type customizing (${realObject.pgmid} ${realObject.object} ${realObject.objName} is not table content)`);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
const entries = yield Promise.all(aggregate.map(item => item.getE071()));
|
|
59
|
+
if (entries.every(item => item.length === 0)) {
|
|
60
|
+
throw new Error("Transport request is empty");
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
/**
|
|
64
|
+
* Retain customizing transports from the latest release (except those the caller drops), validate
|
|
65
|
+
* transports supplied by the user, and optionally let the user update the selection.
|
|
66
|
+
*/
|
|
15
67
|
exports.setCustomizingTransports = {
|
|
16
|
-
name:
|
|
68
|
+
name: "set-customizing-transports",
|
|
17
69
|
filter: (context) => __awaiter(void 0, void 0, void 0, function* () {
|
|
18
|
-
if (context.rawInput.publishData.
|
|
19
|
-
trm_commons_1.Logger.log(`Skipping customizing transports publish (user input)`, true);
|
|
20
|
-
return false;
|
|
21
|
-
}
|
|
22
|
-
else {
|
|
70
|
+
if (!context.rawInput.publishData.noCustomizingTransports) {
|
|
23
71
|
return true;
|
|
24
72
|
}
|
|
73
|
+
trm_commons_1.Logger.log("Skipping customizing transports publish (user input)", true);
|
|
74
|
+
return false;
|
|
25
75
|
}),
|
|
26
76
|
run: (context) => __awaiter(void 0, void 0, void 0, function* () {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
77
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
78
|
+
const publishData = context.rawInput.publishData;
|
|
79
|
+
const latestCustomizingTransports = ((_b = (_a = context.runtime.latest.data) === null || _a === void 0 ? void 0 : _a.transports) !== null && _b !== void 0 ? _b : []).filter(transport => transport.type === transport_1.TrmTransportIdentifier.CUST);
|
|
80
|
+
const latestByTrkorr = new Map(latestCustomizingTransports.map(transport => [normalizeTrkorr(transport.trkorr), transport]));
|
|
81
|
+
trm_commons_1.Logger.loading("Reading customizing transports...", ((_d = (_c = publishData.customizingTransports) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : 0) > 0);
|
|
82
|
+
const droppedTrkorrs = resolveDroppedTransports(publishData.dropCustomizingTransports, latestByTrkorr, ((_e = publishData.customizingTransports) !== null && _e !== void 0 ? _e : []).map(normalizeTrkorr));
|
|
83
|
+
for (const trkorr of droppedTrkorrs) {
|
|
84
|
+
const description = latestByTrkorr.get(trkorr).description;
|
|
85
|
+
trm_commons_1.Logger.info(`Dropping customizing transport ${trkorr}${description ? ` (${description})` : ""} carried over from the latest release`);
|
|
86
|
+
}
|
|
87
|
+
const selectedTrkorrs = [
|
|
88
|
+
...latestCustomizingTransports.map(transport => transport.trkorr),
|
|
89
|
+
...((_f = publishData.customizingTransports) !== null && _f !== void 0 ? _f : [])
|
|
90
|
+
].map(normalizeTrkorr).filter(trkorr => !droppedTrkorrs.has(trkorr));
|
|
91
|
+
publishData.customizingTransports = [...new Set(selectedTrkorrs)];
|
|
92
|
+
let enrichedCustomizing = [];
|
|
93
|
+
for (const trkorr of publishData.customizingTransports) {
|
|
94
|
+
const retainedTransport = latestByTrkorr.get(trkorr);
|
|
95
|
+
if (retainedTransport) {
|
|
96
|
+
enrichedCustomizing.push({ trkorr, description: retainedTransport.description });
|
|
97
|
+
continue;
|
|
98
|
+
}
|
|
99
|
+
const transport = new transport_1.Transport(trkorr);
|
|
100
|
+
try {
|
|
101
|
+
yield validateCustomizingTransport(transport);
|
|
102
|
+
}
|
|
103
|
+
catch (error) {
|
|
104
|
+
const reason = error instanceof Error
|
|
105
|
+
? error.message.toLowerCase()
|
|
106
|
+
: "invalid transport request";
|
|
107
|
+
throw new Error(`Unable to add transport ${trkorr}: ${reason}`);
|
|
108
|
+
}
|
|
109
|
+
enrichedCustomizing.push({
|
|
110
|
+
trkorr,
|
|
111
|
+
description: yield transport.getDescription()
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
if (!context.rawInput.contextData.noInquirer && trm_commons_1.Inquirer.isUi()) {
|
|
115
|
+
const rows = (yield trm_commons_1.Inquirer.prompt({
|
|
116
|
+
message: "Customizing transports",
|
|
117
|
+
name: "customizingTransports",
|
|
118
|
+
type: "input",
|
|
119
|
+
ui: {
|
|
120
|
+
kind: "table",
|
|
121
|
+
addLabel: "Add transport",
|
|
122
|
+
value: enrichedCustomizing,
|
|
123
|
+
columns: [{
|
|
124
|
+
name: "trkorr",
|
|
125
|
+
label: "Transport",
|
|
126
|
+
required: true,
|
|
127
|
+
case: "upper",
|
|
128
|
+
validate: (trkorr) => __awaiter(void 0, void 0, void 0, function* () {
|
|
129
|
+
if (latestByTrkorr.has(trkorr)) {
|
|
130
|
+
return true;
|
|
131
|
+
}
|
|
132
|
+
trm_commons_1.Logger.loading(`Validating ${trkorr}...`);
|
|
133
|
+
try {
|
|
134
|
+
yield validateCustomizingTransport(new transport_1.Transport(trkorr));
|
|
135
|
+
return true;
|
|
136
|
+
}
|
|
137
|
+
catch (error) {
|
|
138
|
+
return error instanceof Error ? error.message : "Invalid transport request";
|
|
139
|
+
}
|
|
140
|
+
finally {
|
|
141
|
+
trm_commons_1.Logger.forceStop();
|
|
142
|
+
}
|
|
143
|
+
})
|
|
144
|
+
}, {
|
|
145
|
+
name: "description",
|
|
146
|
+
label: "Description",
|
|
147
|
+
maxLength: 60,
|
|
148
|
+
placeholder: "Transport description"
|
|
149
|
+
}]
|
|
150
|
+
},
|
|
151
|
+
validate: (input) => {
|
|
152
|
+
const duplicate = input.find((transport, i) => input.findIndex(o => o.trkorr === transport.trkorr) !== i);
|
|
153
|
+
return duplicate ? `${duplicate.trkorr} added more than once` : true;
|
|
154
|
+
}
|
|
155
|
+
})).customizingTransports;
|
|
156
|
+
enrichedCustomizing = [];
|
|
157
|
+
for (const row of rows) {
|
|
158
|
+
const trkorr = normalizeTrkorr(row.trkorr);
|
|
159
|
+
const retainedTransport = latestByTrkorr.get(trkorr);
|
|
160
|
+
enrichedCustomizing.push({
|
|
161
|
+
trkorr,
|
|
162
|
+
//descriptions of transports retained from the latest release can't change
|
|
163
|
+
description: (_g = retainedTransport === null || retainedTransport === void 0 ? void 0 : retainedTransport.description) !== null && _g !== void 0 ? _g : (row.description || (yield new transport_1.Transport(trkorr).getDescription()))
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
else if (!context.rawInput.contextData.noInquirer) {
|
|
168
|
+
const shouldEdit = (yield trm_commons_1.Inquirer.prompt({
|
|
169
|
+
message: enrichedCustomizing.length > 0
|
|
170
|
+
? "Do you want to add more customizing transports?"
|
|
171
|
+
: "Do you want to add customizing transports?",
|
|
172
|
+
name: "continue",
|
|
173
|
+
type: "confirm",
|
|
174
|
+
default: enrichedCustomizing.length > 0
|
|
39
175
|
})).continue;
|
|
40
|
-
if (
|
|
41
|
-
|
|
176
|
+
if (shouldEdit) {
|
|
177
|
+
let option;
|
|
42
178
|
do {
|
|
43
|
-
var options = [];
|
|
44
|
-
for (const transport of customizingTransports) {
|
|
45
|
-
var description;
|
|
46
|
-
try {
|
|
47
|
-
description = yield transport.getDescription();
|
|
48
|
-
}
|
|
49
|
-
catch (_a) {
|
|
50
|
-
description = '';
|
|
51
|
-
}
|
|
52
|
-
options.push({
|
|
53
|
-
name: `- ${transport_1.Transport.getTransportIcon()} ${transport.trkorr} ${description}`.trim(),
|
|
54
|
-
value: transport
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
options.push({
|
|
58
|
-
name: `+ Add`,
|
|
59
|
-
value: 1
|
|
60
|
-
});
|
|
61
|
-
options.push({
|
|
62
|
-
name: `x Done`,
|
|
63
|
-
value: 2
|
|
64
|
-
});
|
|
65
179
|
option = (yield trm_commons_1.Inquirer.prompt({
|
|
66
|
-
message:
|
|
67
|
-
name:
|
|
68
|
-
type:
|
|
69
|
-
choices:
|
|
70
|
-
|
|
180
|
+
message: "Select option",
|
|
181
|
+
name: "option",
|
|
182
|
+
type: "list",
|
|
183
|
+
choices: [
|
|
184
|
+
...enrichedCustomizing.map(transport => ({
|
|
185
|
+
name: `- ${transport_1.Transport.getTransportIcon()} ${transport.trkorr} ${transport.description}`.trim(),
|
|
186
|
+
value: transport
|
|
187
|
+
})),
|
|
188
|
+
{ name: "+ Add", value: ADD_OPTION },
|
|
189
|
+
{ name: "x Done", value: DONE_OPTION }
|
|
190
|
+
],
|
|
191
|
+
default: ADD_OPTION
|
|
71
192
|
})).option;
|
|
72
|
-
if (option ===
|
|
193
|
+
if (option === ADD_OPTION) {
|
|
73
194
|
const trkorr = (yield trm_commons_1.Inquirer.prompt({
|
|
74
|
-
message:
|
|
75
|
-
name:
|
|
76
|
-
type:
|
|
195
|
+
message: "Input customizing transport request",
|
|
196
|
+
name: "trkorr",
|
|
197
|
+
type: "input",
|
|
77
198
|
validate: (input) => __awaiter(void 0, void 0, void 0, function* () {
|
|
199
|
+
const normalizedInput = normalizeTrkorr(input);
|
|
200
|
+
if (enrichedCustomizing.some(transport => transport.trkorr === normalizedInput)) {
|
|
201
|
+
return "Already added";
|
|
202
|
+
}
|
|
203
|
+
if (latestByTrkorr.has(normalizedInput)) {
|
|
204
|
+
return true;
|
|
205
|
+
}
|
|
206
|
+
trm_commons_1.Logger.loading(`Validating ${normalizedInput}...`);
|
|
78
207
|
try {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}
|
|
82
|
-
const trFunction = (yield (new transport_1.Transport(input.trim())).getE070()).trfunction;
|
|
83
|
-
if (trFunction !== 'W') {
|
|
84
|
-
return 'Transport request must be of type customizing';
|
|
85
|
-
}
|
|
86
|
-
else {
|
|
87
|
-
return true;
|
|
88
|
-
}
|
|
208
|
+
yield validateCustomizingTransport(new transport_1.Transport(normalizedInput));
|
|
209
|
+
return true;
|
|
89
210
|
}
|
|
90
|
-
catch (
|
|
91
|
-
return
|
|
211
|
+
catch (error) {
|
|
212
|
+
return error instanceof Error ? error.message : "Invalid transport request";
|
|
213
|
+
}
|
|
214
|
+
finally {
|
|
215
|
+
trm_commons_1.Logger.forceStop();
|
|
92
216
|
}
|
|
93
217
|
})
|
|
94
218
|
})).trkorr;
|
|
95
|
-
|
|
219
|
+
if (trkorr) {
|
|
220
|
+
const normalizedTrkorr = normalizeTrkorr(trkorr);
|
|
221
|
+
const retainedTransport = latestByTrkorr.get(normalizedTrkorr);
|
|
222
|
+
enrichedCustomizing.push({
|
|
223
|
+
trkorr: normalizedTrkorr,
|
|
224
|
+
description: (_h = retainedTransport === null || retainedTransport === void 0 ? void 0 : retainedTransport.description) !== null && _h !== void 0 ? _h : yield new transport_1.Transport(normalizedTrkorr).getDescription()
|
|
225
|
+
});
|
|
226
|
+
}
|
|
96
227
|
}
|
|
97
|
-
else if (option
|
|
98
|
-
|
|
228
|
+
else if (typeof option === "object") {
|
|
229
|
+
const selectedTrkorr = option.trkorr;
|
|
230
|
+
//a retained transport carries the customizing of the latest release: dropping it is not undone by re-adding a request
|
|
231
|
+
const remove = !latestByTrkorr.has(selectedTrkorr) || (yield trm_commons_1.Inquirer.prompt({
|
|
232
|
+
message: `${selectedTrkorr} carries customizing of the latest release. Remove it from this release?`,
|
|
233
|
+
name: "remove",
|
|
234
|
+
type: "confirm",
|
|
235
|
+
default: false
|
|
236
|
+
})).remove;
|
|
237
|
+
if (remove) {
|
|
238
|
+
enrichedCustomizing = enrichedCustomizing.filter(transport => transport.trkorr !== selectedTrkorr);
|
|
239
|
+
}
|
|
99
240
|
}
|
|
100
|
-
} while (option !==
|
|
241
|
+
} while (option !== DONE_OPTION);
|
|
101
242
|
}
|
|
102
|
-
const
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
const e070 = yield transport.getE070();
|
|
106
|
-
if (e070.trfunction !== 'W') {
|
|
107
|
-
trm_commons_1.Logger.warning(`Transport ${transport.trkorr} is not of type customizing`);
|
|
108
|
-
throw new Error();
|
|
109
|
-
}
|
|
110
|
-
const tasks = yield transport.getTasks();
|
|
111
|
-
var desc = yield transport.getDescription();
|
|
112
|
-
if (!context.rawInput.contextData.noInquirer) {
|
|
113
|
-
desc = (yield trm_commons_1.Inquirer.prompt({
|
|
114
|
-
message: `Description of ${transport.trkorr}`,
|
|
115
|
-
type: 'input',
|
|
116
|
-
name: 'desc',
|
|
117
|
-
default: desc,
|
|
118
|
-
validate: (input) => {
|
|
119
|
-
if (input.length > maxDescLength) {
|
|
120
|
-
return `Description cannot exceede ${maxDescLength} characters`;
|
|
121
|
-
}
|
|
122
|
-
else {
|
|
123
|
-
return true;
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
})).desc || desc;
|
|
127
|
-
}
|
|
128
|
-
context.runtime.systemData.originCustomizing.push({
|
|
129
|
-
transports: [transport].concat(tasks),
|
|
130
|
-
description: desc
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
|
-
catch (_b) {
|
|
134
|
-
trm_commons_1.Logger.warning(`Invalid transport ${transport.trkorr}, ignored`);
|
|
243
|
+
for (const transport of enrichedCustomizing) {
|
|
244
|
+
if (latestByTrkorr.has(transport.trkorr)) {
|
|
245
|
+
continue;
|
|
135
246
|
}
|
|
247
|
+
transport.description = (yield trm_commons_1.Inquirer.prompt({
|
|
248
|
+
message: `Description of ${transport.trkorr}`,
|
|
249
|
+
type: "input",
|
|
250
|
+
name: "description",
|
|
251
|
+
default: transport.description,
|
|
252
|
+
validate: (input) => input.length <= 60 || "Description cannot exceed 60 characters"
|
|
253
|
+
})).description || transport.description;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
for (const transport of enrichedCustomizing) {
|
|
257
|
+
if (latestByTrkorr.has(transport.trkorr)) {
|
|
258
|
+
context.runtime.customizing.retained.push(transport);
|
|
259
|
+
}
|
|
260
|
+
else {
|
|
261
|
+
context.runtime.customizing.new.push(transport);
|
|
136
262
|
}
|
|
137
263
|
}
|
|
138
264
|
})
|
|
@@ -1,3 +1,25 @@
|
|
|
1
1
|
import { Step } from "@simonegaffurini/sammarksworkflow";
|
|
2
2
|
import { PublishWorkflowContext } from ".";
|
|
3
|
+
/**
|
|
4
|
+
* Workflow step that merges, collects, normalizes, and serializes release manifest values.
|
|
5
|
+
*
|
|
6
|
+
* 1- check if previous release manifest values should be copied
|
|
7
|
+
*
|
|
8
|
+
* 2- input manifest values
|
|
9
|
+
*
|
|
10
|
+
* 3- set namespace values (if necessary)
|
|
11
|
+
*
|
|
12
|
+
* 4- set registry endpoint
|
|
13
|
+
*
|
|
14
|
+
* 5- set post install activities
|
|
15
|
+
*
|
|
16
|
+
* 6- edit dependencies/sap entries/engines
|
|
17
|
+
*
|
|
18
|
+
* 7- normalize manifest values
|
|
19
|
+
*
|
|
20
|
+
* 8- transform into xml
|
|
21
|
+
*
|
|
22
|
+
* 9- generate trm package
|
|
23
|
+
*
|
|
24
|
+
*/
|
|
3
25
|
export declare const setManifestValues: Step<PublishWorkflowContext>;
|