@rockcarver/frodo-cli 2.0.0-59 → 2.0.0-60
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/.vscode/launch.json +1 -0
- package/CHANGELOG.md +10 -1
- package/dist/app.cjs +187368 -0
- package/dist/app.cjs.map +1 -0
- package/dist/app.d.cts +2 -0
- package/dist/chunk-MPPKDFVI.cjs +56 -0
- package/dist/chunk-MPPKDFVI.cjs.map +1 -0
- package/dist/launch.cjs +27 -0
- package/dist/launch.cjs.map +1 -0
- package/dist/launch.d.cts +1 -0
- package/dist/loader.cjs +836 -0
- package/dist/loader.cjs.map +1 -0
- package/dist/loader.d.cts +3 -0
- package/package.json +37 -53
- package/tsup.config.ts +40 -0
- package/esm/app.js +0 -80
- package/esm/app.js.map +0 -1
- package/esm/cli/FrodoCommand.js +0 -181
- package/esm/cli/FrodoCommand.js.map +0 -1
- package/esm/cli/_template/something-delete.js +0 -20
- package/esm/cli/_template/something-delete.js.map +0 -1
- package/esm/cli/_template/something-describe.js +0 -20
- package/esm/cli/_template/something-describe.js.map +0 -1
- package/esm/cli/_template/something-else-delete.js +0 -20
- package/esm/cli/_template/something-else-delete.js.map +0 -1
- package/esm/cli/_template/something-else-describe.js +0 -20
- package/esm/cli/_template/something-else-describe.js.map +0 -1
- package/esm/cli/_template/something-else-export.js +0 -20
- package/esm/cli/_template/something-else-export.js.map +0 -1
- package/esm/cli/_template/something-else-import.js +0 -20
- package/esm/cli/_template/something-else-import.js.map +0 -1
- package/esm/cli/_template/something-else-list.js +0 -20
- package/esm/cli/_template/something-else-list.js.map +0 -1
- package/esm/cli/_template/something-else.js +0 -17
- package/esm/cli/_template/something-else.js.map +0 -1
- package/esm/cli/_template/something-export.js +0 -20
- package/esm/cli/_template/something-export.js.map +0 -1
- package/esm/cli/_template/something-import.js +0 -20
- package/esm/cli/_template/something-import.js.map +0 -1
- package/esm/cli/_template/something-list.js +0 -20
- package/esm/cli/_template/something-list.js.map +0 -1
- package/esm/cli/_template/something-other-delete.js +0 -20
- package/esm/cli/_template/something-other-delete.js.map +0 -1
- package/esm/cli/_template/something-other-describe.js +0 -20
- package/esm/cli/_template/something-other-describe.js.map +0 -1
- package/esm/cli/_template/something-other-export.js +0 -20
- package/esm/cli/_template/something-other-export.js.map +0 -1
- package/esm/cli/_template/something-other-import.js +0 -20
- package/esm/cli/_template/something-other-import.js.map +0 -1
- package/esm/cli/_template/something-other-list.js +0 -20
- package/esm/cli/_template/something-other-list.js.map +0 -1
- package/esm/cli/_template/something-other.js +0 -17
- package/esm/cli/_template/something-other.js.map +0 -1
- package/esm/cli/_template/something.js +0 -20
- package/esm/cli/_template/something.js.map +0 -1
- package/esm/cli/admin/admin-add-autoid-static-user-mapping.js +0 -23
- package/esm/cli/admin/admin-add-autoid-static-user-mapping.js.map +0 -1
- package/esm/cli/admin/admin-create-oauth2-client-with-admin-privileges.js +0 -80
- package/esm/cli/admin/admin-create-oauth2-client-with-admin-privileges.js.map +0 -1
- package/esm/cli/admin/admin-execute-rfc7523-authz-grant-flow.js +0 -40
- package/esm/cli/admin/admin-execute-rfc7523-authz-grant-flow.js.map +0 -1
- package/esm/cli/admin/admin-federation-export.js +0 -43
- package/esm/cli/admin/admin-federation-export.js.map +0 -1
- package/esm/cli/admin/admin-federation-import.js +0 -47
- package/esm/cli/admin/admin-federation-import.js.map +0 -1
- package/esm/cli/admin/admin-federation-list.js +0 -27
- package/esm/cli/admin/admin-federation-list.js.map +0 -1
- package/esm/cli/admin/admin-federation.js +0 -21
- package/esm/cli/admin/admin-federation.js.map +0 -1
- package/esm/cli/admin/admin-generate-rfc7523-authz-grant-artefacts.js +0 -43
- package/esm/cli/admin/admin-generate-rfc7523-authz-grant-artefacts.js.map +0 -1
- package/esm/cli/admin/admin-get-access-token.js +0 -27
- package/esm/cli/admin/admin-get-access-token.js.map +0 -1
- package/esm/cli/admin/admin-grant-oauth2-client-admin-privileges.js +0 -25
- package/esm/cli/admin/admin-grant-oauth2-client-admin-privileges.js.map +0 -1
- package/esm/cli/admin/admin-hide-generic-extension-attributes.js +0 -25
- package/esm/cli/admin/admin-hide-generic-extension-attributes.js.map +0 -1
- package/esm/cli/admin/admin-list-oauth2-clients-with-admin-privileges.js +0 -24
- package/esm/cli/admin/admin-list-oauth2-clients-with-admin-privileges.js.map +0 -1
- package/esm/cli/admin/admin-list-oauth2-clients-with-custom-privileges.js +0 -24
- package/esm/cli/admin/admin-list-oauth2-clients-with-custom-privileges.js.map +0 -1
- package/esm/cli/admin/admin-list-static-user-mappings.js +0 -24
- package/esm/cli/admin/admin-list-static-user-mappings.js.map +0 -1
- package/esm/cli/admin/admin-remove-static-user-mapping.js +0 -24
- package/esm/cli/admin/admin-remove-static-user-mapping.js.map +0 -1
- package/esm/cli/admin/admin-repair-org-model.js +0 -25
- package/esm/cli/admin/admin-repair-org-model.js.map +0 -1
- package/esm/cli/admin/admin-revoke-oauth2-client-admin-privileges.js +0 -25
- package/esm/cli/admin/admin-revoke-oauth2-client-admin-privileges.js.map +0 -1
- package/esm/cli/admin/admin-show-generic-extension-attributes.js +0 -25
- package/esm/cli/admin/admin-show-generic-extension-attributes.js.map +0 -1
- package/esm/cli/admin/admin-train-auto-access-model.js +0 -32
- package/esm/cli/admin/admin-train-auto-access-model.js.map +0 -1
- package/esm/cli/admin/admin.js +0 -41
- package/esm/cli/admin/admin.js.map +0 -1
- package/esm/cli/agent/agent-delete.js +0 -38
- package/esm/cli/agent/agent-delete.js.map +0 -1
- package/esm/cli/agent/agent-describe.js +0 -20
- package/esm/cli/agent/agent-describe.js.map +0 -1
- package/esm/cli/agent/agent-export.js +0 -43
- package/esm/cli/agent/agent-export.js.map +0 -1
- package/esm/cli/agent/agent-gateway-delete.js +0 -38
- package/esm/cli/agent/agent-gateway-delete.js.map +0 -1
- package/esm/cli/agent/agent-gateway-describe.js +0 -20
- package/esm/cli/agent/agent-gateway-describe.js.map +0 -1
- package/esm/cli/agent/agent-gateway-export.js +0 -43
- package/esm/cli/agent/agent-gateway-export.js.map +0 -1
- package/esm/cli/agent/agent-gateway-import.js +0 -49
- package/esm/cli/agent/agent-gateway-import.js.map +0 -1
- package/esm/cli/agent/agent-gateway-list.js +0 -22
- package/esm/cli/agent/agent-gateway-list.js.map +0 -1
- package/esm/cli/agent/agent-gateway.js +0 -17
- package/esm/cli/agent/agent-gateway.js.map +0 -1
- package/esm/cli/agent/agent-import.js +0 -49
- package/esm/cli/agent/agent-import.js.map +0 -1
- package/esm/cli/agent/agent-java-delete.js +0 -38
- package/esm/cli/agent/agent-java-delete.js.map +0 -1
- package/esm/cli/agent/agent-java-describe.js +0 -20
- package/esm/cli/agent/agent-java-describe.js.map +0 -1
- package/esm/cli/agent/agent-java-export.js +0 -43
- package/esm/cli/agent/agent-java-export.js.map +0 -1
- package/esm/cli/agent/agent-java-import.js +0 -49
- package/esm/cli/agent/agent-java-import.js.map +0 -1
- package/esm/cli/agent/agent-java-list.js +0 -22
- package/esm/cli/agent/agent-java-list.js.map +0 -1
- package/esm/cli/agent/agent-java.js +0 -17
- package/esm/cli/agent/agent-java.js.map +0 -1
- package/esm/cli/agent/agent-list.js +0 -22
- package/esm/cli/agent/agent-list.js.map +0 -1
- package/esm/cli/agent/agent-web-delete.js +0 -38
- package/esm/cli/agent/agent-web-delete.js.map +0 -1
- package/esm/cli/agent/agent-web-describe.js +0 -20
- package/esm/cli/agent/agent-web-describe.js.map +0 -1
- package/esm/cli/agent/agent-web-export.js +0 -43
- package/esm/cli/agent/agent-web-export.js.map +0 -1
- package/esm/cli/agent/agent-web-import.js +0 -49
- package/esm/cli/agent/agent-web-import.js.map +0 -1
- package/esm/cli/agent/agent-web-list.js +0 -22
- package/esm/cli/agent/agent-web-list.js.map +0 -1
- package/esm/cli/agent/agent-web.js +0 -17
- package/esm/cli/agent/agent-web.js.map +0 -1
- package/esm/cli/agent/agent.js +0 -22
- package/esm/cli/agent/agent.js.map +0 -1
- package/esm/cli/app/app-delete.js +0 -36
- package/esm/cli/app/app-delete.js.map +0 -1
- package/esm/cli/app/app-describe.js +0 -21
- package/esm/cli/app/app-describe.js.map +0 -1
- package/esm/cli/app/app-export.js +0 -51
- package/esm/cli/app/app-export.js.map +0 -1
- package/esm/cli/app/app-import.js +0 -56
- package/esm/cli/app/app-import.js.map +0 -1
- package/esm/cli/app/app-list.js +0 -25
- package/esm/cli/app/app-list.js.map +0 -1
- package/esm/cli/app/app.js +0 -18
- package/esm/cli/app/app.js.map +0 -1
- package/esm/cli/authn/authn-describe.js +0 -28
- package/esm/cli/authn/authn-describe.js.map +0 -1
- package/esm/cli/authn/authn-export.js +0 -24
- package/esm/cli/authn/authn-export.js.map +0 -1
- package/esm/cli/authn/authn-import.js +0 -24
- package/esm/cli/authn/authn-import.js.map +0 -1
- package/esm/cli/authn/authn.js +0 -12
- package/esm/cli/authn/authn.js.map +0 -1
- package/esm/cli/authz/authz-policy-delete.js +0 -41
- package/esm/cli/authz/authz-policy-delete.js.map +0 -1
- package/esm/cli/authz/authz-policy-describe.js +0 -28
- package/esm/cli/authz/authz-policy-describe.js.map +0 -1
- package/esm/cli/authz/authz-policy-export.js +0 -73
- package/esm/cli/authz/authz-policy-export.js.map +0 -1
- package/esm/cli/authz/authz-policy-import.js +0 -63
- package/esm/cli/authz/authz-policy-import.js.map +0 -1
- package/esm/cli/authz/authz-policy-list.js +0 -35
- package/esm/cli/authz/authz-policy-list.js.map +0 -1
- package/esm/cli/authz/authz-policy.js +0 -17
- package/esm/cli/authz/authz-policy.js.map +0 -1
- package/esm/cli/authz/authz-set-delete.js +0 -35
- package/esm/cli/authz/authz-set-delete.js.map +0 -1
- package/esm/cli/authz/authz-set-describe.js +0 -28
- package/esm/cli/authz/authz-set-describe.js.map +0 -1
- package/esm/cli/authz/authz-set-export.js +0 -53
- package/esm/cli/authz/authz-set-export.js.map +0 -1
- package/esm/cli/authz/authz-set-import.js +0 -59
- package/esm/cli/authz/authz-set-import.js.map +0 -1
- package/esm/cli/authz/authz-set-list.js +0 -23
- package/esm/cli/authz/authz-set-list.js.map +0 -1
- package/esm/cli/authz/authz-set.js +0 -17
- package/esm/cli/authz/authz-set.js.map +0 -1
- package/esm/cli/authz/authz-type-delete.js +0 -41
- package/esm/cli/authz/authz-type-delete.js.map +0 -1
- package/esm/cli/authz/authz-type-describe.js +0 -32
- package/esm/cli/authz/authz-type-describe.js.map +0 -1
- package/esm/cli/authz/authz-type-export.js +0 -47
- package/esm/cli/authz/authz-type-export.js.map +0 -1
- package/esm/cli/authz/authz-type-import.js +0 -53
- package/esm/cli/authz/authz-type-import.js.map +0 -1
- package/esm/cli/authz/authz-type-list.js +0 -24
- package/esm/cli/authz/authz-type-list.js.map +0 -1
- package/esm/cli/authz/authz-type.js +0 -17
- package/esm/cli/authz/authz-type.js.map +0 -1
- package/esm/cli/authz/authz.js +0 -12
- package/esm/cli/authz/authz.js.map +0 -1
- package/esm/cli/config/config-delete.js +0 -20
- package/esm/cli/config/config-delete.js.map +0 -1
- package/esm/cli/config/config-describe.js +0 -20
- package/esm/cli/config/config-describe.js.map +0 -1
- package/esm/cli/config/config-export.js +0 -52
- package/esm/cli/config/config-export.js.map +0 -1
- package/esm/cli/config/config-import.js +0 -62
- package/esm/cli/config/config-import.js.map +0 -1
- package/esm/cli/config/config-list.js +0 -20
- package/esm/cli/config/config-list.js.map +0 -1
- package/esm/cli/config/config.js +0 -22
- package/esm/cli/config/config.js.map +0 -1
- package/esm/cli/conn/conn-delete.js +0 -21
- package/esm/cli/conn/conn-delete.js.map +0 -1
- package/esm/cli/conn/conn-describe.js +0 -16
- package/esm/cli/conn/conn-describe.js.map +0 -1
- package/esm/cli/conn/conn-list.js +0 -16
- package/esm/cli/conn/conn-list.js.map +0 -1
- package/esm/cli/conn/conn-save.js +0 -106
- package/esm/cli/conn/conn-save.js.map +0 -1
- package/esm/cli/conn/conn.js +0 -16
- package/esm/cli/conn/conn.js.map +0 -1
- package/esm/cli/email/email-template-export.js +0 -42
- package/esm/cli/email/email-template-export.js.map +0 -1
- package/esm/cli/email/email-template-import.js +0 -47
- package/esm/cli/email/email-template-import.js.map +0 -1
- package/esm/cli/email/email-template-list.js +0 -24
- package/esm/cli/email/email-template-list.js.map +0 -1
- package/esm/cli/email/email-template.js +0 -13
- package/esm/cli/email/email-template.js.map +0 -1
- package/esm/cli/email/email.js +0 -9
- package/esm/cli/email/email.js.map +0 -1
- package/esm/cli/esv/esv-apply.js +0 -61
- package/esm/cli/esv/esv-apply.js.map +0 -1
- package/esm/cli/esv/esv-secret-create.js +0 -29
- package/esm/cli/esv/esv-secret-create.js.map +0 -1
- package/esm/cli/esv/esv-secret-delete.js +0 -34
- package/esm/cli/esv/esv-secret-delete.js.map +0 -1
- package/esm/cli/esv/esv-secret-describe.js +0 -24
- package/esm/cli/esv/esv-secret-describe.js.map +0 -1
- package/esm/cli/esv/esv-secret-export.js +0 -34
- package/esm/cli/esv/esv-secret-export.js.map +0 -1
- package/esm/cli/esv/esv-secret-import.js +0 -20
- package/esm/cli/esv/esv-secret-import.js.map +0 -1
- package/esm/cli/esv/esv-secret-list.js +0 -24
- package/esm/cli/esv/esv-secret-list.js.map +0 -1
- package/esm/cli/esv/esv-secret-set.js +0 -24
- package/esm/cli/esv/esv-secret-set.js.map +0 -1
- package/esm/cli/esv/esv-secret-version-activate.js +0 -28
- package/esm/cli/esv/esv-secret-version-activate.js.map +0 -1
- package/esm/cli/esv/esv-secret-version-create.js +0 -29
- package/esm/cli/esv/esv-secret-version-create.js.map +0 -1
- package/esm/cli/esv/esv-secret-version-deactivate.js +0 -28
- package/esm/cli/esv/esv-secret-version-deactivate.js.map +0 -1
- package/esm/cli/esv/esv-secret-version-delete.js +0 -34
- package/esm/cli/esv/esv-secret-version-delete.js.map +0 -1
- package/esm/cli/esv/esv-secret-version-list.js +0 -24
- package/esm/cli/esv/esv-secret-version-list.js.map +0 -1
- package/esm/cli/esv/esv-secret-version.js +0 -17
- package/esm/cli/esv/esv-secret-version.js.map +0 -1
- package/esm/cli/esv/esv-secret.js +0 -25
- package/esm/cli/esv/esv-secret.js.map +0 -1
- package/esm/cli/esv/esv-variable-create.js +0 -24
- package/esm/cli/esv/esv-variable-create.js.map +0 -1
- package/esm/cli/esv/esv-variable-delete.js +0 -35
- package/esm/cli/esv/esv-variable-delete.js.map +0 -1
- package/esm/cli/esv/esv-variable-describe.js +0 -24
- package/esm/cli/esv/esv-variable-describe.js.map +0 -1
- package/esm/cli/esv/esv-variable-export.js +0 -35
- package/esm/cli/esv/esv-variable-export.js.map +0 -1
- package/esm/cli/esv/esv-variable-import.js +0 -20
- package/esm/cli/esv/esv-variable-import.js.map +0 -1
- package/esm/cli/esv/esv-variable-list.js +0 -24
- package/esm/cli/esv/esv-variable-list.js.map +0 -1
- package/esm/cli/esv/esv-variable-set.js +0 -31
- package/esm/cli/esv/esv-variable-set.js.map +0 -1
- package/esm/cli/esv/esv-variable.js +0 -23
- package/esm/cli/esv/esv-variable.js.map +0 -1
- package/esm/cli/esv/esv.js +0 -12
- package/esm/cli/esv/esv.js.map +0 -1
- package/esm/cli/idm/idm-count.js +0 -24
- package/esm/cli/idm/idm-count.js.map +0 -1
- package/esm/cli/idm/idm-export.js +0 -50
- package/esm/cli/idm/idm-export.js.map +0 -1
- package/esm/cli/idm/idm-import.js +0 -54
- package/esm/cli/idm/idm-import.js.map +0 -1
- package/esm/cli/idm/idm-list.js +0 -28
- package/esm/cli/idm/idm-list.js.map +0 -1
- package/esm/cli/idm/idm.js +0 -14
- package/esm/cli/idm/idm.js.map +0 -1
- package/esm/cli/idp/idp-export.js +0 -44
- package/esm/cli/idp/idp-export.js.map +0 -1
- package/esm/cli/idp/idp-import.js +0 -56
- package/esm/cli/idp/idp-import.js.map +0 -1
- package/esm/cli/idp/idp-list.js +0 -28
- package/esm/cli/idp/idp-list.js.map +0 -1
- package/esm/cli/idp/idp.js +0 -12
- package/esm/cli/idp/idp.js.map +0 -1
- package/esm/cli/info/info.js +0 -52
- package/esm/cli/info/info.js.map +0 -1
- package/esm/cli/journey/journey-delete.js +0 -36
- package/esm/cli/journey/journey-delete.js.map +0 -1
- package/esm/cli/journey/journey-describe.js +0 -133
- package/esm/cli/journey/journey-describe.js.map +0 -1
- package/esm/cli/journey/journey-disable.js +0 -35
- package/esm/cli/journey/journey-disable.js.map +0 -1
- package/esm/cli/journey/journey-enable.js +0 -35
- package/esm/cli/journey/journey-enable.js.map +0 -1
- package/esm/cli/journey/journey-export.js +0 -63
- package/esm/cli/journey/journey-export.js.map +0 -1
- package/esm/cli/journey/journey-import.js +0 -59
- package/esm/cli/journey/journey-import.js.map +0 -1
- package/esm/cli/journey/journey-list.js +0 -25
- package/esm/cli/journey/journey-list.js.map +0 -1
- package/esm/cli/journey/journey-prune.js +0 -42
- package/esm/cli/journey/journey-prune.js.map +0 -1
- package/esm/cli/journey/journey.js +0 -22
- package/esm/cli/journey/journey.js.map +0 -1
- package/esm/cli/log/log-fetch.js +0 -127
- package/esm/cli/log/log-fetch.js.map +0 -1
- package/esm/cli/log/log-key-delete.js +0 -33
- package/esm/cli/log/log-key-delete.js.map +0 -1
- package/esm/cli/log/log-key-describe.js +0 -20
- package/esm/cli/log/log-key-describe.js.map +0 -1
- package/esm/cli/log/log-key-list.js +0 -24
- package/esm/cli/log/log-key-list.js.map +0 -1
- package/esm/cli/log/log-key.js +0 -13
- package/esm/cli/log/log-key.js.map +0 -1
- package/esm/cli/log/log-list.js +0 -89
- package/esm/cli/log/log-list.js.map +0 -1
- package/esm/cli/log/log-tail.js +0 -81
- package/esm/cli/log/log-tail.js.map +0 -1
- package/esm/cli/log/log.js +0 -18
- package/esm/cli/log/log.js.map +0 -1
- package/esm/cli/oauth/oauth-client-delete.js +0 -20
- package/esm/cli/oauth/oauth-client-delete.js.map +0 -1
- package/esm/cli/oauth/oauth-client-describe.js +0 -20
- package/esm/cli/oauth/oauth-client-describe.js.map +0 -1
- package/esm/cli/oauth/oauth-client-export.js +0 -50
- package/esm/cli/oauth/oauth-client-export.js.map +0 -1
- package/esm/cli/oauth/oauth-client-import.js +0 -55
- package/esm/cli/oauth/oauth-client-import.js.map +0 -1
- package/esm/cli/oauth/oauth-client-list.js +0 -24
- package/esm/cli/oauth/oauth-client-list.js.map +0 -1
- package/esm/cli/oauth/oauth-client.js +0 -22
- package/esm/cli/oauth/oauth-client.js.map +0 -1
- package/esm/cli/oauth/oauth.js +0 -11
- package/esm/cli/oauth/oauth.js.map +0 -1
- package/esm/cli/realm/realm-add-custom-domain.js +0 -24
- package/esm/cli/realm/realm-add-custom-domain.js.map +0 -1
- package/esm/cli/realm/realm-describe.js +0 -23
- package/esm/cli/realm/realm-describe.js.map +0 -1
- package/esm/cli/realm/realm-list.js +0 -23
- package/esm/cli/realm/realm-list.js.map +0 -1
- package/esm/cli/realm/realm-remove-custom-domain.js +0 -26
- package/esm/cli/realm/realm-remove-custom-domain.js.map +0 -1
- package/esm/cli/realm/realm.js +0 -21
- package/esm/cli/realm/realm.js.map +0 -1
- package/esm/cli/saml/saml-cot-export.js +0 -42
- package/esm/cli/saml/saml-cot-export.js.map +0 -1
- package/esm/cli/saml/saml-cot-import.js +0 -48
- package/esm/cli/saml/saml-cot-import.js.map +0 -1
- package/esm/cli/saml/saml-cot-list.js +0 -25
- package/esm/cli/saml/saml-cot-list.js.map +0 -1
- package/esm/cli/saml/saml-cot.js +0 -13
- package/esm/cli/saml/saml-cot.js.map +0 -1
- package/esm/cli/saml/saml-delete.js +0 -37
- package/esm/cli/saml/saml-delete.js.map +0 -1
- package/esm/cli/saml/saml-describe.js +0 -25
- package/esm/cli/saml/saml-describe.js.map +0 -1
- package/esm/cli/saml/saml-export.js +0 -48
- package/esm/cli/saml/saml-export.js.map +0 -1
- package/esm/cli/saml/saml-import.js +0 -56
- package/esm/cli/saml/saml-import.js.map +0 -1
- package/esm/cli/saml/saml-list.js +0 -25
- package/esm/cli/saml/saml-list.js.map +0 -1
- package/esm/cli/saml/saml-metadata-export.js +0 -42
- package/esm/cli/saml/saml-metadata-export.js.map +0 -1
- package/esm/cli/saml/saml-metadata.js +0 -9
- package/esm/cli/saml/saml-metadata.js.map +0 -1
- package/esm/cli/saml/saml.js +0 -20
- package/esm/cli/saml/saml.js.map +0 -1
- package/esm/cli/script/script-delete.js +0 -37
- package/esm/cli/script/script-delete.js.map +0 -1
- package/esm/cli/script/script-describe.js +0 -20
- package/esm/cli/script/script-describe.js.map +0 -1
- package/esm/cli/script/script-export.js +0 -52
- package/esm/cli/script/script-export.js.map +0 -1
- package/esm/cli/script/script-import.js +0 -45
- package/esm/cli/script/script-import.js.map +0 -1
- package/esm/cli/script/script-list.js +0 -25
- package/esm/cli/script/script-list.js.map +0 -1
- package/esm/cli/script/script.js +0 -18
- package/esm/cli/script/script.js.map +0 -1
- package/esm/cli/service/service-delete.js +0 -23
- package/esm/cli/service/service-delete.js.map +0 -1
- package/esm/cli/service/service-export.js +0 -41
- package/esm/cli/service/service-export.js.map +0 -1
- package/esm/cli/service/service-import.js +0 -65
- package/esm/cli/service/service-import.js.map +0 -1
- package/esm/cli/service/service-list.js +0 -20
- package/esm/cli/service/service-list.js.map +0 -1
- package/esm/cli/service/service.js +0 -14
- package/esm/cli/service/service.js.map +0 -1
- package/esm/cli/shell/shell.js +0 -53
- package/esm/cli/shell/shell.js.map +0 -1
- package/esm/cli/theme/theme-delete.js +0 -42
- package/esm/cli/theme/theme-delete.js.map +0 -1
- package/esm/cli/theme/theme-export.js +0 -48
- package/esm/cli/theme/theme-export.js.map +0 -1
- package/esm/cli/theme/theme-import.js +0 -54
- package/esm/cli/theme/theme-import.js.map +0 -1
- package/esm/cli/theme/theme-list.js +0 -25
- package/esm/cli/theme/theme-list.js.map +0 -1
- package/esm/cli/theme/theme.js +0 -14
- package/esm/cli/theme/theme.js.map +0 -1
- package/esm/help/SampleData.js +0 -7
- package/esm/help/SampleData.js.map +0 -1
- package/esm/launch.js +0 -15
- package/esm/launch.js.map +0 -1
- package/esm/loader.js +0 -40
- package/esm/loader.js.map +0 -1
- package/esm/ops/AdminOps.js +0 -936
- package/esm/ops/AdminOps.js.map +0 -1
- package/esm/ops/AgentOps.js +0 -1061
- package/esm/ops/AgentOps.js.map +0 -1
- package/esm/ops/ApplicationOps.js +0 -336
- package/esm/ops/ApplicationOps.js.map +0 -1
- package/esm/ops/AuthenticateOps.js +0 -23
- package/esm/ops/AuthenticateOps.js.map +0 -1
- package/esm/ops/AuthenticationSettingsOps.js +0 -89
- package/esm/ops/AuthenticationSettingsOps.js.map +0 -1
- package/esm/ops/CirclesOfTrustOps.js +0 -265
- package/esm/ops/CirclesOfTrustOps.js.map +0 -1
- package/esm/ops/ConfigOps.js +0 -213
- package/esm/ops/ConfigOps.js.map +0 -1
- package/esm/ops/ConnectionProfileOps.js +0 -132
- package/esm/ops/ConnectionProfileOps.js.map +0 -1
- package/esm/ops/EmailTemplateOps.js +0 -365
- package/esm/ops/EmailTemplateOps.js.map +0 -1
- package/esm/ops/IdmOps.js +0 -303
- package/esm/ops/IdmOps.js.map +0 -1
- package/esm/ops/IdpOps.js +0 -267
- package/esm/ops/IdpOps.js.map +0 -1
- package/esm/ops/JourneyOps.js +0 -815
- package/esm/ops/JourneyOps.js.map +0 -1
- package/esm/ops/LogOps.js +0 -141
- package/esm/ops/LogOps.js.map +0 -1
- package/esm/ops/NodeOps.js +0 -97
- package/esm/ops/NodeOps.js.map +0 -1
- package/esm/ops/OAuth2ClientOps.js +0 -287
- package/esm/ops/OAuth2ClientOps.js.map +0 -1
- package/esm/ops/OrganizationOps.js +0 -20
- package/esm/ops/OrganizationOps.js.map +0 -1
- package/esm/ops/PolicyOps.js +0 -515
- package/esm/ops/PolicyOps.js.map +0 -1
- package/esm/ops/PolicySetOps.js +0 -388
- package/esm/ops/PolicySetOps.js.map +0 -1
- package/esm/ops/RealmOps.js +0 -116
- package/esm/ops/RealmOps.js.map +0 -1
- package/esm/ops/ResourceTypeOps.js +0 -439
- package/esm/ops/ResourceTypeOps.js.map +0 -1
- package/esm/ops/Saml2Ops.js +0 -364
- package/esm/ops/Saml2Ops.js.map +0 -1
- package/esm/ops/Saml2Ops.test_.js.map +0 -1
- package/esm/ops/ScriptOps.js +0 -520
- package/esm/ops/ScriptOps.js.map +0 -1
- package/esm/ops/ServiceOps.js +0 -275
- package/esm/ops/ServiceOps.js.map +0 -1
- package/esm/ops/ThemeOps.js +0 -382
- package/esm/ops/ThemeOps.js.map +0 -1
- package/esm/ops/cloud/AdminFederationOps.js +0 -225
- package/esm/ops/cloud/AdminFederationOps.js.map +0 -1
- package/esm/ops/cloud/SecretsOps.js +0 -471
- package/esm/ops/cloud/SecretsOps.js.map +0 -1
- package/esm/ops/cloud/VariablesOps.js +0 -316
- package/esm/ops/cloud/VariablesOps.js.map +0 -1
- package/esm/ops/templates/GenericExtensionAttributesTemplate.json +0 -412
- package/esm/ops/templates/OAuth2ClientTemplate.json +0 -270
- package/esm/ops/templates/OAuth2TrustedJwtIssuerTemplate.json +0 -38
- package/esm/ops/templates/OrgModelUserAttributesTemplate.json +0 -149
- package/esm/ops/templates/autoaccess/IPAddresses.json +0 -202
- package/esm/ops/templates/autoaccess/UserAgents.json +0 -35
- package/esm/ops/templates/autoaccess/Usernames.json +0 -203
- package/esm/ops/templates/cloud/managed.json +0 -4119
- package/esm/ops/utils/OpsUtils.js +0 -9
- package/esm/ops/utils/OpsUtils.js.map +0 -1
- package/esm/ops/utils/Wordwrap.js +0 -5
- package/esm/ops/utils/Wordwrap.js.map +0 -1
- package/esm/storage/StaticStorage.js +0 -12
- package/esm/storage/StaticStorage.js.map +0 -1
- package/esm/utils/Config.js +0 -200
- package/esm/utils/Config.js.map +0 -1
- package/esm/utils/Console.js +0 -614
- package/esm/utils/Console.js.map +0 -1
- package/esm/utils/Version.js +0 -138
- package/esm/utils/Version.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OpsUtils.js","names":["cloneDeep","obj","JSON","parse","stringify"],"sources":["../../../src/ops/utils/OpsUtils.ts"],"sourcesContent":["/**\n * Deep clone object\n * @param {any} obj object to deep clone\n * @returns {any} new object cloned from obj\n */\nexport function cloneDeep(obj: any): any {\n return JSON.parse(JSON.stringify(obj));\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,SAASA,CAACC,GAAQ,EAAO;EACvC,OAAOC,IAAI,CAACC,KAAK,CAACD,IAAI,CAACE,SAAS,CAACH,GAAG,CAAC,CAAC;AACxC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export default function wordwrap(str, len, indent = undefined) {
|
|
2
|
-
if (!str) return '';
|
|
3
|
-
return (str.match(new RegExp(`(\\S.{0,${len - 1 - (indent ? indent.length : 0)}})(?=\\s+|$)`, 'g')) || []).join(indent ? `\n${indent}` : '\n');
|
|
4
|
-
}
|
|
5
|
-
//# sourceMappingURL=Wordwrap.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Wordwrap.js","names":["wordwrap","str","len","indent","undefined","match","RegExp","length","join"],"sources":["../../../src/ops/utils/Wordwrap.ts"],"sourcesContent":["export default function wordwrap(\n str: string,\n len: number,\n indent: string = undefined\n) {\n if (!str) return '';\n return (\n str.match(\n new RegExp(\n `(\\\\S.{0,${len - 1 - (indent ? indent.length : 0)}})(?=\\\\s+|$)`,\n 'g'\n )\n ) || []\n ).join(indent ? `\\n${indent}` : '\\n');\n}\n"],"mappings":"AAAA,eAAe,SAASA,QAAQA,CAC9BC,GAAW,EACXC,GAAW,EACXC,MAAc,GAAGC,SAAS,EAC1B;EACA,IAAI,CAACH,GAAG,EAAE,OAAO,EAAE;EACnB,OAAO,CACLA,GAAG,CAACI,KAAK,CACP,IAAIC,MAAM,CACP,WAAUJ,GAAG,GAAG,CAAC,IAAIC,MAAM,GAAGA,MAAM,CAACI,MAAM,GAAG,CAAC,CAAE,cAAa,EAC/D,GACF,CACF,CAAC,IAAI,EAAE,EACPC,IAAI,CAACL,MAAM,GAAI,KAAIA,MAAO,EAAC,GAAG,IAAI,CAAC;AACvC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export const DEFAULT_REALM_KEY = '__default__realm__';
|
|
2
|
-
export const CLASSIC_DEPLOYMENT_TYPE_KEY = 'classic';
|
|
3
|
-
export const CLOUD_DEPLOYMENT_TYPE_KEY = 'cloud';
|
|
4
|
-
export const FORGEOPS_DEPLOYMENT_TYPE_KEY = 'forgeops';
|
|
5
|
-
export const DEPLOYMENT_TYPES = [CLASSIC_DEPLOYMENT_TYPE_KEY, CLOUD_DEPLOYMENT_TYPE_KEY, FORGEOPS_DEPLOYMENT_TYPE_KEY];
|
|
6
|
-
export const DEPLOYMENT_TYPE_REALM_MAP = {
|
|
7
|
-
[CLASSIC_DEPLOYMENT_TYPE_KEY]: '/',
|
|
8
|
-
[CLOUD_DEPLOYMENT_TYPE_KEY]: 'alpha',
|
|
9
|
-
[FORGEOPS_DEPLOYMENT_TYPE_KEY]: '/'
|
|
10
|
-
};
|
|
11
|
-
export const FRODO_METADATA_ID = 'frodo';
|
|
12
|
-
//# sourceMappingURL=StaticStorage.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StaticStorage.js","names":["DEFAULT_REALM_KEY","CLASSIC_DEPLOYMENT_TYPE_KEY","CLOUD_DEPLOYMENT_TYPE_KEY","FORGEOPS_DEPLOYMENT_TYPE_KEY","DEPLOYMENT_TYPES","DEPLOYMENT_TYPE_REALM_MAP","FRODO_METADATA_ID"],"sources":["../../src/storage/StaticStorage.ts"],"sourcesContent":["export const DEFAULT_REALM_KEY = '__default__realm__';\nexport const CLASSIC_DEPLOYMENT_TYPE_KEY = 'classic';\nexport const CLOUD_DEPLOYMENT_TYPE_KEY = 'cloud';\nexport const FORGEOPS_DEPLOYMENT_TYPE_KEY = 'forgeops';\nexport const DEPLOYMENT_TYPES = [\n CLASSIC_DEPLOYMENT_TYPE_KEY,\n CLOUD_DEPLOYMENT_TYPE_KEY,\n FORGEOPS_DEPLOYMENT_TYPE_KEY,\n];\nexport const DEPLOYMENT_TYPE_REALM_MAP = {\n [CLASSIC_DEPLOYMENT_TYPE_KEY]: '/',\n [CLOUD_DEPLOYMENT_TYPE_KEY]: 'alpha',\n [FORGEOPS_DEPLOYMENT_TYPE_KEY]: '/',\n};\nexport const FRODO_METADATA_ID = 'frodo';\n"],"mappings":"AAAA,OAAO,MAAMA,iBAAiB,GAAG,oBAAoB;AACrD,OAAO,MAAMC,2BAA2B,GAAG,SAAS;AACpD,OAAO,MAAMC,yBAAyB,GAAG,OAAO;AAChD,OAAO,MAAMC,4BAA4B,GAAG,UAAU;AACtD,OAAO,MAAMC,gBAAgB,GAAG,CAC9BH,2BAA2B,EAC3BC,yBAAyB,EACzBC,4BAA4B,CAC7B;AACD,OAAO,MAAME,yBAAyB,GAAG;EACvC,CAACJ,2BAA2B,GAAG,GAAG;EAClC,CAACC,yBAAyB,GAAG,OAAO;EACpC,CAACC,4BAA4B,GAAG;AAClC,CAAC;AACD,OAAO,MAAMG,iBAAiB,GAAG,OAAO"}
|
package/esm/utils/Config.js
DELETED
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
import { frodo, FrodoError, state } from '@rockcarver/frodo-lib';
|
|
2
|
-
import fs from 'fs';
|
|
3
|
-
import os from 'os';
|
|
4
|
-
import slugify from 'slugify';
|
|
5
|
-
import { printMessage } from './Console';
|
|
6
|
-
const {
|
|
7
|
-
getFilePath,
|
|
8
|
-
readFiles
|
|
9
|
-
} = frodo.utils;
|
|
10
|
-
const {
|
|
11
|
-
exportFullConfiguration
|
|
12
|
-
} = frodo.config;
|
|
13
|
-
const {
|
|
14
|
-
getDefaultNoiseFilter
|
|
15
|
-
} = frodo.cloud.log;
|
|
16
|
-
export const FRODO_CONFIG_PATH_KEY = 'FRODO_CONFIG_PATH';
|
|
17
|
-
export const FRODO_LOG_NOISEFILTER_FILENAME = 'LoggingNoiseFilter.json';
|
|
18
|
-
export function getConfigPath() {
|
|
19
|
-
return process.env[FRODO_CONFIG_PATH_KEY] || `${os.homedir()}/.frodo`;
|
|
20
|
-
}
|
|
21
|
-
function getCustomNoiseFilters() {
|
|
22
|
-
const filename = `${getConfigPath()}/${FRODO_LOG_NOISEFILTER_FILENAME}`;
|
|
23
|
-
let noiseFilter = [];
|
|
24
|
-
try {
|
|
25
|
-
const data = fs.readFileSync(filename, 'utf8');
|
|
26
|
-
noiseFilter = JSON.parse(data);
|
|
27
|
-
} catch (e) {
|
|
28
|
-
printMessage(`Error reading ${filename} (${e.message})`, 'error');
|
|
29
|
-
}
|
|
30
|
-
return noiseFilter;
|
|
31
|
-
}
|
|
32
|
-
export function getNoiseFilters(defaults) {
|
|
33
|
-
const filename = `${getConfigPath()}/${FRODO_LOG_NOISEFILTER_FILENAME}`;
|
|
34
|
-
if (defaults) {
|
|
35
|
-
printMessage(`Using default logging noise filters.`, 'info');
|
|
36
|
-
return getDefaultNoiseFilter();
|
|
37
|
-
}
|
|
38
|
-
let noiseFilter = getCustomNoiseFilters();
|
|
39
|
-
if (noiseFilter.length == 0) {
|
|
40
|
-
printMessage(`No custom noise filters defined. Using defaults.`, 'info');
|
|
41
|
-
noiseFilter = getDefaultNoiseFilter();
|
|
42
|
-
try {
|
|
43
|
-
fs.writeFileSync(filename, JSON.stringify(noiseFilter, null, 2));
|
|
44
|
-
printMessage(`The default filters were saved in ${filename}. You can change the filters as needed.`, 'info');
|
|
45
|
-
} catch (e) {
|
|
46
|
-
printMessage(`Error creating noise filter configuration with default values.`, 'error');
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
return noiseFilter;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* Gets the full export config from one of three locations:
|
|
54
|
-
* 1. The file passed into the function if one is provided.
|
|
55
|
-
* 2. The working directory if it exists (provided by the user)
|
|
56
|
-
* 3. The cloud tenant if the exports are not locally provided
|
|
57
|
-
* @param file The optional file path
|
|
58
|
-
* @returns The full export config
|
|
59
|
-
*/
|
|
60
|
-
export async function getFullExportConfig(file = null) {
|
|
61
|
-
// Get export from file if it exists
|
|
62
|
-
if (file) {
|
|
63
|
-
return JSON.parse(fs.readFileSync(getFilePath(file), 'utf8'));
|
|
64
|
-
}
|
|
65
|
-
// If working directory doesn't exist, export from the cloud
|
|
66
|
-
const workingDirectory = state.getDirectory();
|
|
67
|
-
if (!workingDirectory) {
|
|
68
|
-
return await exportFullConfiguration({
|
|
69
|
-
useStringArrays: true,
|
|
70
|
-
noDecode: false,
|
|
71
|
-
coords: true,
|
|
72
|
-
includeDefault: true
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
// Go through files in the working directory and reconstruct the full export
|
|
76
|
-
return getFullExportConfigFromDirectory(workingDirectory);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* Reconstructs the full export config from files in the given directory
|
|
81
|
-
* @param directory The directory
|
|
82
|
-
* @return The full export config
|
|
83
|
-
*/
|
|
84
|
-
export async function getFullExportConfigFromDirectory(directory) {
|
|
85
|
-
const fullExportConfig = {
|
|
86
|
-
meta: {},
|
|
87
|
-
agents: {},
|
|
88
|
-
application: {},
|
|
89
|
-
authentication: {},
|
|
90
|
-
config: {},
|
|
91
|
-
emailTemplate: {},
|
|
92
|
-
idp: {},
|
|
93
|
-
managedApplication: {},
|
|
94
|
-
policy: {},
|
|
95
|
-
policyset: {},
|
|
96
|
-
resourcetype: {},
|
|
97
|
-
saml: {
|
|
98
|
-
hosted: {},
|
|
99
|
-
remote: {},
|
|
100
|
-
metadata: {},
|
|
101
|
-
cot: {}
|
|
102
|
-
},
|
|
103
|
-
script: {},
|
|
104
|
-
secrets: {},
|
|
105
|
-
service: {},
|
|
106
|
-
theme: {},
|
|
107
|
-
trees: {},
|
|
108
|
-
variables: {}
|
|
109
|
-
};
|
|
110
|
-
const files = await readFiles(directory);
|
|
111
|
-
const jsonFiles = files.filter(f => f.path.endsWith('.json'));
|
|
112
|
-
const idmConfigFiles = jsonFiles.filter(f => f.path.startsWith('config/'));
|
|
113
|
-
const samlFiles = jsonFiles.filter(f => f.path.startsWith('saml/') || f.path.startsWith('cot/'));
|
|
114
|
-
const otherFiles = jsonFiles.filter(f => !f.path.startsWith('config/') && !f.path.startsWith('saml/') && !f.path.startsWith('cot/'));
|
|
115
|
-
const scriptFiles = files.filter(f => f.path.endsWith('.js') || f.path.endsWith('.groovy'));
|
|
116
|
-
// Handle json files
|
|
117
|
-
for (const f of otherFiles) {
|
|
118
|
-
for (const [id, value] of Object.entries(JSON.parse(f.content))) {
|
|
119
|
-
if (value == null || fullExportConfig[id] == null) {
|
|
120
|
-
continue;
|
|
121
|
-
}
|
|
122
|
-
Object.assign(fullExportConfig[id], value);
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
// Handle saml files
|
|
126
|
-
for (const f of samlFiles) {
|
|
127
|
-
let content = JSON.parse(f.content);
|
|
128
|
-
content = content.saml;
|
|
129
|
-
for (const [id, value] of Object.entries(content)) {
|
|
130
|
-
Object.assign(fullExportConfig.saml[id], value);
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
// Handle idm config files
|
|
134
|
-
for (const f of idmConfigFiles) {
|
|
135
|
-
const content = JSON.parse(f.content);
|
|
136
|
-
fullExportConfig.config[content._id] = content;
|
|
137
|
-
}
|
|
138
|
-
// Handle extracted scripts, adding them to their corresponding script objects in the export
|
|
139
|
-
if (scriptFiles.length > 0 && fullExportConfig.script != null) {
|
|
140
|
-
const scriptExports = Object.values(fullExportConfig.script);
|
|
141
|
-
for (const f of scriptFiles) {
|
|
142
|
-
const name = f.path.substring(f.path.lastIndexOf('/') + 1, f.path.indexOf('.', f.path.lastIndexOf('/')));
|
|
143
|
-
const scriptLines = f.content.split('\n');
|
|
144
|
-
const script = scriptExports.find(s => slugify(s.name.replace(/^http(s?):\/\//, ''), {
|
|
145
|
-
remove: /[^\w\s$*_+~.()'"!\-@]+/g
|
|
146
|
-
}) === name);
|
|
147
|
-
if (!script) {
|
|
148
|
-
throw new FrodoError(`Can't find the script corresponding to the file '${f.path}' in the export files`);
|
|
149
|
-
}
|
|
150
|
-
script.script = scriptLines;
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
return fullExportConfig;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
/**
|
|
157
|
-
* Determines if a string id is being used anywhere within the given configuration object
|
|
158
|
-
* @param configuration The configuration object
|
|
159
|
-
* @param id The id being search for
|
|
160
|
-
* @param isEsv Whether the id corresponds to an ESV or not
|
|
161
|
-
*/
|
|
162
|
-
export function isIdUsed(
|
|
163
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
164
|
-
configuration, id, isEsv) {
|
|
165
|
-
return isIdUsedRecurse(configuration, isEsv ?
|
|
166
|
-
// For ESV ids, they contain either letters, numbers, dashes, or underscores. The dashes get replaced with periods (escaped with a \ for the regex)
|
|
167
|
-
// since anywhere they are being used they will be used with periods, not dashes. Note that the (?:[^a-z0-9._]|$) expressions at the beginning and
|
|
168
|
-
// end are meant to ensure that the id found is not a substring of some other id (i.e. the id found must either be at the beginning or end of the
|
|
169
|
-
// string, or if in the middle of a string, is not preceded or followed by a character that would be part of another id).
|
|
170
|
-
new RegExp(`(?:[^a-z0-9._]|^)${id.replaceAll('-', '\\.')}(?:[^a-z0-9._]|$)`) :
|
|
171
|
-
// For normal ids, they contain only letters, numbers, or dashes.
|
|
172
|
-
new RegExp(`(?:[^a-z0-9-]|^)${id}(?:[^a-z0-9-]|$)`));
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
/**
|
|
176
|
-
* Recursive helper for isIdUsed that finds any strings contained in the configuration that pass the regex
|
|
177
|
-
* @param configuration The configuration (could be anything)
|
|
178
|
-
* @param regex The regex test
|
|
179
|
-
*/
|
|
180
|
-
function isIdUsedRecurse(
|
|
181
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
182
|
-
configuration, regex) {
|
|
183
|
-
const type = typeof configuration;
|
|
184
|
-
if (type === 'object' && configuration !== null) {
|
|
185
|
-
for (const [id, value] of Object.entries(
|
|
186
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
187
|
-
configuration)) {
|
|
188
|
-
const isIdUsed = isIdUsedRecurse(value, regex);
|
|
189
|
-
if (isIdUsed.used) {
|
|
190
|
-
isIdUsed.location = id + (value.name ? `(name: '${value.name}')` : '') + (isIdUsed.location === '' ? '' : '.') + isIdUsed.location;
|
|
191
|
-
return isIdUsed;
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
return {
|
|
196
|
-
used: type === 'string' && regex.test(configuration),
|
|
197
|
-
location: ''
|
|
198
|
-
};
|
|
199
|
-
}
|
|
200
|
-
//# sourceMappingURL=Config.js.map
|
package/esm/utils/Config.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Config.js","names":["frodo","FrodoError","state","fs","os","slugify","printMessage","getFilePath","readFiles","utils","exportFullConfiguration","config","getDefaultNoiseFilter","cloud","log","FRODO_CONFIG_PATH_KEY","FRODO_LOG_NOISEFILTER_FILENAME","getConfigPath","process","env","homedir","getCustomNoiseFilters","filename","noiseFilter","data","readFileSync","JSON","parse","e","message","getNoiseFilters","defaults","length","writeFileSync","stringify","getFullExportConfig","file","workingDirectory","getDirectory","useStringArrays","noDecode","coords","includeDefault","getFullExportConfigFromDirectory","directory","fullExportConfig","meta","agents","application","authentication","emailTemplate","idp","managedApplication","policy","policyset","resourcetype","saml","hosted","remote","metadata","cot","script","secrets","service","theme","trees","variables","files","jsonFiles","filter","f","path","endsWith","idmConfigFiles","startsWith","samlFiles","otherFiles","scriptFiles","id","value","Object","entries","content","assign","_id","scriptExports","values","name","substring","lastIndexOf","indexOf","scriptLines","split","find","s","replace","remove","isIdUsed","configuration","isEsv","isIdUsedRecurse","RegExp","replaceAll","regex","type","used","location","test"],"sources":["../../src/utils/Config.ts"],"sourcesContent":["import { frodo, FrodoError, state } from '@rockcarver/frodo-lib';\nimport { FullExportInterface } from '@rockcarver/frodo-lib/types/ops/ConfigOps';\nimport fs from 'fs';\nimport os from 'os';\nimport slugify from 'slugify';\n\nimport { printMessage } from './Console';\n\nconst { getFilePath, readFiles } = frodo.utils;\n\nconst { exportFullConfiguration } = frodo.config;\n\nconst { getDefaultNoiseFilter } = frodo.cloud.log;\n\nexport const FRODO_CONFIG_PATH_KEY = 'FRODO_CONFIG_PATH';\nexport const FRODO_LOG_NOISEFILTER_FILENAME = 'LoggingNoiseFilter.json';\n\nexport function getConfigPath(): string {\n return process.env[FRODO_CONFIG_PATH_KEY] || `${os.homedir()}/.frodo`;\n}\n\nfunction getCustomNoiseFilters(): Array<string> {\n const filename = `${getConfigPath()}/${FRODO_LOG_NOISEFILTER_FILENAME}`;\n let noiseFilter = [];\n try {\n const data = fs.readFileSync(filename, 'utf8');\n noiseFilter = JSON.parse(data);\n } catch (e) {\n printMessage(`Error reading ${filename} (${e.message})`, 'error');\n }\n return noiseFilter;\n}\n\nexport function getNoiseFilters(defaults: boolean): Array<string> {\n const filename = `${getConfigPath()}/${FRODO_LOG_NOISEFILTER_FILENAME}`;\n if (defaults) {\n printMessage(`Using default logging noise filters.`, 'info');\n return getDefaultNoiseFilter();\n }\n let noiseFilter = getCustomNoiseFilters();\n if (noiseFilter.length == 0) {\n printMessage(`No custom noise filters defined. Using defaults.`, 'info');\n noiseFilter = getDefaultNoiseFilter();\n try {\n fs.writeFileSync(filename, JSON.stringify(noiseFilter, null, 2));\n printMessage(\n `The default filters were saved in ${filename}. You can change the filters as needed.`,\n 'info'\n );\n } catch (e) {\n printMessage(\n `Error creating noise filter configuration with default values.`,\n 'error'\n );\n }\n }\n return noiseFilter;\n}\n\n/**\n * Gets the full export config from one of three locations:\n * 1. The file passed into the function if one is provided.\n * 2. The working directory if it exists (provided by the user)\n * 3. The cloud tenant if the exports are not locally provided\n * @param file The optional file path\n * @returns The full export config\n */\nexport async function getFullExportConfig(\n file: string | null = null\n): Promise<FullExportInterface> {\n // Get export from file if it exists\n if (file) {\n return JSON.parse(fs.readFileSync(getFilePath(file), 'utf8'));\n }\n // If working directory doesn't exist, export from the cloud\n const workingDirectory = state.getDirectory();\n if (!workingDirectory) {\n return await exportFullConfiguration({\n useStringArrays: true,\n noDecode: false,\n coords: true,\n includeDefault: true,\n });\n }\n // Go through files in the working directory and reconstruct the full export\n return getFullExportConfigFromDirectory(workingDirectory);\n}\n\n/**\n * Reconstructs the full export config from files in the given directory\n * @param directory The directory\n * @return The full export config\n */\nexport async function getFullExportConfigFromDirectory(\n directory: string\n): Promise<FullExportInterface> {\n const fullExportConfig = {\n meta: {},\n agents: {},\n application: {},\n authentication: {},\n config: {},\n emailTemplate: {},\n idp: {},\n managedApplication: {},\n policy: {},\n policyset: {},\n resourcetype: {},\n saml: {\n hosted: {},\n remote: {},\n metadata: {},\n cot: {},\n },\n script: {},\n secrets: {},\n service: {},\n theme: {},\n trees: {},\n variables: {},\n } as FullExportInterface;\n const files = await readFiles(directory);\n const jsonFiles = files.filter((f) => f.path.endsWith('.json'));\n const idmConfigFiles = jsonFiles.filter((f) => f.path.startsWith('config/'));\n const samlFiles = jsonFiles.filter(\n (f) => f.path.startsWith('saml/') || f.path.startsWith('cot/')\n );\n const otherFiles = jsonFiles.filter(\n (f) =>\n !f.path.startsWith('config/') &&\n !f.path.startsWith('saml/') &&\n !f.path.startsWith('cot/')\n );\n const scriptFiles = files.filter(\n (f) => f.path.endsWith('.js') || f.path.endsWith('.groovy')\n );\n // Handle json files\n for (const f of otherFiles) {\n for (const [id, value] of Object.entries(JSON.parse(f.content))) {\n if (value == null || fullExportConfig[id] == null) {\n continue;\n }\n Object.assign(fullExportConfig[id], value);\n }\n }\n // Handle saml files\n for (const f of samlFiles) {\n let content = JSON.parse(f.content);\n content = content.saml;\n for (const [id, value] of Object.entries(content)) {\n Object.assign(fullExportConfig.saml[id], value);\n }\n }\n // Handle idm config files\n for (const f of idmConfigFiles) {\n const content = JSON.parse(f.content);\n fullExportConfig.config[content._id] = content;\n }\n // Handle extracted scripts, adding them to their corresponding script objects in the export\n if (scriptFiles.length > 0 && fullExportConfig.script != null) {\n const scriptExports = Object.values(fullExportConfig.script);\n for (const f of scriptFiles) {\n const name = f.path.substring(\n f.path.lastIndexOf('/') + 1,\n f.path.indexOf('.', f.path.lastIndexOf('/'))\n );\n const scriptLines = f.content.split('\\n');\n const script = scriptExports.find(\n (s) =>\n slugify(s.name.replace(/^http(s?):\\/\\//, ''), {\n remove: /[^\\w\\s$*_+~.()'\"!\\-@]+/g,\n }) === name\n );\n if (!script) {\n throw new FrodoError(\n `Can't find the script corresponding to the file '${f.path}' in the export files`\n );\n }\n script.script = scriptLines;\n }\n }\n return fullExportConfig;\n}\n\n/**\n * Determines if a string id is being used anywhere within the given configuration object\n * @param configuration The configuration object\n * @param id The id being search for\n * @param isEsv Whether the id corresponds to an ESV or not\n */\nexport function isIdUsed(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n configuration: any,\n id: string,\n isEsv: boolean\n): {\n used: boolean;\n location: string;\n} {\n return isIdUsedRecurse(\n configuration,\n isEsv\n ? // For ESV ids, they contain either letters, numbers, dashes, or underscores. The dashes get replaced with periods (escaped with a \\ for the regex)\n // since anywhere they are being used they will be used with periods, not dashes. Note that the (?:[^a-z0-9._]|$) expressions at the beginning and\n // end are meant to ensure that the id found is not a substring of some other id (i.e. the id found must either be at the beginning or end of the\n // string, or if in the middle of a string, is not preceded or followed by a character that would be part of another id).\n new RegExp(\n `(?:[^a-z0-9._]|^)${id.replaceAll('-', '\\\\.')}(?:[^a-z0-9._]|$)`\n )\n : // For normal ids, they contain only letters, numbers, or dashes.\n new RegExp(`(?:[^a-z0-9-]|^)${id}(?:[^a-z0-9-]|$)`)\n );\n}\n\n/**\n * Recursive helper for isIdUsed that finds any strings contained in the configuration that pass the regex\n * @param configuration The configuration (could be anything)\n * @param regex The regex test\n */\nfunction isIdUsedRecurse(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n configuration: any,\n regex: RegExp\n): {\n used: boolean;\n location: string;\n} {\n const type = typeof configuration;\n if (type === 'object' && configuration !== null) {\n for (const [id, value] of Object.entries(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n configuration as Record<string, any>\n )) {\n const isIdUsed = isIdUsedRecurse(value, regex);\n if (isIdUsed.used) {\n isIdUsed.location =\n id +\n (value.name ? `(name: '${value.name}')` : '') +\n (isIdUsed.location === '' ? '' : '.') +\n isIdUsed.location;\n return isIdUsed;\n }\n }\n }\n return {\n used: type === 'string' && regex.test(configuration),\n location: '',\n };\n}\n"],"mappings":"AAAA,SAASA,KAAK,EAAEC,UAAU,EAAEC,KAAK,QAAQ,uBAAuB;AAEhE,OAAOC,EAAE,MAAM,IAAI;AACnB,OAAOC,EAAE,MAAM,IAAI;AACnB,OAAOC,OAAO,MAAM,SAAS;AAE7B,SAASC,YAAY,QAAQ,WAAW;AAExC,MAAM;EAAEC,WAAW;EAAEC;AAAU,CAAC,GAAGR,KAAK,CAACS,KAAK;AAE9C,MAAM;EAAEC;AAAwB,CAAC,GAAGV,KAAK,CAACW,MAAM;AAEhD,MAAM;EAAEC;AAAsB,CAAC,GAAGZ,KAAK,CAACa,KAAK,CAACC,GAAG;AAEjD,OAAO,MAAMC,qBAAqB,GAAG,mBAAmB;AACxD,OAAO,MAAMC,8BAA8B,GAAG,yBAAyB;AAEvE,OAAO,SAASC,aAAaA,CAAA,EAAW;EACtC,OAAOC,OAAO,CAACC,GAAG,CAACJ,qBAAqB,CAAC,IAAK,GAAEX,EAAE,CAACgB,OAAO,CAAC,CAAE,SAAQ;AACvE;AAEA,SAASC,qBAAqBA,CAAA,EAAkB;EAC9C,MAAMC,QAAQ,GAAI,GAAEL,aAAa,CAAC,CAAE,IAAGD,8BAA+B,EAAC;EACvE,IAAIO,WAAW,GAAG,EAAE;EACpB,IAAI;IACF,MAAMC,IAAI,GAAGrB,EAAE,CAACsB,YAAY,CAACH,QAAQ,EAAE,MAAM,CAAC;IAC9CC,WAAW,GAAGG,IAAI,CAACC,KAAK,CAACH,IAAI,CAAC;EAChC,CAAC,CAAC,OAAOI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