@rockcarver/frodo-lib 1.0.0 → 2.0.0-1
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 +3 -7
- package/cjs/api/AgentApi.js +91 -37
- package/cjs/api/AgentApi.js.map +1 -1
- package/cjs/api/AgentApi.test.js.map +1 -1
- package/cjs/api/ApiTypes.js.map +1 -1
- package/cjs/api/AuthenticateApi.js +18 -11
- package/cjs/api/AuthenticateApi.js.map +1 -1
- package/cjs/api/AuthenticateApi.test.js.map +1 -1
- package/cjs/api/BaseApi.js +50 -26
- package/cjs/api/BaseApi.js.map +1 -1
- package/cjs/api/CirclesOfTrustApi.js +47 -23
- package/cjs/api/CirclesOfTrustApi.js.map +1 -1
- package/cjs/api/IdmConfigApi.js +54 -21
- package/cjs/api/IdmConfigApi.js.map +1 -1
- package/cjs/api/IdmSystemApi.js +9 -6
- package/cjs/api/IdmSystemApi.js.map +1 -1
- package/cjs/api/ManagedObjectApi.js +49 -27
- package/cjs/api/ManagedObjectApi.js.map +1 -1
- package/cjs/api/NodeApi.js +71 -32
- package/cjs/api/NodeApi.js.map +1 -1
- package/cjs/api/NodeApi.test.js.map +1 -1
- package/cjs/api/OAuth2ClientApi.js +43 -20
- package/cjs/api/OAuth2ClientApi.js.map +1 -1
- package/cjs/api/OAuth2OIDCApi.js +74 -27
- package/cjs/api/OAuth2OIDCApi.js.map +1 -1
- package/cjs/api/OAuth2OIDCApi.test.js.map +1 -1
- package/cjs/api/OAuth2ProviderApi.js +10 -9
- package/cjs/api/OAuth2ProviderApi.js.map +1 -1
- package/cjs/api/PoliciesApi.js +54 -22
- package/cjs/api/PoliciesApi.js.map +1 -1
- package/cjs/api/PoliciesApi.test.js.map +1 -1
- package/cjs/api/PolicySetApi.js +54 -23
- package/cjs/api/PolicySetApi.js.map +1 -1
- package/cjs/api/PolicySetApi.test.js.map +1 -1
- package/cjs/api/RealmApi.js +73 -29
- package/cjs/api/RealmApi.js.map +1 -1
- package/cjs/api/ResourceTypesApi.js +67 -28
- package/cjs/api/ResourceTypesApi.js.map +1 -1
- package/cjs/api/ResourceTypesApi.test.js.map +1 -1
- package/cjs/api/Saml2Api.js +90 -122
- package/cjs/api/Saml2Api.js.map +1 -1
- package/cjs/api/ScriptApi.js +54 -23
- package/cjs/api/ScriptApi.js.map +1 -1
- package/cjs/api/ServerInfoApi.js +23 -10
- package/cjs/api/ServerInfoApi.js.map +1 -1
- package/cjs/api/ServiceApi.js +91 -42
- package/cjs/api/ServiceApi.js.map +1 -1
- package/cjs/api/SocialIdentityProvidersApi.js +70 -31
- package/cjs/api/SocialIdentityProvidersApi.js.map +1 -1
- package/cjs/api/TreeApi.js +43 -20
- package/cjs/api/TreeApi.js.map +1 -1
- package/cjs/api/TreeApi.test.js.map +1 -1
- package/cjs/api/cloud/EnvInfoApi.js +10 -6
- package/cjs/api/cloud/EnvInfoApi.js.map +1 -1
- package/cjs/api/cloud/FeatureApi.js +9 -6
- package/cjs/api/cloud/FeatureApi.js.map +1 -1
- package/cjs/api/cloud/LogApi.js +48 -18
- package/cjs/api/cloud/LogApi.js.map +1 -1
- package/cjs/api/cloud/SecretsApi.js +109 -35
- package/cjs/api/cloud/SecretsApi.js.map +1 -1
- package/cjs/api/cloud/SecretsApi.test.js.map +1 -1
- package/cjs/api/cloud/StartupApi.js +21 -10
- package/cjs/api/cloud/StartupApi.js.map +1 -1
- package/cjs/api/cloud/StartupApi.test.js.map +1 -1
- package/cjs/api/cloud/VariablesApi.js +52 -20
- package/cjs/api/cloud/VariablesApi.js.map +1 -1
- package/cjs/api/cloud/VariablesApi.test.js.map +1 -1
- package/cjs/api/utils/ApiUtils.js +2 -5
- package/cjs/api/utils/ApiUtils.js.map +1 -1
- package/cjs/api/utils/ApiUtils.test.js.map +1 -1
- package/cjs/index.js +22 -17
- package/cjs/index.js.map +1 -1
- package/cjs/lib/FrodoLib.js +142 -0
- package/cjs/lib/FrodoLib.js.map +1 -0
- package/cjs/ops/AdminOps.js +578 -90
- package/cjs/ops/AdminOps.js.map +1 -1
- package/cjs/ops/AgentOps.js +956 -118
- package/cjs/ops/AgentOps.js.map +1 -1
- package/cjs/ops/AgentOps.test.js.map +1 -1
- package/cjs/ops/AuthenticateOps.js +155 -87
- package/cjs/ops/AuthenticateOps.js.map +1 -1
- package/cjs/ops/AuthenticateOps.test.js.map +1 -1
- package/cjs/ops/CirclesOfTrustOps.js +334 -291
- package/cjs/ops/CirclesOfTrustOps.js.map +1 -1
- package/cjs/ops/ConnectionProfileOps.js +241 -46
- package/cjs/ops/ConnectionProfileOps.js.map +1 -1
- package/cjs/ops/ConnectionProfileOps.test.js.map +1 -1
- package/cjs/ops/EmailTemplateOps.js +84 -10
- package/cjs/ops/EmailTemplateOps.js.map +1 -1
- package/cjs/ops/EmailTemplateOps.test.js.map +1 -1
- package/cjs/ops/IdmOps.js +97 -81
- package/cjs/ops/IdmOps.js.map +1 -1
- package/cjs/ops/IdmOps.test.js.map +1 -1
- package/cjs/ops/IdpOps.js +275 -42
- package/cjs/ops/IdpOps.js.map +1 -1
- package/cjs/ops/IdpOps.test.js.map +1 -1
- package/cjs/ops/InfoOps.js +42 -27
- package/cjs/ops/InfoOps.js.map +1 -1
- package/cjs/ops/JoseOps.test.js.map +1 -1
- package/cjs/ops/JourneyOps.js +721 -126
- package/cjs/ops/JourneyOps.js.map +1 -1
- package/cjs/ops/JourneyOps.test.js.map +1 -1
- package/cjs/ops/ManagedObjectOps.js +79 -12
- package/cjs/ops/ManagedObjectOps.js.map +1 -1
- package/cjs/ops/NodeOps.js +127 -100
- package/cjs/ops/NodeOps.js.map +1 -1
- package/cjs/ops/OAuth2ClientOps.js +323 -65
- package/cjs/ops/OAuth2ClientOps.js.map +1 -1
- package/cjs/ops/OAuth2ClientOps.test.js.map +1 -1
- package/cjs/ops/OAuth2ProviderOps.js +20 -13
- package/cjs/ops/OAuth2ProviderOps.js.map +1 -1
- package/cjs/ops/OpsTypes.js.map +1 -1
- package/cjs/ops/OrganizationOps.js +67 -12
- package/cjs/ops/OrganizationOps.js.map +1 -1
- package/cjs/ops/PolicyOps.js +476 -136
- package/cjs/ops/PolicyOps.js.map +1 -1
- package/cjs/ops/PolicyOps.test.js.map +1 -1
- package/cjs/ops/PolicySetOps.js +402 -132
- package/cjs/ops/PolicySetOps.js.map +1 -1
- package/cjs/ops/PolicySetOps.test.js.map +1 -1
- package/cjs/ops/RealmOps.js +119 -84
- package/cjs/ops/RealmOps.js.map +1 -1
- package/cjs/ops/ResourceTypeOps.js +348 -95
- package/cjs/ops/ResourceTypeOps.js.map +1 -1
- package/cjs/ops/ResourceTypeOps.test.js.map +1 -1
- package/cjs/ops/Saml2Ops.js +407 -145
- package/cjs/ops/Saml2Ops.js.map +1 -1
- package/cjs/ops/Saml2Ops.test.js.map +1 -1
- package/cjs/ops/ScriptOps.js +256 -79
- package/cjs/ops/ScriptOps.js.map +1 -1
- package/cjs/ops/ScriptOps.test.js.map +1 -1
- package/cjs/ops/ServiceOps.js +328 -55
- package/cjs/ops/ServiceOps.js.map +1 -1
- package/cjs/ops/ThemeOps.js +349 -54
- package/cjs/ops/ThemeOps.js.map +1 -1
- package/cjs/ops/ThemeOps.test.js.map +1 -1
- package/cjs/ops/cloud/FeatureOps.js +57 -12
- package/cjs/ops/cloud/FeatureOps.js.map +1 -1
- package/cjs/ops/cloud/LogOps.js +136 -6
- package/cjs/ops/cloud/LogOps.js.map +1 -1
- package/cjs/ops/cloud/SecretsOps.js +230 -289
- package/cjs/ops/cloud/SecretsOps.js.map +1 -1
- package/cjs/ops/cloud/ServiceAccountOps.js +101 -18
- package/cjs/ops/cloud/ServiceAccountOps.js.map +1 -1
- package/cjs/ops/cloud/ServiceAccountOps.test.js.map +1 -1
- package/cjs/ops/cloud/StartupOps.js +64 -9
- package/cjs/ops/cloud/StartupOps.js.map +1 -1
- package/cjs/ops/cloud/VariablesOps.js +100 -175
- package/cjs/ops/cloud/VariablesOps.js.map +1 -1
- package/cjs/ops/utils/Console.js +9 -10
- package/cjs/ops/utils/Console.js.map +1 -1
- package/cjs/ops/utils/DataProtection.js +2 -2
- package/cjs/ops/utils/DataProtection.js.map +1 -1
- package/cjs/ops/utils/ExportImportUtils.js +35 -13
- package/cjs/ops/utils/ExportImportUtils.js.map +1 -1
- package/cjs/ops/utils/OpsUtils.js +7 -5
- package/cjs/ops/utils/OpsUtils.js.map +1 -1
- package/cjs/ops/utils/OpsUtils.test.js.map +1 -1
- package/cjs/ops/utils/{ValidationUtils.js → ScriptValidationUtils.js} +1 -1
- package/cjs/ops/utils/ScriptValidationUtils.js.map +1 -0
- package/cjs/ops/utils/ScriptValidationUtils.test.js.map +1 -0
- package/cjs/ops/utils/Version.js +9 -2
- package/cjs/ops/utils/Version.js.map +1 -1
- package/cjs/shared/State.js +455 -210
- package/cjs/shared/State.js.map +1 -1
- package/cjs/shared/State.test.js.map +1 -1
- package/cjs/utils/AutoSetupPolly.js +4 -1
- package/cjs/utils/AutoSetupPolly.js.map +1 -1
- package/esm/api/AgentApi.mjs +75 -27
- package/esm/api/AgentApi.test.mjs +319 -71
- package/esm/api/AuthenticateApi.mjs +15 -4
- package/esm/api/AuthenticateApi.test.mjs +27 -8
- package/esm/api/BaseApi.mjs +43 -19
- package/esm/api/CirclesOfTrustApi.mjs +39 -17
- package/esm/api/IdmConfigApi.mjs +44 -13
- package/esm/api/IdmSystemApi.mjs +7 -3
- package/esm/api/ManagedObjectApi.mjs +44 -20
- package/esm/api/NodeApi.mjs +59 -24
- package/esm/api/NodeApi.test.mjs +158 -40
- package/esm/api/OAuth2ClientApi.mjs +36 -15
- package/esm/api/OAuth2OIDCApi.mjs +69 -20
- package/esm/api/OAuth2OIDCApi.test.mjs +21 -3
- package/esm/api/OAuth2ProviderApi.mjs +8 -6
- package/esm/api/PoliciesApi.mjs +45 -16
- package/esm/api/PoliciesApi.test.mjs +63 -15
- package/esm/api/PolicySetApi.mjs +44 -16
- package/esm/api/PolicySetApi.test.mjs +48 -12
- package/esm/api/RealmApi.mjs +65 -24
- package/esm/api/ResourceTypesApi.mjs +56 -21
- package/esm/api/ResourceTypesApi.test.mjs +58 -14
- package/esm/api/Saml2Api.mjs +75 -89
- package/esm/api/ScriptApi.mjs +45 -17
- package/esm/api/ServerInfoApi.mjs +19 -6
- package/esm/api/ServiceApi.mjs +77 -26
- package/esm/api/SocialIdentityProvidersApi.mjs +58 -23
- package/esm/api/TreeApi.mjs +36 -15
- package/esm/api/TreeApi.test.mjs +129 -34
- package/esm/api/cloud/EnvInfoApi.mjs +8 -3
- package/esm/api/cloud/FeatureApi.mjs +7 -3
- package/esm/api/cloud/LogApi.mjs +38 -11
- package/esm/api/cloud/SecretsApi.mjs +89 -21
- package/esm/api/cloud/SecretsApi.test.mjs +193 -50
- package/esm/api/cloud/StartupApi.mjs +17 -6
- package/esm/api/cloud/StartupApi.test.mjs +28 -11
- package/esm/api/cloud/VariablesApi.mjs +43 -14
- package/esm/api/cloud/VariablesApi.test.mjs +124 -33
- package/esm/api/utils/ApiUtils.mjs +2 -4
- package/esm/api/utils/ApiUtils.test.mjs +14 -6
- package/esm/index.mjs +3 -4
- package/esm/lib/FrodoLib.mjs +127 -0
- package/esm/ops/AdminOps.mjs +500 -71
- package/esm/ops/AgentOps.mjs +773 -81
- package/esm/ops/AgentOps.test.mjs +296 -113
- package/esm/ops/AuthenticateOps.mjs +136 -64
- package/esm/ops/AuthenticateOps.test.mjs +7 -4
- package/esm/ops/CirclesOfTrustOps.mjs +278 -229
- package/esm/ops/ConnectionProfileOps.mjs +206 -35
- package/esm/ops/ConnectionProfileOps.test.mjs +25 -5
- package/esm/ops/EmailTemplateOps.mjs +66 -6
- package/esm/ops/EmailTemplateOps.test.mjs +32 -11
- package/esm/ops/IdmOps.mjs +60 -47
- package/esm/ops/IdmOps.test.mjs +54 -18
- package/esm/ops/IdpOps.mjs +227 -31
- package/esm/ops/IdpOps.test.mjs +57 -20
- package/esm/ops/InfoOps.mjs +36 -23
- package/esm/ops/JoseOps.test.mjs +8 -0
- package/esm/ops/JourneyOps.mjs +634 -96
- package/esm/ops/JourneyOps.test.mjs +73 -31
- package/esm/ops/ManagedObjectOps.mjs +66 -10
- package/esm/ops/NodeOps.mjs +108 -85
- package/esm/ops/OAuth2ClientOps.mjs +258 -42
- package/esm/ops/OAuth2ClientOps.test.mjs +80 -29
- package/esm/ops/OAuth2ProviderOps.mjs +11 -8
- package/esm/ops/OrganizationOps.mjs +56 -8
- package/esm/ops/PolicyOps.mjs +379 -93
- package/esm/ops/PolicyOps.test.mjs +180 -65
- package/esm/ops/PolicySetOps.mjs +311 -88
- package/esm/ops/PolicySetOps.test.mjs +108 -39
- package/esm/ops/RealmOps.mjs +85 -65
- package/esm/ops/ResourceTypeOps.mjs +268 -61
- package/esm/ops/ResourceTypeOps.test.mjs +113 -27
- package/esm/ops/Saml2Ops.mjs +346 -106
- package/esm/ops/Saml2Ops.test.mjs +117 -81
- package/esm/ops/ScriptOps.mjs +202 -56
- package/esm/ops/ScriptOps.test.mjs +64 -23
- package/esm/ops/ServiceOps.mjs +258 -27
- package/esm/ops/ThemeOps.mjs +300 -33
- package/esm/ops/ThemeOps.test.mjs +197 -47
- package/esm/ops/cloud/FeatureOps.mjs +45 -10
- package/esm/ops/cloud/LogOps.mjs +117 -4
- package/esm/ops/cloud/SecretsOps.mjs +123 -204
- package/esm/ops/cloud/ServiceAccountOps.mjs +85 -15
- package/esm/ops/cloud/ServiceAccountOps.test.mjs +16 -6
- package/esm/ops/cloud/StartupOps.mjs +49 -6
- package/esm/ops/cloud/VariablesOps.mjs +58 -120
- package/esm/ops/utils/Console.mjs +9 -8
- package/esm/ops/utils/DataProtection.mjs +2 -3
- package/esm/ops/utils/ExportImportUtils.mjs +28 -8
- package/esm/ops/utils/OpsUtils.mjs +4 -3
- package/esm/ops/utils/OpsUtils.test.mjs +21 -5
- package/esm/ops/utils/{ValidationUtils.mjs → ScriptValidationUtils.mjs} +1 -1
- package/esm/ops/utils/{ValidationUtils.test.mjs → ScriptValidationUtils.test.mjs} +2 -2
- package/esm/ops/utils/Version.mjs +8 -2
- package/esm/shared/State.mjs +459 -145
- package/esm/shared/State.test.mjs +8 -0
- package/esm/utils/AutoSetupPolly.mjs +4 -1
- package/package.json +1 -1
- package/types/api/AgentApi.d.ts +37 -8
- package/types/api/AgentApi.d.ts.map +1 -1
- package/types/api/ApiTypes.d.ts +12 -0
- package/types/api/ApiTypes.d.ts.map +1 -1
- package/types/api/AuthenticateApi.d.ts +13 -3
- package/types/api/AuthenticateApi.d.ts.map +1 -1
- package/types/api/BaseApi.d.ts +36 -7
- package/types/api/BaseApi.d.ts.map +1 -1
- package/types/api/CirclesOfTrustApi.d.ts +21 -7
- package/types/api/CirclesOfTrustApi.d.ts.map +1 -1
- package/types/api/IdmConfigApi.d.ts +28 -13
- package/types/api/IdmConfigApi.d.ts.map +1 -1
- package/types/api/IdmSystemApi.d.ts +4 -1
- package/types/api/IdmSystemApi.d.ts.map +1 -1
- package/types/api/ManagedObjectApi.d.ts +25 -10
- package/types/api/ManagedObjectApi.d.ts.map +1 -1
- package/types/api/NodeApi.d.ts +31 -9
- package/types/api/NodeApi.d.ts.map +1 -1
- package/types/api/OAuth2ClientApi.d.ts +18 -5
- package/types/api/OAuth2ClientApi.d.ts.map +1 -1
- package/types/api/OAuth2OIDCApi.d.ts +45 -11
- package/types/api/OAuth2OIDCApi.d.ts.map +1 -1
- package/types/api/OAuth2ProviderApi.d.ts +4 -1
- package/types/api/OAuth2ProviderApi.d.ts.map +1 -1
- package/types/api/PoliciesApi.d.ts +21 -5
- package/types/api/PoliciesApi.d.ts.map +1 -1
- package/types/api/PolicySetApi.d.ts +20 -5
- package/types/api/PolicySetApi.d.ts.map +1 -1
- package/types/api/RealmApi.d.ts +26 -10
- package/types/api/RealmApi.d.ts.map +1 -1
- package/types/api/ResourceTypesApi.d.ts +27 -8
- package/types/api/ResourceTypesApi.d.ts.map +1 -1
- package/types/api/Saml2Api.d.ts +39 -32
- package/types/api/Saml2Api.d.ts.map +1 -1
- package/types/api/ScriptApi.d.ts +21 -5
- package/types/api/ScriptApi.d.ts.map +1 -1
- package/types/api/ServerInfoApi.d.ts +9 -2
- package/types/api/ServerInfoApi.d.ts.map +1 -1
- package/types/api/ServiceApi.d.ts +41 -7
- package/types/api/ServiceApi.d.ts.map +1 -1
- package/types/api/SocialIdentityProvidersApi.d.ts +30 -8
- package/types/api/SocialIdentityProvidersApi.d.ts.map +1 -1
- package/types/api/TreeApi.d.ts +18 -4
- package/types/api/TreeApi.d.ts.map +1 -1
- package/types/api/cloud/EnvInfoApi.d.ts +4 -1
- package/types/api/cloud/EnvInfoApi.d.ts.map +1 -1
- package/types/api/cloud/FeatureApi.d.ts +4 -1
- package/types/api/cloud/FeatureApi.d.ts.map +1 -1
- package/types/api/cloud/LogApi.d.ts +24 -6
- package/types/api/cloud/LogApi.d.ts.map +1 -1
- package/types/api/cloud/SecretsApi.d.ts +50 -10
- package/types/api/cloud/SecretsApi.d.ts.map +1 -1
- package/types/api/cloud/StartupApi.d.ts +7 -2
- package/types/api/cloud/StartupApi.d.ts.map +1 -1
- package/types/api/cloud/VariablesApi.d.ts +23 -5
- package/types/api/cloud/VariablesApi.d.ts.map +1 -1
- package/types/api/utils/ApiUtils.d.ts +3 -2
- package/types/api/utils/ApiUtils.d.ts.map +1 -1
- package/types/index.d.ts +2 -2
- package/types/index.d.ts.map +1 -1
- package/types/lib/FrodoLib.d.ts +95 -0
- package/types/lib/FrodoLib.d.ts.map +1 -0
- package/types/ops/AdminOps.d.ts +71 -12
- package/types/ops/AdminOps.d.ts.map +1 -1
- package/types/ops/AgentOps.d.ts +345 -36
- package/types/ops/AgentOps.d.ts.map +1 -1
- package/types/ops/AuthenticateOps.d.ts +18 -5
- package/types/ops/AuthenticateOps.d.ts.map +1 -1
- package/types/ops/CirclesOfTrustOps.d.ts +76 -26
- package/types/ops/CirclesOfTrustOps.d.ts.map +1 -1
- package/types/ops/ConnectionProfileOps.d.ts +88 -9
- package/types/ops/ConnectionProfileOps.d.ts.map +1 -1
- package/types/ops/EmailTemplateOps.d.ts +36 -3
- package/types/ops/EmailTemplateOps.d.ts.map +1 -1
- package/types/ops/IdmOps.d.ts +28 -40
- package/types/ops/IdmOps.d.ts.map +1 -1
- package/types/ops/IdpOps.d.ts +88 -10
- package/types/ops/IdpOps.d.ts.map +1 -1
- package/types/ops/InfoOps.d.ts +12 -1
- package/types/ops/InfoOps.d.ts.map +1 -1
- package/types/ops/JourneyOps.d.ts +237 -34
- package/types/ops/JourneyOps.d.ts.map +1 -1
- package/types/ops/ManagedObjectOps.d.ts +37 -8
- package/types/ops/ManagedObjectOps.d.ts.map +1 -1
- package/types/ops/NodeOps.d.ts +61 -6
- package/types/ops/NodeOps.d.ts.map +1 -1
- package/types/ops/OAuth2ClientOps.d.ts +104 -10
- package/types/ops/OAuth2ClientOps.d.ts.map +1 -1
- package/types/ops/OAuth2ProviderOps.d.ts +8 -5
- package/types/ops/OAuth2ProviderOps.d.ts.map +1 -1
- package/types/ops/OpsTypes.d.ts +12 -1
- package/types/ops/OpsTypes.d.ts.map +1 -1
- package/types/ops/OrganizationOps.d.ts +24 -3
- package/types/ops/OrganizationOps.d.ts.map +1 -1
- package/types/ops/PolicyOps.d.ts +103 -28
- package/types/ops/PolicyOps.d.ts.map +1 -1
- package/types/ops/PolicySetOps.d.ts +76 -30
- package/types/ops/PolicySetOps.d.ts.map +1 -1
- package/types/ops/RealmOps.d.ts +34 -14
- package/types/ops/RealmOps.d.ts.map +1 -1
- package/types/ops/ResourceTypeOps.d.ts +116 -29
- package/types/ops/ResourceTypeOps.d.ts.map +1 -1
- package/types/ops/Saml2Ops.d.ts +124 -41
- package/types/ops/Saml2Ops.d.ts.map +1 -1
- package/types/ops/ScriptOps.d.ts +88 -23
- package/types/ops/ScriptOps.d.ts.map +1 -1
- package/types/ops/ServiceOps.d.ts +94 -8
- package/types/ops/ServiceOps.d.ts.map +1 -1
- package/types/ops/ThemeOps.d.ts +113 -9
- package/types/ops/ThemeOps.d.ts.map +1 -1
- package/types/ops/cloud/FeatureOps.d.ts +23 -2
- package/types/ops/cloud/FeatureOps.d.ts.map +1 -1
- package/types/ops/cloud/LogOps.d.ts +61 -3
- package/types/ops/cloud/LogOps.d.ts.map +1 -1
- package/types/ops/cloud/SecretsOps.d.ts +77 -63
- package/types/ops/cloud/SecretsOps.d.ts.map +1 -1
- package/types/ops/cloud/ServiceAccountOps.d.ts +48 -3
- package/types/ops/cloud/ServiceAccountOps.d.ts.map +1 -1
- package/types/ops/cloud/StartupOps.d.ts +25 -2
- package/types/ops/cloud/StartupOps.d.ts.map +1 -1
- package/types/ops/cloud/VariablesOps.d.ts +39 -39
- package/types/ops/cloud/VariablesOps.d.ts.map +1 -1
- package/types/ops/utils/Console.d.ts.map +1 -1
- package/types/ops/utils/DataProtection.d.ts +1 -1
- package/types/ops/utils/DataProtection.d.ts.map +1 -1
- package/types/ops/utils/ExportImportUtils.d.ts +29 -11
- package/types/ops/utils/ExportImportUtils.d.ts.map +1 -1
- package/types/ops/utils/OpsUtils.d.ts +4 -1
- package/types/ops/utils/OpsUtils.d.ts.map +1 -1
- package/types/ops/utils/ScriptValidationUtils.d.ts.map +1 -0
- package/types/ops/utils/Version.d.ts +5 -1
- package/types/ops/utils/Version.d.ts.map +1 -1
- package/types/shared/State.d.ts +80 -177
- package/types/shared/State.d.ts.map +1 -1
- package/types/utils/AutoSetupPolly.d.ts.map +1 -1
- package/cjs/ops/utils/ValidationUtils.js.map +0 -1
- package/cjs/ops/utils/ValidationUtils.test.js.map +0 -1
- package/types/ops/utils/ValidationUtils.d.ts.map +0 -1
- /package/types/ops/utils/{ValidationUtils.d.ts → ScriptValidationUtils.d.ts} +0 -0
package/esm/shared/State.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import path from 'path';
|
|
|
3
3
|
import { fileURLToPath } from 'url';
|
|
4
4
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
5
5
|
const pkg = JSON.parse(fs.readFileSync(path.resolve(__dirname, '../../package.json'), 'utf8'));
|
|
6
|
-
const
|
|
6
|
+
const globalState = {
|
|
7
7
|
authenticationHeaderOverrides: {},
|
|
8
8
|
printHandler: message => {
|
|
9
9
|
if (!message) return;
|
|
@@ -46,81 +46,373 @@ const _state = {
|
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
};
|
|
49
|
-
export
|
|
50
|
-
|
|
49
|
+
export default class State {
|
|
50
|
+
state = {
|
|
51
|
+
...globalState
|
|
52
|
+
};
|
|
53
|
+
constructor(initialState) {
|
|
54
|
+
this.state = {
|
|
55
|
+
...this.state,
|
|
56
|
+
...initialState
|
|
57
|
+
};
|
|
58
|
+
console.log(`state:`);
|
|
59
|
+
console.dir(this.state);
|
|
60
|
+
}
|
|
61
|
+
setHost(host) {
|
|
62
|
+
this.state.host = host;
|
|
63
|
+
}
|
|
64
|
+
getHost() {
|
|
65
|
+
return this.state.host || process.env.FRODO_HOST;
|
|
66
|
+
}
|
|
51
67
|
|
|
52
|
-
/**
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
68
|
+
/**
|
|
69
|
+
* @deprecated since v0.17.0 use `setHost(host: string)` instead
|
|
70
|
+
*/
|
|
71
|
+
setTenant(tenant) {
|
|
72
|
+
this.setHost(tenant);
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* @deprecated since v0.17.0 use `getHost` instead
|
|
76
|
+
*/
|
|
77
|
+
getTenant() {
|
|
78
|
+
return this.getHost();
|
|
79
|
+
}
|
|
80
|
+
setUsername(username) {
|
|
81
|
+
this.state.username = username;
|
|
82
|
+
}
|
|
83
|
+
getUsername() {
|
|
84
|
+
return this.state.username || process.env.FRODO_USERNAME;
|
|
85
|
+
}
|
|
86
|
+
setPassword(password) {
|
|
87
|
+
this.state.password = password;
|
|
88
|
+
}
|
|
89
|
+
getPassword() {
|
|
90
|
+
return this.state.password || process.env.FRODO_PASSWORD;
|
|
91
|
+
}
|
|
92
|
+
setRealm(realm) {
|
|
93
|
+
this.state.realm = realm;
|
|
94
|
+
}
|
|
95
|
+
getRealm() {
|
|
96
|
+
return this.state.realm || process.env.FRODO_REALM;
|
|
97
|
+
}
|
|
98
|
+
setDeploymentType(type) {
|
|
99
|
+
this.state.deploymentType = type;
|
|
100
|
+
}
|
|
101
|
+
getDeploymentType() {
|
|
102
|
+
return this.state.deploymentType;
|
|
103
|
+
}
|
|
104
|
+
setAllowInsecureConnection(allowInsecureConnection) {
|
|
105
|
+
this.state.allowInsecureConnection = allowInsecureConnection;
|
|
106
|
+
}
|
|
107
|
+
getAllowInsecureConnection() {
|
|
108
|
+
return this.state.allowInsecureConnection;
|
|
109
|
+
}
|
|
110
|
+
setCookieName(name) {
|
|
111
|
+
this.state.cookieName = name;
|
|
112
|
+
}
|
|
113
|
+
getCookieName() {
|
|
114
|
+
return this.state.cookieName;
|
|
115
|
+
}
|
|
116
|
+
setCookieValue(value) {
|
|
117
|
+
this.state.cookieValue = value;
|
|
118
|
+
}
|
|
119
|
+
getCookieValue() {
|
|
120
|
+
return this.state.cookieValue;
|
|
121
|
+
}
|
|
122
|
+
setFeatures(features) {
|
|
123
|
+
this.state.features = features;
|
|
124
|
+
}
|
|
125
|
+
getFeatures() {
|
|
126
|
+
return this.state.features;
|
|
127
|
+
}
|
|
128
|
+
setAuthenticationHeaderOverrides(overrides) {
|
|
129
|
+
this.state.authenticationHeaderOverrides = overrides;
|
|
130
|
+
}
|
|
131
|
+
getAuthenticationHeaderOverrides() {
|
|
132
|
+
return this.state.authenticationHeaderOverrides;
|
|
133
|
+
}
|
|
134
|
+
setAuthenticationService(service) {
|
|
135
|
+
this.state.authenticationService = service;
|
|
136
|
+
}
|
|
137
|
+
getAuthenticationService() {
|
|
138
|
+
return this.state.authenticationService || process.env.FRODO_AUTHENTICATION_SERVICE;
|
|
139
|
+
}
|
|
140
|
+
setServiceAccountId(uuid) {
|
|
141
|
+
this.state.serviceAccountId = uuid;
|
|
142
|
+
}
|
|
143
|
+
getServiceAccountId() {
|
|
144
|
+
return this.state.serviceAccountId || process.env.FRODO_SA_ID;
|
|
145
|
+
}
|
|
146
|
+
setServiceAccountJwk(jwk) {
|
|
147
|
+
this.state.serviceAccountJwk = {
|
|
148
|
+
...jwk
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
getServiceAccountJwk() {
|
|
152
|
+
return this.state.serviceAccountJwk || (process.env.FRODO_SA_JWK ? JSON.parse(process.env.FRODO_SA_JWK) : undefined);
|
|
153
|
+
}
|
|
154
|
+
setUseBearerTokenForAmApis(useBearerTokenForAmApis) {
|
|
155
|
+
this.state.useBearerTokenForAmApis = useBearerTokenForAmApis;
|
|
156
|
+
}
|
|
157
|
+
getUseBearerTokenForAmApis() {
|
|
158
|
+
return this.state.useBearerTokenForAmApis;
|
|
159
|
+
}
|
|
160
|
+
setBearerToken(token) {
|
|
161
|
+
this.state.bearerToken = token;
|
|
162
|
+
}
|
|
163
|
+
getBearerToken() {
|
|
164
|
+
return this.state.bearerToken;
|
|
165
|
+
}
|
|
166
|
+
setLogApiKey(key) {
|
|
167
|
+
this.state.logApiKey = key;
|
|
168
|
+
}
|
|
169
|
+
getLogApiKey() {
|
|
170
|
+
return this.state.logApiKey || process.env.FRODO_LOG_KEY;
|
|
171
|
+
}
|
|
172
|
+
setLogApiSecret(secret) {
|
|
173
|
+
this.state.logApiSecret = secret;
|
|
174
|
+
}
|
|
175
|
+
getLogApiSecret() {
|
|
176
|
+
return this.state.logApiSecret || process.env.FRODO_LOG_SECRET;
|
|
177
|
+
}
|
|
178
|
+
setAmVersion(version) {
|
|
179
|
+
this.state.amVersion = version;
|
|
180
|
+
}
|
|
181
|
+
getAmVersion() {
|
|
182
|
+
return this.state.amVersion;
|
|
183
|
+
}
|
|
184
|
+
setFrodoVersion(version) {
|
|
185
|
+
this.state.frodoVersion = version;
|
|
186
|
+
}
|
|
187
|
+
getFrodoVersion() {
|
|
188
|
+
return this.state.frodoVersion || `v${pkg.version} [${process.version}]`;
|
|
189
|
+
}
|
|
190
|
+
setConnectionProfilesPath(path) {
|
|
191
|
+
this.state.connectionProfilesPath = path;
|
|
192
|
+
}
|
|
193
|
+
getConnectionProfilesPath() {
|
|
194
|
+
return this.state.connectionProfilesPath;
|
|
195
|
+
}
|
|
196
|
+
setMasterKeyPath(path) {
|
|
197
|
+
this.state.masterKeyPath = path;
|
|
198
|
+
}
|
|
199
|
+
getMasterKeyPath() {
|
|
200
|
+
return this.state.masterKeyPath;
|
|
201
|
+
}
|
|
202
|
+
setOutputFile(file) {
|
|
203
|
+
this.state.outputFile = file;
|
|
204
|
+
}
|
|
205
|
+
getOutputFile() {
|
|
206
|
+
return this.state.outputFile;
|
|
207
|
+
}
|
|
208
|
+
setDirectory(directory) {
|
|
209
|
+
this.state.directory = directory;
|
|
210
|
+
}
|
|
211
|
+
getDirectory() {
|
|
212
|
+
return this.state.directory;
|
|
213
|
+
}
|
|
214
|
+
setCurlirizeHandler(handler) {
|
|
215
|
+
this.state.curlirizeHandler = handler;
|
|
216
|
+
}
|
|
217
|
+
getCurlirizeHandler() {
|
|
218
|
+
return this.state.curlirizeHandler;
|
|
219
|
+
}
|
|
220
|
+
setCurlirize(curlirize) {
|
|
221
|
+
this.state.curlirize = curlirize;
|
|
222
|
+
}
|
|
223
|
+
getCurlirize() {
|
|
224
|
+
return this.state.curlirize;
|
|
225
|
+
}
|
|
226
|
+
setCreateProgressHandler(handler) {
|
|
227
|
+
this.state.createProgressHandler = handler;
|
|
228
|
+
}
|
|
229
|
+
getCreateProgressHandler() {
|
|
230
|
+
return this.state.createProgressHandler;
|
|
231
|
+
}
|
|
232
|
+
setUpdateProgressHandler(handler) {
|
|
233
|
+
this.state.updateProgressHandler = handler;
|
|
234
|
+
}
|
|
235
|
+
getUpdateProgressHandler() {
|
|
236
|
+
return this.state.updateProgressHandler;
|
|
237
|
+
}
|
|
238
|
+
setStopProgressHandler(handler) {
|
|
239
|
+
this.state.stopProgressHandler = handler;
|
|
240
|
+
}
|
|
241
|
+
getStopProgressHandler() {
|
|
242
|
+
return this.state.stopProgressHandler;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
// global state
|
|
246
|
+
|
|
247
|
+
setPrintHandler(handler) {
|
|
248
|
+
globalState.printHandler = handler;
|
|
249
|
+
}
|
|
250
|
+
getPrintHandler() {
|
|
251
|
+
return globalState.printHandler;
|
|
252
|
+
}
|
|
253
|
+
setVerboseHandler(handler) {
|
|
254
|
+
globalState.verboseHandler = handler;
|
|
255
|
+
}
|
|
256
|
+
getVerboseHandler() {
|
|
257
|
+
return globalState.verboseHandler;
|
|
258
|
+
}
|
|
259
|
+
setVerbose(verbose) {
|
|
260
|
+
globalState.verbose = verbose;
|
|
261
|
+
}
|
|
262
|
+
getVerbose() {
|
|
263
|
+
return globalState.verbose;
|
|
264
|
+
}
|
|
265
|
+
setDebugHandler(handler) {
|
|
266
|
+
globalState.debugHandler = handler;
|
|
267
|
+
}
|
|
268
|
+
getDebugHandler() {
|
|
269
|
+
return globalState.debugHandler;
|
|
270
|
+
}
|
|
271
|
+
setDebug(debug) {
|
|
272
|
+
globalState.debug = debug;
|
|
273
|
+
}
|
|
274
|
+
getDebug() {
|
|
275
|
+
return globalState.debug || process.env.FRODO_DEBUG !== undefined;
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
// export const setHost = (host: string) => (globalState.host = host);
|
|
280
|
+
// export const getHost = () => globalState.host || process.env.FRODO_HOST;
|
|
281
|
+
|
|
282
|
+
// /**
|
|
283
|
+
// * @deprecated since v0.17.0 use `setHost(host: string)` instead
|
|
284
|
+
// */
|
|
285
|
+
// export const setTenant = setHost;
|
|
286
|
+
// /**
|
|
287
|
+
// * @deprecated since v0.17.0 use `getHost` instead
|
|
288
|
+
// */
|
|
289
|
+
// export const getTenant = getHost;
|
|
290
|
+
|
|
291
|
+
// export const setUsername = (username: string) =>
|
|
292
|
+
// (globalState.username = username);
|
|
293
|
+
// export const getUsername = () =>
|
|
294
|
+
// globalState.username || process.env.FRODO_USERNAME;
|
|
295
|
+
|
|
296
|
+
// export const setPassword = (password: string) =>
|
|
297
|
+
// (globalState.password = password);
|
|
298
|
+
// export const getPassword = () =>
|
|
299
|
+
// globalState.password || process.env.FRODO_PASSWORD;
|
|
300
|
+
|
|
301
|
+
// export const setRealm = (realm: string) => (globalState.realm = realm);
|
|
302
|
+
// export const getRealm = () => globalState.realm || process.env.FRODO_REALM;
|
|
303
|
+
|
|
304
|
+
// export const setDeploymentType = (type: string) =>
|
|
305
|
+
// (globalState.deploymentType = type);
|
|
306
|
+
// export const getDeploymentType = () => globalState.deploymentType;
|
|
307
|
+
|
|
308
|
+
// export const setAllowInsecureConnection = (allowInsecureConnection: boolean) =>
|
|
309
|
+
// (globalState.allowInsecureConnection = allowInsecureConnection);
|
|
310
|
+
// export const getAllowInsecureConnection = () =>
|
|
311
|
+
// globalState['allowInsecureConnection'];
|
|
312
|
+
|
|
313
|
+
// export const setCookieName = (name: string) => (globalState.cookieName = name);
|
|
314
|
+
// export const getCookieName = () => globalState.cookieName;
|
|
315
|
+
// export const setCookieValue = (value: string) =>
|
|
316
|
+
// (globalState.cookieValue = value);
|
|
317
|
+
// export const getCookieValue = () => globalState.cookieValue;
|
|
318
|
+
|
|
319
|
+
// export const setAuthenticationHeaderOverrides = (
|
|
320
|
+
// overrides: Record<string, string>
|
|
321
|
+
// ) => (globalState.authenticationHeaderOverrides = overrides);
|
|
322
|
+
// export const getAuthenticationHeaderOverrides = () =>
|
|
323
|
+
// globalState.authenticationHeaderOverrides;
|
|
324
|
+
// export const setAuthenticationService = (service: string) =>
|
|
325
|
+
// (globalState.authenticationService = service);
|
|
326
|
+
// export const getAuthenticationService = () =>
|
|
327
|
+
// globalState.authenticationService || process.env.FRODO_AUTHENTICATION_SERVICE;
|
|
328
|
+
|
|
329
|
+
// export const setServiceAccountId = (uuid: string) =>
|
|
330
|
+
// (globalState.serviceAccountId = uuid);
|
|
331
|
+
// export const getServiceAccountId = (): string =>
|
|
332
|
+
// globalState.serviceAccountId || process.env.FRODO_SA_ID;
|
|
333
|
+
// export const setServiceAccountJwk = (jwk: JwkRsa) =>
|
|
334
|
+
// (globalState.serviceAccountJwk = { ...jwk });
|
|
335
|
+
// export const getServiceAccountJwk = (): JwkRsa =>
|
|
336
|
+
// globalState.serviceAccountJwk ||
|
|
337
|
+
// (process.env.FRODO_SA_JWK ? JSON.parse(process.env.FRODO_SA_JWK) : undefined);
|
|
338
|
+
|
|
339
|
+
// export const setUseBearerTokenForAmApis = (useBearerTokenForAmApis: boolean) =>
|
|
340
|
+
// (globalState.useBearerTokenForAmApis = useBearerTokenForAmApis);
|
|
341
|
+
// export const getUseBearerTokenForAmApis = () =>
|
|
342
|
+
// globalState.useBearerTokenForAmApis;
|
|
343
|
+
// export const setBearerToken = (token: string) =>
|
|
344
|
+
// (globalState.bearerToken = token);
|
|
345
|
+
// export const getBearerToken = () => globalState.bearerToken;
|
|
346
|
+
|
|
347
|
+
// export const setLogApiKey = (key: string) => (globalState.logApiKey = key);
|
|
348
|
+
// export const getLogApiKey = () =>
|
|
349
|
+
// globalState.logApiKey || process.env.FRODO_LOG_KEY;
|
|
350
|
+
// export const setLogApiSecret = (secret: string) =>
|
|
351
|
+
// (globalState.logApiSecret = secret);
|
|
352
|
+
// export const getLogApiSecret = () =>
|
|
353
|
+
// globalState.logApiSecret || process.env.FRODO_LOG_SECRET;
|
|
354
|
+
|
|
355
|
+
// export const setAmVersion = (version: string) =>
|
|
356
|
+
// (globalState.amVersion = version);
|
|
357
|
+
// export const getAmVersion = () => globalState.amVersion;
|
|
358
|
+
|
|
359
|
+
// export const setFrodoVersion = (version: string) =>
|
|
360
|
+
// (globalState.frodoVersion = version);
|
|
361
|
+
// export const getFrodoVersion = () =>
|
|
362
|
+
// globalState.frodoVersion || `v${pkg.version} [${process.version}]`;
|
|
363
|
+
|
|
364
|
+
// export const setConnectionProfilesPath = (path: string) =>
|
|
365
|
+
// (globalState.connectionProfilesPath = path);
|
|
366
|
+
// export const getConnectionProfilesPath = () =>
|
|
367
|
+
// globalState.connectionProfilesPath;
|
|
368
|
+
|
|
369
|
+
// export const setMasterKeyPath = (path: string) =>
|
|
370
|
+
// (globalState.masterKeyPath = path);
|
|
371
|
+
// export const getMasterKeyPath = () => globalState.masterKeyPath;
|
|
372
|
+
|
|
373
|
+
// export const setOutputFile = (file: string) => (globalState.outputFile = file);
|
|
374
|
+
// export const getOutputFile = () => globalState.outputFile;
|
|
375
|
+
|
|
376
|
+
// export const setDirectory = (directory: string) =>
|
|
377
|
+
// (globalState.directory = directory);
|
|
378
|
+
// export const getDirectory = () => globalState.directory;
|
|
379
|
+
|
|
380
|
+
// export const setPrintHandler = (
|
|
381
|
+
// handler: (message: string | object, type?: string, newline?: boolean) => void
|
|
382
|
+
// ) => (globalState.printHandler = handler);
|
|
383
|
+
// export const getPrintHandler = () => globalState.printHandler;
|
|
384
|
+
|
|
385
|
+
// export const setVerboseHandler = (
|
|
386
|
+
// handler: (message: string | object) => void
|
|
387
|
+
// ) => (globalState.verboseHandler = handler);
|
|
388
|
+
// export const getVerboseHandler = () => globalState.verboseHandler;
|
|
389
|
+
// export const setVerbose = (verbose: boolean) => (globalState.verbose = verbose);
|
|
390
|
+
export const getVerbose = () => globalState.verbose;
|
|
391
|
+
|
|
392
|
+
// export const setDebugHandler = (handler: (message: string | object) => void) =>
|
|
393
|
+
// (globalState.debugHandler = handler);
|
|
394
|
+
// export const getDebugHandler = () => globalState.debugHandler;
|
|
395
|
+
// export const setDebug = (debug: boolean) => (globalState.debug = debug);
|
|
396
|
+
export const getDebug = () => globalState.debug || process.env.FRODO_DEBUG !== undefined;
|
|
397
|
+
|
|
398
|
+
// export const setCurlirizeHandler = (handler: (message: string) => void) =>
|
|
399
|
+
// (globalState.curlirizeHandler = handler);
|
|
400
|
+
// export const getCurlirizeHandler = () => globalState.curlirizeHandler;
|
|
401
|
+
// export const setCurlirize = (curlirize: boolean) =>
|
|
402
|
+
// (globalState.curlirize = curlirize);
|
|
403
|
+
// export const getCurlirize = (): boolean => globalState.curlirize;
|
|
404
|
+
|
|
405
|
+
// export const setCreateProgressHandler = (
|
|
406
|
+
// handler: (type: string, total?: number, message?: string) => void
|
|
407
|
+
// ) => (globalState.createProgressHandler = handler);
|
|
408
|
+
// export const getCreateProgressHandler = () => globalState.createProgressHandler;
|
|
409
|
+
// export const setUpdateProgressHandler = (handler: (message: string) => void) =>
|
|
410
|
+
// (globalState.updateProgressHandler = handler);
|
|
411
|
+
// export const getUpdateProgressHandler = () => globalState.updateProgressHandler;
|
|
412
|
+
// export const setStopProgressHandler = (
|
|
413
|
+
// handler: (message: string, status?: string) => void
|
|
414
|
+
// ) => (globalState.stopProgressHandler = handler);
|
|
415
|
+
// export const getStopProgressHandler = () => globalState.stopProgressHandler;
|
|
124
416
|
|
|
125
417
|
/**
|
|
126
418
|
* @deprecated since version v0.17.0. Import state:
|
|
@@ -131,74 +423,96 @@ export const getStopProgressHandler = () => _state.stopProgressHandler;
|
|
|
131
423
|
*
|
|
132
424
|
* ```const username = state.getUsername();```
|
|
133
425
|
*/
|
|
134
|
-
export default {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
426
|
+
// export default {
|
|
427
|
+
// session: {
|
|
428
|
+
// setHost,
|
|
429
|
+
// getHost,
|
|
430
|
+
|
|
431
|
+
// setTenant,
|
|
432
|
+
// getTenant,
|
|
433
|
+
|
|
434
|
+
// setUsername,
|
|
435
|
+
// getUsername,
|
|
436
|
+
|
|
437
|
+
// setPassword,
|
|
438
|
+
// getPassword,
|
|
439
|
+
|
|
440
|
+
// setRealm,
|
|
441
|
+
// getRealm,
|
|
442
|
+
|
|
443
|
+
// setDeploymentType,
|
|
444
|
+
// getDeploymentType,
|
|
445
|
+
|
|
446
|
+
// setAllowInsecureConnection,
|
|
447
|
+
// getAllowInsecureConnection,
|
|
448
|
+
|
|
449
|
+
// setCookieName,
|
|
450
|
+
// getCookieName,
|
|
451
|
+
// setCookieValue,
|
|
452
|
+
// getCookieValue,
|
|
453
|
+
|
|
454
|
+
// setAuthenticationHeaderOverrides,
|
|
455
|
+
// getAuthenticationHeaderOverrides,
|
|
456
|
+
// setAuthenticationService,
|
|
457
|
+
// getAuthenticationService,
|
|
458
|
+
|
|
459
|
+
// setServiceAccountId,
|
|
460
|
+
// getServiceAccountId,
|
|
461
|
+
// setServiceAccountJwk,
|
|
462
|
+
// getServiceAccountJwk,
|
|
463
|
+
|
|
464
|
+
// setUseBearerTokenForAmApis,
|
|
465
|
+
// getUseBearerTokenForAmApis,
|
|
466
|
+
// setBearerToken,
|
|
467
|
+
// getBearerToken,
|
|
468
|
+
|
|
469
|
+
// setLogApiKey,
|
|
470
|
+
// getLogApiKey,
|
|
471
|
+
// setLogApiSecret,
|
|
472
|
+
// getLogApiSecret,
|
|
473
|
+
|
|
474
|
+
// setAmVersion,
|
|
475
|
+
// getAmVersion,
|
|
476
|
+
|
|
477
|
+
// setFrodoVersion,
|
|
478
|
+
// getFrodoVersion,
|
|
479
|
+
|
|
480
|
+
// setConnectionProfilesPath,
|
|
481
|
+
// getConnectionProfilesPath,
|
|
482
|
+
|
|
483
|
+
// setMasterKeyPath,
|
|
484
|
+
// getMasterKeyPath,
|
|
485
|
+
|
|
486
|
+
// setOutputFile,
|
|
487
|
+
// getOutputFile,
|
|
488
|
+
|
|
489
|
+
// setDirectory,
|
|
490
|
+
// getDirectory,
|
|
491
|
+
|
|
492
|
+
// setPrintHandler,
|
|
493
|
+
// getPrintHandler,
|
|
494
|
+
|
|
495
|
+
// setVerboseHandler,
|
|
496
|
+
// getVerboseHandler,
|
|
497
|
+
// setVerbose,
|
|
498
|
+
// getVerbose,
|
|
499
|
+
|
|
500
|
+
// setDebugHandler,
|
|
501
|
+
// getDebugHandler,
|
|
502
|
+
// setDebug,
|
|
503
|
+
// getDebug,
|
|
504
|
+
|
|
505
|
+
// setCurlirizeHandler,
|
|
506
|
+
// getCurlirizeHandler,
|
|
507
|
+
// setCurlirize,
|
|
508
|
+
// getCurlirize,
|
|
509
|
+
|
|
510
|
+
// setCreateProgressHandler,
|
|
511
|
+
// getCreateProgressHandler,
|
|
512
|
+
// setUpdateProgressHandler,
|
|
513
|
+
// getUpdateProgressHandler,
|
|
514
|
+
// setStopProgressHandler,
|
|
515
|
+
// getStopProgressHandler,
|
|
516
|
+
// },
|
|
517
|
+
// };
|
|
204
518
|
//# sourceMappingURL=State.js.map
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Run tests
|
|
3
|
+
*
|
|
4
|
+
* npm run test:only State
|
|
5
|
+
*
|
|
6
|
+
* Note: FRODO_DEBUG=1 is optional and enables debug logging for some output
|
|
7
|
+
* in case things don't function as expected
|
|
8
|
+
*/
|
|
1
9
|
import { state } from '../index';
|
|
2
10
|
describe('State', () => {
|
|
3
11
|
const host = 'https://openam-frodo-dev.forgeblocks.com/am';
|
|
@@ -25,7 +25,10 @@ switch (process.env.FRODO_POLLY_MODE) {
|
|
|
25
25
|
{
|
|
26
26
|
state.setHost(process.env.FRODO_HOST || 'https://openam-frodo-dev.forgeblocks.com/am');
|
|
27
27
|
state.setRealm(process.env.FRODO_REALM || 'alpha');
|
|
28
|
-
if (!(await getTokens(
|
|
28
|
+
if (!(await getTokens({
|
|
29
|
+
forceLoginAsUser: false,
|
|
30
|
+
state
|
|
31
|
+
}))) throw new Error(`Unable to record mock responses from '${state.getHost()}'`);
|
|
29
32
|
mode = MODES.RECORD;
|
|
30
33
|
recordIfMissing = true;
|
|
31
34
|
break;
|