@rockcarver/frodo-cli 0.18.2-7 → 0.18.2-9

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 (334) hide show
  1. package/CHANGELOG.md +12 -1
  2. package/esm/app.js +2 -2
  3. package/esm/app.js.map +1 -1
  4. package/esm/cli/_template/something-delete.js +7 -4
  5. package/esm/cli/_template/something-delete.js.map +1 -1
  6. package/esm/cli/_template/something-describe.js +7 -4
  7. package/esm/cli/_template/something-describe.js.map +1 -1
  8. package/esm/cli/_template/something-else-delete.js +7 -4
  9. package/esm/cli/_template/something-else-delete.js.map +1 -1
  10. package/esm/cli/_template/something-else-describe.js +7 -4
  11. package/esm/cli/_template/something-else-describe.js.map +1 -1
  12. package/esm/cli/_template/something-else-export.js +7 -4
  13. package/esm/cli/_template/something-else-export.js.map +1 -1
  14. package/esm/cli/_template/something-else-import.js +7 -4
  15. package/esm/cli/_template/something-else-import.js.map +1 -1
  16. package/esm/cli/_template/something-else-list.js +7 -4
  17. package/esm/cli/_template/something-else-list.js.map +1 -1
  18. package/esm/cli/_template/something-else.js.map +1 -1
  19. package/esm/cli/_template/something-export.js +7 -4
  20. package/esm/cli/_template/something-export.js.map +1 -1
  21. package/esm/cli/_template/something-import.js +7 -4
  22. package/esm/cli/_template/something-import.js.map +1 -1
  23. package/esm/cli/_template/something-list.js +7 -4
  24. package/esm/cli/_template/something-list.js.map +1 -1
  25. package/esm/cli/_template/something-other-delete.js +7 -4
  26. package/esm/cli/_template/something-other-delete.js.map +1 -1
  27. package/esm/cli/_template/something-other-describe.js +7 -4
  28. package/esm/cli/_template/something-other-describe.js.map +1 -1
  29. package/esm/cli/_template/something-other-export.js +7 -4
  30. package/esm/cli/_template/something-other-export.js.map +1 -1
  31. package/esm/cli/_template/something-other-import.js +7 -4
  32. package/esm/cli/_template/something-other-import.js.map +1 -1
  33. package/esm/cli/_template/something-other-list.js +7 -4
  34. package/esm/cli/_template/something-other-list.js.map +1 -1
  35. package/esm/cli/_template/something-other.js.map +1 -1
  36. package/esm/cli/_template/something.js +0 -2
  37. package/esm/cli/_template/something.js.map +1 -1
  38. package/esm/cli/admin/admin-add-autoid-static-user-mapping.js +5 -3
  39. package/esm/cli/admin/admin-add-autoid-static-user-mapping.js.map +1 -1
  40. package/esm/cli/admin/admin-create-oauth2-client-with-admin-privileges.js +7 -11
  41. package/esm/cli/admin/admin-create-oauth2-client-with-admin-privileges.js.map +1 -1
  42. package/esm/cli/admin/admin-get-access-token.js +5 -3
  43. package/esm/cli/admin/admin-get-access-token.js.map +1 -1
  44. package/esm/cli/admin/admin-grant-oauth2-client-admin-privileges.js +5 -3
  45. package/esm/cli/admin/admin-grant-oauth2-client-admin-privileges.js.map +1 -1
  46. package/esm/cli/admin/admin-hide-generic-extension-attributes.js +5 -3
  47. package/esm/cli/admin/admin-hide-generic-extension-attributes.js.map +1 -1
  48. package/esm/cli/admin/admin-list-oauth2-clients-with-admin-privileges.js +5 -3
  49. package/esm/cli/admin/admin-list-oauth2-clients-with-admin-privileges.js.map +1 -1
  50. package/esm/cli/admin/admin-list-oauth2-clients-with-custom-privileges.js +5 -3
  51. package/esm/cli/admin/admin-list-oauth2-clients-with-custom-privileges.js.map +1 -1
  52. package/esm/cli/admin/admin-list-static-user-mappings.js +5 -3
  53. package/esm/cli/admin/admin-list-static-user-mappings.js.map +1 -1
  54. package/esm/cli/admin/admin-remove-static-user-mapping.js +5 -3
  55. package/esm/cli/admin/admin-remove-static-user-mapping.js.map +1 -1
  56. package/esm/cli/admin/admin-repair-org-model.js +5 -3
  57. package/esm/cli/admin/admin-repair-org-model.js.map +1 -1
  58. package/esm/cli/admin/admin-revoke-oauth2-client-admin-privileges.js +5 -3
  59. package/esm/cli/admin/admin-revoke-oauth2-client-admin-privileges.js.map +1 -1
  60. package/esm/cli/admin/admin-show-generic-extension-attributes.js +5 -3
  61. package/esm/cli/admin/admin-show-generic-extension-attributes.js.map +1 -1
  62. package/esm/cli/admin/admin.js +0 -2
  63. package/esm/cli/admin/admin.js.map +1 -1
  64. package/esm/cli/agent/agent-delete.js +9 -7
  65. package/esm/cli/agent/agent-delete.js.map +1 -1
  66. package/esm/cli/agent/agent-describe.js +7 -4
  67. package/esm/cli/agent/agent-describe.js.map +1 -1
  68. package/esm/cli/agent/agent-export.js +11 -6
  69. package/esm/cli/agent/agent-export.js.map +1 -1
  70. package/esm/cli/agent/agent-gateway-delete.js +9 -7
  71. package/esm/cli/agent/agent-gateway-delete.js.map +1 -1
  72. package/esm/cli/agent/agent-gateway-describe.js +7 -4
  73. package/esm/cli/agent/agent-gateway-describe.js.map +1 -1
  74. package/esm/cli/agent/agent-gateway-export.js +11 -6
  75. package/esm/cli/agent/agent-gateway-export.js.map +1 -1
  76. package/esm/cli/agent/agent-gateway-import.js +13 -7
  77. package/esm/cli/agent/agent-gateway-import.js.map +1 -1
  78. package/esm/cli/agent/agent-gateway-list.js +5 -3
  79. package/esm/cli/agent/agent-gateway-list.js.map +1 -1
  80. package/esm/cli/agent/agent-gateway.js.map +1 -1
  81. package/esm/cli/agent/agent-import.js +13 -7
  82. package/esm/cli/agent/agent-import.js.map +1 -1
  83. package/esm/cli/agent/agent-java-delete.js +9 -7
  84. package/esm/cli/agent/agent-java-delete.js.map +1 -1
  85. package/esm/cli/agent/agent-java-describe.js +7 -4
  86. package/esm/cli/agent/agent-java-describe.js.map +1 -1
  87. package/esm/cli/agent/agent-java-export.js +11 -6
  88. package/esm/cli/agent/agent-java-export.js.map +1 -1
  89. package/esm/cli/agent/agent-java-import.js +13 -7
  90. package/esm/cli/agent/agent-java-import.js.map +1 -1
  91. package/esm/cli/agent/agent-java-list.js +5 -3
  92. package/esm/cli/agent/agent-java-list.js.map +1 -1
  93. package/esm/cli/agent/agent-java.js.map +1 -1
  94. package/esm/cli/agent/agent-list.js +5 -3
  95. package/esm/cli/agent/agent-list.js.map +1 -1
  96. package/esm/cli/agent/agent-web-delete.js +9 -7
  97. package/esm/cli/agent/agent-web-delete.js.map +1 -1
  98. package/esm/cli/agent/agent-web-describe.js +7 -4
  99. package/esm/cli/agent/agent-web-describe.js.map +1 -1
  100. package/esm/cli/agent/agent-web-export.js +11 -6
  101. package/esm/cli/agent/agent-web-export.js.map +1 -1
  102. package/esm/cli/agent/agent-web-import.js +13 -7
  103. package/esm/cli/agent/agent-web-import.js.map +1 -1
  104. package/esm/cli/agent/agent-web-list.js +5 -3
  105. package/esm/cli/agent/agent-web-list.js.map +1 -1
  106. package/esm/cli/agent/agent-web.js.map +1 -1
  107. package/esm/cli/agent/agent.js +0 -2
  108. package/esm/cli/agent/agent.js.map +1 -1
  109. package/esm/cli/app/app-delete.js +7 -4
  110. package/esm/cli/app/app-delete.js.map +1 -1
  111. package/esm/cli/app/app-describe.js +7 -4
  112. package/esm/cli/app/app-describe.js.map +1 -1
  113. package/esm/cli/app/app-export.js +11 -6
  114. package/esm/cli/app/app-export.js.map +1 -1
  115. package/esm/cli/app/app-import.js +9 -5
  116. package/esm/cli/app/app-import.js.map +1 -1
  117. package/esm/cli/app/app-list.js +5 -3
  118. package/esm/cli/app/app-list.js.map +1 -1
  119. package/esm/cli/app/app.js +8 -5
  120. package/esm/cli/app/app.js.map +1 -1
  121. package/esm/cli/cmd_common.js +2 -1
  122. package/esm/cli/cmd_common.js.map +1 -1
  123. package/esm/cli/conn/conn-add.js +5 -5
  124. package/esm/cli/conn/conn-add.js.map +1 -1
  125. package/esm/cli/conn/conn-delete.js +5 -2
  126. package/esm/cli/conn/conn-delete.js.map +1 -1
  127. package/esm/cli/conn/conn-describe.js +5 -2
  128. package/esm/cli/conn/conn-describe.js.map +1 -1
  129. package/esm/cli/conn/conn-list.js +7 -3
  130. package/esm/cli/conn/conn-list.js.map +1 -1
  131. package/esm/cli/conn/conn.js +2 -3
  132. package/esm/cli/conn/conn.js.map +1 -1
  133. package/esm/cli/email/email-template-export.js +13 -12
  134. package/esm/cli/email/email-template-export.js.map +1 -1
  135. package/esm/cli/email/email-template-import.js +15 -14
  136. package/esm/cli/email/email-template-import.js.map +1 -1
  137. package/esm/cli/email/email-template-list.js +7 -7
  138. package/esm/cli/email/email-template-list.js.map +1 -1
  139. package/esm/cli/email/email-template.js.map +1 -1
  140. package/esm/cli/email/email.js +0 -2
  141. package/esm/cli/email/email.js.map +1 -1
  142. package/esm/cli/esv/esv-apply.js +9 -11
  143. package/esm/cli/esv/esv-apply.js.map +1 -1
  144. package/esm/cli/esv/esv-secret-create.js +5 -3
  145. package/esm/cli/esv/esv-secret-create.js.map +1 -1
  146. package/esm/cli/esv/esv-secret-delete.js +9 -5
  147. package/esm/cli/esv/esv-secret-delete.js.map +1 -1
  148. package/esm/cli/esv/esv-secret-describe.js +5 -3
  149. package/esm/cli/esv/esv-secret-describe.js.map +1 -1
  150. package/esm/cli/esv/esv-secret-export.js +7 -4
  151. package/esm/cli/esv/esv-secret-export.js.map +1 -1
  152. package/esm/cli/esv/esv-secret-import.js +7 -4
  153. package/esm/cli/esv/esv-secret-import.js.map +1 -1
  154. package/esm/cli/esv/esv-secret-list.js +5 -3
  155. package/esm/cli/esv/esv-secret-list.js.map +1 -1
  156. package/esm/cli/esv/esv-secret-set.js +5 -3
  157. package/esm/cli/esv/esv-secret-set.js.map +1 -1
  158. package/esm/cli/esv/esv-secret-version-activate.js +7 -4
  159. package/esm/cli/esv/esv-secret-version-activate.js.map +1 -1
  160. package/esm/cli/esv/esv-secret-version-create.js +5 -3
  161. package/esm/cli/esv/esv-secret-version-create.js.map +1 -1
  162. package/esm/cli/esv/esv-secret-version-deactivate.js +7 -4
  163. package/esm/cli/esv/esv-secret-version-deactivate.js.map +1 -1
  164. package/esm/cli/esv/esv-secret-version-delete.js +7 -4
  165. package/esm/cli/esv/esv-secret-version-delete.js.map +1 -1
  166. package/esm/cli/esv/esv-secret-version-list.js +5 -3
  167. package/esm/cli/esv/esv-secret-version-list.js.map +1 -1
  168. package/esm/cli/esv/esv-secret-version.js.map +1 -1
  169. package/esm/cli/esv/esv-secret.js +4 -1
  170. package/esm/cli/esv/esv-secret.js.map +1 -1
  171. package/esm/cli/esv/esv-variable-create.js +5 -3
  172. package/esm/cli/esv/esv-variable-create.js.map +1 -1
  173. package/esm/cli/esv/esv-variable-delete.js +9 -5
  174. package/esm/cli/esv/esv-variable-delete.js.map +1 -1
  175. package/esm/cli/esv/esv-variable-describe.js +5 -3
  176. package/esm/cli/esv/esv-variable-describe.js.map +1 -1
  177. package/esm/cli/esv/esv-variable-export.js +7 -4
  178. package/esm/cli/esv/esv-variable-export.js.map +1 -1
  179. package/esm/cli/esv/esv-variable-import.js +7 -4
  180. package/esm/cli/esv/esv-variable-import.js.map +1 -1
  181. package/esm/cli/esv/esv-variable-list.js +5 -3
  182. package/esm/cli/esv/esv-variable-list.js.map +1 -1
  183. package/esm/cli/esv/esv-variable-set.js +7 -4
  184. package/esm/cli/esv/esv-variable-set.js.map +1 -1
  185. package/esm/cli/esv/esv-variable.js +4 -1
  186. package/esm/cli/esv/esv-variable.js.map +1 -1
  187. package/esm/cli/esv/esv.js +0 -2
  188. package/esm/cli/esv/esv.js.map +1 -1
  189. package/esm/cli/idm/idm-count.js +5 -3
  190. package/esm/cli/idm/idm-count.js.map +1 -1
  191. package/esm/cli/idm/idm-export.js +11 -6
  192. package/esm/cli/idm/idm-export.js.map +1 -1
  193. package/esm/cli/idm/idm-import.js +11 -6
  194. package/esm/cli/idm/idm-import.js.map +1 -1
  195. package/esm/cli/idm/idm-list.js +7 -4
  196. package/esm/cli/idm/idm-list.js.map +1 -1
  197. package/esm/cli/idm/idm.js +2 -3
  198. package/esm/cli/idm/idm.js.map +1 -1
  199. package/esm/cli/idp/idp-export.js +11 -6
  200. package/esm/cli/idp/idp-export.js.map +1 -1
  201. package/esm/cli/idp/idp-import.js +13 -7
  202. package/esm/cli/idp/idp-import.js.map +1 -1
  203. package/esm/cli/idp/idp-list.js +7 -4
  204. package/esm/cli/idp/idp-list.js.map +1 -1
  205. package/esm/cli/idp/idp.js +0 -2
  206. package/esm/cli/idp/idp.js.map +1 -1
  207. package/esm/cli/info/info.js +0 -5
  208. package/esm/cli/info/info.js.map +1 -1
  209. package/esm/cli/journey/journey-delete.e2e.test_.js.map +1 -1
  210. package/esm/cli/journey/journey-delete.js +9 -5
  211. package/esm/cli/journey/journey-delete.js.map +1 -1
  212. package/esm/cli/journey/journey-describe.js +31 -28
  213. package/esm/cli/journey/journey-describe.js.map +1 -1
  214. package/esm/cli/journey/journey-disable.js +9 -6
  215. package/esm/cli/journey/journey-disable.js.map +1 -1
  216. package/esm/cli/journey/journey-enable.js +9 -6
  217. package/esm/cli/journey/journey-enable.js.map +1 -1
  218. package/esm/cli/journey/journey-export.js +11 -6
  219. package/esm/cli/journey/journey-export.js.map +1 -1
  220. package/esm/cli/journey/journey-import.js +13 -7
  221. package/esm/cli/journey/journey-import.js.map +1 -1
  222. package/esm/cli/journey/journey-list.e2e.test_.js.map +1 -1
  223. package/esm/cli/journey/journey-list.js +5 -3
  224. package/esm/cli/journey/journey-list.js.map +1 -1
  225. package/esm/cli/journey/journey-prune.js +5 -5
  226. package/esm/cli/journey/journey-prune.js.map +1 -1
  227. package/esm/cli/journey/journey.js +0 -2
  228. package/esm/cli/journey/journey.js.map +1 -1
  229. package/esm/cli/logging/logs-fetch.js +2 -11
  230. package/esm/cli/logging/logs-fetch.js.map +1 -1
  231. package/esm/cli/logging/logs-list.js +0 -5
  232. package/esm/cli/logging/logs-list.js.map +1 -1
  233. package/esm/cli/logging/logs-tail.js +0 -4
  234. package/esm/cli/logging/logs-tail.js.map +1 -1
  235. package/esm/cli/logging/logs.js +2 -4
  236. package/esm/cli/logging/logs.js.map +1 -1
  237. package/esm/cli/realm/realm-add-custom-domain.js +5 -3
  238. package/esm/cli/realm/realm-add-custom-domain.js.map +1 -1
  239. package/esm/cli/realm/realm-describe.js +5 -3
  240. package/esm/cli/realm/realm-describe.js.map +1 -1
  241. package/esm/cli/realm/realm-list.js +5 -3
  242. package/esm/cli/realm/realm-list.js.map +1 -1
  243. package/esm/cli/realm/realm-remove-custom-domain.js +5 -3
  244. package/esm/cli/realm/realm-remove-custom-domain.js.map +1 -1
  245. package/esm/cli/realm/realm.js +5 -4
  246. package/esm/cli/realm/realm.js.map +1 -1
  247. package/esm/cli/saml/saml-cot-export.js +11 -6
  248. package/esm/cli/saml/saml-cot-export.js.map +1 -1
  249. package/esm/cli/saml/saml-cot-import.js +13 -7
  250. package/esm/cli/saml/saml-cot-import.js.map +1 -1
  251. package/esm/cli/saml/saml-cot-list.js +5 -3
  252. package/esm/cli/saml/saml-cot-list.js.map +1 -1
  253. package/esm/cli/saml/saml-cot.js.map +1 -1
  254. package/esm/cli/saml/saml-delete.js +11 -6
  255. package/esm/cli/saml/saml-delete.js.map +1 -1
  256. package/esm/cli/saml/saml-describe.js +5 -3
  257. package/esm/cli/saml/saml-describe.js.map +1 -1
  258. package/esm/cli/saml/saml-export.js +13 -7
  259. package/esm/cli/saml/saml-export.js.map +1 -1
  260. package/esm/cli/saml/saml-import.js +13 -7
  261. package/esm/cli/saml/saml-import.js.map +1 -1
  262. package/esm/cli/saml/saml-list.js +5 -3
  263. package/esm/cli/saml/saml-list.js.map +1 -1
  264. package/esm/cli/saml/saml-metadata-export.js +7 -4
  265. package/esm/cli/saml/saml-metadata-export.js.map +1 -1
  266. package/esm/cli/saml/saml-metadata.js.map +1 -1
  267. package/esm/cli/saml/saml.js +0 -2
  268. package/esm/cli/saml/saml.js.map +1 -1
  269. package/esm/cli/script/script-delete.js +7 -4
  270. package/esm/cli/script/script-delete.js.map +1 -1
  271. package/esm/cli/script/script-describe.js +7 -4
  272. package/esm/cli/script/script-describe.js.map +1 -1
  273. package/esm/cli/script/script-export.js +15 -8
  274. package/esm/cli/script/script-export.js.map +1 -1
  275. package/esm/cli/script/script-import.js +7 -4
  276. package/esm/cli/script/script-import.js.map +1 -1
  277. package/esm/cli/script/script-list.js +5 -3
  278. package/esm/cli/script/script-list.js.map +1 -1
  279. package/esm/cli/script/script.js +6 -4
  280. package/esm/cli/script/script.js.map +1 -1
  281. package/esm/cli/service/service-delete.js +0 -1
  282. package/esm/cli/service/service-delete.js.map +1 -1
  283. package/esm/cli/service/service-export.js +11 -6
  284. package/esm/cli/service/service-export.js.map +1 -1
  285. package/esm/cli/service/service-import.js +13 -6
  286. package/esm/cli/service/service-import.js.map +1 -1
  287. package/esm/cli/service/service-list.js +0 -1
  288. package/esm/cli/service/service-list.js.map +1 -1
  289. package/esm/cli/service/service.js +0 -2
  290. package/esm/cli/service/service.js.map +1 -1
  291. package/esm/cli/theme/theme-delete.e2e.test_.js.map +1 -1
  292. package/esm/cli/theme/theme-delete.js +16 -14
  293. package/esm/cli/theme/theme-delete.js.map +1 -1
  294. package/esm/cli/theme/theme-export.js +17 -15
  295. package/esm/cli/theme/theme-export.js.map +1 -1
  296. package/esm/cli/theme/theme-import.js +19 -17
  297. package/esm/cli/theme/theme-import.js.map +1 -1
  298. package/esm/cli/theme/theme-list.e2e.test_.js.map +1 -1
  299. package/esm/cli/theme/theme-list.js +7 -7
  300. package/esm/cli/theme/theme-list.js.map +1 -1
  301. package/esm/cli/theme/theme.js +0 -2
  302. package/esm/cli/theme/theme.js.map +1 -1
  303. package/esm/ops/AgentOps.js +48 -126
  304. package/esm/ops/AgentOps.js.map +1 -1
  305. package/esm/ops/CirclesOfTrustOps.js +2 -2
  306. package/esm/ops/CirclesOfTrustOps.js.map +1 -1
  307. package/esm/ops/EmailTemplateOps.js +270 -6
  308. package/esm/ops/EmailTemplateOps.js.map +1 -1
  309. package/esm/ops/IdpOps.js +2 -2
  310. package/esm/ops/IdpOps.js.map +1 -1
  311. package/esm/ops/JourneyOps.js +96 -152
  312. package/esm/ops/JourneyOps.js.map +1 -1
  313. package/esm/ops/NodeOps.js +6 -12
  314. package/esm/ops/NodeOps.js.map +1 -1
  315. package/esm/ops/Saml2Ops.js +25 -78
  316. package/esm/ops/Saml2Ops.js.map +1 -1
  317. package/esm/ops/Saml2Ops.test_.js.map +1 -1
  318. package/esm/ops/ScriptOps.js +3 -3
  319. package/esm/ops/ScriptOps.js.map +1 -1
  320. package/esm/ops/ServiceOps.js +10 -31
  321. package/esm/ops/ServiceOps.js.map +1 -1
  322. package/esm/ops/ThemeOps.js +331 -2
  323. package/esm/ops/ThemeOps.js.map +1 -1
  324. package/esm/ops/utils/Wordwrap.js.map +1 -1
  325. package/esm/storage/StaticStorage.js.map +1 -1
  326. package/esm/utils/Config.js +0 -9
  327. package/esm/utils/Config.js.map +1 -1
  328. package/esm/utils/Console.js +32 -79
  329. package/esm/utils/Console.js.map +1 -1
  330. package/esm/utils/ExportImportUtils.js +46 -0
  331. package/esm/utils/ExportImportUtils.js.map +1 -0
  332. package/esm/utils/Version.js +6 -24
  333. package/esm/utils/Version.js.map +1 -1
  334. package/package.json +18 -17
@@ -1 +1 @@
1
- {"version":3,"file":"journey-delete.e2e.test_.js","names":["spawn","spawnSync","ansiEscapeCodes","beforeAll","beforeEach","deleteJourneysCmd","status","console","error","stderr","toString","log","stdout","importTestJourneysCmd","cwd","describe","it","done","deleteJourneyCmd","expected","join","chunks","on","chunk","push","output","Buffer","concat","replace","expect","toContain","str"],"sources":["cli/journey/journey-delete.e2e.test_.ts"],"sourcesContent":["/* eslint-disable no-console */\n// import { jest } from '@jest/globals';\nimport { spawn, spawnSync } from 'child_process';\n\nconst ansiEscapeCodes =\n // eslint-disable-next-line no-control-regex\n /[\\u001b\\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g;\n\n/**\n * Run once before running the suites in this file\n */\nbeforeAll(async () => {\n //\n});\n\n/**\n * Run before every test in every suite in this file\n */\nbeforeEach(async () => {\n // delete all journeys\n const deleteJourneysCmd = spawnSync('frodo', [\n 'journey',\n 'delete',\n '--all',\n 'frodo-dev',\n ]);\n if (deleteJourneysCmd.status && deleteJourneysCmd.status > 0) {\n console.error(deleteJourneysCmd.stderr.toString());\n console.log(deleteJourneysCmd.stdout.toString());\n }\n\n // import test journeys\n const importTestJourneysCmd = spawnSync(\n 'frodo',\n ['journey', 'import', '--all-separate', 'frodo-dev'],\n {\n cwd: `test/e2e/journey/delete`,\n }\n );\n if (importTestJourneysCmd.status && importTestJourneysCmd.status > 0) {\n console.error(importTestJourneysCmd.stderr.toString());\n console.log(importTestJourneysCmd.stdout.toString());\n }\n});\n\ndescribe('frodo journey delete', () => {\n it('\"frodo journey delete -i deleteMe\": should delete the deleteMe journey and all its nodes', (done) => {\n const deleteJourneyCmd = spawn('frodo', [\n 'journey',\n 'delete',\n '-i',\n 'deleteMe',\n 'frodo-dev',\n ]);\n const expected = ['✔ Deleted deleteMe and 7/7 nodes.', ''].join('\\n');\n const chunks: Uint8Array[] = [];\n deleteJourneyCmd.stderr.on('data', (chunk) => {\n chunks.push(chunk);\n });\n deleteJourneyCmd.stderr.on('end', () => {\n const output = Buffer.concat(chunks)\n .toString()\n .replace(ansiEscapeCodes, '');\n try {\n expect(output).toContain(expected);\n done();\n } catch (error) {\n done(error);\n }\n });\n });\n\n it('\"frodo journey delete -i deleteMe --verbose\": should delete the deleteMe journey and all its nodes with verbose output', (done) => {\n const deleteJourneyCmd = spawn('frodo', [\n 'journey',\n 'delete',\n '-i',\n 'deleteMe',\n '--verbose',\n 'frodo-dev',\n ]);\n const expected = [\n 'Deleted deleteMe (tree)\\n',\n 'Read 3c89697f-c114-4d36-907f-6c36f820cde7 (PageNode) from deleteMe\\n',\n 'Deleted 68e23c54-0c9e-4991-9b25-daf306d6ec65 (ZeroPageLoginNode) from deleteMe\\n',\n 'Deleted 9cd184fc-9453-4666-b667-2875d9301b5e (DataStoreDecisionNode) from deleteMe\\n',\n 'Read 2d564be0-325e-439a-aeb0-6c884270c756 (PageNode) from deleteMe\\n',\n 'Deleted 3c89697f-c114-4d36-907f-6c36f820cde7 (PageNode) from deleteMe\\n',\n 'Deleted fab1f53e-cda4-458a-b458-b07f75c75d5f (ValidatedUsernameNode) from deleteMe\\n',\n 'Deleted 2d564be0-325e-439a-aeb0-6c884270c756 (PageNode) from deleteMe\\n',\n 'Deleted 9d146833-e8d1-4802-8c35-0d7772290807 (DisplayUserNameNode) from deleteMe\\n',\n 'Deleted c22373f9-252b-4d0b-b80e-e4b392a17d98 (ValidatedPasswordNode) from deleteMe\\n',\n '✔ Deleted deleteMe and 7/7 nodes.\\n',\n ];\n const chunks: Uint8Array[] = [];\n deleteJourneyCmd.stderr.on('data', (chunk) => {\n chunks.push(chunk);\n });\n deleteJourneyCmd.stderr.on('end', () => {\n const output = Buffer.concat(chunks)\n .toString()\n .replace(ansiEscapeCodes, '');\n try {\n for (const str of expected) {\n expect(output).toContain(str);\n }\n done();\n } catch (error) {\n done(error);\n }\n });\n });\n\n it('\"frodo journey delete -i deleteMe --no-deep\": should delete the deleteMe journey and none of its nodes', (done) => {\n const deleteJourneyCmd = spawn('frodo', [\n 'journey',\n 'delete',\n '-i',\n 'deleteMe',\n '--no-deep',\n 'frodo-dev',\n ]);\n const expected = ['✔ Deleted deleteMe and 0/0 nodes.', ''].join('\\n');\n const chunks: Uint8Array[] = [];\n deleteJourneyCmd.stderr.on('data', (chunk) => {\n chunks.push(chunk);\n });\n deleteJourneyCmd.stderr.on('end', () => {\n const output = Buffer.concat(chunks)\n .toString()\n .replace(ansiEscapeCodes, '');\n try {\n expect(output).toContain(expected);\n done();\n } catch (error) {\n done(error);\n }\n });\n });\n\n it('\"frodo journey delete -i deleteMe --no-deep --verbose\": should delete the deleteMe journey and none of its nodes with verbose output', (done) => {\n const deleteJourneyCmd = spawn('frodo', [\n 'journey',\n 'delete',\n '-i',\n 'deleteMe',\n '--no-deep',\n '--verbose',\n 'frodo-dev',\n ]);\n const expected = [\n 'Deleted deleteMe (tree)\\n',\n '✔ Deleted deleteMe and 0/0 nodes.\\n',\n ];\n const chunks: Uint8Array[] = [];\n deleteJourneyCmd.stderr.on('data', (chunk) => {\n chunks.push(chunk);\n });\n deleteJourneyCmd.stderr.on('end', () => {\n const output = Buffer.concat(chunks)\n .toString()\n .replace(ansiEscapeCodes, '');\n try {\n for (const str of expected) {\n expect(output).toContain(str);\n }\n done();\n } catch (error) {\n done(error);\n }\n });\n });\n});\n\ndescribe('frodo journey delete --all', () => {\n it(\n '\"frodo journey delete -a\": should delete all journeys and all their nodes',\n (done) => {\n const deleteJourneyCmd = spawn('frodo', [\n 'journey',\n 'delete',\n '-a',\n 'frodo-dev',\n ]);\n const expected = [\n '[========================================] 100% | 8/8 | Deleted 8/8 journeys and 51/51 nodes.',\n '',\n ].join('\\n');\n const chunks: Uint8Array[] = [];\n deleteJourneyCmd.stderr.on('data', (chunk) => {\n chunks.push(chunk);\n });\n deleteJourneyCmd.stderr.on('end', () => {\n const output = Buffer.concat(chunks)\n .toString()\n .replace(ansiEscapeCodes, '');\n try {\n expect(output).toContain(expected);\n done();\n } catch (error) {\n done(error);\n }\n });\n },\n // increase timeout for long-running test\n 10 * 1000\n );\n\n it(\n '\"frodo journey delete -a --verbose\": should delete all journeys and all their nodes with verbose output',\n (done) => {\n const deleteJourneyCmd = spawn('frodo', [\n 'journey',\n 'delete',\n '-a',\n '--verbose',\n 'frodo-dev',\n ]);\n const expected = [\n '[----------------------------------------] 0% | 0/8 | Deleting journeys...\\n',\n 'Deleted ResetPassword (tree)\\n',\n 'Read cc3e1ed2-25f1-47bf-83c6-17084f8b2b2b (PageNode) from ResetPassword\\n',\n 'Deleted 06c97be5-7fdd-4739-aea1-ecc7fe082865 (EmailSuspendNode) from ResetPassword\\n',\n 'Deleted 989f0bf8-a328-4217-b82b-5275d79ca8bd (PatchObjectNode) from ResetPassword\\n',\n 'Deleted 21b8ddf3-0203-4ae1-ab05-51cf3a3a707a (IdentifyExistingUserNode) from ResetPassword\\n',\n 'Read e4c752f9-c625-48c9-9644-a58802fa9e9c (PageNode) from ResetPassword\\n',\n 'Deleted cc3e1ed2-25f1-47bf-83c6-17084f8b2b2b (PageNode) from ResetPassword\\n',\n 'Deleted 276afa7c-a680-4cf4-a5f6-d6c78191f5c9 (AttributeCollectorNode) from ResetPassword\\n',\n 'Deleted e4c752f9-c625-48c9-9644-a58802fa9e9c (PageNode) from ResetPassword\\n',\n 'Deleted 009c19c8-9572-47bb-adb2-1f092c559a43 (ValidatedPasswordNode) from ResetPassword\\n',\n 'Deleted Registration (tree)\\n',\n 'Read 0c091c49-f3af-48fb-ac6f-07fba0499dd6 (PageNode) from Registration\\n',\n 'Deleted d3ce2036-1523-4ce8-b1a2-895a2a036667 (AttributeCollectorNode) from Registration\\n',\n 'Deleted 0c091c49-f3af-48fb-ac6f-07fba0499dd6 (PageNode) from Registration\\n',\n 'Deleted 3d8709a1-f09f-4d1f-8094-2850e472c1db (ValidatedPasswordNode) from Registration\\n',\n 'Deleted 120c69d3-90b4-4ad4-b7af-380e8b119340 (KbaCreateNode) from Registration\\n',\n 'Deleted b4a0e915-c15d-4b83-9c9d-18347d645976 (AcceptTermsAndConditionsNode) from Registration\\n',\n 'Deleted ad5dcbb3-7335-49b7-b3e7-7d850bb88237 (CreateObjectNode) from Registration\\n',\n 'Deleted 7fcaf48e-a754-4959-858b-05b2933b825f (ValidatedUsernameNode) from Registration\\n',\n 'Deleted 97a15eb2-a015-4b6d-81a0-be78c3aa1a3b (IncrementLoginCountNode) from Registration\\n',\n 'Deleted PasswordGrant (tree)\\n',\n 'Read 6b9a715d-ea23-4eae-9a59-69797c147157 (PageNode) from PasswordGrant\\n',\n 'Deleted 59952413-9bc2-47e5-a9b2-b04c1d729e24 (UsernameCollectorNode) from PasswordGrant\\n',\n 'Deleted 6b9a715d-ea23-4eae-9a59-69797c147157 (PageNode) from PasswordGrant\\n',\n 'Deleted 8c217417-11dd-4a0f-a9e4-59c2390085be (PasswordCollectorNode) from PasswordGrant\\n',\n 'Deleted e2988546-a459-4c9a-b0e2-fa65ae136b34 (DataStoreDecisionNode) from PasswordGrant\\n',\n 'Deleted ProgressiveProfile (tree)\\n',\n 'Read a5aecad8-854a-4ed5-b719-ff6c90e858c0 (PageNode) from ProgressiveProfile\\n',\n 'Deleted 423a959a-a1b9-498a-b0f7-596b6b6e775a (PatchObjectNode) from ProgressiveProfile\\n',\n 'Deleted a1f45b44-5bf7-4c57-aa3f-75c619c7db8e (QueryFilterDecisionNode) from ProgressiveProfile\\n',\n 'Deleted 8afdaec3-275e-4301-bb53-34f03e6a4b29 (LoginCountDecisionNode) from ProgressiveProfile\\n',\n 'Deleted a5aecad8-854a-4ed5-b719-ff6c90e858c0 (PageNode) from ProgressiveProfile\\n',\n 'Deleted 0a042e10-b22e-4e02-86c4-65e26e775f7a (AttributeCollectorNode) from ProgressiveProfile\\n',\n 'Deleted ForgottenUsername (tree)\\n',\n 'Read 5e2a7c95-94af-4b23-8724-deb13853726a (PageNode) from ForgottenUsername\\n',\n 'Deleted 5e2a7c95-94af-4b23-8724-deb13853726a (PageNode) from ForgottenUsername\\n',\n 'Deleted 9f1e8d94-4922-481b-9e14-212b66548900 (AttributeCollectorNode) from ForgottenUsername\\n',\n 'Deleted bf9ea8d5-9802-4f26-9664-a21840faac23 (IdentifyExistingUserNode) from ForgottenUsername\\n',\n 'Deleted d9a79f01-2ce3-4be2-a28a-975f35c3c8ca (EmailSuspendNode) from ForgottenUsername\\n',\n 'Deleted b93ce36e-1976-4610-b24f-8d6760b5463b (InnerTreeEvaluatorNode) from ForgottenUsername\\n',\n 'Deleted deleteMe (tree)\\n',\n 'Read 3c89697f-c114-4d36-907f-6c36f820cde7 (PageNode) from deleteMe\\n',\n 'Deleted 9cd184fc-9453-4666-b667-2875d9301b5e (DataStoreDecisionNode) from deleteMe\\n',\n 'Read 2d564be0-325e-439a-aeb0-6c884270c756 (PageNode) from deleteMe\\n',\n 'Deleted 68e23c54-0c9e-4991-9b25-daf306d6ec65 (ZeroPageLoginNode) from deleteMe\\n',\n 'Deleted 3c89697f-c114-4d36-907f-6c36f820cde7 (PageNode) from deleteMe\\n',\n 'Deleted fab1f53e-cda4-458a-b458-b07f75c75d5f (ValidatedUsernameNode) from deleteMe\\n',\n 'Deleted c22373f9-252b-4d0b-b80e-e4b392a17d98 (ValidatedPasswordNode) from deleteMe\\n',\n 'Deleted 2d564be0-325e-439a-aeb0-6c884270c756 (PageNode) from deleteMe\\n',\n 'Deleted 9d146833-e8d1-4802-8c35-0d7772290807 (DisplayUserNameNode) from deleteMe\\n',\n 'Deleted UpdatePassword (tree)\\n',\n 'Read 20237b34-26cb-4a0b-958f-abb422290d42 (PageNode) from UpdatePassword\\n',\n 'Read d018fcd1-4e22-4160-8c41-63bee51c9cb3 (PageNode) from UpdatePassword\\n',\n 'Deleted 0f0904e6-1da3-4cdb-9abf-0d2545016fab (AttributePresentDecisionNode) from UpdatePassword\\n',\n 'Deleted 20237b34-26cb-4a0b-958f-abb422290d42 (PageNode) from UpdatePassword\\n',\n 'Deleted 7d1deabe-cd98-49c8-943f-ca12305775f3 (DataStoreDecisionNode) from UpdatePassword\\n',\n 'Deleted fe2962fc-4db3-4066-8624-553649afc438 (ValidatedPasswordNode) from UpdatePassword\\n',\n 'Deleted 3990ce1f-cce6-435b-ae1c-f138e89411c1 (PatchObjectNode) from UpdatePassword\\n',\n 'Deleted a3d97b53-e38a-4b24-aed0-a021050eb744 (EmailSuspendNode) from UpdatePassword\\n',\n 'Deleted d018fcd1-4e22-4160-8c41-63bee51c9cb3 (PageNode) from UpdatePassword\\n',\n 'Deleted 21a99653-a7a7-47ee-b650-f493a84bba09 (ValidatedPasswordNode) from UpdatePassword\\n',\n 'Deleted d1b79744-493a-44fe-bc26-7d324a8caa4e (SessionDataNode) from UpdatePassword\\n',\n 'Deleted Login (tree)\\n',\n 'Read a12bc72f-ad97-4f1e-a789-a1fa3dd566c8 (PageNode) from Login\\n',\n 'Deleted 33b24514-3e50-4180-8f08-ab6f4e51b07e (InnerTreeEvaluatorNode) from Login\\n',\n 'Deleted 2998c1c9-f4c8-4a00-b2c6-3426783ee49d (DataStoreDecisionNode) from Login\\n',\n 'Deleted 7354982f-57b6-4b04-9ddc-f1dd1e1e07d0 (ValidatedUsernameNode) from Login\\n',\n 'Deleted bba3e0d8-8525-4e82-bf48-ac17f7988917 (IncrementLoginCountNode) from Login\\n',\n 'Deleted 0c80c39b-4813-4e67-b4fb-5a0bba85f994 (ValidatedPasswordNode) from Login\\n',\n 'Deleted a12bc72f-ad97-4f1e-a789-a1fa3dd566c8 (PageNode) from Login\\n',\n '[========================================] 100% | 8/8 | Deleted 8/8 journeys and 51/51 nodes.\\n',\n ];\n const chunks: Uint8Array[] = [];\n deleteJourneyCmd.stderr.on('data', (chunk) => {\n chunks.push(chunk);\n });\n deleteJourneyCmd.stderr.on('end', () => {\n const output = Buffer.concat(chunks)\n .toString()\n .replace(ansiEscapeCodes, '');\n try {\n for (const str of expected) {\n expect(output).toContain(str);\n }\n done();\n } catch (error) {\n done(error);\n }\n });\n },\n // increase timeout for long-running test\n 10 * 1000\n );\n\n it('\"frodo journey delete -a --no-deep\": should delete all journeys but none of their nodes', (done) => {\n const deleteJourneyCmd = spawn('frodo', [\n 'journey',\n 'delete',\n '-a',\n '--no-deep',\n 'frodo-dev',\n ]);\n const expected = [\n '[========================================] 100% | 8/8 | Deleted 8/8 journeys and 0/0 nodes.',\n '',\n ].join('\\n');\n const chunks: Uint8Array[] = [];\n deleteJourneyCmd.stderr.on('data', (chunk) => {\n chunks.push(chunk);\n });\n deleteJourneyCmd.stderr.on('end', () => {\n const output = Buffer.concat(chunks)\n .toString()\n .replace(ansiEscapeCodes, '');\n try {\n expect(output).toContain(expected);\n done();\n } catch (error) {\n done(error);\n }\n });\n });\n\n it('\"frodo journey delete -a --no-deep --verbose\": should delete all journeys but none of their nodes with verbose output', (done) => {\n const deleteJourneyCmd = spawn('frodo', [\n 'journey',\n 'delete',\n '-a',\n '--no-deep',\n '--verbose',\n 'frodo-dev',\n ]);\n const expected = [\n '[----------------------------------------] 0% | 0/8 | Deleting journeys...\\n',\n 'Deleted ResetPassword (tree)\\n',\n 'Deleted Registration (tree)\\n',\n 'Deleted PasswordGrant (tree)\\n',\n 'Deleted ProgressiveProfile (tree)\\n',\n 'Deleted ForgottenUsername (tree)\\n',\n 'Deleted deleteMe (tree)\\n',\n 'Deleted UpdatePassword (tree)\\n',\n 'Deleted Login (tree)\\n',\n '[========================================] 100% | 8/8 | Deleted 8/8 journeys and 0/0 nodes.\\n',\n ];\n const chunks: Uint8Array[] = [];\n deleteJourneyCmd.stderr.on('data', (chunk) => {\n chunks.push(chunk);\n });\n deleteJourneyCmd.stderr.on('end', () => {\n const output = Buffer.concat(chunks)\n .toString()\n .replace(ansiEscapeCodes, '');\n try {\n for (const str of expected) {\n expect(output).toContain(str);\n }\n done();\n } catch (error) {\n done(error);\n }\n });\n });\n});\n"],"mappings":"AAAA;AACA;AACA,SAASA,KAAT,EAAgBC,SAAhB,QAAiC,eAAjC;AAEA,MAAMC,eAAe,GACnB;AACA,6EAFF;AAIA;AACA;AACA;;AACAC,SAAS,CAAC,YAAY,CACpB;AACD,CAFQ,CAAT;AAIA;AACA;AACA;;AACAC,UAAU,CAAC,YAAY;EACrB;EACA,MAAMC,iBAAiB,GAAGJ,SAAS,CAAC,OAAD,EAAU,CAC3C,SAD2C,EAE3C,QAF2C,EAG3C,OAH2C,EAI3C,WAJ2C,CAAV,CAAnC;;EAMA,IAAII,iBAAiB,CAACC,MAAlB,IAA4BD,iBAAiB,CAACC,MAAlB,GAA2B,CAA3D,EAA8D;IAC5DC,OAAO,CAACC,KAAR,CAAcH,iBAAiB,CAACI,MAAlB,CAAyBC,QAAzB,EAAd;IACAH,OAAO,CAACI,GAAR,CAAYN,iBAAiB,CAACO,MAAlB,CAAyBF,QAAzB,EAAZ;EACD,CAXoB,CAarB;;;EACA,MAAMG,qBAAqB,GAAGZ,SAAS,CACrC,OADqC,EAErC,CAAC,SAAD,EAAY,QAAZ,EAAsB,gBAAtB,EAAwC,WAAxC,CAFqC,EAGrC;IACEa,GAAG,EAAG;EADR,CAHqC,CAAvC;;EAOA,IAAID,qBAAqB,CAACP,MAAtB,IAAgCO,qBAAqB,CAACP,MAAtB,GAA+B,CAAnE,EAAsE;IACpEC,OAAO,CAACC,KA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EtC,QAFsC,EAGtC,IAHsC,EAItC,WAJsC,EAKtC,WALsC,EAMtC,WANsC,CAAV,CAA9B;IAQA,MAAMmB,QAAQ,GAAG,CACf,8EADe,EAEf,gCAFe,EAGf,+BAHe,EAIf,gCAJe,EAKf,qCALe,EAMf,oCANe,EAOf,2BAPe,EAQf,iCARe,EASf,wBATe,EAUf,+FAVe,CAAjB;IAYA,MAAME,MAAoB,GAAG,EAA7B;IACAH,gBAAgB,CAACT,MAAjB,CAAwBa,EAAxB,CAA2B,MAA3B,EAAoCC,KAAD,IAAW;MAC5CF,MAAM,CAACG,IAAP,CAAYD,KAAZ;IACD,CAFD;IAGAL,gBAAgB,CAACT,MAAjB,CAAwBa,EAAxB,CAA2B,KAA3B,EAAkC,MAAM;MACtC,MAAMG,MAAM,GAAGC,MAAM,CAACC,MAAP,CAAcN,MAAd,EACZX,QADY,GAEZkB,OAFY,CAEJ1B,eAFI,EAEa,EAFb,CAAf;;MAGA,IAAI;QACF,KAAK,MAAM6B,GAAX,IAAkBZ,QAAlB,EAA4B;UAC1BU,MAAM,CAACJ,MAAD,CAAN,CAAeK,SAAf,CAAyBC,GAAzB;QACD;;QACDd,IAAI;MACL,CALD,CAKE,OAAOT,KAAP,EAAc;QACdS,IAAI,CAACT,KAAD,CAAJ;MACD;IACF,CAZD;EAaD,CAtCC,CAAF;AAuCD,CAhNO,CAAR"}
1
+ {"version":3,"file":"journey-delete.e2e.test_.js","names":["spawn","spawnSync","ansiEscapeCodes","beforeAll","beforeEach","deleteJourneysCmd","status","console","error","stderr","toString","log","stdout","importTestJourneysCmd","cwd","describe","it","done","deleteJourneyCmd","expected","join","chunks","on","chunk","push","output","Buffer","concat","replace","expect","toContain","str"],"sources":["cli/journey/journey-delete.e2e.test_.ts"],"sourcesContent":["/* eslint-disable no-console */\n// import { jest } from '@jest/globals';\nimport { spawn, spawnSync } from 'child_process';\n\nconst ansiEscapeCodes =\n // eslint-disable-next-line no-control-regex\n /[\\u001b\\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g;\n\n/**\n * Run once before running the suites in this file\n */\nbeforeAll(async () => {\n //\n});\n\n/**\n * Run before every test in every suite in this file\n */\nbeforeEach(async () => {\n // delete all journeys\n const deleteJourneysCmd = spawnSync('frodo', [\n 'journey',\n 'delete',\n '--all',\n 'frodo-dev',\n ]);\n if (deleteJourneysCmd.status && deleteJourneysCmd.status > 0) {\n console.error(deleteJourneysCmd.stderr.toString());\n console.log(deleteJourneysCmd.stdout.toString());\n }\n\n // import test journeys\n const importTestJourneysCmd = spawnSync(\n 'frodo',\n ['journey', 'import', '--all-separate', 'frodo-dev'],\n {\n cwd: `test/e2e/journey/delete`,\n }\n );\n if (importTestJourneysCmd.status && importTestJourneysCmd.status > 0) {\n console.error(importTestJourneysCmd.stderr.toString());\n console.log(importTestJourneysCmd.stdout.toString());\n }\n});\n\ndescribe('frodo journey delete', () => {\n it('\"frodo journey delete -i deleteMe\": should delete the deleteMe journey and all its nodes', (done) => {\n const deleteJourneyCmd = spawn('frodo', [\n 'journey',\n 'delete',\n '-i',\n 'deleteMe',\n 'frodo-dev',\n ]);\n const expected = ['✔ Deleted deleteMe and 7/7 nodes.', ''].join('\\n');\n const chunks: Uint8Array[] = [];\n deleteJourneyCmd.stderr.on('data', (chunk) => {\n chunks.push(chunk);\n });\n deleteJourneyCmd.stderr.on('end', () => {\n const output = Buffer.concat(chunks)\n .toString()\n .replace(ansiEscapeCodes, '');\n try {\n expect(output).toContain(expected);\n done();\n } catch (error) {\n done(error);\n }\n });\n });\n\n it('\"frodo journey delete -i deleteMe --verbose\": should delete the deleteMe journey and all its nodes with verbose output', (done) => {\n const deleteJourneyCmd = spawn('frodo', [\n 'journey',\n 'delete',\n '-i',\n 'deleteMe',\n '--verbose',\n 'frodo-dev',\n ]);\n const expected = [\n 'Deleted deleteMe (tree)\\n',\n 'Read 3c89697f-c114-4d36-907f-6c36f820cde7 (PageNode) from deleteMe\\n',\n 'Deleted 68e23c54-0c9e-4991-9b25-daf306d6ec65 (ZeroPageLoginNode) from deleteMe\\n',\n 'Deleted 9cd184fc-9453-4666-b667-2875d9301b5e (DataStoreDecisionNode) from deleteMe\\n',\n 'Read 2d564be0-325e-439a-aeb0-6c884270c756 (PageNode) from deleteMe\\n',\n 'Deleted 3c89697f-c114-4d36-907f-6c36f820cde7 (PageNode) from deleteMe\\n',\n 'Deleted fab1f53e-cda4-458a-b458-b07f75c75d5f (ValidatedUsernameNode) from deleteMe\\n',\n 'Deleted 2d564be0-325e-439a-aeb0-6c884270c756 (PageNode) from deleteMe\\n',\n 'Deleted 9d146833-e8d1-4802-8c35-0d7772290807 (DisplayUserNameNode) from deleteMe\\n',\n 'Deleted c22373f9-252b-4d0b-b80e-e4b392a17d98 (ValidatedPasswordNode) from deleteMe\\n',\n '✔ Deleted deleteMe and 7/7 nodes.\\n',\n ];\n const chunks: Uint8Array[] = [];\n deleteJourneyCmd.stderr.on('data', (chunk) => {\n chunks.push(chunk);\n });\n deleteJourneyCmd.stderr.on('end', () => {\n const output = Buffer.concat(chunks)\n .toString()\n .replace(ansiEscapeCodes, '');\n try {\n for (const str of expected) {\n expect(output).toContain(str);\n }\n done();\n } catch (error) {\n done(error);\n }\n });\n });\n\n it('\"frodo journey delete -i deleteMe --no-deep\": should delete the deleteMe journey and none of its nodes', (done) => {\n const deleteJourneyCmd = spawn('frodo', [\n 'journey',\n 'delete',\n '-i',\n 'deleteMe',\n '--no-deep',\n 'frodo-dev',\n ]);\n const expected = ['✔ Deleted deleteMe and 0/0 nodes.', ''].join('\\n');\n const chunks: Uint8Array[] = [];\n deleteJourneyCmd.stderr.on('data', (chunk) => {\n chunks.push(chunk);\n });\n deleteJourneyCmd.stderr.on('end', () => {\n const output = Buffer.concat(chunks)\n .toString()\n .replace(ansiEscapeCodes, '');\n try {\n expect(output).toContain(expected);\n done();\n } catch (error) {\n done(error);\n }\n });\n });\n\n it('\"frodo journey delete -i deleteMe --no-deep --verbose\": should delete the deleteMe journey and none of its nodes with verbose output', (done) => {\n const deleteJourneyCmd = spawn('frodo', [\n 'journey',\n 'delete',\n '-i',\n 'deleteMe',\n '--no-deep',\n '--verbose',\n 'frodo-dev',\n ]);\n const expected = [\n 'Deleted deleteMe (tree)\\n',\n '✔ Deleted deleteMe and 0/0 nodes.\\n',\n ];\n const chunks: Uint8Array[] = [];\n deleteJourneyCmd.stderr.on('data', (chunk) => {\n chunks.push(chunk);\n });\n deleteJourneyCmd.stderr.on('end', () => {\n const output = Buffer.concat(chunks)\n .toString()\n .replace(ansiEscapeCodes, '');\n try {\n for (const str of expected) {\n expect(output).toContain(str);\n }\n done();\n } catch (error) {\n done(error);\n }\n });\n });\n});\n\ndescribe('frodo journey delete --all', () => {\n it(\n '\"frodo journey delete -a\": should delete all journeys and all their nodes',\n (done) => {\n const deleteJourneyCmd = spawn('frodo', [\n 'journey',\n 'delete',\n '-a',\n 'frodo-dev',\n ]);\n const expected = [\n '[========================================] 100% | 8/8 | Deleted 8/8 journeys and 51/51 nodes.',\n '',\n ].join('\\n');\n const chunks: Uint8Array[] = [];\n deleteJourneyCmd.stderr.on('data', (chunk) => {\n chunks.push(chunk);\n });\n deleteJourneyCmd.stderr.on('end', () => {\n const output = Buffer.concat(chunks)\n .toString()\n .replace(ansiEscapeCodes, '');\n try {\n expect(output).toContain(expected);\n done();\n } catch (error) {\n done(error);\n }\n });\n },\n // increase timeout for long-running test\n 10 * 1000\n );\n\n it(\n '\"frodo journey delete -a --verbose\": should delete all journeys and all their nodes with verbose output',\n (done) => {\n const deleteJourneyCmd = spawn('frodo', [\n 'journey',\n 'delete',\n '-a',\n '--verbose',\n 'frodo-dev',\n ]);\n const expected = [\n '[----------------------------------------] 0% | 0/8 | Deleting journeys...\\n',\n 'Deleted ResetPassword (tree)\\n',\n 'Read cc3e1ed2-25f1-47bf-83c6-17084f8b2b2b (PageNode) from ResetPassword\\n',\n 'Deleted 06c97be5-7fdd-4739-aea1-ecc7fe082865 (EmailSuspendNode) from ResetPassword\\n',\n 'Deleted 989f0bf8-a328-4217-b82b-5275d79ca8bd (PatchObjectNode) from ResetPassword\\n',\n 'Deleted 21b8ddf3-0203-4ae1-ab05-51cf3a3a707a (IdentifyExistingUserNode) from ResetPassword\\n',\n 'Read e4c752f9-c625-48c9-9644-a58802fa9e9c (PageNode) from ResetPassword\\n',\n 'Deleted cc3e1ed2-25f1-47bf-83c6-17084f8b2b2b (PageNode) from ResetPassword\\n',\n 'Deleted 276afa7c-a680-4cf4-a5f6-d6c78191f5c9 (AttributeCollectorNode) from ResetPassword\\n',\n 'Deleted e4c752f9-c625-48c9-9644-a58802fa9e9c (PageNode) from ResetPassword\\n',\n 'Deleted 009c19c8-9572-47bb-adb2-1f092c559a43 (ValidatedPasswordNode) from ResetPassword\\n',\n 'Deleted Registration (tree)\\n',\n 'Read 0c091c49-f3af-48fb-ac6f-07fba0499dd6 (PageNode) from Registration\\n',\n 'Deleted d3ce2036-1523-4ce8-b1a2-895a2a036667 (AttributeCollectorNode) from Registration\\n',\n 'Deleted 0c091c49-f3af-48fb-ac6f-07fba0499dd6 (PageNode) from Registration\\n',\n 'Deleted 3d8709a1-f09f-4d1f-8094-2850e472c1db (ValidatedPasswordNode) from Registration\\n',\n 'Deleted 120c69d3-90b4-4ad4-b7af-380e8b119340 (KbaCreateNode) from Registration\\n',\n 'Deleted b4a0e915-c15d-4b83-9c9d-18347d645976 (AcceptTermsAndConditionsNode) from Registration\\n',\n 'Deleted ad5dcbb3-7335-49b7-b3e7-7d850bb88237 (CreateObjectNode) from Registration\\n',\n 'Deleted 7fcaf48e-a754-4959-858b-05b2933b825f (ValidatedUsernameNode) from Registration\\n',\n 'Deleted 97a15eb2-a015-4b6d-81a0-be78c3aa1a3b (IncrementLoginCountNode) from Registration\\n',\n 'Deleted PasswordGrant (tree)\\n',\n 'Read 6b9a715d-ea23-4eae-9a59-69797c147157 (PageNode) from PasswordGrant\\n',\n 'Deleted 59952413-9bc2-47e5-a9b2-b04c1d729e24 (UsernameCollectorNode) from PasswordGrant\\n',\n 'Deleted 6b9a715d-ea23-4eae-9a59-69797c147157 (PageNode) from PasswordGrant\\n',\n 'Deleted 8c217417-11dd-4a0f-a9e4-59c2390085be (PasswordCollectorNode) from PasswordGrant\\n',\n 'Deleted e2988546-a459-4c9a-b0e2-fa65ae136b34 (DataStoreDecisionNode) from PasswordGrant\\n',\n 'Deleted ProgressiveProfile (tree)\\n',\n 'Read a5aecad8-854a-4ed5-b719-ff6c90e858c0 (PageNode) from ProgressiveProfile\\n',\n 'Deleted 423a959a-a1b9-498a-b0f7-596b6b6e775a (PatchObjectNode) from ProgressiveProfile\\n',\n 'Deleted a1f45b44-5bf7-4c57-aa3f-75c619c7db8e (QueryFilterDecisionNode) from ProgressiveProfile\\n',\n 'Deleted 8afdaec3-275e-4301-bb53-34f03e6a4b29 (LoginCountDecisionNode) from ProgressiveProfile\\n',\n 'Deleted a5aecad8-854a-4ed5-b719-ff6c90e858c0 (PageNode) from ProgressiveProfile\\n',\n 'Deleted 0a042e10-b22e-4e02-86c4-65e26e775f7a (AttributeCollectorNode) from ProgressiveProfile\\n',\n 'Deleted ForgottenUsername (tree)\\n',\n 'Read 5e2a7c95-94af-4b23-8724-deb13853726a (PageNode) from ForgottenUsername\\n',\n 'Deleted 5e2a7c95-94af-4b23-8724-deb13853726a (PageNode) from ForgottenUsername\\n',\n 'Deleted 9f1e8d94-4922-481b-9e14-212b66548900 (AttributeCollectorNode) from ForgottenUsername\\n',\n 'Deleted bf9ea8d5-9802-4f26-9664-a21840faac23 (IdentifyExistingUserNode) from ForgottenUsername\\n',\n 'Deleted d9a79f01-2ce3-4be2-a28a-975f35c3c8ca (EmailSuspendNode) from ForgottenUsername\\n',\n 'Deleted b93ce36e-1976-4610-b24f-8d6760b5463b (InnerTreeEvaluatorNode) from ForgottenUsername\\n',\n 'Deleted deleteMe (tree)\\n',\n 'Read 3c89697f-c114-4d36-907f-6c36f820cde7 (PageNode) from deleteMe\\n',\n 'Deleted 9cd184fc-9453-4666-b667-2875d9301b5e (DataStoreDecisionNode) from deleteMe\\n',\n 'Read 2d564be0-325e-439a-aeb0-6c884270c756 (PageNode) from deleteMe\\n',\n 'Deleted 68e23c54-0c9e-4991-9b25-daf306d6ec65 (ZeroPageLoginNode) from deleteMe\\n',\n 'Deleted 3c89697f-c114-4d36-907f-6c36f820cde7 (PageNode) from deleteMe\\n',\n 'Deleted fab1f53e-cda4-458a-b458-b07f75c75d5f (ValidatedUsernameNode) from deleteMe\\n',\n 'Deleted c22373f9-252b-4d0b-b80e-e4b392a17d98 (ValidatedPasswordNode) from deleteMe\\n',\n 'Deleted 2d564be0-325e-439a-aeb0-6c884270c756 (PageNode) from deleteMe\\n',\n 'Deleted 9d146833-e8d1-4802-8c35-0d7772290807 (DisplayUserNameNode) from deleteMe\\n',\n 'Deleted UpdatePassword (tree)\\n',\n 'Read 20237b34-26cb-4a0b-958f-abb422290d42 (PageNode) from UpdatePassword\\n',\n 'Read d018fcd1-4e22-4160-8c41-63bee51c9cb3 (PageNode) from UpdatePassword\\n',\n 'Deleted 0f0904e6-1da3-4cdb-9abf-0d2545016fab (AttributePresentDecisionNode) from UpdatePassword\\n',\n 'Deleted 20237b34-26cb-4a0b-958f-abb422290d42 (PageNode) from UpdatePassword\\n',\n 'Deleted 7d1deabe-cd98-49c8-943f-ca12305775f3 (DataStoreDecisionNode) from UpdatePassword\\n',\n 'Deleted fe2962fc-4db3-4066-8624-553649afc438 (ValidatedPasswordNode) from UpdatePassword\\n',\n 'Deleted 3990ce1f-cce6-435b-ae1c-f138e89411c1 (PatchObjectNode) from UpdatePassword\\n',\n 'Deleted a3d97b53-e38a-4b24-aed0-a021050eb744 (EmailSuspendNode) from UpdatePassword\\n',\n 'Deleted d018fcd1-4e22-4160-8c41-63bee51c9cb3 (PageNode) from UpdatePassword\\n',\n 'Deleted 21a99653-a7a7-47ee-b650-f493a84bba09 (ValidatedPasswordNode) from UpdatePassword\\n',\n 'Deleted d1b79744-493a-44fe-bc26-7d324a8caa4e (SessionDataNode) from UpdatePassword\\n',\n 'Deleted Login (tree)\\n',\n 'Read a12bc72f-ad97-4f1e-a789-a1fa3dd566c8 (PageNode) from Login\\n',\n 'Deleted 33b24514-3e50-4180-8f08-ab6f4e51b07e (InnerTreeEvaluatorNode) from Login\\n',\n 'Deleted 2998c1c9-f4c8-4a00-b2c6-3426783ee49d (DataStoreDecisionNode) from Login\\n',\n 'Deleted 7354982f-57b6-4b04-9ddc-f1dd1e1e07d0 (ValidatedUsernameNode) from Login\\n',\n 'Deleted bba3e0d8-8525-4e82-bf48-ac17f7988917 (IncrementLoginCountNode) from Login\\n',\n 'Deleted 0c80c39b-4813-4e67-b4fb-5a0bba85f994 (ValidatedPasswordNode) from Login\\n',\n 'Deleted a12bc72f-ad97-4f1e-a789-a1fa3dd566c8 (PageNode) from Login\\n',\n '[========================================] 100% | 8/8 | Deleted 8/8 journeys and 51/51 nodes.\\n',\n ];\n const chunks: Uint8Array[] = [];\n deleteJourneyCmd.stderr.on('data', (chunk) => {\n chunks.push(chunk);\n });\n deleteJourneyCmd.stderr.on('end', () => {\n const output = Buffer.concat(chunks)\n .toString()\n .replace(ansiEscapeCodes, '');\n try {\n for (const str of expected) {\n expect(output).toContain(str);\n }\n done();\n } catch (error) {\n done(error);\n }\n });\n },\n // increase timeout for long-running test\n 10 * 1000\n );\n\n it('\"frodo journey delete -a --no-deep\": should delete all journeys but none of their nodes', (done) => {\n const deleteJourneyCmd = spawn('frodo', [\n 'journey',\n 'delete',\n '-a',\n '--no-deep',\n 'frodo-dev',\n ]);\n const expected = [\n '[========================================] 100% | 8/8 | Deleted 8/8 journeys and 0/0 nodes.',\n '',\n ].join('\\n');\n const chunks: Uint8Array[] = [];\n deleteJourneyCmd.stderr.on('data', (chunk) => {\n chunks.push(chunk);\n });\n deleteJourneyCmd.stderr.on('end', () => {\n const output = Buffer.concat(chunks)\n .toString()\n .replace(ansiEscapeCodes, '');\n try {\n expect(output).toContain(expected);\n done();\n } catch (error) {\n done(error);\n }\n });\n });\n\n it('\"frodo journey delete -a --no-deep --verbose\": should delete all journeys but none of their nodes with verbose output', (done) => {\n const deleteJourneyCmd = spawn('frodo', [\n 'journey',\n 'delete',\n '-a',\n '--no-deep',\n '--verbose',\n 'frodo-dev',\n ]);\n const expected = [\n '[----------------------------------------] 0% | 0/8 | Deleting journeys...\\n',\n 'Deleted ResetPassword (tree)\\n',\n 'Deleted Registration (tree)\\n',\n 'Deleted PasswordGrant (tree)\\n',\n 'Deleted ProgressiveProfile (tree)\\n',\n 'Deleted ForgottenUsername (tree)\\n',\n 'Deleted deleteMe (tree)\\n',\n 'Deleted UpdatePassword (tree)\\n',\n 'Deleted Login (tree)\\n',\n '[========================================] 100% | 8/8 | Deleted 8/8 journeys and 0/0 nodes.\\n',\n ];\n const chunks: Uint8Array[] = [];\n deleteJourneyCmd.stderr.on('data', (chunk) => {\n chunks.push(chunk);\n });\n deleteJourneyCmd.stderr.on('end', () => {\n const output = Buffer.concat(chunks)\n .toString()\n .replace(ansiEscapeCodes, '');\n try {\n for (const str of expected) {\n expect(output).toContain(str);\n }\n done();\n } catch (error) {\n done(error);\n }\n });\n });\n});\n"],"mappings":"AAAA;AACA;AACA,SAASA,KAAK,EAAEC,SAAS,QAAQ,eAAe;AAEhD,MAAMC,eAAe;AACnB;AACA,6EAA6E;;AAE/E;AACA;AACA;AACAC,SAAS,CAAC,YAAY;EACpB;AAAA,CACD,CAAC;;AAEF;AACA;AACA;AACAC,UAAU,CAAC,YAAY;EACrB;EACA,MAAMC,iBAAiB,GAAGJ,SAAS,CAAC,OAAO,EAAE,CAC3C,SAAS,EACT,QAAQ,EACR,OAAO,EACP,WAAW,CACZ,CAAC;EACF,IAAII,iBAAiB,CAACC,MAAM,IAAID,iBAAiB,CAACC,MAAM,GAAG,CAAC,EAAE;IAC5DC,OAAO,CAACC,KAAK,CAACH,iBAAiB,CAACI,MAAM,CAACC,QAAQ,EAAE,CAAC;IAClDH,OAAO,C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CAAC;AACJ,CAAC,CAAC"}
@@ -10,7 +10,8 @@ const {
10
10
  deleteJourneys
11
11
  } = Journey;
12
12
  const program = new Command('frodo journey delete');
13
- program.description('Delete journeys/trees.').helpOption('-h, --help', 'Help').showHelpAfterError().addArgument(common.hostArgumentM).addArgument(common.realmArgument).addArgument(common.userArgument).addArgument(common.passwordArgument).addOption(common.deploymentOption).addOption(common.insecureOption).addOption(new Option('-i, --journey-id <journey>', 'Name of a journey/tree. If specified, -a is ignored.')).addOption(new Option('-a, --all', 'Delete all the journeys/trees in a realm. Ignored with -i.')).addOption(new Option('--no-deep', 'No deep delete. This leaves orphaned configuration artifacts behind.')).addOption(new Option('--verbose', 'Verbose output during command execution. If specified, may or may not produce additional output.').default(false, 'off')).action( // implement command logic inside action handler
13
+ program.description('Delete journeys/trees.').helpOption('-h, --help', 'Help').showHelpAfterError().addArgument(common.hostArgumentM).addArgument(common.realmArgument).addArgument(common.userArgument).addArgument(common.passwordArgument).addOption(common.deploymentOption).addOption(common.insecureOption).addOption(new Option('-i, --journey-id <journey>', 'Name of a journey/tree. If specified, -a is ignored.')).addOption(new Option('-a, --all', 'Delete all the journeys/trees in a realm. Ignored with -i.')).addOption(new Option('--no-deep', 'No deep delete. This leaves orphaned configuration artifacts behind.')).addOption(new Option('--verbose', 'Verbose output during command execution. If specified, may or may not produce additional output.').default(false, 'off')).action(
14
+ // implement command logic inside action handler
14
15
  async (host, realm, user, password, options) => {
15
16
  state.default.session.setTenant(host);
16
17
  state.default.session.setRealm(realm);
@@ -18,23 +19,26 @@ async (host, realm, user, password, options) => {
18
19
  state.default.session.setPassword(password);
19
20
  state.default.session.setDeploymentType(options.type);
20
21
  state.default.session.setAllowInsecureConnection(options.insecure);
21
-
22
22
  if (await getTokens()) {
23
23
  // delete by id
24
24
  if (options.journeyId) {
25
25
  printMessage(`Deleting journey ${options.journeyId} in realm "${state.default.session.getRealm()}"...`);
26
26
  deleteJourney(options.journeyId, options);
27
- } // --all -a
27
+ }
28
+ // --all -a
28
29
  else if (options.all) {
29
30
  printMessage('Deleting all journeys...');
30
31
  deleteJourneys(options);
31
- } // unrecognized combination of options or no options
32
+ }
33
+ // unrecognized combination of options or no options
32
34
  else {
33
35
  printMessage('Unrecognized combination of options or no options...');
34
36
  program.help();
35
37
  }
36
38
  }
37
- } // end command logic inside action handler
39
+ }
40
+ // end command logic inside action handler
38
41
  );
42
+
39
43
  program.parse();
40
44
  //# sourceMappingURL=journey-delete.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"journey-delete.js","names":["Command","Option","Authenticate","Journey","state","common","printMessage","getTokens","deleteJourney","deleteJourneys","program","description","helpOption","showHelpAfterError","addArgument","hostArgumentM","realmArgument","userArgument","passwordArgument","addOption","deploymentOption","insecureOption","default","action","host","realm","user","password","options","session","setTenant","setRealm","setUsername","setPassword","setDeploymentType","type","setAllowInsecureConnection","insecure","journeyId","getRealm","all","help","parse"],"sources":["cli/journey/journey-delete.ts"],"sourcesContent":["import { Command, Option } from 'commander';\nimport { Authenticate, Journey, state } from '@rockcarver/frodo-lib';\nimport * as common from '../cmd_common';\nimport { printMessage } from '../../utils/Console';\n\nconst { getTokens } = Authenticate;\nconst { deleteJourney, deleteJourneys } = Journey;\n\nconst program = new Command('frodo journey delete');\n\nprogram\n .description('Delete journeys/trees.')\n .helpOption('-h, --help', 'Help')\n .showHelpAfterError()\n .addArgument(common.hostArgumentM)\n .addArgument(common.realmArgument)\n .addArgument(common.userArgument)\n .addArgument(common.passwordArgument)\n .addOption(common.deploymentOption)\n .addOption(common.insecureOption)\n .addOption(\n new Option(\n '-i, --journey-id <journey>',\n 'Name of a journey/tree. If specified, -a is ignored.'\n )\n )\n .addOption(\n new Option(\n '-a, --all',\n 'Delete all the journeys/trees in a realm. Ignored with -i.'\n )\n )\n .addOption(\n new Option(\n '--no-deep',\n 'No deep delete. This leaves orphaned configuration artifacts behind.'\n )\n )\n .addOption(\n new Option(\n '--verbose',\n 'Verbose output during command execution. If specified, may or may not produce additional output.'\n ).default(false, 'off')\n )\n .action(\n // implement command logic inside action handler\n async (host, realm, user, password, options) => {\n state.default.session.setTenant(host);\n state.default.session.setRealm(realm);\n state.default.session.setUsername(user);\n state.default.session.setPassword(password);\n state.default.session.setDeploymentType(options.type);\n state.default.session.setAllowInsecureConnection(options.insecure);\n if (await getTokens()) {\n // delete by id\n if (options.journeyId) {\n printMessage(\n `Deleting journey ${\n options.journeyId\n } in realm \"${state.default.session.getRealm()}\"...`\n );\n deleteJourney(options.journeyId, options);\n }\n // --all -a\n else if (options.all) {\n printMessage('Deleting all journeys...');\n deleteJourneys(options);\n }\n // unrecognized combination of options or no options\n else {\n printMessage('Unrecognized combination of options or no options...');\n program.help();\n }\n }\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,OAAT,EAAkBC,MAAlB,QAAgC,WAAhC;AACA,SAASC,YAAT,EAAuBC,OAAvB,EAAgCC,KAAhC,QAA6C,uBAA7C;AACA,OAAO,KAAKC,MAAZ,MAAwB,eAAxB;AACA,SAASC,YAAT,QAA6B,qBAA7B;AAEA,MAAM;EAAEC;AAAF,IAAgBL,YAAtB;AACA,MAAM;EAAEM,aAAF;EAAiBC;AAAjB,IAAoCN,OAA1C;AAEA,MAAMO,OAAO,GAAG,IAAIV,OAAJ,CAAY,sBAAZ,CAAhB;AAEAU,OAAO,CACJC,WADH,CACe,wBADf,EAEGC,UAFH,CAEc,YAFd,EAE4B,MAF5B,EAGGC,kBAHH,GAIGC,WAJH,CAIeT,MAAM,CAACU,aAJtB,EAKGD,WALH,CAKeT,MAAM,CAACW,aALtB,EAMGF,WANH,CAMeT,MAAM,CAACY,YANtB,EAOGH,WAPH,CAOeT,MAAM,CAACa,gBAPtB,EAQGC,SARH,CAQad,MAAM,CAACe,gBARpB,EASGD,SATH,CASad,MAAM,CAACgB,cATpB,EAUGF,SAVH,CAWI,IAAIlB,MAAJ,CACE,4BADF,EAEE,sDAFF,CAXJ,EAgBGkB,SAhBH,CAiBI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sDAAD,CAAZ;MACAI,OAAO,CAAC+B,IAAR;IACD;EACF;AACF,CAhEL,CAiEI;AAjEJ;AAoEA/B,OAAO,CAACgC,KAAR"}
1
+ {"version":3,"file":"journey-delete.js","names":["Command","Option","Authenticate","Journey","state","common","printMessage","getTokens","deleteJourney","deleteJourneys","program","description","helpOption","showHelpAfterError","addArgument","hostArgumentM","realmArgument","userArgument","passwordArgument","addOption","deploymentOption","insecureOption","default","action","host","realm","user","password","options","session","setTenant","setRealm","setUsername","setPassword","setDeploymentType","type","setAllowInsecureConnection","insecure","journeyId","getRealm","all","help","parse"],"sources":["cli/journey/journey-delete.ts"],"sourcesContent":["import { Command, Option } from 'commander';\nimport { Authenticate, Journey, state } from '@rockcarver/frodo-lib';\nimport * as common from '../cmd_common';\nimport { printMessage } from '../../utils/Console';\n\nconst { getTokens } = Authenticate;\nconst { deleteJourney, deleteJourneys } = Journey;\n\nconst program = new Command('frodo journey delete');\n\nprogram\n .description('Delete journeys/trees.')\n .helpOption('-h, --help', 'Help')\n .showHelpAfterError()\n .addArgument(common.hostArgumentM)\n .addArgument(common.realmArgument)\n .addArgument(common.userArgument)\n .addArgument(common.passwordArgument)\n .addOption(common.deploymentOption)\n .addOption(common.insecureOption)\n .addOption(\n new Option(\n '-i, --journey-id <journey>',\n 'Name of a journey/tree. If specified, -a is ignored.'\n )\n )\n .addOption(\n new Option(\n '-a, --all',\n 'Delete all the journeys/trees in a realm. Ignored with -i.'\n )\n )\n .addOption(\n new Option(\n '--no-deep',\n 'No deep delete. This leaves orphaned configuration artifacts behind.'\n )\n )\n .addOption(\n new Option(\n '--verbose',\n 'Verbose output during command execution. If specified, may or may not produce additional output.'\n ).default(false, 'off')\n )\n .action(\n // implement command logic inside action handler\n async (host, realm, user, password, options) => {\n state.default.session.setTenant(host);\n state.default.session.setRealm(realm);\n state.default.session.setUsername(user);\n state.default.session.setPassword(password);\n state.default.session.setDeploymentType(options.type);\n state.default.session.setAllowInsecureConnection(options.insecure);\n if (await getTokens()) {\n // delete by id\n if (options.journeyId) {\n printMessage(\n `Deleting journey ${\n options.journeyId\n } in realm \"${state.default.session.getRealm()}\"...`\n );\n deleteJourney(options.journeyId, options);\n }\n // --all -a\n else if (options.all) {\n printMessage('Deleting all journeys...');\n deleteJourneys(options);\n }\n // unrecognized combination of options or no options\n else {\n printMessage('Unrecognized combination of options or no options...');\n program.help();\n }\n }\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,OAAO,EAAEC,MAAM,QAAQ,WAAW;AAC3C,SAASC,YAAY,EAAEC,OAAO,EAAEC,KAAK,QAAQ,uBAAuB;AACpE,OAAO,KAAKC,MAAM,MAAM,eAAe;AACvC,SAASC,YAAY,QAAQ,qBAAqB;AAElD,MAAM;EAAEC;AAAU,CAAC,GAAGL,YAAY;AAClC,MAAM;EAAEM,aAAa;EAAEC;AAAe,CAAC,GAAGN,OAAO;AAEjD,MAAMO,OAAO,GAAG,IAAIV,OAAO,CAAC,sBAAsB,CAAC;AAEnDU,OAAO,CACJC,WAAW,CAAC,wBAAwB,CAAC,CACrCC,UAAU,CAAC,YAAY,EAAE,MAAM,CAAC,CAChCC,kBAAkB,EAAE,CACpBC,WAAW,CAACT,MAAM,CAACU,aAAa,CAAC,CACjCD,WAAW,CAACT,MAAM,CAACW,aAAa,CAAC,CACjCF,WAAW,CAACT,MAAM,CAACY,YAAY,CAAC,CAChCH,WAAW,CAACT,MAAM,CAACa,gBAAgB,CAAC,CACpCC,SAAS,CAACd,MAAM,CAACe,gBAAgB,CAAC,CAClCD,SAAS,CAACd,MAAM,CAACgB,cAAc,CAAC,CAChCF,SAAS,CACR,IAAIlB,MAAM,CACR,4BAA4B,EAC5B,sDAAsD,CACvD,CACF,CACAkB,SAAS,CACR,IAAIlB,MAAM,CACR,WAAW,EACX,4DAA4D,CAC7D,CACF,CACAkB,SAAS,CACR,IAAIlB,MAAM,CACR,WAAW,EACX,sEAAsE,CACvE,CACF,CACAkB,SAAS,CACR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ils;
18
18
  const program = new Command('frodo journey describe');
19
- program.description('If -h is supplied, describe the journey/tree indicated by -i, or all journeys/trees in the realm if no -i is supplied, otherwise describe the journey/tree export file indicated by -f.').helpOption('-h, --help', 'Help').showHelpAfterError().addArgument(common.hostArgument).addArgument(common.realmArgument).addArgument(common.userArgument).addArgument(common.passwordArgument).addOption(common.deploymentOption).addOption(common.insecureOption).addOption(common.verboseOption).addOption(common.debugOption).addOption(new Option('-i, --journey-id <journey>', 'Name of a journey/tree. If specified, -a and -A are ignored.')).addOption(new Option('-f, --file <file>', 'Name of the journey export file to describe. Ignored with -A.')).addOption(new Option('-F, --output-file <file>', 'Name of the file to write the output to.')).addOption(new Option('--markdown', 'Output in markdown.')).addOption(new Option('-o, --override-version <version>', "Override version. Notation: '<major>.<minor>.<patch>' e.g. '7.2.0'. Override detected version with any version. This is helpful in order to check if journeys in one environment would be compatible running in another environment (e.g. in preparation of migrating from on-prem to ForgeRock Identity Cloud.")).action( // implement command logic inside action handler
19
+ program.description('If -h is supplied, describe the journey/tree indicated by -i, or all journeys/trees in the realm if no -i is supplied, otherwise describe the journey/tree export file indicated by -f.').helpOption('-h, --help', 'Help').showHelpAfterError().addArgument(common.hostArgument).addArgument(common.realmArgument).addArgument(common.userArgument).addArgument(common.passwordArgument).addOption(common.deploymentOption).addOption(common.insecureOption).addOption(common.verboseOption).addOption(common.debugOption).addOption(new Option('-i, --journey-id <journey>', 'Name of a journey/tree. If specified, -a and -A are ignored.')).addOption(new Option('-f, --file <file>', 'Name of the journey export file to describe. Ignored with -A.')).addOption(new Option('-F, --output-file <file>', 'Name of the file to write the output to.')).addOption(new Option('--markdown', 'Output in markdown.')).addOption(new Option('-o, --override-version <version>', "Override version. Notation: '<major>.<minor>.<patch>' e.g. '7.2.0'. Override detected version with any version. This is helpful in order to check if journeys in one environment would be compatible running in another environment (e.g. in preparation of migrating from on-prem to ForgeRock Identity Cloud.")).action(
20
+ // implement command logic inside action handler
20
21
  async (host, realm, user, password, options) => {
21
22
  state.default.session.setTenant(host);
22
23
  state.default.session.setRealm(realm);
@@ -26,49 +27,49 @@ async (host, realm, user, password, options) => {
26
27
  state.default.session.setAllowInsecureConnection(options.insecure);
27
28
  state.default.session.setVerbose(options.verbose);
28
29
  state.default.session.setDebug(options.debug);
29
- if (options.outputFile) state.default.session.setOutputFile(options.outputFile); // TODO: review checks for arguments
30
-
30
+ if (options.outputFile) state.default.session.setOutputFile(options.outputFile);
31
+ // TODO: review checks for arguments
31
32
  if (typeof host === 'undefined' || typeof options.file !== 'undefined') {
32
33
  if (typeof host === 'undefined' && typeof options.file === 'undefined') {
33
34
  printMessage('Need either [host] or -f.', 'error');
34
35
  process.exitCode = 1;
35
36
  return;
36
37
  }
37
-
38
38
  printMessage(`Describing local journey file ${options.file}...`);
39
-
40
39
  try {
41
40
  var _fileData$tree, _fileData$tree2;
42
-
43
41
  // override version
44
42
  if (typeof options.overrideVersion !== 'undefined') {
45
43
  state.default.session.setAmVersion(options.overrideVersion);
46
44
  }
47
-
48
45
  const fileData = JSON.parse(fs.readFileSync(options.file, 'utf8'));
49
- let journeyData; // single or multi tree export?
46
+ let journeyData;
47
+ // single or multi tree export?
50
48
  // multi - by id
51
-
52
49
  if (typeof options.journeyId !== 'undefined' && fileData.trees && fileData.trees[options.journeyId]) {
53
50
  journeyData = fileData.trees[options.journeyId];
54
- } // multi - first
51
+ }
52
+ // multi - first
55
53
  else if (typeof options.journeyId === 'undefined' && fileData.trees) {
56
54
  [journeyData] = Object.values(fileData.trees);
57
- } // single - by id
55
+ }
56
+ // single - by id
58
57
  else if (typeof options.journeyId !== 'undefined' && options.journeyId === ((_fileData$tree = fileData.tree) === null || _fileData$tree === void 0 ? void 0 : _fileData$tree._id)) {
59
58
  journeyData = fileData;
60
- } // single
59
+ }
60
+ // single
61
61
  else if (typeof options.journeyId === 'undefined' && (_fileData$tree2 = fileData.tree) !== null && _fileData$tree2 !== void 0 && _fileData$tree2._id) {
62
62
  journeyData = fileData;
63
- } // no journey/tree found
63
+ }
64
+ // no journey/tree found
64
65
  else {
65
66
  throw new Error(typeof options.journeyId === 'undefined' ? `No journey found in ${options.file}` : `Journey '${options.journeyId}' not found in ${options.file}`);
66
- } // ANSI text output
67
-
68
-
67
+ }
68
+ // ANSI text output
69
69
  if (!options.markdown) {
70
70
  await describeJourney(journeyData, createFileParamTreeExportResolver(options.file));
71
- } // Markdown output
71
+ }
72
+ // Markdown output
72
73
  else {
73
74
  // reset output file
74
75
  if (options.outputFile) saveTextToFile('', options.outputFile);
@@ -79,24 +80,23 @@ async (host, realm, user, password, options) => {
79
80
  process.exitCode = 1;
80
81
  }
81
82
  } else if (await getTokens()) {
82
- printMessage(`Describing journey(s) in realm "${state.default.session.getRealm()}"...`); // override version
83
-
83
+ printMessage(`Describing journey(s) in realm "${state.default.session.getRealm()}"...`);
84
+ // override version
84
85
  if (typeof options.overrideVersion !== 'undefined') {
85
86
  state.default.session.setAmVersion(options.overrideVersion);
86
87
  }
87
-
88
88
  if (typeof options.journeyId === 'undefined') {
89
89
  let journeys = [];
90
90
  journeys = await getJourneys();
91
-
92
91
  for (const journey of journeys) {
93
92
  try {
94
93
  // eslint-disable-next-line no-await-in-loop, dot-notation
95
- const treeData = await exportJourney(journey['_id']); // ANSI text output
96
-
94
+ const treeData = await exportJourney(journey['_id']);
95
+ // ANSI text output
97
96
  if (!options.markdown) {
98
97
  await describeJourney(treeData);
99
- } // Markdown output
98
+ }
99
+ // Markdown output
100
100
  else {
101
101
  // reset output file
102
102
  if (options.outputFile) saveTextToFile('', options.outputFile);
@@ -109,11 +109,12 @@ async (host, realm, user, password, options) => {
109
109
  }
110
110
  } else {
111
111
  try {
112
- const treeData = await exportJourney(options.journeyId); // ANSI text output
113
-
112
+ const treeData = await exportJourney(options.journeyId);
113
+ // ANSI text output
114
114
  if (!options.markdown) {
115
115
  await describeJourney(treeData);
116
- } // Markdown output
116
+ }
117
+ // Markdown output
117
118
  else {
118
119
  // reset output file
119
120
  if (options.outputFile) saveTextToFile('', options.outputFile);
@@ -125,7 +126,9 @@ async (host, realm, user, password, options) => {
125
126
  }
126
127
  }
127
128
  }
128
- } // end command logic inside action handler
129
+ }
130
+ // end command logic inside action handler
129
131
  );
132
+
130
133
  program.parse();
131
134
  //# sourceMappingURL=journey-describe.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"journey-describe.js","names":["fs","Command","Option","Authenticate","ExportImportUtils","Journey","state","describeJourney","describeJourneyMd","common","printMessage","getTokens","getJourneys","exportJourney","createFileParamTreeExportResolver","saveTextToFile","program","description","helpOption","showHelpAfterError","addArgument","hostArgument","realmArgument","userArgument","passwordArgument","addOption","deploymentOption","insecureOption","verboseOption","debugOption","action","host","realm","user","password","options","default","session","setTenant","setRealm","setUsername","setPassword","setDeploymentType","type","setAllowInsecureConnection","insecure","setVerbose","verbose","setDebug","debug","outputFile","setOutputFile","file","process","exitCode","overrideVersion","setAmVersion","fileData","JSON","parse","readFileSync","journeyData","journeyId","trees","Object","values","tree","_id","Error","markdown","error","message","getRealm","journeys","journey","treeData"],"sources":["cli/journey/journey-describe.ts"],"sourcesContent":["import fs from 'fs';\nimport { Command, Option } from 'commander';\nimport {\n Authenticate,\n ExportImportUtils,\n Journey,\n state,\n} from '@rockcarver/frodo-lib';\nimport { describeJourney, describeJourneyMd } from '../../ops/JourneyOps';\nimport * as common from '../cmd_common.js';\nimport { printMessage } from '../../utils/Console';\n\nconst { getTokens } = Authenticate;\nconst { getJourneys, exportJourney, createFileParamTreeExportResolver } =\n Journey;\nconst { saveTextToFile } = ExportImportUtils;\n\nconst program = new Command('frodo journey describe');\n\nprogram\n .description(\n 'If -h is supplied, describe the journey/tree indicated by -i, or all journeys/trees in the realm if no -i is supplied, otherwise describe the journey/tree export file indicated by -f.'\n )\n .helpOption('-h, --help', 'Help')\n .showHelpAfterError()\n .addArgument(common.hostArgument)\n .addArgument(common.realmArgument)\n .addArgument(common.userArgument)\n .addArgument(common.passwordArgument)\n .addOption(common.deploymentOption)\n .addOption(common.insecureOption)\n .addOption(common.verboseOption)\n .addOption(common.debugOption)\n .addOption(\n new Option(\n '-i, --journey-id <journey>',\n 'Name of a journey/tree. If specified, -a and -A are ignored.'\n )\n )\n .addOption(\n new Option(\n '-f, --file <file>',\n 'Name of the journey export file to describe. Ignored with -A.'\n )\n )\n .addOption(\n new Option(\n '-F, --output-file <file>',\n 'Name of the file to write the output to.'\n )\n )\n .addOption(new Option('--markdown', 'Output in markdown.'))\n .addOption(\n new Option(\n '-o, --override-version <version>',\n \"Override version. Notation: '<major>.<minor>.<patch>' e.g. '7.2.0'. Override detected version with any version. This is helpful in order to check if journeys in one environment would be compatible running in another environment (e.g. in preparation of migrating from on-prem to ForgeRock Identity Cloud.\"\n )\n )\n .action(\n // implement command logic inside action handler\n async (host, realm, user, password, options) => {\n state.default.session.setTenant(host);\n state.default.session.setRealm(realm);\n state.default.session.setUsername(user);\n state.default.session.setPassword(password);\n state.default.session.setDeploymentType(options.type);\n state.default.session.setAllowInsecureConnection(options.insecure);\n state.default.session.setVerbose(options.verbose);\n state.default.session.setDebug(options.debug);\n if (options.outputFile)\n state.default.session.setOutputFile(options.outputFile);\n // TODO: review checks for arguments\n if (typeof host === 'undefined' || typeof options.file !== 'undefined') {\n if (\n typeof host === 'undefined' &&\n typeof options.file === 'undefined'\n ) {\n printMessage('Need either [host] or -f.', 'error');\n process.exitCode = 1;\n return;\n }\n printMessage(`Describing local journey file ${options.file}...`);\n try {\n // override version\n if (typeof options.overrideVersion !== 'undefined') {\n state.default.session.setAmVersion(options.overrideVersion);\n }\n const fileData = JSON.parse(fs.readFileSync(options.file, 'utf8'));\n let journeyData;\n // single or multi tree export?\n // multi - by id\n if (\n typeof options.journeyId !== 'undefined' &&\n fileData.trees &&\n fileData.trees[options.journeyId]\n ) {\n journeyData = fileData.trees[options.journeyId];\n }\n // multi - first\n else if (typeof options.journeyId === 'undefined' && fileData.trees) {\n [journeyData] = Object.values(fileData.trees);\n }\n // single - by id\n else if (\n typeof options.journeyId !== 'undefined' &&\n options.journeyId === fileData.tree?._id\n ) {\n journeyData = fileData;\n }\n // single\n else if (\n typeof options.journeyId === 'undefined' &&\n fileData.tree?._id\n ) {\n journeyData = fileData;\n }\n // no journey/tree found\n else {\n throw new Error(\n typeof options.journeyId === 'undefined'\n ? `No journey found in ${options.file}`\n : `Journey '${options.journeyId}' not found in ${options.file}`\n );\n }\n // ANSI text output\n if (!options.markdown) {\n await describeJourney(\n journeyData,\n createFileParamTreeExportResolver(options.file)\n );\n }\n // Markdown output\n else {\n // reset output file\n if (options.outputFile) saveTextToFile('', options.outputFile);\n await describeJourneyMd(\n journeyData,\n createFileParamTreeExportResolver(options.file)\n );\n }\n } catch (error) {\n printMessage(error.message, 'error');\n process.exitCode = 1;\n }\n } else if (await getTokens()) {\n printMessage(\n `Describing journey(s) in realm \"${state.default.session.getRealm()}\"...`\n );\n // override version\n if (typeof options.overrideVersion !== 'undefined') {\n state.default.session.setAmVersion(options.overrideVersion);\n }\n if (typeof options.journeyId === 'undefined') {\n let journeys = [];\n journeys = await getJourneys();\n for (const journey of journeys) {\n try {\n // eslint-disable-next-line no-await-in-loop, dot-notation\n const treeData = await exportJourney(journey['_id']);\n // ANSI text output\n if (!options.markdown) {\n await describeJourney(treeData);\n }\n // Markdown output\n else {\n // reset output file\n if (options.outputFile) saveTextToFile('', options.outputFile);\n await describeJourneyMd(treeData);\n }\n } catch (error) {\n printMessage(error.message, 'error');\n process.exitCode = 1;\n }\n }\n } else {\n try {\n const treeData = await exportJourney(options.journeyId);\n // ANSI text output\n if (!options.markdown) {\n await describeJourney(treeData);\n }\n // Markdown output\n else {\n // reset output file\n if (options.outputFile) saveTextToFile('', options.outputFile);\n await describeJourneyMd(treeData);\n }\n } catch (error) {\n printMessage(error.message, 'error');\n process.exitCode = 1;\n }\n }\n }\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,OAAOA,EAAP,MAAe,IAAf;AACA,SAASC,OAAT,EAAkBC,MAAlB,QAAgC,WA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oE,QAAD,CAArB;UACD,CAFD,CAGA;UAHA,KAIK;YACH;YACA,IAAIxC,OAAO,CAACe,UAAZ,EAAwBnC,cAAc,CAAC,EAAD,EAAKoB,OAAO,CAACe,UAAb,CAAd;YACxB,MAAM1C,iBAAiB,CAACmE,QAAD,CAAvB;UACD;QACF,CAbD,CAaE,OAAOL,KAAP,EAAc;UACd5D,YAAY,CAAC4D,KAAK,CAACC,OAAP,EAAgB,OAAhB,CAAZ;UACAlB,OAAO,CAACC,QAAR,GAAmB,CAAnB;QACD;MACF;IACF,CAtBD,MAsBO;MACL,IAAI;QACF,MAAMqB,QAAQ,GAAG,MAAM9D,aAAa,CAACsB,OAAO,CAAC2B,SAAT,CAApC,CADE,CAEF;;QACA,IAAI,CAAC3B,OAAO,CAACkC,QAAb,EAAuB;UACrB,MAAM9D,eAAe,CAACoE,QAAD,CAArB;QACD,CAFD,CAGA;QAHA,KAIK;UACH;UACA,IAAIxC,OAAO,CAACe,UAAZ,EAAwBnC,cAAc,CAAC,EAAD,EAAKoB,OAAO,CAACe,UAAb,CAAd;UACxB,MAAM1C,iBAAiB,CAACmE,QAAD,CAAvB;QACD;MACF,CAZD,CAYE,OAAOL,KAAP,EAAc;QACd5D,YAAY,CAAC4D,KAAK,CAACC,OAAP,EAAgB,OAAhB,CAAZ;QACAlB,OAAO,CAACC,QAAR,GAAmB,CAAnB;MACD;IACF;EACF;AACF,CA9KL,CA+KI;AA/KJ;AAkLAtC,OAAO,CAAC2C,KAAR"}
1
+ {"version":3,"file":"journey-describe.js","names":["fs","Command","Option","Authenticate","ExportImportUtils","Journey","state","describeJourney","describeJourneyMd","common","printMessage","getTokens","getJourneys","exportJourney","createFileParamTreeExportResolver","saveTextToFile","program","description","helpOption","showHelpAfterError","addArgument","hostArgument","realmArgument","userArgument","passwordArgument","addOption","deploymentOption","insecureOption","verboseOption","debugOption","action","host","realm","user","password","options","default","session","setTenant","setRealm","setUsername","setPassword","setDeploymentType","type","setAllowInsecureConnection","insecure","setVerbose","verbose","setDebug","debug","outputFile","setOutputFile","file","process","exitCode","overrideVersion","setAmVersion","fileData","JSON","parse","readFileSync","journeyData","journeyId","trees","Object","values","tree","_id","Error","markdown","error","message","getRealm","journeys","journey","treeData"],"sources":["cli/journey/journey-describe.ts"],"sourcesContent":["import fs from 'fs';\nimport { Command, Option } from 'commander';\nimport {\n Authenticate,\n ExportImportUtils,\n Journey,\n state,\n} from '@rockcarver/frodo-lib';\nimport { describeJourney, describeJourneyMd } from '../../ops/JourneyOps';\nimport * as common from '../cmd_common.js';\nimport { printMessage } from '../../utils/Console';\n\nconst { getTokens } = Authenticate;\nconst { getJourneys, exportJourney, createFileParamTreeExportResolver } =\n Journey;\nconst { saveTextToFile } = ExportImportUtils;\n\nconst program = new Command('frodo journey describe');\n\nprogram\n .description(\n 'If -h is supplied, describe the journey/tree indicated by -i, or all journeys/trees in the realm if no -i is supplied, otherwise describe the journey/tree export file indicated by -f.'\n )\n .helpOption('-h, --help', 'Help')\n .showHelpAfterError()\n .addArgument(common.hostArgument)\n .addArgument(common.realmArgument)\n .addArgument(common.userArgument)\n .addArgument(common.passwordArgument)\n .addOption(common.deploymentOption)\n .addOption(common.insecureOption)\n .addOption(common.verboseOption)\n .addOption(common.debugOption)\n .addOption(\n new Option(\n '-i, --journey-id <journey>',\n 'Name of a journey/tree. If specified, -a and -A are ignored.'\n )\n )\n .addOption(\n new Option(\n '-f, --file <file>',\n 'Name of the journey export file to describe. Ignored with -A.'\n )\n )\n .addOption(\n new Option(\n '-F, --output-file <file>',\n 'Name of the file to write the output to.'\n )\n )\n .addOption(new Option('--markdown', 'Output in markdown.'))\n .addOption(\n new Option(\n '-o, --override-version <version>',\n \"Override version. Notation: '<major>.<minor>.<patch>' e.g. '7.2.0'. Override detected version with any version. This is helpful in order to check if journeys in one environment would be compatible running in another environment (e.g. in preparation of migrating from on-prem to ForgeRock Identity Cloud.\"\n )\n )\n .action(\n // implement command logic inside action handler\n async (host, realm, user, password, options) => {\n state.default.session.setTenant(host);\n state.default.session.setRealm(realm);\n state.default.session.setUsername(user);\n state.default.session.setPassword(password);\n state.default.session.setDeploymentType(options.type);\n state.default.session.setAllowInsecureConnection(options.insecure);\n state.default.session.setVerbose(options.verbose);\n state.default.session.setDebug(options.debug);\n if (options.outputFile)\n state.default.session.setOutputFile(options.outputFile);\n // TODO: review checks for arguments\n if (typeof host === 'undefined' || typeof options.file !== 'undefined') {\n if (\n typeof host === 'undefined' &&\n typeof options.file === 'undefined'\n ) {\n printMessage('Need either [host] or -f.', 'error');\n process.exitCode = 1;\n return;\n }\n printMessage(`Describing local journey file ${options.file}...`);\n try {\n // override version\n if (typeof options.overrideVersion !== 'undefined') {\n state.default.session.setAmVersion(options.overrideVersion);\n }\n const fileData = JSON.parse(fs.readFileSync(options.file, 'utf8'));\n let journeyData;\n // single or multi tree export?\n // multi - by id\n if (\n typeof options.journeyId !== 'undefined' &&\n fileData.trees &&\n fileData.trees[options.journeyId]\n ) {\n journeyData = fileData.trees[options.journeyId];\n }\n // multi - first\n else if (typeof options.journeyId === 'undefined' && fileData.trees) {\n [journeyData] = Object.values(fileData.trees);\n }\n // single - by id\n else if (\n typeof options.journeyId !== 'undefined' &&\n options.journeyId === fileData.tree?._id\n ) {\n journeyData = fileData;\n }\n // single\n else if (\n typeof options.journeyId === 'undefined' &&\n fileData.tree?._id\n ) {\n journeyData = fileData;\n }\n // no journey/tree found\n else {\n throw new Error(\n typeof options.journeyId === 'undefined'\n ? `No journey found in ${options.file}`\n : `Journey '${options.journeyId}' not found in ${options.file}`\n );\n }\n // ANSI text output\n if (!options.markdown) {\n await describeJourney(\n journeyData,\n createFileParamTreeExportResolver(options.file)\n );\n }\n // Markdown output\n else {\n // reset output file\n if (options.outputFile) saveTextToFile('', options.outputFile);\n await describeJourneyMd(\n journeyData,\n createFileParamTreeExportResolver(options.file)\n );\n }\n } catch (error) {\n printMessage(error.message, 'error');\n process.exitCode = 1;\n }\n } else if (await getTokens()) {\n printMessage(\n `Describing journey(s) in realm \"${state.default.session.getRealm()}\"...`\n );\n // override version\n if (typeof options.overrideVersion !== 'undefined') {\n state.default.session.setAmVersion(options.overrideVersion);\n }\n if (typeof options.journeyId === 'undefined') {\n let journeys = [];\n journeys = await getJourneys();\n for (const journey of journeys) {\n try {\n // eslint-disable-next-line no-await-in-loop, dot-notation\n const treeData = await exportJourney(journey['_id']);\n // ANSI text output\n if (!options.markdown) {\n await describeJourney(treeData);\n }\n // Markdown output\n else {\n // reset output file\n if (options.outputFile) saveTextToFile('', options.outputFile);\n await describeJourneyMd(treeData);\n }\n } catch (error) {\n printMessage(error.message, 'error');\n process.exitCode = 1;\n }\n }\n } else {\n try {\n const treeData = await exportJourney(options.journeyId);\n // ANSI text output\n if (!options.markdown) {\n await describeJourney(treeData);\n }\n // Markdown output\n else {\n // reset output file\n if (options.outputFile) saveTextToFile('', options.outputFile);\n await describeJourneyMd(treeData);\n }\n } catch (error) {\n printMessage(error.message, 'error');\n process.exitCode = 1;\n }\n }\n }\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,OAAOA,EAAE,MAAM,IAAI;AACnB,SAASC,OAAO,EAAEC,MAAM,QAAQ,WAAW;AAC3C,SACEC,YAAY,EACZC,iBAAiB,EACjBC,OAAO,EACPC,KAAK,QACA,uBAAuB;AAC9B,SAASC,eAAe,EAAEC,iBAAiB,QAAQ,sBAAsB;AACzE,OAAO,KAAKC,MAAM,MAAM,kBAAkB;AAC1C,SAASC,YAAY,QAAQ,qBAAqB;AAElD,MAAM;EAAEC;AAAU,CAAC,GAAGR,YAAY;AAClC,MAAM;EAAES,WAAW;EAAEC,aAAa;EAAEC;AAAkC,CAAC,GACrET,OAAO;AACT,MAAM;EAAEU;AAAe,CAAC,GAAGX,iBAAiB;AAE5C,MAAMY,OAAO,GAAG,IAAIf,OAAO,CAAC,wBAAwB,CAAC;AAErDe,OAAO,CACJC,WAAW,CACV,yLAAyL,CAC1L,CACAC,UAAU,CAAC,YAAY,EAAE,M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AU,EAAEnC,cAAc,CAAC,EAAE,EAAEoB,OAAO,CAACe,UAAU,CAAC;UAC9D,MAAM1C,iBAAiB,CAACmE,QAAQ,CAAC;QACnC;MACF,CAAC,CAAC,OAAOL,KAAK,EAAE;QACd5D,YAAY,CAAC4D,KAAK,CAACC,OAAO,EAAE,OAAO,CAAC;QACpClB,OAAO,CAACC,QAAQ,GAAG,CAAC;MACtB;IACF;EACF;AACF;AACA;AAAA,CACD;;AAEHtC,OAAO,CAAC2C,KAAK,EAAE"}
@@ -9,13 +9,15 @@ const {
9
9
  disableJourney
10
10
  } = Journey;
11
11
  const program = new Command('frodo journey disable');
12
- program.description('Disable journeys/trees.').helpOption('-h, --help', 'Help').showHelpAfterError().addArgument(common.hostArgumentM).addArgument(common.realmArgument).addArgument(common.userArgument).addArgument(common.passwordArgument).addOption(common.deploymentOption).addOption(common.insecureOption).addOption(new Option('-i, --journey-id <journey>', 'Name of a journey/tree.')) // .addOption(
12
+ program.description('Disable journeys/trees.').helpOption('-h, --help', 'Help').showHelpAfterError().addArgument(common.hostArgumentM).addArgument(common.realmArgument).addArgument(common.userArgument).addArgument(common.passwordArgument).addOption(common.deploymentOption).addOption(common.insecureOption).addOption(new Option('-i, --journey-id <journey>', 'Name of a journey/tree.'))
13
+ // .addOption(
13
14
  // new Option(
14
15
  // '-a, --all',
15
16
  // 'Disable all the journeys/trees in a realm. Ignored with -i.'
16
17
  // )
17
18
  // )
18
- .action( // implement command logic inside action handler
19
+ .action(
20
+ // implement command logic inside action handler
19
21
  async (host, realm, user, password, options) => {
20
22
  state.default.session.setTenant(host);
21
23
  state.default.session.setRealm(realm);
@@ -23,24 +25,25 @@ async (host, realm, user, password, options) => {
23
25
  state.default.session.setPassword(password);
24
26
  state.default.session.setDeploymentType(options.type);
25
27
  state.default.session.setAllowInsecureConnection(options.insecure);
26
-
27
28
  if (await getTokens()) {
28
29
  // enable
29
30
  if (options.journeyId) {
30
31
  showSpinner(`Disabling journey ${options.journeyId}...`);
31
-
32
32
  if (await disableJourney(options.journeyId)) {
33
33
  succeedSpinner(`Disabled journey ${options.journeyId}.`);
34
34
  } else {
35
35
  failSpinner(`Disabling journey ${options.journeyId} failed.`);
36
36
  }
37
- } // unrecognized combination of options or no options
37
+ }
38
+ // unrecognized combination of options or no options
38
39
  else {
39
40
  printMessage('Unrecognized combination of options or no options...');
40
41
  program.help();
41
42
  }
42
43
  }
43
- } // end command logic inside action handler
44
+ }
45
+ // end command logic inside action handler
44
46
  );
47
+
45
48
  program.parse();
46
49
  //# sourceMappingURL=journey-disable.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"journey-disable.js","names":["Command","Option","Authenticate","Journey","state","common","showSpinner","failSpinner","succeedSpinner","printMessage","getTokens","disableJourney","program","description","helpOption","showHelpAfterError","addArgument","hostArgumentM","realmArgument","userArgument","passwordArgument","addOption","deploymentOption","insecureOption","action","host","realm","user","password","options","default","session","setTenant","setRealm","setUsername","setPassword","setDeploymentType","type","setAllowInsecureConnection","insecure","journeyId","help","parse"],"sources":["cli/journey/journey-disable.ts"],"sourcesContent":["import { Command, Option } from 'commander';\nimport { Authenticate, Journey, state } from '@rockcarver/frodo-lib';\nimport * as common from '../cmd_common';\nimport {\n showSpinner,\n failSpinner,\n succeedSpinner,\n printMessage,\n} from '../../utils/Console';\n\nconst { getTokens } = Authenticate;\nconst { disableJourney } = Journey;\n\nconst program = new Command('frodo journey disable');\n\nprogram\n .description('Disable journeys/trees.')\n .helpOption('-h, --help', 'Help')\n .showHelpAfterError()\n .addArgument(common.hostArgumentM)\n .addArgument(common.realmArgument)\n .addArgument(common.userArgument)\n .addArgument(common.passwordArgument)\n .addOption(common.deploymentOption)\n .addOption(common.insecureOption)\n .addOption(\n new Option('-i, --journey-id <journey>', 'Name of a journey/tree.')\n )\n // .addOption(\n // new Option(\n // '-a, --all',\n // 'Disable all the journeys/trees in a realm. Ignored with -i.'\n // )\n // )\n .action(\n // implement command logic inside action handler\n async (host, realm, user, password, options) => {\n state.default.session.setTenant(host);\n state.default.session.setRealm(realm);\n state.default.session.setUsername(user);\n state.default.session.setPassword(password);\n state.default.session.setDeploymentType(options.type);\n state.default.session.setAllowInsecureConnection(options.insecure);\n if (await getTokens()) {\n // enable\n if (options.journeyId) {\n showSpinner(`Disabling journey ${options.journeyId}...`);\n if (await disableJourney(options.journeyId)) {\n succeedSpinner(`Disabled journey ${options.journeyId}.`);\n } else {\n failSpinner(`Disabling journey ${options.journeyId} failed.`);\n }\n }\n // unrecognized combination of options or no options\n else {\n printMessage('Unrecognized combination of options or no options...');\n program.help();\n }\n }\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,OAAT,EAAkBC,MAAlB,QAAgC,WAAhC;AACA,SAASC,YAAT,EAAuBC,OAAvB,EAAgCC,KAAhC,QAA6C,uBAA7C;AACA,OAAO,KAAKC,MAAZ,MAAwB,eAAxB;AACA,SACEC,WADF,EAEEC,WAFF,EAGEC,cAHF,EAIEC,YAJF,QAKO,qBALP;AAOA,MAAM;EAAEC;AAAF,IAAgBR,YAAtB;AACA,MAAM;EAAES;AAAF,IAAqBR,OAA3B;AAEA,MAAMS,OAAO,GAAG,IAAIZ,OAAJ,CAAY,uBAAZ,CAAhB;AAEAY,OAAO,CACJC,WADH,CACe,yBADf,EAEGC,UAFH,CAEc,YAFd,EAE4B,MAF5B,EAGGC,kBAHH,GAIGC,WAJH,CAIeX,MAAM,CAACY,aAJtB,EAKGD,WALH,CAKeX,MAAM,CAACa,aALtB,EAMGF,WANH,CAMeX,MAAM,CAACc,YANtB,EAOGH,WAPH,CAOeX,MAAM,CAACe,gBAPtB,EAQGC,SARH,CAQahB,MAAM,CAACiB,gBARpB,EASGD,SATH,CASahB,MAAM,CAACkB,cATpB,EAUGF,SAVH,CAWI,IAAIpB,MAAJ,CAAW,4BAAX,EAAyC,yBAAzC,CAXJ,EAaE;AACA;AACA;AACA;AACA;AACA;AAlBF,CAmBGuB,MAnBH,EAoBI;AACA,OAAOC,IAAP,EAAaC,KAAb,EAAoBC,IAApB,EAA0BC,QAA1B,EAAoCC,OAApC,KAAgD;EAC9CzB,KAAK,CAAC0B,OAAN,CAAcC,OAAd,CAAsBC,SAAtB,CAAgCP,IAAhC;EACArB,KAAK,CAAC0B,OAAN,CAAcC,OAAd,CAAsBE,QAAtB,CAA+BP,KAA/B;EACAtB,KAAK,CAAC0B,OAAN,CAAcC,OAAd,CAAsBG,WAAtB,CAAkCP,IAAlC;EACAvB,KAAK,CAAC0B,OAAN,CAAcC,OAAd,CAAsBI,WAAtB,CAAkCP,QAAlC;EACAxB,KAAK,CAAC0B,OAAN,CAAcC,OAAd,CAAsBK,iBAAtB,CAAwCP,OAAO,CAACQ,IAAhD;EACAjC,KAAK,CAAC0B,OAAN,CAAcC,OAAd,CAAsBO,0BAAtB,CAAiDT,OAAO,CAACU,QAAzD;;EACA,IAAI,MAAM7B,SAAS,EAAnB,EAAuB;IACrB;IACA,IAAImB,OAAO,CAACW,SAAZ,EAAuB;MACrBlC,WAAW,CAAE,qBAAoBuB,OAAO,CAACW,SAAU,KAAxC,CAAX;;MACA,IAAI,MAAM7B,cAAc,CAACkB,OAAO,CAACW,SAAT,CAAxB,EAA6C;QAC3ChC,cAAc,CAAE,oBAAmBqB,OAAO,CAACW,SAAU,GAAvC,CAAd;MACD,CAFD,MAEO;QACLjC,WAAW,CAAE,qBAAoBsB,OAAO,CAACW,SAAU,UAAxC,CAAX;MACD;IACF,CAPD,CAQA;IARA,KASK;MACH/B,YAAY,CAAC,sDAAD,CAAZ;MACAG,OAAO,CAAC6B,IAAR;IACD;EACF;AACF,CA5CL,CA6CI;AA7CJ;AAgDA7B,OAAO,CAAC8B,KAAR"}
1
+ {"version":3,"file":"journey-disable.js","names":["Command","Option","Authenticate","Journey","state","common","showSpinner","failSpinner","succeedSpinner","printMessage","getTokens","disableJourney","program","description","helpOption","showHelpAfterError","addArgument","hostArgumentM","realmArgument","userArgument","passwordArgument","addOption","deploymentOption","insecureOption","action","host","realm","user","password","options","default","session","setTenant","setRealm","setUsername","setPassword","setDeploymentType","type","setAllowInsecureConnection","insecure","journeyId","help","parse"],"sources":["cli/journey/journey-disable.ts"],"sourcesContent":["import { Command, Option } from 'commander';\nimport { Authenticate, Journey, state } from '@rockcarver/frodo-lib';\nimport * as common from '../cmd_common';\nimport {\n showSpinner,\n failSpinner,\n succeedSpinner,\n printMessage,\n} from '../../utils/Console';\n\nconst { getTokens } = Authenticate;\nconst { disableJourney } = Journey;\n\nconst program = new Command('frodo journey disable');\n\nprogram\n .description('Disable journeys/trees.')\n .helpOption('-h, --help', 'Help')\n .showHelpAfterError()\n .addArgument(common.hostArgumentM)\n .addArgument(common.realmArgument)\n .addArgument(common.userArgument)\n .addArgument(common.passwordArgument)\n .addOption(common.deploymentOption)\n .addOption(common.insecureOption)\n .addOption(\n new Option('-i, --journey-id <journey>', 'Name of a journey/tree.')\n )\n // .addOption(\n // new Option(\n // '-a, --all',\n // 'Disable all the journeys/trees in a realm. Ignored with -i.'\n // )\n // )\n .action(\n // implement command logic inside action handler\n async (host, realm, user, password, options) => {\n state.default.session.setTenant(host);\n state.default.session.setRealm(realm);\n state.default.session.setUsername(user);\n state.default.session.setPassword(password);\n state.default.session.setDeploymentType(options.type);\n state.default.session.setAllowInsecureConnection(options.insecure);\n if (await getTokens()) {\n // enable\n if (options.journeyId) {\n showSpinner(`Disabling journey ${options.journeyId}...`);\n if (await disableJourney(options.journeyId)) {\n succeedSpinner(`Disabled journey ${options.journeyId}.`);\n } else {\n failSpinner(`Disabling journey ${options.journeyId} failed.`);\n }\n }\n // unrecognized combination of options or no options\n else {\n printMessage('Unrecognized combination of options or no options...');\n program.help();\n }\n }\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,OAAO,EAAEC,MAAM,QAAQ,WAAW;AAC3C,SAASC,YAAY,EAAEC,OAAO,EAAEC,KAAK,QAAQ,uBAAuB;AACpE,OAAO,KAAKC,MAAM,MAAM,eAAe;AACvC,S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,CAACU,QAAQ,CAAC;EAClE,IAAI,MAAM7B,SAAS,EAAE,EAAE;IACrB;IACA,IAAImB,OAAO,CAACW,SAAS,EAAE;MACrBlC,WAAW,CAAE,qBAAoBuB,OAAO,CAACW,SAAU,KAAI,CAAC;MACxD,IAAI,MAAM7B,cAAc,CAACkB,OAAO,CAACW,SAAS,CAAC,EAAE;QAC3ChC,cAAc,CAAE,oBAAmBqB,OAAO,CAACW,SAAU,GAAE,CAAC;MAC1D,CAAC,MAAM;QACLjC,WAAW,CAAE,qBAAoBsB,OAAO,CAACW,SAAU,UAAS,CAAC;MAC/D;IACF;IACA;IAAA,KACK;MACH/B,YAAY,CAAC,sDAAsD,CAAC;MACpEG,OAAO,CAAC6B,IAAI,EAAE;IAChB;EACF;AACF;AACA;AAAA,CACD;;AAEH7B,OAAO,CAAC8B,KAAK,EAAE"}
@@ -9,13 +9,15 @@ const {
9
9
  enableJourney
10
10
  } = Journey;
11
11
  const program = new Command('frodo journey enable');
12
- program.description('Enable journeys/trees.').helpOption('-h, --help', 'Help').showHelpAfterError().addArgument(common.hostArgumentM).addArgument(common.realmArgument).addArgument(common.userArgument).addArgument(common.passwordArgument).addOption(common.deploymentOption).addOption(common.insecureOption).addOption(new Option('-i, --journey-id <journey>', 'Name of a journey/tree.')) // .addOption(
12
+ program.description('Enable journeys/trees.').helpOption('-h, --help', 'Help').showHelpAfterError().addArgument(common.hostArgumentM).addArgument(common.realmArgument).addArgument(common.userArgument).addArgument(common.passwordArgument).addOption(common.deploymentOption).addOption(common.insecureOption).addOption(new Option('-i, --journey-id <journey>', 'Name of a journey/tree.'))
13
+ // .addOption(
13
14
  // new Option(
14
15
  // '-a, --all',
15
16
  // 'Enable all the journeys/trees in a realm. Ignored with -i.'
16
17
  // )
17
18
  // )
18
- .action( // implement command logic inside action handler
19
+ .action(
20
+ // implement command logic inside action handler
19
21
  async (host, realm, user, password, options) => {
20
22
  state.default.session.setTenant(host);
21
23
  state.default.session.setRealm(realm);
@@ -23,24 +25,25 @@ async (host, realm, user, password, options) => {
23
25
  state.default.session.setPassword(password);
24
26
  state.default.session.setDeploymentType(options.type);
25
27
  state.default.session.setAllowInsecureConnection(options.insecure);
26
-
27
28
  if (await getTokens()) {
28
29
  // enable
29
30
  if (options.journeyId) {
30
31
  showSpinner(`Enabling journey ${options.journeyId}...`);
31
-
32
32
  if (await enableJourney(options.journeyId)) {
33
33
  succeedSpinner(`Enabled journey ${options.journeyId}.`);
34
34
  } else {
35
35
  failSpinner(`Enabling journey ${options.journeyId} failed.`);
36
36
  }
37
- } // unrecognized combination of options or no options
37
+ }
38
+ // unrecognized combination of options or no options
38
39
  else {
39
40
  printMessage('Unrecognized combination of options or no options...');
40
41
  program.help();
41
42
  }
42
43
  }
43
- } // end command logic inside action handler
44
+ }
45
+ // end command logic inside action handler
44
46
  );
47
+
45
48
  program.parse();
46
49
  //# sourceMappingURL=journey-enable.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"journey-enable.js","names":["Command","Option","Authenticate","Journey","state","common","showSpinner","failSpinner","succeedSpinner","printMessage","getTokens","enableJourney","program","description","helpOption","showHelpAfterError","addArgument","hostArgumentM","realmArgument","userArgument","passwordArgument","addOption","deploymentOption","insecureOption","action","host","realm","user","password","options","default","session","setTenant","setRealm","setUsername","setPassword","setDeploymentType","type","setAllowInsecureConnection","insecure","journeyId","help","parse"],"sources":["cli/journey/journey-enable.ts"],"sourcesContent":["import { Command, Option } from 'commander';\nimport { Authenticate, Journey, state } from '@rockcarver/frodo-lib';\nimport * as common from '../cmd_common';\nimport {\n showSpinner,\n failSpinner,\n succeedSpinner,\n printMessage,\n} from '../../utils/Console';\n\nconst { getTokens } = Authenticate;\nconst { enableJourney } = Journey;\n\nconst program = new Command('frodo journey enable');\n\nprogram\n .description('Enable journeys/trees.')\n .helpOption('-h, --help', 'Help')\n .showHelpAfterError()\n .addArgument(common.hostArgumentM)\n .addArgument(common.realmArgument)\n .addArgument(common.userArgument)\n .addArgument(common.passwordArgument)\n .addOption(common.deploymentOption)\n .addOption(common.insecureOption)\n .addOption(\n new Option('-i, --journey-id <journey>', 'Name of a journey/tree.')\n )\n // .addOption(\n // new Option(\n // '-a, --all',\n // 'Enable all the journeys/trees in a realm. Ignored with -i.'\n // )\n // )\n .action(\n // implement command logic inside action handler\n async (host, realm, user, password, options) => {\n state.default.session.setTenant(host);\n state.default.session.setRealm(realm);\n state.default.session.setUsername(user);\n state.default.session.setPassword(password);\n state.default.session.setDeploymentType(options.type);\n state.default.session.setAllowInsecureConnection(options.insecure);\n if (await getTokens()) {\n // enable\n if (options.journeyId) {\n showSpinner(`Enabling journey ${options.journeyId}...`);\n if (await enableJourney(options.journeyId)) {\n succeedSpinner(`Enabled journey ${options.journeyId}.`);\n } else {\n failSpinner(`Enabling journey ${options.journeyId} failed.`);\n }\n }\n // unrecognized combination of options or no options\n else {\n printMessage('Unrecognized combination of options or no options...');\n program.help();\n }\n }\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,OAAT,EAAkBC,MAAlB,QAAgC,WAAhC;AACA,SAASC,YAAT,EAAuBC,OAAvB,EAAgCC,KAAhC,QAA6C,uBAA7C;AACA,OAAO,KAAKC,MAAZ,MAAwB,eAAxB;AACA,SACEC,WADF,EAEEC,WAFF,EAGEC,cAHF,EAIEC,YAJF,QAKO,qBALP;AAOA,MAAM;EAAEC;AAAF,IAAgBR,YAAtB;AACA,MAAM;EAAES;AAAF,IAAoBR,OAA1B;AAEA,MAAMS,OAAO,GAAG,IAAIZ,OAAJ,CAAY,sBAAZ,CAAhB;AAEAY,OAAO,CACJC,WADH,CACe,wBADf,EAEGC,UAFH,CAEc,YAFd,EAE4B,MAF5B,EAGGC,kBAHH,GAIGC,WAJH,CAIeX,MAAM,CAACY,aAJtB,EAKGD,WALH,CAKeX,MAAM,CAACa,aALtB,EAMGF,WANH,CAMeX,MAAM,CAACc,YANtB,EAOGH,WAPH,CAOeX,MAAM,CAACe,gBAPtB,EAQGC,SARH,C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B,OAAO,CAAC8B,KAAR"}
1
+ {"version":3,"file":"journey-enable.js","names":["Command","Option","Authenticate","Journey","state","common","showSpinner","failSpinner","succeedSpinner","printMessage","getTokens","enableJourney","program","description","helpOption","showHelpAfterError","addArgument","hostArgumentM","realmArgument","userArgument","passwordArgument","addOption","deploymentOption","insecureOption","action","host","realm","user","password","options","default","session","setTenant","setRealm","setUsername","setPassword","setDeploymentType","type","setAllowInsecureConnection","insecure","journeyId","help","parse"],"sources":["cli/journey/journey-enable.ts"],"sourcesContent":["import { Command, Option } from 'commander';\nimport { Authenticate, Journey, state } from '@rockcarver/frodo-lib';\nimport * as common from '../cmd_common';\nimport {\n showSpinner,\n failSpinner,\n succeedSpinner,\n printMessage,\n} from '../../utils/Console';\n\nconst { getTokens } = Authenticate;\nconst { enableJourney } = Journey;\n\nconst program = new Command('frodo journey enable');\n\nprogram\n .description('Enable journeys/trees.')\n .helpOption('-h, --help', 'Help')\n .showHelpAfterError()\n .addArgument(common.hostArgumentM)\n .addArgument(common.realmArgument)\n .addArgument(common.userArgument)\n .addArgument(common.passwordArgument)\n .addOption(common.deploymentOption)\n .addOption(common.insecureOption)\n .addOption(\n new Option('-i, --journey-id <journey>', 'Name of a journey/tree.')\n )\n // .addOption(\n // new Option(\n // '-a, --all',\n // 'Enable all the journeys/trees in a realm. Ignored with -i.'\n // )\n // )\n .action(\n // implement command logic inside action handler\n async (host, realm, user, password, options) => {\n state.default.session.setTenant(host);\n state.default.session.setRealm(realm);\n state.default.session.setUsername(user);\n state.default.session.setPassword(password);\n state.default.session.setDeploymentType(options.type);\n state.default.session.setAllowInsecureConnection(options.insecure);\n if (await getTokens()) {\n // enable\n if (options.journeyId) {\n showSpinner(`Enabling journey ${options.journeyId}...`);\n if (await enableJourney(options.journeyId)) {\n succeedSpinner(`Enabled journey ${options.journeyId}.`);\n } else {\n failSpinner(`Enabling journey ${options.journeyId} failed.`);\n }\n }\n // unrecognized combination of options or no options\n else {\n printMessage('Unrecognized combination of options or no options...');\n program.help();\n }\n }\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,OAAO,EAAEC,MAAM,QAAQ,WAAW;AAC3C,SAASC,YAAY,EAAEC,OAAO,EAAEC,KAAK,QAAQ,uBAAuB;AACpE,OAAO,KAAKC,MAAM,MAAM,eAAe;AACvC,SACEC,WAAW,EACXC,WAAW,EACXC,cAAc,EACdC,YAAY,QACP,qBAAqB;AAE5B,MAAM;EAAEC;AAAU,CAAC,GAAGR,YAAY;AAClC,MAAM;EAAES;AAAc,CAAC,GAAGR,OAAO;AAEjC,MAAMS,OAAO,GAAG,IAAIZ,OAAO,CAAC,sBAAsB,CAAC;AAEnDY,OAAO,CACJC,WAAW,CAAC,wBAAwB,CAAC,CACrCC,UAAU,CAAC,YAAY,EAAE,MAAM,CAAC,CAChCC,kBAAkB,EAAE,CACpBC,WAAW,CAACX,MAAM,CAACY,aAAa,CAAC,CACjCD,WAAW,CAACX,MAAM,CAACa,aAAa,CAAC,CACjCF,WAAW,CAACX,MAAM,CAACc,YAAY,CAAC,CAChCH,WAAW,CAACX,MAAM,CAACe,gBAAgB,CAAC,CACpCC,SAAS,CAAChB,MAAM,CAACiB,gBAAgB,CAAC,CAClCD,SAAS,CAAChB,MAAM,CAACkB,cAAc,CAAC,CAChCF,SAAS,CACR,IAAIpB,MAAM,CAAC,4BAA4B,EAAE,yBAAyB,CAAC;AAErE;AACA;AACA;AACA;AACA;AACA;AAAA,CACCuB,MAAM;AACL;AACA,OAAOC,IAAI,EAAEC,KAAK,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,OAAO,KAAK;EAC9CzB,KAAK,CAAC0B,OAAO,CAACC,OAAO,CAACC,SAAS,CAACP,IAAI,CAAC;EACrCrB,KAAK,CAAC0B,OAAO,CAACC,OAAO,CAACE,QAAQ,CAACP,KAAK,CAAC;EACrCtB,KAAK,CAAC0B,OAAO,CAACC,OAAO,CAACG,WAAW,CAACP,IAAI,CAAC;EACvCvB,KAA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