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.
Files changed (384) hide show
  1. package/README.md +20 -0
  2. package/changelog.txt +11 -0
  3. package/dist/actions/cg3y/download.js +34 -4
  4. package/dist/actions/cg3y/index.d.ts +23 -0
  5. package/dist/actions/cg3y/index.js +13 -10
  6. package/dist/actions/cg3z/index.d.ts +67 -3
  7. package/dist/actions/cg3z/index.js +25 -14
  8. package/dist/actions/cg3z/upload.d.ts +20 -0
  9. package/dist/actions/cg3z/upload.js +165 -36
  10. package/dist/actions/checkEngines/analyze.d.ts +11 -0
  11. package/dist/actions/checkEngines/analyze.js +294 -0
  12. package/dist/actions/checkEngines/index.d.ts +87 -0
  13. package/dist/actions/checkEngines/index.js +38 -0
  14. package/dist/actions/checkEngines/init.d.ts +11 -0
  15. package/dist/actions/checkEngines/init.js +45 -0
  16. package/dist/actions/checkPackageDependencies/analyze.d.ts +10 -0
  17. package/dist/actions/checkPackageDependencies/analyze.js +37 -39
  18. package/dist/actions/checkPackageDependencies/index.d.ts +56 -0
  19. package/dist/actions/checkPackageDependencies/index.js +13 -10
  20. package/dist/actions/checkPackageDependencies/init.d.ts +8 -0
  21. package/dist/actions/checkPackageDependencies/init.js +24 -2
  22. package/dist/actions/checkSapEntries/analyze.d.ts +12 -0
  23. package/dist/actions/checkSapEntries/analyze.js +63 -47
  24. package/dist/actions/checkSapEntries/index.d.ts +35 -0
  25. package/dist/actions/checkSapEntries/index.js +12 -10
  26. package/dist/actions/checkSapEntries/init.d.ts +8 -0
  27. package/dist/actions/checkSapEntries/init.js +10 -2
  28. package/dist/actions/commons/IActionContext.d.ts +10 -0
  29. package/dist/actions/commons/checkServerAuth.d.ts +7 -0
  30. package/dist/actions/commons/checkServerAuth.js +10 -5
  31. package/dist/actions/commons/index.d.ts +1 -1
  32. package/dist/actions/commons/index.js +1 -1
  33. package/dist/actions/commons/prompts/index.d.ts +1 -0
  34. package/dist/actions/commons/prompts/index.js +1 -0
  35. package/dist/actions/commons/prompts/setLandscapeTarget.d.ts +14 -0
  36. package/dist/actions/commons/prompts/setLandscapeTarget.js +40 -0
  37. package/dist/actions/commons/prompts/setTransportTarget.d.ts +15 -0
  38. package/dist/actions/commons/prompts/setTransportTarget.js +20 -2
  39. package/dist/actions/commons/setSystemPackages.d.ts +7 -0
  40. package/dist/actions/commons/setSystemPackages.js +12 -2
  41. package/dist/actions/commons/utils/actionLocks.d.ts +32 -0
  42. package/dist/actions/commons/utils/actionLocks.js +135 -0
  43. package/dist/actions/commons/utils/dirtyEntries.d.ts +12 -0
  44. package/dist/actions/commons/utils/dirtyEntries.js +54 -0
  45. package/dist/actions/commons/utils/index.d.ts +10 -0
  46. package/dist/actions/commons/utils/index.js +26 -0
  47. package/dist/actions/commons/utils/installRegistry.d.ts +18 -0
  48. package/dist/actions/commons/utils/installRegistry.js +46 -0
  49. package/dist/actions/commons/utils/installedDependency.d.ts +15 -0
  50. package/dist/actions/commons/utils/installedDependency.js +30 -0
  51. package/dist/actions/commons/utils/owningInstallation.d.ts +6 -0
  52. package/dist/actions/commons/utils/owningInstallation.js +47 -0
  53. package/dist/actions/commons/utils/packageCleanup.d.ts +168 -0
  54. package/dist/actions/commons/utils/packageCleanup.js +1017 -0
  55. package/dist/actions/commons/utils/releaseDeletionTransport.d.ts +5 -0
  56. package/dist/actions/commons/utils/releaseDeletionTransport.js +67 -0
  57. package/dist/actions/commons/utils/restoreTransport.d.ts +6 -0
  58. package/dist/actions/commons/utils/restoreTransport.js +50 -0
  59. package/dist/actions/commons/utils/retainedWorkflow.d.ts +6 -0
  60. package/dist/actions/commons/utils/retainedWorkflow.js +49 -0
  61. package/dist/actions/commons/utils/withScopedPrefix.d.ts +5 -0
  62. package/dist/actions/commons/utils/withScopedPrefix.js +32 -0
  63. package/dist/actions/commons/workflowCallbacks.d.ts +21 -0
  64. package/dist/actions/commons/workflowCallbacks.js +157 -0
  65. package/dist/actions/index.d.ts +3 -0
  66. package/dist/actions/index.js +5 -0
  67. package/dist/actions/install/addNamespace.d.ts +18 -0
  68. package/dist/actions/install/addNamespace.js +121 -51
  69. package/dist/actions/install/checkDependants.d.ts +15 -0
  70. package/dist/actions/install/checkDependants.js +74 -0
  71. package/dist/actions/install/checkDependencies.d.ts +11 -0
  72. package/dist/actions/install/checkDependencies.js +32 -13
  73. package/dist/actions/install/checkDependencyCycles.d.ts +17 -0
  74. package/dist/actions/install/checkDependencyCycles.js +105 -0
  75. package/dist/actions/install/checkEngines.d.ts +11 -0
  76. package/dist/actions/install/checkEngines.js +100 -0
  77. package/dist/actions/install/checkInstallDevclass.d.ts +24 -0
  78. package/dist/actions/install/checkInstallDevclass.js +110 -0
  79. package/dist/actions/install/checkSapEntries.d.ts +9 -0
  80. package/dist/actions/install/checkSapEntries.js +20 -12
  81. package/dist/actions/install/checkTransports.d.ts +34 -0
  82. package/dist/actions/install/checkTransports.js +329 -170
  83. package/dist/actions/install/cleanupCheckpoint.d.ts +11 -0
  84. package/dist/actions/install/cleanupCheckpoint.js +62 -0
  85. package/dist/actions/install/defaultTransportLayer.d.ts +5 -0
  86. package/dist/actions/install/defaultTransportLayer.js +36 -0
  87. package/dist/actions/install/executePostActivities.d.ts +6 -0
  88. package/dist/actions/install/executePostActivities.js +28 -38
  89. package/dist/actions/install/generateDevclass.d.ts +10 -0
  90. package/dist/actions/install/generateDevclass.js +66 -20
  91. package/dist/actions/install/generateLandscapeTransport.d.ts +23 -0
  92. package/dist/actions/install/generateLandscapeTransport.js +136 -0
  93. package/dist/actions/install/generateUpdateTransport.d.ts +20 -0
  94. package/dist/actions/install/generateUpdateTransport.js +122 -0
  95. package/dist/actions/install/importBatch.d.ts +22 -0
  96. package/dist/actions/install/importBatch.js +0 -0
  97. package/dist/actions/install/index.d.ts +273 -44
  98. package/dist/actions/install/index.js +139 -59
  99. package/dist/actions/install/init.d.ts +14 -0
  100. package/dist/actions/install/init.js +215 -108
  101. package/dist/actions/install/installDependencies.d.ts +14 -0
  102. package/dist/actions/install/installDependencies.js +122 -45
  103. package/dist/actions/install/lockResources.d.ts +8 -0
  104. package/dist/actions/install/lockResources.js +100 -0
  105. package/dist/actions/install/prepareCust.d.ts +13 -0
  106. package/dist/actions/install/prepareCust.js +138 -0
  107. package/dist/actions/install/prepareDevc.d.ts +15 -0
  108. package/dist/actions/install/prepareDevc.js +113 -0
  109. package/dist/actions/install/prepareLang.d.ts +13 -0
  110. package/dist/actions/install/prepareLang.js +110 -0
  111. package/dist/actions/install/prepareTadir.d.ts +13 -0
  112. package/dist/actions/install/prepareTadir.js +95 -0
  113. package/dist/actions/install/releaseLandscapeTransport.d.ts +11 -0
  114. package/dist/actions/install/releaseLandscapeTransport.js +79 -0
  115. package/dist/actions/install/setInstallDevclass.d.ts +10 -0
  116. package/dist/actions/install/setInstallDevclass.js +140 -54
  117. package/dist/actions/install/updatePackageData.d.ts +9 -0
  118. package/dist/actions/install/updatePackageData.js +117 -13
  119. package/dist/actions/installDependency/checkInstalledRelease.d.ts +13 -0
  120. package/dist/actions/installDependency/checkInstalledRelease.js +50 -0
  121. package/dist/actions/installDependency/confirmDowngrade.d.ts +11 -0
  122. package/dist/actions/installDependency/confirmDowngrade.js +53 -0
  123. package/dist/actions/installDependency/findInstallRelease.d.ts +24 -0
  124. package/dist/actions/installDependency/findInstallRelease.js +42 -19
  125. package/dist/actions/installDependency/index.d.ts +64 -3
  126. package/dist/actions/installDependency/index.js +30 -13
  127. package/dist/actions/installDependency/init.d.ts +14 -0
  128. package/dist/actions/installDependency/init.js +24 -3
  129. package/dist/actions/installDependency/installRelease.d.ts +6 -0
  130. package/dist/actions/installDependency/installRelease.js +22 -12
  131. package/dist/actions/publish/enginesUi.d.ts +53 -0
  132. package/dist/actions/publish/enginesUi.js +289 -0
  133. package/dist/actions/publish/findDependencies.d.ts +19 -0
  134. package/dist/actions/publish/findDependencies.js +72 -37
  135. package/dist/actions/publish/generateCustTransport.d.ts +6 -0
  136. package/dist/actions/publish/generateCustTransport.js +42 -19
  137. package/dist/actions/publish/generateDevcTransport.d.ts +6 -0
  138. package/dist/actions/publish/generateDevcTransport.js +16 -18
  139. package/dist/actions/publish/generateLangTransport.d.ts +6 -0
  140. package/dist/actions/publish/generateLangTransport.js +20 -23
  141. package/dist/actions/publish/generateTadirTransport.d.ts +6 -0
  142. package/dist/actions/publish/generateTadirTransport.js +18 -17
  143. package/dist/actions/publish/getSystemEngines.d.ts +27 -0
  144. package/dist/actions/publish/getSystemEngines.js +112 -0
  145. package/dist/actions/publish/index.d.ts +162 -37
  146. package/dist/actions/publish/index.js +51 -34
  147. package/dist/actions/publish/init.d.ts +28 -0
  148. package/dist/actions/publish/init.js +304 -120
  149. package/dist/actions/publish/lockResources.d.ts +4 -0
  150. package/dist/actions/{install/refreshTmsTxt.js → publish/lockResources.js} +14 -17
  151. package/dist/actions/publish/publishToRegistry.d.ts +8 -0
  152. package/dist/actions/publish/publishToRegistry.js +18 -8
  153. package/dist/actions/publish/releaseTransports.d.ts +6 -0
  154. package/dist/actions/publish/releaseTransports.js +48 -20
  155. package/dist/actions/publish/setCustomizingTransports.d.ts +6 -0
  156. package/dist/actions/publish/setCustomizingTransports.js +227 -101
  157. package/dist/actions/publish/setManifestValues.d.ts +22 -0
  158. package/dist/actions/publish/setManifestValues.js +455 -119
  159. package/dist/actions/publish/setOptionalPublishData.d.ts +11 -0
  160. package/dist/actions/publish/setOptionalPublishData.js +133 -0
  161. package/dist/actions/publish/updatePackageData.d.ts +8 -0
  162. package/dist/actions/publish/updatePackageData.js +20 -7
  163. package/dist/actions/stopWarning.d.ts +5 -0
  164. package/dist/actions/stopWarning.js +5 -0
  165. package/dist/actions/uninstall/checkDependants.d.ts +7 -0
  166. package/dist/actions/uninstall/checkDependants.js +55 -0
  167. package/dist/actions/uninstall/forwardDeletionTransport.d.ts +10 -0
  168. package/dist/actions/uninstall/forwardDeletionTransport.js +51 -0
  169. package/dist/actions/uninstall/generateDeletionTransport.d.ts +10 -0
  170. package/dist/actions/uninstall/generateDeletionTransport.js +45 -0
  171. package/dist/actions/uninstall/index.d.ts +153 -0
  172. package/dist/actions/uninstall/index.js +141 -0
  173. package/dist/actions/uninstall/init.d.ts +17 -0
  174. package/dist/actions/uninstall/init.js +146 -0
  175. package/dist/actions/uninstall/lockResources.d.ts +4 -0
  176. package/dist/actions/{publish/setTransportTarget.js → uninstall/lockResources.js} +16 -7
  177. package/dist/actions/uninstall/removePackageData.d.ts +9 -0
  178. package/dist/actions/uninstall/removePackageData.js +64 -0
  179. package/dist/actions/uninstall/uninstallNestedPackages.d.ts +26 -0
  180. package/dist/actions/uninstall/uninstallNestedPackages.js +174 -0
  181. package/dist/client/ClientError.d.ts +3 -1
  182. package/dist/client/ClientError.js +2 -1
  183. package/dist/client/RESTClient.d.ts +18 -5
  184. package/dist/client/RESTClient.js +194 -52
  185. package/dist/client/RESTClientError.d.ts +1 -2
  186. package/dist/client/RESTClientError.js +3 -2
  187. package/dist/client/RFCClient.d.ts +28 -7
  188. package/dist/client/RFCClient.js +325 -77
  189. package/dist/client/RFCClientError.d.ts +1 -1
  190. package/dist/client/RFCClientError.js +2 -2
  191. package/dist/client/TransportEntries.d.ts +8 -0
  192. package/dist/client/TransportEntries.js +2 -0
  193. package/dist/client/components/BORM_ID.d.ts +1 -0
  194. package/dist/client/components/BORM_ID.js +2 -0
  195. package/dist/client/components/BORM_NAME.d.ts +1 -0
  196. package/dist/client/components/BORM_NAME.js +2 -0
  197. package/dist/client/components/BORM_NAMEL.d.ts +1 -0
  198. package/dist/client/components/BORM_NAMEL.js +2 -0
  199. package/dist/client/components/BORM_VEND.d.ts +1 -0
  200. package/dist/client/components/BORM_VEND.js +2 -0
  201. package/dist/client/components/BORM_VERS.d.ts +1 -0
  202. package/dist/client/components/BORM_VERS.js +2 -0
  203. package/dist/client/components/CWBNTNUMM.d.ts +1 -0
  204. package/dist/client/components/CWBNTNUMM.js +2 -0
  205. package/dist/client/components/CWBNTSTAT.d.ts +1 -0
  206. package/dist/client/components/CWBNTSTAT.js +2 -0
  207. package/dist/client/components/CWBNTVERS.d.ts +1 -0
  208. package/dist/client/components/CWBNTVERS.js +2 -0
  209. package/dist/client/components/CWBPRSTAT.d.ts +1 -0
  210. package/dist/client/components/CWBPRSTAT.js +2 -0
  211. package/dist/client/components/INSTSTATE.d.ts +1 -0
  212. package/dist/client/components/INSTSTATE.js +2 -0
  213. package/dist/client/components/RELC_TYPE.d.ts +1 -0
  214. package/dist/client/components/RELC_TYPE.js +2 -0
  215. package/dist/client/components/SAPPATCHLV.d.ts +1 -0
  216. package/dist/client/components/SAPPATCHLV.js +2 -0
  217. package/dist/client/components/SAPRELEASE.d.ts +1 -0
  218. package/dist/client/components/SAPRELEASE.js +2 -0
  219. package/dist/client/components/SYSYSID.d.ts +1 -0
  220. package/dist/client/components/SYSYSID.js +2 -0
  221. package/dist/client/components/ZTRM_INSTALLTR_TYPE.d.ts +1 -0
  222. package/dist/client/components/ZTRM_INSTALLTR_TYPE.js +2 -0
  223. package/dist/client/components/index.d.ts +15 -0
  224. package/dist/client/components/index.js +15 -0
  225. package/dist/client/index.d.ts +1 -0
  226. package/dist/client/index.js +1 -0
  227. package/dist/client/messageLog.d.ts +7 -0
  228. package/dist/client/messageLog.js +21 -0
  229. package/dist/client/struct/ActionLockKey.d.ts +6 -0
  230. package/dist/client/struct/ActionLockKey.js +2 -0
  231. package/dist/client/struct/CVERS.d.ts +7 -0
  232. package/dist/client/struct/CVERS.js +2 -0
  233. package/dist/client/struct/CWBNTCUST.d.ts +6 -0
  234. package/dist/client/struct/CWBNTCUST.js +2 -0
  235. package/dist/client/struct/CWBNTHEAD.d.ts +5 -0
  236. package/dist/client/struct/CWBNTHEAD.js +2 -0
  237. package/dist/client/struct/E070.d.ts +2 -1
  238. package/dist/client/struct/E071K.d.ts +9 -0
  239. package/dist/client/struct/E071K.js +2 -0
  240. package/dist/client/struct/PRDVERS.d.ts +9 -0
  241. package/dist/client/struct/PRDVERS.js +2 -0
  242. package/dist/client/struct/SCOMPKDTLN.d.ts +21 -0
  243. package/dist/client/struct/STMSCALERT.d.ts +21 -0
  244. package/dist/client/struct/STMSCALERT.js +2 -0
  245. package/dist/client/struct/STMS_TP_IMPORT.d.ts +14 -0
  246. package/dist/client/struct/STMS_TP_IMPORT.js +2 -0
  247. package/dist/client/struct/STMS_TR_REQUEST.d.ts +8 -0
  248. package/dist/client/struct/STMS_TR_REQUEST.js +2 -0
  249. package/dist/client/struct/TDEVC.d.ts +38 -0
  250. package/dist/client/struct/TPLOGPTR.d.ts +13 -0
  251. package/dist/client/struct/TPLOGPTR.js +2 -0
  252. package/dist/client/struct/TPSTDOUT.d.ts +3 -0
  253. package/dist/client/struct/TPSTDOUT.js +2 -0
  254. package/dist/client/struct/ZTRM_INSTALLTR.d.ts +8 -0
  255. package/dist/client/struct/ZTRM_INSTALLTR.js +2 -0
  256. package/dist/client/struct/index.d.ts +12 -0
  257. package/dist/client/struct/index.js +12 -0
  258. package/dist/commons/checkCoreTrmDependencies.js +1 -1
  259. package/dist/commons/getAxiosInstance.js +8 -17
  260. package/dist/commons/getNodePackage.js +7 -0
  261. package/dist/commons/getPackageHierarchy.js +2 -0
  262. package/dist/commons/getPackagesNamespace.d.ts +9 -0
  263. package/dist/commons/getPackagesNamespace.js +19 -0
  264. package/dist/commons/index.d.ts +4 -0
  265. package/dist/commons/index.js +4 -0
  266. package/dist/commons/packageDataFromTdevc.d.ts +12 -0
  267. package/dist/commons/packageDataFromTdevc.js +25 -0
  268. package/dist/commons/resolveCoreVersion.d.ts +10 -0
  269. package/dist/commons/resolveCoreVersion.js +24 -0
  270. package/dist/commons/summarizeForLog.d.ts +22 -0
  271. package/dist/commons/summarizeForLog.js +120 -0
  272. package/dist/connection/OpenRFCConnect.d.ts +13 -0
  273. package/dist/connection/OpenRFCConnect.js +23 -0
  274. package/dist/connection/index.d.ts +1 -0
  275. package/dist/connection/index.js +17 -0
  276. package/dist/dependencies/PackageDependencies.d.ts +2 -0
  277. package/dist/dependencies/PackageDependencies.js +24 -0
  278. package/dist/index.d.ts +1 -0
  279. package/dist/index.js +1 -0
  280. package/dist/lockfile/Lockfile.d.ts +23 -1
  281. package/dist/lockfile/Lockfile.js +45 -9
  282. package/dist/manifest/Manifest.d.ts +9 -5
  283. package/dist/manifest/Manifest.js +82 -29
  284. package/dist/manifest/PostActivity.js +3 -3
  285. package/dist/manifest/TrmManifest.d.ts +0 -2
  286. package/dist/manifest/TrmManifestBase.d.ts +2 -0
  287. package/dist/manifest/TrmManifestEngines.d.ts +64 -0
  288. package/dist/manifest/TrmManifestEngines.js +2 -0
  289. package/dist/manifest/engines/index.d.ts +2 -0
  290. package/dist/manifest/engines/index.js +18 -0
  291. package/dist/manifest/engines/sapRange.d.ts +38 -0
  292. package/dist/manifest/engines/sapRange.js +135 -0
  293. package/dist/manifest/engines/validateEngines.d.ts +44 -0
  294. package/dist/manifest/engines/validateEngines.js +282 -0
  295. package/dist/manifest/index.d.ts +3 -0
  296. package/dist/manifest/index.js +3 -0
  297. package/dist/manifest/sapEntries.d.ts +14 -0
  298. package/dist/manifest/sapEntries.js +63 -0
  299. package/dist/protocol/Protocol.js +7 -0
  300. package/dist/registry/AbstractRegistry.d.ts +18 -3
  301. package/dist/registry/FileSystem.d.ts +22 -13
  302. package/dist/registry/FileSystem.js +69 -18
  303. package/dist/registry/RegistryDeletionTransportUnauthorizedError.d.ts +4 -0
  304. package/dist/registry/RegistryDeletionTransportUnauthorizedError.js +12 -0
  305. package/dist/registry/RegistryDeletionTransportUnavailableError.d.ts +9 -0
  306. package/dist/registry/RegistryDeletionTransportUnavailableError.js +17 -0
  307. package/dist/registry/RegistryPackageNotFoundError.d.ts +7 -0
  308. package/dist/registry/RegistryPackageNotFoundError.js +14 -0
  309. package/dist/registry/RegistryV2.d.ts +15 -5
  310. package/dist/registry/RegistryV2.js +308 -48
  311. package/dist/registry/index.d.ts +4 -0
  312. package/dist/registry/index.js +4 -0
  313. package/dist/registry/registryKey.d.ts +7 -0
  314. package/dist/registry/registryKey.js +21 -0
  315. package/dist/systemConnector/ActionLock.d.ts +1 -0
  316. package/dist/systemConnector/ActionLock.js +2 -0
  317. package/dist/systemConnector/ISystemConnector.d.ts +21 -4
  318. package/dist/systemConnector/ISystemConnectorBase.d.ts +16 -0
  319. package/dist/systemConnector/InstallTransport.d.ts +6 -0
  320. package/dist/systemConnector/InstallTransport.js +2 -0
  321. package/dist/systemConnector/OpenRFCSystemConnector.d.ts +12 -0
  322. package/dist/systemConnector/OpenRFCSystemConnector.js +51 -0
  323. package/dist/systemConnector/RESTSystemConnector.d.ts +22 -7
  324. package/dist/systemConnector/RESTSystemConnector.js +95 -23
  325. package/dist/systemConnector/RFCConnection.d.ts +0 -1
  326. package/dist/systemConnector/RFCSystemConnector.d.ts +25 -7
  327. package/dist/systemConnector/RFCSystemConnector.js +75 -16
  328. package/dist/systemConnector/SystemConnector.d.ts +38 -6
  329. package/dist/systemConnector/SystemConnector.js +138 -12
  330. package/dist/systemConnector/SystemConnectorBase.d.ts +24 -1
  331. package/dist/systemConnector/SystemConnectorBase.js +174 -22
  332. package/dist/systemConnector/index.d.ts +3 -0
  333. package/dist/systemConnector/index.js +3 -0
  334. package/dist/transport/E071KOwner.d.ts +10 -0
  335. package/dist/transport/E071KOwner.js +15 -0
  336. package/dist/transport/R3transLogParser.d.ts +19 -0
  337. package/dist/transport/R3transLogParser.js +148 -0
  338. package/dist/transport/Transport.d.ts +36 -3
  339. package/dist/transport/Transport.js +304 -138
  340. package/dist/transport/index.d.ts +2 -0
  341. package/dist/transport/index.js +2 -0
  342. package/dist/trmPackage/TransportBinary.d.ts +4 -1
  343. package/dist/trmPackage/TrmArtifact.d.ts +12 -8
  344. package/dist/trmPackage/TrmArtifact.js +93 -74
  345. package/dist/trmPackage/TrmPackage.d.ts +20 -6
  346. package/dist/trmPackage/TrmPackage.js +27 -1
  347. package/dist/validators/validateDevclass.js +4 -0
  348. package/package.json +15 -7
  349. package/dist/actions/commons/trmServerPa.d.ts +0 -3
  350. package/dist/actions/commons/trmServerPa.js +0 -40
  351. package/dist/actions/install/checkAlreadyInstalled.d.ts +0 -3
  352. package/dist/actions/install/checkAlreadyInstalled.js +0 -71
  353. package/dist/actions/install/checkObjectTypes.d.ts +0 -3
  354. package/dist/actions/install/checkObjectTypes.js +0 -50
  355. package/dist/actions/install/checkObjectsLock.d.ts +0 -3
  356. package/dist/actions/install/checkObjectsLock.js +0 -52
  357. package/dist/actions/install/generateInstallTransports.d.ts +0 -3
  358. package/dist/actions/install/generateInstallTransports.js +0 -128
  359. package/dist/actions/install/importCustTransport.d.ts +0 -3
  360. package/dist/actions/install/importCustTransport.js +0 -73
  361. package/dist/actions/install/importDevcTransport.d.ts +0 -3
  362. package/dist/actions/install/importDevcTransport.js +0 -93
  363. package/dist/actions/install/importLangTransport.d.ts +0 -3
  364. package/dist/actions/install/importLangTransport.js +0 -72
  365. package/dist/actions/install/importTadirTransport.d.ts +0 -3
  366. package/dist/actions/install/importTadirTransport.js +0 -83
  367. package/dist/actions/install/readDevc.d.ts +0 -3
  368. package/dist/actions/install/readDevc.js +0 -33
  369. package/dist/actions/install/readTadir.d.ts +0 -3
  370. package/dist/actions/install/readTadir.js +0 -101
  371. package/dist/actions/install/refreshTmsTxt.d.ts +0 -3
  372. package/dist/actions/install/releaseInstallTransport.d.ts +0 -3
  373. package/dist/actions/install/releaseInstallTransport.js +0 -80
  374. package/dist/actions/publish/checkAllObjectsReleased.d.ts +0 -3
  375. package/dist/actions/publish/checkAllObjectsReleased.js +0 -46
  376. package/dist/actions/publish/getSourceCode.d.ts +0 -3
  377. package/dist/actions/publish/getSourceCode.js +0 -49
  378. package/dist/actions/publish/setChangelog.d.ts +0 -3
  379. package/dist/actions/publish/setChangelog.js +0 -69
  380. package/dist/actions/publish/setDevclass.d.ts +0 -3
  381. package/dist/actions/publish/setDevclass.js +0 -74
  382. package/dist/actions/publish/setReadme.d.ts +0 -3
  383. package/dist/actions/publish/setReadme.js +0 -52
  384. package/dist/actions/publish/setTransportTarget.d.ts +0 -3
@@ -0,0 +1,289 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ENGINES_UI_COLUMNS = void 0;
4
+ exports.enginesToUiRows = enginesToUiRows;
5
+ exports.uiRowsToEnginesSection = uiRowsToEnginesSection;
6
+ exports.uiRowsToEngines = uiRowsToEngines;
7
+ exports.validateEnginesUiSection = validateEnginesUiSection;
8
+ const manifest_1 = require("../../manifest");
9
+ //name of the nested table column and its properties, per versioned section
10
+ const VERSIONED_SECTIONS = {
11
+ components: { nested: 'constraints', props: { release: 'release', sp: 'number' } },
12
+ products: { nested: 'versions', props: { version: 'version' } }
13
+ };
14
+ function versionedToRows(section, map) {
15
+ const { nested, props } = VERSIONED_SECTIONS[section];
16
+ return Object.keys(map || {}).map(name => {
17
+ const value = map[name];
18
+ if (value === false) {
19
+ return { name, notInstalled: true };
20
+ }
21
+ const constraints = value === true ? [] : (Array.isArray(value) ? value : [value]);
22
+ return {
23
+ name,
24
+ notInstalled: false,
25
+ [nested]: constraints.map(constraint => {
26
+ const row = {};
27
+ Object.keys(props).filter(prop => (constraint === null || constraint === void 0 ? void 0 : constraint[prop]) !== undefined).forEach(prop => row[prop] = constraint[prop]);
28
+ return row;
29
+ })
30
+ };
31
+ });
32
+ }
33
+ function rowsToVersioned(section, rows) {
34
+ const { nested, props } = VERSIONED_SECTIONS[section];
35
+ const map = {};
36
+ (rows || []).forEach(row => {
37
+ const constraints = (row[nested] || []).map(constraintRow => {
38
+ const constraint = {};
39
+ Object.keys(props).filter(prop => constraintRow[prop] !== undefined).forEach(prop => constraint[prop] = constraintRow[prop]);
40
+ return constraint;
41
+ });
42
+ if (row.notInstalled) {
43
+ map[row.name] = false;
44
+ }
45
+ else if (constraints.length === 0) {
46
+ map[row.name] = true;
47
+ }
48
+ else {
49
+ map[row.name] = constraints.length === 1 ? constraints[0] : constraints;
50
+ }
51
+ });
52
+ return map;
53
+ }
54
+ function trmToRows(trm) {
55
+ return Object.keys(trm || {}).map(name => ({ name, version: trm[name] }));
56
+ }
57
+ function rowsToTrm(rows) {
58
+ const trm = {};
59
+ (rows || []).forEach(row => {
60
+ trm[row.name] = row.version;
61
+ });
62
+ return trm;
63
+ }
64
+ function notesToRows(notes) {
65
+ return Object.keys(notes || {}).map(note => {
66
+ const value = notes[note];
67
+ return value === true || (value === null || value === void 0 ? void 0 : value.version) === undefined ? { note } : { note, version: value.version };
68
+ });
69
+ }
70
+ function rowsToNotes(rows) {
71
+ const notes = {};
72
+ (rows || []).forEach(row => {
73
+ notes[row.note] = row.version === undefined ? true : { version: row.version };
74
+ });
75
+ return notes;
76
+ }
77
+ function tablesToRows(tables) {
78
+ return (Array.isArray(tables) ? tables : []).map(check => ({
79
+ table: check === null || check === void 0 ? void 0 : check.table,
80
+ where: (Array.isArray(check === null || check === void 0 ? void 0 : check.where) ? check.where : []).map(condition => {
81
+ const row = { field: condition === null || condition === void 0 ? void 0 : condition.field, value: condition === null || condition === void 0 ? void 0 : condition.value };
82
+ if ((condition === null || condition === void 0 ? void 0 : condition.op) !== undefined) {
83
+ row.op = String(condition.op).trim().toUpperCase();
84
+ }
85
+ return row;
86
+ })
87
+ }));
88
+ }
89
+ function rowsToTables(rows) {
90
+ return (rows || []).map(row => ({
91
+ table: row.table,
92
+ where: (row.where || []).map(conditionRow => {
93
+ const condition = { field: conditionRow.field };
94
+ if (conditionRow.op !== undefined) {
95
+ condition.op = conditionRow.op;
96
+ }
97
+ condition.value = conditionRow.value;
98
+ return condition;
99
+ })
100
+ }));
101
+ }
102
+ /**
103
+ * Splits an engines declaration in UI table rows.
104
+ * @param engines engines declaration
105
+ */
106
+ function enginesToUiRows(engines) {
107
+ const other = {};
108
+ Object.keys(engines || {}).filter(key => !manifest_1.ENGINES_KEYS.includes(key)).forEach(key => other[key] = engines[key]);
109
+ return {
110
+ trm: trmToRows(engines === null || engines === void 0 ? void 0 : engines.trm),
111
+ components: versionedToRows('components', engines === null || engines === void 0 ? void 0 : engines.components),
112
+ products: versionedToRows('products', engines === null || engines === void 0 ? void 0 : engines.products),
113
+ notes: notesToRows(engines === null || engines === void 0 ? void 0 : engines.notes),
114
+ tables: tablesToRows(engines === null || engines === void 0 ? void 0 : engines.tables),
115
+ anyOf: engines === null || engines === void 0 ? void 0 : engines.anyOf,
116
+ other
117
+ };
118
+ }
119
+ /**
120
+ * Converts the rows of one UI table to its engines section.
121
+ * @param section engines section
122
+ * @param rows table rows
123
+ */
124
+ function uiRowsToEnginesSection(section, rows) {
125
+ switch (section) {
126
+ case 'trm':
127
+ return rowsToTrm(rows);
128
+ case 'components':
129
+ case 'products':
130
+ return rowsToVersioned(section, rows);
131
+ case 'notes':
132
+ return rowsToNotes(rows);
133
+ case 'tables':
134
+ return rowsToTables(rows);
135
+ }
136
+ }
137
+ /**
138
+ * Builds an engines declaration from UI table rows. Empty sections are omitted.
139
+ * @param rows table rows
140
+ */
141
+ function uiRowsToEngines(rows) {
142
+ const engines = {};
143
+ ['trm', 'components', 'products', 'notes', 'tables'].forEach(section => {
144
+ var _a;
145
+ if (((_a = rows[section]) === null || _a === void 0 ? void 0 : _a.length) > 0) {
146
+ engines[section] = uiRowsToEnginesSection(section, rows[section]);
147
+ }
148
+ });
149
+ if (Array.isArray(rows.anyOf) && rows.anyOf.length > 0) {
150
+ engines.anyOf = rows.anyOf;
151
+ }
152
+ return Object.assign(Object.assign({}, engines), rows.other);
153
+ }
154
+ /**
155
+ * Validates the rows of one UI table: duplicate names and the strict engines validation of the section.
156
+ * @param section engines section
157
+ * @param rows normalized table rows
158
+ * @returns `true` if valid, otherwise the first error
159
+ */
160
+ function validateEnginesUiSection(section, rows) {
161
+ var _a;
162
+ //an empty section is omitted from the engines
163
+ if (!rows || rows.length === 0) {
164
+ return true;
165
+ }
166
+ if (section !== 'tables') {
167
+ const key = section === 'notes' ? 'note' : 'name';
168
+ const seen = [];
169
+ for (const row of rows || []) {
170
+ const value = String((_a = row[key]) !== null && _a !== void 0 ? _a : '');
171
+ const normalized = section === 'notes' ? (0, manifest_1.normalizeNoteNumber)(value) : section === 'trm' ? value : (0, manifest_1.normalizeEngineName)(value);
172
+ if (seen.includes(normalized)) {
173
+ return `Duplicate ${section === 'notes' ? 'SAP Note' : section === 'trm' ? 'TRM package' : section.slice(0, -1)} "${value}"`;
174
+ }
175
+ seen.push(normalized);
176
+ }
177
+ }
178
+ const errors = (0, manifest_1.validateEngines)({ [section]: uiRowsToEnginesSection(section, rows) }, { strict: true });
179
+ return errors.length === 0 ? true : errors[0];
180
+ }
181
+ function rangeColumn(name, label, mode, placeholder) {
182
+ return {
183
+ name,
184
+ label,
185
+ placeholder,
186
+ validate: (value) => (0, manifest_1.validSapRange)(String(value), mode) ? true : `Invalid range "${value}"`
187
+ };
188
+ }
189
+ function nameColumn(regex, placeholder) {
190
+ return {
191
+ name: 'name',
192
+ label: 'Name',
193
+ required: true,
194
+ case: 'upper',
195
+ placeholder,
196
+ validate: (value) => regex.test((0, manifest_1.normalizeEngineName)(String(value))) ? true : 'Invalid name'
197
+ };
198
+ }
199
+ function notInstalledColumn(nested) {
200
+ return {
201
+ name: 'notInstalled',
202
+ label: 'Not installed',
203
+ type: 'boolean',
204
+ validate: (value, row) => { var _a; return value === true && ((_a = row[nested]) === null || _a === void 0 ? void 0 : _a.length) > 0 ? 'Remove the constraints of a component or product that must not be installed' : true; }
205
+ };
206
+ }
207
+ /**
208
+ * Columns of the UI table of each engines section.
209
+ */
210
+ exports.ENGINES_UI_COLUMNS = {
211
+ trm: [{
212
+ name: 'name',
213
+ label: 'Package',
214
+ type: 'select',
215
+ required: true,
216
+ options: manifest_1.ENGINES_TRM_PACKAGES.map(name => ({ value: name }))
217
+ }, {
218
+ name: 'version',
219
+ label: 'Version',
220
+ required: true,
221
+ placeholder: '>=9.0.0',
222
+ validate: (value) => (0, manifest_1.validTrmRange)(value) ? true : `Invalid range "${value}"`
223
+ }],
224
+ components: [
225
+ nameColumn(manifest_1.COMPONENT_NAME_REGEX, 'SAP_BASIS'),
226
+ notInstalledColumn('constraints'),
227
+ {
228
+ name: 'constraints',
229
+ label: 'Constraints (any)',
230
+ type: 'table',
231
+ columns: [
232
+ rangeColumn('release', 'Release', 'release', '>=750'),
233
+ rangeColumn('sp', 'SP', 'number', '>=5')
234
+ ]
235
+ }
236
+ ],
237
+ products: [
238
+ nameColumn(manifest_1.PRODUCT_NAME_REGEX, 'ABAP PLATFORM'),
239
+ notInstalledColumn('versions'),
240
+ {
241
+ name: 'versions',
242
+ label: 'Versions (any)',
243
+ type: 'table',
244
+ columns: [
245
+ rangeColumn('version', 'Version', 'version', '>=2022')
246
+ ]
247
+ }
248
+ ],
249
+ notes: [{
250
+ name: 'note',
251
+ label: 'SAP Note',
252
+ required: true,
253
+ placeholder: '3284711',
254
+ validate: (value) => manifest_1.NOTE_REGEX.test(String(value)) && parseInt(value, 10) !== 0 ? true : 'Invalid SAP Note number'
255
+ }, rangeColumn('version', 'Version', 'number', '>=5')],
256
+ tables: [{
257
+ name: 'table',
258
+ label: 'Table',
259
+ required: true,
260
+ case: 'upper',
261
+ maxLength: 30,
262
+ validate: (value) => manifest_1.TABLE_NAME_REGEX.test(String(value)) ? true : 'Invalid table name'
263
+ }, {
264
+ name: 'where',
265
+ label: 'Conditions (all)',
266
+ type: 'table',
267
+ required: true,
268
+ columns: [{
269
+ name: 'field',
270
+ label: 'Field',
271
+ required: true,
272
+ case: 'upper',
273
+ maxLength: 30,
274
+ validate: (value) => manifest_1.FIELD_NAME_REGEX.test(String(value)) ? true : 'Invalid field name'
275
+ }, {
276
+ name: 'op',
277
+ label: 'Operator',
278
+ type: 'select',
279
+ placeholder: 'EQ',
280
+ options: manifest_1.ENGINES_TABLE_OPERATORS.map(op => ({ value: op }))
281
+ }, {
282
+ name: 'value',
283
+ label: 'Value',
284
+ required: true,
285
+ maxLength: manifest_1.TABLE_VALUE_MAX_LENGTH,
286
+ validate: (value) => manifest_1.TABLE_VALUE_FORBIDDEN_REGEX.test(String(value)) ? 'Value must not contain " AND " or " OR "' : true
287
+ }]
288
+ }]
289
+ };
@@ -1,3 +1,22 @@
1
+ import { PackageDependencies } from "../../dependencies";
1
2
  import { Step } from "@simonegaffurini/sammarksworkflow";
2
3
  import { PublishWorkflowContext } from ".";
4
+ /**
5
+ * Analyzes the dependencies of the ABAP package once, and rejects those a release can't have:
6
+ * non-TRM customer packages, and local (.trm) TRM packages. Run before the publish questions,
7
+ * so a refused publish asks nothing.
8
+ */
9
+ export declare function checkPackageDependencies(context: PublishWorkflowContext): Promise<PackageDependencies>;
10
+ /**
11
+ * Workflow step that detects TRM dependencies from the source package hierarchy.
12
+ *
13
+ * 1- execute find dependencies on ABAP package
14
+ *
15
+ * 2- find dependencies with custom packages
16
+ *
17
+ * 3- find dependencies with local trm packages
18
+ *
19
+ * 4- set sap entries in manifest
20
+ *
21
+ */
3
22
  export declare const findDependencies: Step<PublishWorkflowContext>;
@@ -43,75 +43,110 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
43
43
  };
44
44
  Object.defineProperty(exports, "__esModule", { value: true });
45
45
  exports.findDependencies = void 0;
46
+ exports.checkPackageDependencies = checkPackageDependencies;
46
47
  const trm_commons_1 = require("trm-commons");
47
48
  const registry_1 = require("../../registry");
48
49
  const systemConnector_1 = require("../../systemConnector");
49
50
  const _ = __importStar(require("lodash"));
50
- exports.findDependencies = {
51
- name: 'find-dependencies',
52
- filter: (context) => __awaiter(void 0, void 0, void 0, function* () {
53
- if (context.rawInput.publishData.noDependenciesDetection) {
54
- trm_commons_1.Logger.log(`Skipping automatic dependencies detection (user input)`, true);
55
- trm_commons_1.Logger.warning(`Skipping automatic dependency detection can cause your package to fail activation during install. Make sure to manually edit the dependencies later if necessary.`);
56
- return false;
57
- }
58
- else {
59
- return true;
51
+ /**
52
+ * Analyzes the dependencies of the ABAP package once, and rejects those a release can't have:
53
+ * non-TRM customer packages, and local (.trm) TRM packages. Run before the publish questions,
54
+ * so a refused publish asks nothing.
55
+ */
56
+ function checkPackageDependencies(context) {
57
+ return __awaiter(this, void 0, void 0, function* () {
58
+ if (context.runtime.packageDependencies) {
59
+ return context.runtime.packageDependencies;
60
60
  }
61
- }),
62
- run: (context) => __awaiter(void 0, void 0, void 0, function* () {
63
- trm_commons_1.Logger.log('Find dependencies step', true);
64
61
  const dependencies = yield systemConnector_1.SystemConnector.getPackageDependencies(context.rawInput.packageData.devclass, true);
65
62
  const trmDependencies = dependencies.trmPackageDependencies;
66
63
  const trmLocalDependencies = trmDependencies.filter(o => o.trmPackage.registry.getRegistryType() === registry_1.RegistryType.LOCAL);
67
- const sapDependencies = dependencies.abapPackageDependencies.filter(o => !o.isCustomerPackage);
68
- const sapObjectsUsed = sapDependencies.reduce((sum, dep) => sum + dep.entries.reduce((s, e) => s + e.dependency.length, 0), 0);
69
64
  const customDependencies = dependencies.abapPackageDependencies.filter(o => o.isCustomerPackage);
65
+ //2- find dependencies with custom packages
70
66
  if (customDependencies.length > 0) {
71
- trm_commons_1.Logger.error(`Package "${context.rawInput.packageData.devclass}" has dependencies with ${customDependencies.length} non-TRM ${customDependencies.length === 1 ? 'package' : 'packages'}:`);
67
+ trm_commons_1.Logger.error(`Package "${context.rawInput.packageData.devclass}" has dependencies with ${customDependencies.length} non-TRM ${customDependencies.length === 1 ? 'package' : 'packages'}:`, { important: true });
72
68
  customDependencies.forEach((d, i) => {
73
- trm_commons_1.Logger.error(` (${i + 1}/${customDependencies.length}) ${d.abapPackage.devclass}`);
69
+ trm_commons_1.Logger.error(` (${i + 1}/${customDependencies.length}) ${d.abapPackage.devclass}`, { important: true });
74
70
  });
75
71
  throw new Error(`Consider publishing them as TRM packages or refactor your development to avoid the dependency.`);
76
72
  }
73
+ //3- find dependencies with local trm packages
77
74
  if (trmLocalDependencies.length > 0) {
78
- trm_commons_1.Logger.error(`Package "${context.rawInput.packageData.devclass}" has dependencies with ${trmLocalDependencies.length} TRM local ${customDependencies.length === 1 ? 'package' : 'packages'}:`);
75
+ trm_commons_1.Logger.error(`Package "${context.rawInput.packageData.devclass}" has dependencies with ${trmLocalDependencies.length} TRM local ${trmLocalDependencies.length === 1 ? 'package' : 'packages'}:`, { important: true });
79
76
  trmLocalDependencies.forEach((d, i) => {
80
- trm_commons_1.Logger.error(` (${i + 1}/${customDependencies.length}) ${d.trmPackage.packageName}`);
77
+ trm_commons_1.Logger.error(` (${i + 1}/${trmLocalDependencies.length}) ${d.trmPackage.packageName}`, { important: true });
81
78
  });
82
79
  throw new Error(`Cannot deliver to registry a TRM package with a local TRM package.`);
83
80
  }
81
+ context.runtime.packageDependencies = dependencies;
82
+ return dependencies;
83
+ });
84
+ }
85
+ /**
86
+ * Workflow step that detects TRM dependencies from the source package hierarchy.
87
+ *
88
+ * 1- execute find dependencies on ABAP package
89
+ *
90
+ * 2- find dependencies with custom packages
91
+ *
92
+ * 3- find dependencies with local trm packages
93
+ *
94
+ * 4- set sap entries in manifest
95
+ *
96
+ */
97
+ exports.findDependencies = {
98
+ name: 'find-dependencies',
99
+ filter: (context) => __awaiter(void 0, void 0, void 0, function* () {
100
+ if (context.rawInput.publishData.noDependenciesDetection) {
101
+ trm_commons_1.Logger.log(`Skipping automatic dependencies detection (user input)`, true);
102
+ trm_commons_1.Logger.warning(`Skipping automatic dependency detection can cause your package to fail activation during install. Make sure to manually edit the dependencies later if necessary.`, { important: true });
103
+ return false;
104
+ }
105
+ else {
106
+ return true;
107
+ }
108
+ }),
109
+ run: (context) => __awaiter(void 0, void 0, void 0, function* () {
110
+ //1- execute find dependencies on ABAP package (2- and 3- are checked with it)
111
+ const dependencies = yield checkPackageDependencies(context);
112
+ const trmDependencies = dependencies.trmPackageDependencies;
113
+ const sapDependencies = dependencies.abapPackageDependencies.filter(o => !o.isCustomerPackage);
114
+ const sapObjectsUsed = sapDependencies.reduce((sum, dep) => sum + dep.entries.reduce((s, e) => s + e.dependency.length, 0), 0);
84
115
  trm_commons_1.Logger.info(`Package "${context.rawInput.packageData.devclass}" has ${trmDependencies.length} TRM package ${trmDependencies.length === 1 ? 'dependency' : 'dependencies'} and references/uses ${sapObjectsUsed} SAP ${sapObjectsUsed === 1 ? 'object' : 'objects'}.`);
116
+ //3- set trm dependencies in manifest
85
117
  if (trmDependencies.length > 0) {
118
+ const dependenciesWithoutManifest = trmDependencies.filter(o => !o.trmPackage.manifest);
119
+ if (dependenciesWithoutManifest.length > 0) {
120
+ dependenciesWithoutManifest.forEach(o => {
121
+ trm_commons_1.Logger.error(`Cannot find manifest of dependency in ABAP package "${o.trmPackage.getDevclass()}"`, { important: true });
122
+ });
123
+ throw new Error(`Cannot publish package "${context.rawInput.packageData.devclass}": ${dependenciesWithoutManifest.length} TRM ${dependenciesWithoutManifest.length === 1 ? 'dependency has' : 'dependencies have'} no manifest.`);
124
+ }
86
125
  trm_commons_1.Logger.log(`Adding TRM package dependencies to manifest`, true);
87
126
  trm_commons_1.Logger.info(`Updating "${context.rawInput.packageData.name}" manifest with dependencies:`);
88
127
  trmDependencies.forEach((o, i) => {
89
- if (o.trmPackage.manifest) {
90
- const dependencyManifest = o.trmPackage.manifest.get();
91
- const dependencyVersionRange = `^${dependencyManifest.version}`;
92
- const dependencyRegistry = o.trmPackage.registry.getRegistryType() === registry_1.RegistryType.PUBLIC ? undefined : o.trmPackage.registry.endpoint;
93
- context.runtime.trmPackage.manifest.dependencies.push({
94
- name: dependencyManifest.name,
95
- version: dependencyVersionRange,
96
- registry: dependencyRegistry
97
- });
98
- trm_commons_1.Logger.info(` (${i + 1}/${trmDependencies.length}) ${dependencyManifest.name}${dependencyRegistry ? ' (' + o.trmPackage.registry.name + ')' : ''} ${dependencyVersionRange}`);
99
- }
100
- else {
101
- trm_commons_1.Logger.error(` (${i + 1}/${trmDependencies.length}) Cannot find manifest of dependency in ABAP package "${o.trmPackage.getDevclass()}"`);
102
- }
128
+ const dependencyManifest = o.trmPackage.manifest.get();
129
+ const dependencyVersionRange = `^${dependencyManifest.version}`;
130
+ const dependencyRegistry = o.trmPackage.registry.getRegistryType() === registry_1.RegistryType.PUBLIC ? undefined : o.trmPackage.registry.endpoint;
131
+ context.runtime.manifest.dependencies.push({
132
+ name: dependencyManifest.name,
133
+ version: dependencyVersionRange,
134
+ registry: dependencyRegistry
135
+ });
136
+ trm_commons_1.Logger.info(` (${i + 1}/${trmDependencies.length}) ${dependencyManifest.name}${dependencyRegistry ? ' (' + o.trmPackage.registry.name + ')' : ''} ${dependencyVersionRange}`);
103
137
  });
104
138
  }
139
+ //4- set sap entries in manifest
105
140
  if (sapDependencies.length > 0) {
106
141
  trm_commons_1.Logger.log(`Adding SAP objects dependencies to manifest`, true);
107
142
  sapDependencies.forEach(o => {
108
143
  o.entries.forEach(e => {
109
- if (!context.runtime.trmPackage.manifest.sapEntries[e.tableName]) {
110
- context.runtime.trmPackage.manifest.sapEntries[e.tableName] = [];
144
+ if (!context.runtime.manifest.sapEntries[e.tableName]) {
145
+ context.runtime.manifest.sapEntries[e.tableName] = [];
111
146
  }
112
147
  e.dependency.forEach(d => {
113
- if (!context.runtime.trmPackage.manifest.sapEntries[e.tableName].find(c => _.isEqual(c, d.tableKey))) {
114
- context.runtime.trmPackage.manifest.sapEntries[e.tableName].push(d.tableKey);
148
+ if (!context.runtime.manifest.sapEntries[e.tableName].find(c => _.isEqual(c, d.tableKey))) {
149
+ context.runtime.manifest.sapEntries[e.tableName].push(d.tableKey);
115
150
  }
116
151
  });
117
152
  });
@@ -1,3 +1,9 @@
1
1
  import { Step } from "@simonegaffurini/sammarksworkflow";
2
2
  import { PublishWorkflowContext } from ".";
3
+ /**
4
+ * Workflow step that packages each selected customizing request for publication.
5
+ *
6
+ * 1- generate transport
7
+ *
8
+ */
3
9
  export declare const generateCustTransport: Step<PublishWorkflowContext>;
@@ -12,53 +12,76 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.generateCustTransport = void 0;
13
13
  const trm_commons_1 = require("trm-commons");
14
14
  const transport_1 = require("../../transport");
15
+ const stopWarning_1 = require("../stopWarning");
16
+ /**
17
+ * Workflow step that packages each selected customizing request for publication.
18
+ *
19
+ * 1- generate transport
20
+ *
21
+ */
15
22
  exports.generateCustTransport = {
16
23
  name: 'generate-cust-transport',
17
24
  filter: (context) => __awaiter(void 0, void 0, void 0, function* () {
18
- if (context.runtime.systemData.originCustomizing.length > 0) {
19
- return true;
25
+ if (context.rawInput.publishData.noCustomizingTransports) {
26
+ trm_commons_1.Logger.log(`Skipping CUST transport generation (user input)`, true);
27
+ return false;
20
28
  }
21
29
  else {
22
- trm_commons_1.Logger.log(`Skipping CUST transport generation (no customizing transports)`, true);
23
- return false;
30
+ if (context.runtime.customizing.new.length > 0) {
31
+ return true;
32
+ }
33
+ else {
34
+ trm_commons_1.Logger.log(`Skipping CUST transport generation (no new customizing transports)`, true);
35
+ return false;
36
+ }
24
37
  }
25
38
  }),
26
39
  run: (context) => __awaiter(void 0, void 0, void 0, function* () {
27
- trm_commons_1.Logger.log('Generate CUST transport step', true);
40
+ //1- generate transport
41
+ if (!context.runtime.stopWarningShown) {
42
+ context.runtime.stopWarningShown = true;
43
+ (0, stopWarning_1.stopWarning)('publish');
44
+ }
28
45
  trm_commons_1.Logger.loading(`Generating transports...`);
29
- for (const origin of context.runtime.systemData.originCustomizing) {
30
- trm_commons_1.Logger.loading(`Generating CUST transport...`, true);
46
+ for (const cust of context.runtime.customizing.new) {
47
+ trm_commons_1.Logger.loading(`Generating CUST transport (copy of ${cust.trkorr})...`, true);
48
+ const custInstance = new transport_1.Transport(cust.trkorr);
49
+ var aggregate = [custInstance];
50
+ aggregate = aggregate.concat(yield (custInstance.getTasks()));
31
51
  const transport = yield transport_1.Transport.createToc({
32
52
  trmIdentifier: transport_1.TrmTransportIdentifier.CUST,
33
53
  target: context.rawInput.systemData.transportTarget,
34
- text: `@X1@TRM: ${context.rawInput.packageData.name} v${context.rawInput.packageData.version} (C) ${origin.description}`.trim()
54
+ text: cust.description.trim().slice(0, 60),
35
55
  });
36
- for (const originTransport of origin.transports) {
37
- yield transport.addObjectsFromTransport(originTransport.trkorr);
56
+ // Track the TOC before populating it so workflow rollback can delete it if a
57
+ // subsequent copy or content check fails.
58
+ context.runtime.transports.cust.push(transport);
59
+ for (const aggInstance of aggregate) {
60
+ yield transport.addObjectsFromTransport(aggInstance.trkorr);
38
61
  }
62
+ //check transport has content (else delete)
39
63
  const e071 = yield transport.getE071();
40
64
  if (e071.length === 0) {
41
65
  trm_commons_1.Logger.info(`Customizing transport has no content, deleting.`, true);
42
66
  yield transport.delete();
43
- }
44
- else {
45
- context.runtime.systemData.custTransports.push(transport);
67
+ context.runtime.transports.cust = context.runtime.transports.cust.filter(trackedTransport => trackedTransport !== transport);
46
68
  }
47
69
  }
48
70
  }),
49
71
  revert: (context) => __awaiter(void 0, void 0, void 0, function* () {
50
- trm_commons_1.Logger.log('Rollback generate CUST transport step', true);
51
- for (const transport of context.runtime.systemData.custTransports) {
72
+ let firstError;
73
+ for (const transport of context.runtime.transports.cust) {
52
74
  try {
53
75
  if (yield transport.canBeDeleted()) {
54
76
  yield transport.delete();
55
- trm_commons_1.Logger.success(`Executed rollback on transport ${transport.trkorr}`, true);
56
77
  }
57
78
  }
58
- catch (e) {
59
- trm_commons_1.Logger.error(`Unable to rollback transport ${transport.trkorr}!`);
60
- trm_commons_1.Logger.error(e.toString(), true);
79
+ catch (error) {
80
+ firstError || (firstError = error);
61
81
  }
62
82
  }
83
+ if (firstError) {
84
+ throw firstError;
85
+ }
63
86
  })
64
87
  };
@@ -1,3 +1,9 @@
1
1
  import { Step } from "@simonegaffurini/sammarksworkflow";
2
2
  import { PublishWorkflowContext } from ".";
3
+ /**
4
+ * Workflow step that creates the transport containing ABAP package definitions.
5
+ *
6
+ * 1- generate transport
7
+ *
8
+ */
3
9
  export declare const generateDevcTransport: Step<PublishWorkflowContext>;
@@ -13,36 +13,34 @@ exports.generateDevcTransport = void 0;
13
13
  const trm_commons_1 = require("trm-commons");
14
14
  const transport_1 = require("../../transport");
15
15
  const stopWarning_1 = require("../stopWarning");
16
+ /**
17
+ * Workflow step that creates the transport containing ABAP package definitions.
18
+ *
19
+ * 1- generate transport
20
+ *
21
+ */
16
22
  exports.generateDevcTransport = {
17
23
  name: 'generate-devc-transport',
18
24
  run: (context) => __awaiter(void 0, void 0, void 0, function* () {
19
- trm_commons_1.Logger.log('Generate DEVC transport step', true);
20
- trm_commons_1.Logger.loading(`Generating transports...`);
21
- trm_commons_1.Logger.loading(`Generating DEVC transport...`, true);
22
- const aDevc = context.runtime.packageData.tadir.filter(o => o.pgmid === 'R3TR' && o.object === 'DEVC');
23
25
  if (!context.runtime.stopWarningShown) {
24
26
  context.runtime.stopWarningShown = true;
25
27
  (0, stopWarning_1.stopWarning)('publish');
26
28
  }
27
- context.runtime.systemData.devcTransport = yield transport_1.Transport.createToc({
29
+ //1- generate transport
30
+ trm_commons_1.Logger.loading(`Generating transports...`);
31
+ trm_commons_1.Logger.loading(`Generating DEVC transport...`, true);
32
+ const aDevc = context.runtime.sapPackage.objects.filter(o => o.pgmid === 'R3TR' && o.object === 'DEVC');
33
+ context.runtime.transports.devc = yield transport_1.Transport.createToc({
28
34
  trmIdentifier: transport_1.TrmTransportIdentifier.DEVC,
29
35
  target: context.rawInput.systemData.transportTarget,
30
- text: `@X1@TRM: ${context.rawInput.packageData.name} v${context.rawInput.packageData.version} (D)`
36
+ text: `@X1@TRM (D) ${context.rawInput.packageData.name} v${context.rawInput.packageData.version}`.slice(0, 60)
31
37
  });
32
- yield context.runtime.systemData.devcTransport.addObjects(aDevc, false);
38
+ yield context.runtime.transports.devc.addObjects(aDevc, false);
33
39
  }),
34
40
  revert: (context) => __awaiter(void 0, void 0, void 0, function* () {
35
- trm_commons_1.Logger.log('Rollback generate DEVC transport step', true);
36
- if (context.runtime.systemData.devcTransport) {
37
- try {
38
- if (yield context.runtime.systemData.devcTransport.canBeDeleted()) {
39
- yield context.runtime.systemData.devcTransport.delete();
40
- trm_commons_1.Logger.success(`Executed rollback on transport ${context.runtime.systemData.devcTransport.trkorr}`, true);
41
- }
42
- }
43
- catch (e) {
44
- trm_commons_1.Logger.error(`Unable to rollback transport ${context.runtime.systemData.devcTransport.trkorr}!`);
45
- trm_commons_1.Logger.error(e.toString(), true);
41
+ if (context.runtime.transports.devc) {
42
+ if (yield context.runtime.transports.devc.canBeDeleted()) {
43
+ yield context.runtime.transports.devc.delete();
46
44
  }
47
45
  }
48
46
  })
@@ -1,3 +1,9 @@
1
1
  import { Step } from "@simonegaffurini/sammarksworkflow";
2
2
  import { PublishWorkflowContext } from ".";
3
+ /**
4
+ * Workflow step that creates the optional transport containing language data.
5
+ *
6
+ * 1- generate transport
7
+ *
8
+ */
3
9
  export declare const generateLangTransport: Step<PublishWorkflowContext>;