@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.
Files changed (406) hide show
  1. package/CHANGELOG.md +3 -7
  2. package/cjs/api/AgentApi.js +91 -37
  3. package/cjs/api/AgentApi.js.map +1 -1
  4. package/cjs/api/AgentApi.test.js.map +1 -1
  5. package/cjs/api/ApiTypes.js.map +1 -1
  6. package/cjs/api/AuthenticateApi.js +18 -11
  7. package/cjs/api/AuthenticateApi.js.map +1 -1
  8. package/cjs/api/AuthenticateApi.test.js.map +1 -1
  9. package/cjs/api/BaseApi.js +50 -26
  10. package/cjs/api/BaseApi.js.map +1 -1
  11. package/cjs/api/CirclesOfTrustApi.js +47 -23
  12. package/cjs/api/CirclesOfTrustApi.js.map +1 -1
  13. package/cjs/api/IdmConfigApi.js +54 -21
  14. package/cjs/api/IdmConfigApi.js.map +1 -1
  15. package/cjs/api/IdmSystemApi.js +9 -6
  16. package/cjs/api/IdmSystemApi.js.map +1 -1
  17. package/cjs/api/ManagedObjectApi.js +49 -27
  18. package/cjs/api/ManagedObjectApi.js.map +1 -1
  19. package/cjs/api/NodeApi.js +71 -32
  20. package/cjs/api/NodeApi.js.map +1 -1
  21. package/cjs/api/NodeApi.test.js.map +1 -1
  22. package/cjs/api/OAuth2ClientApi.js +43 -20
  23. package/cjs/api/OAuth2ClientApi.js.map +1 -1
  24. package/cjs/api/OAuth2OIDCApi.js +74 -27
  25. package/cjs/api/OAuth2OIDCApi.js.map +1 -1
  26. package/cjs/api/OAuth2OIDCApi.test.js.map +1 -1
  27. package/cjs/api/OAuth2ProviderApi.js +10 -9
  28. package/cjs/api/OAuth2ProviderApi.js.map +1 -1
  29. package/cjs/api/PoliciesApi.js +54 -22
  30. package/cjs/api/PoliciesApi.js.map +1 -1
  31. package/cjs/api/PoliciesApi.test.js.map +1 -1
  32. package/cjs/api/PolicySetApi.js +54 -23
  33. package/cjs/api/PolicySetApi.js.map +1 -1
  34. package/cjs/api/PolicySetApi.test.js.map +1 -1
  35. package/cjs/api/RealmApi.js +73 -29
  36. package/cjs/api/RealmApi.js.map +1 -1
  37. package/cjs/api/ResourceTypesApi.js +67 -28
  38. package/cjs/api/ResourceTypesApi.js.map +1 -1
  39. package/cjs/api/ResourceTypesApi.test.js.map +1 -1
  40. package/cjs/api/Saml2Api.js +90 -122
  41. package/cjs/api/Saml2Api.js.map +1 -1
  42. package/cjs/api/ScriptApi.js +54 -23
  43. package/cjs/api/ScriptApi.js.map +1 -1
  44. package/cjs/api/ServerInfoApi.js +23 -10
  45. package/cjs/api/ServerInfoApi.js.map +1 -1
  46. package/cjs/api/ServiceApi.js +91 -42
  47. package/cjs/api/ServiceApi.js.map +1 -1
  48. package/cjs/api/SocialIdentityProvidersApi.js +70 -31
  49. package/cjs/api/SocialIdentityProvidersApi.js.map +1 -1
  50. package/cjs/api/TreeApi.js +43 -20
  51. package/cjs/api/TreeApi.js.map +1 -1
  52. package/cjs/api/TreeApi.test.js.map +1 -1
  53. package/cjs/api/cloud/EnvInfoApi.js +10 -6
  54. package/cjs/api/cloud/EnvInfoApi.js.map +1 -1
  55. package/cjs/api/cloud/FeatureApi.js +9 -6
  56. package/cjs/api/cloud/FeatureApi.js.map +1 -1
  57. package/cjs/api/cloud/LogApi.js +48 -18
  58. package/cjs/api/cloud/LogApi.js.map +1 -1
  59. package/cjs/api/cloud/SecretsApi.js +109 -35
  60. package/cjs/api/cloud/SecretsApi.js.map +1 -1
  61. package/cjs/api/cloud/SecretsApi.test.js.map +1 -1
  62. package/cjs/api/cloud/StartupApi.js +21 -10
  63. package/cjs/api/cloud/StartupApi.js.map +1 -1
  64. package/cjs/api/cloud/StartupApi.test.js.map +1 -1
  65. package/cjs/api/cloud/VariablesApi.js +52 -20
  66. package/cjs/api/cloud/VariablesApi.js.map +1 -1
  67. package/cjs/api/cloud/VariablesApi.test.js.map +1 -1
  68. package/cjs/api/utils/ApiUtils.js +2 -5
  69. package/cjs/api/utils/ApiUtils.js.map +1 -1
  70. package/cjs/api/utils/ApiUtils.test.js.map +1 -1
  71. package/cjs/index.js +22 -17
  72. package/cjs/index.js.map +1 -1
  73. package/cjs/lib/FrodoLib.js +142 -0
  74. package/cjs/lib/FrodoLib.js.map +1 -0
  75. package/cjs/ops/AdminOps.js +578 -90
  76. package/cjs/ops/AdminOps.js.map +1 -1
  77. package/cjs/ops/AgentOps.js +956 -118
  78. package/cjs/ops/AgentOps.js.map +1 -1
  79. package/cjs/ops/AgentOps.test.js.map +1 -1
  80. package/cjs/ops/AuthenticateOps.js +155 -87
  81. package/cjs/ops/AuthenticateOps.js.map +1 -1
  82. package/cjs/ops/AuthenticateOps.test.js.map +1 -1
  83. package/cjs/ops/CirclesOfTrustOps.js +334 -291
  84. package/cjs/ops/CirclesOfTrustOps.js.map +1 -1
  85. package/cjs/ops/ConnectionProfileOps.js +241 -46
  86. package/cjs/ops/ConnectionProfileOps.js.map +1 -1
  87. package/cjs/ops/ConnectionProfileOps.test.js.map +1 -1
  88. package/cjs/ops/EmailTemplateOps.js +84 -10
  89. package/cjs/ops/EmailTemplateOps.js.map +1 -1
  90. package/cjs/ops/EmailTemplateOps.test.js.map +1 -1
  91. package/cjs/ops/IdmOps.js +97 -81
  92. package/cjs/ops/IdmOps.js.map +1 -1
  93. package/cjs/ops/IdmOps.test.js.map +1 -1
  94. package/cjs/ops/IdpOps.js +275 -42
  95. package/cjs/ops/IdpOps.js.map +1 -1
  96. package/cjs/ops/IdpOps.test.js.map +1 -1
  97. package/cjs/ops/InfoOps.js +42 -27
  98. package/cjs/ops/InfoOps.js.map +1 -1
  99. package/cjs/ops/JoseOps.test.js.map +1 -1
  100. package/cjs/ops/JourneyOps.js +721 -126
  101. package/cjs/ops/JourneyOps.js.map +1 -1
  102. package/cjs/ops/JourneyOps.test.js.map +1 -1
  103. package/cjs/ops/ManagedObjectOps.js +79 -12
  104. package/cjs/ops/ManagedObjectOps.js.map +1 -1
  105. package/cjs/ops/NodeOps.js +127 -100
  106. package/cjs/ops/NodeOps.js.map +1 -1
  107. package/cjs/ops/OAuth2ClientOps.js +323 -65
  108. package/cjs/ops/OAuth2ClientOps.js.map +1 -1
  109. package/cjs/ops/OAuth2ClientOps.test.js.map +1 -1
  110. package/cjs/ops/OAuth2ProviderOps.js +20 -13
  111. package/cjs/ops/OAuth2ProviderOps.js.map +1 -1
  112. package/cjs/ops/OpsTypes.js.map +1 -1
  113. package/cjs/ops/OrganizationOps.js +67 -12
  114. package/cjs/ops/OrganizationOps.js.map +1 -1
  115. package/cjs/ops/PolicyOps.js +476 -136
  116. package/cjs/ops/PolicyOps.js.map +1 -1
  117. package/cjs/ops/PolicyOps.test.js.map +1 -1
  118. package/cjs/ops/PolicySetOps.js +402 -132
  119. package/cjs/ops/PolicySetOps.js.map +1 -1
  120. package/cjs/ops/PolicySetOps.test.js.map +1 -1
  121. package/cjs/ops/RealmOps.js +119 -84
  122. package/cjs/ops/RealmOps.js.map +1 -1
  123. package/cjs/ops/ResourceTypeOps.js +348 -95
  124. package/cjs/ops/ResourceTypeOps.js.map +1 -1
  125. package/cjs/ops/ResourceTypeOps.test.js.map +1 -1
  126. package/cjs/ops/Saml2Ops.js +407 -145
  127. package/cjs/ops/Saml2Ops.js.map +1 -1
  128. package/cjs/ops/Saml2Ops.test.js.map +1 -1
  129. package/cjs/ops/ScriptOps.js +256 -79
  130. package/cjs/ops/ScriptOps.js.map +1 -1
  131. package/cjs/ops/ScriptOps.test.js.map +1 -1
  132. package/cjs/ops/ServiceOps.js +328 -55
  133. package/cjs/ops/ServiceOps.js.map +1 -1
  134. package/cjs/ops/ThemeOps.js +349 -54
  135. package/cjs/ops/ThemeOps.js.map +1 -1
  136. package/cjs/ops/ThemeOps.test.js.map +1 -1
  137. package/cjs/ops/cloud/FeatureOps.js +57 -12
  138. package/cjs/ops/cloud/FeatureOps.js.map +1 -1
  139. package/cjs/ops/cloud/LogOps.js +136 -6
  140. package/cjs/ops/cloud/LogOps.js.map +1 -1
  141. package/cjs/ops/cloud/SecretsOps.js +230 -289
  142. package/cjs/ops/cloud/SecretsOps.js.map +1 -1
  143. package/cjs/ops/cloud/ServiceAccountOps.js +101 -18
  144. package/cjs/ops/cloud/ServiceAccountOps.js.map +1 -1
  145. package/cjs/ops/cloud/ServiceAccountOps.test.js.map +1 -1
  146. package/cjs/ops/cloud/StartupOps.js +64 -9
  147. package/cjs/ops/cloud/StartupOps.js.map +1 -1
  148. package/cjs/ops/cloud/VariablesOps.js +100 -175
  149. package/cjs/ops/cloud/VariablesOps.js.map +1 -1
  150. package/cjs/ops/utils/Console.js +9 -10
  151. package/cjs/ops/utils/Console.js.map +1 -1
  152. package/cjs/ops/utils/DataProtection.js +2 -2
  153. package/cjs/ops/utils/DataProtection.js.map +1 -1
  154. package/cjs/ops/utils/ExportImportUtils.js +35 -13
  155. package/cjs/ops/utils/ExportImportUtils.js.map +1 -1
  156. package/cjs/ops/utils/OpsUtils.js +7 -5
  157. package/cjs/ops/utils/OpsUtils.js.map +1 -1
  158. package/cjs/ops/utils/OpsUtils.test.js.map +1 -1
  159. package/cjs/ops/utils/{ValidationUtils.js → ScriptValidationUtils.js} +1 -1
  160. package/cjs/ops/utils/ScriptValidationUtils.js.map +1 -0
  161. package/cjs/ops/utils/ScriptValidationUtils.test.js.map +1 -0
  162. package/cjs/ops/utils/Version.js +9 -2
  163. package/cjs/ops/utils/Version.js.map +1 -1
  164. package/cjs/shared/State.js +455 -210
  165. package/cjs/shared/State.js.map +1 -1
  166. package/cjs/shared/State.test.js.map +1 -1
  167. package/cjs/utils/AutoSetupPolly.js +4 -1
  168. package/cjs/utils/AutoSetupPolly.js.map +1 -1
  169. package/esm/api/AgentApi.mjs +75 -27
  170. package/esm/api/AgentApi.test.mjs +319 -71
  171. package/esm/api/AuthenticateApi.mjs +15 -4
  172. package/esm/api/AuthenticateApi.test.mjs +27 -8
  173. package/esm/api/BaseApi.mjs +43 -19
  174. package/esm/api/CirclesOfTrustApi.mjs +39 -17
  175. package/esm/api/IdmConfigApi.mjs +44 -13
  176. package/esm/api/IdmSystemApi.mjs +7 -3
  177. package/esm/api/ManagedObjectApi.mjs +44 -20
  178. package/esm/api/NodeApi.mjs +59 -24
  179. package/esm/api/NodeApi.test.mjs +158 -40
  180. package/esm/api/OAuth2ClientApi.mjs +36 -15
  181. package/esm/api/OAuth2OIDCApi.mjs +69 -20
  182. package/esm/api/OAuth2OIDCApi.test.mjs +21 -3
  183. package/esm/api/OAuth2ProviderApi.mjs +8 -6
  184. package/esm/api/PoliciesApi.mjs +45 -16
  185. package/esm/api/PoliciesApi.test.mjs +63 -15
  186. package/esm/api/PolicySetApi.mjs +44 -16
  187. package/esm/api/PolicySetApi.test.mjs +48 -12
  188. package/esm/api/RealmApi.mjs +65 -24
  189. package/esm/api/ResourceTypesApi.mjs +56 -21
  190. package/esm/api/ResourceTypesApi.test.mjs +58 -14
  191. package/esm/api/Saml2Api.mjs +75 -89
  192. package/esm/api/ScriptApi.mjs +45 -17
  193. package/esm/api/ServerInfoApi.mjs +19 -6
  194. package/esm/api/ServiceApi.mjs +77 -26
  195. package/esm/api/SocialIdentityProvidersApi.mjs +58 -23
  196. package/esm/api/TreeApi.mjs +36 -15
  197. package/esm/api/TreeApi.test.mjs +129 -34
  198. package/esm/api/cloud/EnvInfoApi.mjs +8 -3
  199. package/esm/api/cloud/FeatureApi.mjs +7 -3
  200. package/esm/api/cloud/LogApi.mjs +38 -11
  201. package/esm/api/cloud/SecretsApi.mjs +89 -21
  202. package/esm/api/cloud/SecretsApi.test.mjs +193 -50
  203. package/esm/api/cloud/StartupApi.mjs +17 -6
  204. package/esm/api/cloud/StartupApi.test.mjs +28 -11
  205. package/esm/api/cloud/VariablesApi.mjs +43 -14
  206. package/esm/api/cloud/VariablesApi.test.mjs +124 -33
  207. package/esm/api/utils/ApiUtils.mjs +2 -4
  208. package/esm/api/utils/ApiUtils.test.mjs +14 -6
  209. package/esm/index.mjs +3 -4
  210. package/esm/lib/FrodoLib.mjs +127 -0
  211. package/esm/ops/AdminOps.mjs +500 -71
  212. package/esm/ops/AgentOps.mjs +773 -81
  213. package/esm/ops/AgentOps.test.mjs +296 -113
  214. package/esm/ops/AuthenticateOps.mjs +136 -64
  215. package/esm/ops/AuthenticateOps.test.mjs +7 -4
  216. package/esm/ops/CirclesOfTrustOps.mjs +278 -229
  217. package/esm/ops/ConnectionProfileOps.mjs +206 -35
  218. package/esm/ops/ConnectionProfileOps.test.mjs +25 -5
  219. package/esm/ops/EmailTemplateOps.mjs +66 -6
  220. package/esm/ops/EmailTemplateOps.test.mjs +32 -11
  221. package/esm/ops/IdmOps.mjs +60 -47
  222. package/esm/ops/IdmOps.test.mjs +54 -18
  223. package/esm/ops/IdpOps.mjs +227 -31
  224. package/esm/ops/IdpOps.test.mjs +57 -20
  225. package/esm/ops/InfoOps.mjs +36 -23
  226. package/esm/ops/JoseOps.test.mjs +8 -0
  227. package/esm/ops/JourneyOps.mjs +634 -96
  228. package/esm/ops/JourneyOps.test.mjs +73 -31
  229. package/esm/ops/ManagedObjectOps.mjs +66 -10
  230. package/esm/ops/NodeOps.mjs +108 -85
  231. package/esm/ops/OAuth2ClientOps.mjs +258 -42
  232. package/esm/ops/OAuth2ClientOps.test.mjs +80 -29
  233. package/esm/ops/OAuth2ProviderOps.mjs +11 -8
  234. package/esm/ops/OrganizationOps.mjs +56 -8
  235. package/esm/ops/PolicyOps.mjs +379 -93
  236. package/esm/ops/PolicyOps.test.mjs +180 -65
  237. package/esm/ops/PolicySetOps.mjs +311 -88
  238. package/esm/ops/PolicySetOps.test.mjs +108 -39
  239. package/esm/ops/RealmOps.mjs +85 -65
  240. package/esm/ops/ResourceTypeOps.mjs +268 -61
  241. package/esm/ops/ResourceTypeOps.test.mjs +113 -27
  242. package/esm/ops/Saml2Ops.mjs +346 -106
  243. package/esm/ops/Saml2Ops.test.mjs +117 -81
  244. package/esm/ops/ScriptOps.mjs +202 -56
  245. package/esm/ops/ScriptOps.test.mjs +64 -23
  246. package/esm/ops/ServiceOps.mjs +258 -27
  247. package/esm/ops/ThemeOps.mjs +300 -33
  248. package/esm/ops/ThemeOps.test.mjs +197 -47
  249. package/esm/ops/cloud/FeatureOps.mjs +45 -10
  250. package/esm/ops/cloud/LogOps.mjs +117 -4
  251. package/esm/ops/cloud/SecretsOps.mjs +123 -204
  252. package/esm/ops/cloud/ServiceAccountOps.mjs +85 -15
  253. package/esm/ops/cloud/ServiceAccountOps.test.mjs +16 -6
  254. package/esm/ops/cloud/StartupOps.mjs +49 -6
  255. package/esm/ops/cloud/VariablesOps.mjs +58 -120
  256. package/esm/ops/utils/Console.mjs +9 -8
  257. package/esm/ops/utils/DataProtection.mjs +2 -3
  258. package/esm/ops/utils/ExportImportUtils.mjs +28 -8
  259. package/esm/ops/utils/OpsUtils.mjs +4 -3
  260. package/esm/ops/utils/OpsUtils.test.mjs +21 -5
  261. package/esm/ops/utils/{ValidationUtils.mjs → ScriptValidationUtils.mjs} +1 -1
  262. package/esm/ops/utils/{ValidationUtils.test.mjs → ScriptValidationUtils.test.mjs} +2 -2
  263. package/esm/ops/utils/Version.mjs +8 -2
  264. package/esm/shared/State.mjs +459 -145
  265. package/esm/shared/State.test.mjs +8 -0
  266. package/esm/utils/AutoSetupPolly.mjs +4 -1
  267. package/package.json +1 -1
  268. package/types/api/AgentApi.d.ts +37 -8
  269. package/types/api/AgentApi.d.ts.map +1 -1
  270. package/types/api/ApiTypes.d.ts +12 -0
  271. package/types/api/ApiTypes.d.ts.map +1 -1
  272. package/types/api/AuthenticateApi.d.ts +13 -3
  273. package/types/api/AuthenticateApi.d.ts.map +1 -1
  274. package/types/api/BaseApi.d.ts +36 -7
  275. package/types/api/BaseApi.d.ts.map +1 -1
  276. package/types/api/CirclesOfTrustApi.d.ts +21 -7
  277. package/types/api/CirclesOfTrustApi.d.ts.map +1 -1
  278. package/types/api/IdmConfigApi.d.ts +28 -13
  279. package/types/api/IdmConfigApi.d.ts.map +1 -1
  280. package/types/api/IdmSystemApi.d.ts +4 -1
  281. package/types/api/IdmSystemApi.d.ts.map +1 -1
  282. package/types/api/ManagedObjectApi.d.ts +25 -10
  283. package/types/api/ManagedObjectApi.d.ts.map +1 -1
  284. package/types/api/NodeApi.d.ts +31 -9
  285. package/types/api/NodeApi.d.ts.map +1 -1
  286. package/types/api/OAuth2ClientApi.d.ts +18 -5
  287. package/types/api/OAuth2ClientApi.d.ts.map +1 -1
  288. package/types/api/OAuth2OIDCApi.d.ts +45 -11
  289. package/types/api/OAuth2OIDCApi.d.ts.map +1 -1
  290. package/types/api/OAuth2ProviderApi.d.ts +4 -1
  291. package/types/api/OAuth2ProviderApi.d.ts.map +1 -1
  292. package/types/api/PoliciesApi.d.ts +21 -5
  293. package/types/api/PoliciesApi.d.ts.map +1 -1
  294. package/types/api/PolicySetApi.d.ts +20 -5
  295. package/types/api/PolicySetApi.d.ts.map +1 -1
  296. package/types/api/RealmApi.d.ts +26 -10
  297. package/types/api/RealmApi.d.ts.map +1 -1
  298. package/types/api/ResourceTypesApi.d.ts +27 -8
  299. package/types/api/ResourceTypesApi.d.ts.map +1 -1
  300. package/types/api/Saml2Api.d.ts +39 -32
  301. package/types/api/Saml2Api.d.ts.map +1 -1
  302. package/types/api/ScriptApi.d.ts +21 -5
  303. package/types/api/ScriptApi.d.ts.map +1 -1
  304. package/types/api/ServerInfoApi.d.ts +9 -2
  305. package/types/api/ServerInfoApi.d.ts.map +1 -1
  306. package/types/api/ServiceApi.d.ts +41 -7
  307. package/types/api/ServiceApi.d.ts.map +1 -1
  308. package/types/api/SocialIdentityProvidersApi.d.ts +30 -8
  309. package/types/api/SocialIdentityProvidersApi.d.ts.map +1 -1
  310. package/types/api/TreeApi.d.ts +18 -4
  311. package/types/api/TreeApi.d.ts.map +1 -1
  312. package/types/api/cloud/EnvInfoApi.d.ts +4 -1
  313. package/types/api/cloud/EnvInfoApi.d.ts.map +1 -1
  314. package/types/api/cloud/FeatureApi.d.ts +4 -1
  315. package/types/api/cloud/FeatureApi.d.ts.map +1 -1
  316. package/types/api/cloud/LogApi.d.ts +24 -6
  317. package/types/api/cloud/LogApi.d.ts.map +1 -1
  318. package/types/api/cloud/SecretsApi.d.ts +50 -10
  319. package/types/api/cloud/SecretsApi.d.ts.map +1 -1
  320. package/types/api/cloud/StartupApi.d.ts +7 -2
  321. package/types/api/cloud/StartupApi.d.ts.map +1 -1
  322. package/types/api/cloud/VariablesApi.d.ts +23 -5
  323. package/types/api/cloud/VariablesApi.d.ts.map +1 -1
  324. package/types/api/utils/ApiUtils.d.ts +3 -2
  325. package/types/api/utils/ApiUtils.d.ts.map +1 -1
  326. package/types/index.d.ts +2 -2
  327. package/types/index.d.ts.map +1 -1
  328. package/types/lib/FrodoLib.d.ts +95 -0
  329. package/types/lib/FrodoLib.d.ts.map +1 -0
  330. package/types/ops/AdminOps.d.ts +71 -12
  331. package/types/ops/AdminOps.d.ts.map +1 -1
  332. package/types/ops/AgentOps.d.ts +345 -36
  333. package/types/ops/AgentOps.d.ts.map +1 -1
  334. package/types/ops/AuthenticateOps.d.ts +18 -5
  335. package/types/ops/AuthenticateOps.d.ts.map +1 -1
  336. package/types/ops/CirclesOfTrustOps.d.ts +76 -26
  337. package/types/ops/CirclesOfTrustOps.d.ts.map +1 -1
  338. package/types/ops/ConnectionProfileOps.d.ts +88 -9
  339. package/types/ops/ConnectionProfileOps.d.ts.map +1 -1
  340. package/types/ops/EmailTemplateOps.d.ts +36 -3
  341. package/types/ops/EmailTemplateOps.d.ts.map +1 -1
  342. package/types/ops/IdmOps.d.ts +28 -40
  343. package/types/ops/IdmOps.d.ts.map +1 -1
  344. package/types/ops/IdpOps.d.ts +88 -10
  345. package/types/ops/IdpOps.d.ts.map +1 -1
  346. package/types/ops/InfoOps.d.ts +12 -1
  347. package/types/ops/InfoOps.d.ts.map +1 -1
  348. package/types/ops/JourneyOps.d.ts +237 -34
  349. package/types/ops/JourneyOps.d.ts.map +1 -1
  350. package/types/ops/ManagedObjectOps.d.ts +37 -8
  351. package/types/ops/ManagedObjectOps.d.ts.map +1 -1
  352. package/types/ops/NodeOps.d.ts +61 -6
  353. package/types/ops/NodeOps.d.ts.map +1 -1
  354. package/types/ops/OAuth2ClientOps.d.ts +104 -10
  355. package/types/ops/OAuth2ClientOps.d.ts.map +1 -1
  356. package/types/ops/OAuth2ProviderOps.d.ts +8 -5
  357. package/types/ops/OAuth2ProviderOps.d.ts.map +1 -1
  358. package/types/ops/OpsTypes.d.ts +12 -1
  359. package/types/ops/OpsTypes.d.ts.map +1 -1
  360. package/types/ops/OrganizationOps.d.ts +24 -3
  361. package/types/ops/OrganizationOps.d.ts.map +1 -1
  362. package/types/ops/PolicyOps.d.ts +103 -28
  363. package/types/ops/PolicyOps.d.ts.map +1 -1
  364. package/types/ops/PolicySetOps.d.ts +76 -30
  365. package/types/ops/PolicySetOps.d.ts.map +1 -1
  366. package/types/ops/RealmOps.d.ts +34 -14
  367. package/types/ops/RealmOps.d.ts.map +1 -1
  368. package/types/ops/ResourceTypeOps.d.ts +116 -29
  369. package/types/ops/ResourceTypeOps.d.ts.map +1 -1
  370. package/types/ops/Saml2Ops.d.ts +124 -41
  371. package/types/ops/Saml2Ops.d.ts.map +1 -1
  372. package/types/ops/ScriptOps.d.ts +88 -23
  373. package/types/ops/ScriptOps.d.ts.map +1 -1
  374. package/types/ops/ServiceOps.d.ts +94 -8
  375. package/types/ops/ServiceOps.d.ts.map +1 -1
  376. package/types/ops/ThemeOps.d.ts +113 -9
  377. package/types/ops/ThemeOps.d.ts.map +1 -1
  378. package/types/ops/cloud/FeatureOps.d.ts +23 -2
  379. package/types/ops/cloud/FeatureOps.d.ts.map +1 -1
  380. package/types/ops/cloud/LogOps.d.ts +61 -3
  381. package/types/ops/cloud/LogOps.d.ts.map +1 -1
  382. package/types/ops/cloud/SecretsOps.d.ts +77 -63
  383. package/types/ops/cloud/SecretsOps.d.ts.map +1 -1
  384. package/types/ops/cloud/ServiceAccountOps.d.ts +48 -3
  385. package/types/ops/cloud/ServiceAccountOps.d.ts.map +1 -1
  386. package/types/ops/cloud/StartupOps.d.ts +25 -2
  387. package/types/ops/cloud/StartupOps.d.ts.map +1 -1
  388. package/types/ops/cloud/VariablesOps.d.ts +39 -39
  389. package/types/ops/cloud/VariablesOps.d.ts.map +1 -1
  390. package/types/ops/utils/Console.d.ts.map +1 -1
  391. package/types/ops/utils/DataProtection.d.ts +1 -1
  392. package/types/ops/utils/DataProtection.d.ts.map +1 -1
  393. package/types/ops/utils/ExportImportUtils.d.ts +29 -11
  394. package/types/ops/utils/ExportImportUtils.d.ts.map +1 -1
  395. package/types/ops/utils/OpsUtils.d.ts +4 -1
  396. package/types/ops/utils/OpsUtils.d.ts.map +1 -1
  397. package/types/ops/utils/ScriptValidationUtils.d.ts.map +1 -0
  398. package/types/ops/utils/Version.d.ts +5 -1
  399. package/types/ops/utils/Version.d.ts.map +1 -1
  400. package/types/shared/State.d.ts +80 -177
  401. package/types/shared/State.d.ts.map +1 -1
  402. package/types/utils/AutoSetupPolly.d.ts.map +1 -1
  403. package/cjs/ops/utils/ValidationUtils.js.map +0 -1
  404. package/cjs/ops/utils/ValidationUtils.test.js.map +0 -1
  405. package/types/ops/utils/ValidationUtils.d.ts.map +0 -1
  406. /package/types/ops/utils/{ValidationUtils.d.ts → ScriptValidationUtils.d.ts} +0 -0
@@ -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 _state = {
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 const setHost = host => _state.host = host;
50
- export const getHost = () => _state.host || process.env.FRODO_HOST;
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
- * @deprecated since v0.17.0 use `setHost(host: string)` instead
54
- */
55
- export const setTenant = setHost;
56
- /**
57
- * @deprecated since v0.17.0 use `getHost` instead
58
- */
59
- export const getTenant = getHost;
60
- export const setUsername = username => _state.username = username;
61
- export const getUsername = () => _state.username || process.env.FRODO_USERNAME;
62
- export const setPassword = password => _state.password = password;
63
- export const getPassword = () => _state.password || process.env.FRODO_PASSWORD;
64
- export const setRealm = realm => _state.realm = realm;
65
- export const getRealm = () => _state.realm || process.env.FRODO_REALM;
66
- export const setDeploymentType = type => _state.deploymentType = type;
67
- export const getDeploymentType = () => _state.deploymentType;
68
- export const setAllowInsecureConnection = allowInsecureConnection => _state.allowInsecureConnection = allowInsecureConnection;
69
- export const getAllowInsecureConnection = () => _state['allowInsecureConnection'];
70
- export const setCookieName = name => _state.cookieName = name;
71
- export const getCookieName = () => _state.cookieName;
72
- export const setCookieValue = value => _state.cookieValue = value;
73
- export const getCookieValue = () => _state.cookieValue;
74
- export const setAuthenticationHeaderOverrides = overrides => _state.authenticationHeaderOverrides = overrides;
75
- export const getAuthenticationHeaderOverrides = () => _state.authenticationHeaderOverrides;
76
- export const setAuthenticationService = service => _state.authenticationService = service;
77
- export const getAuthenticationService = () => _state.authenticationService || process.env.FRODO_AUTHENTICATION_SERVICE;
78
- export const setServiceAccountId = uuid => _state.serviceAccountId = uuid;
79
- export const getServiceAccountId = () => _state.serviceAccountId || process.env.FRODO_SA_ID;
80
- export const setServiceAccountJwk = jwk => _state.serviceAccountJwk = {
81
- ...jwk
82
- };
83
- export const getServiceAccountJwk = () => _state.serviceAccountJwk || (process.env.FRODO_SA_JWK ? JSON.parse(process.env.FRODO_SA_JWK) : undefined);
84
- export const setUseBearerTokenForAmApis = useBearerTokenForAmApis => _state.useBearerTokenForAmApis = useBearerTokenForAmApis;
85
- export const getUseBearerTokenForAmApis = () => _state.useBearerTokenForAmApis;
86
- export const setBearerToken = token => _state.bearerToken = token;
87
- export const getBearerToken = () => _state.bearerToken;
88
- export const setLogApiKey = key => _state.logApiKey = key;
89
- export const getLogApiKey = () => _state.logApiKey || process.env.FRODO_LOG_KEY;
90
- export const setLogApiSecret = secret => _state.logApiSecret = secret;
91
- export const getLogApiSecret = () => _state.logApiSecret || process.env.FRODO_LOG_SECRET;
92
- export const setAmVersion = version => _state.amVersion = version;
93
- export const getAmVersion = () => _state.amVersion;
94
- export const setFrodoVersion = version => _state.frodoVersion = version;
95
- export const getFrodoVersion = () => _state.frodoVersion || `v${pkg.version} [${process.version}]`;
96
- export const setConnectionProfilesPath = path => _state.connectionProfilesPath = path;
97
- export const getConnectionProfilesPath = () => _state.connectionProfilesPath;
98
- export const setMasterKeyPath = path => _state.masterKeyPath = path;
99
- export const getMasterKeyPath = () => _state.masterKeyPath;
100
- export const setOutputFile = file => _state.outputFile = file;
101
- export const getOutputFile = () => _state.outputFile;
102
- export const setDirectory = directory => _state.directory = directory;
103
- export const getDirectory = () => _state.directory;
104
- export const setPrintHandler = handler => _state.printHandler = handler;
105
- export const getPrintHandler = () => _state.printHandler;
106
- export const setVerboseHandler = handler => _state.verboseHandler = handler;
107
- export const getVerboseHandler = () => _state.verboseHandler;
108
- export const setVerbose = verbose => _state.verbose = verbose;
109
- export const getVerbose = () => _state.verbose;
110
- export const setDebugHandler = handler => _state.debugHandler = handler;
111
- export const getDebugHandler = () => _state.debugHandler;
112
- export const setDebug = debug => _state.debug = debug;
113
- export const getDebug = () => _state.debug || process.env.FRODO_DEBUG !== undefined;
114
- export const setCurlirizeHandler = handler => _state.curlirizeHandler = handler;
115
- export const getCurlirizeHandler = () => _state.curlirizeHandler;
116
- export const setCurlirize = curlirize => _state.curlirize = curlirize;
117
- export const getCurlirize = () => _state.curlirize;
118
- export const setCreateProgressHandler = handler => _state.createProgressHandler = handler;
119
- export const getCreateProgressHandler = () => _state.createProgressHandler;
120
- export const setUpdateProgressHandler = handler => _state.updateProgressHandler = handler;
121
- export const getUpdateProgressHandler = () => _state.updateProgressHandler;
122
- export const setStopProgressHandler = handler => _state.stopProgressHandler = handler;
123
- export const getStopProgressHandler = () => _state.stopProgressHandler;
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
- session: {
136
- setHost,
137
- getHost,
138
- setTenant,
139
- getTenant,
140
- setUsername,
141
- getUsername,
142
- setPassword,
143
- getPassword,
144
- setRealm,
145
- getRealm,
146
- setDeploymentType,
147
- getDeploymentType,
148
- setAllowInsecureConnection,
149
- getAllowInsecureConnection,
150
- setCookieName,
151
- getCookieName,
152
- setCookieValue,
153
- getCookieValue,
154
- setAuthenticationHeaderOverrides,
155
- getAuthenticationHeaderOverrides,
156
- setAuthenticationService,
157
- getAuthenticationService,
158
- setServiceAccountId,
159
- getServiceAccountId,
160
- setServiceAccountJwk,
161
- getServiceAccountJwk,
162
- setUseBearerTokenForAmApis,
163
- getUseBearerTokenForAmApis,
164
- setBearerToken,
165
- getBearerToken,
166
- setLogApiKey,
167
- getLogApiKey,
168
- setLogApiSecret,
169
- getLogApiSecret,
170
- setAmVersion,
171
- getAmVersion,
172
- setFrodoVersion,
173
- getFrodoVersion,
174
- setConnectionProfilesPath,
175
- getConnectionProfilesPath,
176
- setMasterKeyPath,
177
- getMasterKeyPath,
178
- setOutputFile,
179
- getOutputFile,
180
- setDirectory,
181
- getDirectory,
182
- setPrintHandler,
183
- getPrintHandler,
184
- setVerboseHandler,
185
- getVerboseHandler,
186
- setVerbose,
187
- getVerbose,
188
- setDebugHandler,
189
- getDebugHandler,
190
- setDebug,
191
- getDebug,
192
- setCurlirizeHandler,
193
- getCurlirizeHandler,
194
- setCurlirize,
195
- getCurlirize,
196
- setCreateProgressHandler,
197
- getCreateProgressHandler,
198
- setUpdateProgressHandler,
199
- getUpdateProgressHandler,
200
- setStopProgressHandler,
201
- getStopProgressHandler
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())) throw new Error(`Unable to record mock responses from '${state.getHost()}'`);
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rockcarver/frodo-lib",
3
- "version": "1.0.0",
3
+ "version": "2.0.0-1",
4
4
  "type": "commonjs",
5
5
  "main": "./cjs/index.js",
6
6
  "module": "./esm/index.mjs",