@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.
- package/CHANGELOG.md +12 -1
- package/esm/app.js +2 -2
- package/esm/app.js.map +1 -1
- package/esm/cli/_template/something-delete.js +7 -4
- package/esm/cli/_template/something-delete.js.map +1 -1
- package/esm/cli/_template/something-describe.js +7 -4
- package/esm/cli/_template/something-describe.js.map +1 -1
- package/esm/cli/_template/something-else-delete.js +7 -4
- package/esm/cli/_template/something-else-delete.js.map +1 -1
- package/esm/cli/_template/something-else-describe.js +7 -4
- package/esm/cli/_template/something-else-describe.js.map +1 -1
- package/esm/cli/_template/something-else-export.js +7 -4
- package/esm/cli/_template/something-else-export.js.map +1 -1
- package/esm/cli/_template/something-else-import.js +7 -4
- package/esm/cli/_template/something-else-import.js.map +1 -1
- package/esm/cli/_template/something-else-list.js +7 -4
- package/esm/cli/_template/something-else-list.js.map +1 -1
- package/esm/cli/_template/something-else.js.map +1 -1
- package/esm/cli/_template/something-export.js +7 -4
- package/esm/cli/_template/something-export.js.map +1 -1
- package/esm/cli/_template/something-import.js +7 -4
- package/esm/cli/_template/something-import.js.map +1 -1
- package/esm/cli/_template/something-list.js +7 -4
- package/esm/cli/_template/something-list.js.map +1 -1
- package/esm/cli/_template/something-other-delete.js +7 -4
- package/esm/cli/_template/something-other-delete.js.map +1 -1
- package/esm/cli/_template/something-other-describe.js +7 -4
- package/esm/cli/_template/something-other-describe.js.map +1 -1
- package/esm/cli/_template/something-other-export.js +7 -4
- package/esm/cli/_template/something-other-export.js.map +1 -1
- package/esm/cli/_template/something-other-import.js +7 -4
- package/esm/cli/_template/something-other-import.js.map +1 -1
- package/esm/cli/_template/something-other-list.js +7 -4
- package/esm/cli/_template/something-other-list.js.map +1 -1
- package/esm/cli/_template/something-other.js.map +1 -1
- package/esm/cli/_template/something.js +0 -2
- package/esm/cli/_template/something.js.map +1 -1
- package/esm/cli/admin/admin-add-autoid-static-user-mapping.js +5 -3
- package/esm/cli/admin/admin-add-autoid-static-user-mapping.js.map +1 -1
- package/esm/cli/admin/admin-create-oauth2-client-with-admin-privileges.js +7 -11
- package/esm/cli/admin/admin-create-oauth2-client-with-admin-privileges.js.map +1 -1
- package/esm/cli/admin/admin-get-access-token.js +5 -3
- package/esm/cli/admin/admin-get-access-token.js.map +1 -1
- package/esm/cli/admin/admin-grant-oauth2-client-admin-privileges.js +5 -3
- package/esm/cli/admin/admin-grant-oauth2-client-admin-privileges.js.map +1 -1
- package/esm/cli/admin/admin-hide-generic-extension-attributes.js +5 -3
- package/esm/cli/admin/admin-hide-generic-extension-attributes.js.map +1 -1
- package/esm/cli/admin/admin-list-oauth2-clients-with-admin-privileges.js +5 -3
- package/esm/cli/admin/admin-list-oauth2-clients-with-admin-privileges.js.map +1 -1
- package/esm/cli/admin/admin-list-oauth2-clients-with-custom-privileges.js +5 -3
- package/esm/cli/admin/admin-list-oauth2-clients-with-custom-privileges.js.map +1 -1
- package/esm/cli/admin/admin-list-static-user-mappings.js +5 -3
- package/esm/cli/admin/admin-list-static-user-mappings.js.map +1 -1
- package/esm/cli/admin/admin-remove-static-user-mapping.js +5 -3
- package/esm/cli/admin/admin-remove-static-user-mapping.js.map +1 -1
- package/esm/cli/admin/admin-repair-org-model.js +5 -3
- package/esm/cli/admin/admin-repair-org-model.js.map +1 -1
- package/esm/cli/admin/admin-revoke-oauth2-client-admin-privileges.js +5 -3
- package/esm/cli/admin/admin-revoke-oauth2-client-admin-privileges.js.map +1 -1
- package/esm/cli/admin/admin-show-generic-extension-attributes.js +5 -3
- package/esm/cli/admin/admin-show-generic-extension-attributes.js.map +1 -1
- package/esm/cli/admin/admin.js +0 -2
- package/esm/cli/admin/admin.js.map +1 -1
- package/esm/cli/agent/agent-delete.js +9 -7
- package/esm/cli/agent/agent-delete.js.map +1 -1
- package/esm/cli/agent/agent-describe.js +7 -4
- package/esm/cli/agent/agent-describe.js.map +1 -1
- package/esm/cli/agent/agent-export.js +11 -6
- package/esm/cli/agent/agent-export.js.map +1 -1
- package/esm/cli/agent/agent-gateway-delete.js +9 -7
- package/esm/cli/agent/agent-gateway-delete.js.map +1 -1
- package/esm/cli/agent/agent-gateway-describe.js +7 -4
- package/esm/cli/agent/agent-gateway-describe.js.map +1 -1
- package/esm/cli/agent/agent-gateway-export.js +11 -6
- package/esm/cli/agent/agent-gateway-export.js.map +1 -1
- package/esm/cli/agent/agent-gateway-import.js +13 -7
- package/esm/cli/agent/agent-gateway-import.js.map +1 -1
- package/esm/cli/agent/agent-gateway-list.js +5 -3
- package/esm/cli/agent/agent-gateway-list.js.map +1 -1
- package/esm/cli/agent/agent-gateway.js.map +1 -1
- package/esm/cli/agent/agent-import.js +13 -7
- package/esm/cli/agent/agent-import.js.map +1 -1
- package/esm/cli/agent/agent-java-delete.js +9 -7
- package/esm/cli/agent/agent-java-delete.js.map +1 -1
- package/esm/cli/agent/agent-java-describe.js +7 -4
- package/esm/cli/agent/agent-java-describe.js.map +1 -1
- package/esm/cli/agent/agent-java-export.js +11 -6
- package/esm/cli/agent/agent-java-export.js.map +1 -1
- package/esm/cli/agent/agent-java-import.js +13 -7
- package/esm/cli/agent/agent-java-import.js.map +1 -1
- package/esm/cli/agent/agent-java-list.js +5 -3
- package/esm/cli/agent/agent-java-list.js.map +1 -1
- package/esm/cli/agent/agent-java.js.map +1 -1
- package/esm/cli/agent/agent-list.js +5 -3
- package/esm/cli/agent/agent-list.js.map +1 -1
- package/esm/cli/agent/agent-web-delete.js +9 -7
- package/esm/cli/agent/agent-web-delete.js.map +1 -1
- package/esm/cli/agent/agent-web-describe.js +7 -4
- package/esm/cli/agent/agent-web-describe.js.map +1 -1
- package/esm/cli/agent/agent-web-export.js +11 -6
- package/esm/cli/agent/agent-web-export.js.map +1 -1
- package/esm/cli/agent/agent-web-import.js +13 -7
- package/esm/cli/agent/agent-web-import.js.map +1 -1
- package/esm/cli/agent/agent-web-list.js +5 -3
- package/esm/cli/agent/agent-web-list.js.map +1 -1
- package/esm/cli/agent/agent-web.js.map +1 -1
- package/esm/cli/agent/agent.js +0 -2
- package/esm/cli/agent/agent.js.map +1 -1
- package/esm/cli/app/app-delete.js +7 -4
- package/esm/cli/app/app-delete.js.map +1 -1
- package/esm/cli/app/app-describe.js +7 -4
- package/esm/cli/app/app-describe.js.map +1 -1
- package/esm/cli/app/app-export.js +11 -6
- package/esm/cli/app/app-export.js.map +1 -1
- package/esm/cli/app/app-import.js +9 -5
- package/esm/cli/app/app-import.js.map +1 -1
- package/esm/cli/app/app-list.js +5 -3
- package/esm/cli/app/app-list.js.map +1 -1
- package/esm/cli/app/app.js +8 -5
- package/esm/cli/app/app.js.map +1 -1
- package/esm/cli/cmd_common.js +2 -1
- package/esm/cli/cmd_common.js.map +1 -1
- package/esm/cli/conn/conn-add.js +5 -5
- package/esm/cli/conn/conn-add.js.map +1 -1
- package/esm/cli/conn/conn-delete.js +5 -2
- package/esm/cli/conn/conn-delete.js.map +1 -1
- package/esm/cli/conn/conn-describe.js +5 -2
- package/esm/cli/conn/conn-describe.js.map +1 -1
- package/esm/cli/conn/conn-list.js +7 -3
- package/esm/cli/conn/conn-list.js.map +1 -1
- package/esm/cli/conn/conn.js +2 -3
- package/esm/cli/conn/conn.js.map +1 -1
- package/esm/cli/email/email-template-export.js +13 -12
- package/esm/cli/email/email-template-export.js.map +1 -1
- package/esm/cli/email/email-template-import.js +15 -14
- package/esm/cli/email/email-template-import.js.map +1 -1
- package/esm/cli/email/email-template-list.js +7 -7
- package/esm/cli/email/email-template-list.js.map +1 -1
- package/esm/cli/email/email-template.js.map +1 -1
- package/esm/cli/email/email.js +0 -2
- package/esm/cli/email/email.js.map +1 -1
- package/esm/cli/esv/esv-apply.js +9 -11
- package/esm/cli/esv/esv-apply.js.map +1 -1
- package/esm/cli/esv/esv-secret-create.js +5 -3
- package/esm/cli/esv/esv-secret-create.js.map +1 -1
- package/esm/cli/esv/esv-secret-delete.js +9 -5
- package/esm/cli/esv/esv-secret-delete.js.map +1 -1
- package/esm/cli/esv/esv-secret-describe.js +5 -3
- package/esm/cli/esv/esv-secret-describe.js.map +1 -1
- package/esm/cli/esv/esv-secret-export.js +7 -4
- package/esm/cli/esv/esv-secret-export.js.map +1 -1
- package/esm/cli/esv/esv-secret-import.js +7 -4
- package/esm/cli/esv/esv-secret-import.js.map +1 -1
- package/esm/cli/esv/esv-secret-list.js +5 -3
- package/esm/cli/esv/esv-secret-list.js.map +1 -1
- package/esm/cli/esv/esv-secret-set.js +5 -3
- package/esm/cli/esv/esv-secret-set.js.map +1 -1
- package/esm/cli/esv/esv-secret-version-activate.js +7 -4
- package/esm/cli/esv/esv-secret-version-activate.js.map +1 -1
- package/esm/cli/esv/esv-secret-version-create.js +5 -3
- package/esm/cli/esv/esv-secret-version-create.js.map +1 -1
- package/esm/cli/esv/esv-secret-version-deactivate.js +7 -4
- package/esm/cli/esv/esv-secret-version-deactivate.js.map +1 -1
- package/esm/cli/esv/esv-secret-version-delete.js +7 -4
- package/esm/cli/esv/esv-secret-version-delete.js.map +1 -1
- package/esm/cli/esv/esv-secret-version-list.js +5 -3
- package/esm/cli/esv/esv-secret-version-list.js.map +1 -1
- package/esm/cli/esv/esv-secret-version.js.map +1 -1
- package/esm/cli/esv/esv-secret.js +4 -1
- package/esm/cli/esv/esv-secret.js.map +1 -1
- package/esm/cli/esv/esv-variable-create.js +5 -3
- package/esm/cli/esv/esv-variable-create.js.map +1 -1
- package/esm/cli/esv/esv-variable-delete.js +9 -5
- package/esm/cli/esv/esv-variable-delete.js.map +1 -1
- package/esm/cli/esv/esv-variable-describe.js +5 -3
- package/esm/cli/esv/esv-variable-describe.js.map +1 -1
- package/esm/cli/esv/esv-variable-export.js +7 -4
- package/esm/cli/esv/esv-variable-export.js.map +1 -1
- package/esm/cli/esv/esv-variable-import.js +7 -4
- package/esm/cli/esv/esv-variable-import.js.map +1 -1
- package/esm/cli/esv/esv-variable-list.js +5 -3
- package/esm/cli/esv/esv-variable-list.js.map +1 -1
- package/esm/cli/esv/esv-variable-set.js +7 -4
- package/esm/cli/esv/esv-variable-set.js.map +1 -1
- package/esm/cli/esv/esv-variable.js +4 -1
- package/esm/cli/esv/esv-variable.js.map +1 -1
- package/esm/cli/esv/esv.js +0 -2
- package/esm/cli/esv/esv.js.map +1 -1
- package/esm/cli/idm/idm-count.js +5 -3
- package/esm/cli/idm/idm-count.js.map +1 -1
- package/esm/cli/idm/idm-export.js +11 -6
- package/esm/cli/idm/idm-export.js.map +1 -1
- package/esm/cli/idm/idm-import.js +11 -6
- package/esm/cli/idm/idm-import.js.map +1 -1
- package/esm/cli/idm/idm-list.js +7 -4
- package/esm/cli/idm/idm-list.js.map +1 -1
- package/esm/cli/idm/idm.js +2 -3
- package/esm/cli/idm/idm.js.map +1 -1
- package/esm/cli/idp/idp-export.js +11 -6
- package/esm/cli/idp/idp-export.js.map +1 -1
- package/esm/cli/idp/idp-import.js +13 -7
- package/esm/cli/idp/idp-import.js.map +1 -1
- package/esm/cli/idp/idp-list.js +7 -4
- package/esm/cli/idp/idp-list.js.map +1 -1
- package/esm/cli/idp/idp.js +0 -2
- package/esm/cli/idp/idp.js.map +1 -1
- package/esm/cli/info/info.js +0 -5
- package/esm/cli/info/info.js.map +1 -1
- package/esm/cli/journey/journey-delete.e2e.test_.js.map +1 -1
- package/esm/cli/journey/journey-delete.js +9 -5
- package/esm/cli/journey/journey-delete.js.map +1 -1
- package/esm/cli/journey/journey-describe.js +31 -28
- package/esm/cli/journey/journey-describe.js.map +1 -1
- package/esm/cli/journey/journey-disable.js +9 -6
- package/esm/cli/journey/journey-disable.js.map +1 -1
- package/esm/cli/journey/journey-enable.js +9 -6
- package/esm/cli/journey/journey-enable.js.map +1 -1
- package/esm/cli/journey/journey-export.js +11 -6
- package/esm/cli/journey/journey-export.js.map +1 -1
- package/esm/cli/journey/journey-import.js +13 -7
- package/esm/cli/journey/journey-import.js.map +1 -1
- package/esm/cli/journey/journey-list.e2e.test_.js.map +1 -1
- package/esm/cli/journey/journey-list.js +5 -3
- package/esm/cli/journey/journey-list.js.map +1 -1
- package/esm/cli/journey/journey-prune.js +5 -5
- package/esm/cli/journey/journey-prune.js.map +1 -1
- package/esm/cli/journey/journey.js +0 -2
- package/esm/cli/journey/journey.js.map +1 -1
- package/esm/cli/logging/logs-fetch.js +2 -11
- package/esm/cli/logging/logs-fetch.js.map +1 -1
- package/esm/cli/logging/logs-list.js +0 -5
- package/esm/cli/logging/logs-list.js.map +1 -1
- package/esm/cli/logging/logs-tail.js +0 -4
- package/esm/cli/logging/logs-tail.js.map +1 -1
- package/esm/cli/logging/logs.js +2 -4
- package/esm/cli/logging/logs.js.map +1 -1
- package/esm/cli/realm/realm-add-custom-domain.js +5 -3
- package/esm/cli/realm/realm-add-custom-domain.js.map +1 -1
- package/esm/cli/realm/realm-describe.js +5 -3
- package/esm/cli/realm/realm-describe.js.map +1 -1
- package/esm/cli/realm/realm-list.js +5 -3
- package/esm/cli/realm/realm-list.js.map +1 -1
- package/esm/cli/realm/realm-remove-custom-domain.js +5 -3
- package/esm/cli/realm/realm-remove-custom-domain.js.map +1 -1
- package/esm/cli/realm/realm.js +5 -4
- package/esm/cli/realm/realm.js.map +1 -1
- package/esm/cli/saml/saml-cot-export.js +11 -6
- package/esm/cli/saml/saml-cot-export.js.map +1 -1
- package/esm/cli/saml/saml-cot-import.js +13 -7
- package/esm/cli/saml/saml-cot-import.js.map +1 -1
- package/esm/cli/saml/saml-cot-list.js +5 -3
- package/esm/cli/saml/saml-cot-list.js.map +1 -1
- package/esm/cli/saml/saml-cot.js.map +1 -1
- package/esm/cli/saml/saml-delete.js +11 -6
- package/esm/cli/saml/saml-delete.js.map +1 -1
- package/esm/cli/saml/saml-describe.js +5 -3
- package/esm/cli/saml/saml-describe.js.map +1 -1
- package/esm/cli/saml/saml-export.js +13 -7
- package/esm/cli/saml/saml-export.js.map +1 -1
- package/esm/cli/saml/saml-import.js +13 -7
- package/esm/cli/saml/saml-import.js.map +1 -1
- package/esm/cli/saml/saml-list.js +5 -3
- package/esm/cli/saml/saml-list.js.map +1 -1
- package/esm/cli/saml/saml-metadata-export.js +7 -4
- package/esm/cli/saml/saml-metadata-export.js.map +1 -1
- package/esm/cli/saml/saml-metadata.js.map +1 -1
- package/esm/cli/saml/saml.js +0 -2
- package/esm/cli/saml/saml.js.map +1 -1
- package/esm/cli/script/script-delete.js +7 -4
- package/esm/cli/script/script-delete.js.map +1 -1
- package/esm/cli/script/script-describe.js +7 -4
- package/esm/cli/script/script-describe.js.map +1 -1
- package/esm/cli/script/script-export.js +15 -8
- package/esm/cli/script/script-export.js.map +1 -1
- package/esm/cli/script/script-import.js +7 -4
- package/esm/cli/script/script-import.js.map +1 -1
- package/esm/cli/script/script-list.js +5 -3
- package/esm/cli/script/script-list.js.map +1 -1
- package/esm/cli/script/script.js +6 -4
- package/esm/cli/script/script.js.map +1 -1
- package/esm/cli/service/service-delete.js +0 -1
- package/esm/cli/service/service-delete.js.map +1 -1
- package/esm/cli/service/service-export.js +11 -6
- package/esm/cli/service/service-export.js.map +1 -1
- package/esm/cli/service/service-import.js +13 -6
- package/esm/cli/service/service-import.js.map +1 -1
- package/esm/cli/service/service-list.js +0 -1
- package/esm/cli/service/service-list.js.map +1 -1
- package/esm/cli/service/service.js +0 -2
- package/esm/cli/service/service.js.map +1 -1
- package/esm/cli/theme/theme-delete.e2e.test_.js.map +1 -1
- package/esm/cli/theme/theme-delete.js +16 -14
- package/esm/cli/theme/theme-delete.js.map +1 -1
- package/esm/cli/theme/theme-export.js +17 -15
- package/esm/cli/theme/theme-export.js.map +1 -1
- package/esm/cli/theme/theme-import.js +19 -17
- package/esm/cli/theme/theme-import.js.map +1 -1
- package/esm/cli/theme/theme-list.e2e.test_.js.map +1 -1
- package/esm/cli/theme/theme-list.js +7 -7
- package/esm/cli/theme/theme-list.js.map +1 -1
- package/esm/cli/theme/theme.js +0 -2
- package/esm/cli/theme/theme.js.map +1 -1
- package/esm/ops/AgentOps.js +48 -126
- package/esm/ops/AgentOps.js.map +1 -1
- package/esm/ops/CirclesOfTrustOps.js +2 -2
- package/esm/ops/CirclesOfTrustOps.js.map +1 -1
- package/esm/ops/EmailTemplateOps.js +270 -6
- package/esm/ops/EmailTemplateOps.js.map +1 -1
- package/esm/ops/IdpOps.js +2 -2
- package/esm/ops/IdpOps.js.map +1 -1
- package/esm/ops/JourneyOps.js +96 -152
- package/esm/ops/JourneyOps.js.map +1 -1
- package/esm/ops/NodeOps.js +6 -12
- package/esm/ops/NodeOps.js.map +1 -1
- package/esm/ops/Saml2Ops.js +25 -78
- package/esm/ops/Saml2Ops.js.map +1 -1
- package/esm/ops/Saml2Ops.test_.js.map +1 -1
- package/esm/ops/ScriptOps.js +3 -3
- package/esm/ops/ScriptOps.js.map +1 -1
- package/esm/ops/ServiceOps.js +10 -31
- package/esm/ops/ServiceOps.js.map +1 -1
- package/esm/ops/ThemeOps.js +331 -2
- package/esm/ops/ThemeOps.js.map +1 -1
- package/esm/ops/utils/Wordwrap.js.map +1 -1
- package/esm/storage/StaticStorage.js.map +1 -1
- package/esm/utils/Config.js +0 -9
- package/esm/utils/Config.js.map +1 -1
- package/esm/utils/Console.js +32 -79
- package/esm/utils/Console.js.map +1 -1
- package/esm/utils/ExportImportUtils.js +46 -0
- package/esm/utils/ExportImportUtils.js.map +1 -0
- package/esm/utils/Version.js +6 -24
- package/esm/utils/Version.js.map +1 -1
- package/package.json +18 -17
package/esm/cli/app/app-list.js
CHANGED
|
@@ -9,7 +9,8 @@ const {
|
|
|
9
9
|
listOAuth2Clients
|
|
10
10
|
} = OAuth2Client;
|
|
11
11
|
const program = new Command('frodo app list');
|
|
12
|
-
program.description('List OAuth2 applications.').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')).action(
|
|
12
|
+
program.description('List OAuth2 applications.').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')).action(
|
|
13
|
+
// implement command logic inside action handler
|
|
13
14
|
async (host, realm, user, password, options) => {
|
|
14
15
|
state.default.session.setTenant(host);
|
|
15
16
|
state.default.session.setRealm(realm);
|
|
@@ -17,12 +18,13 @@ async (host, realm, user, password, options) => {
|
|
|
17
18
|
state.default.session.setPassword(password);
|
|
18
19
|
state.default.session.setDeploymentType(options.type);
|
|
19
20
|
state.default.session.setAllowInsecureConnection(options.insecure);
|
|
20
|
-
|
|
21
21
|
if (await getTokens()) {
|
|
22
22
|
printMessage(`Listing OAuth2 applications...`);
|
|
23
23
|
listOAuth2Clients(options.long);
|
|
24
24
|
}
|
|
25
|
-
}
|
|
25
|
+
}
|
|
26
|
+
// end command logic inside action handler
|
|
26
27
|
);
|
|
28
|
+
|
|
27
29
|
program.parse();
|
|
28
30
|
//# sourceMappingURL=app-list.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-list.js","names":["Command","Option","Authenticate","OAuth2Client","state","common","printMessage","getTokens","listOAuth2Clients","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","long","parse"],"sources":["cli/app/app-list.ts"],"sourcesContent":["import { Command, Option } from 'commander';\nimport { Authenticate, OAuth2Client, state } from '@rockcarver/frodo-lib';\nimport * as common from '../cmd_common.js';\nimport { printMessage } from '../../utils/Console.js';\n\nconst { getTokens } = Authenticate;\nconst { listOAuth2Clients } = OAuth2Client;\n\nconst program = new Command('frodo app list');\n\nprogram\n .description('List OAuth2 applications.')\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 .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(`Listing OAuth2 applications...`);\n listOAuth2Clients(options.long);\n }\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,
|
|
1
|
+
{"version":3,"file":"app-list.js","names":["Command","Option","Authenticate","OAuth2Client","state","common","printMessage","getTokens","listOAuth2Clients","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","long","parse"],"sources":["cli/app/app-list.ts"],"sourcesContent":["import { Command, Option } from 'commander';\nimport { Authenticate, OAuth2Client, state } from '@rockcarver/frodo-lib';\nimport * as common from '../cmd_common.js';\nimport { printMessage } from '../../utils/Console.js';\n\nconst { getTokens } = Authenticate;\nconst { listOAuth2Clients } = OAuth2Client;\n\nconst program = new Command('frodo app list');\n\nprogram\n .description('List OAuth2 applications.')\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 .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(`Listing OAuth2 applications...`);\n listOAuth2Clients(options.long);\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,YAAY,EAAEC,KAAK,QAAQ,uBAAuB;AACzE,OAAO,KAAKC,MAAM,MAAM,kBAAkB;AAC1C,SAASC,YAAY,QAAQ,wBAAwB;AAErD,MAAM;EAAEC;AAAU,CAAC,GAAGL,YAAY;AAClC,MAAM;EAAEM;AAAkB,CAAC,GAAGL,YAAY;AAE1C,MAAMM,OAAO,GAAG,IAAIT,OAAO,CAAC,gBAAgB,CAAC;AAE7CS,OAAO,CACJC,WAAW,CAAC,2BAA2B,CAAC,CACxCC,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,IAAIjB,MAAM,CAAC,YAAY,EAAE,uBAAuB,CAAC,CAACoB,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,CAC1E,CACAC,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,MAAM7B,SAAS,EAAE,EAAE;IACrBD,YAAY,CAAE,gCAA+B,CAAC;IAC9CE,iBAAiB,CAACmB,OAAO,CAACU,IAAI,CAAC;EACjC;AACF;AACA;AAAA,CACD;;AAEH5B,OAAO,CAAC6B,KAAK,EAAE"}
|
package/esm/cli/app/app.js
CHANGED
|
@@ -1,18 +1,21 @@
|
|
|
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
|
-
const program = new Command('app')
|
|
6
|
+
const program = new Command('app')
|
|
7
|
+
// for backwards compatibility
|
|
9
8
|
.alias('application').helpOption('-h, --help', 'Help').description('Manage OAuth2 applications.').executableDir(__dirname);
|
|
10
|
-
program.command('list', 'List OAuth2 applications.').showHelpAfterError();
|
|
9
|
+
program.command('list', 'List OAuth2 applications.').showHelpAfterError();
|
|
10
|
+
|
|
11
|
+
// program
|
|
11
12
|
// .command('describe', 'Describe OAuth2 applications.')
|
|
12
13
|
// .showHelpAfterError();
|
|
13
14
|
|
|
14
15
|
program.command('export', 'Export OAuth2 applications.').showHelpAfterError();
|
|
15
|
-
program.command('import', 'Import OAuth2 applications.').showHelpAfterError();
|
|
16
|
+
program.command('import', 'Import OAuth2 applications.').showHelpAfterError();
|
|
17
|
+
|
|
18
|
+
// program.command('delete', 'Delete OAuth2 applications.').showHelpAfterError();
|
|
16
19
|
|
|
17
20
|
program.showHelpAfterError();
|
|
18
21
|
return program;
|
package/esm/cli/app/app.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.js","names":["Command","path","fileURLToPath","__dirname","dirname","import","meta","url","setup","program","alias","helpOption","description","executableDir","command","showHelpAfterError"],"sources":["cli/app/app.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('app')\n // for backwards compatibility\n .alias('application')\n .helpOption('-h, --help', 'Help')\n .description('Manage OAuth2 applications.')\n .executableDir(__dirname);\n\n program.command('list', 'List OAuth2 applications.').showHelpAfterError();\n\n // program\n // .command('describe', 'Describe OAuth2 applications.')\n // .showHelpAfterError();\n\n program.command('export', 'Export OAuth2 applications.').showHelpAfterError();\n\n program.command('import', 'Import OAuth2 applications.').showHelpAfterError();\n\n // program.command('delete', 'Delete OAuth2 applications.').showHelpAfterError();\n\n program.showHelpAfterError();\n return program;\n}\n"],"mappings":"AAAA,SAASA,
|
|
1
|
+
{"version":3,"file":"app.js","names":["Command","path","fileURLToPath","__dirname","dirname","import","meta","url","setup","program","alias","helpOption","description","executableDir","command","showHelpAfterError"],"sources":["cli/app/app.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('app')\n // for backwards compatibility\n .alias('application')\n .helpOption('-h, --help', 'Help')\n .description('Manage OAuth2 applications.')\n .executableDir(__dirname);\n\n program.command('list', 'List OAuth2 applications.').showHelpAfterError();\n\n // program\n // .command('describe', 'Describe OAuth2 applications.')\n // .showHelpAfterError();\n\n program.command('export', 'Export OAuth2 applications.').showHelpAfterError();\n\n program.command('import', 'Import OAuth2 applications.').showHelpAfterError();\n\n // program.command('delete', 'Delete OAuth2 applications.').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,KAAK;EAC/B;EAAA,CACCU,KAAK,CAAC,aAAa,CAAC,CACpBC,UAAU,CAAC,YAAY,EAAE,MAAM,CAAC,CAChCC,WAAW,CAAC,6BAA6B,CAAC,CAC1CC,aAAa,CAACV,SAAS,CAAC;EAE3BM,OAAO,CAACK,OAAO,CAAC,MAAM,EAAE,2BAA2B,CAAC,CAACC,kBAAkB,EAAE;;EAEzE;EACA;EACA;;EAEAN,OAAO,CAACK,OAAO,CAAC,QAAQ,EAAE,6BAA6B,CAAC,CAACC,kBAAkB,EAAE;EAE7EN,OAAO,CAACK,OAAO,CAAC,QAAQ,EAAE,6BAA6B,CAAC,CAACC,kBAAkB,EAAE;;EAE7E;;EAEAN,OAAO,CAACM,kBAAkB,EAAE;EAC5B,OAAON,OAAO;AAChB"}
|
package/esm/cli/cmd_common.js
CHANGED
|
@@ -9,7 +9,8 @@ state.default.session.setCurlirizeHandler(curlirizeMessage);
|
|
|
9
9
|
state.default.session.setCreateProgressHandler(createProgressIndicator);
|
|
10
10
|
state.default.session.setUpdateProgressHandler(updateProgressIndicator);
|
|
11
11
|
state.default.session.setStopProgressHandler(stopProgressIndicator);
|
|
12
|
-
export function init() {
|
|
12
|
+
export function init() {
|
|
13
|
+
// pseudo functions for commands that do not otherwise need to import
|
|
13
14
|
// this file but need to trigger print and progress handler registration
|
|
14
15
|
}
|
|
15
16
|
const hostArgumentDescription = 'Access Management base URL, e.g.: https://cdk.iam.example.com/am. To use a connection profile, just specify a unique substring.';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cmd_common.js","names":["Argument","Option","state","globalConfig","printMessage","createProgressIndicator","updateProgressIndicator","stopProgressIndicator","verboseMessage","debugMessage","curlirizeMessage","default","session","setPrintHandler","setVerboseHandler","setDebugHandler","setCurlirizeHandler","setCreateProgressHandler","setUpdateProgressHandler","setStopProgressHandler","init","hostArgumentDescription","hostArgument","hostArgumentM","realmArgumentDescription","realmArgument","DEFAULT_REALM_KEY","realmArgumentM","userArgumentDescription","userArgument","userArgumentM","passwordArgumentDescription","passwordArgument","passwordArgumentM","apiKeyArgumentDescription","apiKeyArgument","apiSecretArgumentDescription","apiSecretArgument","treeOptionDescription","treeOption","treeOptionM","fileOptionDescription","fileOption","fileOptionM","deploymentOptionDescription","deploymentOption","choices","DEPLOYMENT_TYPES","deploymentOptionM","insecureOption","verboseOption","debugOption","curlirizeOption","managedNameOption","managedNameOptionM","dirOptionDescription","dirOption","dirOptionM","entitiesFileOptionDescription","entitiesFileOption","entitiesFileOptionM","envFileOptionDescription","envFileOption","envFileOptionM","sourcesOptionDescription","sourcesOptionDefaultValueDescription","sourcesOptionM","scriptFriendlyOption","makeOptionMandatory"],"sources":["cli/cmd_common.ts"],"sourcesContent":["import { Argument, Option } from 'commander';\nimport { state } from '@rockcarver/frodo-lib';\nimport * as globalConfig from '../storage/StaticStorage';\nimport {\n printMessage,\n createProgressIndicator,\n updateProgressIndicator,\n stopProgressIndicator,\n verboseMessage,\n debugMessage,\n curlirizeMessage,\n} from '../utils/Console.js';\n\nstate.default.session.setPrintHandler(printMessage);\nstate.default.session.setVerboseHandler(verboseMessage);\nstate.default.session.setDebugHandler(debugMessage);\nstate.default.session.setCurlirizeHandler(curlirizeMessage);\nstate.default.session.setCreateProgressHandler(createProgressIndicator);\nstate.default.session.setUpdateProgressHandler(updateProgressIndicator);\nstate.default.session.setStopProgressHandler(stopProgressIndicator);\n\nexport function init() {\n // pseudo functions for commands that do not otherwise need to import\n // this file but need to trigger print and progress handler registration\n}\n\nconst hostArgumentDescription =\n 'Access Management base URL, e.g.: https://cdk.iam.example.com/am. To use a connection profile, just specify a unique substring.';\nexport const hostArgument = new Argument('[host]', hostArgumentDescription);\nexport const hostArgumentM = new Argument('<host>', hostArgumentDescription);\n\nconst realmArgumentDescription =\n \"Realm. Specify realm as '/' for the root realm or 'realm' or '/parent/child' otherwise.\";\nexport const realmArgument = new Argument(\n '[realm]',\n realmArgumentDescription\n).default(\n globalConfig.DEFAULT_REALM_KEY,\n '\"alpha\" for Identity Cloud tenants, \"/\" otherwise.'\n);\nexport const realmArgumentM = new Argument('<realm>', realmArgumentDescription);\n\nconst userArgumentDescription =\n 'Username to login with. Must be an admin user with appropriate rights to manage authentication journeys/trees.';\nexport const userArgument = new Argument('[user]', userArgumentDescription);\nexport const userArgumentM = new Argument('<user>', userArgumentDescription);\n\nconst passwordArgumentDescription = 'Password.';\nexport const passwordArgument = new Argument(\n '[password]',\n passwordArgumentDescription\n);\nexport const passwordArgumentM = new Argument(\n '<password>',\n passwordArgumentDescription\n);\n\nconst apiKeyArgumentDescription = 'API key for logging API.';\nexport const apiKeyArgument = new Argument('[key]', apiKeyArgumentDescription);\n\nconst apiSecretArgumentDescription = 'API secret for logging API.';\nexport const apiSecretArgument = new Argument(\n '[secret]',\n apiSecretArgumentDescription\n);\n\nconst treeOptionDescription =\n 'Specify the name of an authentication journey/tree.';\nexport const treeOption = new Option(\n '-t, --tree <tree>',\n treeOptionDescription\n);\nexport const treeOptionM = new Option(\n '-t, --tree <tree>',\n treeOptionDescription\n);\n\nconst fileOptionDescription = 'File name.';\nexport const fileOption = new Option(\n '-f, --file <file>',\n fileOptionDescription\n);\nexport const fileOptionM = new Option(\n '-f, --file <file>',\n fileOptionDescription\n);\n\nconst deploymentOptionDescription =\n 'Override auto-detected deployment type. Valid values for type: \\n\\\nclassic: A classic Access Management-only deployment with custom layout and configuration. \\n\\\ncloud: A ForgeRock Identity Cloud environment. \\n\\\nforgeops: A ForgeOps CDK or CDM deployment. \\n\\\nThe detected or provided deployment type controls certain behavior like obtaining an Identity \\\nManagement admin token or not and whether to export/import referenced email templates or how \\\nto walk through the tenant admin login flow of Identity Cloud and handle MFA';\nexport const deploymentOption = new Option(\n '-m, --type <type>',\n deploymentOptionDescription\n).choices(globalConfig.DEPLOYMENT_TYPES);\nexport const deploymentOptionM = new Option(\n '-m, --type <type>',\n deploymentOptionDescription\n).choices(globalConfig.DEPLOYMENT_TYPES);\n\nexport const insecureOption = new Option(\n '-k, --insecure',\n 'Allow insecure connections when using SSL/TLS. Has no effect when using a network proxy for https (HTTPS_PROXY=http://<host>:<port>), in that case the proxy must provide this capability.'\n).default(false, \"Don't allow insecure connections\");\n\nexport const verboseOption = new Option(\n '--verbose',\n 'Verbose output during command execution. If specified, may or may not produce additional output.'\n);\n\nexport const debugOption = new Option(\n '--debug',\n 'Debug output during command execution. If specified, may or may not produce additional output helpful for troubleshooting.'\n);\n\nexport const curlirizeOption = new Option(\n '--curlirize',\n 'Output all network calls in curl format.'\n);\n\nexport const managedNameOption = new Option(\n '-N, --name <name>',\n 'Managed object name to be operated on. Examples are \\\nuser, role, alpha_user, alpha_role etc.'\n);\nexport const managedNameOptionM = new Option(\n '-N, --name <name>',\n 'Managed object name to be operated on. Examples are \\\nuser, role, alpha_user, alpha_role etc.'\n);\n\nconst dirOptionDescription =\n 'Directory for exporting all configuration entities to.';\nexport const dirOption = new Option(\n '-D, --directory <directory>',\n dirOptionDescription\n);\nexport const dirOptionM = new Option(\n '-D, --directory <directory>',\n dirOptionDescription\n);\n\nconst entitiesFileOptionDescription =\n 'JSON file that specifies the config entities to export/import.';\nexport const entitiesFileOption = new Option(\n '-E, --entitiesFile <file>',\n entitiesFileOptionDescription\n);\nexport const entitiesFileOptionM = new Option(\n '-E, --entitiesFile <file>',\n entitiesFileOptionDescription\n);\n\nconst envFileOptionDescription =\n 'File that defines environment specific variables for replacement during configuration export/import.';\nexport const envFileOption = new Option(\n '-e, --envFile <file>',\n envFileOptionDescription\n);\nexport const envFileOptionM = new Option(\n '-e, --envFile <file>',\n envFileOptionDescription\n);\n\nconst sourcesOptionDescription = 'Comma separated list of log sources';\nconst sourcesOptionDefaultValueDescription = 'Log everything';\nexport const sourcesOptionM = new Option(\n '-c, --sources <sources>',\n sourcesOptionDescription\n).default('am-everything,idm-everything', sourcesOptionDefaultValueDescription);\n\nexport const scriptFriendlyOption = new Option(\n '-s, --scriptFriendly',\n 'Send output of operation to STDOUT in a script-friendly format (JSON) which can be piped to other \\\ncommands. User messages/warnings are output to STDERR, and are not piped. For example, to only get \\\nbearer token: \\n\\\n<<< frodo info my-tenant -s 2>/dev/null | jq -r .bearerToken >>>'\n).default(false, 'Output as plain text');\n\ntreeOptionM.makeOptionMandatory();\nfileOptionM.makeOptionMandatory();\ndeploymentOptionM.makeOptionMandatory();\ndirOptionM.makeOptionMandatory();\nentitiesFileOptionM.makeOptionMandatory();\nenvFileOptionM.makeOptionMandatory();\nmanagedNameOptionM.makeOptionMandatory();\nsourcesOptionM.makeOptionMandatory();\n"],"mappings":"AAAA,SAASA,QAAT,EAAmBC,MAAnB,QAAiC,WAAjC;AACA,SAASC,KAAT,QAAsB,uBAAtB;AACA,OAAO,KAAKC,YAAZ,MAA8B,0BAA9B;AACA,SACEC,YADF,EAEEC,uBAFF,EAGEC,uBAHF,EAIEC,qBAJF,EAKEC,cALF,EAMEC,YANF,EAOEC,gBAPF,QAQO,qBARP;AAUAR,KAAK,CAACS,OAAN,CAAcC,OAAd,CAAsBC,eAAtB,CAAsCT,YAAtC;AACAF,KAAK,CAACS,OAAN,CAAcC,OAAd,CAAsBE,iBAAtB,CAAwCN,cAAxC;AACAN,KAAK,CAACS,OAAN,CAAcC,OAAd,CAAsBG,eAAtB,CAAsCN,YAAtC;AACAP,KAAK,CAACS,OAAN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AAQP6B,WAAW,CAAC4B,mBAAZ;AACAzB,WAAW,CAACyB,mBAAZ;AACApB,iBAAiB,CAACoB,mBAAlB;AACAX,UAAU,CAACW,mBAAX;AACAR,mBAAmB,CAACQ,mBAApB;AACAL,cAAc,CAACK,mBAAf;AACAd,kBAAkB,CAACc,mBAAnB;AACAF,cAAc,CAACE,mBAAf"}
|
|
1
|
+
{"version":3,"file":"cmd_common.js","names":["Argument","Option","state","globalConfig","printMessage","createProgressIndicator","updateProgressIndicator","stopProgressIndicator","verboseMessage","debugMessage","curlirizeMessage","default","session","setPrintHandler","setVerboseHandler","setDebugHandler","setCurlirizeHandler","setCreateProgressHandler","setUpdateProgressHandler","setStopProgressHandler","init","hostArgumentDescription","hostArgument","hostArgumentM","realmArgumentDescription","realmArgument","DEFAULT_REALM_KEY","realmArgumentM","userArgumentDescription","userArgument","userArgumentM","passwordArgumentDescription","passwordArgument","passwordArgumentM","apiKeyArgumentDescription","apiKeyArgument","apiSecretArgumentDescription","apiSecretArgument","treeOptionDescription","treeOption","treeOptionM","fileOptionDescription","fileOption","fileOptionM","deploymentOptionDescription","deploymentOption","choices","DEPLOYMENT_TYPES","deploymentOptionM","insecureOption","verboseOption","debugOption","curlirizeOption","managedNameOption","managedNameOptionM","dirOptionDescription","dirOption","dirOptionM","entitiesFileOptionDescription","entitiesFileOption","entitiesFileOptionM","envFileOptionDescription","envFileOption","envFileOptionM","sourcesOptionDescription","sourcesOptionDefaultValueDescription","sourcesOptionM","scriptFriendlyOption","makeOptionMandatory"],"sources":["cli/cmd_common.ts"],"sourcesContent":["import { Argument, Option } from 'commander';\nimport { state } from '@rockcarver/frodo-lib';\nimport * as globalConfig from '../storage/StaticStorage';\nimport {\n printMessage,\n createProgressIndicator,\n updateProgressIndicator,\n stopProgressIndicator,\n verboseMessage,\n debugMessage,\n curlirizeMessage,\n} from '../utils/Console.js';\n\nstate.default.session.setPrintHandler(printMessage);\nstate.default.session.setVerboseHandler(verboseMessage);\nstate.default.session.setDebugHandler(debugMessage);\nstate.default.session.setCurlirizeHandler(curlirizeMessage);\nstate.default.session.setCreateProgressHandler(createProgressIndicator);\nstate.default.session.setUpdateProgressHandler(updateProgressIndicator);\nstate.default.session.setStopProgressHandler(stopProgressIndicator);\n\nexport function init() {\n // pseudo functions for commands that do not otherwise need to import\n // this file but need to trigger print and progress handler registration\n}\n\nconst hostArgumentDescription =\n 'Access Management base URL, e.g.: https://cdk.iam.example.com/am. To use a connection profile, just specify a unique substring.';\nexport const hostArgument = new Argument('[host]', hostArgumentDescription);\nexport const hostArgumentM = new Argument('<host>', hostArgumentDescription);\n\nconst realmArgumentDescription =\n \"Realm. Specify realm as '/' for the root realm or 'realm' or '/parent/child' otherwise.\";\nexport const realmArgument = new Argument(\n '[realm]',\n realmArgumentDescription\n).default(\n globalConfig.DEFAULT_REALM_KEY,\n '\"alpha\" for Identity Cloud tenants, \"/\" otherwise.'\n);\nexport const realmArgumentM = new Argument('<realm>', realmArgumentDescription);\n\nconst userArgumentDescription =\n 'Username to login with. Must be an admin user with appropriate rights to manage authentication journeys/trees.';\nexport const userArgument = new Argument('[user]', userArgumentDescription);\nexport const userArgumentM = new Argument('<user>', userArgumentDescription);\n\nconst passwordArgumentDescription = 'Password.';\nexport const passwordArgument = new Argument(\n '[password]',\n passwordArgumentDescription\n);\nexport const passwordArgumentM = new Argument(\n '<password>',\n passwordArgumentDescription\n);\n\nconst apiKeyArgumentDescription = 'API key for logging API.';\nexport const apiKeyArgument = new Argument('[key]', apiKeyArgumentDescription);\n\nconst apiSecretArgumentDescription = 'API secret for logging API.';\nexport const apiSecretArgument = new Argument(\n '[secret]',\n apiSecretArgumentDescription\n);\n\nconst treeOptionDescription =\n 'Specify the name of an authentication journey/tree.';\nexport const treeOption = new Option(\n '-t, --tree <tree>',\n treeOptionDescription\n);\nexport const treeOptionM = new Option(\n '-t, --tree <tree>',\n treeOptionDescription\n);\n\nconst fileOptionDescription = 'File name.';\nexport const fileOption = new Option(\n '-f, --file <file>',\n fileOptionDescription\n);\nexport const fileOptionM = new Option(\n '-f, --file <file>',\n fileOptionDescription\n);\n\nconst deploymentOptionDescription =\n 'Override auto-detected deployment type. Valid values for type: \\n\\\nclassic: A classic Access Management-only deployment with custom layout and configuration. \\n\\\ncloud: A ForgeRock Identity Cloud environment. \\n\\\nforgeops: A ForgeOps CDK or CDM deployment. \\n\\\nThe detected or provided deployment type controls certain behavior like obtaining an Identity \\\nManagement admin token or not and whether to export/import referenced email templates or how \\\nto walk through the tenant admin login flow of Identity Cloud and handle MFA';\nexport const deploymentOption = new Option(\n '-m, --type <type>',\n deploymentOptionDescription\n).choices(globalConfig.DEPLOYMENT_TYPES);\nexport const deploymentOptionM = new Option(\n '-m, --type <type>',\n deploymentOptionDescription\n).choices(globalConfig.DEPLOYMENT_TYPES);\n\nexport const insecureOption = new Option(\n '-k, --insecure',\n 'Allow insecure connections when using SSL/TLS. Has no effect when using a network proxy for https (HTTPS_PROXY=http://<host>:<port>), in that case the proxy must provide this capability.'\n).default(false, \"Don't allow insecure connections\");\n\nexport const verboseOption = new Option(\n '--verbose',\n 'Verbose output during command execution. If specified, may or may not produce additional output.'\n);\n\nexport const debugOption = new Option(\n '--debug',\n 'Debug output during command execution. If specified, may or may not produce additional output helpful for troubleshooting.'\n);\n\nexport const curlirizeOption = new Option(\n '--curlirize',\n 'Output all network calls in curl format.'\n);\n\nexport const managedNameOption = new Option(\n '-N, --name <name>',\n 'Managed object name to be operated on. Examples are \\\nuser, role, alpha_user, alpha_role etc.'\n);\nexport const managedNameOptionM = new Option(\n '-N, --name <name>',\n 'Managed object name to be operated on. Examples are \\\nuser, role, alpha_user, alpha_role etc.'\n);\n\nconst dirOptionDescription =\n 'Directory for exporting all configuration entities to.';\nexport const dirOption = new Option(\n '-D, --directory <directory>',\n dirOptionDescription\n);\nexport const dirOptionM = new Option(\n '-D, --directory <directory>',\n dirOptionDescription\n);\n\nconst entitiesFileOptionDescription =\n 'JSON file that specifies the config entities to export/import.';\nexport const entitiesFileOption = new Option(\n '-E, --entitiesFile <file>',\n entitiesFileOptionDescription\n);\nexport const entitiesFileOptionM = new Option(\n '-E, --entitiesFile <file>',\n entitiesFileOptionDescription\n);\n\nconst envFileOptionDescription =\n 'File that defines environment specific variables for replacement during configuration export/import.';\nexport const envFileOption = new Option(\n '-e, --envFile <file>',\n envFileOptionDescription\n);\nexport const envFileOptionM = new Option(\n '-e, --envFile <file>',\n envFileOptionDescription\n);\n\nconst sourcesOptionDescription = 'Comma separated list of log sources';\nconst sourcesOptionDefaultValueDescription = 'Log everything';\nexport const sourcesOptionM = new Option(\n '-c, --sources <sources>',\n sourcesOptionDescription\n).default('am-everything,idm-everything', sourcesOptionDefaultValueDescription);\n\nexport const scriptFriendlyOption = new Option(\n '-s, --scriptFriendly',\n 'Send output of operation to STDOUT in a script-friendly format (JSON) which can be piped to other \\\ncommands. User messages/warnings are output to STDERR, and are not piped. For example, to only get \\\nbearer token: \\n\\\n<<< frodo info my-tenant -s 2>/dev/null | jq -r .bearerToken >>>'\n).default(false, 'Output as plain text');\n\ntreeOptionM.makeOptionMandatory();\nfileOptionM.makeOptionMandatory();\ndeploymentOptionM.makeOptionMandatory();\ndirOptionM.makeOptionMandatory();\nentitiesFileOptionM.makeOptionMandatory();\nenvFileOptionM.makeOptionMandatory();\nmanagedNameOptionM.makeOptionMandatory();\nsourcesOptionM.makeOptionMandatory();\n"],"mappings":"AAAA,SAASA,QAAQ,EAAEC,MAAM,QAAQ,WAAW;AAC5C,SAASC,KAAK,QAAQ,uBAAuB;AAC7C,OAAO,KAAKC,YAAY,MAAM,0BAA0B;AACxD,SACEC,YAAY,EACZC,uBAAuB,EACvBC,uBAAuB,EACvBC,qBAAqB,EACrBC,cAAc,EACdC,YAAY,EACZC,gBAAgB,QACX,qBAAqB;AAE5BR,KAAK,CAACS,OAAO,CAACC,OAAO,CAACC,eAAe,CAACT,YAAY,CAAC;AACnDF,KAAK,CAACS,OAAO,CAACC,OAAO,CAACE,iBAAiB,CAACN,cA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AACA;AACA,iEAAiE,CAChE,CAACU,OAAO,CAAC,KAAK,EAAE,sBAAsB,CAAC;AAExC6B,WAAW,CAAC4B,mBAAmB,EAAE;AACjCzB,WAAW,CAACyB,mBAAmB,EAAE;AACjCpB,iBAAiB,CAACoB,mBAAmB,EAAE;AACvCX,UAAU,CAACW,mBAAmB,EAAE;AAChCR,mBAAmB,CAACQ,mBAAmB,EAAE;AACzCL,cAAc,CAACK,mBAAmB,EAAE;AACpCd,kBAAkB,CAACc,mBAAmB,EAAE;AACxCF,cAAc,CAACE,mBAAmB,EAAE"}
|
package/esm/cli/conn/conn-add.js
CHANGED
|
@@ -8,7 +8,8 @@ const {
|
|
|
8
8
|
saveConnectionProfile
|
|
9
9
|
} = ConnectionProfile;
|
|
10
10
|
const program = new Command('frodo conn add');
|
|
11
|
-
program.description('Add a new connection profiles. You have to specify a URL, username and password at a minimum.\nOptionally, for Identity Cloud, you can also add a log API key and secret.').helpOption('-h, --help', 'Help').showHelpAfterError().addArgument(common.hostArgumentM).addArgument(common.userArgument).addArgument(common.passwordArgument).addArgument(common.apiKeyArgument).addArgument(common.apiSecretArgument).addOption(common.deploymentOption).addOption(common.insecureOption).addOption(new Option('--no-validate', 'Do not validate connection.')).addOption(new Option('--authentication-service [service]', 'Name of the authentication service/tree to use.')).addOption(new Option('--authentication-header-overrides [headers]', 'Map of headers: {"host":"am.example.com:8081"}.')).action(
|
|
11
|
+
program.description('Add a new connection profiles. You have to specify a URL, username and password at a minimum.\nOptionally, for Identity Cloud, you can also add a log API key and secret.').helpOption('-h, --help', 'Help').showHelpAfterError().addArgument(common.hostArgumentM).addArgument(common.userArgument).addArgument(common.passwordArgument).addArgument(common.apiKeyArgument).addArgument(common.apiSecretArgument).addOption(common.deploymentOption).addOption(common.insecureOption).addOption(new Option('--no-validate', 'Do not validate connection.')).addOption(new Option('--authentication-service [service]', 'Name of the authentication service/tree to use.')).addOption(new Option('--authentication-header-overrides [headers]', 'Map of headers: {"host":"am.example.com:8081"}.')).action(
|
|
12
|
+
// implement command logic inside action handler
|
|
12
13
|
async (host, user, password, key, secret, options) => {
|
|
13
14
|
state.default.session.setTenant(host);
|
|
14
15
|
state.default.session.setUsername(user);
|
|
@@ -17,21 +18,20 @@ async (host, user, password, key, secret, options) => {
|
|
|
17
18
|
state.default.session.setLogApiSecret(secret);
|
|
18
19
|
state.default.session.setDeploymentType(options.type);
|
|
19
20
|
state.default.session.setAllowInsecureConnection(options.insecure);
|
|
20
|
-
|
|
21
21
|
if (options.authenticationService) {
|
|
22
22
|
state.default.session.setAuthenticationService(options.authenticationService);
|
|
23
23
|
}
|
|
24
|
-
|
|
25
24
|
if (options.authenticationHeaderOverrides) {
|
|
26
25
|
state.default.session.setAuthenticationHeaderOverrides(JSON.parse(options.authenticationHeaderOverrides));
|
|
27
26
|
}
|
|
28
|
-
|
|
29
27
|
if (options.validate && (await getTokens()) || !options.validate) {
|
|
30
28
|
saveConnectionProfile();
|
|
31
29
|
} else {
|
|
32
30
|
process.exitCode = 1;
|
|
33
31
|
}
|
|
34
|
-
}
|
|
32
|
+
}
|
|
33
|
+
// end command logic inside action handler
|
|
35
34
|
);
|
|
35
|
+
|
|
36
36
|
program.parse();
|
|
37
37
|
//# sourceMappingURL=conn-add.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conn-add.js","names":["Command","Option","Authenticate","ConnectionProfile","state","common","getTokens","saveConnectionProfile","program","description","helpOption","showHelpAfterError","addArgument","hostArgumentM","userArgument","passwordArgument","apiKeyArgument","apiSecretArgument","addOption","deploymentOption","insecureOption","action","host","user","password","key","secret","options","default","session","setTenant","setUsername","setPassword","setLogApiKey","setLogApiSecret","setDeploymentType","type","setAllowInsecureConnection","insecure","authenticationService","setAuthenticationService","authenticationHeaderOverrides","setAuthenticationHeaderOverrides","JSON","parse","validate","process","exitCode"],"sources":["cli/conn/conn-add.ts"],"sourcesContent":["import { Command, Option } from 'commander';\nimport { Authenticate, ConnectionProfile, state } from '@rockcarver/frodo-lib';\nimport * as common from '../cmd_common.js';\n\nconst { getTokens } = Authenticate;\nconst { saveConnectionProfile } = ConnectionProfile;\n\nconst program = new Command('frodo conn add');\n\nprogram\n .description(\n 'Add a new connection profiles. You have to specify a URL, username and password at a minimum.\\nOptionally, for Identity Cloud, you can also add a log API key and secret.'\n )\n .helpOption('-h, --help', 'Help')\n .showHelpAfterError()\n .addArgument(common.hostArgumentM)\n .addArgument(common.userArgument)\n .addArgument(common.passwordArgument)\n .addArgument(common.apiKeyArgument)\n .addArgument(common.apiSecretArgument)\n .addOption(common.deploymentOption)\n .addOption(common.insecureOption)\n .addOption(new Option('--no-validate', 'Do not validate connection.'))\n .addOption(\n new Option(\n '--authentication-service [service]',\n 'Name of the authentication service/tree to use.'\n )\n )\n .addOption(\n new Option(\n '--authentication-header-overrides [headers]',\n 'Map of headers: {\"host\":\"am.example.com:8081\"}.'\n )\n )\n .action(\n // implement command logic inside action handler\n async (host, user, password, key, secret, options) => {\n state.default.session.setTenant(host);\n state.default.session.setUsername(user);\n state.default.session.setPassword(password);\n state.default.session.setLogApiKey(key);\n state.default.session.setLogApiSecret(secret);\n state.default.session.setDeploymentType(options.type);\n state.default.session.setAllowInsecureConnection(options.insecure);\n if (options.authenticationService) {\n state.default.session.setAuthenticationService(\n options.authenticationService\n );\n }\n if (options.authenticationHeaderOverrides) {\n state.default.session.setAuthenticationHeaderOverrides(\n JSON.parse(options.authenticationHeaderOverrides)\n );\n }\n if ((options.validate && (await getTokens())) || !options.validate) {\n saveConnectionProfile();\n } else {\n process.exitCode = 1;\n }\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,
|
|
1
|
+
{"version":3,"file":"conn-add.js","names":["Command","Option","Authenticate","ConnectionProfile","state","common","getTokens","saveConnectionProfile","program","description","helpOption","showHelpAfterError","addArgument","hostArgumentM","userArgument","passwordArgument","apiKeyArgument","apiSecretArgument","addOption","deploymentOption","insecureOption","action","host","user","password","key","secret","options","default","session","setTenant","setUsername","setPassword","setLogApiKey","setLogApiSecret","setDeploymentType","type","setAllowInsecureConnection","insecure","authenticationService","setAuthenticationService","authenticationHeaderOverrides","setAuthenticationHeaderOverrides","JSON","parse","validate","process","exitCode"],"sources":["cli/conn/conn-add.ts"],"sourcesContent":["import { Command, Option } from 'commander';\nimport { Authenticate, ConnectionProfile, state } from '@rockcarver/frodo-lib';\nimport * as common from '../cmd_common.js';\n\nconst { getTokens } = Authenticate;\nconst { saveConnectionProfile } = ConnectionProfile;\n\nconst program = new Command('frodo conn add');\n\nprogram\n .description(\n 'Add a new connection profiles. You have to specify a URL, username and password at a minimum.\\nOptionally, for Identity Cloud, you can also add a log API key and secret.'\n )\n .helpOption('-h, --help', 'Help')\n .showHelpAfterError()\n .addArgument(common.hostArgumentM)\n .addArgument(common.userArgument)\n .addArgument(common.passwordArgument)\n .addArgument(common.apiKeyArgument)\n .addArgument(common.apiSecretArgument)\n .addOption(common.deploymentOption)\n .addOption(common.insecureOption)\n .addOption(new Option('--no-validate', 'Do not validate connection.'))\n .addOption(\n new Option(\n '--authentication-service [service]',\n 'Name of the authentication service/tree to use.'\n )\n )\n .addOption(\n new Option(\n '--authentication-header-overrides [headers]',\n 'Map of headers: {\"host\":\"am.example.com:8081\"}.'\n )\n )\n .action(\n // implement command logic inside action handler\n async (host, user, password, key, secret, options) => {\n state.default.session.setTenant(host);\n state.default.session.setUsername(user);\n state.default.session.setPassword(password);\n state.default.session.setLogApiKey(key);\n state.default.session.setLogApiSecret(secret);\n state.default.session.setDeploymentType(options.type);\n state.default.session.setAllowInsecureConnection(options.insecure);\n if (options.authenticationService) {\n state.default.session.setAuthenticationService(\n options.authenticationService\n );\n }\n if (options.authenticationHeaderOverrides) {\n state.default.session.setAuthenticationHeaderOverrides(\n JSON.parse(options.authenticationHeaderOverrides)\n );\n }\n if ((options.validate && (await getTokens())) || !options.validate) {\n saveConnectionProfile();\n } else {\n process.exitCode = 1;\n }\n }\n // end command logic inside action handler\n );\n\nprogram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,OAAO,CAACC,OAAO,CAACG,WAAW,CAACR,QAAQ,CAAC;EAC3CpB,KAAK,CAACwB,OAAO,CAACC,OAAO,CAACI,YAAY,CAACR,GAAG,CAAC;EACvCrB,KAAK,CAACwB,OAAO,CAACC,OAAO,CAACK,eAAe,CAACR,MAAM,CAAC;EAC7CtB,KAAK,CAACwB,OAAO,CAACC,OAAO,CAACM,iBAAiB,CAACR,OAAO,CAACS,IAAI,CAAC;EACrDhC,KAAK,CAACwB,OAAO,CAACC,OAAO,CAACQ,0BAA0B,CAACV,OAAO,CAACW,QAAQ,CAAC;EAClE,IAAIX,OAAO,CAACY,qBAAqB,EAAE;IACjCnC,KAAK,CAACwB,OAAO,CAACC,OAAO,CAACW,wBAAwB,CAC5Cb,OAAO,CAACY,qBAAqB,CAC9B;EACH;EACA,IAAIZ,OAAO,CAACc,6BAA6B,EAAE;IACzCrC,KAAK,CAACwB,OAAO,CAACC,OAAO,CAACa,gCAAgC,CACpDC,IAAI,CAACC,KAAK,CAACjB,OAAO,CAACc,6BAA6B,CAAC,CAClD;EACH;EACA,IAAKd,OAAO,CAACkB,QAAQ,KAAK,MAAMvC,SAAS,EAAE,CAAC,IAAK,CAACqB,OAAO,CAACkB,QAAQ,EAAE;IAClEtC,qBAAqB,EAAE;EACzB,CAAC,MAAM;IACLuC,OAAO,CAACC,QAAQ,GAAG,CAAC;EACtB;AACF;AACA;AAAA,CACD;;AAEHvC,OAAO,CAACoC,KAAK,EAAE"}
|
|
@@ -5,10 +5,13 @@ const {
|
|
|
5
5
|
deleteConnectionProfile
|
|
6
6
|
} = ConnectionProfile;
|
|
7
7
|
const program = new Command('frodo conn delete');
|
|
8
|
-
program.description('Delete connection profiles.').helpOption('-h, --help', 'Help').showHelpAfterError().addArgument(common.hostArgumentM).action(
|
|
8
|
+
program.description('Delete connection profiles.').helpOption('-h, --help', 'Help').showHelpAfterError().addArgument(common.hostArgumentM).action(
|
|
9
|
+
// implement command logic inside action handler
|
|
9
10
|
async host => {
|
|
10
11
|
deleteConnectionProfile(host);
|
|
11
|
-
}
|
|
12
|
+
}
|
|
13
|
+
// end command logic inside action handler
|
|
12
14
|
);
|
|
15
|
+
|
|
13
16
|
program.parse();
|
|
14
17
|
//# sourceMappingURL=conn-delete.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conn-delete.js","names":["Command","ConnectionProfile","common","deleteConnectionProfile","program","description","helpOption","showHelpAfterError","addArgument","hostArgumentM","action","host","parse"],"sources":["cli/conn/conn-delete.ts"],"sourcesContent":["import { Command } from 'commander';\nimport { ConnectionProfile } from '@rockcarver/frodo-lib';\nimport * as common from '../cmd_common.js';\n\nconst { deleteConnectionProfile } = ConnectionProfile;\n\nconst program = new Command('frodo conn delete');\n\nprogram\n .description('Delete connection profiles.')\n .helpOption('-h, --help', 'Help')\n .showHelpAfterError()\n .addArgument(common.hostArgumentM)\n .action(\n // implement command logic inside action handler\n async (host) => {\n deleteConnectionProfile(host);\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,
|
|
1
|
+
{"version":3,"file":"conn-delete.js","names":["Command","ConnectionProfile","common","deleteConnectionProfile","program","description","helpOption","showHelpAfterError","addArgument","hostArgumentM","action","host","parse"],"sources":["cli/conn/conn-delete.ts"],"sourcesContent":["import { Command } from 'commander';\nimport { ConnectionProfile } from '@rockcarver/frodo-lib';\nimport * as common from '../cmd_common.js';\n\nconst { deleteConnectionProfile } = ConnectionProfile;\n\nconst program = new Command('frodo conn delete');\n\nprogram\n .description('Delete connection profiles.')\n .helpOption('-h, --help', 'Help')\n .showHelpAfterError()\n .addArgument(common.hostArgumentM)\n .action(\n // implement command logic inside action handler\n async (host) => {\n deleteConnectionProfile(host);\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,WAAW;AACnC,SAASC,iBAAiB,QAAQ,uBAAuB;AACzD,OAAO,KAAKC,MAAM,MAAM,kBAAkB;AAE1C,MAAM;EAAEC;AAAwB,CAAC,GAAGF,iBAAiB;AAErD,MAAMG,OAAO,GAAG,IAAIJ,OAAO,CAAC,mBAAmB,CAAC;AAEhDI,OAAO,CACJC,WAAW,CAAC,6BAA6B,CAAC,CAC1CC,UAAU,CAAC,YAAY,EAAE,MAAM,CAAC,CAChCC,kBAAkB,EAAE,CACpBC,WAAW,CAACN,MAAM,CAACO,aAAa,CAAC,CACjCC,MAAM;AACL;AACA,MAAOC,IAAI,IAAK;EACdR,uBAAuB,CAACQ,IAAI,CAAC;AAC/B;AACA;AAAA,CACD;;AAEHP,OAAO,CAACQ,KAAK,EAAE"}
|
|
@@ -5,10 +5,13 @@ const {
|
|
|
5
5
|
describeConnectionProfile
|
|
6
6
|
} = ConnectionProfile;
|
|
7
7
|
const program = new Command('frodo conn describe');
|
|
8
|
-
program.description('Describe connection profile.').helpOption('-h, --help', 'Help').showHelpAfterError().addArgument(common.hostArgumentM).addOption(new Option('--show-secrets', 'Show passwords and secrets.')).action(
|
|
8
|
+
program.description('Describe connection profile.').helpOption('-h, --help', 'Help').showHelpAfterError().addArgument(common.hostArgumentM).addOption(new Option('--show-secrets', 'Show passwords and secrets.')).action(
|
|
9
|
+
// implement command logic inside action handler
|
|
9
10
|
async (host, options) => {
|
|
10
11
|
describeConnectionProfile(host, options.showSecrets);
|
|
11
|
-
}
|
|
12
|
+
}
|
|
13
|
+
// end command logic inside action handler
|
|
12
14
|
);
|
|
15
|
+
|
|
13
16
|
program.parse();
|
|
14
17
|
//# sourceMappingURL=conn-describe.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conn-describe.js","names":["Command","Option","ConnectionProfile","common","describeConnectionProfile","program","description","helpOption","showHelpAfterError","addArgument","hostArgumentM","addOption","action","host","options","showSecrets","parse"],"sources":["cli/conn/conn-describe.ts"],"sourcesContent":["import { Command, Option } from 'commander';\nimport { ConnectionProfile } from '@rockcarver/frodo-lib';\nimport * as common from '../cmd_common.js';\n\nconst { describeConnectionProfile } = ConnectionProfile;\n\nconst program = new Command('frodo conn describe');\n\nprogram\n .description('Describe connection profile.')\n .helpOption('-h, --help', 'Help')\n .showHelpAfterError()\n .addArgument(common.hostArgumentM)\n .addOption(new Option('--show-secrets', 'Show passwords and secrets.'))\n .action(\n // implement command logic inside action handler\n async (host, options) => {\n describeConnectionProfile(host, options.showSecrets);\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,
|
|
1
|
+
{"version":3,"file":"conn-describe.js","names":["Command","Option","ConnectionProfile","common","describeConnectionProfile","program","description","helpOption","showHelpAfterError","addArgument","hostArgumentM","addOption","action","host","options","showSecrets","parse"],"sources":["cli/conn/conn-describe.ts"],"sourcesContent":["import { Command, Option } from 'commander';\nimport { ConnectionProfile } from '@rockcarver/frodo-lib';\nimport * as common from '../cmd_common.js';\n\nconst { describeConnectionProfile } = ConnectionProfile;\n\nconst program = new Command('frodo conn describe');\n\nprogram\n .description('Describe connection profile.')\n .helpOption('-h, --help', 'Help')\n .showHelpAfterError()\n .addArgument(common.hostArgumentM)\n .addOption(new Option('--show-secrets', 'Show passwords and secrets.'))\n .action(\n // implement command logic inside action handler\n async (host, options) => {\n describeConnectionProfile(host, options.showSecrets);\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,OAAO,EAAEC,MAAM,QAAQ,WAAW;AAC3C,SAASC,iBAAiB,QAAQ,uBAAuB;AACzD,OAAO,KAAKC,MAAM,MAAM,kBAAkB;AAE1C,MAAM;EAAEC;AAA0B,CAAC,GAAGF,iBAAiB;AAEvD,MAAMG,OAAO,GAAG,IAAIL,OAAO,CAAC,qBAAqB,CAAC;AAElDK,OAAO,CACJC,WAAW,CAAC,8BAA8B,CAAC,CAC3CC,UAAU,CAAC,YAAY,EAAE,MAAM,CAAC,CAChCC,kBAAkB,EAAE,CACpBC,WAAW,CAACN,MAAM,CAACO,aAAa,CAAC,CACjCC,SAAS,CAAC,IAAIV,MAAM,CAAC,gBAAgB,EAAE,6BAA6B,CAAC,CAAC,CACtEW,MAAM;AACL;AACA,OAAOC,IAAI,EAAEC,OAAO,KAAK;EACvBV,yBAAyB,CAACS,IAAI,EAAEC,OAAO,CAACC,WAAW,CAAC;AACtD;AACA;AAAA,CACD;;AAEHV,OAAO,CAACW,KAAK,EAAE"}
|
|
@@ -3,14 +3,18 @@ import { ConnectionProfile } from '@rockcarver/frodo-lib';
|
|
|
3
3
|
import { init } from '../cmd_common.js';
|
|
4
4
|
const {
|
|
5
5
|
listConnectionProfiles
|
|
6
|
-
} = ConnectionProfile;
|
|
6
|
+
} = ConnectionProfile;
|
|
7
7
|
|
|
8
|
+
// pseudo init to trigger print and progress handler registration
|
|
8
9
|
init();
|
|
9
10
|
const program = new Command('frodo conn list');
|
|
10
|
-
program.description('List connection profiles.').helpOption('-h, --help', 'Help').showHelpAfterError().addOption(new Option('-l, --long', 'Long with all fields.').default(false, 'false')).action(
|
|
11
|
+
program.description('List connection profiles.').helpOption('-h, --help', 'Help').showHelpAfterError().addOption(new Option('-l, --long', 'Long with all fields.').default(false, 'false')).action(
|
|
12
|
+
// implement command logic inside action handler
|
|
11
13
|
async options => {
|
|
12
14
|
listConnectionProfiles(options.long);
|
|
13
|
-
}
|
|
15
|
+
}
|
|
16
|
+
// end command logic inside action handler
|
|
14
17
|
);
|
|
18
|
+
|
|
15
19
|
program.parse();
|
|
16
20
|
//# sourceMappingURL=conn-list.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conn-list.js","names":["Command","Option","ConnectionProfile","init","listConnectionProfiles","program","description","helpOption","showHelpAfterError","addOption","default","action","options","long","parse"],"sources":["cli/conn/conn-list.ts"],"sourcesContent":["import { Command, Option } from 'commander';\nimport { ConnectionProfile } from '@rockcarver/frodo-lib';\nimport { init } from '../cmd_common.js';\n\nconst { listConnectionProfiles } = ConnectionProfile;\n\n// pseudo init to trigger print and progress handler registration\ninit();\n\nconst program = new Command('frodo conn list');\n\nprogram\n .description('List connection profiles.')\n .helpOption('-h, --help', 'Help')\n .showHelpAfterError()\n .addOption(\n new Option('-l, --long', 'Long with all fields.').default(false, 'false')\n )\n .action(\n // implement command logic inside action handler\n async (options) => {\n listConnectionProfiles(options.long);\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,
|
|
1
|
+
{"version":3,"file":"conn-list.js","names":["Command","Option","ConnectionProfile","init","listConnectionProfiles","program","description","helpOption","showHelpAfterError","addOption","default","action","options","long","parse"],"sources":["cli/conn/conn-list.ts"],"sourcesContent":["import { Command, Option } from 'commander';\nimport { ConnectionProfile } from '@rockcarver/frodo-lib';\nimport { init } from '../cmd_common.js';\n\nconst { listConnectionProfiles } = ConnectionProfile;\n\n// pseudo init to trigger print and progress handler registration\ninit();\n\nconst program = new Command('frodo conn list');\n\nprogram\n .description('List connection profiles.')\n .helpOption('-h, --help', 'Help')\n .showHelpAfterError()\n .addOption(\n new Option('-l, --long', 'Long with all fields.').default(false, 'false')\n )\n .action(\n // implement command logic inside action handler\n async (options) => {\n listConnectionProfiles(options.long);\n }\n // end command logic inside action handler\n );\n\nprogram.parse();\n"],"mappings":"AAAA,SAASA,OAAO,EAAEC,MAAM,QAAQ,WAAW;AAC3C,SAASC,iBAAiB,QAAQ,uBAAuB;AACzD,SAASC,IAAI,QAAQ,kBAAkB;AAEvC,MAAM;EAAEC;AAAuB,CAAC,GAAGF,iBAAiB;;AAEpD;AACAC,IAAI,EAAE;AAEN,MAAME,OAAO,GAAG,IAAIL,OAAO,CAAC,iBAAiB,CAAC;AAE9CK,OAAO,CACJC,WAAW,CAAC,2BAA2B,CAAC,CACxCC,UAAU,CAAC,YAAY,EAAE,MAAM,CAAC,CAChCC,kBAAkB,EAAE,CACpBC,SAAS,CACR,IAAIR,MAAM,CAAC,YAAY,EAAE,uBAAuB,CAAC,CAACS,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,CAC1E,CACAC,MAAM;AACL;AACA,MAAOC,OAAO,IAAK;EACjBR,sBAAsB,CAACQ,OAAO,CAACC,IAAI,CAAC;AACtC;AACA;AAAA,CACD;;AAEHR,OAAO,CAACS,KAAK,EAAE"}
|
package/esm/cli/conn/conn.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
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
|
-
const program = new Command('conn').alias('connection')
|
|
6
|
+
const program = new Command('conn').alias('connection')
|
|
7
|
+
// for backwards compatibility
|
|
9
8
|
.alias('connections').helpOption('-h, --help', 'Help').description('Manage connection profiles.').executableDir(__dirname);
|
|
10
9
|
program.command('add', 'Add connection profiles.').showHelpAfterError();
|
|
11
10
|
program.command('delete', 'Delete connection profiles.').showHelpAfterError();
|
package/esm/cli/conn/conn.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conn.js","names":["Command","path","fileURLToPath","__dirname","dirname","import","meta","url","setup","program","alias","helpOption","description","executableDir","command","showHelpAfterError"],"sources":["cli/conn/conn.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('conn')\n .alias('connection')\n // for backwards compatibility\n .alias('connections')\n .helpOption('-h, --help', 'Help')\n .description('Manage connection profiles.')\n .executableDir(__dirname);\n\n program.command('add', 'Add connection profiles.').showHelpAfterError();\n\n program.command('delete', 'Delete connection profiles.').showHelpAfterError();\n\n program\n .command('describe', 'Describe connection profiles.')\n .showHelpAfterError();\n\n program.command('list', 'List connection profiles.').showHelpAfterError();\n\n program.showHelpAfterError();\n return program;\n}\n"],"mappings":"AAAA,SAASA,
|
|
1
|
+
{"version":3,"file":"conn.js","names":["Command","path","fileURLToPath","__dirname","dirname","import","meta","url","setup","program","alias","helpOption","description","executableDir","command","showHelpAfterError"],"sources":["cli/conn/conn.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('conn')\n .alias('connection')\n // for backwards compatibility\n .alias('connections')\n .helpOption('-h, --help', 'Help')\n .description('Manage connection profiles.')\n .executableDir(__dirname);\n\n program.command('add', 'Add connection profiles.').showHelpAfterError();\n\n program.command('delete', 'Delete connection profiles.').showHelpAfterError();\n\n program\n .command('describe', 'Describe connection profiles.')\n .showHelpAfterError();\n\n program.command('list', 'List connection profiles.').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,MAAM,CAAC,CAChCU,KAAK,CAAC,YAAY;EACnB;EAAA,CACCA,KAAK,CAAC,aAAa,CAAC,CACpBC,UAAU,CAAC,YAAY,EAAE,MAAM,CAAC,CAChCC,WAAW,CAAC,6BAA6B,CAAC,CAC1CC,aAAa,CAACV,SAAS,CAAC;EAE3BM,OAAO,CAACK,OAAO,CAAC,KAAK,EAAE,0BAA0B,CAAC,CAACC,kBAAkB,EAAE;EAEvEN,OAAO,CAACK,OAAO,CAAC,QAAQ,EAAE,6BAA6B,CAAC,CAACC,kBAAkB,EAAE;EAE7EN,OAAO,CACJK,OAAO,CAAC,UAAU,EAAE,+BAA+B,CAAC,CACpDC,kBAAkB,EAAE;EAEvBN,OAAO,CAACK,OAAO,CAAC,MAAM,EAAE,2BAA2B,CAAC,CAACC,kBAAkB,EAAE;EAEzEN,OAAO,CAACM,kBAAkB,EAAE;EAC5B,OAAON,OAAO;AAChB"}
|
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
import { Command, Option } from 'commander';
|
|
2
|
-
import { Authenticate,
|
|
2
|
+
import { Authenticate, state } from '@rockcarver/frodo-lib';
|
|
3
3
|
import * as common from '../cmd_common.js';
|
|
4
4
|
import { printMessage } from '../../utils/Console.js';
|
|
5
|
+
import { exportEmailTemplateToFile, exportEmailTemplatesToFile, exportEmailTemplatesToFiles } from '../../ops/EmailTemplateOps';
|
|
5
6
|
const {
|
|
6
7
|
getTokens
|
|
7
8
|
} = Authenticate;
|
|
8
|
-
const {
|
|
9
|
-
exportEmailTemplatesToFile,
|
|
10
|
-
exportEmailTemplatesToFiles,
|
|
11
|
-
exportEmailTemplateToFile
|
|
12
|
-
} = EmailTemplate;
|
|
13
9
|
const program = new Command('frodo email template export');
|
|
14
|
-
program.description('Export email templates.').helpOption('-h, --help', 'Help').showHelpAfterError().addArgument(common.hostArgumentM).addArgument(common.realmArgument).addArgument(common.userArgument).addArgument(common.passwordArgument).addOption(common.deploymentOption).addOption(common.insecureOption).addOption(new Option('-i, --template-id <template-id>', 'Email template id/name. If specified, -a and -A are ignored.')).addOption(new Option('-f, --file [file]', 'Name of the export file. Ignored with -A. Defaults to <template-id>.template.email.json.')).addOption(new Option('-a, --all', 'Export all email templates to a single file. Ignored with -i.')).addOption(new Option('-A, --all-separate', 'Export all email templates as separate files <template-id>.template.email.json. Ignored with -i, and -a.')).action(
|
|
10
|
+
program.description('Export email templates.').helpOption('-h, --help', 'Help').showHelpAfterError().addArgument(common.hostArgumentM).addArgument(common.realmArgument).addArgument(common.userArgument).addArgument(common.passwordArgument).addOption(common.deploymentOption).addOption(common.insecureOption).addOption(new Option('-i, --template-id <template-id>', 'Email template id/name. If specified, -a and -A are ignored.')).addOption(new Option('-f, --file [file]', 'Name of the export file. Ignored with -A. Defaults to <template-id>.template.email.json.')).addOption(new Option('-a, --all', 'Export all email templates to a single file. Ignored with -i.')).addOption(new Option('-A, --all-separate', 'Export all email templates as separate files <template-id>.template.email.json. Ignored with -i, and -a.')).action(
|
|
11
|
+
// implement command logic inside action handler
|
|
15
12
|
async (host, realm, user, password, options) => {
|
|
16
13
|
state.default.session.setTenant(host);
|
|
17
14
|
state.default.session.setRealm(realm);
|
|
@@ -19,27 +16,31 @@ async (host, realm, user, password, options) => {
|
|
|
19
16
|
state.default.session.setPassword(password);
|
|
20
17
|
state.default.session.setDeploymentType(options.type);
|
|
21
18
|
state.default.session.setAllowInsecureConnection(options.insecure);
|
|
22
|
-
|
|
23
19
|
if (await getTokens()) {
|
|
24
20
|
// export by id/name
|
|
25
21
|
if (options.templateId) {
|
|
26
22
|
printMessage(`Exporting email template "${options.templateId}" from realm "${state.default.session.getRealm()}"...`);
|
|
27
23
|
exportEmailTemplateToFile(options.templateId, options.file);
|
|
28
|
-
}
|
|
24
|
+
}
|
|
25
|
+
// --all -a
|
|
29
26
|
else if (options.all) {
|
|
30
27
|
printMessage('Exporting all email templates to a single file...');
|
|
31
28
|
exportEmailTemplatesToFile(options.file);
|
|
32
|
-
}
|
|
29
|
+
}
|
|
30
|
+
// --all-separate -A
|
|
33
31
|
else if (options.allSeparate) {
|
|
34
32
|
printMessage('Exporting all email templates to separate files...');
|
|
35
33
|
exportEmailTemplatesToFiles();
|
|
36
|
-
}
|
|
34
|
+
}
|
|
35
|
+
// unrecognized combination of options or no options
|
|
37
36
|
else {
|
|
38
37
|
printMessage('Unrecognized combination of options or no options...', 'error');
|
|
39
38
|
program.help();
|
|
40
39
|
}
|
|
41
40
|
}
|
|
42
|
-
}
|
|
41
|
+
}
|
|
42
|
+
// end command logic inside action handler
|
|
43
43
|
);
|
|
44
|
+
|
|
44
45
|
program.parse();
|
|
45
46
|
//# sourceMappingURL=email-template-export.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"email-template-export.js","names":["Command","Option","Authenticate","
|
|
1
|
+
{"version":3,"file":"email-template-export.js","names":["Command","Option","Authenticate","state","common","printMessage","exportEmailTemplateToFile","exportEmailTemplatesToFile","exportEmailTemplatesToFiles","getTokens","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","templateId","getRealm","file","all","allSeparate","help","parse"],"sources":["cli/email/email-template-export.ts"],"sourcesContent":["import { Command, Option } from 'commander';\nimport { Authenticate, state } from '@rockcarver/frodo-lib';\nimport * as common from '../cmd_common.js';\nimport { printMessage } from '../../utils/Console.js';\nimport {\n exportEmailTemplateToFile,\n exportEmailTemplatesToFile,\n exportEmailTemplatesToFiles,\n} from '../../ops/EmailTemplateOps';\n\nconst { getTokens } = Authenticate;\n\nconst program = new Command('frodo email template export');\n\nprogram\n .description('Export email templates.')\n .helpOption('-h, --help', 'Help')\n .showHelpAfterError()\n .addArgument(common.hostArgumentM)\n .addArgument(common.realmArgument)\n .addArgument(common.userArgument)\n .addArgument(common.passwordArgument)\n .addOption(common.deploymentOption)\n .addOption(common.insecureOption)\n .addOption(\n new Option(\n '-i, --template-id <template-id>',\n 'Email template id/name. If specified, -a and -A are ignored.'\n )\n )\n .addOption(\n new Option(\n '-f, --file [file]',\n 'Name of the export file. Ignored with -A. Defaults to <template-id>.template.email.json.'\n )\n )\n .addOption(\n new Option(\n '-a, --all',\n 'Export all email templates to a single file. Ignored with -i.'\n )\n )\n .addOption(\n new Option(\n '-A, --all-separate',\n 'Export all email templates as separate files <template-id>.template.email.json. Ignored with -i, and -a.'\n )\n )\n .action(\n // implement command logic inside action handler\n async (host, realm, user, password, options) => {\n state.default.session.setTenant(host);\n state.default.session.setRealm(realm);\n state.default.session.setUsername(user);\n state.default.session.setPassword(password);\n state.default.session.setDeploymentType(options.type);\n state.default.session.setAllowInsecureConnection(options.insecure);\n if (await getTokens()) {\n // export by id/name\n if (options.templateId) {\n printMessage(\n `Exporting email template \"${\n options.templateId\n }\" from realm \"${state.default.session.getRealm()}\"...`\n );\n exportEmailTemplateToFile(options.templateId, options.file);\n }\n // --all -a\n else if (options.all) {\n printMessage('Exporting all email templates to a single file...');\n exportEmailTemplatesToFile(options.file);\n }\n // --all-separate -A\n else if (options.allSeparate) {\n printMessage('Exporting all email templates to separate files...');\n exportEmailTemplatesToFiles();\n }\n // unrecognized combination of options or no options\n else {\n printMessage(\n 'Unrecognized combination of options or no options...',\n 'error'\n );\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,kBAAkB;AAC1C,SAASC,YAAY,QAAQ,wBAAwB;AACrD,SACEC,yBAAyB,EACzBC,0BAA0B,EAC1BC,2BAA2B,QACtB,4BAA4B;AAEnC,MAAM;EAAEC;AAAU,CAAC,GAAGP,YAAY;AAElC,MAAMQ,OAAO,GAAG,IAAIV,OAAO,CAAC,6BAA6B,CAAC;AAE1DU,OAAO,CACJC,WAAW,CAAC,yBAAyB,CAAC,CACtCC,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,MAAM,CAACgB,gBAAgB,CAAC,CAClCD,SAAS,CAACf,MAAM,CAACiB,cAAc,CAAC,CAChCF,SAAS,CACR,IAAIlB,MAAM,CACR,iCAAiC,EACjC,8DAA8D,CAC/D,CAC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BrC,YAAY,CAAC,oDAAoD,CAAC;MAClEG,2BAA2B,EAAE;IAC/B;IACA;IAAA,KACK;MACHH,YAAY,CACV,sDAAsD,EACtD,OAAO,CACR;MACDK,OAAO,CAACiC,IAAI,EAAE;IAChB;EACF;AACF;AACA;AAAA,CACD;;AAEHjC,OAAO,CAACkC,KAAK,EAAE"}
|
|
@@ -1,18 +1,14 @@
|
|
|
1
1
|
import { Command, Option } from 'commander';
|
|
2
|
-
import { Authenticate,
|
|
2
|
+
import { Authenticate, state } from '@rockcarver/frodo-lib';
|
|
3
3
|
import * as common from '../cmd_common.js';
|
|
4
4
|
import { printMessage } from '../../utils/Console.js';
|
|
5
|
+
import { importEmailTemplateFromFile, importEmailTemplatesFromFile, importEmailTemplatesFromFiles, importFirstEmailTemplateFromFile } from '../../ops/EmailTemplateOps';
|
|
5
6
|
const {
|
|
6
7
|
getTokens
|
|
7
8
|
} = Authenticate;
|
|
8
|
-
const {
|
|
9
|
-
importEmailTemplateFromFile,
|
|
10
|
-
importEmailTemplatesFromFile,
|
|
11
|
-
importEmailTemplatesFromFiles,
|
|
12
|
-
importFirstEmailTemplateFromFile
|
|
13
|
-
} = EmailTemplate;
|
|
14
9
|
const program = new Command('frodo email template import');
|
|
15
|
-
program.description('Import email templates.').helpOption('-h, --help', 'Help').showHelpAfterError().addArgument(common.hostArgumentM).addArgument(common.realmArgument).addArgument(common.userArgument).addArgument(common.passwordArgument).addOption(common.deploymentOption).addOption(common.insecureOption).addOption(new Option('-i, --template-id <template-id>', 'Email template id/name. If specified, -a and -A are ignored.')).addOption(new Option('-f, --file <file>', 'Name of the import file.')).addOption(new Option('-a, --all', 'Import all email templates from single file. Ignored with -i.')).addOption(new Option('-A, --all-separate', 'Import all email templates from separate files (*.template.email.json) in the current directory. Ignored with -i or -a.')).action(
|
|
10
|
+
program.description('Import email templates.').helpOption('-h, --help', 'Help').showHelpAfterError().addArgument(common.hostArgumentM).addArgument(common.realmArgument).addArgument(common.userArgument).addArgument(common.passwordArgument).addOption(common.deploymentOption).addOption(common.insecureOption).addOption(new Option('-i, --template-id <template-id>', 'Email template id/name. If specified, -a and -A are ignored.')).addOption(new Option('-f, --file <file>', 'Name of the import file.')).addOption(new Option('-a, --all', 'Import all email templates from single file. Ignored with -i.')).addOption(new Option('-A, --all-separate', 'Import all email templates from separate files (*.template.email.json) in the current directory. Ignored with -i or -a.')).action(
|
|
11
|
+
// implement program logic inside action handler
|
|
16
12
|
async (host, realm, user, password, options) => {
|
|
17
13
|
state.default.session.setTenant(host);
|
|
18
14
|
state.default.session.setRealm(realm);
|
|
@@ -20,31 +16,36 @@ async (host, realm, user, password, options) => {
|
|
|
20
16
|
state.default.session.setPassword(password);
|
|
21
17
|
state.default.session.setDeploymentType(options.type);
|
|
22
18
|
state.default.session.setAllowInsecureConnection(options.insecure);
|
|
23
|
-
|
|
24
19
|
if (await getTokens()) {
|
|
25
20
|
// import by id
|
|
26
21
|
if (options.file && options.templateId) {
|
|
27
22
|
printMessage(`Importing email template "${options.templateId}"...`);
|
|
28
23
|
importEmailTemplateFromFile(options.templateId, options.file);
|
|
29
|
-
}
|
|
24
|
+
}
|
|
25
|
+
// --all -a
|
|
30
26
|
else if (options.all && options.file) {
|
|
31
27
|
printMessage(`Importing all email templates from a single file (${options.file})...`);
|
|
32
28
|
importEmailTemplatesFromFile(options.file);
|
|
33
|
-
}
|
|
29
|
+
}
|
|
30
|
+
// --all-separate -A
|
|
34
31
|
else if (options.allSeparate && !options.file) {
|
|
35
32
|
printMessage('Importing all email templates from separate files (*.template.email.json) in current directory...');
|
|
36
33
|
importEmailTemplatesFromFiles();
|
|
37
|
-
}
|
|
34
|
+
}
|
|
35
|
+
// import first template from file
|
|
38
36
|
else if (options.file) {
|
|
39
37
|
printMessage(`Importing first email template from file "${options.file}"...`);
|
|
40
38
|
importFirstEmailTemplateFromFile(options.file);
|
|
41
|
-
}
|
|
39
|
+
}
|
|
40
|
+
// unrecognized combination of options or no options
|
|
42
41
|
else {
|
|
43
42
|
printMessage('Unrecognized combination of options or no options...');
|
|
44
43
|
program.help();
|
|
45
44
|
}
|
|
46
45
|
}
|
|
47
|
-
}
|
|
46
|
+
}
|
|
47
|
+
// end program logic inside action handler
|
|
48
48
|
);
|
|
49
|
+
|
|
49
50
|
program.parse();
|
|
50
51
|
//# sourceMappingURL=email-template-import.js.map
|