@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
@@ -7,7 +7,8 @@ const {
7
7
  getTokens
8
8
  } = Authenticate;
9
9
  const program = new Command('frodo journey export');
10
- program.description('Export 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(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 file to write the exported journey(s) to. Ignored with -A.')).addOption(new Option('-a, --all', 'Export all the journeys/trees in a realm. Ignored with -i.')).addOption(new Option('-A, --all-separate', 'Export all the journeys/trees in a realm as separate files <journey/tree name>.json. Ignored with -i or -a.')).addOption(new Option('--use-string-arrays', 'Where applicable, use string arrays to store multi-line text (e.g. scripts).').default(false, 'off')).addOption(new Option('--no-deps', 'Do not include any dependencies (scripts, email templates, SAML entity providers and circles of trust, social identity providers, themes).')).addOption(new Option('-D, --directory <directory>', 'Destination directory.')).addOption(new Option('-O, --organize <method>', 'Organize exports into folders using the indicated method. Valid values for method:\n' + 'id: folders named by id of exported object\n' + 'type: folders named by type (e.g. script, journey, idp)\n' + 'type/id: folders named by type with sub-folders named by id')).action( // implement command logic inside action handler
10
+ program.description('Export 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(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 file to write the exported journey(s) to. Ignored with -A.')).addOption(new Option('-a, --all', 'Export all the journeys/trees in a realm. Ignored with -i.')).addOption(new Option('-A, --all-separate', 'Export all the journeys/trees in a realm as separate files <journey/tree name>.json. Ignored with -i or -a.')).addOption(new Option('--use-string-arrays', 'Where applicable, use string arrays to store multi-line text (e.g. scripts).').default(false, 'off')).addOption(new Option('--no-deps', 'Do not include any dependencies (scripts, email templates, SAML entity providers and circles of trust, social identity providers, themes).')).addOption(new Option('-D, --directory <directory>', 'Destination directory.')).addOption(new Option('-O, --organize <method>', 'Organize exports into folders using the indicated method. Valid values for method:\n' + 'id: folders named by id of exported object\n' + 'type: folders named by type (e.g. script, journey, idp)\n' + 'type/id: folders named by type with sub-folders named by id')).action(
11
+ // implement command logic inside action handler
11
12
  async (host, realm, user, password, options) => {
12
13
  state.default.session.setTenant(host);
13
14
  state.default.session.setRealm(realm);
@@ -18,7 +19,6 @@ async (host, realm, user, password, options) => {
18
19
  state.default.session.setVerbose(options.verbose);
19
20
  state.default.session.setDebug(options.debug);
20
21
  if (options.directory) state.default.session.setDirectory(options.directory);
21
-
22
22
  if (await getTokens()) {
23
23
  // export
24
24
  if (options.journeyId) {
@@ -27,27 +27,32 @@ async (host, realm, user, password, options) => {
27
27
  useStringArrays: options.useStringArrays,
28
28
  deps: options.deps
29
29
  });
30
- } // --all -a
30
+ }
31
+ // --all -a
31
32
  else if (options.all) {
32
33
  printMessage('Exporting all journeys to a single file...');
33
34
  await exportJourneysToFile(options.file, {
34
35
  useStringArrays: options.useStringArrays,
35
36
  deps: options.deps
36
37
  });
37
- } // --all-separate -A
38
+ }
39
+ // --all-separate -A
38
40
  else if (options.allSeparate) {
39
41
  printMessage('Exporting all journeys to separate files...');
40
42
  await exportJourneysToFiles({
41
43
  useStringArrays: options.useStringArrays,
42
44
  deps: options.deps
43
45
  });
44
- } // unrecognized combination of options or no options
46
+ }
47
+ // unrecognized combination of options or no options
45
48
  else {
46
49
  printMessage('Unrecognized combination of options or no options...');
47
50
  program.help();
48
51
  }
49
52
  }
50
- } // end command logic inside action handler
53
+ }
54
+ // end command logic inside action handler
51
55
  );
56
+
52
57
  program.parse();
53
58
  //# sourceMappingURL=journey-export.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"journey-export.js","names":["Command","Option","Authenticate","state","common","exportJourneyToFile","exportJourneysToFile","exportJourneysToFiles","printMessage","getTokens","program","description","helpOption","showHelpAfterError","addArgument","hostArgumentM","realmArgument","userArgument","passwordArgument","addOption","deploymentOption","insecureOption","verboseOption","debugOption","default","action","host","realm","user","password","options","session","setTenant","setRealm","setUsername","setPassword","setDeploymentType","type","setAllowInsecureConnection","insecure","setVerbose","verbose","setDebug","debug","directory","setDirectory","journeyId","file","useStringArrays","deps","all","allSeparate","help","parse"],"sources":["cli/journey/journey-export.ts"],"sourcesContent":["import { Command, Option } from 'commander';\nimport { Authenticate, state } from '@rockcarver/frodo-lib';\nimport * as common from '../cmd_common';\nimport {\n exportJourneyToFile,\n exportJourneysToFile,\n exportJourneysToFiles,\n} from '../../ops/JourneyOps';\nimport { printMessage } from '../../utils/Console';\n\nconst { getTokens } = Authenticate;\n\nconst program = new Command('frodo journey export');\n\nprogram\n .description('Export 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(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 file to write the exported journey(s) to. Ignored with -A.'\n )\n )\n .addOption(\n new Option(\n '-a, --all',\n 'Export all the journeys/trees in a realm. Ignored with -i.'\n )\n )\n .addOption(\n new Option(\n '-A, --all-separate',\n 'Export all the journeys/trees in a realm as separate files <journey/tree name>.json. Ignored with -i or -a.'\n )\n )\n .addOption(\n new Option(\n '--use-string-arrays',\n 'Where applicable, use string arrays to store multi-line text (e.g. scripts).'\n ).default(false, 'off')\n )\n .addOption(\n new Option(\n '--no-deps',\n 'Do not include any dependencies (scripts, email templates, SAML entity providers and circles of trust, social identity providers, themes).'\n )\n )\n .addOption(\n new Option('-D, --directory <directory>', 'Destination directory.')\n )\n .addOption(\n new Option(\n '-O, --organize <method>',\n 'Organize exports into folders using the indicated method. Valid values for method:\\n' +\n 'id: folders named by id of exported object\\n' +\n 'type: folders named by type (e.g. script, journey, idp)\\n' +\n 'type/id: folders named by type with sub-folders named by id'\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.directory)\n state.default.session.setDirectory(options.directory);\n if (await getTokens()) {\n // export\n if (options.journeyId) {\n printMessage('Exporting journey...');\n await exportJourneyToFile(options.journeyId, options.file, {\n useStringArrays: options.useStringArrays,\n deps: options.deps,\n });\n }\n // --all -a\n else if (options.all) {\n printMessage('Exporting all journeys to a single file...');\n await exportJourneysToFile(options.file, {\n useStringArrays: options.useStringArrays,\n deps: options.deps,\n });\n }\n // --all-separate -A\n else if (options.allSeparate) {\n printMessage('Exporting all journeys to separate files...');\n await exportJourneysToFiles({\n useStringArrays: options.useStringArrays,\n deps: options.deps,\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,KAAvB,QAAoC,uBAApC;AACA,OAAO,KAAKC,MAAZ,MAAwB,eAAxB;AACA,SACEC,mBADF,EAEEC,oBAFF,EAGEC,qBAHF,QAIO,sBAJP;AAKA,SAASC,YAAT,QAA6B,qBAA7B;AAEA,MAAM;EAAEC;AAAF,IAAgBP,YAAtB;AAEA,MAAMQ,OAAO,GAAG,IAAIV,OAAJ,CAAY,sBAAZ,CAAhB;AAEAU,OAAO,CACJC,WADH,CACe,wBADf,EAEGC,UAFH,CAEc,YAFd,EAE4B,MAF5B,EAGGC,kBAHH,GAIGC,WAJH,CAIeV,MAAM,CAACW,aAJtB,EAKGD,WALH,CAKeV,MAAM,CAACY,aALtB,EAMGF,WANH,CAMeV,MAAM,CAACa,YANtB,EAOGH,WAPH,CAOeV,MAAM,CAACc,gBAPtB,EAQGC,SARH,CAQaf,MAAM,CAACgB,gBARpB,EASGD,SATH,CASaf,MAAM,CAACiB,cATpB,EAUGF,SAVH,CAUaf,MAAM,CAACkB,aAVpB,EAWGH,SAXH,CAWaf,MAAM,CAACmB,WAXpB,EAYGJ,SAZH,CAaI,IAAIlB,MAAJ,CACE,4BADF,EAEE,8DAFF,CAbJ,EAkBGkB,SAlBH,CAmBI,IAAIlB,MAAJ,CACE,mBADF,EAEE,wEAFF,CAnBJ,EAwBGkB,SAxBH,CAyBI,IAAIlB,MAAJ,CACE,WADF,EAEE,4DAFF,CAzBJ,EA8BGkB,SA9BH,CA+BI,IAAIlB,MAAJ,CACE,oBADF,EAEE,6GAFF,CA/BJ,EAoCGkB,SApCH,CAqCI,IAAIlB,MAAJ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AACgB,SAAZ,EAAuB;MACrBtC,YAAY,CAAC,sBAAD,CAAZ;MACA,MAAMH,mBAAmB,CAACyB,OAAO,CAACgB,SAAT,EAAoBhB,OAAO,CAACiB,IAA5B,EAAkC;QACzDC,eAAe,EAAElB,OAAO,CAACkB,eADgC;QAEzDC,IAAI,EAAEnB,OAAO,CAACmB;MAF2C,CAAlC,CAAzB;IAID,CAND,CAOA;IAPA,KAQK,IAAInB,OAAO,CAACoB,GAAZ,EAAiB;MACpB1C,YAAY,CAAC,4CAAD,CAAZ;MACA,MAAMF,oBAAoB,CAACwB,OAAO,CAACiB,IAAT,EAAe;QACvCC,eAAe,EAAElB,OAAO,CAACkB,eADc;QAEvCC,IAAI,EAAEnB,OAAO,CAACmB;MAFyB,CAAf,CAA1B;IAID,CANI,CAOL;IAPK,KAQA,IAAInB,OAAO,CAACqB,WAAZ,EAAyB;MAC5B3C,YAAY,CAAC,6CAAD,CAAZ;MACA,MAAMD,qBAAqB,CAAC;QAC1ByC,eAAe,EAAElB,OAAO,CAACkB,eADC;QAE1BC,IAAI,EAAEnB,OAAO,CAACmB;MAFY,CAAD,CAA3B;IAID,CANI,CAOL;IAPK,KAQA;MACHzC,YAAY,CAAC,sDAAD,CAAZ;MACAE,OAAO,CAAC0C,IAAR;IACD;EACF;AACF,CAxGL,CAyGI;AAzGJ;AA4GA1C,OAAO,CAAC2C,KAAR"}
1
+ {"version":3,"file":"journey-export.js","names":["Command","Option","Authenticate","state","common","exportJourneyToFile","exportJourneysToFile","exportJourneysToFiles","printMessage","getTokens","program","description","helpOption","showHelpAfterError","addArgument","hostArgumentM","realmArgument","userArgument","passwordArgument","addOption","deploymentOption","insecureOption","verboseOption","debugOption","default","action","host","realm","user","password","options","session","setTenant","setRealm","setUsername","setPassword","setDeploymentType","type","setAllowInsecureConnection","insecure","setVerbose","verbose","setDebug","debug","directory","setDirectory","journeyId","file","useStringArrays","deps","all","allSeparate","help","parse"],"sources":["cli/journey/journey-export.ts"],"sourcesContent":["import { Command, Option } from 'commander';\nimport { Authenticate, state } from '@rockcarver/frodo-lib';\nimport * as common from '../cmd_common';\nimport {\n exportJourneyToFile,\n exportJourneysToFile,\n exportJourneysToFiles,\n} from '../../ops/JourneyOps';\nimport { printMessage } from '../../utils/Console';\n\nconst { getTokens } = Authenticate;\n\nconst program = new Command('frodo journey export');\n\nprogram\n .description('Export 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(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 file to write the exported journey(s) to. Ignored with -A.'\n )\n )\n .addOption(\n new Option(\n '-a, --all',\n 'Export all the journeys/trees in a realm. Ignored with -i.'\n )\n )\n .addOption(\n new Option(\n '-A, --all-separate',\n 'Export all the journeys/trees in a realm as separate files <journey/tree name>.json. Ignored with -i or -a.'\n )\n )\n .addOption(\n new Option(\n '--use-string-arrays',\n 'Where applicable, use string arrays to store multi-line text (e.g. scripts).'\n ).default(false, 'off')\n )\n .addOption(\n new Option(\n '--no-deps',\n 'Do not include any dependencies (scripts, email templates, SAML entity providers and circles of trust, social identity providers, themes).'\n )\n )\n .addOption(\n new Option('-D, --directory <directory>', 'Destination directory.')\n )\n .addOption(\n new Option(\n '-O, --organize <method>',\n 'Organize exports into folders using the indicated method. Valid values for method:\\n' +\n 'id: folders named by id of exported object\\n' +\n 'type: folders named by type (e.g. script, journey, idp)\\n' +\n 'type/id: folders named by type with sub-folders named by id'\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.directory)\n state.default.session.setDirectory(options.directory);\n if (await getTokens()) {\n // export\n if (options.journeyId) {\n printMessage('Exporting journey...');\n await exportJourneyToFile(options.journeyId, options.file, {\n useStringArrays: options.useStringArrays,\n deps: options.deps,\n });\n }\n // --all -a\n else if (options.all) {\n printMessage('Exporting all journeys to a single file...');\n await exportJourneysToFile(options.file, {\n useStringArrays: options.useStringArrays,\n deps: options.deps,\n });\n }\n // --all-separate -A\n else if (options.allSeparate) {\n printMessage('Exporting all journeys to separate files...');\n await exportJourneysToFiles({\n useStringArrays: options.useStringArrays,\n deps: options.deps,\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,KAAK,QAAQ,uBAAuB;AAC3D,OAAO,KAAKC,MAAM,MAAM,eAAe;AACvC,SACEC,mBAAmB,EACnBC,oBAAoB,EACpBC,qBAAqB,QAChB,sBAAsB;AAC7B,SAASC,YAAY,QAAQ,qBAAqB;AAElD,MAAM;EAAEC;AAAU,CAAC,GAAGP,YAAY;AAElC,MAAMQ,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,CAACV,MAAM,CAACW,aAAa,CAAC,CACjCD,WAAW,CAACV,MAAM,CAACY,aAAa,CAAC,CACjCF,WAAW,CAACV,MAAM,CAACa,YAAY,CAAC,CAChCH,WAAW,CAACV,MAAM,CAACc,gBAAgB,CAAC,CACpCC,SAAS,CAACf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AO,CAAC0C,IAAI,EAAE;IAChB;EACF;AACF;AACA;AAAA,CACD;;AAEH1C,OAAO,CAAC2C,KAAK,EAAE"}
@@ -7,7 +7,8 @@ const {
7
7
  getTokens
8
8
  } = Authenticate;
9
9
  const program = new Command('frodo journey import');
10
- program.description('Import journey/tree.').helpOption('-h, --help', 'Help').showHelpAfterError().addArgument(common.hostArgumentM).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 file to import the journey(s) from. Ignored with -A.')).addOption(new Option('-a, --all', 'Import all the journeys/trees from single file. Ignored with -i.')).addOption(new Option('-A, --all-separate', 'Import all the journeys/trees from separate files (*.json) in the current directory. Ignored with -i or -a.')).addOption(new Option('--re-uuid', 'Generate new UUIDs for all nodes during import.').default(false, 'off')).addOption(new Option('--no-deps', 'Do not include any dependencies (scripts, email templates, SAML entity providers and circles of trust, social identity providers, themes).')).action( // implement command logic inside action handler
10
+ program.description('Import journey/tree.').helpOption('-h, --help', 'Help').showHelpAfterError().addArgument(common.hostArgumentM).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 file to import the journey(s) from. Ignored with -A.')).addOption(new Option('-a, --all', 'Import all the journeys/trees from single file. Ignored with -i.')).addOption(new Option('-A, --all-separate', 'Import all the journeys/trees from separate files (*.json) in the current directory. Ignored with -i or -a.')).addOption(new Option('--re-uuid', 'Generate new UUIDs for all nodes during import.').default(false, 'off')).addOption(new Option('--no-deps', 'Do not include any dependencies (scripts, email templates, SAML entity providers and circles of trust, social identity providers, themes).')).action(
11
+ // implement command logic inside action handler
11
12
  async (host, realm, user, password, options) => {
12
13
  state.default.session.setTenant(host);
13
14
  state.default.session.setRealm(realm);
@@ -17,7 +18,6 @@ async (host, realm, user, password, options) => {
17
18
  state.default.session.setAllowInsecureConnection(options.insecure);
18
19
  state.default.session.setVerbose(options.verbose);
19
20
  state.default.session.setDebug(options.debug);
20
-
21
21
  if (await getTokens()) {
22
22
  // import
23
23
  if (options.journeyId) {
@@ -26,34 +26,40 @@ async (host, realm, user, password, options) => {
26
26
  reUuid: options.reUuid,
27
27
  deps: options.deps
28
28
  });
29
- } // --all -a
29
+ }
30
+ // --all -a
30
31
  else if (options.all && options.file) {
31
32
  printMessage(`Importing all journeys from a single file (${options.file})...`);
32
33
  importJourneysFromFile(options.file, {
33
34
  reUuid: options.reUuid,
34
35
  deps: options.deps
35
36
  });
36
- } // --all-separate -A
37
+ }
38
+ // --all-separate -A
37
39
  else if (options.allSeparate && !options.file) {
38
40
  printMessage('Importing all journeys from separate files in current directory...');
39
41
  importJourneysFromFiles({
40
42
  reUuid: options.reUuid,
41
43
  deps: options.deps
42
44
  });
43
- } // import first journey in file
45
+ }
46
+ // import first journey in file
44
47
  else if (options.file) {
45
48
  printMessage('Importing first journey in file...');
46
49
  importFirstJourneyFromFile(options.file, {
47
50
  reUuid: options.reUuid,
48
51
  deps: options.deps
49
52
  });
50
- } // unrecognized combination of options or no options
53
+ }
54
+ // unrecognized combination of options or no options
51
55
  else {
52
56
  printMessage('Unrecognized combination of options or no options...');
53
57
  program.help();
54
58
  }
55
59
  }
56
- } // end command logic inside action handler
60
+ }
61
+ // end command logic inside action handler
57
62
  );
63
+
58
64
  program.parse();
59
65
  //# sourceMappingURL=journey-import.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"journey-import.js","names":["Command","Option","Authenticate","state","common","importJourneyFromFile","importJourneysFromFile","importJourneysFromFiles","importFirstJourneyFromFile","printMessage","getTokens","program","description","helpOption","showHelpAfterError","addArgument","hostArgumentM","realmArgument","userArgument","passwordArgument","addOption","deploymentOption","insecureOption","verboseOption","debugOption","default","action","host","realm","user","password","options","session","setTenant","setRealm","setUsername","setPassword","setDeploymentType","type","setAllowInsecureConnection","insecure","setVerbose","verbose","setDebug","debug","journeyId","file","reUuid","deps","all","allSeparate","help","parse"],"sources":["cli/journey/journey-import.ts"],"sourcesContent":["import { Command, Option } from 'commander';\nimport { Authenticate, state } from '@rockcarver/frodo-lib';\nimport * as common from '../cmd_common';\nimport {\n importJourneyFromFile,\n importJourneysFromFile,\n importJourneysFromFiles,\n importFirstJourneyFromFile,\n} from '../../ops/JourneyOps';\nimport { printMessage } from '../../utils/Console';\n\nconst { getTokens } = Authenticate;\n\nconst program = new Command('frodo journey import');\n\nprogram\n .description('Import journey/tree.')\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(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 file to import the journey(s) from. Ignored with -A.'\n )\n )\n .addOption(\n new Option(\n '-a, --all',\n 'Import all the journeys/trees from single file. Ignored with -i.'\n )\n )\n .addOption(\n new Option(\n '-A, --all-separate',\n 'Import all the journeys/trees from separate files (*.json) in the current directory. Ignored with -i or -a.'\n )\n )\n .addOption(\n new Option(\n '--re-uuid',\n 'Generate new UUIDs for all nodes during import.'\n ).default(false, 'off')\n )\n .addOption(\n new Option(\n '--no-deps',\n 'Do not include any dependencies (scripts, email templates, SAML entity providers and circles of trust, social identity providers, themes).'\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 (await getTokens()) {\n // import\n if (options.journeyId) {\n printMessage(`Importing journey ${options.journeyId}...`);\n importJourneyFromFile(options.journeyId, options.file, {\n reUuid: options.reUuid,\n deps: options.deps,\n });\n }\n // --all -a\n else if (options.all && options.file) {\n printMessage(\n `Importing all journeys from a single file (${options.file})...`\n );\n importJourneysFromFile(options.file, {\n reUuid: options.reUuid,\n deps: options.deps,\n });\n }\n // --all-separate -A\n else if (options.allSeparate && !options.file) {\n printMessage(\n 'Importing all journeys from separate files in current directory...'\n );\n importJourneysFromFiles({\n reUuid: options.reUuid,\n deps: options.deps,\n });\n }\n // import first journey in file\n else if (options.file) {\n printMessage('Importing first journey in file...');\n importFirstJourneyFromFile(options.file, {\n reUuid: options.reUuid,\n deps: options.deps,\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,KAAvB,QAAoC,uBAApC;AACA,OAAO,KAAKC,MAAZ,MAAwB,eAAxB;AACA,SACEC,qBADF,EAEEC,sBAFF,EAGEC,uBAHF,EAIEC,0BAJF,QAKO,sBALP;AAMA,SAASC,YAAT,QAA6B,qBAA7B;AAEA,MAAM;EAAEC;AAAF,IAAgBR,YAAtB;AAEA,MAAMS,OAAO,GAAG,IAAIX,OAAJ,CAAY,sBAAZ,CAAhB;AAEAW,OAAO,CACJC,WADH,CACe,sBADf,EAEGC,UAFH,CAEc,YAFd,EAE4B,MAF5B,EAGGC,kBAHH,GAIGC,WAJH,CAIeX,MAAM,CAACY,aAJtB,EAKGD,WALH,CAKeX,MAAM,CAACa,aALtB,EAMGF,WANH,CAMeX,MAA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,OAAO,CAACiB;MAFyB,CAAf,CAA1B;IAID,CANI,CAOL;IAPK,KAQA;MACHvC,YAAY,CAAC,sDAAD,CAAZ;MACAE,OAAO,CAACwC,IAAR;IACD;EACF;AACF,CAtGL,CAuGI;AAvGJ;AA0GAxC,OAAO,CAACyC,KAAR"}
1
+ {"version":3,"file":"journey-import.js","names":["Command","Option","Authenticate","state","common","importJourneyFromFile","importJourneysFromFile","importJourneysFromFiles","importFirstJourneyFromFile","printMessage","getTokens","program","description","helpOption","showHelpAfterError","addArgument","hostArgumentM","realmArgument","userArgument","passwordArgument","addOption","deploymentOption","insecureOption","verboseOption","debugOption","default","action","host","realm","user","password","options","session","setTenant","setRealm","setUsername","setPassword","setDeploymentType","type","setAllowInsecureConnection","insecure","setVerbose","verbose","setDebug","debug","journeyId","file","reUuid","deps","all","allSeparate","help","parse"],"sources":["cli/journey/journey-import.ts"],"sourcesContent":["import { Command, Option } from 'commander';\nimport { Authenticate, state } from '@rockcarver/frodo-lib';\nimport * as common from '../cmd_common';\nimport {\n importJourneyFromFile,\n importJourneysFromFile,\n importJourneysFromFiles,\n importFirstJourneyFromFile,\n} from '../../ops/JourneyOps';\nimport { printMessage } from '../../utils/Console';\n\nconst { getTokens } = Authenticate;\n\nconst program = new Command('frodo journey import');\n\nprogram\n .description('Import journey/tree.')\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(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 file to import the journey(s) from. Ignored with -A.'\n )\n )\n .addOption(\n new Option(\n '-a, --all',\n 'Import all the journeys/trees from single file. Ignored with -i.'\n )\n )\n .addOption(\n new Option(\n '-A, --all-separate',\n 'Import all the journeys/trees from separate files (*.json) in the current directory. Ignored with -i or -a.'\n )\n )\n .addOption(\n new Option(\n '--re-uuid',\n 'Generate new UUIDs for all nodes during import.'\n ).default(false, 'off')\n )\n .addOption(\n new Option(\n '--no-deps',\n 'Do not include any dependencies (scripts, email templates, SAML entity providers and circles of trust, social identity providers, themes).'\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 (await getTokens()) {\n // import\n if (options.journeyId) {\n printMessage(`Importing journey ${options.journeyId}...`);\n importJourneyFromFile(options.journeyId, options.file, {\n reUuid: options.reUuid,\n deps: options.deps,\n });\n }\n // --all -a\n else if (options.all && options.file) {\n printMessage(\n `Importing all journeys from a single file (${options.file})...`\n );\n importJourneysFromFile(options.file, {\n reUuid: options.reUuid,\n deps: options.deps,\n });\n }\n // --all-separate -A\n else if (options.allSeparate && !options.file) {\n printMessage(\n 'Importing all journeys from separate files in current directory...'\n );\n importJourneysFromFiles({\n reUuid: options.reUuid,\n deps: options.deps,\n });\n }\n // import first journey in file\n else if (options.file) {\n printMessage('Importing first journey in file...');\n importFirstJourneyFromFile(options.file, {\n reUuid: options.reUuid,\n deps: options.deps,\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,KAAK,QAAQ,uBAAuB;AAC3D,OAAO,KAAKC,MAAM,MAAM,eAAe;AACvC,SACEC,qBAAqB,EACrBC,sBAAsB,EACtBC,uBAAuB,EACvBC,0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,OAAO,CAACe,IAAI,EAAE;MAC7CrC,YAAY,CACV,oEAAoE,CACrE;MACDF,uBAAuB,CAAC;QACtBwC,MAAM,EAAEhB,OAAO,CAACgB,MAAM;QACtBC,IAAI,EAAEjB,OAAO,CAACiB;MAChB,CAAC,CAAC;IACJ;IACA;IAAA,KACK,IAAIjB,OAAO,CAACe,IAAI,EAAE;MACrBrC,YAAY,CAAC,oCAAoC,CAAC;MAClDD,0BAA0B,CAACuB,OAAO,CAACe,IAAI,EAAE;QACvCC,MAAM,EAAEhB,OAAO,CAACgB,MAAM;QACtBC,IAAI,EAAEjB,OAAO,CAACiB;MAChB,CAAC,CAAC;IACJ;IACA;IAAA,KACK;MACHvC,YAAY,CAAC,sDAAsD,CAAC;MACpEE,OAAO,CAACwC,IAAI,EAAE;IAChB;EACF;AACF;AACA;AAAA,CACD;;AAEHxC,OAAO,CAACyC,KAAK,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"file":"journey-list.e2e.test_.js","names":["spawn","spawnSync","ansiEscapeCodes","beforeAll","deleteJourneysCmd","status","console","error","stderr","toString","log","stdout","importBaselineJourneysCmd","cwd","importTestJourneysCmd","describe","it","done","journeyList","expected","join","chunks","on","chunk","push","output","Buffer","concat","expect","toBe","expectedLong","replace"],"sources":["cli/journey/journey-list.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 * delete all journeys and import baseline and additional test journeys\n */\nbeforeAll(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 baseline journeys\n const importBaselineJourneysCmd = spawnSync(\n 'frodo',\n ['journey', 'import', '--all-separate', 'frodo-dev'],\n {\n cwd: `test/e2e/journey/baseline`,\n }\n );\n if (\n importBaselineJourneysCmd.status &&\n importBaselineJourneysCmd.status > 0\n ) {\n console.error(importBaselineJourneysCmd.stderr.toString());\n console.log(importBaselineJourneysCmd.stdout.toString());\n }\n\n // import additional test journeys\n const importTestJourneysCmd = spawnSync(\n 'frodo',\n ['journey', 'import', '--all-separate', 'frodo-dev'],\n {\n cwd: `test/e2e/journey/list`,\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 list', () => {\n it('\"frodo journey list\": should list the names of the default journeys', (done) => {\n const journeyList = spawn('frodo', ['journey', 'list', 'frodo-dev']);\n const expected = [\n 'Disabled',\n 'ForgottenUsername',\n 'Login',\n 'PasswordGrant',\n 'ProgressiveProfile',\n 'Registration',\n 'ResetPassword',\n 'UpdatePassword',\n '',\n ].join('\\n');\n\n const chunks: Uint8Array[] = [];\n journeyList.stdout.on('data', (chunk) => {\n chunks.push(chunk);\n });\n\n journeyList.stdout.on('end', () => {\n const output = Buffer.concat(chunks).toString();\n try {\n expect(output).toBe(expected);\n done();\n } catch (error) {\n done(error);\n }\n });\n });\n\n const expectedLong = [\n 'Listing journeys in realm \"alpha\"...',\n 'Name │Status │Tags ',\n 'Disabled │disabled│Prototype ',\n 'ForgottenUsername │enabled │Username Reset ',\n 'Login │enabled │Authentication ',\n 'PasswordGrant │enabled │ ',\n 'ProgressiveProfile│enabled │Progressive Profile',\n 'Registration │enabled │Registration ',\n 'ResetPassword │enabled │Password Reset ',\n 'UpdatePassword │enabled │Password Reset ',\n '',\n ].join('\\n');\n\n it('\"frodo journey list -l\": should list the names, status, and tags of the default journeys', (done) => {\n const journeyList = spawn('frodo', ['journey', 'list', '-l', 'frodo-dev']);\n\n const chunks: Uint8Array[] = [];\n journeyList.stdout.on('data', (chunk) => {\n chunks.push(chunk);\n });\n\n journeyList.stdout.on('end', () => {\n const output = Buffer.concat(chunks)\n .toString()\n .replace(ansiEscapeCodes, '');\n try {\n expect(output).toBe(expectedLong);\n done();\n } catch (error) {\n done(error);\n }\n });\n });\n\n it('\"frodo journey list --long\": should list the names, status, and tags of the default journeys', (done) => {\n const journeyList = spawn('frodo', [\n 'journey',\n 'list',\n '--long',\n 'frodo-dev',\n ]);\n\n const chunks: Uint8Array[] = [];\n journeyList.stdout.on('data', (chunk) => {\n chunks.push(chunk);\n });\n\n journeyList.stdout.on('end', () => {\n const output = Buffer.concat(chunks)\n .toString()\n .replace(ansiEscapeCodes, '');\n try {\n expect(output).toBe(expectedLong);\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;EACpB;EACA,MAAMC,iBAAiB,GAAGH,SAAS,CAAC,OAAD,EAAU,CAC3C,SAD2C,EAE3C,QAF2C,EAG3C,OAH2C,EAI3C,WAJ2C,CAAV,CAAnC;;EAMA,IAAIG,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,CAXmB,CAapB;;;EACA,MAAMG,yBAAyB,GAAGX,SAAS,CACzC,OADyC,EAEzC,CAAC,SAAD,EAAY,QAAZ,EAAsB,gBAAtB,EAAwC,WAAxC,CAFyC,EAGzC;IACEY,GAAG,EAAG;EADR,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F;EAqBAS,EAAE,CAAC,8FAAD,EAAkGC,IAAD,IAAU;IAC3G,MAAMC,WAAW,GAAGlB,KAAK,CAAC,OAAD,EAAU,CACjC,SADiC,EAEjC,MAFiC,EAGjC,QAHiC,EAIjC,WAJiC,CAAV,CAAzB;IAOA,MAAMqB,MAAoB,GAAG,EAA7B;IACAH,WAAW,CAACP,MAAZ,CAAmBW,EAAnB,CAAsB,MAAtB,EAA+BC,KAAD,IAAW;MACvCF,MAAM,CAACG,IAAP,CAAYD,KAAZ;IACD,CAFD;IAIAL,WAAW,CAACP,MAAZ,CAAmBW,EAAnB,CAAsB,KAAtB,EAA6B,MAAM;MACjC,MAAMG,MAAM,GAAGC,MAAM,CAACC,MAAP,CAAcN,MAAd,EACZZ,QADY,GAEZsB,OAFY,CAEJ7B,eAFI,EAEa,EAFb,CAAf;;MAGA,IAAI;QACF0B,MAAM,CAACH,MAAD,CAAN,CAAeI,IAAf,CAAoBC,YAApB;QACAb,IAAI;MACL,CAHD,CAGE,OAAOV,KAAP,EAAc;QACdU,IAAI,CAACV,KAAD,CAAJ;MACD;IACF,CAVD;EAWD,CAxBC,CAAF;AAyBD,CA3FO,CAAR"}
1
+ {"version":3,"file":"journey-list.e2e.test_.js","names":["spawn","spawnSync","ansiEscapeCodes","beforeAll","deleteJourneysCmd","status","console","error","stderr","toString","log","stdout","importBaselineJourneysCmd","cwd","importTestJourneysCmd","describe","it","done","journeyList","expected","join","chunks","on","chunk","push","output","Buffer","concat","expect","toBe","expectedLong","replace"],"sources":["cli/journey/journey-list.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 * delete all journeys and import baseline and additional test journeys\n */\nbeforeAll(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 baseline journeys\n const importBaselineJourneysCmd = spawnSync(\n 'frodo',\n ['journey', 'import', '--all-separate', 'frodo-dev'],\n {\n cwd: `test/e2e/journey/baseline`,\n }\n );\n if (\n importBaselineJourneysCmd.status &&\n importBaselineJourneysCmd.status > 0\n ) {\n console.error(importBaselineJourneysCmd.stderr.toString());\n console.log(importBaselineJourneysCmd.stdout.toString());\n }\n\n // import additional test journeys\n const importTestJourneysCmd = spawnSync(\n 'frodo',\n ['journey', 'import', '--all-separate', 'frodo-dev'],\n {\n cwd: `test/e2e/journey/list`,\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 list', () => {\n it('\"frodo journey list\": should list the names of the default journeys', (done) => {\n const journeyList = spawn('frodo', ['journey', 'list', 'frodo-dev']);\n const expected = [\n 'Disabled',\n 'ForgottenUsername',\n 'Login',\n 'PasswordGrant',\n 'ProgressiveProfile',\n 'Registration',\n 'ResetPassword',\n 'UpdatePassword',\n '',\n ].join('\\n');\n\n const chunks: Uint8Array[] = [];\n journeyList.stdout.on('data', (chunk) => {\n chunks.push(chunk);\n });\n\n journeyList.stdout.on('end', () => {\n const output = Buffer.concat(chunks).toString();\n try {\n expect(output).toBe(expected);\n done();\n } catch (error) {\n done(error);\n }\n });\n });\n\n const expectedLong = [\n 'Listing journeys in realm \"alpha\"...',\n 'Name │Status │Tags ',\n 'Disabled │disabled│Prototype ',\n 'ForgottenUsername │enabled │Username Reset ',\n 'Login │enabled │Authentication ',\n 'PasswordGrant │enabled │ ',\n 'ProgressiveProfile│enabled │Progressive Profile',\n 'Registration │enabled │Registration ',\n 'ResetPassword │enabled │Password Reset ',\n 'UpdatePassword │enabled │Password Reset ',\n '',\n ].join('\\n');\n\n it('\"frodo journey list -l\": should list the names, status, and tags of the default journeys', (done) => {\n const journeyList = spawn('frodo', ['journey', 'list', '-l', 'frodo-dev']);\n\n const chunks: Uint8Array[] = [];\n journeyList.stdout.on('data', (chunk) => {\n chunks.push(chunk);\n });\n\n journeyList.stdout.on('end', () => {\n const output = Buffer.concat(chunks)\n .toString()\n .replace(ansiEscapeCodes, '');\n try {\n expect(output).toBe(expectedLong);\n done();\n } catch (error) {\n done(error);\n }\n });\n });\n\n it('\"frodo journey list --long\": should list the names, status, and tags of the default journeys', (done) => {\n const journeyList = spawn('frodo', [\n 'journey',\n 'list',\n '--long',\n 'frodo-dev',\n ]);\n\n const chunks: Uint8Array[] = [];\n journeyList.stdout.on('data', (chunk) => {\n chunks.push(chunk);\n });\n\n journeyList.stdout.on('end', () => {\n const output = Buffer.concat(chunks)\n .toString()\n .replace(ansiEscapeCodes, '');\n try {\n expect(output).toBe(expectedLong);\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;EACA,MAAMC,iBAAiB,GAAGH,SAAS,CAAC,OAAO,EAAE,CAC3C,SAAS,EACT,QAAQ,EACR,OAAO,EACP,WAAW,CACZ,CAAC;EACF,IAAIG,iBAAiB,CAACC,MAAM,IAAID,iBAAiB,CAACC,MAAM,GAAG,CAAC,EAAE;IAC5DC,OAAO,CAACC,KAAK,CAACH,iBAAiB,CAACI,MAAM,CAACC,QAAQ,EAAE,CAAC;IAClDH,OAAO,CAACI,GAAG,CAACN,iBAAiB,CAACO,MAAM,CAACF,QAAQ,EAAE,CAAC;EAClD;;EAEA;EACA,MAAMG,yBAAyB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IAAI,EAAE;MACR,CAAC,CAAC,OAAOV,KAAK,EAAE;QACdU,IAAI,CAACV,KAAK,CAAC;MACb;IACF,CAAC,CAAC;EACJ,CAAC,CAAC;EAEFS,EAAE,CAAC,8FAA8F,EAAGC,IAAI,IAAK;IAC3G,MAAMC,WAAW,GAAGlB,KAAK,CAAC,OAAO,EAAE,CACjC,SAAS,EACT,MAAM,EACN,QAAQ,EACR,WAAW,CACZ,CAAC;IAEF,MAAMqB,MAAoB,GAAG,EAAE;IAC/BH,WAAW,CAACP,MAAM,CAACW,EAAE,CAAC,MAAM,EAAGC,KAAK,IAAK;MACvCF,MAAM,CAACG,IAAI,CAACD,KAAK,CAAC;IACpB,CAAC,CAAC;IAEFL,WAAW,CAACP,MAAM,CAACW,EAAE,CAAC,KAAK,EAAE,MAAM;MACjC,MAAMG,MAAM,GAAGC,MAAM,CAACC,MAAM,CAACN,MAAM,CAAC,CACjCZ,QAAQ,EAAE,CACVsB,OAAO,CAAC7B,eAAe,EAAE,EAAE,CAAC;MAC/B,IAAI;QACF0B,MAAM,CAACH,MAAM,CAAC,CAACI,IAAI,CAACC,YAAY,CAAC;QACjCb,IAAI,EAAE;MACR,CAAC,CAAC,OAAOV,KAAK,EAAE;QACdU,IAAI,CAACV,KAAK,CAAC;MACb;IACF,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC"}
@@ -7,7 +7,8 @@ const {
7
7
  getTokens
8
8
  } = Authenticate;
9
9
  const program = new Command('frodo journey list');
10
- program.description('List 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('-l, --long', 'Long with all fields.').default(false, 'false')).addOption(new Option('-a, --analyze', 'Analyze journeys for custom nodes.')).action( // implement command logic inside action handler
10
+ program.description('List 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('-l, --long', 'Long with all fields.').default(false, 'false')).addOption(new Option('-a, --analyze', 'Analyze journeys for custom nodes.')).action(
11
+ // implement command logic inside action handler
11
12
  async (host, realm, user, password, options) => {
12
13
  state.default.session.setTenant(host);
13
14
  state.default.session.setRealm(realm);
@@ -15,12 +16,13 @@ async (host, realm, user, password, options) => {
15
16
  state.default.session.setPassword(password);
16
17
  state.default.session.setDeploymentType(options.type);
17
18
  state.default.session.setAllowInsecureConnection(options.insecure);
18
-
19
19
  if (await getTokens()) {
20
20
  printMessage(`Listing journeys in realm "${state.default.session.getRealm()}"...`);
21
21
  listJourneys(options.long, options.analyze);
22
22
  }
23
- } // end command logic inside action handler
23
+ }
24
+ // end command logic inside action handler
24
25
  );
26
+
25
27
  program.parse();
26
28
  //# sourceMappingURL=journey-list.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"journey-list.js","names":["Command","Option","Authenticate","state","common","listJourneys","printMessage","getTokens","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","getRealm","long","analyze","parse"],"sources":["cli/journey/journey-list.ts"],"sourcesContent":["import { Command, Option } from 'commander';\nimport { Authenticate, state } from '@rockcarver/frodo-lib';\nimport * as common from '../cmd_common';\nimport { listJourneys } from '../../ops/JourneyOps';\nimport { printMessage } from '../../utils/Console';\n\nconst { getTokens } = Authenticate;\n\nconst program = new Command('frodo journey list');\n\nprogram\n .description('List 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('-l, --long', 'Long with all fields.').default(false, 'false')\n )\n .addOption(new Option('-a, --analyze', 'Analyze journeys for custom nodes.'))\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 printMessage(\n `Listing journeys in realm \"${state.default.session.getRealm()}\"...`\n );\n listJourneys(options.long, options.analyze);\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,KAAvB,QAAoC,uBAApC;AACA,OAAO,KAAKC,MAAZ,MAAwB,eAAxB;AACA,SAASC,YAAT,QAA6B,sBAA7B;AACA,SAASC,YAAT,QAA6B,qBAA7B;AAEA,MAAM;EAAEC;AAAF,IAAgBL,YAAtB;AAEA,MAAMM,OAAO,GAAG,IAAIR,OAAJ,CAAY,oBAAZ,CAAhB;AAEAQ,OAAO,CACJC,WADH,CACe,sBADf,EAEGC,UAFH,CAEc,YAFd,EAE4B,MAF5B,EAGGC,kBAHH,GAIGC,WAJH,CAIeR,MAAM,CAACS,aAJtB,EAKGD,WALH,CAKeR,MAAM,CAACU,aALtB,EAMGF,WANH,CAMeR,MAAM,CAACW,YANtB,EAOGH,WAPH,CAOeR,MAAM,CAACY,gBAPtB,EAQGC,SARH,CAQab,MAAM,CAACc,gBARpB,EASGD,SATH,CASab,MAAM,CAACe,cATpB,EAUGF,SAVH,CAWI,IAAIhB,MAAJ,CAAW,YAAX,EAAyB,uBAAzB,EAAkDmB,OAAlD,CAA0D,KAA1D,EAAiE,OAAjE,CAXJ,EAaGH,SAbH,CAaa,IAAIhB,MAAJ,CAAW,eAAX,EAA4B,oCAA5B,CAbb,EAcGoB,MAdH,EAeI;AACA,OAAOC,IAAP,EAAaC,KAAb,EAAoBC,IAApB,EAA0BC,QAA1B,EAAoCC,OAApC,KAAgD;EAC9CvB,KAAK,CAACiB,OAAN,CAAcO,OAAd,CAAsBC,SAAtB,CAAgCN,IAAhC;EACAnB,KAAK,CAACiB,OAAN,CAAcO,OAAd,CAAsBE,QAAtB,CAA+BN,KAA/B;EACApB,KAAK,CAACiB,OAAN,CAAcO,OAAd,CAAsBG,WAAtB,CAAkCN,IAAlC;EACArB,KAAK,CAACiB,OAAN,CAAcO,OAAd,CAAsBI,WAAtB,CAAkCN,QAAlC;EACAtB,KAAK,CAACiB,OAAN,CAAcO,OAAd,CAAsBK,iBAAtB,CAAwCN,OAAO,CAACO,IAAhD;EACA9B,KAAK,CAACiB,OAAN,CAAcO,OAAd,CAAsBO,0BAAtB,CAAiDR,OAAO,CAACS,QAAzD;;EACA,IAAI,MAAM5B,SAAS,EAAnB,EAAuB;IACrBD,YAAY,CACT,8BAA6BH,KAAK,CAACiB,OAAN,CAAcO,OAAd,CAAsBS,QAAtB,EAAiC,MADrD,CAAZ;IAGA/B,YAAY,CAACqB,OAAO,CAACW,IAAT,EAAeX,OAAO,CAACY,OAAvB,CAAZ;EACD;AACF,CA7BL,CA8BI;AA9BJ;AAiCA9B,OAAO,CAAC+B,KAAR"}
1
+ {"version":3,"file":"journey-list.js","names":["Command","Option","Authenticate","state","common","listJourneys","printMessage","getTokens","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","getRealm","long","analyze","parse"],"sources":["cli/journey/journey-list.ts"],"sourcesContent":["import { Command, Option } from 'commander';\nimport { Authenticate, state } from '@rockcarver/frodo-lib';\nimport * as common from '../cmd_common';\nimport { listJourneys } from '../../ops/JourneyOps';\nimport { printMessage } from '../../utils/Console';\n\nconst { getTokens } = Authenticate;\n\nconst program = new Command('frodo journey list');\n\nprogram\n .description('List 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('-l, --long', 'Long with all fields.').default(false, 'false')\n )\n .addOption(new Option('-a, --analyze', 'Analyze journeys for custom nodes.'))\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 printMessage(\n `Listing journeys in realm \"${state.default.session.getRealm()}\"...`\n );\n listJourneys(options.long, options.analyze);\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,KAAK,QAAQ,uBAAuB;AAC3D,OAAO,KAAKC,MAAM,MAAM,eAAe;AACvC,SAASC,YAAY,QAAQ,sBAAsB;AACnD,SAASC,YAAY,QAAQ,qBAAqB;AAElD,MAAM;EAAEC;AAAU,CAAC,GAAGL,YAAY;AAElC,MAAMM,OAAO,GAAG,IAAIR,OAAO,CAAC,oBAAoB,CAAC;AAEjDQ,OAAO,CACJC,WAAW,CAAC,sBAAsB,CAAC,CACnCC,UAAU,CAAC,YAAY,EAAE,MAAM,CAAC,CAChCC,kBAAkB,EAAE,CACpBC,WAAW,CAACR,MAAM,CAACS,aAAa,CAAC,CACjCD,WAAW,CAACR,MAAM,CAACU,aAAa,CAAC,CACjCF,WAAW,CAACR,MAAM,CAACW,YAAY,CAAC,CAChCH,WAAW,CAACR,MAAM,CAACY,gBAAgB,CAAC,CACpCC,SAAS,CAACb,MAAM,CAACc,gBAAgB,CAAC,CAClCD,SAAS,CAACb,MAAM,CAACe,cAAc,CAAC,CAChCF,SAAS,CACR,IAAIhB,MAAM,CAAC,YAAY,EAAE,uBAAuB,CAAC,CAACmB,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,CAC1E,CACAH,SAAS,CAAC,IAAIhB,MAAM,CAAC,eAAe,EAAE,oCAAoC,CAAC,CAAC,CAC5EoB,MAAM;AACL;AACA,OAAOC,IAAI,EAAEC,KAAK,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,OAAO,KAAK;EAC9CvB,KAAK,CAACiB,OAAO,CAACO,OAAO,CAACC,SAAS,CAACN,IAAI,CAAC;EACrCnB,KAAK,CAACiB,OAAO,CAACO,OAAO,CAACE,QAAQ,CAACN,KAAK,CAAC;EACrCpB,KAAK,CAACiB,OAAO,CAACO,OAAO,CAACG,WAAW,CAACN,IAAI,CAAC;EACvCrB,KAAK,CAACiB,OAAO,CAACO,OAAO,CAACI,WAAW,CAACN,QAAQ,CAAC;EAC3CtB,KAAK,CAACiB,OAAO,CAACO,OAAO,CAACK,iBAAiB,CAACN,OAAO,CAACO,IAAI,CAAC;EACrD9B,KAAK,CAACiB,OAAO,CAACO,OAAO,CAACO,0BAA0B,CAACR,OAAO,CAACS,QAAQ,CAAC;EAClE,IAAI,MAAM5B,SAAS,EAAE,EAAE;IACrBD,YAAY,CACT,8BAA6BH,KAAK,CAACiB,OAAO,CAACO,OAAO,CAACS,QAAQ,EAAG,MAAK,CACrE;IACD/B,YAAY,CAACqB,OAAO,CAACW,IAAI,EAAEX,OAAO,CAACY,OAAO,CAAC;EAC7C;AACF;AACA;AAAA,CACD;;AAEH9B,OAAO,CAAC+B,KAAK,EAAE"}
@@ -11,7 +11,8 @@ const {
11
11
  removeOrphanedNodes
12
12
  } = Journey;
13
13
  const program = new Command('frodo journey prune');
14
- program.description('Prune orphaned configuration artifacts left behind after deleting authentication trees. You will be prompted before any destructive operations are performed.').helpOption('-h, --help', 'Help').showHelpAfterError().addArgument(common.hostArgumentM).addArgument(common.realmArgument).addArgument(common.userArgument).addArgument(common.passwordArgument).addOption(common.deploymentOption).addOption(common.insecureOption).action( // implement command logic inside action handler
14
+ program.description('Prune orphaned configuration artifacts left behind after deleting authentication trees. You will be prompted before any destructive operations are performed.').helpOption('-h, --help', 'Help').showHelpAfterError().addArgument(common.hostArgumentM).addArgument(common.realmArgument).addArgument(common.userArgument).addArgument(common.passwordArgument).addOption(common.deploymentOption).addOption(common.insecureOption).action(
15
+ // implement command logic inside action handler
15
16
  async (host, realm, user, password, options) => {
16
17
  state.default.session.setTenant(host);
17
18
  state.default.session.setRealm(realm);
@@ -19,16 +20,13 @@ async (host, realm, user, password, options) => {
19
20
  state.default.session.setPassword(password);
20
21
  state.default.session.setDeploymentType(options.type);
21
22
  state.default.session.setAllowInsecureConnection(options.insecure);
22
-
23
23
  if (await getTokens()) {
24
24
  printMessage(`Pruning orphaned configuration artifacts in realm "${state.default.session.getRealm()}"...`);
25
25
  const orphanedNodes = await findOrphanedNodes();
26
-
27
26
  if (orphanedNodes.length > 0) {
28
27
  const ok = await yesno({
29
28
  question: 'Prune (permanently delete) orphaned nodes? (y|n):'
30
29
  });
31
-
32
30
  if (ok) {
33
31
  await removeOrphanedNodes(orphanedNodes);
34
32
  }
@@ -36,7 +34,9 @@ async (host, realm, user, password, options) => {
36
34
  printMessage('No orphaned nodes found.');
37
35
  }
38
36
  }
39
- } // end command logic inside action handler
37
+ }
38
+ // end command logic inside action handler
40
39
  );
40
+
41
41
  program.parse();
42
42
  //# sourceMappingURL=journey-prune.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"journey-prune.js","names":["Command","Authenticate","Journey","state","yesno","common","printMessage","getTokens","findOrphanedNodes","removeOrphanedNodes","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","getRealm","orphanedNodes","length","ok","question","parse"],"sources":["cli/journey/journey-prune.ts"],"sourcesContent":["import { Command } from 'commander';\nimport { Authenticate, Journey, state } from '@rockcarver/frodo-lib';\nimport yesno from 'yesno';\nimport * as common from '../cmd_common';\nimport { printMessage } from '../../utils/Console';\n\nconst { getTokens } = Authenticate;\nconst { findOrphanedNodes, removeOrphanedNodes } = Journey;\n\nconst program = new Command('frodo journey prune');\n\nprogram\n .description(\n 'Prune orphaned configuration artifacts left behind after deleting authentication trees. You will be prompted before any destructive operations are performed.'\n )\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 .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 printMessage(\n `Pruning orphaned configuration artifacts in realm \"${state.default.session.getRealm()}\"...`\n );\n const orphanedNodes = await findOrphanedNodes();\n if (orphanedNodes.length > 0) {\n const ok = await yesno({\n question: 'Prune (permanently delete) orphaned nodes? (y|n):',\n });\n if (ok) {\n await removeOrphanedNodes(orphanedNodes);\n }\n } else {\n printMessage('No orphaned nodes found.');\n }\n }\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,WAAxB;AACA,SAASC,YAAT,EAAuBC,OAAvB,EAAgCC,KAAhC,QAA6C,uBAA7C;AACA,OAAOC,KAAP,MAAkB,OAAlB;AACA,OAAO,KAAKC,MAAZ,MAAwB,eAAxB;AACA,SAASC,YAAT,QAA6B,qBAA7B;AAEA,MAAM;EAAEC;AAAF,IAAgBN,YAAtB;AACA,MAAM;EAAEO,iBAAF;EAAqBC;AAArB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C,KAAK,CAAC;QACrBsC,QAAQ,EAAE;MADW,CAAD,CAAtB;;MAGA,IAAID,EAAJ,EAAQ;QACN,MAAMhC,mBAAmB,CAAC8B,aAAD,CAAzB;MACD;IACF,CAPD,MAOO;MACLjC,YAAY,CAAC,0BAAD,CAAZ;IACD;EACF;AACF,CArCL,CAsCI;AAtCJ;AAyCAI,OAAO,CAACiC,KAAR"}
1
+ {"version":3,"file":"journey-prune.js","names":["Command","Authenticate","Journey","state","yesno","common","printMessage","getTokens","findOrphanedNodes","removeOrphanedNodes","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","getRealm","orphanedNodes","length","ok","question","parse"],"sources":["cli/journey/journey-prune.ts"],"sourcesContent":["import { Command } from 'commander';\nimport { Authenticate, Journey, state } from '@rockcarver/frodo-lib';\nimport yesno from 'yesno';\nimport * as common from '../cmd_common';\nimport { printMessage } from '../../utils/Console';\n\nconst { getTokens } = Authenticate;\nconst { findOrphanedNodes, removeOrphanedNodes } = Journey;\n\nconst program = new Command('frodo journey prune');\n\nprogram\n .description(\n 'Prune orphaned configuration artifacts left behind after deleting authentication trees. You will be prompted before any destructive operations are performed.'\n )\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 .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 printMessage(\n `Pruning orphaned configuration artifacts in realm \"${state.default.session.getRealm()}\"...`\n );\n const orphanedNodes = await findOrphanedNodes();\n if (orphanedNodes.length > 0) {\n const ok = await yesno({\n question: 'Prune (permanently delete) orphaned nodes? (y|n):',\n });\n if (ok) {\n await removeOrphanedNodes(orphanedNodes);\n }\n } else {\n printMessage('No orphaned nodes found.');\n }\n }\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,WAAW;AACnC,SAASC,YAAY,EAAEC,OAAO,EAAEC,KAAK,QAAQ,uBAAuB;AACpE,OAAOC,KAAK,MAAM,OAAO;AACzB,OAAO,KAAKC,MAAM,MAAM,eAAe;AACvC,SAASC,YAAY,QAAQ,qBAAqB;AAElD,MAAM;EAAEC;AAAU,CAAC,GAAGN,YAAY;AAClC,MAAM;EAAEO,iBAAiB;EAAEC;AAAoB,CAAC,GAAGP,OAAO;AAE1D,MAAMQ,OAAO,GAAG,IAAIV,OAAO,CAAC,qBAAqB,CAAC;AAElDU,OAAO,CACJC,WAAW,CACV,+JAA+J,CAChK,CACAC,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,CAChCC,MAAM;AACL;AACA,OAAOC,IAAI,EAAEC,KAAK,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,OAAO,KAAK;EAC9CxB,KAAK,CAACyB,OAAO,CAACC,OAAO,CAACC,SAAS,CAACP,IAAI,CAAC;EACrCpB,KAAK,CAACyB,OAAO,CAACC,OAAO,CAACE,QAAQ,CAACP,KAAK,CAAC;EACrCrB,KAAK,CAACyB,OAAO,CAACC,OAAO,CAACG,WAAW,CAACP,IAAI,CAAC;EACvCtB,KAAK,CAACyB,OAAO,CAACC,OAAO,CAACI,WAAW,CAACP,QAAQ,CAAC;EAC3CvB,KAAK,CAACyB,OAAO,CAACC,OAAO,CAACK,iBAAiB,CAACP,OAAO,CAACQ,IAAI,CAAC;EACrDhC,KAAK,CAACyB,OAAO,CAACC,OAAO,CAACO,0BAA0B,CAACT,OAAO,CAACU,QAAQ,CAAC;EAClE,IAAI,MAAM9B,SAAS,EAAE,EAAE;IACrBD,YAAY,CACT,sDAAqDH,KAAK,CAACyB,OAAO,CAACC,OAAO,CAACS,QAAQ,EAAG,MAAK,CAC7F;IACD,MAAMC,aAAa,GAAG,MAAM/B,iBAAiB,EAAE;IAC/C,IAAI+B,aAAa,CAACC,MAAM,GAAG,CAAC,EAAE;MAC5B,MAAMC,EAAE,GAAG,MAAMrC,KAAK,CAAC;QACrBsC,QAAQ,EAAE;MACZ,CAAC,CAAC;MACF,IAAID,EAAE,EAAE;QACN,MAAMhC,mBAAmB,CAAC8B,aAAa,CAAC;MAC1C;IACF,CAAC,MAAM;MACLjC,YAAY,CAAC,0BAA0B,CAAC;IAC1C;EACF;AACF;AACA;AAAA,CACD;;AAEHI,OAAO,CAACiC,KAAK,EAAE"}
@@ -1,9 +1,7 @@
1
1
  import { Command } from 'commander';
2
2
  import path from 'path';
3
3
  import { fileURLToPath } from 'url';
4
-
5
4
  const __dirname = path.dirname(fileURLToPath(import.meta.url));
6
-
7
5
  export default function setup() {
8
6
  const program = new Command('journey').helpOption('-h, --help', 'Help').description('Manage journeys/trees.').executableDir(__dirname);
9
7
  program.command('list', 'List journeys/trees.').showHelpAfterError();
@@ -1 +1 @@
1
- {"version":3,"file":"journey.js","names":["Command","path","fileURLToPath","__dirname","dirname","import","meta","url","setup","program","helpOption","description","executableDir","command","showHelpAfterError"],"sources":["cli/journey/journey.ts"],"sourcesContent":["import { Command } from 'commander';\nimport path from 'path';\nimport { fileURLToPath } from 'url';\n\nconst __dirname = path.dirname(fileURLToPath(import.meta.url));\n\nexport default function setup() {\n const program = new Command('journey')\n .helpOption('-h, --help', 'Help')\n .description('Manage journeys/trees.')\n .executableDir(__dirname);\n\n program.command('list', 'List journeys/trees.').showHelpAfterError();\n\n program\n .command(\n 'describe',\n 'If host argument is supplied, describe the journey/tree indicated by -t, or all journeys/trees in the realm if no -t is supplied, otherwise describe the journey/tree export file indicated by -f.'\n )\n .showHelpAfterError();\n\n program.command('export', 'Export journeys/trees.').showHelpAfterError();\n\n program.command('import', 'Import journeys/trees.').showHelpAfterError();\n\n program.command('delete', 'Delete journeys/trees.').showHelpAfterError();\n\n program\n .command(\n 'prune',\n 'Prune orphaned configuration artifacts left behind after deleting authentication trees. You will be prompted before any destructive operations are performed.'\n )\n .showHelpAfterError();\n\n program.command('enable', 'Enable journeys/trees.').showHelpAfterError();\n\n program.command('disable', 'Disable journeys/trees.').showHelpAfterError();\n\n program.showHelpAfterError();\n return program;\n}\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,WAAxB;AACA,OAAOC,IAAP,MAAiB,MAAjB;AACA,SAASC,aAAT,QAA8B,KAA9B;;AAEA,MAAMC,SAAS,GAAGF,IAAI,CAACG,OAAL,CAAaF,aAAa,CAACG,MAAM,CAACC,IAAP,CAAYC,GAAb,CAA1B,CAAlB;;AAEA,eAAe,SAASC,KAAT,GAAiB;EAC9B,MAAMC,OAAO,GAAG,IAAIT,OAAJ,CAAY,SAAZ,EACbU,UADa,CACF,YADE,EACY,MADZ,EAEbC,WAFa,CAED,wBAFC,EAGbC,aAHa,CAGCT,SAHD,CAAhB;EAKAM,OAAO,CAACI,OAAR,CAAgB,MAAhB,EAAwB,sBAAxB,EAAgDC,kBAAhD;EAEAL,OAAO,CACJI,OADH,CAEI,UAFJ,EAGI,oMAHJ,EAKGC,kBALH;EAOAL,OAAO,CAACI,OAAR,CAAgB,QAAhB,EAA0B,wBAA1B,EAAoDC,kBAApD;EAEAL,OAAO,CAACI,OAAR,CAAgB,QAAhB,EAA0B,wBAA1B,EAAoDC,kBAApD;EAEAL,OAAO,CAACI,OAAR,CAAgB,QAAhB,EAA0B,wBAA1B,EAAoDC,kBAApD;EAEAL,OAAO,CACJI,OADH,CAEI,OAFJ,EAGI,+JAHJ,EAKGC,kBALH;EAOAL,OAAO,CAACI,OAAR,CAAgB,QAAhB,EAA0B,wBAA1B,EAAoDC,kBAApD;EAEAL,OAAO,CAACI,OAAR,CAAgB,SAAhB,EAA2B,yBAA3B,EAAsDC,kBAAtD;EAEAL,OAAO,CAACK,kBAAR;EACA,OAAOL,OAAP;AACD"}
1
+ {"version":3,"file":"journey.js","names":["Command","path","fileURLToPath","__dirname","dirname","import","meta","url","setup","program","helpOption","description","executableDir","command","showHelpAfterError"],"sources":["cli/journey/journey.ts"],"sourcesContent":["import { Command } from 'commander';\nimport path from 'path';\nimport { fileURLToPath } from 'url';\n\nconst __dirname = path.dirname(fileURLToPath(import.meta.url));\n\nexport default function setup() {\n const program = new Command('journey')\n .helpOption('-h, --help', 'Help')\n .description('Manage journeys/trees.')\n .executableDir(__dirname);\n\n program.command('list', 'List journeys/trees.').showHelpAfterError();\n\n program\n .command(\n 'describe',\n 'If host argument is supplied, describe the journey/tree indicated by -t, or all journeys/trees in the realm if no -t is supplied, otherwise describe the journey/tree export file indicated by -f.'\n )\n .showHelpAfterError();\n\n program.command('export', 'Export journeys/trees.').showHelpAfterError();\n\n program.command('import', 'Import journeys/trees.').showHelpAfterError();\n\n program.command('delete', 'Delete journeys/trees.').showHelpAfterError();\n\n program\n .command(\n 'prune',\n 'Prune orphaned configuration artifacts left behind after deleting authentication trees. You will be prompted before any destructive operations are performed.'\n )\n .showHelpAfterError();\n\n program.command('enable', 'Enable journeys/trees.').showHelpAfterError();\n\n program.command('disable', 'Disable journeys/trees.').showHelpAfterError();\n\n program.showHelpAfterError();\n return program;\n}\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,WAAW;AACnC,OAAOC,IAAI,MAAM,MAAM;AACvB,SAASC,aAAa,QAAQ,KAAK;AAEnC,MAAMC,SAAS,GAAGF,IAAI,CAACG,OAAO,CAACF,aAAa,CAACG,MAAM,CAACC,IAAI,CAACC,GAAG,CAAC,CAAC;AAE9D,eAAe,SAASC,KAAK,GAAG;EAC9B,MAAMC,OAAO,GAAG,IAAIT,OAAO,CAAC,SAAS,CAAC,CACnCU,UAAU,CAAC,YAAY,EAAE,MAAM,CAAC,CAChCC,WAAW,CAAC,wBAAwB,CAAC,CACrCC,aAAa,CAACT,SAAS,CAAC;EAE3BM,OAAO,CAACI,OAAO,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAACC,kBAAkB,EAAE;EAEpEL,OAAO,CACJI,OAAO,CACN,UAAU,EACV,oMAAoM,CACrM,CACAC,kBAAkB,EAAE;EAEvBL,OAAO,CAACI,OAAO,CAAC,QAAQ,EAAE,wBAAwB,CAAC,CAACC,kBAAkB,EAAE;EAExEL,OAAO,CAACI,OAAO,CAAC,QAAQ,EAAE,wBAAwB,CAAC,CAACC,kBAAkB,EAAE;EAExEL,OAAO,CAACI,OAAO,CAAC,QAAQ,EAAE,wBAAwB,CAAC,CAACC,kBAAkB,EAAE;EAExEL,OAAO,CACJI,OAAO,CACN,OAAO,EACP,+JAA+J,CAChK,CACAC,kBAAkB,EAAE;EAEvBL,OAAO,CAACI,OAAO,CAAC,QAAQ,EAAE,wBAAwB,CAAC,CAACC,kBAAkB,EAAE;EAExEL,OAAO,CAACI,OAAO,CAAC,SAAS,EAAE,yBAAyB,CAAC,CAACC,kBAAkB,EAAE;EAE1EL,OAAO,CAACK,kBAAkB,EAAE;EAC5B,OAAOL,OAAO;AAChB"}
@@ -35,7 +35,6 @@ Cannot be more than 30 days in the past. If not specified, logs from one hour ag
35
35
  state.default.session.setAllowInsecureConnection(options.insecure);
36
36
  const conn = await getConnectionProfile();
37
37
  state.default.session.setTenant(conn.tenant);
38
-
39
38
  if (conn.key != null && conn.secret != null) {
40
39
  credsFromParameters = false;
41
40
  state.default.session.setLogApiKey(conn.key);
@@ -51,46 +50,38 @@ Cannot be more than 30 days in the past. If not specified, logs from one hour ag
51
50
  state.default.session.setUsername(conn.username);
52
51
  state.default.session.setPassword(conn.password);
53
52
  }
54
-
55
53
  if (await getTokens()) {
56
54
  const creds = await provisionCreds();
57
55
  state.default.session.setLogApiKey(creds.api_key_id);
58
56
  state.default.session.setLogApiSecret(creds.api_key_secret);
59
57
  }
60
58
  }
61
-
62
59
  const now = Date.now() / 1000;
63
-
64
60
  if (typeof options.beginTimestamp === 'undefined' || !options.beginTimestamp) {
65
61
  // no beginTimestamp value specified, default is 1 hour ago
66
62
  const tempStartDate = new Date();
67
63
  tempStartDate.setTime((now - SECONDS_IN_1_HOUR) * 1000);
68
- options.beginTimestamp = tempStartDate.toISOString(); // also override endTimestamp to now
69
-
64
+ options.beginTimestamp = tempStartDate.toISOString();
65
+ // also override endTimestamp to now
70
66
  const tempEndDate = new Date();
71
67
  tempEndDate.setTime(now * 1000);
72
68
  options.endTimestamp = tempEndDate;
73
69
  printMessage('No timestamps specified, defaulting to logs from 1 hour ago', 'info');
74
70
  }
75
-
76
71
  if (typeof options.endTimestamp === 'undefined' || !options.endTimestamp) {
77
72
  // no endTimestamp value specified, default is now
78
73
  options.endTimestamp = now * 1000;
79
74
  printMessage('No end timestamp specified, defaulting end timestamp to "now"', 'info');
80
75
  }
81
-
82
76
  let beginTs = Date.parse(options.beginTimestamp) / 1000;
83
-
84
77
  if (Date.parse(options.endTimestamp) / 1000 < beginTs) {
85
78
  printMessage('End timestamp can not be before begin timestamp', 'error');
86
79
  return;
87
80
  }
88
-
89
81
  if (now - beginTs > LOG_TIME_WINDOW_MAX) {
90
82
  printMessage('Begin timestamp can not be more than 30 days in the past', 'error');
91
83
  return;
92
84
  }
93
-
94
85
  let intermediateEndTs = 0;
95
86
  printMessage(`Fetching ID Cloud logs from the following sources: ${command.opts().sources} and levels [${resolveLevel(command.opts().level)}]...`);
96
87
  if (credsFromParameters) await saveConnectionProfile(); // save new values if they were specified on CLI
@@ -1 +1 @@
1
- {"version":3,"file":"logs-fetch.js","names":["Command","Option","Authenticate","ConnectionProfile","Log","state","common","config","printMessage","provisionCreds","fetchLogs","resolveLevel","getConnectionProfile","saveConnectionProfile","getTokens","SECONDS_IN_30_DAYS","SECONDS_IN_1_HOUR","LOG_TIME_WINDOW_MAX","LOG_TIME_WINDOW_INCREMENT","program","description","helpOption","showHelpAfterError","addArgument","hostArgumentM","userArgument","passwordArgument","addOption","insecureOption","sourcesOptionM","default","getConfigPath","FRODO_LOG_NOISEFILTER_FILENAME","action","host","user","password","options","command","credsFromParameters","session","setTenant","setUsername","setPassword","setAllowInsecureConnection","insecure","conn","tenant","key","secret","setLogApiKey","setLogApiSecret","username","getUsername","getPassword","creds","api_key_id","api_key_secret","now","Date","beginTimestamp","tempStartDate","setTime","toISOString","tempEndDate","endTimestamp","beginTs","parse","intermediateEndTs","opts","sources","level","transactionId","searchString","getNoiseFilters","defaults"],"sources":["cli/logging/logs-fetch.ts"],"sourcesContent":["import { Command, Option } from 'commander';\nimport {\n Authenticate,\n ConnectionProfile,\n Log,\n state,\n} from '@rockcarver/frodo-lib';\nimport * as common from '../cmd_common';\nimport * as config from '../../utils/Config';\nimport { printMessage } from '../../utils/Console';\n\nconst { provisionCreds, fetchLogs, resolveLevel } = Log;\nconst { getConnectionProfile, saveConnectionProfile } = ConnectionProfile;\nconst { getTokens } = Authenticate;\n\nconst SECONDS_IN_30_DAYS = 2592000;\nconst SECONDS_IN_1_HOUR = 3600;\nconst LOG_TIME_WINDOW_MAX = SECONDS_IN_30_DAYS;\nconst LOG_TIME_WINDOW_INCREMENT = SECONDS_IN_1_HOUR;\n\nconst program = new Command('frodo logs fetch');\nprogram\n .description(\n 'Fetch Identity Cloud logs between a specified begin and end time period.\\\n WARNING: depending on filters and time period specified, this could take substantial time to complete.'\n )\n .helpOption('-h, --help', 'Help')\n .showHelpAfterError()\n .addArgument(common.hostArgumentM)\n .addArgument(common.userArgument)\n .addArgument(common.passwordArgument)\n .addOption(common.insecureOption)\n .addOption(common.sourcesOptionM)\n .addOption(\n new Option(\n '-l, --level <level>',\n 'Set log level filter. You can specify the level as a number or a string. \\\nFollowing values are possible (values on the same line are equivalent): \\\n\\n0, SEVERE, FATAL, or ERROR\\n1, WARNING, WARN or CONFIG\\\n\\n2, INFO or INFORMATION\\n3, DEBUG, FINE, FINER or FINEST\\\n\\n4 or ALL'\n ).default('ERROR', `${resolveLevel('ERROR')}`)\n )\n .addOption(\n new Option('-t, --transaction-id <txid>', 'Filter by transactionId')\n )\n .addOption(\n new Option(\n '-b, --begin-timestamp <beginTs>',\n 'Begin timestamp for period (in ISO8601, example: \"2022-10-13T19:06:28Z\", or \"2022-09.30\". \\\nCannot be more than 30 days in the past. If not specified, logs from one hour ago are fetched \\\n(-e is ignored)'\n )\n )\n .addOption(\n new Option(\n '-e, --end-timestamp <endTs>',\n 'End timestamp for period. Default: \"now\"'\n )\n )\n .addOption(\n new Option(\n '-s, --search-string <ss>',\n 'Filter by a specific string (ANDed with transactionID filter)'\n )\n )\n .addOption(\n new Option('-d, --defaults', 'Use default logging noise filters').default(\n false,\n `Use custom logging noise filters defined in ${config.getConfigPath()}/${\n config.FRODO_LOG_NOISEFILTER_FILENAME\n }`\n )\n )\n .action(async (host, user, password, options, command) => {\n let credsFromParameters = true;\n state.default.session.setTenant(host);\n state.default.session.setUsername(user);\n state.default.session.setPassword(password);\n state.default.session.setAllowInsecureConnection(options.insecure);\n const conn = await getConnectionProfile();\n state.default.session.setTenant(conn.tenant);\n if (conn.key != null && conn.secret != null) {\n credsFromParameters = false;\n state.default.session.setLogApiKey(conn.key);\n state.default.session.setLogApiSecret(conn.secret);\n } else {\n if (conn.username == null && conn.password == null) {\n if (\n !state.default.session.getUsername() &&\n !state.default.session.getPassword()\n ) {\n credsFromParameters = false;\n printMessage(\n 'User credentials not specified as parameters and no saved API key and secret found!',\n 'warn'\n );\n return;\n }\n } else {\n state.default.session.setUsername(conn.username);\n state.default.session.setPassword(conn.password);\n }\n if (await getTokens()) {\n const creds = await provisionCreds();\n state.default.session.setLogApiKey(creds.api_key_id);\n state.default.session.setLogApiSecret(creds.api_key_secret);\n }\n }\n const now = Date.now() / 1000;\n if (\n typeof options.beginTimestamp === 'undefined' ||\n !options.beginTimestamp\n ) {\n // no beginTimestamp value specified, default is 1 hour ago\n const tempStartDate = new Date();\n tempStartDate.setTime((now - SECONDS_IN_1_HOUR) * 1000);\n options.beginTimestamp = tempStartDate.toISOString();\n // also override endTimestamp to now\n const tempEndDate = new Date();\n tempEndDate.setTime(now * 1000);\n options.endTimestamp = tempEndDate;\n printMessage(\n 'No timestamps specified, defaulting to logs from 1 hour ago',\n 'info'\n );\n }\n if (typeof options.endTimestamp === 'undefined' || !options.endTimestamp) {\n // no endTimestamp value specified, default is now\n options.endTimestamp = now * 1000;\n printMessage(\n 'No end timestamp specified, defaulting end timestamp to \"now\"',\n 'info'\n );\n }\n let beginTs = Date.parse(options.beginTimestamp) / 1000;\n if (Date.parse(options.endTimestamp) / 1000 < beginTs) {\n printMessage('End timestamp can not be before begin timestamp', 'error');\n return;\n }\n if (now - beginTs > LOG_TIME_WINDOW_MAX) {\n printMessage(\n 'Begin timestamp can not be more than 30 days in the past',\n 'error'\n );\n return;\n }\n let intermediateEndTs = 0;\n printMessage(\n `Fetching ID Cloud logs from the following sources: ${\n command.opts().sources\n } and levels [${resolveLevel(command.opts().level)}]...`\n );\n if (credsFromParameters) await saveConnectionProfile(); // save new values if they were specified on CLI\n\n do {\n intermediateEndTs = beginTs + LOG_TIME_WINDOW_INCREMENT;\n await fetchLogs(\n command.opts().sources,\n new Date(beginTs * 1000).toISOString(),\n new Date(intermediateEndTs * 1000).toISOString(),\n resolveLevel(command.opts().level),\n command.opts().transactionId,\n command.opts().searchString,\n null,\n config.getNoiseFilters(options.defaults)\n );\n beginTs = intermediateEndTs;\n } while (intermediateEndTs < Date.parse(options.endTimestamp) / 1000);\n });\n\nprogram.parse();\n"],"mappings":"AAAA,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Pa,EAQblE,MAAM,CAACmE,eAAP,CAAuBrC,OAAO,CAACsC,QAA/B,CARa,CAAf;IAUAT,OAAO,GAAGE,iBAAV;EACD,CAbD,QAaSA,iBAAiB,GAAGT,IAAI,CAACQ,KAAL,CAAW9B,OAAO,CAAC4B,YAAnB,IAAmC,IAbhE;AAcD,CApJH;AAsJA9C,OAAO,CAACgD,KAAR"}
1
+ {"version":3,"file":"logs-fetch.js","names":["Command","Option","Authenticate","ConnectionProfile","Log","state","common","config","printMessage","provisionCreds","fetchLogs","resolveLevel","getConnectionProfile","saveConnectionProfile","getTokens","SECONDS_IN_30_DAYS","SECONDS_IN_1_HOUR","LOG_TIME_WINDOW_MAX","LOG_TIME_WINDOW_INCREMENT","program","description","helpOption","showHelpAfterError","addArgument","hostArgumentM","userArgument","passwordArgument","addOption","insecureOption","sourcesOptionM","default","getConfigPath","FRODO_LOG_NOISEFILTER_FILENAME","action","host","user","password","options","command","credsFromParameters","session","setTenant","setUsername","setPassword","setAllowInsecureConnection","insecure","conn","tenant","key","secret","setLogApiKey","setLogApiSecret","username","getUsername","getPassword","creds","api_key_id","api_key_secret","now","Date","beginTimestamp","tempStartDate","setTime","toISOString","tempEndDate","endTimestamp","beginTs","parse","intermediateEndTs","opts","sources","level","transactionId","searchString","getNoiseFilters","defaults"],"sources":["cli/logging/logs-fetch.ts"],"sourcesContent":["import { Command, Option } from 'commander';\nimport {\n Authenticate,\n ConnectionProfile,\n Log,\n state,\n} from '@rockcarver/frodo-lib';\nimport * as common from '../cmd_common';\nimport * as config from '../../utils/Config';\nimport { printMessage } from '../../utils/Console';\n\nconst { provisionCreds, fetchLogs, resolveLevel } = Log;\nconst { getConnectionProfile, saveConnectionProfile } = ConnectionProfile;\nconst { getTokens } = Authenticate;\n\nconst SECONDS_IN_30_DAYS = 2592000;\nconst SECONDS_IN_1_HOUR = 3600;\nconst LOG_TIME_WINDOW_MAX = SECONDS_IN_30_DAYS;\nconst LOG_TIME_WINDOW_INCREMENT = SECONDS_IN_1_HOUR;\n\nconst program = new Command('frodo logs fetch');\nprogram\n .description(\n 'Fetch Identity Cloud logs between a specified begin and end time period.\\\n WARNING: depending on filters and time period specified, this could take substantial time to complete.'\n )\n .helpOption('-h, --help', 'Help')\n .showHelpAfterError()\n .addArgument(common.hostArgumentM)\n .addArgument(common.userArgument)\n .addArgument(common.passwordArgument)\n .addOption(common.insecureOption)\n .addOption(common.sourcesOptionM)\n .addOption(\n new Option(\n '-l, --level <level>',\n 'Set log level filter. You can specify the level as a number or a string. \\\nFollowing values are possible (values on the same line are equivalent): \\\n\\n0, SEVERE, FATAL, or ERROR\\n1, WARNING, WARN or CONFIG\\\n\\n2, INFO or INFORMATION\\n3, DEBUG, FINE, FINER or FINEST\\\n\\n4 or ALL'\n ).default('ERROR', `${resolveLevel('ERROR')}`)\n )\n .addOption(\n new Option('-t, --transaction-id <txid>', 'Filter by transactionId')\n )\n .addOption(\n new Option(\n '-b, --begin-timestamp <beginTs>',\n 'Begin timestamp for period (in ISO8601, example: \"2022-10-13T19:06:28Z\", or \"2022-09.30\". \\\nCannot be more than 30 days in the past. If not specified, logs from one hour ago are fetched \\\n(-e is ignored)'\n )\n )\n .addOption(\n new Option(\n '-e, --end-timestamp <endTs>',\n 'End timestamp for period. Default: \"now\"'\n )\n )\n .addOption(\n new Option(\n '-s, --search-string <ss>',\n 'Filter by a specific string (ANDed with transactionID filter)'\n )\n )\n .addOption(\n new Option('-d, --defaults', 'Use default logging noise filters').default(\n false,\n `Use custom logging noise filters defined in ${config.getConfigPath()}/${\n config.FRODO_LOG_NOISEFILTER_FILENAME\n }`\n )\n )\n .action(async (host, user, password, options, command) => {\n let credsFromParameters = true;\n state.default.session.setTenant(host);\n state.default.session.setUsername(user);\n state.default.session.setPassword(password);\n state.default.session.setAllowInsecureConnection(options.insecure);\n const conn = await getConnectionProfile();\n state.default.session.setTenant(conn.tenant);\n if (conn.key != null && conn.secret != null) {\n credsFromParameters = false;\n state.default.session.setLogApiKey(conn.key);\n state.default.session.setLogApiSecret(conn.secret);\n } else {\n if (conn.username == null && conn.password == null) {\n if (\n !state.default.session.getUsername() &&\n !state.default.session.getPassword()\n ) {\n credsFromParameters = false;\n printMessage(\n 'User credentials not specified as parameters and no saved API key and secret found!',\n 'warn'\n );\n return;\n }\n } else {\n state.default.session.setUsername(conn.username);\n state.default.session.setPassword(conn.password);\n }\n if (await getTokens()) {\n const creds = await provisionCreds();\n state.default.session.setLogApiKey(creds.api_key_id);\n state.default.session.setLogApiSecret(creds.api_key_secret);\n }\n }\n const now = Date.now() / 1000;\n if (\n typeof options.beginTimestamp === 'undefined' ||\n !options.beginTimestamp\n ) {\n // no beginTimestamp value specified, default is 1 hour ago\n const tempStartDate = new Date();\n tempStartDate.setTime((now - SECONDS_IN_1_HOUR) * 1000);\n options.beginTimestamp = tempStartDate.toISOString();\n // also override endTimestamp to now\n const tempEndDate = new Date();\n tempEndDate.setTime(now * 1000);\n options.endTimestamp = tempEndDate;\n printMessage(\n 'No timestamps specified, defaulting to logs from 1 hour ago',\n 'info'\n );\n }\n if (typeof options.endTimestamp === 'undefined' || !options.endTimestamp) {\n // no endTimestamp value specified, default is now\n options.endTimestamp = now * 1000;\n printMessage(\n 'No end timestamp specified, defaulting end timestamp to \"now\"',\n 'info'\n );\n }\n let beginTs = Date.parse(options.beginTimestamp) / 1000;\n if (Date.parse(options.endTimestamp) / 1000 < beginTs) {\n printMessage('End timestamp can not be before begin timestamp', 'error');\n return;\n }\n if (now - beginTs > LOG_TIME_WINDOW_MAX) {\n printMessage(\n 'Begin timestamp can not be more than 30 days in the past',\n 'error'\n );\n return;\n }\n let intermediateEndTs = 0;\n printMessage(\n `Fetching ID Cloud logs from the following sources: ${\n command.opts().sources\n } and levels [${resolveLevel(command.opts().level)}]...`\n );\n if (credsFromParameters) await saveConnectionProfile(); // save new values if they were specified on CLI\n\n do {\n intermediateEndTs = beginTs + LOG_TIME_WINDOW_INCREMENT;\n await fetchLogs(\n command.opts().sources,\n new Date(beginTs * 1000).toISOString(),\n new Date(intermediateEndTs * 1000).toISOString(),\n resolveLevel(command.opts().level),\n command.opts().transactionId,\n command.opts().searchString,\n null,\n config.getNoiseFilters(options.defaults)\n );\n beginTs = intermediateEndTs;\n } while (intermediateEndTs < Date.parse(options.endTimestamp) / 1000);\n });\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,OAAO,EAAEC,MAAM,QAAQ,WAAW;AAC3C,SACEC,YAAY,EACZC,iBAAiB,EACjBC,GAAG,EACHC,KAAK,QACA,uBAAuB;AAC9B,OAAO,KAAKC,MAAM,MAAM,eAAe;AACvC,OAAO,KAAKC,MAAM,MAAM,oBAAoB;AAC5C,SAASC,YAAY,QAAQ,qBAAqB;AAElD,MAAM;EAAEC,cAAc;EAAEC,SAAS;EAAEC;AAAa,CAAC,GAAGP,GAAG;AACvD,MAAM;EAAEQ,oBAAoB;EAAEC;AAAsB,CAAC,GAAGV,iBAAiB;AACzE,MAAM;EAAEW;AAAU,CAAC,GAAGZ,YAAY;AAElC,MAAMa,kBAAkB,GAAG,OAAO;AAClC,MAAMC,iBAAiB,GAAG,IAAI;AAC9B,MAAMC,mBAAmB,GAAGF,kBAAkB;AAC9C,MAAMG,yBAAyB,GAAGF,iBAAiB;AAEnD,MAAMG,OAAO,GAAG,IAAInB,OAAO,CAAC,kBAAkB,CAAC;AAC/CmB,OAAO,CACJC,WAAW,CACV;AACJ,wGAAwG,CACrG,CACAC,UAAU,CAAC,YAAY,EAAE,MAAM,CAAC,CAChCC,kBAAkB,EAAE,CACpBC,WAAW,CAACjB,MAAM,CAACkB,aAAa,CAAC,CACjCD,WAAW,CAACjB,MAAM,CAACmB,YAAY,CAAC,CAChCF,WAAW,CAACjB,MAAM,CAACoB,gBAAgB,CAAC,CACpCC,SAAS,CAACrB,MAAM,CAACsB,cAAc,CAAC,CAChCD,SAAS,CAACrB,MAAM,CAACuB,cAAc,CAAC,CAChCF,SAAS,CACR,IAAI1B,MAAM,CACR,qBAAqB,EACrB;AACN;AACA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