@hcl-software/dxclient 228.0.0 → 229.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.
Files changed (328) hide show
  1. package/dist/package.json +11 -11
  2. package/dist/packages/admintasks/package-lock.json +8622 -15410
  3. package/dist/packages/admintasks/package.json +10 -6
  4. package/dist/packages/admintasks/src/commands/createCredentialVault.d.ts +2 -2
  5. package/dist/packages/admintasks/src/commands/createCredentialVault.js +61 -74
  6. package/dist/packages/admintasks/src/commands/createCredentialVault.js.map +1 -1
  7. package/dist/packages/admintasks/src/commands/createSyndicationRelation.d.ts +1 -1
  8. package/dist/packages/admintasks/src/commands/createSyndicationRelation.js +38 -49
  9. package/dist/packages/admintasks/src/commands/createSyndicationRelation.js.map +1 -1
  10. package/dist/packages/admintasks/src/commands/createVirtualPortal.d.ts +1 -1
  11. package/dist/packages/admintasks/src/commands/createVirtualPortal.js +33 -44
  12. package/dist/packages/admintasks/src/commands/createVirtualPortal.js.map +1 -1
  13. package/dist/packages/admintasks/src/commands/differentialReport.d.ts +1 -1
  14. package/dist/packages/admintasks/src/commands/differentialReport.js +107 -106
  15. package/dist/packages/admintasks/src/commands/differentialReport.js.map +1 -1
  16. package/dist/packages/admintasks/src/commands/exportVirtualPortal.d.ts +1 -1
  17. package/dist/packages/admintasks/src/commands/exportVirtualPortal.js +35 -46
  18. package/dist/packages/admintasks/src/commands/exportVirtualPortal.js.map +1 -1
  19. package/dist/packages/admintasks/src/commands/exportWCMLibrary.d.ts +1 -1
  20. package/dist/packages/admintasks/src/commands/exportWCMLibrary.js +104 -101
  21. package/dist/packages/admintasks/src/commands/exportWCMLibrary.js.map +1 -1
  22. package/dist/packages/admintasks/src/commands/importVirtualPortal.d.ts +1 -1
  23. package/dist/packages/admintasks/src/commands/importVirtualPortal.js +36 -47
  24. package/dist/packages/admintasks/src/commands/importVirtualPortal.js.map +1 -1
  25. package/dist/packages/admintasks/src/commands/importWCMLibrary.d.ts +1 -1
  26. package/dist/packages/admintasks/src/commands/importWCMLibrary.js +85 -82
  27. package/dist/packages/admintasks/src/commands/importWCMLibrary.js.map +1 -1
  28. package/dist/packages/admintasks/src/commands/listVirtualPortals.d.ts +1 -1
  29. package/dist/packages/admintasks/src/commands/listVirtualPortals.js +26 -37
  30. package/dist/packages/admintasks/src/commands/listVirtualPortals.js.map +1 -1
  31. package/dist/packages/admintasks/src/commands/pznRulesExport.d.ts +1 -1
  32. package/dist/packages/admintasks/src/commands/pznRulesExport.js +52 -63
  33. package/dist/packages/admintasks/src/commands/pznRulesExport.js.map +1 -1
  34. package/dist/packages/admintasks/src/commands/pznRulesImport.d.ts +1 -1
  35. package/dist/packages/admintasks/src/commands/pznRulesImport.js +103 -100
  36. package/dist/packages/admintasks/src/commands/pznRulesImport.js.map +1 -1
  37. package/dist/packages/admintasks/src/commands/resEnvProviderActions.d.ts +1 -1
  38. package/dist/packages/admintasks/src/commands/resEnvProviderActions.js +133 -130
  39. package/dist/packages/admintasks/src/commands/resEnvProviderActions.js.map +1 -1
  40. package/dist/packages/admintasks/src/commands/restartCorePods.d.ts +1 -1
  41. package/dist/packages/admintasks/src/commands/restartCorePods.js +19 -30
  42. package/dist/packages/admintasks/src/commands/restartCorePods.js.map +1 -1
  43. package/dist/packages/admintasks/src/commands/restartDXCore.d.ts +1 -1
  44. package/dist/packages/admintasks/src/commands/restartDXCore.js +52 -50
  45. package/dist/packages/admintasks/src/commands/restartDXCore.js.map +1 -1
  46. package/dist/packages/admintasks/src/errors/CommandLineMessages_en.json +1 -1
  47. package/dist/packages/admintasks/src/services/createSyndicationRelationServices.js +6 -15
  48. package/dist/packages/admintasks/src/services/createSyndicationRelationServices.js.map +1 -1
  49. package/dist/packages/admintasks/src/services/differentialReportService.js +8 -17
  50. package/dist/packages/admintasks/src/services/differentialReportService.js.map +1 -1
  51. package/dist/packages/admintasks/src/services/resEnvProviderService.js +54 -64
  52. package/dist/packages/admintasks/src/services/resEnvProviderService.js.map +1 -1
  53. package/dist/packages/admintasks/src/services/restartCorePodsService.js +7 -16
  54. package/dist/packages/admintasks/src/services/restartCorePodsService.js.map +1 -1
  55. package/dist/packages/admintasks/src/services/restartDXCoreService.js +15 -24
  56. package/dist/packages/admintasks/src/services/restartDXCoreService.js.map +1 -1
  57. package/dist/packages/admintasks/src/services/virtualPortalServices.js +40 -49
  58. package/dist/packages/admintasks/src/services/virtualPortalServices.js.map +1 -1
  59. package/dist/packages/admintasks/src/utils/differential-report-utils.js +1042 -1055
  60. package/dist/packages/admintasks/src/utils/differential-report-utils.js.map +1 -1
  61. package/dist/packages/dam/package-lock.json +3013 -6449
  62. package/dist/packages/dam/package.json +11 -7
  63. package/dist/packages/dam/src/commands/createSecrets.d.ts +1 -1
  64. package/dist/packages/dam/src/commands/createSecrets.js +38 -45
  65. package/dist/packages/dam/src/commands/createSecrets.js.map +1 -1
  66. package/dist/packages/dam/src/commands/deleteDAMStagingMismatch.d.ts +1 -1
  67. package/dist/packages/dam/src/commands/deleteDAMStagingMismatch.js +22 -33
  68. package/dist/packages/dam/src/commands/deleteDAMStagingMismatch.js.map +1 -1
  69. package/dist/packages/dam/src/commands/deleteSchema.d.ts +1 -1
  70. package/dist/packages/dam/src/commands/deleteSchema.js +48 -59
  71. package/dist/packages/dam/src/commands/deleteSchema.js.map +1 -1
  72. package/dist/packages/dam/src/commands/exportAssets.d.ts +1 -1
  73. package/dist/packages/dam/src/commands/exportAssets.js +58 -69
  74. package/dist/packages/dam/src/commands/exportAssets.js.map +1 -1
  75. package/dist/packages/dam/src/commands/findDAMStagingMismatch.d.ts +1 -1
  76. package/dist/packages/dam/src/commands/findDAMStagingMismatch.js +25 -36
  77. package/dist/packages/dam/src/commands/findDAMStagingMismatch.js.map +1 -1
  78. package/dist/packages/dam/src/commands/importAssets.d.ts +1 -1
  79. package/dist/packages/dam/src/commands/importAssets.js +38 -49
  80. package/dist/packages/dam/src/commands/importAssets.js.map +1 -1
  81. package/dist/packages/dam/src/commands/listSchema.d.ts +1 -1
  82. package/dist/packages/dam/src/commands/listSchema.js +19 -30
  83. package/dist/packages/dam/src/commands/listSchema.js.map +1 -1
  84. package/dist/packages/dam/src/commands/stagingMismatchReport.d.ts +1 -1
  85. package/dist/packages/dam/src/commands/stagingMismatchReport.js +79 -76
  86. package/dist/packages/dam/src/commands/stagingMismatchReport.js.map +1 -1
  87. package/dist/packages/dam/src/commands/stagingResync.d.ts +1 -1
  88. package/dist/packages/dam/src/commands/stagingResync.js +25 -36
  89. package/dist/packages/dam/src/commands/stagingResync.js.map +1 -1
  90. package/dist/packages/dam/src/commands/subscriberDeRegistration.d.ts +1 -1
  91. package/dist/packages/dam/src/commands/subscriberDeRegistration.js +19 -30
  92. package/dist/packages/dam/src/commands/subscriberDeRegistration.js.map +1 -1
  93. package/dist/packages/dam/src/commands/subscriberDetails.d.ts +1 -1
  94. package/dist/packages/dam/src/commands/subscriberDetails.js +24 -35
  95. package/dist/packages/dam/src/commands/subscriberDetails.js.map +1 -1
  96. package/dist/packages/dam/src/commands/subscriberRegistration.d.ts +1 -1
  97. package/dist/packages/dam/src/commands/subscriberRegistration.js +34 -45
  98. package/dist/packages/dam/src/commands/subscriberRegistration.js.map +1 -1
  99. package/dist/packages/dam/src/commands/triggerDAMStaging.d.ts +1 -1
  100. package/dist/packages/dam/src/commands/triggerDAMStaging.js +19 -30
  101. package/dist/packages/dam/src/commands/triggerDAMStaging.js.map +1 -1
  102. package/dist/packages/dam/src/commands/triggerDamReindexing.d.ts +1 -1
  103. package/dist/packages/dam/src/commands/triggerDamReindexing.js +26 -38
  104. package/dist/packages/dam/src/commands/triggerDamReindexing.js.map +1 -1
  105. package/dist/packages/dam/src/commands/updateSecrets.d.ts +1 -1
  106. package/dist/packages/dam/src/commands/updateSecrets.js +36 -47
  107. package/dist/packages/dam/src/commands/updateSecrets.js.map +1 -1
  108. package/dist/packages/dam/src/commands/validateAssets.d.ts +1 -1
  109. package/dist/packages/dam/src/commands/validateAssets.js +29 -40
  110. package/dist/packages/dam/src/commands/validateAssets.js.map +1 -1
  111. package/dist/packages/dam/src/export/collection.d.ts +8 -8
  112. package/dist/packages/dam/src/export/collection.js +71 -80
  113. package/dist/packages/dam/src/export/collection.js.map +1 -1
  114. package/dist/packages/dam/src/export/favorite.d.ts +1 -1
  115. package/dist/packages/dam/src/export/favorite.js +10 -19
  116. package/dist/packages/dam/src/export/favorite.js.map +1 -1
  117. package/dist/packages/dam/src/export/media-item.d.ts +4 -4
  118. package/dist/packages/dam/src/export/media-item.js +61 -56
  119. package/dist/packages/dam/src/export/media-item.js.map +1 -1
  120. package/dist/packages/dam/src/export/media-type-group.d.ts +1 -1
  121. package/dist/packages/dam/src/export/media-type-group.js +7 -16
  122. package/dist/packages/dam/src/export/media-type-group.js.map +1 -1
  123. package/dist/packages/dam/src/export/media-type.d.ts +1 -1
  124. package/dist/packages/dam/src/export/media-type.js +7 -16
  125. package/dist/packages/dam/src/export/media-type.js.map +1 -1
  126. package/dist/packages/dam/src/export/renditions.d.ts +6 -6
  127. package/dist/packages/dam/src/export/renditions.js +78 -73
  128. package/dist/packages/dam/src/export/renditions.js.map +1 -1
  129. package/dist/packages/dam/src/import/collection.d.ts +3 -3
  130. package/dist/packages/dam/src/import/collection.js +26 -35
  131. package/dist/packages/dam/src/import/collection.js.map +1 -1
  132. package/dist/packages/dam/src/import/favorite.d.ts +1 -1
  133. package/dist/packages/dam/src/import/favorite.js +8 -17
  134. package/dist/packages/dam/src/import/favorite.js.map +1 -1
  135. package/dist/packages/dam/src/import/media-items.d.ts +3 -3
  136. package/dist/packages/dam/src/import/media-items.js +46 -41
  137. package/dist/packages/dam/src/import/media-items.js.map +1 -1
  138. package/dist/packages/dam/src/import/media-type-group.d.ts +1 -1
  139. package/dist/packages/dam/src/import/media-type-group.js +13 -22
  140. package/dist/packages/dam/src/import/media-type-group.js.map +1 -1
  141. package/dist/packages/dam/src/import/media-type.d.ts +1 -1
  142. package/dist/packages/dam/src/import/media-type.js +12 -21
  143. package/dist/packages/dam/src/import/media-type.js.map +1 -1
  144. package/dist/packages/dam/src/import/permission.d.ts +3 -3
  145. package/dist/packages/dam/src/import/permission.js +21 -30
  146. package/dist/packages/dam/src/import/permission.js.map +1 -1
  147. package/dist/packages/dam/src/import/renditions.d.ts +6 -6
  148. package/dist/packages/dam/src/import/renditions.js +69 -64
  149. package/dist/packages/dam/src/import/renditions.js.map +1 -1
  150. package/dist/packages/dam/src/services/authService.d.ts +1 -1
  151. package/dist/packages/dam/src/services/authService.js +9 -18
  152. package/dist/packages/dam/src/services/authService.js.map +1 -1
  153. package/dist/packages/dam/src/services/stagingService.js +76 -85
  154. package/dist/packages/dam/src/services/stagingService.js.map +1 -1
  155. package/dist/packages/dam/src/services/tokenCache.d.ts +1 -1
  156. package/dist/packages/dam/src/services/tokenCache.js +30 -41
  157. package/dist/packages/dam/src/services/tokenCache.js.map +1 -1
  158. package/dist/packages/dam/src/utils/constants.js +3 -3
  159. package/dist/packages/dam/src/utils/constants.js.map +1 -1
  160. package/dist/packages/dam/src/utils/service.js +59 -70
  161. package/dist/packages/dam/src/utils/service.js.map +1 -1
  162. package/dist/packages/dam/src/validation/collection-list-validate.js +26 -35
  163. package/dist/packages/dam/src/validation/collection-list-validate.js.map +1 -1
  164. package/dist/packages/dam/src/validation/media-list-validate.js +44 -39
  165. package/dist/packages/dam/src/validation/media-list-validate.js.map +1 -1
  166. package/dist/packages/dam/src/validation/media-type-group-validate.js +5 -14
  167. package/dist/packages/dam/src/validation/media-type-group-validate.js.map +1 -1
  168. package/dist/packages/dam/src/validation/media-type-validate.js +5 -14
  169. package/dist/packages/dam/src/validation/media-type-validate.js.map +1 -1
  170. package/dist/packages/dam/src/validation/root-validate.js +10 -19
  171. package/dist/packages/dam/src/validation/root-validate.js.map +1 -1
  172. package/dist/packages/dam/src/validation/validate.rendition.js +17 -26
  173. package/dist/packages/dam/src/validation/validate.rendition.js.map +1 -1
  174. package/dist/packages/dam/src/validation/validate.versions.js +16 -25
  175. package/dist/packages/dam/src/validation/validate.versions.js.map +1 -1
  176. package/dist/packages/deployportlet/package-lock.json +9970 -12728
  177. package/dist/packages/deployportlet/package.json +20 -6
  178. package/dist/packages/deployportlet/src/commands/deployPortlet.d.ts +1 -1
  179. package/dist/packages/deployportlet/src/commands/deployPortlet.js +65 -62
  180. package/dist/packages/deployportlet/src/commands/deployPortlet.js.map +1 -1
  181. package/dist/packages/deployportlet/src/commands/undeployPortlet.d.ts +1 -1
  182. package/dist/packages/deployportlet/src/commands/undeployPortlet.js +80 -77
  183. package/dist/packages/deployportlet/src/commands/undeployPortlet.js.map +1 -1
  184. package/dist/packages/deployportlet/src/commands/xmlaccess.d.ts +1 -1
  185. package/dist/packages/deployportlet/src/commands/xmlaccess.js +14 -25
  186. package/dist/packages/deployportlet/src/commands/xmlaccess.js.map +1 -1
  187. package/dist/packages/deployportlet/src/services/undeployPortletServices.js +34 -43
  188. package/dist/packages/deployportlet/src/services/undeployPortletServices.js.map +1 -1
  189. package/dist/packages/deployscriptapplication/package-lock.json +6395 -12760
  190. package/dist/packages/deployscriptapplication/package.json +11 -4
  191. package/dist/packages/deployscriptapplication/src/commands/pull.d.ts +1 -2
  192. package/dist/packages/deployscriptapplication/src/commands/pull.js +146 -159
  193. package/dist/packages/deployscriptapplication/src/commands/pull.js.map +1 -1
  194. package/dist/packages/deployscriptapplication/src/commands/push.d.ts +3 -3
  195. package/dist/packages/deployscriptapplication/src/commands/push.js +149 -157
  196. package/dist/packages/deployscriptapplication/src/commands/push.js.map +1 -1
  197. package/dist/packages/deployscriptapplication/src/commands/restoreScriptApplication.d.ts +2 -2
  198. package/dist/packages/deployscriptapplication/src/commands/restoreScriptApplication.js +88 -101
  199. package/dist/packages/deployscriptapplication/src/commands/restoreScriptApplication.js.map +1 -1
  200. package/dist/packages/deployscriptapplication/src/commands/undeployScriptApplication.d.ts +2 -2
  201. package/dist/packages/deployscriptapplication/src/commands/undeployScriptApplication.js +118 -131
  202. package/dist/packages/deployscriptapplication/src/commands/undeployScriptApplication.js.map +1 -1
  203. package/dist/packages/deployscriptapplication/src/util/constants.js.map +1 -1
  204. package/dist/packages/deployscriptapplication/src/util/generic.js.map +1 -1
  205. package/dist/packages/deploytheme/package-lock.json +7190 -13434
  206. package/dist/packages/deploytheme/package.json +9 -6
  207. package/dist/packages/deploytheme/src/commands/deployApplication.d.ts +1 -1
  208. package/dist/packages/deploytheme/src/commands/deployApplication.js +87 -84
  209. package/dist/packages/deploytheme/src/commands/deployApplication.js.map +1 -1
  210. package/dist/packages/deploytheme/src/commands/deployTheme.d.ts +4 -4
  211. package/dist/packages/deploytheme/src/commands/deployTheme.js +223 -226
  212. package/dist/packages/deploytheme/src/commands/deployTheme.js.map +1 -1
  213. package/dist/packages/deploytheme/src/commands/undeployApplication.d.ts +1 -1
  214. package/dist/packages/deploytheme/src/commands/undeployApplication.js +21 -32
  215. package/dist/packages/deploytheme/src/commands/undeployApplication.js.map +1 -1
  216. package/dist/packages/deploytheme/src/commands/undeployTheme.d.ts +4 -4
  217. package/dist/packages/deploytheme/src/commands/undeployTheme.js +214 -223
  218. package/dist/packages/deploytheme/src/commands/undeployTheme.js.map +1 -1
  219. package/dist/packages/deploytheme/src/services/themeServices.js +84 -90
  220. package/dist/packages/deploytheme/src/services/themeServices.js.map +1 -1
  221. package/dist/packages/livesync/package-lock.json +2202 -3754
  222. package/dist/packages/livesync/package.json +9 -5
  223. package/dist/packages/livesync/src/commands/pullTheme.d.ts +2 -2
  224. package/dist/packages/livesync/src/commands/pullTheme.js +62 -75
  225. package/dist/packages/livesync/src/commands/pullTheme.js.map +1 -1
  226. package/dist/packages/livesync/src/commands/pullWcmDesignLibrary.d.ts +2 -1
  227. package/dist/packages/livesync/src/commands/pullWcmDesignLibrary.js +255 -288
  228. package/dist/packages/livesync/src/commands/pullWcmDesignLibrary.js.map +1 -1
  229. package/dist/packages/livesync/src/commands/pushTheme.d.ts +4 -4
  230. package/dist/packages/livesync/src/commands/pushTheme.js +125 -140
  231. package/dist/packages/livesync/src/commands/pushTheme.js.map +1 -1
  232. package/dist/packages/livesync/src/commands/pushWcmDesignLibrary.d.ts +2 -2
  233. package/dist/packages/livesync/src/commands/pushWcmDesignLibrary.js +545 -553
  234. package/dist/packages/livesync/src/commands/pushWcmDesignLibrary.js.map +1 -1
  235. package/dist/packages/livesync/src/errors/CommandLineMessages_en.json +5 -2
  236. package/dist/packages/livesync/src/messages/messages_en.json +1 -0
  237. package/dist/packages/livesync/src/services/EventsQueue.js +11 -24
  238. package/dist/packages/livesync/src/services/EventsQueue.js.map +1 -1
  239. package/dist/packages/livesync/src/services/foldersWcmServices.js +21 -30
  240. package/dist/packages/livesync/src/services/foldersWcmServices.js.map +1 -1
  241. package/dist/packages/livesync/src/services/htmlComponentWcmServices.js +19 -28
  242. package/dist/packages/livesync/src/services/htmlComponentWcmServices.js.map +1 -1
  243. package/dist/packages/livesync/src/services/initialSyncServices.js +65 -81
  244. package/dist/packages/livesync/src/services/initialSyncServices.js.map +1 -1
  245. package/dist/packages/livesync/src/services/livesyncUtils.js +54 -49
  246. package/dist/packages/livesync/src/services/livesyncUtils.js.map +1 -1
  247. package/dist/packages/livesync/src/services/metadataServices.js +113 -77
  248. package/dist/packages/livesync/src/services/metadataServices.js.map +1 -1
  249. package/dist/packages/livesync/src/services/ongoingSyncServices.js +188 -182
  250. package/dist/packages/livesync/src/services/ongoingSyncServices.js.map +1 -1
  251. package/dist/packages/livesync/src/services/presentationTemplateWcmServices.js +19 -28
  252. package/dist/packages/livesync/src/services/presentationTemplateWcmServices.js.map +1 -1
  253. package/dist/packages/livesync/src/services/styleSheetComponentWcmServices.js +18 -27
  254. package/dist/packages/livesync/src/services/styleSheetComponentWcmServices.js.map +1 -1
  255. package/dist/packages/livesync/src/services/wcmContext/initialSync.js +29 -23
  256. package/dist/packages/livesync/src/services/wcmContext/initialSync.js.map +1 -1
  257. package/dist/packages/livesync/src/services/wcmContext/stylesheetComponent.js +221 -225
  258. package/dist/packages/livesync/src/services/wcmContext/stylesheetComponent.js.map +1 -1
  259. package/dist/packages/livesync/src/services/wcmContext/wcmLibraryContext.js +4 -4
  260. package/dist/packages/livesync/src/services/wcmContext/wcmLibraryContext.js.map +1 -1
  261. package/dist/packages/livesync/src/services/wcmRestV2Services.js +20 -26
  262. package/dist/packages/livesync/src/services/wcmRestV2Services.js.map +1 -1
  263. package/dist/packages/livesync/src/types/EventHandler.type.d.ts +1 -1
  264. package/dist/packages/livesync/src/types/EventQueueItem.type.d.ts +2 -2
  265. package/dist/packages/livesync/src/types/OngoingSyncHooks.type.d.ts +1 -1
  266. package/dist/packages/livesync/src/types/WCMDesignLibraryCache.type.d.ts +1 -1
  267. package/dist/packages/livesync/src/types/WcmRestApiV2.type.d.ts +8 -8
  268. package/dist/packages/livesync/src/types/index.d.ts +6 -0
  269. package/dist/packages/livesync/src/types/index.js +5 -1
  270. package/dist/packages/livesync/src/types/index.js.map +1 -1
  271. package/dist/packages/mls_exim/package-lock.json +2908 -5990
  272. package/dist/packages/mls_exim/package.json +10 -6
  273. package/dist/packages/mls_exim/src/export/mlsExport.d.ts +2 -2
  274. package/dist/packages/mls_exim/src/export/mlsExport.js +81 -78
  275. package/dist/packages/mls_exim/src/export/mlsExport.js.map +1 -1
  276. package/dist/packages/mls_exim/src/export/mlsExport.ts +9 -9
  277. package/dist/packages/mls_exim/src/import/mlsImport.d.ts +1 -1
  278. package/dist/packages/mls_exim/src/import/mlsImport.js +36 -47
  279. package/dist/packages/mls_exim/src/import/mlsImport.js.map +1 -1
  280. package/dist/packages/mls_exim/src/import/mlsImport.ts +3 -3
  281. package/dist/packages/sharedlibrary/package-lock.json +6221 -12629
  282. package/dist/packages/sharedlibrary/package.json +9 -6
  283. package/dist/packages/sharedlibrary/src/commands/delete.d.ts +1 -1
  284. package/dist/packages/sharedlibrary/src/commands/delete.js +40 -37
  285. package/dist/packages/sharedlibrary/src/commands/delete.js.map +1 -1
  286. package/dist/packages/sharedlibrary/src/commands/upload.d.ts +1 -1
  287. package/dist/packages/sharedlibrary/src/commands/upload.js +73 -70
  288. package/dist/packages/sharedlibrary/src/commands/upload.js.map +1 -1
  289. package/dist/packages/sharedlibrary/src/errors/CommandLineMessages_en.json +1 -0
  290. package/dist/packages/sharedlibrary/src/services/sharedLibraryServices.js +29 -30
  291. package/dist/packages/sharedlibrary/src/services/sharedLibraryServices.js.map +1 -1
  292. package/dist/packages/syndication/package-lock.json +9970 -12728
  293. package/dist/packages/syndication/package.json +21 -7
  294. package/dist/packages/syndication/src/commands/subscriber.d.ts +1 -1
  295. package/dist/packages/syndication/src/commands/subscriber.js +33 -44
  296. package/dist/packages/syndication/src/commands/subscriber.js.map +1 -1
  297. package/dist/packages/syndication/src/commands/syndicator.d.ts +1 -1
  298. package/dist/packages/syndication/src/commands/syndicator.js +33 -44
  299. package/dist/packages/syndication/src/commands/syndicator.js.map +1 -1
  300. package/dist/packages/syndication/src/commands/syndicatorFailedItem.d.ts +1 -1
  301. package/dist/packages/syndication/src/commands/syndicatorFailedItem.js +67 -78
  302. package/dist/packages/syndication/src/commands/syndicatorFailedItem.js.map +1 -1
  303. package/dist/packages/syndication/src/services/syndicationService.d.ts +8 -8
  304. package/dist/packages/syndication/src/services/syndicationService.js +39 -48
  305. package/dist/packages/syndication/src/services/syndicationService.js.map +1 -1
  306. package/dist/src/errors/CommandLineMessages_en.json +3 -1
  307. package/dist/src/index.js +908 -915
  308. package/dist/src/index.js.map +1 -1
  309. package/dist/src/services/apiServices.js +184 -177
  310. package/dist/src/services/apiServices.js.map +1 -1
  311. package/dist/src/services/filesServices.d.ts +0 -1
  312. package/dist/src/services/filesServices.js +14 -23
  313. package/dist/src/services/filesServices.js.map +1 -1
  314. package/dist/src/services/requestService.js +16 -22
  315. package/dist/src/services/requestService.js.map +1 -1
  316. package/dist/src/utils/constants.d.ts +1 -1
  317. package/dist/src/utils/constants.js +59 -59
  318. package/dist/src/utils/constants.js.map +1 -1
  319. package/dist/src/utils/logger.d.ts +1 -0
  320. package/dist/src/utils/logger.js +58 -61
  321. package/dist/src/utils/logger.js.map +1 -1
  322. package/dist/src/utils/utils.d.ts +7 -6
  323. package/dist/src/utils/utils.js +111 -104
  324. package/dist/src/utils/utils.js.map +1 -1
  325. package/dist/src/utils/validateOptions.d.ts +3 -3
  326. package/dist/src/utils/validateOptions.js +354 -333
  327. package/dist/src/utils/validateOptions.js.map +1 -1
  328. package/package.json +11 -11
package/dist/src/index.js CHANGED
@@ -1,13 +1,4 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
12
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
13
4
  };
@@ -77,7 +68,7 @@ const deleteDAMStagingMismatch_1 = require("../packages/dam/src/commands/deleteD
77
68
  const wcmRestV2Services_1 = require("../packages/livesync/src/services/wcmRestV2Services");
78
69
  const metadataServices_1 = require("../packages/livesync/src/services/metadataServices");
79
70
  const MaskData = require('maskdata');
80
- const config = utils_1.getConfigJSON();
71
+ const config = (0, utils_1.getConfigJSON)();
81
72
  const program = new commander_1.default.Command();
82
73
  program.version(package_json_1.default.version || 'missing version info');
83
74
  program.description(package_json_1.default.description || 'missing description');
@@ -115,10 +106,10 @@ program.on('--help', () => {
115
106
  logger_1.logger.help(' $ dxclient wcm-library-import');
116
107
  logger_1.logger.help(' $ dxclient dx-core-configuration-reports summary-report');
117
108
  logger_1.logger.help(' $ dxclient manage-dam-assets export-assets | import-assets | validate-assets');
118
- if (utils_1.isFeatureEnabled(constants_1.FeaturesEnum.LIVESYNC)) {
119
- logger_1.logger.help(` $ dxclient livesync push-theme | pull-theme${utils_1.isFeatureEnabled(constants_1.FeaturesEnum.LIVESYNC_WCM) ? ' | push-wcm-design-library | pull-wcm-design-library' : ''}`);
109
+ if ((0, utils_1.isFeatureEnabled)(constants_1.FeaturesEnum.LIVESYNC)) {
110
+ logger_1.logger.help(` $ dxclient livesync push-theme | pull-theme${(0, utils_1.isFeatureEnabled)(constants_1.FeaturesEnum.LIVESYNC_WCM) ? ' | push-wcm-design-library | pull-wcm-design-library' : ''}`);
120
111
  }
121
- if (utils_1.isFeatureEnabled(constants_1.FeaturesEnum.DAM_REINDEXING)) {
112
+ if ((0, utils_1.isFeatureEnabled)(constants_1.FeaturesEnum.DAM_REINDEXING)) {
122
113
  logger_1.logger.help(' $ dxclient trigger-dam-reindexing');
123
114
  }
124
115
  logger_1.logger.help(' $ dxclient accept-license');
@@ -135,14 +126,14 @@ program.on('--help', () => {
135
126
  }
136
127
  });
137
128
  program.command(constants_1.COMMANDS.VERSION_COMPAT)
138
- .option('-hostname, --hostname <value>', 'Host name of the DX Core server', config.hostname)
139
- .option('-dxConnectPort, --dxConnectPort <value>', 'Port number of the cw_profile, for any Kubernetes Environment default port is 443', config.dxConnectPort ? config.dxConnectPort.toString() : config.dxConnectPort)
140
- .option('-dxConnectProtocol, --dxConnectProtocol <value>', 'Protocol of the cw_profile', config.dxConnectProtocol.toString())
141
- .option('-dxConnectUsername, --dxConnectUsername <value>', 'Username for the cw_profile', config.dxConnectUsername)
142
- .option('-dxConnectPassword, --dxConnectPassword <value>', 'Password for the cw_profile', MaskData.maskPassword(config.dxConnectPassword))
129
+ .requiredOption('--hostname [value]', 'Host name of the DX Core server', config.hostname)
130
+ .requiredOption('--dxConnectPort [value]', 'Port number of the cw_profile, for any Kubernetes Environment default port is 443', config.dxConnectPort ? config.dxConnectPort.toString() : config.dxConnectPort)
131
+ .requiredOption('--dxConnectProtocol [value]', 'Protocol of the cw_profile', config.dxConnectProtocol.toString())
132
+ .requiredOption('--dxConnectUsername [value]', 'Username for the cw_profile', config.dxConnectUsername)
133
+ .requiredOption('--dxConnectPassword [value]', 'Password for the cw_profile', MaskData.maskPassword(config.dxConnectPassword))
143
134
  .description('- Show version compatibility details between DX Core and DXClient.')
144
- .action((cmdOptions) => __awaiter(void 0, void 0, void 0, function* () {
145
- commands_1.configureCommand(constants_1.COMMANDS.VERSION_COMPAT);
135
+ .action(async (cmdOptions) => {
136
+ (0, commands_1.configureCommand)(constants_1.COMMANDS.VERSION_COMPAT);
146
137
  try {
147
138
  if (process.env.DXCLIENT_TYPE && process.env.DXCLIENT_TYPE === 'container') {
148
139
  logger_1.logger.help('\n Note: This installation is a container-based version of DXClient.\n');
@@ -150,146 +141,146 @@ program.command(constants_1.COMMANDS.VERSION_COMPAT)
150
141
  else {
151
142
  logger_1.logger.help('\n Note: This installation is a node-based version of DXClient.\n');
152
143
  }
153
- cmdOptions = utils_1.unmaskPasswords(cmdOptions);
154
- yield utils_1.validateVersionMapping(cmdOptions);
144
+ cmdOptions = (0, utils_1.unmaskPasswords)(cmdOptions);
145
+ await (0, utils_1.validateVersionMapping)(cmdOptions);
155
146
  }
156
147
  catch (error) {
157
148
  logger_1.logger.error(error.message);
158
- yield utils_1.flushLogAndExitProcess(false);
149
+ await (0, utils_1.flushLogAndExitProcess)(false);
159
150
  }
160
- }));
151
+ });
161
152
  program
162
153
  .command(constants_1.COMMANDS.DEPLOY_PORTLET)
163
- .requiredOption('-dxProtocol, --dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
164
- .requiredOption('-hostname, --hostname <value>', 'Host name of the DX Core server', config.hostname)
165
- .requiredOption('-dxPort, --dxPort <value>', 'Port number of the DX Core server, for any Kubernetes Environment default port is 443', config.dxPort ? config.dxPort.toString() : config.dxPort)
166
- .requiredOption('-xmlConfigPath, --xmlConfigPath <value>', 'Path to DX configuration endpoint', config.xmlConfigPath)
167
- .requiredOption('-dxUsername, --dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
168
- .requiredOption('-dxPassword, --dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
169
- .requiredOption('-dxConnectUsername, --dxConnectUsername <value>', 'Username for the cw_profile', config.dxConnectUsername)
170
- .requiredOption('-dxConnectPassword, --dxConnectPassword <value>', 'Password for the cw_profile', MaskData.maskPassword(config.dxConnectPassword))
171
- .requiredOption('-dxConnectPort, --dxConnectPort <value>', 'Port number of the cw_profile, for any Kubernetes Environment default port is 443', config.dxConnectPort ? config.dxConnectPort.toString() : config.dxConnectPort)
172
- .requiredOption('-xmlFile, --xmlFile <value>', 'Input xml file name with full path')
173
- .requiredOption('-warFile, --warFile <value>', 'War file name with full path ')
154
+ .requiredOption('--dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
155
+ .requiredOption('--hostname <value>', 'Host name of the DX Core server', config.hostname)
156
+ .requiredOption('--dxPort <value>', 'Port number of the DX Core server, for any Kubernetes Environment default port is 443', config.dxPort ? config.dxPort.toString() : config.dxPort)
157
+ .requiredOption('--xmlConfigPath <value>', 'Path to DX configuration endpoint', config.xmlConfigPath)
158
+ .requiredOption('--dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
159
+ .requiredOption('--dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
160
+ .requiredOption('--dxConnectUsername <value>', 'Username for the cw_profile', config.dxConnectUsername)
161
+ .requiredOption('--dxConnectPassword <value>', 'Password for the cw_profile', MaskData.maskPassword(config.dxConnectPassword))
162
+ .requiredOption('--dxConnectPort <value>', 'Port number of the cw_profile, for any Kubernetes Environment default port is 443', config.dxConnectPort ? config.dxConnectPort.toString() : config.dxConnectPort)
163
+ .requiredOption('--xmlFile <value>', 'Input xml file name with full path')
164
+ .requiredOption('--warFile <value>', 'War file name with full path ')
174
165
  .description('- Deploys the portlet to the DX Core server')
175
- .action((cmdOptions) => __awaiter(void 0, void 0, void 0, function* () {
176
- commands_1.configureCommand(constants_1.COMMANDS.DEPLOY_PORTLET);
166
+ .action(async (cmdOptions) => {
167
+ (0, commands_1.configureCommand)(constants_1.COMMANDS.DEPLOY_PORTLET);
177
168
  logger_1.logger.debug('Deploy portlet execution started');
178
169
  try {
179
- cmdOptions = utils_1.unmaskPasswords(cmdOptions);
180
- validateOptions_1.validateOptions(cmdOptions);
170
+ cmdOptions = (0, utils_1.unmaskPasswords)(cmdOptions);
171
+ (0, validateOptions_1.validateOptions)(cmdOptions);
181
172
  }
182
173
  catch (error) {
183
174
  logger_1.logger.error(error.message);
184
- yield utils_1.flushLogAndExitProcess(false, true);
175
+ await (0, utils_1.flushLogAndExitProcess)(false, true);
185
176
  }
186
177
  const deployPortletObj = new deployPortlet_1.DeployPortlet();
187
178
  try {
188
- const responseCode = yield deployPortletObj.invoke(cmdOptions);
179
+ const responseCode = await deployPortletObj.invoke(cmdOptions);
189
180
  logger_1.logger.debug('Response code from the invoke function: %s', responseCode);
190
181
  logger_1.logger.debug('Deploy portlet execution completed');
191
- yield utils_1.flushLogAndExitProcess(responseCode);
182
+ await (0, utils_1.flushLogAndExitProcess)(responseCode);
192
183
  }
193
184
  catch (error) {
194
185
  logger_1.logger.debug('Exception in execution of deploy portlet : %o', error);
195
- yield utils_1.flushLogAndExitProcess(false);
186
+ await (0, utils_1.flushLogAndExitProcess)(false);
196
187
  }
197
- }));
188
+ });
198
189
  program
199
190
  .command(constants_1.COMMANDS.UNDEPLOY_PORTLET)
200
- .requiredOption('-dxProtocol, --dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
201
- .requiredOption('-hostname,--hostname <value>', 'Host name of the DX Core server', config.hostname)
202
- .requiredOption('-dxPort,--dxPort <value>', 'Port number of the DX Core server, for any Kubernetes Environment default port is 443', config.dxPort ? config.dxPort.toString() : config.dxPort)
203
- .requiredOption('-xmlConfigPath, --xmlConfigPath <value>', 'Path to DX configuration endpoint', config.xmlConfigPath)
204
- .requiredOption('-dxUsername,--dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
205
- .requiredOption('-dxPassword,--dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
206
- .requiredOption('-xmlFile,--xmlFile <value>', 'XML file name with full path ')
207
- .option('-enableBackup,--enableBackup <value>', 'Set the flag to true to take backup of the Portlets that to be undeployed', config.enableBackup)
208
- .option('-dxConnectUsername, --dxConnectUsername <value>', 'Username for the cw_profile', config.dxConnectUsername)
209
- .option('-dxConnectPassword, --dxConnectPassword <value>', 'Password for the cw_profile', MaskData.maskPassword(config.dxConnectPassword))
210
- .option('-dxConnectPort, --dxConnectPort <value>', 'Port number of the cw_profile, for any Kubernetes Environment default port is 443', config.dxConnectPort ? config.dxConnectPort.toString() : config.dxConnectPort)
211
- .option('-dxSoapPort, --dxSoapPort <value>', 'Soap Port number of the DX Core server ', config.dxSoapPort)
212
- .option('-dxProfileName, --dxProfileName <value>', 'Profile name in the DX core server ', config.dxProfileName)
213
- .option('-dxProfilePath, --dxProfilePath <value>', 'Profile path of the DX Core server ', config.dxProfilePath)
191
+ .requiredOption('--dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
192
+ .requiredOption('--hostname <value>', 'Host name of the DX Core server', config.hostname)
193
+ .requiredOption('--dxPort <value>', 'Port number of the DX Core server, for any Kubernetes Environment default port is 443', config.dxPort ? config.dxPort.toString() : config.dxPort)
194
+ .requiredOption('--xmlConfigPath <value>', 'Path to DX configuration endpoint', config.xmlConfigPath)
195
+ .requiredOption('--dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
196
+ .requiredOption('--dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
197
+ .requiredOption('--xmlFile <value>', 'XML file name with full path ')
198
+ .option('--enableBackup <value>', 'Set the flag to true to take backup of the Portlets that to be undeployed', config.enableBackup)
199
+ .option('--dxConnectUsername <value>', 'Username for the cw_profile', config.dxConnectUsername)
200
+ .option('--dxConnectPassword <value>', 'Password for the cw_profile', MaskData.maskPassword(config.dxConnectPassword))
201
+ .option('--dxConnectPort <value>', 'Port number of the cw_profile, for any Kubernetes Environment default port is 443', config.dxConnectPort ? config.dxConnectPort.toString() : config.dxConnectPort)
202
+ .option('--dxSoapPort <value>', 'Soap Port number of the DX Core server ', config.dxSoapPort)
203
+ .option('--dxProfileName <value>', 'Profile name in the DX core server ', config.dxProfileName)
204
+ .option('--dxProfilePath <value>', 'Profile path of the DX Core server ', config.dxProfilePath)
214
205
  .description('- Undeploys the portlet from the DX Core server.')
215
- .action((cmdOptions) => __awaiter(void 0, void 0, void 0, function* () {
216
- commands_1.configureCommand(constants_1.COMMANDS.UNDEPLOY_PORTLET);
206
+ .action(async (cmdOptions) => {
207
+ (0, commands_1.configureCommand)(constants_1.COMMANDS.UNDEPLOY_PORTLET);
217
208
  logger_1.logger.debug('undeploy portlet execution started');
218
209
  try {
219
- cmdOptions = utils_1.unmaskPasswords(cmdOptions);
220
- validateOptions_1.validateOptions(cmdOptions);
210
+ cmdOptions = (0, utils_1.unmaskPasswords)(cmdOptions);
211
+ (0, validateOptions_1.validateOptions)(cmdOptions);
221
212
  }
222
213
  catch (error) {
223
214
  logger_1.logger.error(error.message);
224
- yield utils_1.flushLogAndExitProcess(false, true);
215
+ await (0, utils_1.flushLogAndExitProcess)(false, true);
225
216
  }
226
217
  const undeployPortletObj = new undeployPortlet_1.UndeployPortlet();
227
218
  try {
228
- const responseCode = yield undeployPortletObj.invoke(cmdOptions);
219
+ const responseCode = await undeployPortletObj.invoke(cmdOptions);
229
220
  logger_1.logger.debug('Response code from the invoke function: %s', responseCode);
230
221
  logger_1.logger.debug('undeploy portlet execution completed');
231
- yield utils_1.flushLogAndExitProcess(responseCode);
222
+ await (0, utils_1.flushLogAndExitProcess)(responseCode);
232
223
  }
233
224
  catch (error) {
234
225
  logger_1.logger.debug('Exception in execution of xml access : %o', error);
235
- yield utils_1.flushLogAndExitProcess(false);
226
+ await (0, utils_1.flushLogAndExitProcess)(false);
236
227
  }
237
- }));
228
+ });
238
229
  program
239
230
  .command(constants_1.COMMANDS.XMLACCESS)
240
- .requiredOption('-dxProtocol, --dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
241
- .requiredOption('-hostname,--hostname <value>', 'Host name of the DX Core server', config.hostname)
242
- .requiredOption('-dxPort,--dxPort <value>', 'Port number of the DX Core server, for any Kubernetes Environment default port is 443', config.dxPort ? config.dxPort.toString() : config.dxPort)
243
- .requiredOption('-xmlConfigPath, --xmlConfigPath <value>', 'Path to DX configuration endpoint', config.xmlConfigPath)
244
- .requiredOption('-dxUsername,--dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
245
- .requiredOption('-dxPassword,--dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
246
- .requiredOption('-xmlFile,--xmlFile <value>', 'XML file name with full path ')
231
+ .requiredOption('--dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
232
+ .requiredOption('--hostname <value>', 'Host name of the DX Core server', config.hostname)
233
+ .requiredOption('--dxPort <value>', 'Port number of the DX Core server, for any Kubernetes Environment default port is 443', config.dxPort ? config.dxPort.toString() : config.dxPort)
234
+ .requiredOption('--xmlConfigPath <value>', 'Path to DX configuration endpoint', config.xmlConfigPath)
235
+ .requiredOption('--dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
236
+ .requiredOption('--dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
237
+ .requiredOption('--xmlFile <value>', 'XML file name with full path ')
247
238
  .description('- Executes xml access tasks on the DX Core server.')
248
- .action((cmdOptions) => __awaiter(void 0, void 0, void 0, function* () {
249
- commands_1.configureCommand(constants_1.COMMANDS.XMLACCESS);
239
+ .action(async (cmdOptions) => {
240
+ (0, commands_1.configureCommand)(constants_1.COMMANDS.XMLACCESS);
250
241
  logger_1.logger.debug('Xmlaccess execution started');
251
242
  try {
252
- cmdOptions = utils_1.unmaskPasswords(cmdOptions);
253
- validateOptions_1.validateOptions(cmdOptions);
243
+ cmdOptions = (0, utils_1.unmaskPasswords)(cmdOptions);
244
+ (0, validateOptions_1.validateOptions)(cmdOptions);
254
245
  }
255
246
  catch (error) {
256
247
  logger_1.logger.error(error.message);
257
- yield utils_1.flushLogAndExitProcess(false, true);
248
+ await (0, utils_1.flushLogAndExitProcess)(false, true);
258
249
  }
259
250
  try {
260
251
  const xmlAccess = new xmlaccess_1.XmlAccess();
261
- const responseCode = yield xmlAccess.invoke(cmdOptions);
252
+ const responseCode = await xmlAccess.invoke(cmdOptions);
262
253
  logger_1.logger.debug('Response code from the invoke function: %s', responseCode);
263
254
  logger_1.logger.debug('Xmlaccess execution completed');
264
- yield utils_1.flushLogAndExitProcess(responseCode);
255
+ await (0, utils_1.flushLogAndExitProcess)(responseCode);
265
256
  }
266
257
  catch (error) {
267
258
  logger_1.logger.debug('Exception in execution of xml access : %o', error);
268
- yield utils_1.flushLogAndExitProcess(false);
259
+ await (0, utils_1.flushLogAndExitProcess)(false);
269
260
  }
270
- }));
261
+ });
271
262
  program
272
263
  .command('deploy-scriptapplication [subCmd]')
273
- .requiredOption('-dxProtocol,--dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
274
- .requiredOption('-hostname,--hostname <value>', 'Hostname of the DX Core server', config.hostname)
275
- .requiredOption('-dxPort,--dxPort <value>', 'Port number for DX Core server, for any Kubernetes Environment default port is 443', config.dxPort ? config.dxPort.toString() : config.dxPort)
276
- .requiredOption('-dxUsername,--dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
277
- .requiredOption('-dxPassword,--dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
278
- .requiredOption('-wcmSiteArea,--wcmSiteArea <value>', 'Web Content Manager site area in which Script Application instances are created', config.wcmSiteArea)
279
- .requiredOption('-contenthandlerPath,--contenthandlerPath <value>', 'Alternate path for the portal context root or the content handler servlet', config.contenthandlerPath)
280
- .requiredOption('-mainHtmlFile,--mainHtmlFile <value>', 'Path to the main .html file of the Script Application', '')
281
- .requiredOption('-wcmContentId,--wcmContentId <value>', 'Web Content Manager content ID of an existing Script Application instance on a portal page', config.wcmContentId)
282
- .requiredOption('-wcmContentTitle,--wcmContentTitle <value>', 'Sets or updates the title of the Script Application instance', '')
283
- .option('-contentRoot,--contentRoot <value>', 'Absolute or relative path to a directory on the workstation that contains the content to be pushed to the portal')
284
- .option('-wcmContentPath,--wcmContentPath <value>', 'Full Web Content Manager path, including library and site area', config.wcmContentPath)
285
- .option('-wcmContentName,--wcmContentName <value>', 'Name of the Script Application instance to be created or updated', config.wcmContentName)
286
- .option('-prebuiltZip,--prebuiltZip <value>', 'Path to an existing compressed file that provides the content to be pushed to the portal')
287
- .option('-virtualPortalContext,--virtualPortalContext <value>', 'Context of the virtual portal that contains the Script Application instance', config.virtualPortalContext)
288
- .option('-projectContext,--projectContext <value>', 'Context of the portal project that manages the publication of changes to the Script Application content', config.projectContext)
264
+ .requiredOption('--dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
265
+ .requiredOption('--hostname <value>', 'Hostname of the DX Core server', config.hostname)
266
+ .requiredOption('--dxPort <value>', 'Port number for DX Core server, for any Kubernetes Environment default port is 443', config.dxPort ? config.dxPort.toString() : config.dxPort)
267
+ .requiredOption('--dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
268
+ .requiredOption('--dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
269
+ .requiredOption('--wcmSiteArea <value>', 'Web Content Manager site area in which Script Application instances are created', config.wcmSiteArea)
270
+ .requiredOption('--contenthandlerPath <value>', 'Alternate path for the portal context root or the content handler servlet', config.contenthandlerPath)
271
+ .requiredOption('--mainHtmlFile <value>', 'Path to the main .html file of the Script Application', '')
272
+ .requiredOption('--wcmContentId <value>', 'Web Content Manager content ID of an existing Script Application instance on a portal page', config.wcmContentId)
273
+ .requiredOption('--wcmContentTitle <value>', 'Sets or updates the title of the Script Application instance', '')
274
+ .option('--contentRoot <value>', 'Absolute or relative path to a directory on the workstation that contains the content to be pushed to the portal')
275
+ .option('--wcmContentPath <value>', 'Full Web Content Manager path, including library and site area', config.wcmContentPath)
276
+ .option('--wcmContentName <value>', 'Name of the Script Application instance to be created or updated', config.wcmContentName)
277
+ .option('--prebuiltZip <value>', 'Path to an existing compressed file that provides the content to be pushed to the portal')
278
+ .option('--virtualPortalContext <value>', 'Context of the virtual portal that contains the Script Application instance', config.virtualPortalContext)
279
+ .option('--projectContext <value>', 'Context of the portal project that manages the publication of changes to the Script Application content', config.projectContext)
289
280
  .option('-h, --help')
290
281
  .description('- creates or updates the content of a Script Application instance')
291
- .action((subCmd, cmd) => __awaiter(void 0, void 0, void 0, function* () {
292
- if ((subCmd === constants_1.SUB_COMMANDS.SCRIPT_APPLICATION_PULL || subCmd === constants_1.SUB_COMMANDS.SCRIPT_APPLICATION_PUSH) && (cmd.parent.args[2] === constants_1.COMMANDS.H || cmd.parent.args[2] === constants_1.COMMANDS.HELP)) {
282
+ .action(async (subCmd, cmd) => {
283
+ if ((subCmd === constants_1.SUB_COMMANDS.SCRIPT_APPLICATION_PULL || subCmd === constants_1.SUB_COMMANDS.SCRIPT_APPLICATION_PUSH) && (process.argv.includes(constants_1.COMMANDS.H) || process.argv.includes(constants_1.COMMANDS.HELP))) {
293
284
  logger_1.logger.help('\n This command allows user to create or update (push) or fetch (pull) the content in a Script Application in DX Core');
294
285
  logger_1.logger.help('\n Usage: dxclient deploy-scriptapplication [options] [subCmd]');
295
286
  logger_1.logger.help(` - Create or update the content of a Script Application instance for ${subCmd} \n`);
@@ -336,563 +327,563 @@ Script Application content (default: "${config.projectContext}")`);
336
327
  }
337
328
  else {
338
329
  const command = subCmd === constants_1.SUB_COMMANDS.SCRIPT_APPLICATION_PULL ? constants_1.COMMANDS.SCRIPT_APPLICATION_PULL : constants_1.COMMANDS.SCRIPT_APPLICATION_PUSH;
339
- commands_1.configureCommand(command);
340
- cmd = utils_1.unmaskPasswords(cmd);
341
- validateOptions_1.validateOptions(cmd);
330
+ (0, commands_1.configureCommand)(command);
331
+ cmd = (0, utils_1.unmaskPasswords)(cmd);
332
+ (0, validateOptions_1.validateOptions)(cmd);
342
333
  }
343
334
  }
344
335
  catch (error) {
345
336
  logger_1.logger.error(error.message);
346
- yield utils_1.flushLogAndExitProcess(false, true);
337
+ await (0, utils_1.flushLogAndExitProcess)(false, true);
347
338
  }
348
339
  if (subCmd === constants_1.SUB_COMMANDS.SCRIPT_APPLICATION_PULL) {
349
340
  logger_1.logger.debug('Deploy script application execution started');
350
341
  const pull = new pull_1.Pull();
351
342
  try {
352
- const responseCode = yield pull.pullScriptApplication(cmd);
343
+ const responseCode = await pull.pullScriptApplication(cmd);
353
344
  logger_1.logger.debug('Response code from the invoke function: %s', responseCode);
354
345
  logger_1.logger.debug('Deploy script application execution completed');
355
- yield utils_1.flushLogAndExitProcess(responseCode);
346
+ await (0, utils_1.flushLogAndExitProcess)(responseCode);
356
347
  }
357
348
  catch (error) {
358
349
  logger_1.logger.debug('Exception in execution of script application : %o', error);
359
- yield utils_1.flushLogAndExitProcess(false);
350
+ await (0, utils_1.flushLogAndExitProcess)(false);
360
351
  }
361
352
  }
362
353
  else if (subCmd === constants_1.SUB_COMMANDS.SCRIPT_APPLICATION_PUSH) {
363
354
  logger_1.logger.debug('Deploy script application execution started');
364
355
  try {
365
356
  const push = new push_1.PushSP();
366
- const responseCode = yield push.pushScriptApplication(cmd);
357
+ const responseCode = await push.pushScriptApplication(cmd);
367
358
  logger_1.logger.debug('Response code from the invoke function: %s', responseCode);
368
359
  logger_1.logger.debug('Deploy script application execution completed');
369
360
  if (responseCode.results && responseCode.results.status === constants_1.ResponseStatus.SUCCESS) {
370
- yield utils_1.flushLogAndExitProcess(true);
361
+ await (0, utils_1.flushLogAndExitProcess)(true);
371
362
  }
372
363
  else {
373
- yield utils_1.flushLogAndExitProcess(false);
364
+ await (0, utils_1.flushLogAndExitProcess)(false);
374
365
  }
375
366
  }
376
367
  catch (error) {
377
368
  logger_1.logger.debug('Exception in execution of script application : %o', error);
378
- yield utils_1.flushLogAndExitProcess(false);
369
+ await (0, utils_1.flushLogAndExitProcess)(false);
379
370
  }
380
371
  }
381
- }))
372
+ })
382
373
  .helpOption(false);
383
374
  program
384
375
  .command(constants_1.COMMANDS.UNDEPLOY_SCRIPTAPPLICATION)
385
- .requiredOption('-dxProtocol,--dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
386
- .requiredOption('-hostname,--hostname <value>', 'Hostname of the DX Core server', config.hostname)
387
- .requiredOption('-dxPort,--dxPort <value>', 'Port number for DX Core server, for any Kubernetes Environment default port is 443', config.dxPort ? config.dxPort.toString() : config.dxPort)
388
- .requiredOption('-dxUsername,--dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
389
- .requiredOption('-dxPassword,--dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
390
- .requiredOption('-contenthandlerPath,--contenthandlerPath <value>', 'Alternate path for the portal context root or the content handler servlet', config.contenthandlerPath)
391
- .requiredOption('-wcmContentId,--wcmContentId <value>', 'Web Content Manager content ID of an existing Script Application instance on a portal page', config.wcmContentId)
392
- .option('-virtualPortalContext,--virtualPortalContext <value>', 'Context of the virtual portal that contains the Script Application instance', config.virtualPortalContext)
393
- .option('-projectContext,--projectContext <value>', 'Context of the portal project that manages the publication of changes to the Script Application content', config.projectContext)
376
+ .requiredOption('--dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
377
+ .requiredOption('--hostname <value>', 'Hostname of the DX Core server', config.hostname)
378
+ .requiredOption('--dxPort <value>', 'Port number for DX Core server, for any Kubernetes Environment default port is 443', config.dxPort ? config.dxPort.toString() : config.dxPort)
379
+ .requiredOption('--dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
380
+ .requiredOption('--dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
381
+ .requiredOption('--contenthandlerPath <value>', 'Alternate path for the portal context root or the content handler servlet', config.contenthandlerPath)
382
+ .requiredOption('--wcmContentId <value>', 'Web Content Manager content ID of an existing Script Application instance on a portal page', config.wcmContentId)
383
+ .option('--virtualPortalContext <value>', 'Context of the virtual portal that contains the Script Application instance', config.virtualPortalContext)
384
+ .option('--projectContext <value>', 'Context of the portal project that manages the publication of changes to the Script Application content', config.projectContext)
394
385
  .option('-f, --force', 'Delete the Script Application forcefully')
395
- .option('-enableBackup, --enableBackup <value>', 'Set the flag to true to take backup of the script application to be undeployed', config.enableBackup)
386
+ .option('--enableBackup <value>', 'Set the flag to true to take backup of the script application to be undeployed', config.enableBackup)
396
387
  .description('- Undeploys the script application from the DX Core server')
397
- .action((cmd) => __awaiter(void 0, void 0, void 0, function* () {
398
- commands_1.configureCommand(constants_1.COMMANDS.UNDEPLOY_SCRIPTAPPLICATION);
388
+ .action(async (cmd) => {
389
+ (0, commands_1.configureCommand)(constants_1.COMMANDS.UNDEPLOY_SCRIPTAPPLICATION);
399
390
  try {
400
- cmd = utils_1.unmaskPasswords(cmd);
401
- validateOptions_1.validateOptions(cmd);
391
+ cmd = (0, utils_1.unmaskPasswords)(cmd);
392
+ (0, validateOptions_1.validateOptions)(cmd);
402
393
  }
403
394
  catch (error) {
404
395
  logger_1.logger.error(error.message);
405
- yield utils_1.flushLogAndExitProcess(false, true);
396
+ await (0, utils_1.flushLogAndExitProcess)(false, true);
406
397
  }
407
398
  try {
408
399
  const undeployScriptApplication = new undeployScriptApplication_1.UndeployScriptApplication();
409
400
  logger_1.logger.debug('Undeploy scriptapplication execution started');
410
- const responseCode = yield undeployScriptApplication.invoke(cmd);
401
+ const responseCode = await undeployScriptApplication.invoke(cmd);
411
402
  logger_1.logger.debug('Response code from the invoke function: %s', responseCode);
412
403
  logger_1.logger.debug('Undeploy scriptapplication execution completed');
413
- yield utils_1.flushLogAndExitProcess(responseCode);
404
+ await (0, utils_1.flushLogAndExitProcess)(responseCode);
414
405
  }
415
406
  catch (error) {
416
407
  logger_1.logger.debug('Exception in execution of undeploy scriptapplication : %o', error);
417
- yield utils_1.flushLogAndExitProcess(false);
408
+ await (0, utils_1.flushLogAndExitProcess)(false);
418
409
  }
419
- }));
410
+ });
420
411
  program
421
412
  .command(constants_1.COMMANDS.RESTORE_SCRIPTAPPLICATION)
422
- .requiredOption('-dxProtocol,--dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
423
- .requiredOption('-hostname,--hostname <value>', 'Hostname of the DX Core server', config.hostname)
424
- .requiredOption('-dxPort,--dxPort <value>', 'Port number for DX Core server, for any Kubernetes Environment default port is 443', config.dxPort ? config.dxPort.toString() : config.dxPort)
425
- .requiredOption('-dxUsername,--dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
426
- .requiredOption('-dxPassword,--dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
427
- .requiredOption('-contenthandlerPath,--contenthandlerPath <value>', 'Alternate path for the portal context root or the content handler servlet', config.contenthandlerPath)
428
- .requiredOption('-wcmContentId,--wcmContentId <value>', 'Web Content Manager content ID of an existing Script Application instance on a portal page', '')
429
- .requiredOption('-versionName,--versionName <value>', 'Name of the version that should become the current version of Script Application', '')
430
- .requiredOption('-restoreAsPublished,--restoreAsPublished <value>', 'Restore as a draft or replace the published version of Script Application', config.restoreAsPublished)
431
- .option('-virtualPortalContext,--virtualPortalContext <value>', 'Context of the virtual portal that contains the Script Application instance', config.virtualPortalContext)
432
- .option('-projectContext,--projectContext <value>', 'Context of the portal project that manages the publication of changes to the Script Application content', config.projectContext)
413
+ .requiredOption('--dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
414
+ .requiredOption('--hostname <value>', 'Hostname of the DX Core server', config.hostname)
415
+ .requiredOption('--dxPort <value>', 'Port number for DX Core server, for any Kubernetes Environment default port is 443', config.dxPort ? config.dxPort.toString() : config.dxPort)
416
+ .requiredOption('--dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
417
+ .requiredOption('--dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
418
+ .requiredOption('--contenthandlerPath <value>', 'Alternate path for the portal context root or the content handler servlet', config.contenthandlerPath)
419
+ .requiredOption('--wcmContentId <value>', 'Web Content Manager content ID of an existing Script Application instance on a portal page', '')
420
+ .requiredOption('--versionName <value>', 'Name of the version that should become the current version of Script Application', '')
421
+ .requiredOption('--restoreAsPublished <value>', 'Restore as a draft or replace the published version of Script Application', config.restoreAsPublished)
422
+ .option('--virtualPortalContext <value>', 'Context of the virtual portal that contains the Script Application instance', config.virtualPortalContext)
423
+ .option('--projectContext <value>', 'Context of the portal project that manages the publication of changes to the Script Application content', config.projectContext)
433
424
  .description('- Restores script application to version specified or if not, its previous by default')
434
- .action((cmd) => __awaiter(void 0, void 0, void 0, function* () {
435
- commands_1.configureCommand(constants_1.COMMANDS.RESTORE_SCRIPTAPPLICATION);
425
+ .action(async (cmd) => {
426
+ (0, commands_1.configureCommand)(constants_1.COMMANDS.RESTORE_SCRIPTAPPLICATION);
436
427
  try {
437
- cmd = utils_1.unmaskPasswords(cmd);
438
- validateOptions_1.validateOptions(cmd);
428
+ cmd = (0, utils_1.unmaskPasswords)(cmd);
429
+ (0, validateOptions_1.validateOptions)(cmd);
439
430
  }
440
431
  catch (error) {
441
432
  logger_1.logger.error(error.message);
442
- yield utils_1.flushLogAndExitProcess(false, true);
433
+ await (0, utils_1.flushLogAndExitProcess)(false, true);
443
434
  }
444
435
  const restoreScriptApplication = new restoreScriptApplication_1.RestoreScriptApplication();
445
436
  logger_1.logger.debug('Restore scriptapplication execution started');
446
437
  try {
447
- const responseCode = yield restoreScriptApplication.invoke(cmd);
438
+ const responseCode = await restoreScriptApplication.invoke(cmd);
448
439
  logger_1.logger.debug('Response code from the invoke function: %s', responseCode);
449
440
  logger_1.logger.debug('Restore scriptapplication execution completed');
450
- yield utils_1.flushLogAndExitProcess(responseCode);
441
+ await (0, utils_1.flushLogAndExitProcess)(responseCode);
451
442
  }
452
443
  catch (error) {
453
444
  logger_1.logger.debug('Exception in execution of Restore scriptapplication : %o', error);
454
- yield utils_1.flushLogAndExitProcess(false);
445
+ await (0, utils_1.flushLogAndExitProcess)(false);
455
446
  }
456
- }));
447
+ });
457
448
  program
458
449
  .command(constants_1.COMMANDS.DEPLOY_THEME)
459
- .requiredOption('-dxProtocol, --dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
460
- .requiredOption('-hostname, --hostname <value>', 'Host name of the DX Core server', config.hostname)
461
- .requiredOption('-dxPort, --dxPort <value>', 'Port number of the DX Core server, for any Kubernetes Environment default port is 443', config.dxPort ? config.dxPort.toString() : config.dxPort)
462
- .requiredOption('-xmlConfigPath, --xmlConfigPath <value>', 'Path to DX configuration endpoint', config.xmlConfigPath)
463
- .requiredOption('-dxUsername, --dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
464
- .requiredOption('-dxPassword, --dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
465
- .requiredOption('-contenthandlerPath,--contenthandlerPath <value>', 'Alternate path for the portal context root or the content handler servlet', config.contenthandlerPath)
466
- .requiredOption('-dxSoapPort, --dxSoapPort <value>', 'Soap Port number of the DX Core server ', config.dxSoapPort)
467
- .requiredOption('-dxProfileName, --dxProfileName <value>', 'Profile name in the DX core server ', config.dxProfileName)
468
- .option('-dxProfilePath, --dxProfilePath <value>', 'Profile path of the DX Core server ', config.dxProfilePath)
469
- .requiredOption('-dxConnectUsername, --dxConnectUsername <value>', 'Username for the cw_profile', config.dxConnectUsername)
470
- .requiredOption('-dxConnectPassword, --dxConnectPassword <value>', 'Password for the cw_profile', MaskData.maskPassword(config.dxConnectPassword))
471
- .requiredOption('-dxConnectPort, --dxConnectPort <value>', 'Port number of the cw_profile, for any Kubernetes Environment default port is 443', config.dxConnectPort ? config.dxConnectPort.toString() : config.dxConnectPort)
472
- .option('-xmlFile, --xmlFile <value>', 'Input xml file name with full path')
473
- .option('-applicationFile, --applicationFile <value>', 'Application file name with full path')
474
- .option('-applicationName, --applicationName <value>', 'Application name')
475
- .option('-themeName, --themeName <value>', 'Theme Collection name')
476
- .option('-themePath, --themePath <value>', 'Theme Path with zip or folder name')
477
- .option('-requestId, --requestId <value>', 'Unique Id of a previously triggered deploy theme request.')
450
+ .requiredOption('--dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
451
+ .requiredOption('--hostname <value>', 'Host name of the DX Core server', config.hostname)
452
+ .requiredOption('--dxPort <value>', 'Port number of the DX Core server, for any Kubernetes Environment default port is 443', config.dxPort ? config.dxPort.toString() : config.dxPort)
453
+ .requiredOption('--xmlConfigPath <value>', 'Path to DX configuration endpoint', config.xmlConfigPath)
454
+ .requiredOption('--dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
455
+ .requiredOption('--dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
456
+ .requiredOption('--contenthandlerPath <value>', 'Alternate path for the portal context root or the content handler servlet', config.contenthandlerPath)
457
+ .requiredOption('--dxSoapPort <value>', 'Soap Port number of the DX Core server ', config.dxSoapPort)
458
+ .requiredOption('--dxProfileName <value>', 'Profile name in the DX core server ', config.dxProfileName)
459
+ .option('--dxProfilePath <value>', 'Profile path of the DX Core server ', config.dxProfilePath)
460
+ .requiredOption('--dxConnectUsername <value>', 'Username for the cw_profile', config.dxConnectUsername)
461
+ .requiredOption('--dxConnectPassword <value>', 'Password for the cw_profile', MaskData.maskPassword(config.dxConnectPassword))
462
+ .requiredOption('--dxConnectPort <value>', 'Port number of the cw_profile, for any Kubernetes Environment default port is 443', config.dxConnectPort ? config.dxConnectPort.toString() : config.dxConnectPort)
463
+ .option('--xmlFile <value>', 'Input xml file name with full path')
464
+ .option('--applicationFile <value>', 'Application file name with full path')
465
+ .option('--applicationName <value>', 'Application name')
466
+ .option('--themeName <value>', 'Theme Collection name')
467
+ .option('--themePath <value>', 'Theme Path with zip or folder name')
468
+ .option('--requestId <value>', 'Unique Id of a previously triggered deploy theme request.')
478
469
  .description('- Deploys the theme(EAR or WebDav packages) to the DX Core server')
479
- .action((cmdOptions) => __awaiter(void 0, void 0, void 0, function* () {
480
- commands_1.configureCommand(constants_1.COMMANDS.DEPLOY_THEME);
470
+ .action(async (cmdOptions) => {
471
+ (0, commands_1.configureCommand)(constants_1.COMMANDS.DEPLOY_THEME);
481
472
  logger_1.logger.debug('Deploy theme execution started');
482
473
  try {
483
- cmdOptions = utils_1.unmaskPasswords(cmdOptions);
484
- validateOptions_1.validateOptions(cmdOptions);
474
+ cmdOptions = (0, utils_1.unmaskPasswords)(cmdOptions);
475
+ (0, validateOptions_1.validateOptions)(cmdOptions);
485
476
  }
486
477
  catch (error) {
487
478
  logger_1.logger.error(error.message);
488
- yield utils_1.flushLogAndExitProcess(false, true);
479
+ await (0, utils_1.flushLogAndExitProcess)(false, true);
489
480
  }
490
481
  try {
491
482
  const deployThemeObj = new deployTheme_1.DeployTheme();
492
- const responseCode = yield deployThemeObj.invoke(cmdOptions);
483
+ const responseCode = await deployThemeObj.invoke(cmdOptions);
493
484
  logger_1.logger.debug('Response code from the invoke function: %s', responseCode);
494
485
  logger_1.logger.debug('Deploy theme execution completed');
495
- yield utils_1.flushLogAndExitProcess(responseCode);
486
+ await (0, utils_1.flushLogAndExitProcess)(responseCode);
496
487
  }
497
488
  catch (error) {
498
489
  logger_1.logger.debug('Exception in execution : %o', error);
499
- yield utils_1.flushLogAndExitProcess(false);
490
+ await (0, utils_1.flushLogAndExitProcess)(false);
500
491
  }
501
- }));
492
+ });
502
493
  program
503
494
  .command(constants_1.COMMANDS.UNDEPLOY_THEME)
504
- .requiredOption('-dxProtocol, --dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
505
- .requiredOption('-hostname, --hostname <value>', 'Host name of the DX Core server', config.hostname)
506
- .requiredOption('-dxPort, --dxPort <value>', 'Port number of the DX Core server, for any Kubernetes Environment default port is 443', config.dxPort ? config.dxPort.toString() : config.dxPort)
507
- .requiredOption('-xmlConfigPath, --xmlConfigPath <value>', 'Path to DX configuration endpoint', config.xmlConfigPath)
508
- .requiredOption('-dxUsername, --dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
509
- .requiredOption('-dxPassword, --dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
510
- .requiredOption('-contenthandlerPath,--contenthandlerPath <value>', 'Alternate path for the portal context root or the content handler servlet', config.contenthandlerPath)
511
- .requiredOption('-dxSoapPort, --dxSoapPort <value>', 'Soap Port number of the DX Core server ', config.dxSoapPort)
512
- .requiredOption('-dxProfileName, --dxProfileName <value>', 'Profile name in the DX core server ', config.dxProfileName)
513
- .option('-dxProfilePath, --dxProfilePath <value>', 'Profile path of the DX Core server ', config.dxProfilePath)
514
- .requiredOption('-dxConnectUsername, --dxConnectUsername <value>', 'Username for the cw_profile', config.dxConnectUsername)
515
- .requiredOption('-dxConnectPassword, --dxConnectPassword <value>', 'Password for the cw_profile', MaskData.maskPassword(config.dxConnectPassword))
516
- .requiredOption('-dxConnectPort, --dxConnectPort <value>', 'Port number of the cw_profile, for any Kubernetes Environment default port is 443', config.dxConnectPort ? config.dxConnectPort.toString() : config.dxConnectPort)
517
- .option('-xmlFile, --xmlFile <value>', 'Input xml file name with full path to unregister the theme')
518
- .option('-applicationName, --applicationName <value>', 'Application name')
519
- .option('-themeName, --themeName <value>', 'Theme Collection name')
520
- .option('-enableBackup, --enableBackup <value>', 'Set the flag to true to take backup of the theme to be undeployed', config.enableBackup)
495
+ .requiredOption('--dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
496
+ .requiredOption('--hostname <value>', 'Host name of the DX Core server', config.hostname)
497
+ .requiredOption('--dxPort <value>', 'Port number of the DX Core server, for any Kubernetes Environment default port is 443', config.dxPort ? config.dxPort.toString() : config.dxPort)
498
+ .requiredOption('--xmlConfigPath <value>', 'Path to DX configuration endpoint', config.xmlConfigPath)
499
+ .requiredOption('--dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
500
+ .requiredOption('--dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
501
+ .requiredOption('--contenthandlerPath <value>', 'Alternate path for the portal context root or the content handler servlet', config.contenthandlerPath)
502
+ .requiredOption('--dxSoapPort <value>', 'Soap Port number of the DX Core server ', config.dxSoapPort)
503
+ .requiredOption('--dxProfileName <value>', 'Profile name in the DX core server ', config.dxProfileName)
504
+ .option('--dxProfilePath <value>', 'Profile path of the DX Core server ', config.dxProfilePath)
505
+ .requiredOption('--dxConnectUsername <value>', 'Username for the cw_profile', config.dxConnectUsername)
506
+ .requiredOption('--dxConnectPassword <value>', 'Password for the cw_profile', MaskData.maskPassword(config.dxConnectPassword))
507
+ .requiredOption('--dxConnectPort <value>', 'Port number of the cw_profile, for any Kubernetes Environment default port is 443', config.dxConnectPort ? config.dxConnectPort.toString() : config.dxConnectPort)
508
+ .option('--xmlFile <value>', 'Input xml file name with full path to unregister the theme')
509
+ .option('--applicationName <value>', 'Application name')
510
+ .option('--themeName <value>', 'Theme Collection name')
511
+ .option('--enableBackup <value>', 'Set the flag to true to take backup of the theme to be undeployed', config.enableBackup)
521
512
  .description('- Undeploys the theme(EAR or WebDav packages) from the DX Core server')
522
- .action((cmdOptions) => __awaiter(void 0, void 0, void 0, function* () {
523
- commands_1.configureCommand(constants_1.COMMANDS.UNDEPLOY_THEME);
513
+ .action(async (cmdOptions) => {
514
+ (0, commands_1.configureCommand)(constants_1.COMMANDS.UNDEPLOY_THEME);
524
515
  logger_1.logger.debug('Undeploy theme execution started');
525
516
  try {
526
- cmdOptions = utils_1.unmaskPasswords(cmdOptions);
527
- validateOptions_1.validateOptions(cmdOptions);
517
+ cmdOptions = (0, utils_1.unmaskPasswords)(cmdOptions);
518
+ (0, validateOptions_1.validateOptions)(cmdOptions);
528
519
  }
529
520
  catch (error) {
530
521
  logger_1.logger.error(error.message);
531
- yield utils_1.flushLogAndExitProcess(false, true);
522
+ await (0, utils_1.flushLogAndExitProcess)(false, true);
532
523
  }
533
524
  try {
534
525
  const undeployThemeObj = new undeployTheme_1.UndeployTheme();
535
- const responseCode = yield undeployThemeObj.invoke(cmdOptions);
526
+ const responseCode = await undeployThemeObj.invoke(cmdOptions);
536
527
  logger_1.logger.debug('Response code from the invoke function: %s', responseCode);
537
528
  logger_1.logger.debug('Undeploy theme execution completed');
538
- yield utils_1.flushLogAndExitProcess(responseCode);
529
+ await (0, utils_1.flushLogAndExitProcess)(responseCode);
539
530
  }
540
531
  catch (error) {
541
532
  logger_1.logger.debug('Exception in execution : %o', error);
542
- yield utils_1.flushLogAndExitProcess(false);
533
+ await (0, utils_1.flushLogAndExitProcess)(false);
543
534
  }
544
- }));
535
+ });
545
536
  program
546
537
  .command(constants_1.COMMANDS.DEPLOY_APPLICATION)
547
- .requiredOption('-dxProtocol, --dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
548
- .requiredOption('-hostname, --hostname <value>', 'Host name of the DX Core server', config.hostname)
549
- .requiredOption('-dxPort, --dxPort <value>', 'Port number of the DX Core server, for any Kubernetes Environment default port is 443', config.dxPort ? config.dxPort.toString() : config.dxPort)
550
- .requiredOption('-dxUsername, --dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
551
- .requiredOption('-dxPassword, --dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
552
- .requiredOption('-dxSoapPort, --dxSoapPort <value>', 'Soap Port number of the DX Core server ', config.dxSoapPort)
553
- .requiredOption('-dxProfileName, --dxProfileName <value>', 'Profile name in the DX core server ', config.dxProfileName)
554
- .option('-dxProfilePath, --dxProfilePath <value>', 'Profile path of the DX Core server ', config.dxProfilePath)
555
- .requiredOption('-dxConnectUsername, --dxConnectUsername <value>', 'Username for the cw_profile', config.dxConnectUsername)
556
- .requiredOption('-dxConnectPassword, --dxConnectPassword <value>', 'Password for the cw_profile', MaskData.maskPassword(config.dxConnectPassword))
557
- .requiredOption('-dxConnectPort, --dxConnectPort <value>', 'Port number of the cw_profile, for any Kubernetes Environment default port is 443', config.dxConnectPort ? config.dxConnectPort.toString() : config.dxConnectPort)
558
- .requiredOption('-dxConnectProtocol, --dxConnectProtocol <value>', 'Protocol of the cw_profile', config.dxConnectProtocol.toString())
559
- .requiredOption('-applicationFile, --applicationFile <value>', 'Application file name with full path')
560
- .requiredOption('-applicationName, --applicationName <value>', 'Application name')
561
- .option('-requestId, --requestId <value>', 'Unique Id of a previously triggered deploy application request.')
538
+ .requiredOption('--dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
539
+ .requiredOption('--hostname <value>', 'Host name of the DX Core server', config.hostname)
540
+ .requiredOption('--dxPort <value>', 'Port number of the DX Core server, for any Kubernetes Environment default port is 443', config.dxPort ? config.dxPort.toString() : config.dxPort)
541
+ .requiredOption('--dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
542
+ .requiredOption('--dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
543
+ .requiredOption('--dxSoapPort <value>', 'Soap Port number of the DX Core server ', config.dxSoapPort)
544
+ .requiredOption('--dxProfileName <value>', 'Profile name in the DX core server ', config.dxProfileName)
545
+ .option('--dxProfilePath <value>', 'Profile path of the DX Core server ', config.dxProfilePath)
546
+ .requiredOption('--dxConnectUsername <value>', 'Username for the cw_profile', config.dxConnectUsername)
547
+ .requiredOption('--dxConnectPassword <value>', 'Password for the cw_profile', MaskData.maskPassword(config.dxConnectPassword))
548
+ .requiredOption('--dxConnectPort <value>', 'Port number of the cw_profile, for any Kubernetes Environment default port is 443', config.dxConnectPort ? config.dxConnectPort.toString() : config.dxConnectPort)
549
+ .requiredOption('--dxConnectProtocol <value>', 'Protocol of the cw_profile', config.dxConnectProtocol.toString())
550
+ .requiredOption('--applicationFile <value>', 'Application file name with full path')
551
+ .requiredOption('--applicationName <value>', 'Application name')
552
+ .option('--requestId <value>', 'Unique Id of a previously triggered deploy application request.')
562
553
  .description('- Deploys the application to the DX Core server')
563
- .action((cmdOptions) => __awaiter(void 0, void 0, void 0, function* () {
564
- commands_1.configureCommand(constants_1.COMMANDS.DEPLOY_APPLICATION);
554
+ .action(async (cmdOptions) => {
555
+ (0, commands_1.configureCommand)(constants_1.COMMANDS.DEPLOY_APPLICATION);
565
556
  logger_1.logger.debug('Deploy Application execution started');
566
557
  try {
567
- cmdOptions = utils_1.unmaskPasswords(cmdOptions);
568
- validateOptions_1.validateOptions(cmdOptions);
558
+ cmdOptions = (0, utils_1.unmaskPasswords)(cmdOptions);
559
+ (0, validateOptions_1.validateOptions)(cmdOptions);
569
560
  }
570
561
  catch (error) {
571
562
  logger_1.logger.error(error.message);
572
- yield utils_1.flushLogAndExitProcess(false, true);
563
+ await (0, utils_1.flushLogAndExitProcess)(false, true);
573
564
  }
574
565
  try {
575
566
  const deployApplicationObj = new deployApplication_1.DeployApplication();
576
- const responseCode = yield deployApplicationObj.invoke(cmdOptions);
567
+ const responseCode = await deployApplicationObj.invoke(cmdOptions);
577
568
  logger_1.logger.debug('Response code from the invoke function: %s', responseCode);
578
569
  logger_1.logger.debug('Deploy Application execution completed');
579
- yield utils_1.flushLogAndExitProcess(responseCode);
570
+ await (0, utils_1.flushLogAndExitProcess)(responseCode);
580
571
  }
581
572
  catch (error) {
582
573
  logger_1.logger.debug('Exception in execution : %o', error);
583
- yield utils_1.flushLogAndExitProcess(false);
574
+ await (0, utils_1.flushLogAndExitProcess)(false);
584
575
  }
585
- }));
576
+ });
586
577
  program
587
578
  .command(constants_1.COMMANDS.UNDEPLOY_APPLICATION)
588
- .requiredOption('-dxProtocol, --dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
589
- .requiredOption('-hostname, --hostname <value>', 'Host name of the DX Core server', config.hostname)
590
- .requiredOption('-dxPort, --dxPort <value>', 'Port number of the DX Core server, for any Kubernetes Environment default port is 443', config.dxPort ? config.dxPort.toString() : config.dxPort)
591
- .requiredOption('-dxUsername, --dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
592
- .requiredOption('-dxPassword, --dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
593
- .requiredOption('-dxSoapPort, --dxSoapPort <value>', 'Soap Port number of the DX Core server ', config.dxSoapPort)
594
- .requiredOption('-dxProfileName, --dxProfileName <value>', 'Profile name in the DX core server ', config.dxProfileName)
595
- .requiredOption('-dxConnectUsername, --dxConnectUsername <value>', 'Username for the cw_profile', config.dxConnectUsername)
596
- .requiredOption('-dxConnectPassword, --dxConnectPassword <value>', 'Password for the cw_profile', MaskData.maskPassword(config.dxConnectPassword))
597
- .requiredOption('-dxConnectPort, --dxConnectPort <value>', 'Port number of the cw_profile, for any Kubernetes Environment default port is 443', config.dxConnectPort ? config.dxConnectPort.toString() : config.dxConnectPort)
598
- .requiredOption('-dxConnectProtocol, --dxConnectProtocol <value>', 'Protocol of the cw_profile', config.dxConnectProtocol.toString())
599
- .requiredOption('-applicationName, --applicationName <value>', 'Application name')
600
- .option('-enableBackup, --enableBackup <value>', 'Set the flag to true to take backup of the application to be undeployed', config.enableBackup)
579
+ .requiredOption('--dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
580
+ .requiredOption('--hostname <value>', 'Host name of the DX Core server', config.hostname)
581
+ .requiredOption('--dxPort <value>', 'Port number of the DX Core server, for any Kubernetes Environment default port is 443', config.dxPort ? config.dxPort.toString() : config.dxPort)
582
+ .requiredOption('--dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
583
+ .requiredOption('--dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
584
+ .requiredOption('--dxSoapPort <value>', 'Soap Port number of the DX Core server ', config.dxSoapPort)
585
+ .requiredOption('--dxProfileName <value>', 'Profile name in the DX core server ', config.dxProfileName)
586
+ .requiredOption('--dxConnectUsername <value>', 'Username for the cw_profile', config.dxConnectUsername)
587
+ .requiredOption('--dxConnectPassword <value>', 'Password for the cw_profile', MaskData.maskPassword(config.dxConnectPassword))
588
+ .requiredOption('--dxConnectPort <value>', 'Port number of the cw_profile, for any Kubernetes Environment default port is 443', config.dxConnectPort ? config.dxConnectPort.toString() : config.dxConnectPort)
589
+ .requiredOption('--dxConnectProtocol <value>', 'Protocol of the cw_profile', config.dxConnectProtocol.toString())
590
+ .requiredOption('--applicationName <value>', 'Application name')
591
+ .option('--enableBackup <value>', 'Set the flag to true to take backup of the application to be undeployed', config.enableBackup)
601
592
  .description('- Undeploys the application from the DX Core server')
602
- .action((cmdOptions) => __awaiter(void 0, void 0, void 0, function* () {
603
- commands_1.configureCommand(constants_1.COMMANDS.UNDEPLOY_APPLICATION);
593
+ .action(async (cmdOptions) => {
594
+ (0, commands_1.configureCommand)(constants_1.COMMANDS.UNDEPLOY_APPLICATION);
604
595
  logger_1.logger.debug('Undeploy Application execution started');
605
596
  try {
606
- cmdOptions = utils_1.unmaskPasswords(cmdOptions);
607
- validateOptions_1.validateOptions(cmdOptions);
597
+ cmdOptions = (0, utils_1.unmaskPasswords)(cmdOptions);
598
+ (0, validateOptions_1.validateOptions)(cmdOptions);
608
599
  }
609
600
  catch (error) {
610
601
  logger_1.logger.error(error.message);
611
- yield utils_1.flushLogAndExitProcess(false, true);
602
+ await (0, utils_1.flushLogAndExitProcess)(false, true);
612
603
  }
613
604
  try {
614
605
  const undeployApplicationObj = new undeployApplication_1.UndeployApplication();
615
- const responseCode = yield undeployApplicationObj.invoke(cmdOptions);
606
+ const responseCode = await undeployApplicationObj.invoke(cmdOptions);
616
607
  logger_1.logger.debug('Response code from the invoke function: %s', responseCode);
617
608
  logger_1.logger.debug('Undeploy Application execution completed');
618
- yield utils_1.flushLogAndExitProcess(responseCode);
609
+ await (0, utils_1.flushLogAndExitProcess)(responseCode);
619
610
  }
620
611
  catch (error) {
621
612
  logger_1.logger.debug('Exception in execution : %o', error);
622
- yield utils_1.flushLogAndExitProcess(false);
613
+ await (0, utils_1.flushLogAndExitProcess)(false);
623
614
  }
624
- }));
615
+ });
625
616
  program
626
617
  .command(constants_1.COMMANDS.MLS_EXPORT)
627
- .requiredOption('-dxProtocol, --dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
628
- .requiredOption('-hostname, --hostname <value>', 'Host name of the DX Core server', config.hostname)
629
- .requiredOption('-dxPort, --dxPort <value>', 'Port number of the DX Core server, for any Kubernetes Environment default port is 443', config.dxPort ? config.dxPort.toString() : config.dxPort)
630
- .requiredOption('-contenthandlerPath,--contenthandlerPath <value>', 'Alternate path to the contenthandler servlet on the DX Core server', config.contenthandlerPath)
631
- .requiredOption('-dxUsername, --dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
632
- .requiredOption('-dxPassword, --dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
633
- .option('-wcmLibraryId, --wcmLibraryId <value>', 'WCM Library ID', config.wcmLibraryId)
634
- .option('-wcmLibraryName, --wcmLibraryName <value>', 'WCM Library Name', config.wcmLibraryName)
635
- .option('-lastModifiedAfter, --lastModifiedAfter <value>', 'Last Modified After is in GMT Format', config.lastModifiedAfter)
636
- .option('-wcmProjectName, --wcmProjectName <value>', 'WCM project name to export the contents of the specified project', config.wcmProjectName)
637
- .option('-exportPath, --exportPath <value>', 'Location of the file path to export')
638
- .option('-virtualPortalContext,--virtualPortalContext <value>', 'Context of the virtual portal of the DX Core server', config.virtualPortalContext)
618
+ .requiredOption('--dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
619
+ .requiredOption('--hostname <value>', 'Host name of the DX Core server', config.hostname)
620
+ .requiredOption('--dxPort <value>', 'Port number of the DX Core server, for any Kubernetes Environment default port is 443', config.dxPort ? config.dxPort.toString() : config.dxPort)
621
+ .requiredOption('--contenthandlerPath <value>', 'Alternate path to the contenthandler servlet on the DX Core server', config.contenthandlerPath)
622
+ .requiredOption('--dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
623
+ .requiredOption('--dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
624
+ .option('--wcmLibraryId <value>', 'WCM Library ID', config.wcmLibraryId)
625
+ .option('--wcmLibraryName <value>', 'WCM Library Name', config.wcmLibraryName)
626
+ .option('--lastModifiedAfter <value>', 'Last Modified After is in GMT Format', config.lastModifiedAfter)
627
+ .option('--wcmProjectName <value>', 'WCM project name to export the contents of the specified project', config.wcmProjectName)
628
+ .option('--exportPath <value>', 'Location of the file path to export')
629
+ .option('--virtualPortalContext <value>', 'Context of the virtual portal of the DX Core server', config.virtualPortalContext)
639
630
  .description('- Exports the source contents from a library into a .csv file at the location specified')
640
- .action((cmdOptions) => __awaiter(void 0, void 0, void 0, function* () {
641
- commands_1.configureCommand(constants_1.COMMANDS.MLS_EXPORT);
631
+ .action(async (cmdOptions) => {
632
+ (0, commands_1.configureCommand)(constants_1.COMMANDS.MLS_EXPORT);
642
633
  logger_1.logger.debug('Exports the source contents execution started');
643
634
  try {
644
- cmdOptions = utils_1.unmaskPasswords(cmdOptions);
645
- validateOptions_1.validateOptions(cmdOptions);
635
+ cmdOptions = (0, utils_1.unmaskPasswords)(cmdOptions);
636
+ (0, validateOptions_1.validateOptions)(cmdOptions);
646
637
  }
647
638
  catch (error) {
648
639
  logger_1.logger.error(error.message);
649
- yield utils_1.flushLogAndExitProcess(false, true);
640
+ await (0, utils_1.flushLogAndExitProcess)(false, true);
650
641
  }
651
642
  const mlsExportObj = new mlsExport_1.MLSExport();
652
643
  try {
653
- const responseCode = yield mlsExportObj.invoke(cmdOptions);
644
+ const responseCode = await mlsExportObj.invoke(cmdOptions);
654
645
  logger_1.logger.debug('Response code from the invoke function: %s', responseCode);
655
646
  logger_1.logger.debug('Exporting the source contents execution completed');
656
- yield utils_1.flushLogAndExitProcess(responseCode);
647
+ await (0, utils_1.flushLogAndExitProcess)(responseCode);
657
648
  }
658
649
  catch (error) {
659
650
  logger_1.logger.debug('Exception in execution of exporting the source contents : %o', error);
660
- yield utils_1.flushLogAndExitProcess(false);
651
+ await (0, utils_1.flushLogAndExitProcess)(false);
661
652
  }
662
- }));
653
+ });
663
654
  program
664
655
  .command(constants_1.COMMANDS.MLS_IMPORT)
665
- .requiredOption('-dxProtocol, --dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
666
- .requiredOption('-hostname, --hostname <value>', 'Host name of the DX Core server', config.hostname)
667
- .requiredOption('-dxPort, --dxPort <value>', 'Port number of the DX Core server, for any Kubernetes Environment default port is 443', config.dxPort ? config.dxPort.toString() : config.dxPort)
668
- .requiredOption('-contenthandlerPath,--contenthandlerPath <value>', 'Alternate path for the portal context root or the content handler servlet', config.contenthandlerPath)
669
- .requiredOption('-dxUsername, --dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
670
- .requiredOption('-dxPassword, --dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
671
- .requiredOption('-importPath, --importPath <value>', 'Location of the file path(s) (separated by comma) to import')
672
- .option('-wcmProjectName, --wcmProjectName <value>', 'Project for which the contents to be imported', config.wcmProjectName)
673
- .option('-forceImport, --forceImport <value>', 'Flag to forcefully import the content')
674
- .option('-virtualPortalContext,--virtualPortalContext <value>', 'Context of the virtual portal of the DX Core server', config.virtualPortalContext)
656
+ .requiredOption('--dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
657
+ .requiredOption('--hostname <value>', 'Host name of the DX Core server', config.hostname)
658
+ .requiredOption('--dxPort <value>', 'Port number of the DX Core server, for any Kubernetes Environment default port is 443', config.dxPort ? config.dxPort.toString() : config.dxPort)
659
+ .requiredOption('--contenthandlerPath <value>', 'Alternate path for the portal context root or the content handler servlet', config.contenthandlerPath)
660
+ .requiredOption('--dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
661
+ .requiredOption('--dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
662
+ .requiredOption('--importPath <value>', 'Location of the file path(s) (separated by comma) to import')
663
+ .option('--wcmProjectName <value>', 'Project for which the contents to be imported', config.wcmProjectName)
664
+ .option('--forceImport <value>', 'Flag to forcefully import the content')
665
+ .option('--virtualPortalContext <value>', 'Context of the virtual portal of the DX Core server', config.virtualPortalContext)
675
666
  .description('- Imports the source contents from a CSV file into DX at the location specified')
676
- .action((cmdOptions) => __awaiter(void 0, void 0, void 0, function* () {
677
- commands_1.configureCommand(constants_1.COMMANDS.MLS_IMPORT);
667
+ .action(async (cmdOptions) => {
668
+ (0, commands_1.configureCommand)(constants_1.COMMANDS.MLS_IMPORT);
678
669
  logger_1.logger.debug('Imports the source contents execution started');
679
670
  try {
680
- cmdOptions = utils_1.unmaskPasswords(cmdOptions);
681
- validateOptions_1.validateOptions(cmdOptions);
671
+ cmdOptions = (0, utils_1.unmaskPasswords)(cmdOptions);
672
+ (0, validateOptions_1.validateOptions)(cmdOptions);
682
673
  }
683
674
  catch (error) {
684
675
  logger_1.logger.error(error.message);
685
- yield utils_1.flushLogAndExitProcess(false, true);
676
+ await (0, utils_1.flushLogAndExitProcess)(false, true);
686
677
  }
687
678
  const mlsImportObj = new mlsImport_1.MLSImport();
688
679
  try {
689
- const responseCode = yield mlsImportObj.invoke(cmdOptions);
680
+ const responseCode = await mlsImportObj.invoke(cmdOptions);
690
681
  logger_1.logger.debug('Response code from the invoke function: %s', responseCode);
691
682
  logger_1.logger.debug('Importing the source contents into DX execution completed');
692
- yield utils_1.flushLogAndExitProcess(responseCode);
683
+ await (0, utils_1.flushLogAndExitProcess)(responseCode);
693
684
  }
694
685
  catch (error) {
695
686
  logger_1.logger.debug('Exception in execution of importation the source contents : %o', error);
696
- yield utils_1.flushLogAndExitProcess(false);
687
+ await (0, utils_1.flushLogAndExitProcess)(false);
697
688
  }
698
- }));
689
+ });
699
690
  program
700
691
  .command(`${constants_1.COMMANDS.MANAGE_SYNDICATOR} [subCmd]`)
701
- .requiredOption('-dxProtocol, --dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
702
- .requiredOption('-hostname, --hostname <value>', 'Host name of the DX Core server', config.hostname)
703
- .requiredOption('-dxPort, --dxPort <value>', 'Port number of the DX Core server, for any Kubernetes Environment default port is 443', config.dxPort ? config.dxPort.toString() : config.dxPort)
704
- .requiredOption('-dxUsername, --dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
705
- .requiredOption('-dxPassword, --dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
706
- .requiredOption('-contenthandlerPath,--contenthandlerPath <value>', 'Alternate path for the portal context root or the content handler servlet', config.contenthandlerPath)
707
- .requiredOption('-UUID,--UUID <value>', 'UUID of the syndicator instance', '')
708
- .option('-enable,--enable <value>', 'Use true or false to enable or disable the syndicator')
692
+ .requiredOption('--dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
693
+ .requiredOption('--hostname <value>', 'Host name of the DX Core server', config.hostname)
694
+ .requiredOption('--dxPort <value>', 'Port number of the DX Core server, for any Kubernetes Environment default port is 443', config.dxPort ? config.dxPort.toString() : config.dxPort)
695
+ .requiredOption('--dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
696
+ .requiredOption('--dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
697
+ .requiredOption('--contenthandlerPath <value>', 'Alternate path for the portal context root or the content handler servlet', config.contenthandlerPath)
698
+ .requiredOption('--UUID <value>', 'UUID of the syndicator instance', '')
699
+ .option('--enable <value>', 'Use true or false to enable or disable the syndicator')
709
700
  .option('-h, --help')
710
701
  .description('- Manages the syndicator in DX Server (Enable/Disable or helps to get syndicator report)')
711
- .action((subCmd, cmd) => __awaiter(void 0, void 0, void 0, function* () {
712
- if (cmd.parent.args[1] === constants_1.COMMANDS.H || cmd.parent.args[1] === constants_1.COMMANDS.HELP || cmd.parent.args[2] === constants_1.COMMANDS.H || cmd.parent.args[2] === constants_1.COMMANDS.HELP) {
702
+ .action(async (subCmd, cmd, options) => {
703
+ if (process.argv.includes(constants_1.COMMANDS.H) || process.argv.includes(constants_1.COMMANDS.HELP)) {
713
704
  logger_1.logger.help('Usage: dxclient manage-syndicator [options] [subCmd](get-syndication-report)\n');
714
705
  logger_1.logger.help(' - Manages the syndicator in DX Server (Enable/Disable or helps to get syndicator report)\n');
715
- logger_1.logger.help(` -dxProtocol, --dxProtocol <value> Protocol of the DX Core server (default: "${config.dxProtocol}")`);
716
- logger_1.logger.help(` -hostname, --hostname <value> Hostname of the DX Core server (default: "${config.hostname}")`);
717
- logger_1.logger.help(` -dxPort, --dxPort <value> Port number for DX Core server, for any Kubernetes Environment default port is 443 \
706
+ logger_1.logger.help(` --dxProtocol <value> Protocol of the DX Core server (default: "${config.dxProtocol}")`);
707
+ logger_1.logger.help(` --hostname <value> Hostname of the DX Core server (default: "${config.hostname}")`);
708
+ logger_1.logger.help(` --dxPort <value> Port number for DX Core server, for any Kubernetes Environment default port is 443 \
718
709
  (default: "${config.dxPort.toString()}")`);
719
- logger_1.logger.help(` -dxUsername, --dxUsername <value> Username of the DX Core server (default: "${config.dxUsername}")`);
720
- logger_1.logger.help(` -dxPassword, --dxPassword <value> Password of the DX Core server (default: "${MaskData.maskPassword(config.dxPassword)}")`);
721
- logger_1.logger.help(` -contenthandlerPath,--contenthandlerPath <value> Alternate path for the portal context root or the content handler servlet (default: "${config.contenthandlerPath}")`);
722
- logger_1.logger.help(' -UUID,--UUID <value> UUID of the syndicator instance');
723
- if (cmd._name === constants_1.COMMANDS.MANAGE_SYNDICATOR && !subCmd) {
724
- logger_1.logger.help(' -enable,--enable <value> Use true or false to enable or disable the syndicator');
725
- }
726
- logger_1.logger.help(' -h, --help display help for command');
710
+ logger_1.logger.help(` --dxUsername <value> Username of the DX Core server (default: "${config.dxUsername}")`);
711
+ logger_1.logger.help(` --dxPassword <value> Password of the DX Core server (default: "${MaskData.maskPassword(config.dxPassword)}")`);
712
+ logger_1.logger.help(` --contenthandlerPath <value> Alternate path for the portal context root or the content handler servlet (default: "${config.contenthandlerPath}")`);
713
+ logger_1.logger.help(' --UUID <value> UUID of the syndicator instance');
714
+ if (options.parent.args[0] === constants_1.COMMANDS.MANAGE_SYNDICATOR && !subCmd) {
715
+ logger_1.logger.help(' --enable <value> Use true or false to enable or disable the syndicator');
716
+ }
717
+ logger_1.logger.help(' -h, --help Display help for command');
727
718
  process.exit(1);
728
719
  }
729
720
  try {
730
721
  const command = subCmd ? constants_1.COMMANDS.GET_SYNDICATION_REPORT : constants_1.COMMANDS.MANAGE_SYNDICATOR;
731
- commands_1.configureCommand(command);
722
+ (0, commands_1.configureCommand)(command);
732
723
  logger_1.logger.debug('Manage syndicator execution started');
733
- cmd = utils_1.unmaskPasswords(cmd);
734
- validateOptions_1.validateOptions(cmd);
724
+ cmd = (0, utils_1.unmaskPasswords)(cmd);
725
+ (0, validateOptions_1.validateOptions)(cmd);
735
726
  }
736
727
  catch (error) {
737
728
  logger_1.logger.error(error.message);
738
- yield utils_1.flushLogAndExitProcess(false, true);
729
+ await (0, utils_1.flushLogAndExitProcess)(false, true);
739
730
  }
740
731
  if (subCmd === constants_1.COMMANDS.GET_SYNDICATION_REPORT) {
741
732
  const syndicatorFailedItems = new syndicatorFailedItem_1.SyndicatorFailedItem();
742
733
  try {
743
- const responseCode = yield syndicatorFailedItems.invoke(cmd);
734
+ const responseCode = await syndicatorFailedItems.invoke(cmd);
744
735
  logger_1.logger.debug('Response code from the invoke function: %s', responseCode);
745
736
  logger_1.logger.debug('Syndication failed item execution completed');
746
- yield utils_1.flushLogAndExitProcess(responseCode);
737
+ await (0, utils_1.flushLogAndExitProcess)(responseCode);
747
738
  }
748
739
  catch (error) {
749
740
  logger_1.logger.debug('Exception in Syndication failed item: %o', error);
750
- yield utils_1.flushLogAndExitProcess(false);
741
+ await (0, utils_1.flushLogAndExitProcess)(false);
751
742
  }
752
743
  }
753
744
  else if (!subCmd && cmd._name === constants_1.COMMANDS.MANAGE_SYNDICATOR) {
754
745
  const syndicator = new syndicator_1.Syndicator();
755
746
  try {
756
- const responseCode = yield syndicator.invoke(cmd);
747
+ const responseCode = await syndicator.invoke(cmd);
757
748
  logger_1.logger.debug('Response code from the invoke function: %s', responseCode);
758
749
  logger_1.logger.debug('Manage syndicator execution completed');
759
- yield utils_1.flushLogAndExitProcess(responseCode);
750
+ await (0, utils_1.flushLogAndExitProcess)(responseCode);
760
751
  }
761
752
  catch (error) {
762
753
  logger_1.logger.debug('Exception in manage syndicator: %o', error);
763
- yield utils_1.flushLogAndExitProcess(false);
754
+ await (0, utils_1.flushLogAndExitProcess)(false);
764
755
  }
765
756
  }
766
- }))
757
+ })
767
758
  .helpOption(false);
768
759
  program
769
760
  .command(constants_1.COMMANDS.MANAGE_SUBSCRIBER)
770
- .requiredOption('-dxProtocol, --dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
771
- .requiredOption('-hostname, --hostname <value>', 'Host name of the DX Core server', config.hostname)
772
- .requiredOption('-dxPort, --dxPort <value>', 'Port number of the DX Core server, for any Kubernetes Environment default port is 443', config.dxPort ? config.dxPort.toString() : config.dxPort)
773
- .requiredOption('-dxUsername, --dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
774
- .requiredOption('-dxPassword, --dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
775
- .requiredOption('-contenthandlerPath,--contenthandlerPath <value>', 'Alternate path for the portal context root or the content handler servlet', config.contenthandlerPath)
776
- .requiredOption('-UUID,--UUID <value>', 'UUID of the subscriber instance', '')
777
- .option('-enable,--enable <value>', 'Use true or false to enable or disable the subscriber')
761
+ .requiredOption('--dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
762
+ .requiredOption('--hostname <value>', 'Host name of the DX Core server', config.hostname)
763
+ .requiredOption('--dxPort <value>', 'Port number of the DX Core server, for any Kubernetes Environment default port is 443', config.dxPort ? config.dxPort.toString() : config.dxPort)
764
+ .requiredOption('--dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
765
+ .requiredOption('--dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
766
+ .requiredOption('--contenthandlerPath <value>', 'Alternate path for the portal context root or the content handler servlet', config.contenthandlerPath)
767
+ .requiredOption('--UUID <value>', 'UUID of the subscriber instance', '')
768
+ .option('--enable <value>', 'Use true or false to enable or disable the subscriber')
778
769
  .description('- Manages the subscriber in DX Server(Enable/Disable)')
779
- .action((cmdOptions) => __awaiter(void 0, void 0, void 0, function* () {
780
- commands_1.configureCommand(constants_1.COMMANDS.MANAGE_SUBSCRIBER);
770
+ .action(async (cmdOptions) => {
771
+ (0, commands_1.configureCommand)(constants_1.COMMANDS.MANAGE_SUBSCRIBER);
781
772
  logger_1.logger.debug('Manage subscriber execution started');
782
773
  try {
783
- cmdOptions = utils_1.unmaskPasswords(cmdOptions);
784
- validateOptions_1.validateOptions(cmdOptions);
774
+ cmdOptions = (0, utils_1.unmaskPasswords)(cmdOptions);
775
+ (0, validateOptions_1.validateOptions)(cmdOptions);
785
776
  }
786
777
  catch (error) {
787
778
  logger_1.logger.error(error.message);
788
- yield utils_1.flushLogAndExitProcess(false, true);
779
+ await (0, utils_1.flushLogAndExitProcess)(false, true);
789
780
  }
790
781
  const subscriber = new subscriber_1.Subscriber();
791
782
  try {
792
- const responseCode = yield subscriber.invoke(cmdOptions);
783
+ const responseCode = await subscriber.invoke(cmdOptions);
793
784
  logger_1.logger.debug('Response code from the invoke function: %s', responseCode);
794
785
  logger_1.logger.debug('Manage subscriber execution completed');
795
- yield utils_1.flushLogAndExitProcess(responseCode);
786
+ await (0, utils_1.flushLogAndExitProcess)(responseCode);
796
787
  }
797
788
  catch (error) {
798
789
  logger_1.logger.debug('Exception in manage subscriber: %o', error);
799
- yield utils_1.flushLogAndExitProcess(false);
790
+ await (0, utils_1.flushLogAndExitProcess)(false);
800
791
  }
801
- }));
792
+ });
802
793
  program
803
794
  .command(constants_1.COMMANDS.RESTART_CORE_PODS)
804
- .requiredOption('-dxProtocol, --dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
805
- .requiredOption('-hostname, --hostname <value>', 'Host name of the DX server', config.hostname)
806
- .requiredOption('-dxWASUsername, --dxWASUsername <value>', 'Username of the DX WAS server', '')
807
- .requiredOption('-dxWASPassword, --dxWASPassword <value>', 'Password of the DX WAS server', '')
795
+ .requiredOption('--dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
796
+ .requiredOption('--hostname <value>', 'Host name of the DX server', config.hostname)
797
+ .requiredOption('--dxWASUsername <value>', 'Username of the DX WAS server', '')
798
+ .requiredOption('--dxWASPassword <value>', 'Password of the DX WAS server', '')
808
799
  .description(`- Restarts the DX Core Pods in Kubernetes Deployment.
809
800
  Note: Only the user set as wasAdmin in the Helm values is authorised to trigger this command.`)
810
- .action((cmdOptions) => __awaiter(void 0, void 0, void 0, function* () {
811
- commands_1.configureCommand(constants_1.COMMANDS.RESTART_CORE_PODS);
801
+ .action(async (cmdOptions) => {
802
+ (0, commands_1.configureCommand)(constants_1.COMMANDS.RESTART_CORE_PODS);
812
803
  logger_1.logger.debug('Sending DX Core Pods restart request.');
813
804
  try {
814
- validateOptions_1.validateOptions(cmdOptions);
805
+ (0, validateOptions_1.validateOptions)(cmdOptions);
815
806
  }
816
807
  catch (error) {
817
808
  logger_1.logger.error(error.message);
818
- yield utils_1.flushLogAndExitProcess(false, true);
809
+ await (0, utils_1.flushLogAndExitProcess)(false, true);
819
810
  }
820
811
  try {
821
812
  const restartDXCoreObject = new restartCorePods_1.RestartCorePods();
822
- const responseCode = yield restartDXCoreObject.invoke(cmdOptions);
813
+ const responseCode = await restartDXCoreObject.invoke(cmdOptions);
823
814
  logger_1.logger.debug('Response code from the invoke function: %s', responseCode);
824
815
  logger_1.logger.debug('Restart DX Core pods execution completed');
825
- yield utils_1.flushLogAndExitProcess(responseCode);
816
+ await (0, utils_1.flushLogAndExitProcess)(responseCode);
826
817
  }
827
818
  catch (error) {
828
819
  logger_1.logger.debug('Exception in execution : %o', error);
829
- yield utils_1.flushLogAndExitProcess(false);
820
+ await (0, utils_1.flushLogAndExitProcess)(false);
830
821
  }
831
- }));
822
+ });
832
823
  program
833
824
  .command(constants_1.COMMANDS.RESTART_DXCORE)
834
- .requiredOption('-hostname, --hostname <value>', 'Host name of the DX Core server', config.hostname)
835
- .requiredOption('-dxUsername, --dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
836
- .requiredOption('-dxPassword, --dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
837
- .requiredOption('-dxProfileName, --dxProfileName <value>', 'Profile name in the DX core server ', config.dxProfileName)
838
- .option('-dxProfilePath, --dxProfilePath <value>', 'Profile path of the DX Core server ', config.dxProfilePath)
839
- .requiredOption('-dxConnectUsername, --dxConnectUsername <value>', 'Username for the cw_profile', config.dxConnectUsername)
840
- .requiredOption('-dxConnectPassword, --dxConnectPassword <value>', 'Password for the cw_profile', MaskData.maskPassword(config.dxConnectPassword))
841
- .requiredOption('-dxConnectPort, --dxConnectPort <value>', 'Port number of the cw_profile', config.dxConnectPort ? config.dxConnectPort.toString() : config.dxConnectPort)
842
- .option('-requestId, --requestId <value>', 'Unique Id of a previously triggered restart request.')
825
+ .requiredOption('--hostname <value>', 'Host name of the DX Core server', config.hostname)
826
+ .requiredOption('--dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
827
+ .requiredOption('--dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
828
+ .requiredOption('--dxProfileName <value>', 'Profile name in the DX core server ', config.dxProfileName)
829
+ .option('--dxProfilePath <value>', 'Profile path of the DX Core server ', config.dxProfilePath)
830
+ .requiredOption('--dxConnectUsername <value>', 'Username for the cw_profile', config.dxConnectUsername)
831
+ .requiredOption('--dxConnectPassword <value>', 'Password for the cw_profile', MaskData.maskPassword(config.dxConnectPassword))
832
+ .requiredOption('--dxConnectPort <value>', 'Port number of the cw_profile', config.dxConnectPort ? config.dxConnectPort.toString() : config.dxConnectPort)
833
+ .option('--requestId <value>', 'Unique Id of a previously triggered restart request.')
843
834
  .description('- Restarts the DX Core server. This command works for single DX Server instances.')
844
- .action((cmdOptions) => __awaiter(void 0, void 0, void 0, function* () {
845
- commands_1.configureCommand(constants_1.COMMANDS.RESTART_DXCORE);
835
+ .action(async (cmdOptions) => {
836
+ (0, commands_1.configureCommand)(constants_1.COMMANDS.RESTART_DXCORE);
846
837
  logger_1.logger.debug('Restart DX Core execution started');
847
838
  try {
848
- cmdOptions = utils_1.unmaskPasswords(cmdOptions);
849
- validateOptions_1.validateOptions(cmdOptions);
839
+ cmdOptions = (0, utils_1.unmaskPasswords)(cmdOptions);
840
+ (0, validateOptions_1.validateOptions)(cmdOptions);
850
841
  }
851
842
  catch (error) {
852
843
  logger_1.logger.error(error.message);
853
- yield utils_1.flushLogAndExitProcess(false, true);
844
+ await (0, utils_1.flushLogAndExitProcess)(false, true);
854
845
  }
855
846
  try {
856
847
  const restartDXCoreObject = new restartDXCore_1.RestartDXCore();
857
- const responseCode = yield restartDXCoreObject.invoke(cmdOptions);
848
+ const responseCode = await restartDXCoreObject.invoke(cmdOptions);
858
849
  logger_1.logger.debug('Response code from the invoke function: %s', responseCode);
859
850
  logger_1.logger.debug('Restart DX Core execution completed');
860
- yield utils_1.flushLogAndExitProcess(responseCode);
851
+ await (0, utils_1.flushLogAndExitProcess)(responseCode);
861
852
  }
862
853
  catch (error) {
863
854
  logger_1.logger.debug('Exception in execution : %o', error);
864
- yield utils_1.flushLogAndExitProcess(false);
855
+ await (0, utils_1.flushLogAndExitProcess)(false);
865
856
  }
866
- }));
857
+ });
867
858
  program
868
859
  .command(`${constants_1.COMMANDS.SHARED_LIBRARY} [subCmd]`)
869
- .requiredOption('-hostname, --hostname <value>', 'Host name of the DX Core server', config.hostname)
870
- .requiredOption('-dxUsername, --dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
871
- .requiredOption('-dxPassword, --dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
872
- .requiredOption('-dxProfileName, --dxProfileName <value>', 'Profile name in the DX core server ', config.dxProfileName)
873
- .requiredOption('-dxConnectUsername, --dxConnectUsername <value>', 'Username for the cw_profile', config.dxConnectUsername)
874
- .requiredOption('-dxConnectPassword, --dxConnectPassword <value>', 'Password for the cw_profile', MaskData.maskPassword(config.dxConnectPassword))
875
- .requiredOption('-dxConnectPort, --dxConnectPort <value>', 'Port number of the cw_profile', config.dxConnectPort ? config.dxConnectPort.toString() : config.dxConnectPort)
876
- .option('-libFilePath, --libFilePath <value>', 'File/Folder path of the shared library jar files')
877
- .option('-libFileNames, --libFileNames <value>', 'File names of the shared library jar files')
860
+ .requiredOption('--hostname <value>', 'Host name of the DX Core server', config.hostname)
861
+ .requiredOption('--dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
862
+ .requiredOption('--dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
863
+ .requiredOption('--dxProfileName <value>', 'Profile name in the DX core server ', config.dxProfileName)
864
+ .requiredOption('--dxConnectUsername <value>', 'Username for the cw_profile', config.dxConnectUsername)
865
+ .requiredOption('--dxConnectPassword <value>', 'Password for the cw_profile', MaskData.maskPassword(config.dxConnectPassword))
866
+ .requiredOption('--dxConnectPort <value>', 'Port number of the cw_profile', config.dxConnectPort ? config.dxConnectPort.toString() : config.dxConnectPort)
867
+ .option('--libFilePath <value>', 'File/Folder path of the shared library jar files')
868
+ .option('--libFileNames <value>', 'File names of the shared library jar files')
878
869
  .option('-h, --help')
879
870
  .description('- manages the shared library files in the remote server')
880
- .action((subCmd, cmd) => __awaiter(void 0, void 0, void 0, function* () {
881
- if ((subCmd === constants_1.SUB_COMMANDS.SHARED_LIBRARY_UPLOAD || subCmd === constants_1.SUB_COMMANDS.SHARED_LIBRARY_DELETE) && (cmd.parent.args[2] === constants_1.COMMANDS.H || cmd.parent.args[2] === constants_1.COMMANDS.HELP)) {
871
+ .action(async (subCmd, cmd) => {
872
+ if ((subCmd === constants_1.SUB_COMMANDS.SHARED_LIBRARY_UPLOAD || subCmd === constants_1.SUB_COMMANDS.SHARED_LIBRARY_DELETE) && (process.argv.includes(constants_1.COMMANDS.H) || process.argv.includes(constants_1.COMMANDS.HELP))) {
882
873
  logger_1.logger.help(' Usage: dxclient shared-library [options] [subCmd](upload/delete)\n');
883
874
  logger_1.logger.help(' - Uploads/Deletes files in default Shared Library location in DX Core (<dx-profile>/PortalServer/sharedLibrary/DXCLib)\n');
884
- logger_1.logger.help(` -hostname,--hostname <value> Host name of the DX Core server (default: "${config.hostname}")`);
885
- logger_1.logger.help(` -dxUsername, --dxUsername <value> Username of the DX Core server (default: "${config.dxUsername}")`);
886
- logger_1.logger.help(` -dxPassword, --dxPassword <value> Password of the DX Core server (default: "${MaskData.maskPassword(config.dxPassword)}")`);
875
+ logger_1.logger.help(` --hostname <value> Host name of the DX Core server (default: "${config.hostname}")`);
876
+ logger_1.logger.help(` --dxUsername <value> Username of the DX Core server (default: "${config.dxUsername}")`);
877
+ logger_1.logger.help(` --dxPassword <value> Password of the DX Core server (default: "${MaskData.maskPassword(config.dxPassword)}")`);
887
878
  logger_1.logger.help(` -dxProfileName, --dxProfileName <value> Profile name in the DX core server (default: "${config.dxProfileName}")`);
888
- logger_1.logger.help(` -dxConnectUsername, --dxConnectUsername <value> Username for the cw_profile (default: "${config.dxConnectUsername}")`);
889
- logger_1.logger.help(` -dxConnectPassword, --dxConnectPassword <value> Password for the cw_profile (default: "${MaskData.maskPassword(config.dxConnectPassword)}")`);
890
- logger_1.logger.help(` -dxConnectPort, --dxConnectPort <value> Port number of the cw_profile (default: "${config.dxConnectPort}")`);
879
+ logger_1.logger.help(` --dxConnectUsername <value> Username for the cw_profile (default: "${config.dxConnectUsername}")`);
880
+ logger_1.logger.help(` --dxConnectPassword <value> Password for the cw_profile (default: "${MaskData.maskPassword(config.dxConnectPassword)}")`);
881
+ logger_1.logger.help(` --dxConnectPort <value> Port number of the cw_profile (default: "${config.dxConnectPort}")`);
891
882
  if (subCmd === constants_1.SUB_COMMANDS.SHARED_LIBRARY_UPLOAD) {
892
- logger_1.logger.help(' -libFilePath, --libFilePath <value> File/Folder path of the shared library files to be uploaded');
883
+ logger_1.logger.help(' --libFilePath <value> File/Folder path of the shared library files to be uploaded');
893
884
  }
894
885
  if (subCmd === constants_1.SUB_COMMANDS.SHARED_LIBRARY_DELETE) {
895
- logger_1.logger.help(' -libFileNames, --libFileNames <value> File names of shared library files to be deleted');
886
+ logger_1.logger.help(' --libFileNames <value> File names of shared library files to be deleted');
896
887
  }
897
888
  logger_1.logger.help(' -h, --help display help for command');
898
889
  process.exit(1);
@@ -904,256 +895,257 @@ program
904
895
  }
905
896
  else {
906
897
  const command = subCmd === constants_1.SUB_COMMANDS.SHARED_LIBRARY_UPLOAD ? constants_1.SUB_COMMANDS.SHARED_LIBRARY_UPLOAD : constants_1.SUB_COMMANDS.SHARED_LIBRARY_DELETE;
907
- commands_1.configureCommand(command);
898
+ (0, commands_1.configureCommand)(command);
908
899
  logger_1.logger.debug('Manage shared library execution started');
909
- cmd = utils_1.unmaskPasswords(cmd);
910
- validateOptions_1.validateOptions(cmd);
900
+ cmd = (0, utils_1.unmaskPasswords)(cmd);
901
+ (0, validateOptions_1.validateOptions)(cmd);
911
902
  }
912
903
  }
913
904
  catch (error) {
914
905
  logger_1.logger.error(error.message);
915
- yield utils_1.flushLogAndExitProcess(false, true);
906
+ await (0, utils_1.flushLogAndExitProcess)(false, true);
916
907
  }
917
908
  if (subCmd === constants_1.SUB_COMMANDS.SHARED_LIBRARY_UPLOAD) {
918
909
  const sharedLibraryUpload = new upload_1.SharedLibraryUpload();
919
910
  try {
920
- const responseCode = yield sharedLibraryUpload.invoke(cmd);
911
+ const responseCode = await sharedLibraryUpload.invoke(cmd);
921
912
  logger_1.logger.debug('Response code from the invoke function: %s', responseCode);
922
913
  logger_1.logger.debug('Shared Library files upload execution completed');
923
- yield utils_1.flushLogAndExitProcess(responseCode);
914
+ await (0, utils_1.flushLogAndExitProcess)(responseCode);
924
915
  }
925
916
  catch (error) {
926
917
  logger_1.logger.debug('Exception in Shared Library files upload: %o', error);
927
- yield utils_1.flushLogAndExitProcess(false);
918
+ await (0, utils_1.flushLogAndExitProcess)(false);
928
919
  }
929
920
  }
930
921
  else if (subCmd === constants_1.SUB_COMMANDS.SHARED_LIBRARY_DELETE) {
931
922
  const sharedLibraryDelete = new delete_1.SharedLibraryDelete();
932
923
  try {
933
- const responseCode = yield sharedLibraryDelete.invoke(cmd);
924
+ const responseCode = await sharedLibraryDelete.invoke(cmd);
934
925
  logger_1.logger.debug('Response code from the invoke function: %s', responseCode);
935
926
  logger_1.logger.debug('Shared Library files delete execution completed');
936
- yield utils_1.flushLogAndExitProcess(responseCode);
927
+ await (0, utils_1.flushLogAndExitProcess)(responseCode);
937
928
  }
938
929
  catch (error) {
939
930
  logger_1.logger.debug('Exception in Shared Library files delete: %o', error);
940
- yield utils_1.flushLogAndExitProcess(false);
931
+ logger_1.logger.error(error.message);
932
+ await (0, utils_1.flushLogAndExitProcess)(false);
941
933
  }
942
934
  }
943
- }))
935
+ })
944
936
  .helpOption(false);
945
937
  program
946
938
  .command(constants_1.COMMANDS.PZN_EXPORT)
947
- .requiredOption('-dxProtocol, --dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
948
- .requiredOption('-hostname, --hostname <value>', 'Host name of the DX Core server', config.hostname)
949
- .requiredOption('-dxPort, --dxPort <value>', 'Port number of the DX Core server, for any Kubernetes Environment default port is 443', config.dxPort ? config.dxPort.toString() : config.dxPort)
950
- .requiredOption('-dxUsername, --dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
951
- .requiredOption('-dxPassword, --dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
952
- .option('-dxContextRoot, --dxContextRoot <value>', 'Alternate path to the context root on the DX Core server', config.dxContextRoot)
953
- .option('-targetPath, --targetPath <value>', 'The location of the rule or folder containing the rules in the target workspace, which is the parent for the published nodes. '
939
+ .requiredOption('--dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
940
+ .requiredOption('--hostname <value>', 'Host name of the DX Core server', config.hostname)
941
+ .requiredOption('--dxPort <value>', 'Port number of the DX Core server, for any Kubernetes Environment default port is 443', config.dxPort ? config.dxPort.toString() : config.dxPort)
942
+ .requiredOption('--dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
943
+ .requiredOption('--dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
944
+ .option('--dxContextRoot <value>', 'Alternate path to the context root on the DX Core server', config.dxContextRoot)
945
+ .option('--targetPath <value>', 'The location of the rule or folder containing the rules in the target workspace, which is the parent for the published nodes. '
954
946
  + 'The target path must exist before publishing (default targetPath is "/")')
955
- .option('-targetWorkspace, --targetWorkspace <value>', 'The name of the workspace containing the rules in DX Core server')
947
+ .option('--targetWorkspace <value>', 'The name of the workspace containing the rules in DX Core server')
956
948
  .description('- Exports the personalization rules from the DX Core server')
957
- .action((cmdOptions) => __awaiter(void 0, void 0, void 0, function* () {
958
- commands_1.configureCommand(constants_1.COMMANDS.PZN_EXPORT);
949
+ .action(async (cmdOptions) => {
950
+ (0, commands_1.configureCommand)(constants_1.COMMANDS.PZN_EXPORT);
959
951
  logger_1.logger.debug('Export of the PZN rule execution started');
960
952
  try {
961
- cmdOptions = utils_1.unmaskPasswords(cmdOptions);
962
- validateOptions_1.validateOptions(cmdOptions);
953
+ cmdOptions = (0, utils_1.unmaskPasswords)(cmdOptions);
954
+ (0, validateOptions_1.validateOptions)(cmdOptions);
963
955
  }
964
956
  catch (error) {
965
957
  logger_1.logger.error(error.message);
966
- yield utils_1.flushLogAndExitProcess(false, true);
958
+ await (0, utils_1.flushLogAndExitProcess)(false, true);
967
959
  }
968
960
  const pznRulesExportObj = new pznRulesExport_1.PznRulesExport();
969
961
  try {
970
- const responseCode = yield pznRulesExportObj.invoke(cmdOptions);
962
+ const responseCode = await pznRulesExportObj.invoke(cmdOptions);
971
963
  logger_1.logger.debug('Response code from the invoke function: %s', responseCode);
972
964
  logger_1.logger.debug('Export pzn rules execution completed');
973
- yield utils_1.flushLogAndExitProcess(responseCode);
965
+ await (0, utils_1.flushLogAndExitProcess)(responseCode);
974
966
  }
975
967
  catch (error) {
976
968
  logger_1.logger.debug('Exception in execution of export pzn rules : %o', error);
977
- yield utils_1.flushLogAndExitProcess(false);
969
+ await (0, utils_1.flushLogAndExitProcess)(false);
978
970
  }
979
- }));
971
+ });
980
972
  program
981
973
  .command(constants_1.COMMANDS.PZN_IMPORT)
982
- .option('-dxProtocol, --dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
983
- .option('-hostname, --hostname <value>', 'Host name of the DX Core server', config.hostname)
984
- .option('-dxPort, --dxPort <value>', 'Port number of the DX Core server, for any Kubernetes Environment default port is 443', config.dxPort ? config.dxPort.toString() : config.dxPort)
985
- .requiredOption('-dxUsername, --dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
986
- .requiredOption('-dxPassword, --dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
987
- .requiredOption('-dxConnectUsername, --dxConnectUsername <value>', 'Username for the cw_profile', config.dxConnectUsername)
988
- .requiredOption('-dxConnectPassword, --dxConnectPassword <value>', 'Password for the cw_profile', MaskData.maskPassword(config.dxConnectPassword))
989
- .requiredOption('-dxConnectPort, --dxConnectPort <value>', 'Port number of the cw_profile', config.dxConnectPort ? config.dxConnectPort.toString() : config.dxConnectPort)
990
- .requiredOption('-rulesFilePath, --rulesFilePath <value>', 'Path to the file containing the rules to be imported')
991
- .option('-dxContextRoot, --dxContextRoot <value>', 'Alternate path to the context root on the DX Core server', config.dxContextRoot)
992
- .option('-targetPath, --targetPath <value>', 'The location of the rule or folder containing the rules in the target workspace, which is the parent for the published nodes. '
974
+ .option('--dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
975
+ .option('--hostname <value>', 'Host name of the DX Core server', config.hostname)
976
+ .option('--dxPort <value>', 'Port number of the DX Core server, for any Kubernetes Environment default port is 443', config.dxPort ? config.dxPort.toString() : config.dxPort)
977
+ .requiredOption('--dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
978
+ .requiredOption('--dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
979
+ .requiredOption('--dxConnectUsername <value>', 'Username for the cw_profile', config.dxConnectUsername)
980
+ .requiredOption('--dxConnectPassword <value>', 'Password for the cw_profile', MaskData.maskPassword(config.dxConnectPassword))
981
+ .requiredOption('--dxConnectPort <value>', 'Port number of the cw_profile', config.dxConnectPort ? config.dxConnectPort.toString() : config.dxConnectPort)
982
+ .requiredOption('--rulesFilePath <value>', 'Path to the file containing the rules to be imported')
983
+ .option('--dxContextRoot <value>', 'Alternate path to the context root on the DX Core server', config.dxContextRoot)
984
+ .option('--targetPath <value>', 'The location of the rule or folder containing the rules in the target workspace, which is the parent for the published nodes. '
993
985
  + 'The target path must exist before publishing (default targetPath is "/")')
994
- .option('-targetWorkspace, --targetWorkspace <value>', 'The name of the workspace containing the rules in DX Core server')
986
+ .option('--targetWorkspace <value>', 'The name of the workspace containing the rules in DX Core server')
995
987
  .description('- Imports the personalization rules to the DX Core server')
996
- .action((cmdOptions) => __awaiter(void 0, void 0, void 0, function* () {
997
- commands_1.configureCommand(constants_1.COMMANDS.PZN_IMPORT);
988
+ .action(async (cmdOptions) => {
989
+ (0, commands_1.configureCommand)(constants_1.COMMANDS.PZN_IMPORT);
998
990
  logger_1.logger.debug('Import of the PZN rule execution started');
999
991
  try {
1000
- cmdOptions = utils_1.unmaskPasswords(cmdOptions);
1001
- validateOptions_1.validateOptions(cmdOptions);
992
+ cmdOptions = (0, utils_1.unmaskPasswords)(cmdOptions);
993
+ (0, validateOptions_1.validateOptions)(cmdOptions);
1002
994
  }
1003
995
  catch (error) {
1004
996
  logger_1.logger.error(error.message);
1005
- yield utils_1.flushLogAndExitProcess(false, true);
997
+ await (0, utils_1.flushLogAndExitProcess)(false, true);
1006
998
  }
1007
999
  const pznRulesImportObj = new pznRulesImport_1.PznRulesImport();
1008
1000
  try {
1009
- const responseCode = yield pznRulesImportObj.invoke(cmdOptions);
1001
+ const responseCode = await pznRulesImportObj.invoke(cmdOptions);
1010
1002
  logger_1.logger.debug('Response code from the invoke function: %s', responseCode);
1011
1003
  logger_1.logger.debug('Import pzn rules execution completed');
1012
- yield utils_1.flushLogAndExitProcess(responseCode);
1004
+ await (0, utils_1.flushLogAndExitProcess)(responseCode);
1013
1005
  }
1014
1006
  catch (error) {
1015
1007
  logger_1.logger.debug('Exception in execution of Import pzn rules : %o', error);
1016
- yield utils_1.flushLogAndExitProcess(false);
1008
+ await (0, utils_1.flushLogAndExitProcess)(false);
1017
1009
  }
1018
- }));
1010
+ });
1019
1011
  program
1020
1012
  .command(constants_1.COMMANDS.DELETE_DAM_SCHEMA)
1021
- .requiredOption('-dxProtocol, --dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
1022
- .requiredOption('-hostname, --hostname <value>', 'Host name of the DX Core server', config.hostname)
1023
- .requiredOption('-dxUsername, --dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
1024
- .requiredOption('-dxPassword, --dxPassword <value>', 'Password of the DX Core', MaskData.maskPassword(config.dxPassword))
1025
- .requiredOption('-damAPIPort, --damAPIPort <value>', 'Port number of the DAM server, for any Kubernetes Environment default port is 443', config.damAPIPort ? config.damAPIPort.toString() : config.damAPIPort)
1026
- .requiredOption('-ringAPIPort, --ringAPIPort <value>', 'Port number of the DX Core API server, for any Kubernetes Environment default port is 443', config.ringAPIPort ? config.ringAPIPort.toString() : config.ringAPIPort)
1027
- .requiredOption('-damAPIVersion, --damAPIVersion <value>', 'API Version number of DAM, for any Kubernetes Environment default port is 443', config.damAPIVersion ? config.damAPIVersion.toString() : config.damAPIVersion)
1028
- .requiredOption('-ringAPIVersion, --ringAPIVersion <value>', 'API Version number of DX Core, for any Kubernetes Environment default port is 443', config.ringAPIVersion ? config.ringAPIVersion.toString() : config.ringAPIVersion)
1029
- .option('-schemaVersion, --schemaVersion <value>', 'DAM Schema Version')
1013
+ .requiredOption('--dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
1014
+ .requiredOption('--hostname <value>', 'Host name of the DX Core server', config.hostname)
1015
+ .requiredOption('--dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
1016
+ .requiredOption('--dxPassword <value>', 'Password of the DX Core', MaskData.maskPassword(config.dxPassword))
1017
+ .requiredOption('--damAPIPort <value>', 'Port number of the DAM server, for any Kubernetes Environment default port is 443', config.damAPIPort ? config.damAPIPort.toString() : config.damAPIPort)
1018
+ .requiredOption('--ringAPIPort <value>', 'Port number of the DX Core API server, for any Kubernetes Environment default port is 443', config.ringAPIPort ? config.ringAPIPort.toString() : config.ringAPIPort)
1019
+ .requiredOption('--damAPIVersion <value>', 'API Version number of DAM, for any Kubernetes Environment default port is 443', config.damAPIVersion ? config.damAPIVersion.toString() : config.damAPIVersion)
1020
+ .requiredOption('--ringAPIVersion <value>', 'API Version number of DX Core, for any Kubernetes Environment default port is 443', config.ringAPIVersion ? config.ringAPIVersion.toString() : config.ringAPIVersion)
1021
+ .option('--schemaVersion <value>', 'DAM Schema Version')
1030
1022
  .description('- Deletes inactive DAM schema from persistence in DX')
1031
- .action((cmdOptions) => __awaiter(void 0, void 0, void 0, function* () {
1032
- commands_1.configureCommand(constants_1.COMMANDS.DELETE_DAM_SCHEMA);
1023
+ .action(async (cmdOptions) => {
1024
+ (0, commands_1.configureCommand)(constants_1.COMMANDS.DELETE_DAM_SCHEMA);
1033
1025
  logger_1.logger.debug('Delete DAM Schema started');
1034
1026
  try {
1035
- cmdOptions = utils_1.unmaskPasswords(cmdOptions);
1036
- validateOptions_1.validateOptions(cmdOptions);
1027
+ cmdOptions = (0, utils_1.unmaskPasswords)(cmdOptions);
1028
+ (0, validateOptions_1.validateOptions)(cmdOptions);
1037
1029
  }
1038
1030
  catch (error) {
1039
1031
  logger_1.logger.error(error.message);
1040
- yield utils_1.flushLogAndExitProcess(false, true);
1032
+ await (0, utils_1.flushLogAndExitProcess)(false, true);
1041
1033
  }
1042
1034
  try {
1043
1035
  const deleteSchema = new deleteSchema_1.DeleteSchema();
1044
- const responseCode = yield deleteSchema.invoke(cmdOptions);
1036
+ const responseCode = await deleteSchema.invoke(cmdOptions);
1045
1037
  logger_1.logger.debug('Response code from the invoke function: %s', responseCode);
1046
1038
  logger_1.logger.debug('Delete DAM Schema execution completed');
1047
- yield utils_1.flushLogAndExitProcess(responseCode);
1039
+ await (0, utils_1.flushLogAndExitProcess)(responseCode);
1048
1040
  }
1049
1041
  catch (error) {
1050
1042
  logger_1.logger.debug('Exception in execution : %o', error);
1051
- yield utils_1.flushLogAndExitProcess(false);
1043
+ await (0, utils_1.flushLogAndExitProcess)(false);
1052
1044
  }
1053
- }));
1045
+ });
1054
1046
  program
1055
1047
  .command(constants_1.COMMANDS.LIST_DAM_SCHEMA)
1056
- .requiredOption('-dxProtocol, --dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
1057
- .requiredOption('-hostname, --hostname <value>', 'Host name of the DX Core server', config.hostname)
1058
- .requiredOption('-dxUsername, --dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
1059
- .requiredOption('-dxPassword, --dxPassword <value>', 'Password of the DX Core', MaskData.maskPassword(config.dxPassword))
1060
- .requiredOption('-damAPIPort, --damAPIPort <value>', 'Port number of the DAM server, for any Kubernetes Environment default port is 443', config.damAPIPort ? config.damAPIPort.toString() : config.damAPIPort)
1061
- .requiredOption('-ringAPIPort, --ringAPIPort <value>', 'Port number of the DX Core API server, for any Kubernetes Environment default port is 443', config.ringAPIPort ? config.ringAPIPort.toString() : config.ringAPIPort)
1062
- .requiredOption('-damAPIVersion, --damAPIVersion <value>', 'API Version number of DAM, for any Kubernetes Environment default port is 443', config.damAPIVersion ? config.damAPIVersion.toString() : config.damAPIVersion)
1063
- .requiredOption('-ringAPIVersion, --ringAPIVersion <value>', 'API Version number of DX Core, for any Kubernetes Environment default port is 443', config.ringAPIVersion ? config.ringAPIVersion.toString() : config.ringAPIVersion)
1048
+ .requiredOption('--dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
1049
+ .requiredOption('--hostname <value>', 'Host name of the DX Core server', config.hostname)
1050
+ .requiredOption('--dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
1051
+ .requiredOption('--dxPassword <value>', 'Password of the DX Core', MaskData.maskPassword(config.dxPassword))
1052
+ .requiredOption('--damAPIPort <value>', 'Port number of the DAM server, for any Kubernetes Environment default port is 443', config.damAPIPort ? config.damAPIPort.toString() : config.damAPIPort)
1053
+ .requiredOption('--ringAPIPort <value>', 'Port number of the DX Core API server, for any Kubernetes Environment default port is 443', config.ringAPIPort ? config.ringAPIPort.toString() : config.ringAPIPort)
1054
+ .requiredOption('--damAPIVersion <value>', 'API Version number of DAM, for any Kubernetes Environment default port is 443', config.damAPIVersion ? config.damAPIVersion.toString() : config.damAPIVersion)
1055
+ .requiredOption('--ringAPIVersion <value>', 'API Version number of DX Core, for any Kubernetes Environment default port is 443', config.ringAPIVersion ? config.ringAPIVersion.toString() : config.ringAPIVersion)
1064
1056
  .description('- Lists all DAM schemas in DX.')
1065
- .action((cmdOptions) => __awaiter(void 0, void 0, void 0, function* () {
1066
- commands_1.configureCommand(constants_1.COMMANDS.LIST_DAM_SCHEMA);
1057
+ .action(async (cmdOptions) => {
1058
+ (0, commands_1.configureCommand)(constants_1.COMMANDS.LIST_DAM_SCHEMA);
1067
1059
  logger_1.logger.debug('List DAM Schema started');
1068
1060
  try {
1069
- cmdOptions = utils_1.unmaskPasswords(cmdOptions);
1070
- validateOptions_1.validateOptions(cmdOptions);
1061
+ cmdOptions = (0, utils_1.unmaskPasswords)(cmdOptions);
1062
+ (0, validateOptions_1.validateOptions)(cmdOptions);
1071
1063
  }
1072
1064
  catch (error) {
1073
1065
  logger_1.logger.error(error.message);
1074
- yield utils_1.flushLogAndExitProcess(false, true);
1066
+ await (0, utils_1.flushLogAndExitProcess)(false, true);
1075
1067
  }
1076
1068
  try {
1077
1069
  const listSchema = new listSchema_1.ListSchema();
1078
- const responseCode = yield listSchema.invoke(cmdOptions);
1070
+ const responseCode = await listSchema.invoke(cmdOptions);
1079
1071
  logger_1.logger.debug('Response code from the invoke function: %s', responseCode);
1080
1072
  logger_1.logger.debug('List DAM Schema execution completed');
1081
- yield utils_1.flushLogAndExitProcess(responseCode);
1073
+ await (0, utils_1.flushLogAndExitProcess)(responseCode);
1082
1074
  }
1083
1075
  catch (error) {
1084
1076
  logger_1.logger.debug('Exception in execution : %o', error);
1085
- yield utils_1.flushLogAndExitProcess(false);
1077
+ await (0, utils_1.flushLogAndExitProcess)(false);
1086
1078
  }
1087
- }));
1079
+ });
1088
1080
  program
1089
1081
  .command(`${constants_1.COMMANDS.MANAGE_VIRTUAL_PORTAL} [subCmd]`)
1090
- .requiredOption('-dxUsername, --dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
1091
- .requiredOption('-dxPassword, --dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
1092
- .option('-dxConnectPort, --dxConnectPort <value>', 'Port number of the cw_profile, for any Kubernetes Environment default port is 443', config.dxConnectPort.toString())
1093
- .option('-dxProfileName, --dxProfileName <value>', 'Profile name in the DX core server ', config.dxProfileName)
1094
- .option('-dxConnectUsername, --dxConnectUsername <value>', 'Username for the cw_profile', config.dxConnectUsername)
1095
- .option('-dxConnectPassword, --dxConnectPassword <value>', 'Password for the cw_profile', MaskData.maskPassword(config.dxConnectPassword))
1096
- .option('-dxWASUsername, --dxWASUsername <value>', 'Username of the DX WAS server', config.dxWASUsername)
1097
- .option('-dxWASPassword, --dxWASPassword <value>', 'Password of the DX WAS server', MaskData.maskPassword(config.dxWASPassword))
1098
- .option('-vpTitle, --vpTitle <value>', 'Virtual portal Title')
1099
- .option('-vpRealm, --vpRealm <value>', 'Virtual portal Realm')
1100
- .option('-vpAdminGroup, --vpAdminGroup <value>', 'Virtual portal AdminGroup')
1101
- .option('-vpHostname, --vpHostname <value>', 'Virtual portal Hostname')
1102
- .option('-vpContext, --vpContext <value>', 'Virtual portal Context')
1103
- .option('-dxProtocol, --dxProtocol <value>', 'protocol of the DX Core server', config.dxProtocol)
1104
- .requiredOption('-hostname,--hostname <value>', 'Host name of the DX Core server', config.hostname)
1105
- .option('-dxPort,--dxPort <value>', 'Port number of the DX Core server, for any Kubernetes Environment default port is 443', config.dxPort ? config.dxPort.toString() : config.dxPort)
1106
- .option('-xmlConfigPath, --xmlConfigPath <value>', 'Path to DX configuration endpoint', config.xmlConfigPath)
1107
- .option('-xmlFile,--xmlFile <value>', 'XML file name with full path')
1108
- .option('-requestId, --requestId <value>', 'Unique Id of a previously triggered create virtual portal request')
1082
+ .requiredOption('--dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
1083
+ .requiredOption('--dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
1084
+ .option('--dxConnectPort <value>', 'Port number of the cw_profile, for any Kubernetes Environment default port is 443', config.dxConnectPort.toString())
1085
+ .option('--dxProfileName <value>', 'Profile name in the DX core server ', config.dxProfileName)
1086
+ .option('--dxConnectUsername <value>', 'Username for the cw_profile', config.dxConnectUsername)
1087
+ .option('--dxConnectPassword <value>', 'Password for the cw_profile', MaskData.maskPassword(config.dxConnectPassword))
1088
+ .option('--dxWASUsername <value>', 'Username of the DX WAS server', config.dxWASUsername)
1089
+ .option('--dxWASPassword <value>', 'Password of the DX WAS server', MaskData.maskPassword(config.dxWASPassword))
1090
+ .option('--vpTitle <value>', 'Virtual portal Title')
1091
+ .option('--vpRealm <value>', 'Virtual portal Realm')
1092
+ .option('--vpAdminGroup <value>', 'Virtual portal AdminGroup')
1093
+ .option('--vpHostname <value>', 'Virtual portal Hostname')
1094
+ .option('--vpContext <value>', 'Virtual portal Context')
1095
+ .option('--dxProtocol <value>', 'protocol of the DX Core server', config.dxProtocol)
1096
+ .requiredOption('--hostname <value>', 'Host name of the DX Core server', config.hostname)
1097
+ .option('--dxPort <value>', 'Port number of the DX Core server, for any Kubernetes Environment default port is 443', config.dxPort ? config.dxPort.toString() : config.dxPort)
1098
+ .option('--xmlConfigPath <value>', 'Path to DX configuration endpoint', config.xmlConfigPath)
1099
+ .option('--xmlFile <value>', 'XML file name with full path')
1100
+ .option('--requestId <value>', 'Unique Id of a previously triggered create virtual portal request')
1109
1101
  .option('-h, --help')
1110
1102
  .description('- Manages list,create,import or export of virtual portal in the DX Core server')
1111
- .action((subCmd, cmd) => __awaiter(void 0, void 0, void 0, function* () {
1103
+ .action(async (subCmd, cmd) => {
1112
1104
  if ((subCmd === constants_1.SUB_COMMANDS.LIST_VIRTUAL_PORTALS || subCmd === constants_1.SUB_COMMANDS.CREATE_VIRTUAL_PORTAL || subCmd === constants_1.SUB_COMMANDS.IMPORT_VIRTUAL_PORTAL
1113
- || subCmd === constants_1.SUB_COMMANDS.EXPORT_VIRTUAL_PORTAL) && (cmd.parent.args[2] === constants_1.COMMANDS.H || cmd.parent.args[2] === constants_1.COMMANDS.HELP)) {
1105
+ || subCmd === constants_1.SUB_COMMANDS.EXPORT_VIRTUAL_PORTAL) && (process.argv.includes(constants_1.COMMANDS.H) || process.argv.includes(constants_1.COMMANDS.HELP))) {
1114
1106
  logger_1.logger.help('Usage: dxclient manage-virtual-portal [options] [subCmd](list/create/import/export)\n');
1115
1107
  logger_1.logger.help('Lists,create,import or export a virtual portal in the DX Core server\n');
1116
- logger_1.logger.help(` -hostname,--hostname <value> Host name of the DX Core server (default: "${config.hostname}")`);
1117
- logger_1.logger.help(` -dxUsername, --dxUsername <value> Username of the DX Core server (default: "${config.dxUsername}")`);
1118
- logger_1.logger.help(` -dxPassword, --dxPassword <value> Password of the DX Core server (default: "${MaskData.maskPassword(config.dxPassword)}")`);
1108
+ logger_1.logger.help(` --hostname <value> Host name of the DX Core server (default: "${config.hostname}")`);
1109
+ logger_1.logger.help(` --dxUsername <value> Username of the DX Core server (default: "${config.dxUsername}")`);
1110
+ logger_1.logger.help(` --dxPassword <value> Password of the DX Core server (default: "${MaskData.maskPassword(config.dxPassword)}")`);
1119
1111
  if (subCmd === constants_1.SUB_COMMANDS.LIST_VIRTUAL_PORTALS) {
1120
- logger_1.logger.help(` -dxConnectPort, --dxConnectPort <value> Port number of the cw_profile (default: "${config.dxConnectPort}")`);
1112
+ logger_1.logger.help(` --dxConnectPort <value> Port number of the cw_profile (default: "${config.dxConnectPort}")`);
1121
1113
  logger_1.logger.help(` -dxProfileName, --dxProfileName <value> Profile name in the DX core server (default: "${config.dxProfileName}")`);
1122
- logger_1.logger.help(` -dxConnectUsername, --dxConnectUsername <value> Username for the cw_profile (default: "${config.dxConnectUsername}")`);
1123
- logger_1.logger.help(` -dxConnectPassword, --dxConnectPassword <value> Password for the cw_profile (default: "${MaskData.maskPassword(config.dxConnectPassword)}")`);
1124
- logger_1.logger.help(` -dxWASUsername, --dxWASUsername <value> Username of the DX WAS server (default: "${config.dxWASUsername}")`);
1125
- logger_1.logger.help(` -dxWASPassword, --dxWASPassword <value> Password of the DX WAS server (default: "${MaskData.maskPassword(config.dxWASPassword)}")`);
1114
+ logger_1.logger.help(` --dxConnectUsername <value> Username for the cw_profile (default: "${config.dxConnectUsername}")`);
1115
+ logger_1.logger.help(` --dxConnectPassword <value> Password for the cw_profile (default: "${MaskData.maskPassword(config.dxConnectPassword)}")`);
1116
+ logger_1.logger.help(` --dxWASUsername <value> Username of the DX WAS server (default: "${config.dxWASUsername}")`);
1117
+ logger_1.logger.help(` --dxWASPassword <value> Password of the DX WAS server (default: "${MaskData.maskPassword(config.dxWASPassword)}")`);
1126
1118
  }
1127
1119
  if (subCmd === constants_1.SUB_COMMANDS.CREATE_VIRTUAL_PORTAL) {
1128
- logger_1.logger.help(` -dxConnectPort, --dxConnectPort <value> Port number of the cw_profile (default: "${config.dxConnectPort}")`);
1120
+ logger_1.logger.help(` --dxConnectPort <value> Port number of the cw_profile (default: "${config.dxConnectPort}")`);
1129
1121
  logger_1.logger.help(` -dxProfileName, --dxProfileName <value> Profile name in the DX core server (default: "${config.dxProfileName}")`);
1130
- logger_1.logger.help(` -dxConnectUsername, --dxConnectUsername <value> Username for the cw_profile (default: "${config.dxConnectUsername}")`);
1131
- logger_1.logger.help(` -dxConnectPassword, --dxConnectPassword <value> Password for the cw_profile (default: "${MaskData.maskPassword(config.dxConnectPassword)}")`);
1132
- logger_1.logger.help(` -dxWASUsername, --dxWASUsername <value> Username of the DX WAS server (default: "${config.dxWASUsername}")`);
1133
- logger_1.logger.help(` -dxWASPassword, --dxWASPassword <value> Password of the DX WAS server (default: "${MaskData.maskPassword(config.dxWASPassword)}")`);
1134
- logger_1.logger.help(' -vpTitle, --vpTitle <value> Virtual portal Title');
1135
- logger_1.logger.help(' -vpRealm, --vpRealm <value> Virtual portal Realm');
1136
- logger_1.logger.help(' -vpAdminGroup, --vpAdminGroup <value> Virtual portal AdminGroup');
1137
- logger_1.logger.help(' -vpHostname, --vpHostname <value> Virtual portal Hostname');
1138
- logger_1.logger.help(' -vpContext, --vpContext <value> Virtual portal Context');
1139
- logger_1.logger.help(' -requestId, --requestId <value> Unique Id of a previously triggered create virtual portal request');
1122
+ logger_1.logger.help(` --dxConnectUsername <value> Username for the cw_profile (default: "${config.dxConnectUsername}")`);
1123
+ logger_1.logger.help(` --dxConnectPassword <value> Password for the cw_profile (default: "${MaskData.maskPassword(config.dxConnectPassword)}")`);
1124
+ logger_1.logger.help(` --dxWASUsername <value> Username of the DX WAS server (default: "${config.dxWASUsername}")`);
1125
+ logger_1.logger.help(` --dxWASPassword <value> Password of the DX WAS server (default: "${MaskData.maskPassword(config.dxWASPassword)}")`);
1126
+ logger_1.logger.help(' --vpTitle <value> Virtual portal Title');
1127
+ logger_1.logger.help(' --vpRealm <value> Virtual portal Realm');
1128
+ logger_1.logger.help(' --vpAdminGroup <value> Virtual portal AdminGroup');
1129
+ logger_1.logger.help(' --vpHostname <value> Virtual portal Hostname');
1130
+ logger_1.logger.help(' --vpContext <value> Virtual portal Context');
1131
+ logger_1.logger.help(' --requestId <value> Unique Id of a previously triggered create virtual portal request');
1140
1132
  }
1141
1133
  if (subCmd === constants_1.SUB_COMMANDS.IMPORT_VIRTUAL_PORTAL) {
1142
- logger_1.logger.help(` -dxProtocol, --dxProtocol <value> protocol of the DX Core server (default: "${config.dxProtocol}")`);
1143
- logger_1.logger.help(` -dxPort, --dxPort <value> Port number for DX Core server, for any Kubernetes Environment \
1134
+ logger_1.logger.help(` --dxProtocol <value> protocol of the DX Core server (default: "${config.dxProtocol}")`);
1135
+ logger_1.logger.help(` --dxPort <value> Port number for DX Core server, for any Kubernetes Environment \
1144
1136
  default port is 443 (default: "${config.dxPort.toString()}")`);
1145
- logger_1.logger.help(` -xmlConfigPath, --xmlConfigPath <value> Path to DX configuration endpoint (default: "${config.xmlConfigPath}")`);
1146
- logger_1.logger.help(' -vpContext, --vpContext <value> Virtual portal Context');
1147
- logger_1.logger.help(' -xmlFile,--xmlFile <value> XML file name with full path');
1137
+ logger_1.logger.help(` --xmlConfigPath <value> Path to DX configuration endpoint (default: "${config.xmlConfigPath}")`);
1138
+ logger_1.logger.help(' --vpContext <value> Virtual portal Context');
1139
+ logger_1.logger.help(' --xmlFile <value> XML file name with full path');
1148
1140
  }
1149
1141
  if (subCmd === constants_1.SUB_COMMANDS.EXPORT_VIRTUAL_PORTAL) {
1150
- logger_1.logger.help(` -dxProtocol, --dxProtocol <value> protocol of the DX Core server (default: "${config.dxProtocol}")`);
1151
- logger_1.logger.help(` -dxPort,--dxPort <value> Port number of the DX Core server, for any Kubernetes Environment default port is 443,
1142
+ logger_1.logger.help(` --dxProtocol <value> protocol of the DX Core server (default: "${config.dxProtocol}")`);
1143
+ logger_1.logger.help(` --dxPort <value> Port number of the DX Core server, for any Kubernetes Environment default port is 443,
1152
1144
  (default: "${config.dxPort ? config.dxPort.toString() : config.dxPort}")`);
1153
- logger_1.logger.help(` -xmlConfigPath, --xmlConfigPath <value> Path to DX configuration endpoint (default: "${config.xmlConfigPath}")`);
1154
- logger_1.logger.help(' -vpContext, --vpContext <value> Path to virtual portal context');
1155
- logger_1.logger.help(' -vpTitle, --vpTitle <value> Virtual portal name');
1156
- logger_1.logger.help(' -xmlFile,--xmlFile <value> XML file name with full path');
1145
+ logger_1.logger.help(` --xmlConfigPath <value> Path to DX configuration endpoint (default: "${config.xmlConfigPath}")`);
1146
+ logger_1.logger.help(' --vpContext <value> Path to virtual portal context');
1147
+ logger_1.logger.help(' --vpTitle <value> Virtual portal name');
1148
+ logger_1.logger.help(' --xmlFile <value> XML file name with full path');
1157
1149
  }
1158
1150
  logger_1.logger.help(' -h, --help display help for command');
1159
1151
  process.exit(1);
@@ -1167,119 +1159,119 @@ program
1167
1159
  process.exit(1);
1168
1160
  }
1169
1161
  try {
1170
- commands_1.configureCommand(subCmd);
1162
+ (0, commands_1.configureCommand)(subCmd);
1171
1163
  logger_1.logger.debug('Manage virtual portal execution started');
1172
- cmd = utils_1.unmaskPasswords(cmd);
1173
- validateOptions_1.validateOptions(cmd);
1164
+ cmd = (0, utils_1.unmaskPasswords)(cmd);
1165
+ (0, validateOptions_1.validateOptions)(cmd);
1174
1166
  }
1175
1167
  catch (error) {
1176
1168
  logger_1.logger.error(error.message);
1177
- yield utils_1.flushLogAndExitProcess(false, true);
1169
+ await (0, utils_1.flushLogAndExitProcess)(false, true);
1178
1170
  }
1179
1171
  if (subCmd === constants_1.SUB_COMMANDS.LIST_VIRTUAL_PORTALS) {
1180
1172
  const listVirtualPortals = new listVirtualPortals_1.ListVirtualPortals();
1181
1173
  try {
1182
- const responseCode = yield listVirtualPortals.invoke(cmd);
1174
+ const responseCode = await listVirtualPortals.invoke(cmd);
1183
1175
  logger_1.logger.debug('Response code from the invoke function: %s', responseCode);
1184
1176
  logger_1.logger.debug('List virtual portal execution successful');
1185
- yield utils_1.flushLogAndExitProcess(responseCode);
1177
+ await (0, utils_1.flushLogAndExitProcess)(responseCode);
1186
1178
  }
1187
1179
  catch (error) {
1188
1180
  logger_1.logger.debug('Exception in execution of list virtual portal : %o', error);
1189
- yield utils_1.flushLogAndExitProcess(false);
1181
+ await (0, utils_1.flushLogAndExitProcess)(false);
1190
1182
  }
1191
1183
  }
1192
1184
  else if (subCmd === constants_1.SUB_COMMANDS.CREATE_VIRTUAL_PORTAL) {
1193
1185
  const createVirtualPortal = new createVirtualPortal_1.CreateVirtualPortal();
1194
1186
  try {
1195
- const responseCode = yield createVirtualPortal.invoke(cmd);
1187
+ const responseCode = await createVirtualPortal.invoke(cmd);
1196
1188
  logger_1.logger.debug('Response code from the invoke function: %s', responseCode);
1197
1189
  logger_1.logger.debug('create virtual portal execution successful');
1198
- yield utils_1.flushLogAndExitProcess(responseCode);
1190
+ await (0, utils_1.flushLogAndExitProcess)(responseCode);
1199
1191
  }
1200
1192
  catch (error) {
1201
1193
  logger_1.logger.debug('Exception in execution of import virtual portal : %o', error);
1202
- yield utils_1.flushLogAndExitProcess(false);
1194
+ await (0, utils_1.flushLogAndExitProcess)(false);
1203
1195
  }
1204
1196
  }
1205
1197
  else if (subCmd === constants_1.SUB_COMMANDS.IMPORT_VIRTUAL_PORTAL) {
1206
1198
  const importVirtualPortal = new importVirtualPortal_1.ImportVirtualPortal();
1207
1199
  try {
1208
- const responseCode = yield importVirtualPortal.invoke(cmd);
1200
+ const responseCode = await importVirtualPortal.invoke(cmd);
1209
1201
  logger_1.logger.debug('Response code from the invoke function: %s', responseCode);
1210
1202
  logger_1.logger.debug('Import virtual portal execution successful');
1211
- yield utils_1.flushLogAndExitProcess(responseCode);
1203
+ await (0, utils_1.flushLogAndExitProcess)(responseCode);
1212
1204
  }
1213
1205
  catch (error) {
1214
1206
  logger_1.logger.debug('Exception in execution of import virtual portal : %o', error);
1215
- yield utils_1.flushLogAndExitProcess(false);
1207
+ await (0, utils_1.flushLogAndExitProcess)(false);
1216
1208
  }
1217
1209
  }
1218
1210
  else if (subCmd === constants_1.SUB_COMMANDS.EXPORT_VIRTUAL_PORTAL) {
1219
1211
  const exportVirtualPortal = new exportVirtualPortal_1.ExportVirtualPortal();
1220
1212
  try {
1221
- const responseCode = yield exportVirtualPortal.invoke(cmd);
1213
+ const responseCode = await exportVirtualPortal.invoke(cmd);
1222
1214
  logger_1.logger.debug('Response code from the invoke function: %s', responseCode);
1223
1215
  logger_1.logger.debug('List virtual portal execution successful');
1224
- yield utils_1.flushLogAndExitProcess(responseCode);
1216
+ await (0, utils_1.flushLogAndExitProcess)(responseCode);
1225
1217
  }
1226
1218
  catch (error) {
1227
1219
  logger_1.logger.debug('Exception in execution of list virtual portal : %o', error);
1228
- yield utils_1.flushLogAndExitProcess(false);
1220
+ await (0, utils_1.flushLogAndExitProcess)(false);
1229
1221
  }
1230
1222
  }
1231
- }))
1223
+ })
1232
1224
  .helpOption(false);
1233
1225
  program
1234
1226
  .command(`${constants_1.COMMANDS.RESOURCE_ENVIRONMENT_PROVIDER} [subCmd]`)
1235
- .requiredOption('-dxProtocol, --dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
1236
- .requiredOption('-hostname, --hostname <value>', 'Host name of the DX Core server', config.hostname)
1237
- .requiredOption('-dxPort, --dxPort <value>', 'Port number of the DX Core server, for any Kubernetes Environment default port is 443', config.dxPort ? config.dxPort.toString() : config.dxPort)
1238
- .requiredOption('-dxUsername, --dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
1239
- .requiredOption('-dxPassword, --dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
1240
- .requiredOption('-dxConnectUsername, --dxConnectUsername <value>', 'Username for the cw_profile', config.dxConnectUsername)
1241
- .requiredOption('-dxConnectPassword, --dxConnectPassword <value>', 'Password for the cw_profile', MaskData.maskPassword(config.dxConnectPassword))
1242
- .requiredOption('-dxConnectPort, --dxConnectPort <value>', 'Port number of the cw_profile', config.dxConnectPort ? config.dxConnectPort.toString() : config.dxConnectPort)
1243
- .requiredOption('-dxProfileName, --dxProfileName <value>', 'Profile name in the DX core server ', config.dxProfileName)
1244
- .requiredOption('-dxWASUsername, --dxWASUsername <value>', 'Username of the DX WAS server', config.dxWASUsername)
1245
- .requiredOption('-dxWASPassword, --dxWASPassword <value>', 'Password of the DX WAS server', MaskData.maskPassword(config.dxWASPassword))
1246
- .option('-providerName, --providerName <value>', 'Name of the Resource Environment Provider ')
1247
- .option('-propertyName, --propertyName <value>', 'Name of the Custom Property ')
1248
- .option('-propertyValue, --propertyValue <value>', 'Value of the Custom Property ')
1249
- .option('-propertyDesc, --propertyDesc <value>', 'Description of the Custom Property ')
1250
- .option('-filePath, --filePath <value>', 'File path of the import Resource Environment Provider files')
1227
+ .requiredOption('--dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
1228
+ .requiredOption('--hostname <value>', 'Host name of the DX Core server', config.hostname)
1229
+ .requiredOption('--dxPort <value>', 'Port number of the DX Core server, for any Kubernetes Environment default port is 443', config.dxPort ? config.dxPort.toString() : config.dxPort)
1230
+ .requiredOption('--dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
1231
+ .requiredOption('--dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
1232
+ .requiredOption('--dxConnectUsername <value>', 'Username for the cw_profile', config.dxConnectUsername)
1233
+ .requiredOption('--dxConnectPassword <value>', 'Password for the cw_profile', MaskData.maskPassword(config.dxConnectPassword))
1234
+ .requiredOption('--dxConnectPort <value>', 'Port number of the cw_profile', config.dxConnectPort ? config.dxConnectPort.toString() : config.dxConnectPort)
1235
+ .requiredOption('--dxProfileName <value>', 'Profile name in the DX core server ', config.dxProfileName)
1236
+ .requiredOption('--dxWASUsername <value>', 'Username of the DX WAS server', config.dxWASUsername)
1237
+ .requiredOption('--dxWASPassword <value>', 'Password of the DX WAS server', MaskData.maskPassword(config.dxWASPassword))
1238
+ .option('--providerName <value>', 'Name of the Resource Environment Provider ')
1239
+ .option('--propertyName <value>', 'Name of the Custom Property ')
1240
+ .option('--propertyValue <value>', 'Value of the Custom Property ')
1241
+ .option('--propertyDesc <value>', 'Description of the Custom Property ')
1242
+ .option('--filePath <value>', 'File path of the import Resource Environment Provider files')
1251
1243
  .option('-h, --help')
1252
1244
  .description('- Creates, Updates, Deletes,Import,Retrieves or Exports a custom property')
1253
- .action((subCommand, commands) => __awaiter(void 0, void 0, void 0, function* () {
1245
+ .action(async (subCommand, commands) => {
1254
1246
  logger_1.logger.debug('Resource Environment provider process started.');
1255
1247
  if ((subCommand === constants_1.SUB_COMMANDS.CREATE_PROPERTY || subCommand === constants_1.SUB_COMMANDS.UPDATE_PROPERTY || subCommand === constants_1.SUB_COMMANDS.DELETE_PROPERTY
1256
1248
  || subCommand === constants_1.SUB_COMMANDS.EXPORT_PROPERTIES || subCommand === constants_1.SUB_COMMANDS.IMPORT_PROPERTIES || subCommand === constants_1.SUB_COMMANDS.RETRIEVE_PROPERTY)
1257
- && (commands.parent.args[2] === constants_1.COMMANDS.H || commands.parent.args[2] === constants_1.COMMANDS.HELP)) {
1249
+ && (process.argv.includes(constants_1.COMMANDS.H) || process.argv.includes(constants_1.COMMANDS.HELP))) {
1258
1250
  logger_1.logger.help('Usage: dxclient resource-env-provider [options] [subCmd](create-property/update-property/delete-property/export-properties/import-properties/retrieve-property)\n');
1259
1251
  logger_1.logger.help('- Creates, Retrieves, Updates, Deletes, Import or Exports custom properties.\n');
1260
- logger_1.logger.help(` -hostname,--hostname <value> Host name of the DX Core server (default: "${config.hostname}")`);
1261
- logger_1.logger.help(` -dxConnectPort, --dxConnectPort <value> Port number of the cw_profile (default: "${config.dxConnectPort}")`);
1262
- logger_1.logger.help(` -dxConnectUsername, --dxConnectUsername <value> Username for the cw_profile (default: "${config.dxConnectUsername}")`);
1263
- logger_1.logger.help(` -dxConnectPassword, --dxConnectPassword <value> Password for the cw_profile (default: "${MaskData.maskPassword(config.dxConnectPassword)}")`);
1264
- logger_1.logger.help(` -dxWASUsername, --dxWASUsername <value> Username of the DX WAS server (default: "${config.dxWASUsername}")`);
1265
- logger_1.logger.help(` -dxWASPassword, --dxWASPassword <value> Password of the DX WAS server (default: "${MaskData.maskPassword(config.dxWASPassword)}")`);
1252
+ logger_1.logger.help(` --hostname <value> Host name of the DX Core server (default: "${config.hostname}")`);
1253
+ logger_1.logger.help(` --dxConnectPort <value> Port number of the cw_profile (default: "${config.dxConnectPort}")`);
1254
+ logger_1.logger.help(` --dxConnectUsername <value> Username for the cw_profile (default: "${config.dxConnectUsername}")`);
1255
+ logger_1.logger.help(` --dxConnectPassword <value> Password for the cw_profile (default: "${MaskData.maskPassword(config.dxConnectPassword)}")`);
1256
+ logger_1.logger.help(` --dxWASUsername <value> Username of the DX WAS server (default: "${config.dxWASUsername}")`);
1257
+ logger_1.logger.help(` --dxWASPassword <value> Password of the DX WAS server (default: "${MaskData.maskPassword(config.dxWASPassword)}")`);
1266
1258
  logger_1.logger.help(` -dxProfileName, --dxProfileName <value> Profile name in the DX core server (default: "${config.dxProfileName}")`);
1267
1259
  if (subCommand === constants_1.SUB_COMMANDS.CREATE_PROPERTY || subCommand === constants_1.SUB_COMMANDS.UPDATE_PROPERTY) {
1268
- logger_1.logger.help(' -providerName, --providerName <value> Name of the Resource Environment Provider');
1269
- logger_1.logger.help(' -propertyName, --propertyName <value> Name of the Custom Property');
1270
- logger_1.logger.help(' -propertyValue, --propertyValue <value> Value of the Custom Property');
1271
- logger_1.logger.help(' -propertyDesc, --propertyDesc <value> Description of the Custom Property');
1260
+ logger_1.logger.help(' --providerName <value> Name of the Resource Environment Provider');
1261
+ logger_1.logger.help(' --propertyName <value> Name of the Custom Property');
1262
+ logger_1.logger.help(' --propertyValue <value> Value of the Custom Property');
1263
+ logger_1.logger.help(' --propertyDesc <value> Description of the Custom Property');
1272
1264
  }
1273
1265
  if (subCommand === constants_1.SUB_COMMANDS.DELETE_PROPERTY) {
1274
- logger_1.logger.help(' -providerName, --providerName <value> Name of the Resource Environment Provider');
1275
- logger_1.logger.help(' -propertyName, --propertyName <value> Name of the Custom Property');
1266
+ logger_1.logger.help(' --providerName <value> Name of the Resource Environment Provider');
1267
+ logger_1.logger.help(' --propertyName <value> Name of the Custom Property');
1276
1268
  }
1277
1269
  if (subCommand === constants_1.SUB_COMMANDS.IMPORT_PROPERTIES) {
1278
- logger_1.logger.help(' -filePath, --filePath <value> File path of the import Resource Environment Provider files');
1270
+ logger_1.logger.help(' --filePath <value> File path of the import Resource Environment Provider files');
1279
1271
  }
1280
1272
  if (subCommand === constants_1.SUB_COMMANDS.RETRIEVE_PROPERTY) {
1281
- logger_1.logger.help(' -providerName, --providerName <value> Name of the Resource Environment Provider');
1282
- logger_1.logger.help(' -propertyName, --propertyName <value> Name of the Custom Property');
1273
+ logger_1.logger.help(' --providerName <value> Name of the Resource Environment Provider');
1274
+ logger_1.logger.help(' --propertyName <value> Name of the Custom Property');
1283
1275
  }
1284
1276
  logger_1.logger.help(' -h, --help display help for command');
1285
1277
  process.exit(1);
@@ -1296,109 +1288,109 @@ program
1296
1288
  }
1297
1289
  else {
1298
1290
  try {
1299
- commands_1.configureCommand(subCommand);
1300
- commands = utils_1.unmaskPasswords(commands);
1301
- validateOptions_1.validateOptions(commands);
1291
+ (0, commands_1.configureCommand)(subCommand);
1292
+ commands = (0, utils_1.unmaskPasswords)(commands);
1293
+ (0, validateOptions_1.validateOptions)(commands);
1302
1294
  }
1303
1295
  catch (error) {
1304
1296
  logger_1.logger.error(error.message);
1305
- yield utils_1.flushLogAndExitProcess(false, true);
1297
+ await (0, utils_1.flushLogAndExitProcess)(false, true);
1306
1298
  }
1307
1299
  }
1308
1300
  const repActions = new resEnvProviderActions_1.ResourceEnvironmentProviderActions();
1309
1301
  try {
1310
- const responseCode = yield repActions.invoke(subCommand, commands);
1311
- yield utils_1.flushLogAndExitProcess(responseCode);
1302
+ const responseCode = await repActions.invoke(subCommand, commands);
1303
+ await (0, utils_1.flushLogAndExitProcess)(responseCode);
1312
1304
  }
1313
1305
  catch (error) {
1314
1306
  logger_1.logger.debug('Exception in execution of Resource Environment Provider Process : %o', error);
1315
- yield utils_1.flushLogAndExitProcess(false);
1307
+ await (0, utils_1.flushLogAndExitProcess)(false);
1316
1308
  }
1317
- }))
1309
+ })
1318
1310
  .helpOption(false);
1319
1311
  program
1320
1312
  .command(constants_1.COMMANDS.CREATE_SYNDICATION_RELATION)
1321
- .requiredOption('-dxProtocol, --dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
1322
- .requiredOption('-hostname, --hostname <value>', 'Host name of the DX Core server', config.hostname)
1323
- .requiredOption('-dxPort, --dxPort <value>', 'Port number of the DX Core server, for any Kubernetes Environment default port is 443', config.dxPort ? config.dxPort.toString() : config.dxPort)
1324
- .requiredOption('-dxUsername, --dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
1325
- .requiredOption('-dxPassword, --dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
1326
- .requiredOption('-contenthandlerPath, --contenthandlerPath <value>', 'Alternate path to the contenthandler servlet on the DX Core server', config.contenthandlerPath)
1327
- .requiredOption('-syndicatorUrl, --syndicatorUrl <value>', 'Syndicator URL e.g http(s)://host:port/wps/wcm')
1328
- .requiredOption('-syndicatorName, --syndicatorName <value>', 'New syndicator name: syndicatorName')
1329
- .requiredOption('-subscriberName, --subscriberName <value>', 'New subscriber name: subscriberName')
1330
- .requiredOption('-vaultSlotName, --vaultSlotName <value>', 'Credential Vault Name: vaultSlotName')
1331
- .requiredOption('-dxContextRoot, --dxContextRoot <value>', 'Alternate path to the context root on the DX Core server', config.dxContextRoot)
1332
- .option('-isEnabled, --isEnabled <value>', 'Whether the syndicator/subscriber pair is enabled on creation: isEnabled (default is true)', true)
1333
- .option('-updateAfterCreation, --updateAfterCreation <value>', 'Whether the syndicator/subscriber pair is updateAfterCreation : updateAfterCreation (default is true)', true)
1334
- .option('-syndicationType, --syndicationType <value>', 'The libraries to syndicate eg. all-items,liveItems,liveProjectsItem,all-items,published-items and all-items-and-versions')
1335
- .option('-webContentLibraries, --webContentLibraries <value>', ' Libraries Name: webContentLibraries')
1336
- .option('-subscriberURL, --subscriberURL <value>', 'Subscriber URL e.g http(s)://host:port/wps/wcm')
1337
- .option('-mode, --mode <value>', 'Syndicator/subscriber mode')
1338
- .option('-syndicatorVaultSlotName, --syndicatorVaultSlotName <value>', 'Credential Vault Name: syndicatorVaultSlotName')
1339
- .option('-virtualPortalContext, --virtualPortalContext <value>', 'Virtual portal Context', config.virtualPortalContext)
1313
+ .requiredOption('--dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
1314
+ .requiredOption('--hostname <value>', 'Host name of the DX Core server', config.hostname)
1315
+ .requiredOption('--dxPort <value>', 'Port number of the DX Core server, for any Kubernetes Environment default port is 443', config.dxPort ? config.dxPort.toString() : config.dxPort)
1316
+ .requiredOption('--dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
1317
+ .requiredOption('--dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
1318
+ .requiredOption('--contenthandlerPath <value>', 'Alternate path to the contenthandler servlet on the DX Core server', config.contenthandlerPath)
1319
+ .requiredOption('--syndicatorUrl <value>', 'Syndicator URL e.g http(s)://host:port/wps/wcm')
1320
+ .requiredOption('--syndicatorName <value>', 'New syndicator name: syndicatorName')
1321
+ .requiredOption('--subscriberName <value>', 'New subscriber name: subscriberName')
1322
+ .requiredOption('--vaultSlotName <value>', 'Credential Vault Name: vaultSlotName')
1323
+ .requiredOption('--dxContextRoot <value>', 'Alternate path to the context root on the DX Core server', config.dxContextRoot)
1324
+ .option('--isEnabled <value>', 'Whether the syndicator/subscriber pair is enabled on creation: isEnabled (default is true)', true)
1325
+ .option('--updateAfterCreation <value>', 'Whether the syndicator/subscriber pair is updateAfterCreation : updateAfterCreation (default is true)', true)
1326
+ .option('--syndicationType <value>', 'The libraries to syndicate eg. all-items,liveItems,liveProjectsItem,all-items,published-items and all-items-and-versions')
1327
+ .option('--webContentLibraries <value>', ' Libraries Name: webContentLibraries')
1328
+ .option('--subscriberURL <value>', 'Subscriber URL e.g http(s)://host:port/wps/wcm')
1329
+ .option('--mode <value>', 'Syndicator/subscriber mode')
1330
+ .option('--syndicatorVaultSlotName <value>', 'Credential Vault Name: syndicatorVaultSlotName')
1331
+ .option('--virtualPortalContext <value>', 'Virtual portal Context', config.virtualPortalContext)
1340
1332
  .description('- Creates a syndication relation between syndicator and subscriber in the DX server.')
1341
- .action((cmdOptions) => __awaiter(void 0, void 0, void 0, function* () {
1342
- commands_1.configureCommand(constants_1.COMMANDS.CREATE_SYNDICATION_RELATION);
1333
+ .action(async (cmdOptions) => {
1334
+ (0, commands_1.configureCommand)(constants_1.COMMANDS.CREATE_SYNDICATION_RELATION);
1343
1335
  logger_1.logger.debug('Create syndication relation execution started');
1344
1336
  try {
1345
- cmdOptions = utils_1.unmaskPasswords(cmdOptions);
1346
- validateOptions_1.validateOptions(cmdOptions);
1337
+ cmdOptions = (0, utils_1.unmaskPasswords)(cmdOptions);
1338
+ (0, validateOptions_1.validateOptions)(cmdOptions);
1347
1339
  }
1348
1340
  catch (error) {
1349
1341
  logger_1.logger.error(error.message);
1350
- yield utils_1.flushLogAndExitProcess(false, true);
1342
+ await (0, utils_1.flushLogAndExitProcess)(false, true);
1351
1343
  }
1352
1344
  try {
1353
1345
  const createSyndication = new createSyndicationRelation_1.CreateSyndicationRelation();
1354
- const responseCode = yield createSyndication.invoke(cmdOptions);
1346
+ const responseCode = await createSyndication.invoke(cmdOptions);
1355
1347
  logger_1.logger.debug('Response code from the invoke function: %s', responseCode);
1356
1348
  logger_1.logger.debug('Create syndication relation execution completed');
1357
- yield utils_1.flushLogAndExitProcess(responseCode);
1349
+ await (0, utils_1.flushLogAndExitProcess)(responseCode);
1358
1350
  }
1359
1351
  catch (error) {
1360
1352
  logger_1.logger.debug('Exception in execution : %o', error);
1361
- yield utils_1.flushLogAndExitProcess(false);
1353
+ await (0, utils_1.flushLogAndExitProcess)(false);
1362
1354
  }
1363
- }));
1355
+ });
1364
1356
  program
1365
1357
  .command(`${constants_1.COMMANDS.MANAGE_DAM_STAGING} [subCommand]`)
1366
- .requiredOption('-dxProtocol, --dxProtocol <value>', 'Protocol of the DX Core server of the publisher', config.dxProtocol)
1367
- .requiredOption('-hostname, --hostname <value>', 'Host name of the DX Core server of the publisher', config.hostname)
1368
- .requiredOption('-dxPort, --dxPort <value>', 'Port number of the DX Core server of the publisher', config.dxPort ? config.dxPort.toString() : config.dxPort)
1369
- .requiredOption('-dxUsername, --dxUsername <value>', 'Username of the DX Core server of the publisher', config.dxUsername)
1370
- .requiredOption('-dxPassword, --dxPassword <value>', 'Password of the DX Core server of the publisher', MaskData.maskPassword(config.dxPassword))
1371
- .option('-targetServerUsername, --targetServerUsername <value>', 'Username of the DX Core server of the subscriber')
1372
- .option('-targetServerPassword, --targetServerPassword <value>', 'Password of the DX Core server of the subscriber')
1373
- .requiredOption('-damAPIPort, --damAPIPort <value>', 'Port number of the DAM API server of the publisher', config.damAPIPort ? config.damAPIPort.toString() : config.damAPIPort)
1374
- .requiredOption('-ringAPIPort, --ringAPIPort <value>', 'Port number of the DX Core API server of the publisher', config.ringAPIPort ? config.ringAPIPort.toString() : config.ringAPIPort)
1375
- .requiredOption('-damAPIVersion, --damAPIVersion <value>', 'API Version number of DAM of the publisher', config.damAPIVersion ? config.damAPIVersion.toString() : config.damAPIVersion)
1376
- .requiredOption('-ringAPIVersion, --ringAPIVersion <value>', 'API Version number of DX Core of the publisher', config.ringAPIVersion ? config.ringAPIVersion.toString() : config.ringAPIVersion)
1377
- .option('-ltpaTokenRefreshTime, --ltpaTokenRefreshTime <value>', 'LTPA Token refresh time in minutes', constants_2.LTPA_TOKEN_REFRESH_TIME)
1378
- .option('-subscriberId, --subscriberId <value>', 'Subscriber id of the target environment of the subscriber')
1379
- .option('-targetHostname, --targetHostname <value>', 'Host name of the target environment of the subscriber', config.targetHostname)
1380
- .option('-interval,--interval <value>', 'Interval between two sync cycles. The unit of interval is minute. Default value of interval is 2 minutes.')
1381
- .option('-recordType, --recordType <value>', 'Type of the mismatch record')
1382
- .option('-recordAction, --recordAction <value>', 'Action of the mismatch record')
1383
- .option('-reportPath, --reportPath <value>', 'Location of the file path to download report')
1384
- .option('-forceDownload, --forceDownload <value>', 'Force download the report', 'false')
1385
- .option('-dxWASUsername, --dxWASUsername <value>', 'Username of the DX WAS server of the publisher', '')
1386
- .option('-dxWASPassword, --dxWASPassword <value>', 'Password of the DX WAS server of the publisher', '')
1387
- .option('-targetServerWASUsername, --targetServerWASUsername <value>', 'Username of the DX WAS server of the subscriber', '')
1388
- .option('-targetServerWASPassword, --targetServerWASPassword <value>', 'Password of the DX WAS server of the subscriber', '')
1358
+ .requiredOption('--dxProtocol <value>', 'Protocol of the DX Core server of the publisher', config.dxProtocol)
1359
+ .requiredOption('--hostname <value>', 'Host name of the DX Core server of the publisher', config.hostname)
1360
+ .requiredOption('--dxPort <value>', 'Port number of the DX Core server of the publisher', config.dxPort ? config.dxPort.toString() : config.dxPort)
1361
+ .requiredOption('--dxUsername <value>', 'Username of the DX Core server of the publisher', config.dxUsername)
1362
+ .requiredOption('--dxPassword <value>', 'Password of the DX Core server of the publisher', MaskData.maskPassword(config.dxPassword))
1363
+ .option('--targetServerUsername <value>', 'Username of the DX Core server of the subscriber')
1364
+ .option('--targetServerPassword <value>', 'Password of the DX Core server of the subscriber')
1365
+ .requiredOption('--damAPIPort <value>', 'Port number of the DAM API server of the publisher', config.damAPIPort ? config.damAPIPort.toString() : config.damAPIPort)
1366
+ .requiredOption('--ringAPIPort <value>', 'Port number of the DX Core API server of the publisher', config.ringAPIPort ? config.ringAPIPort.toString() : config.ringAPIPort)
1367
+ .requiredOption('--damAPIVersion <value>', 'API Version number of DAM of the publisher', config.damAPIVersion ? config.damAPIVersion.toString() : config.damAPIVersion)
1368
+ .requiredOption('--ringAPIVersion <value>', 'API Version number of DX Core of the publisher', config.ringAPIVersion ? config.ringAPIVersion.toString() : config.ringAPIVersion)
1369
+ .option('--ltpaTokenRefreshTime <value>', 'LTPA Token refresh time in minutes', constants_2.LTPA_TOKEN_REFRESH_TIME)
1370
+ .option('--subscriberId <value>', 'Subscriber id of the target environment of the subscriber')
1371
+ .option('--targetHostname <value>', 'Host name of the target environment of the subscriber', config.targetHostname)
1372
+ .option('--interval <value>', 'Interval between two sync cycles. The unit of interval is minute. Default value of interval is 2 minutes.')
1373
+ .option('--recordType <value>', 'Type of the mismatch record')
1374
+ .option('--recordAction <value>', 'Action of the mismatch record')
1375
+ .option('--reportPath <value>', 'Location of the file path to download report')
1376
+ .option('--forceDownload <value>', 'Force download the report', 'false')
1377
+ .option('--dxWASUsername <value>', 'Username of the DX WAS server of the publisher', '')
1378
+ .option('--dxWASPassword <value>', 'Password of the DX WAS server of the publisher', '')
1379
+ .option('--targetServerWASUsername <value>', 'Username of the DX WAS server of the subscriber', '')
1380
+ .option('--targetServerWASPassword <value>', 'Password of the DX WAS server of the subscriber', '')
1389
1381
  .option('-h, --help')
1390
1382
  .description(`- Registration/Deregistration of the subscriber, trigger the dam staging, get all the subscriber details,
1391
1383
  get staging mismatch report, find the dam staging mismatch, start staging resync or delete staging mismatch logs`)
1392
- .action((subCommand, commands) => __awaiter(void 0, void 0, void 0, function* () {
1384
+ .action(async (subCommand, commands) => {
1393
1385
  if ((subCommand === constants_1.SUB_COMMANDS.DAM_REGISTER_SUBSCRIBER
1394
1386
  || subCommand === constants_1.SUB_COMMANDS.DAM_DEREGISTER_SUBSCRIBER
1395
1387
  || subCommand === constants_1.SUB_COMMANDS.DAM_TRIGGER_STAGING
1396
1388
  || subCommand === constants_1.SUB_COMMANDS.DAM_GET_ALL_SUBSCRIBERS
1397
1389
  || subCommand === constants_1.SUB_COMMANDS.UPDATE_SECRETS
1398
- || (subCommand === constants_1.SUB_COMMANDS.DAM_GET_STAGING_MISMATCH_REPORT && utils_1.isFeatureEnabled(constants_1.FeaturesEnum.DAM_GET_STAGING_MISMATCH_REPORT))
1390
+ || (subCommand === constants_1.SUB_COMMANDS.DAM_GET_STAGING_MISMATCH_REPORT && (0, utils_1.isFeatureEnabled)(constants_1.FeaturesEnum.DAM_GET_STAGING_MISMATCH_REPORT))
1399
1391
  || subCommand === constants_1.SUB_COMMANDS.DAM_FIND_STAGING_MISMATCH
1400
1392
  || subCommand === constants_1.SUB_COMMANDS.DAM_START_STAGING_RESYNC
1401
- || subCommand === constants_1.SUB_COMMANDS.DAM_DELETE_STAGING_MISMATCH) && (commands.parent.args[2] === constants_1.COMMANDS.H || commands.parent.args[2] === constants_1.COMMANDS.HELP)) {
1393
+ || subCommand === constants_1.SUB_COMMANDS.DAM_DELETE_STAGING_MISMATCH) && (process.argv.includes(constants_1.COMMANDS.H) || process.argv.includes(constants_1.COMMANDS.HELP))) {
1402
1394
  logger_1.logger.help('Usage: dxclient Manage DAM staging [options] [subCmd]\n');
1403
1395
  if (subCommand === constants_1.SUB_COMMANDS.DAM_REGISTER_SUBSCRIBER) {
1404
1396
  logger_1.logger.help(' Registration of the subscriber\n');
@@ -1427,29 +1419,29 @@ program
1427
1419
  if (subCommand === constants_1.SUB_COMMANDS.DAM_DELETE_STAGING_MISMATCH) {
1428
1420
  logger_1.logger.help(' Delete dam staging mismatch logs\n');
1429
1421
  }
1430
- logger_1.logger.help(` -dxProtocol, --dxProtocol <value> Protocol of the DX Core server of the publisher (default: "${config.dxProtocol}")`);
1431
- logger_1.logger.help(` -hostname, --hostname <value> Host name of the DX Core server of the publisher (default: "${config.hostname}")`);
1432
- logger_1.logger.help(` -dxPort, --dxPort <value> Port number of the DX Core server, \
1422
+ logger_1.logger.help(` --dxProtocol <value> Protocol of the DX Core server of the publisher (default: "${config.dxProtocol}")`);
1423
+ logger_1.logger.help(` --hostname <value> Host name of the DX Core server of the publisher (default: "${config.hostname}")`);
1424
+ logger_1.logger.help(` --dxPort <value> Port number of the DX Core server, \
1433
1425
  for any Kubernetes Environment default port is 443 (default: "${config.dxPort ? config.dxPort.toString() : config.dxPort}")`);
1434
- logger_1.logger.help(` -dxUsername, --dxUsername <value> Username of the DX Core server of the publisher (default: "${config.dxUsername}")`);
1435
- logger_1.logger.help(` -dxPassword, --dxPassword <value> Password of the DX Core server of the publisher (default: "${MaskData.maskPassword(config.dxPassword)}")`);
1436
- logger_1.logger.help(` -damAPIPort, --damAPIPort <value> Port number of the DAM API server of the publisher (default: "${config.damAPIPort
1426
+ logger_1.logger.help(` --dxUsername <value> Username of the DX Core server of the publisher (default: "${config.dxUsername}")`);
1427
+ logger_1.logger.help(` --dxPassword <value> Password of the DX Core server of the publisher (default: "${MaskData.maskPassword(config.dxPassword)}")`);
1428
+ logger_1.logger.help(` --damAPIPort <value> Port number of the DAM API server of the publisher (default: "${config.damAPIPort
1437
1429
  ? config.damAPIPort.toString() : config.damAPIPort}")`);
1438
- logger_1.logger.help(` -ringAPIPort, --ringAPIPort <value> Port number of the DX Core API server of the publisher (default: "${config.ringAPIPort
1430
+ logger_1.logger.help(` --ringAPIPort <value> Port number of the DX Core API server of the publisher (default: "${config.ringAPIPort
1439
1431
  ? config.ringAPIPort.toString() : config.ringAPIPort}")`);
1440
- logger_1.logger.help(` -damAPIVersion, --damAPIVersion <value> API Version number of DAM API server of the publisher \
1432
+ logger_1.logger.help(` --damAPIVersion <value> API Version number of DAM API server of the publisher \
1441
1433
  (default: "${config.damAPIVersion ? config.damAPIVersion.toString() : config.damAPIVersion}")`);
1442
- logger_1.logger.help(` -ringAPIVersion, --ringAPIVersion <value> API Version number of DX Core API server of the publisher \
1434
+ logger_1.logger.help(` --ringAPIVersion <value> API Version number of DX Core API server of the publisher \
1443
1435
  (default: "${config.ringAPIVersion ? config.ringAPIVersion.toString() : config.ringAPIVersion}")`);
1444
1436
  if (subCommand === constants_1.SUB_COMMANDS.DAM_REGISTER_SUBSCRIBER) {
1445
- logger_1.logger.help(` -targetHostname, --targetHostname <value> Host name of the target environment of the subscriber (default: "${config.targetHostname}")`);
1437
+ logger_1.logger.help(` --targetHostname <value> Host name of the target environment of the subscriber (default: "${config.targetHostname}")`);
1446
1438
  logger_1.logger.help(' -interval,--interval <value> Interval between two sync cycles.The unit of interval is in minutes.Default value of interval is 2 minutes.');
1447
1439
  }
1448
1440
  if (subCommand === constants_1.SUB_COMMANDS.DAM_DEREGISTER_SUBSCRIBER) {
1449
1441
  logger_1.logger.help(' -subscriberId, --subscriberId <value> Subscriber id of the target environment of the subscriber');
1450
1442
  }
1451
1443
  if (subCommand === constants_1.SUB_COMMANDS.DAM_TRIGGER_STAGING) {
1452
- logger_1.logger.help(` -targetHostname, --targetHostname <value> Host name of the target environment of the subscriber (default: "${config.targetHostname}")`);
1444
+ logger_1.logger.help(` --targetHostname <value> Host name of the target environment of the subscriber (default: "${config.targetHostname}")`);
1453
1445
  }
1454
1446
  if (subCommand === constants_1.SUB_COMMANDS.DAM_GET_STAGING_MISMATCH_REPORT) {
1455
1447
  logger_1.logger.help(` -ltpaTokenRefreshTime, --ltpaTokenRefreshTime <value> LTPA Token Refresh time in minutes (default: ${constants_2.LTPA_TOKEN_REFRESH_TIME})`);
@@ -1492,208 +1484,208 @@ for any Kubernetes Environment default port is 443 (default: "${config.dxPort ?
1492
1484
  logger_1.logger.help(` Required (sub)command ${constants_1.SUB_COMMANDS.DAM_FIND_STAGING_MISMATCH}: use "${constants_1.COMMANDS.MANAGE_DAM_STAGING} ${constants_1.SUB_COMMANDS.DAM_FIND_STAGING_MISMATCH} -h" for more details`);
1493
1485
  logger_1.logger.help(` Required (sub)command ${constants_1.SUB_COMMANDS.DAM_START_STAGING_RESYNC}: use "${constants_1.COMMANDS.MANAGE_DAM_STAGING} ${constants_1.SUB_COMMANDS.DAM_START_STAGING_RESYNC} -h" for more details`);
1494
1486
  logger_1.logger.help(` Required (sub)command ${constants_1.SUB_COMMANDS.DAM_DELETE_STAGING_MISMATCH}: use "${constants_1.COMMANDS.MANAGE_DAM_STAGING} ${constants_1.SUB_COMMANDS.DAM_DELETE_STAGING_MISMATCH} -h" for more details`);
1495
- if (utils_1.isFeatureEnabled(constants_1.FeaturesEnum.DAM_GET_STAGING_MISMATCH_REPORT)) {
1487
+ if ((0, utils_1.isFeatureEnabled)(constants_1.FeaturesEnum.DAM_GET_STAGING_MISMATCH_REPORT)) {
1496
1488
  logger_1.logger.help(` Required (sub)command ${constants_1.SUB_COMMANDS.DAM_GET_STAGING_MISMATCH_REPORT}: use "${constants_1.COMMANDS.MANAGE_DAM_STAGING} ${constants_1.SUB_COMMANDS.DAM_GET_STAGING_MISMATCH_REPORT} -h" for more details`);
1497
1489
  }
1498
1490
  }
1499
1491
  else {
1500
1492
  logger_1.logger.debug('Manage DAM staging started');
1501
1493
  try {
1502
- commands_1.configureCommand(subCommand);
1503
- commands = utils_1.unmaskPasswords(commands);
1504
- validateOptions_1.validateOptions(commands);
1494
+ (0, commands_1.configureCommand)(subCommand);
1495
+ commands = (0, utils_1.unmaskPasswords)(commands);
1496
+ (0, validateOptions_1.validateOptions)(commands);
1505
1497
  }
1506
1498
  catch (error) {
1507
1499
  logger_1.logger.error(error.message);
1508
- yield utils_1.flushLogAndExitProcess(false, true);
1500
+ await (0, utils_1.flushLogAndExitProcess)(false, true);
1509
1501
  }
1510
1502
  }
1511
1503
  if (subCommand === constants_1.SUB_COMMANDS.DAM_DEREGISTER_SUBSCRIBER) {
1512
1504
  try {
1513
1505
  logger_1.logger.debug('DAM subscriber de registration started');
1514
1506
  const subscriberUnRegistration = new subscriberDeRegistration_1.SubscriberDeRegistration();
1515
- const responseCode = yield subscriberUnRegistration.invoke(commands);
1507
+ const responseCode = await subscriberUnRegistration.invoke(commands);
1516
1508
  logger_1.logger.debug('Subscriber deregister completed');
1517
- yield utils_1.flushLogAndExitProcess(responseCode);
1509
+ await (0, utils_1.flushLogAndExitProcess)(responseCode);
1518
1510
  }
1519
1511
  catch (error) {
1520
1512
  logger_1.logger.error('Exception in execution deregister: %o', error);
1521
- yield utils_1.flushLogAndExitProcess(false);
1513
+ await (0, utils_1.flushLogAndExitProcess)(false);
1522
1514
  }
1523
1515
  }
1524
1516
  else if (subCommand === constants_1.SUB_COMMANDS.DAM_TRIGGER_STAGING) {
1525
1517
  try {
1526
1518
  logger_1.logger.debug('DAM staging sync triggered');
1527
1519
  const triggerManualStaging = new triggerDAMStaging_1.TriggerStaging();
1528
- const responseCode = yield triggerManualStaging.invoke(commands);
1520
+ const responseCode = await triggerManualStaging.invoke(commands);
1529
1521
  logger_1.logger.debug('DAM staging sync completed');
1530
- yield utils_1.flushLogAndExitProcess(responseCode);
1522
+ await (0, utils_1.flushLogAndExitProcess)(responseCode);
1531
1523
  }
1532
1524
  catch (error) {
1533
1525
  logger_1.logger.error('Exception in execution trigger staging: %o', error);
1534
- yield utils_1.flushLogAndExitProcess(false);
1526
+ await (0, utils_1.flushLogAndExitProcess)(false);
1535
1527
  }
1536
1528
  }
1537
1529
  else if (subCommand === constants_1.SUB_COMMANDS.DAM_REGISTER_SUBSCRIBER) {
1538
1530
  try {
1539
1531
  logger_1.logger.debug('DAM subscriber registration started');
1540
1532
  const subscriberRegistration = new subscriberRegistration_1.SubscriberRegistration();
1541
- commands = utils_1.getTrimmedArguments(commands);
1542
- const responseCode = yield subscriberRegistration.invoke(commands);
1533
+ commands = (0, utils_1.getTrimmedArguments)(commands);
1534
+ const responseCode = await subscriberRegistration.invoke(commands);
1543
1535
  logger_1.logger.debug('Subscriber Registration completed');
1544
- yield utils_1.flushLogAndExitProcess(responseCode);
1536
+ await (0, utils_1.flushLogAndExitProcess)(responseCode);
1545
1537
  }
1546
1538
  catch (error) {
1547
1539
  logger_1.logger.debug('Exception in execution subscriber registration: %o', error);
1548
- yield utils_1.flushLogAndExitProcess(false);
1540
+ await (0, utils_1.flushLogAndExitProcess)(false);
1549
1541
  }
1550
1542
  }
1551
1543
  else if (subCommand === constants_1.SUB_COMMANDS.DAM_GET_ALL_SUBSCRIBERS) {
1552
1544
  try {
1553
1545
  logger_1.logger.debug('DAM get all subscribers execution started');
1554
1546
  const subscriberDetails = new subscriberDetails_1.SubscriberDetails();
1555
- const responseCode = yield subscriberDetails.invoke(commands);
1547
+ const responseCode = await subscriberDetails.invoke(commands);
1556
1548
  logger_1.logger.debug('DAM get all subscribers command execution completed');
1557
- yield utils_1.flushLogAndExitProcess(responseCode);
1549
+ await (0, utils_1.flushLogAndExitProcess)(responseCode);
1558
1550
  }
1559
1551
  catch (error) {
1560
1552
  logger_1.logger.debug('Exception in execution get all subscribers command: %o', error);
1561
- yield utils_1.flushLogAndExitProcess(false);
1553
+ await (0, utils_1.flushLogAndExitProcess)(false);
1562
1554
  }
1563
1555
  }
1564
1556
  else if (subCommand === constants_1.SUB_COMMANDS.UPDATE_SECRETS) {
1565
1557
  try {
1566
1558
  logger_1.logger.debug('DAM update secrets execution started');
1567
1559
  const updateSecrets = new updateSecrets_1.UpdateSecrets();
1568
- commands = utils_1.getTrimmedArguments(commands);
1569
- const responseCode = yield updateSecrets.invoke(commands);
1560
+ commands = (0, utils_1.getTrimmedArguments)(commands);
1561
+ const responseCode = await updateSecrets.invoke(commands);
1570
1562
  logger_1.logger.debug('DAM update secrets command execution completed');
1571
- yield utils_1.flushLogAndExitProcess(responseCode);
1563
+ await (0, utils_1.flushLogAndExitProcess)(responseCode);
1572
1564
  }
1573
1565
  catch (error) {
1574
1566
  logger_1.logger.debug('Exception in execution update secrets command: %o', error);
1575
- yield utils_1.flushLogAndExitProcess(false);
1567
+ await (0, utils_1.flushLogAndExitProcess)(false);
1576
1568
  }
1577
1569
  }
1578
- else if (subCommand === constants_1.SUB_COMMANDS.DAM_GET_STAGING_MISMATCH_REPORT && utils_1.isFeatureEnabled(constants_1.FeaturesEnum.DAM_GET_STAGING_MISMATCH_REPORT)) {
1570
+ else if (subCommand === constants_1.SUB_COMMANDS.DAM_GET_STAGING_MISMATCH_REPORT && (0, utils_1.isFeatureEnabled)(constants_1.FeaturesEnum.DAM_GET_STAGING_MISMATCH_REPORT)) {
1579
1571
  try {
1580
1572
  logger_1.logger.debug('DAM Get staging mismatch report started');
1581
1573
  const stagingMismatchReport = new stagingMismatchReport_1.StagingMismatchReport();
1582
- const responseCode = yield stagingMismatchReport.invoke(commands);
1574
+ const responseCode = await stagingMismatchReport.invoke(commands);
1583
1575
  logger_1.logger.debug('DAM Get staging mismatch report command execution completed');
1584
- yield utils_1.flushLogAndExitProcess(responseCode);
1576
+ await (0, utils_1.flushLogAndExitProcess)(responseCode);
1585
1577
  }
1586
1578
  catch (error) {
1587
1579
  logger_1.logger.debug('Exception in execution get staging mismatch report command: %o', error);
1588
- yield utils_1.flushLogAndExitProcess(false);
1580
+ await (0, utils_1.flushLogAndExitProcess)(false);
1589
1581
  }
1590
1582
  }
1591
1583
  else if (subCommand === constants_1.SUB_COMMANDS.DAM_FIND_STAGING_MISMATCH) {
1592
1584
  try {
1593
1585
  logger_1.logger.debug('DAM find staging mismatch started');
1594
1586
  const findStagingMismatch = new findDAMStagingMismatch_1.FindStagingMismatch();
1595
- const responseCode = yield findStagingMismatch.invoke(commands);
1596
- yield utils_1.flushLogAndExitProcess(responseCode);
1587
+ const responseCode = await findStagingMismatch.invoke(commands);
1588
+ await (0, utils_1.flushLogAndExitProcess)(responseCode);
1597
1589
  }
1598
1590
  catch (error) {
1599
1591
  logger_1.logger.error('Exception in execution find staging mismatch log: %o', error);
1600
- yield utils_1.flushLogAndExitProcess(false);
1592
+ await (0, utils_1.flushLogAndExitProcess)(false);
1601
1593
  }
1602
1594
  }
1603
1595
  else if (subCommand === constants_1.SUB_COMMANDS.DAM_START_STAGING_RESYNC) {
1604
1596
  try {
1605
1597
  logger_1.logger.debug('DAM staging resync started');
1606
1598
  const startStagingResync = new stagingResync_1.StagingResync();
1607
- const responseCode = yield startStagingResync.invoke(commands);
1599
+ const responseCode = await startStagingResync.invoke(commands);
1608
1600
  logger_1.logger.debug('DAM staging resync completed');
1609
- yield utils_1.flushLogAndExitProcess(responseCode);
1601
+ await (0, utils_1.flushLogAndExitProcess)(responseCode);
1610
1602
  }
1611
1603
  catch (error) {
1612
1604
  logger_1.logger.error('Exception in execution staging resync: %o', error);
1613
- yield utils_1.flushLogAndExitProcess(false);
1605
+ await (0, utils_1.flushLogAndExitProcess)(false);
1614
1606
  }
1615
1607
  }
1616
1608
  else if (subCommand === constants_1.SUB_COMMANDS.DAM_DELETE_STAGING_MISMATCH) {
1617
1609
  try {
1618
1610
  logger_1.logger.debug('DAM delete staging mismatch started');
1619
1611
  const DeleteStagingMismatches = new deleteDAMStagingMismatch_1.DeleteStagingMismatch();
1620
- const responseCode = yield DeleteStagingMismatches.invoke(commands);
1612
+ const responseCode = await DeleteStagingMismatches.invoke(commands);
1621
1613
  logger_1.logger.debug('DAM delete staging mismatch completed');
1622
- yield utils_1.flushLogAndExitProcess(responseCode);
1614
+ await (0, utils_1.flushLogAndExitProcess)(responseCode);
1623
1615
  }
1624
1616
  catch (error) {
1625
1617
  logger_1.logger.error('Exception in execution delete staging mismatch: %o', error);
1626
- yield utils_1.flushLogAndExitProcess(false);
1618
+ await (0, utils_1.flushLogAndExitProcess)(false);
1627
1619
  }
1628
1620
  }
1629
- }));
1621
+ });
1630
1622
  program
1631
1623
  .command(constants_1.COMMANDS.CREATE_CREDENTIAL_VAULT)
1632
- .requiredOption('-dxProtocol, --dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
1633
- .requiredOption('-hostname, --hostname <value>', 'Host name of the DX Core server', config.hostname)
1634
- .requiredOption('-dxPort, --dxPort <value>', 'Port number of the DX Core server, for any Kubernetes Environment default port is 443', config.dxPort ? config.dxPort.toString() : config.dxPort)
1635
- .requiredOption('-dxUsername, --dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
1636
- .requiredOption('-dxPassword, --dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
1637
- .requiredOption('-xmlConfigPath, --xmlConfigPath <value>', 'Path to DX configuration endpoint', config.xmlConfigPath)
1638
- .requiredOption('-vaultUsername, --vaultUsername <value>', 'The name of the shared vaultUsername', config.vaultUsername)
1639
- .requiredOption('-vaultPassword , --vaultPassword <value>', 'The password for the shared userid', MaskData.maskPassword(config.vaultPassword))
1640
- .requiredOption('-credentialSlotName, --credentialSlotName <value>', 'The name of a credential vault slot')
1641
- .option('-vaultUserGroup , --vaultUserGroup <value>', 'Credential vault portal UserGroup')
1642
- .option('-vaultSegmentName, --vaultSegmentName <value>', 'The name of a new vault segment ')
1643
- .option('-vaultDescription, --vaultDescription <value>', 'Description for the credential segment ')
1624
+ .requiredOption('--dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
1625
+ .requiredOption('--hostname <value>', 'Host name of the DX Core server', config.hostname)
1626
+ .requiredOption('--dxPort <value>', 'Port number of the DX Core server, for any Kubernetes Environment default port is 443', config.dxPort ? config.dxPort.toString() : config.dxPort)
1627
+ .requiredOption('--dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
1628
+ .requiredOption('--dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
1629
+ .requiredOption('--xmlConfigPath <value>', 'Path to DX configuration endpoint', config.xmlConfigPath)
1630
+ .requiredOption('--vaultUsername <value>', 'The name of the shared vaultUsername', config.vaultUsername)
1631
+ .requiredOption('--vaultPassword <value>', 'The password for the shared userid', MaskData.maskPassword(config.vaultPassword))
1632
+ .requiredOption('--credentialSlotName <value>', 'The name of a credential vault slot')
1633
+ .option('--vaultUserGroup <value>', 'Credential vault portal UserGroup')
1634
+ .option('--vaultSegmentName <value>', 'The name of a new vault segment ')
1635
+ .option('--vaultDescription <value>', 'Description for the credential segment ')
1644
1636
  .description('- Creates credential vault in DX Core server before registering a subscriber')
1645
- .action((cmdOptions) => __awaiter(void 0, void 0, void 0, function* () {
1646
- commands_1.configureCommand(constants_1.COMMANDS.CREATE_CREDENTIAL_VAULT);
1637
+ .action(async (cmdOptions) => {
1638
+ (0, commands_1.configureCommand)(constants_1.COMMANDS.CREATE_CREDENTIAL_VAULT);
1647
1639
  logger_1.logger.debug('Creates credential vault slot in the DX Core server before registering a subscriber');
1648
1640
  try {
1649
- cmdOptions = utils_1.unmaskPasswords(cmdOptions);
1650
- validateOptions_1.validateOptions(cmdOptions);
1641
+ cmdOptions = (0, utils_1.unmaskPasswords)(cmdOptions);
1642
+ (0, validateOptions_1.validateOptions)(cmdOptions);
1651
1643
  }
1652
1644
  catch (error) {
1653
1645
  logger_1.logger.error(error.message);
1654
- yield utils_1.flushLogAndExitProcess(false, true);
1646
+ await (0, utils_1.flushLogAndExitProcess)(false, true);
1655
1647
  }
1656
1648
  try {
1657
1649
  logger_1.logger.debug('Create credential vault execution started');
1658
1650
  const createCredentialVault = new createCredentialVault_1.CreateCredentialVault();
1659
- const responseCode = yield createCredentialVault.invoke(cmdOptions);
1651
+ const responseCode = await createCredentialVault.invoke(cmdOptions);
1660
1652
  logger_1.logger.debug('Response code from the invoke function: %s', responseCode);
1661
1653
  logger_1.logger.debug('Create credential vault execution completed');
1662
- yield utils_1.flushLogAndExitProcess(responseCode);
1654
+ await (0, utils_1.flushLogAndExitProcess)(responseCode);
1663
1655
  }
1664
1656
  catch (error) {
1665
1657
  logger_1.logger.debug('Exception in execution : %o', error);
1666
- yield utils_1.flushLogAndExitProcess(false);
1658
+ await (0, utils_1.flushLogAndExitProcess)(false);
1667
1659
  }
1668
- }));
1660
+ });
1669
1661
  program
1670
1662
  .command(`${constants_1.COMMANDS.DIFFERENTIAL_REPORT} [subCmd]`)
1671
- .option('-hostname, --hostname <value>', 'Host name of the DX core server', config.hostname)
1672
- .requiredOption('-dxConnectPort, --dxConnectPort <value>', 'Port number of the cw_profile', config.dxConnectPort ? config.dxConnectPort.toString() : config.dxConnectPort)
1673
- .requiredOption('-dxConnectUsername, --dxConnectUsername <value>', 'Username for the cw_profile', config.dxConnectUsername)
1674
- .requiredOption('-dxConnectPassword, --dxConnectPassword <value>', 'Password for the cw_profile', MaskData.maskPassword(config.dxConnectPassword))
1675
- .requiredOption('-dxProfileName, --dxProfileName <value>', 'Profile name in the DX core server ', config.dxProfileName)
1676
- .option('-targetHostname, --targetHostname <value>', 'Host name of the target DX core server', config.targetHostname)
1677
- .option('-targetDxConnectPort, --targetDxConnectPort <value>', 'Port number of the target server', config.targetDxConnectPort ? config.targetDxConnectPort.toString() : config.targetDxConnectPort)
1678
- .option('-targetDxConnectUsername, --targetDxConnectUsername <value>', 'Username for the target server', config.targetDxConnectUsername)
1679
- .option('-targetDxConnectPassword, --targetDxConnectPassword <value>', 'Password for the target server', MaskData.maskPassword(config.targetDxConnectPassword))
1680
- .option('-targetDxProfileName, --targetDxProfileName <value>', 'Profile name of the target DX core server ', config.targetDxProfileName)
1663
+ .option('--hostname <value>', 'Host name of the DX core server', config.hostname)
1664
+ .requiredOption('--dxConnectPort <value>', 'Port number of the cw_profile', config.dxConnectPort ? config.dxConnectPort.toString() : config.dxConnectPort)
1665
+ .requiredOption('--dxConnectUsername <value>', 'Username for the cw_profile', config.dxConnectUsername)
1666
+ .requiredOption('--dxConnectPassword <value>', 'Password for the cw_profile', MaskData.maskPassword(config.dxConnectPassword))
1667
+ .requiredOption('--dxProfileName <value>', 'Profile name in the DX core server ', config.dxProfileName)
1668
+ .option('--targetHostname <value>', 'Host name of the target DX core server', config.targetHostname)
1669
+ .option('--targetDxConnectPort <value>', 'Port number of the target server', config.targetDxConnectPort ? config.targetDxConnectPort.toString() : config.targetDxConnectPort)
1670
+ .option('--targetDxConnectUsername <value>', 'Username for the target server', config.targetDxConnectUsername)
1671
+ .option('--targetDxConnectPassword <value>', 'Password for the target server', MaskData.maskPassword(config.targetDxConnectPassword))
1672
+ .option('--targetDxProfileName <value>', 'Profile name of the target DX core server ', config.targetDxProfileName)
1681
1673
  .option('-h, --help')
1682
1674
  .description('- generates dx-core-configuration-reports')
1683
- .action((subCmd, cmdOptions) => __awaiter(void 0, void 0, void 0, function* () {
1684
- if ((subCmd === constants_1.SUB_COMMANDS.SUMMARY_REPORT || constants_1.SUB_COMMANDS.RESOURCE_REPORT) && (cmdOptions.parent.args[2] === constants_1.COMMANDS.H || cmdOptions.parent.args[2] === constants_1.COMMANDS.HELP)) {
1675
+ .action(async (subCmd, cmdOptions) => {
1676
+ if ((subCmd === constants_1.SUB_COMMANDS.SUMMARY_REPORT || constants_1.SUB_COMMANDS.RESOURCE_REPORT) && (process.argv.includes(constants_1.COMMANDS.H) || process.argv.includes(constants_1.COMMANDS.HELP))) {
1685
1677
  logger_1.logger.help(' Usage: dxclient dx-core-configuration-reports [options] [subCmd]\n');
1686
1678
  logger_1.logger.help(' - The dx-core-configuration-reports command shows the summary of the configurations of a single DX server or both source and target DX servers, which users can use to compare.\n');
1687
- logger_1.logger.help(` -hostname, --hostname <value> Host name of the DX core server(default: "${config.hostname}")`);
1688
- logger_1.logger.help(` -dxConnectPort, --dxConnectPort <value> Port number of the cw_profile (default: "${config.dxConnectPort}")`);
1689
- logger_1.logger.help(` -dxConnectUsername, --dxConnectUsername <value> Username for the cw_profile (default: "${config.dxConnectUsername}")`);
1690
- logger_1.logger.help(` -dxConnectPassword, --dxConnectPassword <value> Password for the cw_profile (default: "${MaskData.maskPassword(config.dxConnectPassword)}")`);
1679
+ logger_1.logger.help(` --hostname <value> Host name of the DX core server(default: "${config.hostname}")`);
1680
+ logger_1.logger.help(` --dxConnectPort <value> Port number of the cw_profile (default: "${config.dxConnectPort}")`);
1681
+ logger_1.logger.help(` --dxConnectUsername <value> Username for the cw_profile (default: "${config.dxConnectUsername}")`);
1682
+ logger_1.logger.help(` --dxConnectPassword <value> Password for the cw_profile (default: "${MaskData.maskPassword(config.dxConnectPassword)}")`);
1691
1683
  logger_1.logger.help(` -dxProfileName, --dxProfileName <value> Profile name in the DX core server (default: "${config.dxProfileName}")`);
1692
- logger_1.logger.help(` -targetHostname, --targetHostname <value> Host name of the target DX core server (default: "${config.targetHostname}")`);
1693
- logger_1.logger.help(` -targetDxConnectPort, --targetDxConnectPort <value> Port number of the target server (default: "${config.targetDxConnectPort}")`);
1694
- logger_1.logger.help(` -targetDxConnectUsername, --targetDxConnectUsername <value> Username for the target server (default: "${config.targetDxConnectUsername}")`);
1695
- logger_1.logger.help(` -targetDxConnectPassword, --targetDxConnectPassword <value> Password for the target server (default: "${MaskData.maskPassword(config.targetDxConnectPassword)}")`);
1696
- logger_1.logger.help(` -targetDxProfileName, --targetDxProfileName <value> Profile name of the target DX core server(default: "${config.targetDxProfileName}")`);
1684
+ logger_1.logger.help(` --targetHostname <value> Host name of the target DX core server (default: "${config.targetHostname}")`);
1685
+ logger_1.logger.help(` --targetDxConnectPort <value> Port number of the target server (default: "${config.targetDxConnectPort}")`);
1686
+ logger_1.logger.help(` --targetDxConnectUsername <value> Username for the target server (default: "${config.targetDxConnectUsername}")`);
1687
+ logger_1.logger.help(` --targetDxConnectPassword <value> Password for the target server (default: "${MaskData.maskPassword(config.targetDxConnectPassword)}")`);
1688
+ logger_1.logger.help(` --targetDxProfileName <value> Profile name of the target DX core server(default: "${config.targetDxProfileName}")`);
1697
1689
  logger_1.logger.help(' -h, --help display help for command');
1698
1690
  process.exit(1);
1699
1691
  }
@@ -1701,122 +1693,122 @@ program
1701
1693
  logger_1.logger.help(' Required (sub)command summary-report: use "dx-core-configuration-reports summary-report -h" for more details');
1702
1694
  process.exit(1);
1703
1695
  }
1704
- commands_1.configureCommand(subCmd);
1696
+ (0, commands_1.configureCommand)(subCmd);
1705
1697
  logger_1.logger.debug('Differential report execution started');
1706
1698
  try {
1707
- cmdOptions = utils_1.unmaskPasswords(cmdOptions);
1708
- validateOptions_1.validateOptionsInConfigReports(cmdOptions);
1699
+ cmdOptions = (0, utils_1.unmaskPasswords)(cmdOptions);
1700
+ (0, validateOptions_1.validateOptionsInConfigReports)(cmdOptions);
1709
1701
  }
1710
1702
  catch (error) {
1711
1703
  logger_1.logger.error(error.message);
1712
- yield utils_1.flushLogAndExitProcess(false, true);
1704
+ await (0, utils_1.flushLogAndExitProcess)(false, true);
1713
1705
  }
1714
1706
  try {
1715
1707
  const differentialReport = new differentialReport_1.DifferentialReport();
1716
- const responseCode = yield differentialReport.invoke(cmdOptions);
1708
+ const responseCode = await differentialReport.invoke(cmdOptions);
1717
1709
  logger_1.logger.debug('Response code from the invoke function: %s', responseCode);
1718
1710
  logger_1.logger.debug('Differential report execution completed');
1719
- yield utils_1.flushLogAndExitProcess(responseCode);
1711
+ await (0, utils_1.flushLogAndExitProcess)(responseCode);
1720
1712
  }
1721
1713
  catch (error) {
1722
1714
  logger_1.logger.debug('Exception in execution : %o', error);
1723
- yield utils_1.flushLogAndExitProcess(false);
1715
+ await (0, utils_1.flushLogAndExitProcess)(false);
1724
1716
  }
1725
- }))
1717
+ })
1726
1718
  .helpOption(false);
1727
1719
  program
1728
1720
  .command(constants_1.COMMANDS.WCM_LIBRARY_EXPORT)
1729
- .option('-hostname, --hostname <value>', 'Host name of the DX Core server', config.hostname)
1730
- .requiredOption('-dxUsername, --dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
1731
- .requiredOption('-dxPassword, --dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
1732
- .requiredOption('-dxConnectUsername, --dxConnectUsername <value>', 'Username for the cw_profile', config.dxConnectUsername)
1733
- .requiredOption('-dxConnectPassword, --dxConnectPassword <value>', 'Password for the cw_profile', MaskData.maskPassword(config.dxConnectPassword))
1734
- .requiredOption('-dxConnectPort, --dxConnectPort <value>', 'Port number of the cw_profile', config.dxConnectPort ? config.dxConnectPort.toString() : config.dxConnectPort)
1735
- .requiredOption('-dxWASUsername, --dxWASUsername <value>', 'Username of the DX WAS server', config.dxWASUsername)
1736
- .requiredOption('-dxWASPassword, --dxWASPassword <value>', 'Password of the DX WAS server', MaskData.maskPassword(config.dxWASPassword))
1737
- .requiredOption('-dxProfileName, --dxProfileName <value>', 'Profile name in the DX core server ', config.dxProfileName)
1738
- .option('-librariesName, --librariesName <value>', 'Name of the wcm library')
1739
- .option('-exportAllLibraries, --exportAllLibraries <value>', 'Enable this parameter if you export all wcm library')
1740
- .option('-virtualPortalContext,--virtualPortalContext <value>', 'Context of the virtual portal from which need to export the WCM Library', config.virtualPortalContext)
1721
+ .option('--hostname <value>', 'Host name of the DX Core server', config.hostname)
1722
+ .requiredOption('--dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
1723
+ .requiredOption('--dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
1724
+ .requiredOption('--dxConnectUsername <value>', 'Username for the cw_profile', config.dxConnectUsername)
1725
+ .requiredOption('--dxConnectPassword <value>', 'Password for the cw_profile', MaskData.maskPassword(config.dxConnectPassword))
1726
+ .requiredOption('--dxConnectPort <value>', 'Port number of the cw_profile', config.dxConnectPort ? config.dxConnectPort.toString() : config.dxConnectPort)
1727
+ .requiredOption('--dxWASUsername <value>', 'Username of the DX WAS server', config.dxWASUsername)
1728
+ .requiredOption('--dxWASPassword <value>', 'Password of the DX WAS server', MaskData.maskPassword(config.dxWASPassword))
1729
+ .requiredOption('--dxProfileName <value>', 'Profile name in the DX core server ', config.dxProfileName)
1730
+ .option('--librariesName <value>', 'Name of the wcm library')
1731
+ .option('--exportAllLibraries <value>', 'Enable this parameter if you export all wcm library')
1732
+ .option('--virtualPortalContext <value>', 'Context of the virtual portal from which need to export the WCM Library', config.virtualPortalContext)
1741
1733
  .description('- Exports single, multiple or all WCM libraries from the DX Core server')
1742
- .action((cmdOptions) => __awaiter(void 0, void 0, void 0, function* () {
1743
- commands_1.configureCommand(constants_1.COMMANDS.WCM_LIBRARY_EXPORT);
1734
+ .action(async (cmdOptions) => {
1735
+ (0, commands_1.configureCommand)(constants_1.COMMANDS.WCM_LIBRARY_EXPORT);
1744
1736
  logger_1.logger.debug('export of the wcm libraries execution started');
1745
1737
  try {
1746
- cmdOptions = utils_1.unmaskPasswords(cmdOptions);
1747
- validateOptions_1.validateOptions(cmdOptions);
1738
+ cmdOptions = (0, utils_1.unmaskPasswords)(cmdOptions);
1739
+ (0, validateOptions_1.validateOptions)(cmdOptions);
1748
1740
  }
1749
1741
  catch (error) {
1750
1742
  logger_1.logger.error(error.message);
1751
- yield utils_1.flushLogAndExitProcess(false, true);
1743
+ await (0, utils_1.flushLogAndExitProcess)(false, true);
1752
1744
  }
1753
1745
  const exportWCMLibraryObj = new exportWCMLibrary_1.ExportWCMLibrary();
1754
1746
  try {
1755
- const responseCode = yield exportWCMLibraryObj.invoke(cmdOptions);
1747
+ const responseCode = await exportWCMLibraryObj.invoke(cmdOptions);
1756
1748
  logger_1.logger.debug('Response code from the invoke function: %s', responseCode);
1757
1749
  logger_1.logger.debug('export wcm libraries execution successful');
1758
- yield utils_1.flushLogAndExitProcess(responseCode);
1750
+ await (0, utils_1.flushLogAndExitProcess)(responseCode);
1759
1751
  }
1760
1752
  catch (error) {
1761
1753
  logger_1.logger.debug('Exception in execution of export wcm libraries : %o', error);
1762
- yield utils_1.flushLogAndExitProcess(false);
1754
+ await (0, utils_1.flushLogAndExitProcess)(false);
1763
1755
  }
1764
- }));
1756
+ });
1765
1757
  program
1766
1758
  .command(constants_1.COMMANDS.WCM_LIBRARY_IMPORT)
1767
- .option('-hostname, --hostname <value>', 'Host name of the DX Core server', config.hostname)
1768
- .requiredOption('-dxUsername, --dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
1769
- .requiredOption('-dxPassword, --dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
1770
- .requiredOption('-dxConnectUsername, --dxConnectUsername <value>', 'Username for the cw_profile', config.dxConnectUsername)
1771
- .requiredOption('-dxConnectPassword, --dxConnectPassword <value>', 'Password for the cw_profile', MaskData.maskPassword(config.dxConnectPassword))
1772
- .requiredOption('-dxConnectPort, --dxConnectPort <value>', 'Port number of the cw_profile', config.dxConnectPort ? config.dxConnectPort.toString() : config.dxConnectPort)
1773
- .requiredOption('-dxWASUsername, --dxWASUsername <value>', 'Username of the DX WAS server', config.dxWASUsername)
1774
- .requiredOption('-dxWASPassword, --dxWASPassword <value>', 'Password of the DX WAS server', MaskData.maskPassword(config.dxWASPassword))
1775
- .requiredOption('-dxProfileName, --dxProfileName <value>', 'Profile name in the DX core server ', config.dxProfileName)
1776
- .option('-libFilePath, --libFilePath <value>', 'Path to the file containing the wcm libraries to be imported')
1777
- .option('-virtualPortalContext,--virtualPortalContext <value>', 'Context of the virtual portal to which need to import the WCM Library', config.virtualPortalContext)
1759
+ .option('--hostname <value>', 'Host name of the DX Core server', config.hostname)
1760
+ .requiredOption('--dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
1761
+ .requiredOption('--dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
1762
+ .requiredOption('--dxConnectUsername <value>', 'Username for the cw_profile', config.dxConnectUsername)
1763
+ .requiredOption('--dxConnectPassword <value>', 'Password for the cw_profile', MaskData.maskPassword(config.dxConnectPassword))
1764
+ .requiredOption('--dxConnectPort <value>', 'Port number of the cw_profile', config.dxConnectPort ? config.dxConnectPort.toString() : config.dxConnectPort)
1765
+ .requiredOption('--dxWASUsername <value>', 'Username of the DX WAS server', config.dxWASUsername)
1766
+ .requiredOption('--dxWASPassword <value>', 'Password of the DX WAS server', MaskData.maskPassword(config.dxWASPassword))
1767
+ .requiredOption('--dxProfileName <value>', 'Profile name in the DX core server ', config.dxProfileName)
1768
+ .option('--libFilePath <value>', 'Path to the file containing the wcm libraries to be imported')
1769
+ .option('--virtualPortalContext <value>', 'Context of the virtual portal to which need to import the WCM Library', config.virtualPortalContext)
1778
1770
  .description('- Imports single or multiple WCM libraries into the DX Core server')
1779
- .action((cmdOptions) => __awaiter(void 0, void 0, void 0, function* () {
1780
- commands_1.configureCommand(constants_1.COMMANDS.WCM_LIBRARY_IMPORT);
1771
+ .action(async (cmdOptions) => {
1772
+ (0, commands_1.configureCommand)(constants_1.COMMANDS.WCM_LIBRARY_IMPORT);
1781
1773
  logger_1.logger.debug('import of the wcm libraries execution started');
1782
1774
  try {
1783
- cmdOptions = utils_1.unmaskPasswords(cmdOptions);
1784
- validateOptions_1.validateOptions(cmdOptions);
1775
+ cmdOptions = (0, utils_1.unmaskPasswords)(cmdOptions);
1776
+ (0, validateOptions_1.validateOptions)(cmdOptions);
1785
1777
  }
1786
1778
  catch (error) {
1787
1779
  logger_1.logger.error(error.message);
1788
- yield utils_1.flushLogAndExitProcess(false, true);
1780
+ await (0, utils_1.flushLogAndExitProcess)(false, true);
1789
1781
  }
1790
1782
  const importWCMLibraryObj = new importWCMLibrary_1.ImportWCMLibrary();
1791
1783
  try {
1792
- const responseCode = yield importWCMLibraryObj.invoke(cmdOptions);
1784
+ const responseCode = await importWCMLibraryObj.invoke(cmdOptions);
1793
1785
  logger_1.logger.debug('Response code from the invoke function: %s', responseCode);
1794
1786
  logger_1.logger.debug('import wcm libraries execution successful');
1795
- yield utils_1.flushLogAndExitProcess(responseCode);
1787
+ await (0, utils_1.flushLogAndExitProcess)(responseCode);
1796
1788
  }
1797
1789
  catch (error) {
1798
1790
  logger_1.logger.debug('Exception in execution of export wcm libraries : %o', error);
1799
- yield utils_1.flushLogAndExitProcess(false);
1791
+ await (0, utils_1.flushLogAndExitProcess)(false);
1800
1792
  }
1801
- }));
1793
+ });
1802
1794
  program
1803
1795
  .command(`${constants_1.COMMANDS.MANAGE_DAM_ASSETS} [subCommand]`)
1804
- .requiredOption('-dxProtocol, --dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
1805
- .requiredOption('-hostname, --hostname <value>', 'Host name of the DX Core server', config.hostname)
1806
- .requiredOption('-dxPort, --dxPort <value>', 'Port number of the DX Core server, for any Kubernetes Environment default port is 443', config.dxPort ? config.dxPort.toString() : config.dxPort)
1807
- .requiredOption('-dxUsername, --dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
1808
- .requiredOption('-dxPassword, --dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
1809
- .requiredOption('-damAPIPort, --damAPIPort <value>', 'Port number of the DAM server, for any Kubernetes Environment default port is 443', config.damAPIPort ? config.damAPIPort.toString() : config.damAPIPort)
1810
- .requiredOption('-ringAPIPort, --ringAPIPort <value>', 'Port number of the DX Core API server, for any Kubernetes Environment default port is 443', config.ringAPIPort ? config.ringAPIPort.toString() : config.ringAPIPort)
1811
- .option('-exportPath, --exportPath <value>', 'Location of the file path to export')
1812
- .option('-ltpaTokenRefreshTime, --ltpaTokenRefreshTime <value>', 'LTPA Token refresh time in minutes', constants_2.LTPA_TOKEN_REFRESH_TIME)
1813
- .option('-exportBinary, --exportBinary <value>', 'Use true or false to include or exclude binary as part of export')
1814
- .option('-importBinary, --importBinary <value>', 'Use true or false to include or exclude binary as part of import')
1796
+ .requiredOption('--dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
1797
+ .requiredOption('--hostname <value>', 'Host name of the DX Core server', config.hostname)
1798
+ .requiredOption('--dxPort <value>', 'Port number of the DX Core server, for any Kubernetes Environment default port is 443', config.dxPort ? config.dxPort.toString() : config.dxPort)
1799
+ .requiredOption('--dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
1800
+ .requiredOption('--dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
1801
+ .requiredOption('--damAPIPort <value>', 'Port number of the DAM server, for any Kubernetes Environment default port is 443', config.damAPIPort ? config.damAPIPort.toString() : config.damAPIPort)
1802
+ .requiredOption('--ringAPIPort <value>', 'Port number of the DX Core API server, for any Kubernetes Environment default port is 443', config.ringAPIPort ? config.ringAPIPort.toString() : config.ringAPIPort)
1803
+ .option('--exportPath <value>', 'Location of the file path to export')
1804
+ .option('--ltpaTokenRefreshTime <value>', 'LTPA Token refresh time in minutes', constants_2.LTPA_TOKEN_REFRESH_TIME)
1805
+ .option('--exportBinary <value>', 'Use true or false to include or exclude binary as part of export')
1806
+ .option('--importBinary <value>', 'Use true or false to include or exclude binary as part of import')
1815
1807
  .option('-h, --help')
1816
1808
  .description('- Export or Import or Validate the DAM assets')
1817
- .action((subCommand, commands) => __awaiter(void 0, void 0, void 0, function* () {
1809
+ .action(async (subCommand, commands) => {
1818
1810
  if ((subCommand === constants_1.SUB_COMMANDS.DAM_ASSETS_EXPORT || subCommand === constants_1.SUB_COMMANDS.DAM_ASSETS_IMPORT)
1819
- && (commands.parent.args[2] === constants_1.COMMANDS.H || commands.parent.args[2] === constants_1.COMMANDS.HELP)) {
1811
+ && (process.argv.includes(constants_1.COMMANDS.H) || process.argv.includes(constants_1.COMMANDS.HELP))) {
1820
1812
  logger_1.logger.help('Usage: dxclient Manage DAM staging [options] [subCmd]');
1821
1813
  if (subCommand === constants_1.SUB_COMMANDS.DAM_ASSETS_EXPORT) {
1822
1814
  logger_1.logger.help(' -Export the DAM assets from DX.\n');
@@ -1824,32 +1816,32 @@ program
1824
1816
  else if (subCommand === constants_1.SUB_COMMANDS.DAM_ASSETS_IMPORT) {
1825
1817
  logger_1.logger.help(' -Import the DAM assets from DX.\n');
1826
1818
  }
1827
- logger_1.logger.help(` -dxProtocol, --dxProtocol <value> Protocol of the DX Core server (default: "${config.dxProtocol}")`);
1828
- logger_1.logger.help(` -hostname, --hostname <value> Host name of the DX Core server (default: "${config.hostname}")`);
1829
- logger_1.logger.help(` -dxPort, --dxPort <value> Port number of the DX Core server, for any Kubernetes Environment default is 443 \
1819
+ logger_1.logger.help(` --dxProtocol <value> Protocol of the DX Core server (default: "${config.dxProtocol}")`);
1820
+ logger_1.logger.help(` --hostname <value> Host name of the DX Core server (default: "${config.hostname}")`);
1821
+ logger_1.logger.help(` --dxPort <value> Port number of the DX Core server, for any Kubernetes Environment default is 443 \
1830
1822
  (default: "${config.dxPort ? config.dxPort.toString() : config.dxPort}")`);
1831
- logger_1.logger.help(` -dxUsername, --dxUsername <value> Username of the DX Core server (default: "${config.dxUsername}"`);
1832
- logger_1.logger.help(` -dxPassword, --dxPassword <value> Password of the DX Core server (default: "${MaskData.maskPassword(config.dxPassword)}")`);
1833
- logger_1.logger.help(` -damAPIPort, --damAPIPort <value> Port number of the DAM server, for any Kubernetes Environment default port is 443 \
1823
+ logger_1.logger.help(` --dxUsername <value> Username of the DX Core server (default: "${config.dxUsername}"`);
1824
+ logger_1.logger.help(` --dxPassword <value> Password of the DX Core server (default: "${MaskData.maskPassword(config.dxPassword)}")`);
1825
+ logger_1.logger.help(` --damAPIPort <value> Port number of the DAM server, for any Kubernetes Environment default port is 443 \
1834
1826
  (default: "${config.damAPIPort ? config.damAPIPort.toString() : config.damAPIPort}")`);
1835
- logger_1.logger.help(` -ringAPIPort, --ringAPIPort <value> Port number of the DX Core API server, for any Kubernetes Environment default is 443 \
1827
+ logger_1.logger.help(` --ringAPIPort <value> Port number of the DX Core API server, for any Kubernetes Environment default is 443 \
1836
1828
  (default: "${config.ringAPIPort ? config.ringAPIPort.toString() : config.ringAPIPort}")`);
1837
- logger_1.logger.help(` -ltpaTokenRefreshTime, --ltpaTokenRefreshTime <value> LTPA Token Refresh time in minutes (default: ${constants_2.LTPA_TOKEN_REFRESH_TIME})`);
1829
+ logger_1.logger.help(` --ltpaTokenRefreshTime <value> LTPA Token Refresh time in minutes (default: ${constants_2.LTPA_TOKEN_REFRESH_TIME})`);
1838
1830
  if (subCommand === constants_1.SUB_COMMANDS.DAM_ASSETS_EXPORT) {
1839
- logger_1.logger.help(' -exportPath, --exportPath <value> Location of the file path to export(default is store/outputFiles/dam-export-assets/)');
1840
- logger_1.logger.help(' -exportBinary, --exportBinary <value> Use true or false to include or exclude binary as part of export(default is true)');
1831
+ logger_1.logger.help(' --exportPath <value> Location of the file path to export(default is store/outputFiles/dam-export-assets/)');
1832
+ logger_1.logger.help(' --exportBinary <value> Use true or false to include or exclude binary as part of export(default is true)');
1841
1833
  }
1842
1834
  else if (subCommand === constants_1.SUB_COMMANDS.DAM_ASSETS_IMPORT) {
1843
- logger_1.logger.help(' -exportPath, --exportPath <value> Location of the file path to import(default is store/outputFiles/dam-export-assets/)');
1844
- logger_1.logger.help(' -importBinary, --importBinary <value> Use true or false to include or exclude binary as part of import(default is true)');
1835
+ logger_1.logger.help(' --exportPath <value> Location of the file path to import(default is store/outputFiles/dam-export-assets/)');
1836
+ logger_1.logger.help(' --importBinary <value> Use true or false to include or exclude binary as part of import(default is true)');
1845
1837
  }
1846
1838
  logger_1.logger.help(' -h, --help display help for command');
1847
1839
  process.exit(1);
1848
1840
  }
1849
- else if (subCommand === constants_1.SUB_COMMANDS.DAM_EXPORT_VALIDATE && (commands.parent.args[2] === constants_1.COMMANDS.H || commands.parent.args[2] === constants_1.COMMANDS.HELP)) {
1841
+ else if (subCommand === constants_1.SUB_COMMANDS.DAM_EXPORT_VALIDATE && (process.argv.includes(constants_1.COMMANDS.H) || process.argv.includes(constants_1.COMMANDS.HELP))) {
1850
1842
  logger_1.logger.help(' -Validate the exported DAM assets in your local.');
1851
- logger_1.logger.help(' -exportPath, --exportPath <value> Location of the exported file path(default is store/outputFiles/dam-export-assets/)');
1852
- logger_1.logger.help(' -importBinary, --importBinary <value> Use true or false to validate binary as part of validation(default is true)');
1843
+ logger_1.logger.help(' --exportPath <value> Location of the exported file path(default is store/outputFiles/dam-export-assets/)');
1844
+ logger_1.logger.help(' --importBinary <value> Use true or false to validate binary as part of validation(default is true)');
1853
1845
  logger_1.logger.help(' -h, --help display help for command');
1854
1846
  process.exit(1);
1855
1847
  }
@@ -1861,86 +1853,86 @@ program
1861
1853
  else {
1862
1854
  logger_1.logger.debug('Manage DAM assets started');
1863
1855
  try {
1864
- commands_1.configureCommand(subCommand);
1865
- commands = utils_1.unmaskPasswords(commands);
1866
- validateOptions_1.validateOptions(commands);
1856
+ (0, commands_1.configureCommand)(subCommand);
1857
+ commands = (0, utils_1.unmaskPasswords)(commands);
1858
+ (0, validateOptions_1.validateOptions)(commands);
1867
1859
  }
1868
1860
  catch (error) {
1869
1861
  logger_1.logger.error(error.message);
1870
- yield utils_1.flushLogAndExitProcess(false, true);
1862
+ await (0, utils_1.flushLogAndExitProcess)(false, true);
1871
1863
  }
1872
1864
  }
1873
1865
  if (subCommand === constants_1.SUB_COMMANDS.DAM_ASSETS_EXPORT) {
1874
1866
  try {
1875
1867
  logger_1.logger.debug('DAM assets export started');
1876
1868
  const exportAssets = new exportAssets_1.ExportAssets();
1877
- const responseCode = yield exportAssets.invoke(commands);
1869
+ const responseCode = await exportAssets.invoke(commands);
1878
1870
  logger_1.logger.debug('DAM assets export completed');
1879
- yield utils_1.flushLogAndExitProcess(responseCode);
1871
+ await (0, utils_1.flushLogAndExitProcess)(responseCode);
1880
1872
  }
1881
1873
  catch (error) {
1882
1874
  logger_1.logger.debug('Exception in execution of DAM assets export: %o', error);
1883
- yield utils_1.flushLogAndExitProcess(false);
1875
+ await (0, utils_1.flushLogAndExitProcess)(false);
1884
1876
  }
1885
1877
  }
1886
1878
  else if (subCommand === constants_1.SUB_COMMANDS.DAM_ASSETS_IMPORT) {
1887
1879
  try {
1888
1880
  logger_1.logger.debug('DAM assets validation started');
1889
1881
  const validateAssets = new validateAssets_1.ValidateAssets();
1890
- const validateResponseCode = yield validateAssets.invoke(commands);
1882
+ const validateResponseCode = await validateAssets.invoke(commands);
1891
1883
  if (!validateResponseCode) {
1892
1884
  logger_1.logger.debug('DAM assets validation failed');
1893
- yield utils_1.flushLogAndExitProcess(false);
1885
+ await (0, utils_1.flushLogAndExitProcess)(false);
1894
1886
  }
1895
1887
  logger_1.logger.debug('DAM assets validation completed');
1896
1888
  logger_1.logger.debug('DAM assets import started');
1897
1889
  const importAssets = new importAssets_1.ImportAssets();
1898
- const responseCode = yield importAssets.invoke(commands);
1890
+ const responseCode = await importAssets.invoke(commands);
1899
1891
  logger_1.logger.debug('DAM assets import completed');
1900
- yield utils_1.flushLogAndExitProcess(responseCode);
1892
+ await (0, utils_1.flushLogAndExitProcess)(responseCode);
1901
1893
  }
1902
1894
  catch (error) {
1903
1895
  logger_1.logger.debug('Exception in execution of DAM assets import: %o', error);
1904
- yield utils_1.flushLogAndExitProcess(false);
1896
+ await (0, utils_1.flushLogAndExitProcess)(false);
1905
1897
  }
1906
1898
  }
1907
1899
  else if (subCommand === constants_1.SUB_COMMANDS.DAM_EXPORT_VALIDATE) {
1908
1900
  try {
1909
1901
  logger_1.logger.debug('DAM assets validation started');
1910
1902
  const validateAssets = new validateAssets_1.ValidateAssets();
1911
- const responseCode = yield validateAssets.invoke(commands);
1903
+ const responseCode = await validateAssets.invoke(commands);
1912
1904
  logger_1.logger.debug('DAM assets validation completed');
1913
- yield utils_1.flushLogAndExitProcess(responseCode);
1905
+ await (0, utils_1.flushLogAndExitProcess)(responseCode);
1914
1906
  }
1915
1907
  catch (error) {
1916
1908
  logger_1.logger.debug('Exception in execution of DAM assets validation: %o', error);
1917
- yield utils_1.flushLogAndExitProcess(false);
1909
+ await (0, utils_1.flushLogAndExitProcess)(false);
1918
1910
  }
1919
1911
  }
1920
- }));
1921
- if (utils_1.isFeatureEnabled(constants_1.FeaturesEnum.LIVESYNC)) {
1912
+ });
1913
+ if ((0, utils_1.isFeatureEnabled)(constants_1.FeaturesEnum.LIVESYNC)) {
1922
1914
  program
1923
1915
  .command(`${constants_1.COMMANDS.LIVESYNC} [subCommand]`)
1924
- .requiredOption('-dxProtocol, --dxProtocol <value>', 'Protocol of the DX Server', config.dxProtocol)
1925
- .requiredOption('-hostname, --hostname <value>', 'Host name of the DX Server', config.hostname)
1926
- .requiredOption('-dxPort, --dxPort <value>', 'Port number of the DX Server, for any Kubernetes Environment default port is 443', config.dxPort ? config.dxPort.toString() : config.dxPort)
1927
- .requiredOption('-dxUsername, --dxUsername <value>', 'Username of the DX Core Server', config.dxUsername)
1928
- .requiredOption('-dxPassword, --dxPassword <value>', 'Password of the DX Core Server', MaskData.maskPassword(config.dxPassword))
1929
- .requiredOption('-contenthandlerPath,--contenthandlerPath <value>', 'Alternate path for the portal context root or the content handler servlet', config.contenthandlerPath)
1930
- .option('-themeName, --themeName <value>', 'Theme System Name (or Theme Title)')
1931
- .option('-themePath, --themePath <value>', 'Local path to the Theme folder')
1932
- .option('-wcmLibraryName, --wcmLibraryName <value>', 'WCM Design Library Name', config.wcmLibraryName)
1933
- .option('-wcmLibraryId, --wcmLibraryId <value>', 'UUID of the WCM Design Library', config.wcmLibraryId)
1934
- .option('-wcmLibraryPath, --wcmLibraryPath <value>', 'Local path to the Library folder', config.wcmLibraryPath)
1935
- .option('-wcmProjectName, --wcmProjectName <value>', 'Name of the WCM Project', config.wcmProjectName)
1936
- .option('-virtualPortalContext, --virtualPortalContext <value>', 'Context of the virtual portal of the DX Core server')
1937
- .option('-disablePrompt, --disablePrompt <value>', 'Disables the confirmation prompt for overwriting local and server files.', config.disablePrompt)
1916
+ .requiredOption('--dxProtocol <value>', 'Protocol of the DX Server', config.dxProtocol)
1917
+ .requiredOption('--hostname <value>', 'Host name of the DX Server', config.hostname)
1918
+ .requiredOption('--dxPort <value>', 'Port number of the DX Server, for any Kubernetes Environment default port is 443', config.dxPort ? config.dxPort.toString() : config.dxPort)
1919
+ .requiredOption('--dxUsername <value>', 'Username of the DX Core Server', config.dxUsername)
1920
+ .requiredOption('--dxPassword <value>', 'Password of the DX Core Server', MaskData.maskPassword(config.dxPassword))
1921
+ .requiredOption('--contenthandlerPath <value>', 'Alternate path for the portal context root or the content handler servlet', config.contenthandlerPath)
1922
+ .option('--themeName <value>', 'Theme System Name (or Theme Title)')
1923
+ .option('--themePath <value>', 'Local path to the Theme folder')
1924
+ .option('--wcmLibraryName <value>', 'WCM Design Library Name', config.wcmLibraryName)
1925
+ .option('--wcmLibraryId <value>', 'UUID of the WCM Design Library', config.wcmLibraryId)
1926
+ .option('--wcmLibraryPath <value>', 'Local path to the Library folder', config.wcmLibraryPath)
1927
+ .option('--wcmProjectName <value>', 'Name of the WCM Project', config.wcmProjectName)
1928
+ .option('--virtualPortalContext <value>', 'Context of the virtual portal of the DX Core server')
1929
+ .option('--disablePrompt <value>', 'Disables the confirmation prompt for overwriting local and server files.', config.disablePrompt)
1938
1930
  .option('-h, --help')
1939
1931
  .description('- Syncs theme files in WebDAV Server and Local')
1940
1932
  .helpOption(false)
1941
- .action((subCommand, cmdOptions) => __awaiter(void 0, void 0, void 0, function* () {
1933
+ .action(async (subCommand, cmdOptions) => {
1942
1934
  if ((constants_1.LIVESYNC_THEME_SUB_CMDS.includes(subCommand))
1943
- && (cmdOptions.parent.args[2] === constants_1.COMMANDS.H || cmdOptions.parent.args[2] === constants_1.COMMANDS.HELP)) {
1935
+ && (process.argv.includes(constants_1.COMMANDS.H) || process.argv.includes(constants_1.COMMANDS.HELP))) {
1944
1936
  if (subCommand === constants_1.SUB_COMMANDS.LIVESYNC_PULL_THEME) {
1945
1937
  logger_1.logger.help(`Usage: dxclient ${constants_1.COMMANDS.LIVESYNC} ${constants_1.SUB_COMMANDS.LIVESYNC_PULL_THEME} [options]\n`);
1946
1938
  logger_1.logger.help('- Pulls theme files from WebDAV Server into local themePath.\n');
@@ -1950,28 +1942,28 @@ if (utils_1.isFeatureEnabled(constants_1.FeaturesEnum.LIVESYNC)) {
1950
1942
  logger_1.logger.help('- Pushes theme files to WebDAV Server, then continuously watches and syncs succeeding local changes into WebDav Server. "Press (Ctrl + C) to stop watching."\n');
1951
1943
  }
1952
1944
  logger_1.logger.help('Options:\n');
1953
- logger_1.logger.help(` -dxProtocol, --dxProtocol <value> Protocol of the DX Core server (default: "${config.dxProtocol}")`);
1954
- logger_1.logger.help(` -hostname, --hostname <value> Host name of the DX Core server (default: "${config.hostname}")`);
1955
- logger_1.logger.help(` -dxPort, --dxPort <value> Port number of the DX Core server, for any Kubernetes Environment default is 443 \
1945
+ logger_1.logger.help(` --dxProtocol <value> Protocol of the DX Core server (default: "${config.dxProtocol}")`);
1946
+ logger_1.logger.help(` --hostname <value> Host name of the DX Core server (default: "${config.hostname}")`);
1947
+ logger_1.logger.help(` --dxPort <value> Port number of the DX Core server, for any Kubernetes Environment default is 443 \
1956
1948
  (default: "${config.dxPort ? config.dxPort.toString() : config.dxPort}")`);
1957
- logger_1.logger.help(` -dxUsername, --dxUsername <value> Username of the DX Core server (default: "${config.dxUsername}"`);
1958
- logger_1.logger.help(` -dxPassword, --dxPassword <value> Password of the DX Core server (default: "${MaskData.maskPassword(config.dxPassword)}")`);
1959
- logger_1.logger.help(` -contenthandlerPath,--contenthandlerPath <value> Alternate path for the portal context root or the content handler servlet \
1949
+ logger_1.logger.help(` --dxUsername <value> Username of the DX Core server (default: "${config.dxUsername}"`);
1950
+ logger_1.logger.help(` --dxPassword <value> Password of the DX Core server (default: "${MaskData.maskPassword(config.dxPassword)}")`);
1951
+ logger_1.logger.help(` --contenthandlerPath <value> Alternate path for the portal context root or the content handler servlet \
1960
1952
  (default: "${config.contenthandlerPath}")`);
1961
1953
  if (subCommand === constants_1.SUB_COMMANDS.LIVESYNC_PULL_THEME) {
1962
- logger_1.logger.help(' -themeName, --themeName <value> Theme System Name (or Theme Title)');
1963
- logger_1.logger.help(' -themePath, --themePath <value> Local path to the Theme folder');
1954
+ logger_1.logger.help(' --themeName <value> Theme System Name (or Theme Title)');
1955
+ logger_1.logger.help(' --themePath <value> Local path to the Theme folder');
1964
1956
  }
1965
1957
  else if (subCommand === constants_1.SUB_COMMANDS.LIVESYNC_PUSH_THEME) {
1966
- logger_1.logger.help(' -themeName, --themeName <value> Theme System Name (or Theme Title)');
1967
- logger_1.logger.help(' -themePath, --themePath <value> Local path to the Theme folder');
1958
+ logger_1.logger.help(' --themeName <value> Theme System Name (or Theme Title)');
1959
+ logger_1.logger.help(' --themePath <value> Local path to the Theme folder');
1968
1960
  }
1969
- logger_1.logger.help(' -disablePrompt, --disablePrompt <value> Disable the confirmation prompt for overwriting local and server files.');
1961
+ logger_1.logger.help(' --disablePrompt <value> Disable the confirmation prompt for overwriting local and server files.');
1970
1962
  logger_1.logger.help(' -h, --help Display help for command');
1971
1963
  process.exit(1);
1972
1964
  }
1973
- else if ((constants_1.LIVESYNC_WCM_DESIGN_LIBRARY_SUB_CMDS.includes(subCommand) && utils_1.isFeatureEnabled(constants_1.FeaturesEnum.LIVESYNC_WCM))
1974
- && (cmdOptions.parent.args[2] === constants_1.COMMANDS.H || cmdOptions.parent.args[2] === constants_1.COMMANDS.HELP)) {
1965
+ else if ((constants_1.LIVESYNC_WCM_DESIGN_LIBRARY_SUB_CMDS.includes(subCommand) && (0, utils_1.isFeatureEnabled)(constants_1.FeaturesEnum.LIVESYNC_WCM))
1966
+ && (process.argv.includes(constants_1.COMMANDS.H) || process.argv.includes(constants_1.COMMANDS.HELP))) {
1975
1967
  if (subCommand === constants_1.SUB_COMMANDS.LIVESYNC_PULL_WCM_DESIGN_LIBRARY) {
1976
1968
  logger_1.logger.help(`Usage: dxclient ${constants_1.COMMANDS.LIVESYNC} ${constants_1.SUB_COMMANDS.LIVESYNC_PULL_WCM_DESIGN_LIBRARY} [options]\n`);
1977
1969
  logger_1.logger.help('- Pulls wcm design library files from dx Server into local target libraryPath directory.\n');
@@ -1981,29 +1973,29 @@ if (utils_1.isFeatureEnabled(constants_1.FeaturesEnum.LIVESYNC)) {
1981
1973
  logger_1.logger.help('- Pushes updated wcm design library files to dx Server, then continuously watches and syncs succeeding local changes into dx Server. "Press (Ctrl + C) to stop watching."\n');
1982
1974
  }
1983
1975
  logger_1.logger.help('Options:\n');
1984
- logger_1.logger.help(` -dxProtocol, --dxProtocol <value> Protocol of the DX Core server (default: "${config.dxProtocol}")`);
1985
- logger_1.logger.help(` -hostname, --hostname <value> Host name of the DX Core server (default: "${config.hostname}")`);
1986
- logger_1.logger.help(` -dxPort, --dxPort <value> Port number of the DX Core server, for any Kubernetes Environment default is 443 \
1976
+ logger_1.logger.help(` --dxProtocol <value> Protocol of the DX Core server (default: "${config.dxProtocol}")`);
1977
+ logger_1.logger.help(` --hostname <value> Host name of the DX Core server (default: "${config.hostname}")`);
1978
+ logger_1.logger.help(` --dxPort <value> Port number of the DX Core server, for any Kubernetes Environment default is 443 \
1987
1979
  (default: "${config.dxPort ? config.dxPort.toString() : config.dxPort}")`);
1988
- logger_1.logger.help(` -dxUsername, --dxUsername <value> Username of the DX Core server (default: "${config.dxUsername}"`);
1989
- logger_1.logger.help(` -dxPassword, --dxPassword <value> Password of the DX Core server (default: "${MaskData.maskPassword(config.dxPassword)}")`);
1990
- logger_1.logger.help(` -contenthandlerPath,--contenthandlerPath <value> Alternate path for the portal context root or the content handler servlet \
1980
+ logger_1.logger.help(` --dxUsername <value> Username of the DX Core server (default: "${config.dxUsername}"`);
1981
+ logger_1.logger.help(` --dxPassword <value> Password of the DX Core server (default: "${MaskData.maskPassword(config.dxPassword)}")`);
1982
+ logger_1.logger.help(` --contenthandlerPath <value> Alternate path for the portal context root or the content handler servlet \
1991
1983
  (default: "${config.contenthandlerPath}")`);
1992
- logger_1.logger.help(' -wcmLibraryName, --wcmLibraryName <value> WCM Design Library Name');
1993
- logger_1.logger.help(' -wcmLibraryId, --wcmLibraryId <value> UUID of the WCM Design Library');
1994
- logger_1.logger.help(' -wcmLibraryPath, --wcmLibraryPath <value> Local path to the Library folder');
1995
- logger_1.logger.help(' -wcmProjectName, --wcmProjectName <value> Name of the WCM Project');
1996
- logger_1.logger.help(' -virtualPortalContext, --virtualPortalContext <value> Context of the virtual portal of the DX Core server');
1997
- logger_1.logger.help(' -disablePrompt, --disablePrompt <value> Disable the confirmation prompt for overwriting local and server files.');
1984
+ logger_1.logger.help(' --wcmLibraryName <value> WCM Design Library Name');
1985
+ logger_1.logger.help(' --wcmLibraryId <value> UUID of the WCM Design Library');
1986
+ logger_1.logger.help(' --wcmLibraryPath <value> Local path to the Library folder');
1987
+ logger_1.logger.help(' --wcmProjectName <value> Name of the WCM Project');
1988
+ logger_1.logger.help(' --virtualPortalContext <value> Context of the virtual portal of the DX Core server');
1989
+ logger_1.logger.help(' --disablePrompt <value> Disable the confirmation prompt for overwriting local and server files.');
1998
1990
  logger_1.logger.help(' -h, --help Display help for command');
1999
1991
  process.exit(1);
2000
1992
  }
2001
1993
  if (!subCommand
2002
- || (constants_1.LIVESYNC_WCM_DESIGN_LIBRARY_SUB_CMDS.includes(subCommand) && !utils_1.isFeatureEnabled(constants_1.FeaturesEnum.LIVESYNC_WCM))
1994
+ || (constants_1.LIVESYNC_WCM_DESIGN_LIBRARY_SUB_CMDS.includes(subCommand) && !(0, utils_1.isFeatureEnabled)(constants_1.FeaturesEnum.LIVESYNC_WCM))
2003
1995
  || (!constants_1.LIVESYNC_SUB_CMDS.includes(subCommand))) {
2004
1996
  logger_1.logger.help(` Required (sub)command ${constants_1.SUB_COMMANDS.LIVESYNC_PULL_THEME}: use "${constants_1.COMMANDS.LIVESYNC} ${constants_1.SUB_COMMANDS.LIVESYNC_PULL_THEME} -h" for more details`);
2005
1997
  logger_1.logger.help(` Required (sub)command ${constants_1.SUB_COMMANDS.LIVESYNC_PUSH_THEME}: use "${constants_1.COMMANDS.LIVESYNC} ${constants_1.SUB_COMMANDS.LIVESYNC_PUSH_THEME} -h" for more details`);
2006
- if (utils_1.isFeatureEnabled(constants_1.FeaturesEnum.LIVESYNC_WCM)) {
1998
+ if ((0, utils_1.isFeatureEnabled)(constants_1.FeaturesEnum.LIVESYNC_WCM)) {
2007
1999
  logger_1.logger.help(` Required (sub)command ${constants_1.SUB_COMMANDS.LIVESYNC_PULL_WCM_DESIGN_LIBRARY}: use "${constants_1.COMMANDS.LIVESYNC} ${constants_1.SUB_COMMANDS.LIVESYNC_PULL_WCM_DESIGN_LIBRARY} -h" for more details`);
2008
2000
  logger_1.logger.help(` Required (sub)command ${constants_1.SUB_COMMANDS.LIVESYNC_PUSH_WCM_DESIGN_LIBRARY}: use "${constants_1.COMMANDS.LIVESYNC} ${constants_1.SUB_COMMANDS.LIVESYNC_PUSH_WCM_DESIGN_LIBRARY} -h" for more details`);
2009
2001
  }
@@ -2011,23 +2003,23 @@ if (utils_1.isFeatureEnabled(constants_1.FeaturesEnum.LIVESYNC)) {
2011
2003
  }
2012
2004
  else {
2013
2005
  logger_1.logger.debug('LiveSync execution started');
2014
- commands_1.configureCommand(constants_1.COMMANDS.LIVESYNC);
2006
+ (0, commands_1.configureCommand)(constants_1.COMMANDS.LIVESYNC);
2015
2007
  try {
2016
- cmdOptions = utils_1.unmaskPasswords(cmdOptions);
2017
- validateOptions_1.validateOptions(cmdOptions);
2008
+ cmdOptions = (0, utils_1.unmaskPasswords)(cmdOptions);
2009
+ (0, validateOptions_1.validateOptions)(cmdOptions);
2018
2010
  }
2019
2011
  catch (error) {
2020
2012
  logger_1.logger.error(error.message);
2021
- yield utils_1.flushLogAndExitProcess(false, true);
2013
+ await (0, utils_1.flushLogAndExitProcess)(false, true);
2022
2014
  }
2023
2015
  }
2024
2016
  if (constants_1.LIVESYNC_THEME_SUB_CMDS.includes(subCommand) && !cmdOptions.themeName) {
2025
2017
  const baseUrl = `${cmdOptions.dxProtocol}://${cmdOptions.hostname}:${cmdOptions.dxPort}`;
2026
2018
  const themePath = `${cmdOptions.contenthandlerPath}${constants_1.URL_PATH.webDavTheme}`;
2027
2019
  try {
2028
- const themeOptions = yield themeServices_1.themeServices.getAvailableThemes(baseUrl, themePath, cmdOptions.dxUsername, cmdOptions.dxPassword);
2020
+ const themeOptions = await themeServices_1.themeServices.getAvailableThemes(baseUrl, themePath, cmdOptions.dxUsername, cmdOptions.dxPassword);
2029
2021
  logger_1.logger.info('Please select a Theme name');
2030
- yield cli_select_1.default({ values: themeOptions, valueRenderer: (value, selected) => { return `[${value}]`; } }).then((response) => {
2022
+ await (0, cli_select_1.default)({ values: themeOptions, valueRenderer: (value, selected) => { return `[${value}]`; } }).then((response) => {
2031
2023
  logger_1.logger.info('Theme "%s" has been selected.', response.value);
2032
2024
  cmdOptions.themeName = response.value;
2033
2025
  }).catch(() => {
@@ -2035,27 +2027,27 @@ if (utils_1.isFeatureEnabled(constants_1.FeaturesEnum.LIVESYNC)) {
2035
2027
  });
2036
2028
  if (!cmdOptions.themeName) {
2037
2029
  logger_1.logger.info('Unable to find a valid themeName, exiting DXCLient.');
2038
- yield utils_1.flushLogAndExitProcess(false);
2030
+ await (0, utils_1.flushLogAndExitProcess)(false);
2039
2031
  }
2040
2032
  }
2041
2033
  catch (error) {
2042
2034
  logger_1.logger.error('An error occurred during theme selection: %o', error.message ? error.message : error);
2043
- yield utils_1.flushLogAndExitProcess(false);
2035
+ await (0, utils_1.flushLogAndExitProcess)(false);
2044
2036
  }
2045
2037
  }
2046
2038
  if (constants_1.LIVESYNC_WCM_DESIGN_LIBRARY_SUB_CMDS.includes(subCommand) && !(cmdOptions.wcmLibraryId || cmdOptions.wcmLibraryName)) {
2047
2039
  try {
2048
- const mappedLibraryPath = utils_1.mapToHostPath(cmdOptions.wcmLibraryPath, []);
2040
+ const mappedLibraryPath = (0, utils_1.mapToHostPath)(cmdOptions.wcmLibraryPath, []);
2049
2041
  logger_1.logger.info(`Checking for saved WCM Design Library in ${mappedLibraryPath}`);
2050
- const savedMetadata = metadataServices_1.getLibraryMetadata(cmdOptions.wcmLibraryPath);
2042
+ const savedMetadata = (0, metadataServices_1.getLibraryMetadata)(cmdOptions.wcmLibraryPath);
2051
2043
  if (savedMetadata) {
2052
2044
  if (savedMetadata.type !== 'Library') {
2053
2045
  logger_1.logger.error('DXClient exiting due to invalid metadata. Error: Metadata not for Library.');
2054
- yield utils_1.flushLogAndExitProcess(false, true);
2046
+ await (0, utils_1.flushLogAndExitProcess)(false, true);
2055
2047
  }
2056
2048
  else if (!savedMetadata.id) {
2057
2049
  logger_1.logger.error('DXClient exiting due to invalid metadata. Error: Missing Library ID.');
2058
- yield utils_1.flushLogAndExitProcess(false, true);
2050
+ await (0, utils_1.flushLogAndExitProcess)(false, true);
2059
2051
  }
2060
2052
  cmdOptions.wcmLibraryId = savedMetadata.id;
2061
2053
  cmdOptions.wcmLibraryName = savedMetadata.displayTitle;
@@ -2075,9 +2067,9 @@ if (utils_1.isFeatureEnabled(constants_1.FeaturesEnum.LIVESYNC)) {
2075
2067
  virtualPortalContext: cmdOptions.virtualPortalContext,
2076
2068
  wcmProjectName: cmdOptions.wcmProjectName,
2077
2069
  };
2078
- const wcmlibraryResp = yield wcmRestV2Services_1.libraries(apiOptions);
2070
+ const wcmlibraryResp = await (0, wcmRestV2Services_1.libraries)(apiOptions);
2079
2071
  const wcmlibraryOptions = wcmlibraryResp.data['library-entries'];
2080
- yield cli_select_1.default({
2072
+ await (0, cli_select_1.default)({
2081
2073
  values: wcmlibraryOptions,
2082
2074
  valueRenderer: (value, selected) => {
2083
2075
  let { displayTitle } = value;
@@ -2101,20 +2093,20 @@ if (utils_1.isFeatureEnabled(constants_1.FeaturesEnum.LIVESYNC)) {
2101
2093
  });
2102
2094
  if (!cmdOptions.wcmLibraryId) {
2103
2095
  logger_1.logger.info('Unable to find a valid WCM Design Library, exiting DXCLient.');
2104
- yield utils_1.flushLogAndExitProcess(false);
2096
+ await (0, utils_1.flushLogAndExitProcess)(false);
2105
2097
  }
2106
2098
  }
2107
2099
  }
2108
2100
  catch (error) {
2109
2101
  logger_1.logger.error('An error occurred during Library selection: %o', error.message ? error.message : error);
2110
- yield utils_1.flushLogAndExitProcess(false);
2102
+ await (0, utils_1.flushLogAndExitProcess)(false);
2111
2103
  }
2112
2104
  }
2113
2105
  if (cmdOptions.disablePrompt === 'false') {
2114
2106
  let isOverwritePermitted = true;
2115
2107
  if ([constants_1.SUB_COMMANDS.LIVESYNC_PUSH_THEME, constants_1.SUB_COMMANDS.LIVESYNC_PUSH_WCM_DESIGN_LIBRARY].includes(subCommand)) {
2116
2108
  const diffSyncMsg = subCommand === constants_1.SUB_COMMANDS.LIVESYNC_PUSH_WCM_DESIGN_LIBRARY ? ' using updated local files' : '';
2117
- const prompt = yield prompts_1.default([{
2109
+ const prompt = await (0, prompts_1.default)([{
2118
2110
  type: 'text',
2119
2111
  name: 'confirmation',
2120
2112
  message: `This command will overwrite existing files in your DX Server${diffSyncMsg}. Enter 'OVERWRITE-SERVER' to proceed:`,
@@ -2123,7 +2115,7 @@ if (utils_1.isFeatureEnabled(constants_1.FeaturesEnum.LIVESYNC)) {
2123
2115
  isOverwritePermitted = prompt.confirmation === 'OVERWRITE-SERVER';
2124
2116
  }
2125
2117
  else if ([constants_1.SUB_COMMANDS.LIVESYNC_PULL_THEME, constants_1.SUB_COMMANDS.LIVESYNC_PULL_WCM_DESIGN_LIBRARY].includes(subCommand)) {
2126
- const prompt = yield prompts_1.default([{
2118
+ const prompt = await (0, prompts_1.default)([{
2127
2119
  type: 'text',
2128
2120
  name: 'confirmation',
2129
2121
  message: 'This command will overwrite existing files in your local workspace. Enter \'OVERWRITE-LOCAL\' to proceed:',
@@ -2133,7 +2125,7 @@ if (utils_1.isFeatureEnabled(constants_1.FeaturesEnum.LIVESYNC)) {
2133
2125
  }
2134
2126
  if (isOverwritePermitted === false) {
2135
2127
  logger_1.logger.info('LiveSync overwrite confirmation not validated, exiting DXClient.');
2136
- yield utils_1.flushLogAndExitProcess(false);
2128
+ await (0, utils_1.flushLogAndExitProcess)(false);
2137
2129
  }
2138
2130
  }
2139
2131
  const liveSyncSubCommands = [
@@ -2144,69 +2136,70 @@ if (utils_1.isFeatureEnabled(constants_1.FeaturesEnum.LIVESYNC)) {
2144
2136
  ];
2145
2137
  logger_1.logger.info('LiveSync %s execution started.', liveSyncSubCommands.find((subCmd) => { return subCmd.key === subCommand; }).label);
2146
2138
  try {
2147
- const response = yield liveSyncSubCommands.find((subCmd) => { return subCmd.key === subCommand; }).value.invoke(cmdOptions);
2148
- yield utils_1.flushLogAndExitProcess(response);
2139
+ const response = await liveSyncSubCommands.find((subCmd) => { return subCmd.key === subCommand; }).value.invoke(cmdOptions);
2140
+ await (0, utils_1.flushLogAndExitProcess)(response);
2149
2141
  }
2150
2142
  catch (error) {
2151
2143
  logger_1.logger.debug('Exception in execution : %o', error);
2152
- yield utils_1.flushLogAndExitProcess(false);
2144
+ await (0, utils_1.flushLogAndExitProcess)(false);
2153
2145
  }
2154
- }));
2146
+ });
2155
2147
  }
2156
- if (utils_1.isFeatureEnabled(constants_1.FeaturesEnum.DAM_REINDEXING)) {
2148
+ if ((0, utils_1.isFeatureEnabled)(constants_1.FeaturesEnum.DAM_REINDEXING)) {
2157
2149
  program
2158
2150
  .command(constants_1.COMMANDS.DAM_TRIGGER_REINDEXING)
2159
2151
  .description('- Trigger Search content-source reindexing')
2160
- .requiredOption('-dxProtocol, --dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
2161
- .requiredOption('-hostname, --hostname <value>', 'Host name of the DX Core server', config.hostname)
2162
- .requiredOption('-dxPort, --dxPort <value>', 'Port number of the DX Core server', config.dxPort ? config.dxPort.toString() : config.dxPort)
2163
- .requiredOption('-dxUsername, --dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
2164
- .requiredOption('-dxPassword, --dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
2165
- .requiredOption('-damAPIPort, --damAPIPort <value>', 'Port number of the DAM API server', config.damAPIPort ? config.damAPIPort.toString() : config.damAPIPort)
2166
- .requiredOption('-ringAPIPort, --ringAPIPort <value>', 'Port number of the DX Core API server', config.ringAPIPort ? config.ringAPIPort.toString() : config.ringAPIPort)
2167
- .requiredOption('-damAPIVersion, --damAPIVersion <value>', 'API Version number of DAM', config.damAPIVersion ? config.damAPIVersion.toString() : config.damAPIVersion)
2168
- .requiredOption('-ringAPIVersion, --ringAPIVersion <value>', 'API Version number of DX Core', config.ringAPIVersion ? config.ringAPIVersion.toString() : config.ringAPIVersion)
2169
- .option('-ltpaTokenRefreshTime, --ltpaTokenRefreshTime <value>', 'LTPA Token refresh time in minutes', constants_2.LTPA_TOKEN_REFRESH_TIME)
2170
- .option('-reportPath, --reportPath <value>', 'Location of the file path to download report')
2152
+ .requiredOption('--dxProtocol <value>', 'Protocol of the DX Core server', config.dxProtocol)
2153
+ .requiredOption('--hostname <value>', 'Host name of the DX Core server', config.hostname)
2154
+ .requiredOption('--dxPort <value>', 'Port number of the DX Core server', config.dxPort ? config.dxPort.toString() : config.dxPort)
2155
+ .requiredOption('--dxUsername <value>', 'Username of the DX Core server', config.dxUsername)
2156
+ .requiredOption('--dxPassword <value>', 'Password of the DX Core server', MaskData.maskPassword(config.dxPassword))
2157
+ .requiredOption('--damAPIPort <value>', 'Port number of the DAM API server', config.damAPIPort ? config.damAPIPort.toString() : config.damAPIPort)
2158
+ .requiredOption('--ringAPIPort <value>', 'Port number of the DX Core API server', config.ringAPIPort ? config.ringAPIPort.toString() : config.ringAPIPort)
2159
+ .requiredOption('--damAPIVersion <value>', 'API Version number of DAM', config.damAPIVersion ? config.damAPIVersion.toString() : config.damAPIVersion)
2160
+ .requiredOption('--ringAPIVersion <value>', 'API Version number of DX Core', config.ringAPIVersion ? config.ringAPIVersion.toString() : config.ringAPIVersion)
2161
+ .option('--ltpaTokenRefreshTime <value>', 'LTPA Token refresh time in minutes', constants_2.LTPA_TOKEN_REFRESH_TIME)
2162
+ .option('--reportPath <value>', 'Location of the file path to download report')
2171
2163
  .option('-h, --help')
2172
- .action((cmdOptions) => __awaiter(void 0, void 0, void 0, function* () {
2173
- commands_1.configureCommand(constants_1.COMMANDS.DAM_TRIGGER_REINDEXING);
2164
+ .action(async (cmdOptions) => {
2165
+ (0, commands_1.configureCommand)(constants_1.COMMANDS.DAM_TRIGGER_REINDEXING);
2174
2166
  try {
2175
- cmdOptions = utils_1.unmaskPasswords(cmdOptions);
2176
- validateOptions_1.validateOptions(cmdOptions);
2167
+ cmdOptions = (0, utils_1.unmaskPasswords)(cmdOptions);
2168
+ (0, validateOptions_1.validateOptions)(cmdOptions);
2177
2169
  }
2178
2170
  catch (error) {
2179
2171
  logger_1.logger.error(error.message);
2180
- yield utils_1.flushLogAndExitProcess(false, true);
2172
+ await (0, utils_1.flushLogAndExitProcess)(false, true);
2181
2173
  }
2182
2174
  try {
2183
2175
  const triggerDamReindexing = new triggerDamReindexing_1.TriggerDamReindexing();
2184
- const res = yield triggerDamReindexing.invoke(cmdOptions);
2185
- yield utils_1.flushLogAndExitProcess(res);
2176
+ const res = await triggerDamReindexing.invoke(cmdOptions);
2177
+ await (0, utils_1.flushLogAndExitProcess)(res);
2186
2178
  }
2187
2179
  catch (error) {
2188
- yield utils_1.flushLogAndExitProcess(false);
2180
+ await (0, utils_1.flushLogAndExitProcess)(false);
2189
2181
  }
2190
- }));
2182
+ });
2191
2183
  }
2192
2184
  program
2193
2185
  .command(constants_1.COMMANDS.ACCEPT_LICENSE)
2194
2186
  .description('- accept-license.')
2195
- .action(() => __awaiter(void 0, void 0, void 0, function* () {
2187
+ .action(async () => {
2196
2188
  logger_1.logger.debug('accept-license.');
2197
- commands_1.configureCommand(constants_1.COMMANDS.ACCEPT_LICENSE);
2189
+ (0, commands_1.configureCommand)(constants_1.COMMANDS.ACCEPT_LICENSE);
2198
2190
  try {
2199
- yield logger_1.flushLogs(true);
2191
+ await (0, logger_1.flushLogs)(true);
2200
2192
  process.exit(0);
2201
2193
  }
2202
2194
  catch (error) {
2203
2195
  logger_1.logger.error(error.message);
2204
- yield utils_1.flushLogAndExitProcess(false);
2196
+ await (0, utils_1.flushLogAndExitProcess)(false);
2205
2197
  }
2206
- }));
2207
- (() => __awaiter(void 0, void 0, void 0, function* () { yield utils_1.checkLicense(process.argv[2]); }))().then(() => __awaiter(void 0, void 0, void 0, function* () {
2208
- program.parse(process.argv);
2209
- })).catch((error) => {
2198
+ });
2199
+ (async () => { await (0, utils_1.checkLicense)(process.argv[2]); })().then(async () => {
2200
+ const commandArgs = await (0, utils_1.convertSingleToDoubleHyphen)(process.argv);
2201
+ program.parse(commandArgs);
2202
+ }).catch((error) => {
2210
2203
  logger_1.logger.error(error.message);
2211
2204
  process.exit(1);
2212
2205
  });