@ama-sdk/core 11.6.0-prerelease.2 → 11.6.0-prerelease.21

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 (316) hide show
  1. package/cjs/clients/api-angular-client.js +12 -4
  2. package/cjs/clients/api-beacon-client.js +1 -2
  3. package/cjs/clients/api-fetch-client.js +15 -24
  4. package/cjs/fwk/api.helper.spec.js +1 -1
  5. package/cjs/fwk/api.helpers.js +20 -24
  6. package/cjs/fwk/core/api-client.js +2 -1
  7. package/cjs/fwk/core/index.js +1 -1
  8. package/cjs/fwk/date.js +26 -27
  9. package/cjs/fwk/date.spec.js +4 -2
  10. package/cjs/fwk/ignore-enum.type.js +1 -2
  11. package/cjs/fwk/index.js +1 -1
  12. package/cjs/fwk/mocks/alf-mock-adapter.js +7 -6
  13. package/cjs/fwk/mocks/base-mock-adapter.js +3 -3
  14. package/cjs/fwk/mocks/helpers.js +15 -7
  15. package/cjs/fwk/mocks/index.js +3 -3
  16. package/cjs/fwk/{Reviver.js → reviver.js} +1 -2
  17. package/cjs/fwk/reviver.spec.js +9 -9
  18. package/cjs/plugins/additional-params/index.js +1 -1
  19. package/cjs/plugins/bot-protection-fingerprint/bot-protection-fingerprint.request.js +3 -3
  20. package/cjs/plugins/bot-protection-fingerprint/bot-protection-fingerprint.spec.js +7 -10
  21. package/cjs/plugins/client-facts/client-facts.request.js +5 -5
  22. package/cjs/plugins/concurrent/concurrent.fetch.js +5 -9
  23. package/cjs/plugins/core/index.js +2 -2
  24. package/cjs/plugins/custom-info/custom-info.reply.js +2 -2
  25. package/cjs/plugins/exception/exception.spec.js +1 -1
  26. package/cjs/plugins/fetch-cache/fetch-cache.request.js +1 -1
  27. package/cjs/plugins/fetch-credentials/fetch-credentials.spec.js +4 -4
  28. package/cjs/plugins/json-token/json-token.reply.js +6 -6
  29. package/cjs/plugins/json-token/json-token.request.js +1 -1
  30. package/cjs/plugins/json-token/json-token.spec.js +7 -9
  31. package/cjs/plugins/mgw-mdw-auth/mgw-mdw-auth.spec.js +0 -2
  32. package/cjs/plugins/mock-intercept/index.js +1 -1
  33. package/cjs/plugins/mock-intercept/mock-intercept.angular.js +4 -4
  34. package/cjs/plugins/mock-intercept/mock-intercept.fetch.js +0 -2
  35. package/cjs/plugins/mock-intercept/mock-intercept.spec.js +5 -4
  36. package/cjs/plugins/perf-metric/perf-metric.fetch.js +10 -2
  37. package/cjs/plugins/pii-tokenizer/pii-tokenizer.request.js +5 -11
  38. package/cjs/plugins/pii-tokenizer/pii-tokenizer.spec.js +5 -6
  39. package/cjs/plugins/retry/retry.fetch.js +17 -32
  40. package/cjs/plugins/retry/retry.spec.js +4 -4
  41. package/cjs/plugins/session-id/session-id.request.js +4 -4
  42. package/cjs/plugins/session-id/session-id.spec.js +2 -2
  43. package/cjs/plugins/simple-api-key-authentication/simple-api-key-authentication.spec.js +1 -1
  44. package/cjs/plugins/timeout/timeout.fetch.js +14 -6
  45. package/cjs/plugins/wait-for/wait-for.fetch.js +3 -3
  46. package/cjs/plugins/wait-for/wait-for.spec.js +1 -1
  47. package/cjs/utils/crypto.js +7 -7
  48. package/cjs/utils/encoder.js +9 -17
  49. package/cjs/utils/generic-api.js +1 -2
  50. package/cjs/utils/ie11.js +1 -0
  51. package/cjs/utils/index.js +1 -1
  52. package/cjs/utils/json-token.js +7 -7
  53. package/cjs/utils/json-token.spec.js +14 -11
  54. package/cjs/utils/mime-types.js +1 -1
  55. package/esm2015/clients/api-angular-client.js +12 -4
  56. package/esm2015/clients/api-beacon-client.js +1 -2
  57. package/esm2015/clients/api-fetch-client.js +15 -24
  58. package/esm2015/fwk/api.helper.spec.js +1 -1
  59. package/esm2015/fwk/api.helpers.js +24 -30
  60. package/esm2015/fwk/core/api-client.js +2 -1
  61. package/esm2015/fwk/core/index.js +1 -1
  62. package/esm2015/fwk/date.js +30 -29
  63. package/esm2015/fwk/date.spec.js +4 -2
  64. package/esm2015/fwk/ignore-enum.type.js +1 -2
  65. package/esm2015/fwk/index.js +1 -1
  66. package/esm2015/fwk/mocks/alf-mock-adapter.js +7 -6
  67. package/esm2015/fwk/mocks/base-mock-adapter.js +3 -3
  68. package/esm2015/fwk/mocks/helpers.js +15 -7
  69. package/esm2015/fwk/mocks/index.js +3 -3
  70. package/esm2015/fwk/{Reviver.js → reviver.js} +2 -2
  71. package/esm2015/fwk/reviver.spec.js +1 -1
  72. package/esm2015/plugins/additional-params/index.js +1 -1
  73. package/esm2015/plugins/bot-protection-fingerprint/bot-protection-fingerprint.request.js +3 -3
  74. package/esm2015/plugins/bot-protection-fingerprint/bot-protection-fingerprint.spec.js +7 -10
  75. package/esm2015/plugins/client-facts/client-facts.request.js +5 -5
  76. package/esm2015/plugins/concurrent/concurrent.fetch.js +5 -9
  77. package/esm2015/plugins/core/index.js +2 -2
  78. package/esm2015/plugins/custom-info/custom-info.reply.js +2 -2
  79. package/esm2015/plugins/exception/exception.spec.js +1 -1
  80. package/esm2015/plugins/fetch-cache/fetch-cache.request.js +1 -1
  81. package/esm2015/plugins/fetch-credentials/fetch-credentials.spec.js +4 -4
  82. package/esm2015/plugins/json-token/json-token.reply.js +6 -6
  83. package/esm2015/plugins/json-token/json-token.request.js +1 -1
  84. package/esm2015/plugins/json-token/json-token.spec.js +7 -9
  85. package/esm2015/plugins/mgw-mdw-auth/mgw-mdw-auth.spec.js +0 -2
  86. package/esm2015/plugins/mock-intercept/index.js +1 -1
  87. package/esm2015/plugins/mock-intercept/mock-intercept.angular.js +4 -4
  88. package/esm2015/plugins/mock-intercept/mock-intercept.fetch.js +0 -2
  89. package/esm2015/plugins/mock-intercept/mock-intercept.spec.js +5 -4
  90. package/esm2015/plugins/perf-metric/perf-metric.fetch.js +10 -2
  91. package/esm2015/plugins/pii-tokenizer/pii-tokenizer.request.js +5 -11
  92. package/esm2015/plugins/pii-tokenizer/pii-tokenizer.spec.js +5 -6
  93. package/esm2015/plugins/retry/retry.fetch.js +17 -32
  94. package/esm2015/plugins/retry/retry.spec.js +4 -4
  95. package/esm2015/plugins/session-id/session-id.request.js +4 -4
  96. package/esm2015/plugins/session-id/session-id.spec.js +2 -2
  97. package/esm2015/plugins/simple-api-key-authentication/simple-api-key-authentication.spec.js +1 -1
  98. package/esm2015/plugins/timeout/timeout.fetch.js +15 -8
  99. package/esm2015/plugins/wait-for/wait-for.fetch.js +3 -3
  100. package/esm2015/plugins/wait-for/wait-for.spec.js +1 -1
  101. package/esm2015/utils/crypto.js +7 -7
  102. package/esm2015/utils/encoder.js +9 -17
  103. package/esm2015/utils/generic-api.js +1 -2
  104. package/esm2015/utils/ie11.js +1 -0
  105. package/esm2015/utils/index.js +1 -1
  106. package/esm2015/utils/json-token.js +7 -7
  107. package/esm2015/utils/json-token.spec.js +8 -10
  108. package/esm2015/utils/mime-types.js +1 -1
  109. package/package.json +19 -13
  110. package/schematics/ng-add/index.d.ts.map +1 -1
  111. package/schematics/ng-add/index.js +24 -26
  112. package/schematics/ng-add/schema.d.ts.map +1 -1
  113. package/src/clients/api-angular-client.d.ts +2 -2
  114. package/src/clients/api-angular-client.d.ts.map +1 -1
  115. package/src/clients/api-angular-client.js +11 -9
  116. package/src/clients/api-angular-client.js.map +1 -1
  117. package/src/clients/api-beacon-client.d.ts +1 -1
  118. package/src/clients/api-beacon-client.d.ts.map +1 -1
  119. package/src/clients/api-beacon-client.js +2 -3
  120. package/src/clients/api-beacon-client.js.map +1 -1
  121. package/src/clients/api-fetch-client.d.ts +2 -2
  122. package/src/clients/api-fetch-client.d.ts.map +1 -1
  123. package/src/clients/api-fetch-client.js +14 -21
  124. package/src/clients/api-fetch-client.js.map +1 -1
  125. package/src/fwk/api.helpers.d.ts +6 -8
  126. package/src/fwk/api.helpers.d.ts.map +1 -1
  127. package/src/fwk/api.helpers.js +22 -31
  128. package/src/fwk/api.helpers.js.map +1 -1
  129. package/src/fwk/api.interface.d.ts.map +1 -1
  130. package/src/fwk/core/api-client.d.ts +3 -3
  131. package/src/fwk/core/api-client.d.ts.map +1 -1
  132. package/src/fwk/core/api-client.js +8 -7
  133. package/src/fwk/core/api-client.js.map +1 -1
  134. package/src/fwk/core/base-api-constructor.d.ts +1 -1
  135. package/src/fwk/core/base-api-constructor.d.ts.map +1 -1
  136. package/src/fwk/core/base-api-constructor.js.map +1 -1
  137. package/src/fwk/core/index.d.ts +1 -1
  138. package/src/fwk/core/index.d.ts.map +1 -1
  139. package/src/fwk/core/index.js +1 -1
  140. package/src/fwk/core/index.js.map +1 -1
  141. package/src/fwk/date.d.ts +6 -18
  142. package/src/fwk/date.d.ts.map +1 -1
  143. package/src/fwk/date.js +25 -28
  144. package/src/fwk/date.js.map +1 -1
  145. package/src/fwk/errors.d.ts.map +1 -1
  146. package/src/fwk/errors.js.map +1 -1
  147. package/src/fwk/ignore-enum.type.d.ts.map +1 -1
  148. package/src/fwk/index.d.ts +1 -1
  149. package/src/fwk/index.js +1 -1
  150. package/src/fwk/mocks/alf-mock-adapter.d.ts.map +1 -1
  151. package/src/fwk/mocks/alf-mock-adapter.js +11 -10
  152. package/src/fwk/mocks/alf-mock-adapter.js.map +1 -1
  153. package/src/fwk/mocks/base-mock-adapter.d.ts.map +1 -1
  154. package/src/fwk/mocks/base-mock-adapter.js +4 -4
  155. package/src/fwk/mocks/base-mock-adapter.js.map +1 -1
  156. package/src/fwk/mocks/encoded-api-request.d.ts +1 -1
  157. package/src/fwk/mocks/encoded-api-request.d.ts.map +1 -1
  158. package/src/fwk/mocks/helpers.d.ts.map +1 -1
  159. package/src/fwk/mocks/helpers.js +8 -7
  160. package/src/fwk/mocks/helpers.js.map +1 -1
  161. package/src/fwk/mocks/index.d.ts +3 -3
  162. package/src/fwk/mocks/index.d.ts.map +1 -1
  163. package/src/fwk/mocks/index.js +3 -3
  164. package/src/fwk/mocks/index.js.map +1 -1
  165. package/src/fwk/mocks/mock-adapter.d.ts +1 -1
  166. package/src/fwk/mocks/mock-adapter.d.ts.map +1 -1
  167. package/src/fwk/mocks/path-object.d.ts.map +1 -1
  168. package/src/fwk/mocks/random-mock-adapter.d.ts.map +1 -1
  169. package/src/fwk/mocks/random-mock-adapter.js +1 -1
  170. package/src/fwk/mocks/random-mock-adapter.js.map +1 -1
  171. package/src/fwk/mocks/sequential-mock-adapter.d.ts.map +1 -1
  172. package/src/fwk/mocks/sequential-mock-adapter.js +1 -1
  173. package/src/fwk/mocks/sequential-mock-adapter.js.map +1 -1
  174. package/src/fwk/{Reviver.d.ts → reviver.d.ts} +2 -1
  175. package/src/fwk/reviver.d.ts.map +1 -0
  176. package/src/fwk/{Reviver.js → reviver.js} +3 -3
  177. package/src/fwk/reviver.js.map +1 -0
  178. package/src/plugins/abort/abort.fetch.d.ts.map +1 -1
  179. package/src/plugins/abort/abort.fetch.js.map +1 -1
  180. package/src/plugins/additional-params/additional-params-sync.request.d.ts.map +1 -1
  181. package/src/plugins/additional-params/additional-params-sync.request.js +1 -1
  182. package/src/plugins/additional-params/additional-params-sync.request.js.map +1 -1
  183. package/src/plugins/additional-params/additional-params.request.d.ts.map +1 -1
  184. package/src/plugins/additional-params/additional-params.request.js.map +1 -1
  185. package/src/plugins/additional-params/index.d.ts +1 -1
  186. package/src/plugins/additional-params/index.d.ts.map +1 -1
  187. package/src/plugins/additional-params/index.js +1 -1
  188. package/src/plugins/additional-params/index.js.map +1 -1
  189. package/src/plugins/api-configuration-override/api-configuration-override.request.d.ts.map +1 -1
  190. package/src/plugins/api-configuration-override/api-configuration-override.request.js.map +1 -1
  191. package/src/plugins/api-key/api-key.request.d.ts.map +1 -1
  192. package/src/plugins/api-key/api-key.request.js.map +1 -1
  193. package/src/plugins/bot-protection-fingerprint/bot-protection-fingerprint.request.d.ts +10 -10
  194. package/src/plugins/bot-protection-fingerprint/bot-protection-fingerprint.request.d.ts.map +1 -1
  195. package/src/plugins/bot-protection-fingerprint/bot-protection-fingerprint.request.js +5 -5
  196. package/src/plugins/bot-protection-fingerprint/bot-protection-fingerprint.request.js.map +1 -1
  197. package/src/plugins/client-facts/client-facts.request.d.ts +1 -1
  198. package/src/plugins/client-facts/client-facts.request.d.ts.map +1 -1
  199. package/src/plugins/client-facts/client-facts.request.js +5 -5
  200. package/src/plugins/client-facts/client-facts.request.js.map +1 -1
  201. package/src/plugins/concurrent/concurrent.fetch.d.ts.map +1 -1
  202. package/src/plugins/concurrent/concurrent.fetch.js +1 -6
  203. package/src/plugins/concurrent/concurrent.fetch.js.map +1 -1
  204. package/src/plugins/core/angular-plugin.d.ts +1 -1
  205. package/src/plugins/core/angular-plugin.d.ts.map +1 -1
  206. package/src/plugins/core/fetch-plugin.d.ts.map +1 -1
  207. package/src/plugins/core/index.d.ts +2 -2
  208. package/src/plugins/core/index.d.ts.map +1 -1
  209. package/src/plugins/core/index.js +2 -2
  210. package/src/plugins/core/index.js.map +1 -1
  211. package/src/plugins/core/plugin.d.ts.map +1 -1
  212. package/src/plugins/core/reply-plugin.d.ts +1 -1
  213. package/src/plugins/core/reply-plugin.d.ts.map +1 -1
  214. package/src/plugins/core/request-plugin.d.ts.map +1 -1
  215. package/src/plugins/custom-info/custom-info.reply.d.ts.map +1 -1
  216. package/src/plugins/custom-info/custom-info.reply.js +1 -1
  217. package/src/plugins/custom-info/custom-info.reply.js.map +1 -1
  218. package/src/plugins/exception/exception.reply.d.ts +1 -0
  219. package/src/plugins/exception/exception.reply.d.ts.map +1 -1
  220. package/src/plugins/exception/exception.reply.js +6 -5
  221. package/src/plugins/exception/exception.reply.js.map +1 -1
  222. package/src/plugins/fetch-cache/fetch-cache.request.d.ts.map +1 -1
  223. package/src/plugins/fetch-cache/fetch-cache.request.js +3 -3
  224. package/src/plugins/fetch-cache/fetch-cache.request.js.map +1 -1
  225. package/src/plugins/fetch-credentials/fetch-credentials.request.d.ts.map +1 -1
  226. package/src/plugins/fetch-credentials/fetch-credentials.request.js.map +1 -1
  227. package/src/plugins/json-token/json-token.reply.d.ts.map +1 -1
  228. package/src/plugins/json-token/json-token.reply.js +6 -6
  229. package/src/plugins/json-token/json-token.reply.js.map +1 -1
  230. package/src/plugins/json-token/json-token.request.d.ts.map +1 -1
  231. package/src/plugins/json-token/json-token.request.js +1 -1
  232. package/src/plugins/json-token/json-token.request.js.map +1 -1
  233. package/src/plugins/keepalive/keepalive.request.d.ts.map +1 -1
  234. package/src/plugins/keepalive/keepalive.request.js +1 -1
  235. package/src/plugins/keepalive/keepalive.request.js.map +1 -1
  236. package/src/plugins/mgw-mdw-auth/mgw-mdw-auth.request.d.ts.map +1 -1
  237. package/src/plugins/mgw-mdw-auth/mgw-mdw-auth.request.js +3 -3
  238. package/src/plugins/mgw-mdw-auth/mgw-mdw-auth.request.js.map +1 -1
  239. package/src/plugins/mock-intercept/index.d.ts +1 -1
  240. package/src/plugins/mock-intercept/index.d.ts.map +1 -1
  241. package/src/plugins/mock-intercept/index.js +1 -1
  242. package/src/plugins/mock-intercept/index.js.map +1 -1
  243. package/src/plugins/mock-intercept/mock-intercept.angular.d.ts +1 -1
  244. package/src/plugins/mock-intercept/mock-intercept.angular.d.ts.map +1 -1
  245. package/src/plugins/mock-intercept/mock-intercept.angular.js +15 -11
  246. package/src/plugins/mock-intercept/mock-intercept.angular.js.map +1 -1
  247. package/src/plugins/mock-intercept/mock-intercept.fetch.d.ts.map +1 -1
  248. package/src/plugins/mock-intercept/mock-intercept.fetch.js +4 -6
  249. package/src/plugins/mock-intercept/mock-intercept.fetch.js.map +1 -1
  250. package/src/plugins/mock-intercept/mock-intercept.interface.d.ts +1 -1
  251. package/src/plugins/mock-intercept/mock-intercept.interface.d.ts.map +1 -1
  252. package/src/plugins/mock-intercept/mock-intercept.interface.js.map +1 -1
  253. package/src/plugins/mock-intercept/mock-intercept.request.d.ts.map +1 -1
  254. package/src/plugins/mock-intercept/mock-intercept.request.js +4 -3
  255. package/src/plugins/mock-intercept/mock-intercept.request.js.map +1 -1
  256. package/src/plugins/perf-metric/perf-metric.fetch.d.ts.map +1 -1
  257. package/src/plugins/perf-metric/perf-metric.fetch.js +4 -3
  258. package/src/plugins/perf-metric/perf-metric.fetch.js.map +1 -1
  259. package/src/plugins/pii-tokenizer/pii-tokenizer.request.d.ts.map +1 -1
  260. package/src/plugins/pii-tokenizer/pii-tokenizer.request.js +5 -10
  261. package/src/plugins/pii-tokenizer/pii-tokenizer.request.js.map +1 -1
  262. package/src/plugins/raw-response-info/raw-response-info.reply.d.ts +0 -1
  263. package/src/plugins/raw-response-info/raw-response-info.reply.d.ts.map +1 -1
  264. package/src/plugins/raw-response-info/raw-response-info.reply.js +0 -1
  265. package/src/plugins/raw-response-info/raw-response-info.reply.js.map +1 -1
  266. package/src/plugins/retry/retry.fetch.d.ts.map +1 -1
  267. package/src/plugins/retry/retry.fetch.js +5 -4
  268. package/src/plugins/retry/retry.fetch.js.map +1 -1
  269. package/src/plugins/reviver/reviver.reply.d.ts +1 -1
  270. package/src/plugins/reviver/reviver.reply.d.ts.map +1 -1
  271. package/src/plugins/reviver/reviver.reply.js.map +1 -1
  272. package/src/plugins/session-id/session-id.request.d.ts +1 -1
  273. package/src/plugins/session-id/session-id.request.d.ts.map +1 -1
  274. package/src/plugins/session-id/session-id.request.js +5 -3
  275. package/src/plugins/session-id/session-id.request.js.map +1 -1
  276. package/src/plugins/si-token/si-token.request.d.ts.map +1 -1
  277. package/src/plugins/si-token/si-token.request.js +1 -1
  278. package/src/plugins/si-token/si-token.request.js.map +1 -1
  279. package/src/plugins/simple-api-key-authentication/simple-api-key-authentication.request.d.ts.map +1 -1
  280. package/src/plugins/simple-api-key-authentication/simple-api-key-authentication.request.js +1 -1
  281. package/src/plugins/simple-api-key-authentication/simple-api-key-authentication.request.js.map +1 -1
  282. package/src/plugins/timeout/timeout.fetch.d.ts +1 -2
  283. package/src/plugins/timeout/timeout.fetch.d.ts.map +1 -1
  284. package/src/plugins/timeout/timeout.fetch.js +14 -12
  285. package/src/plugins/timeout/timeout.fetch.js.map +1 -1
  286. package/src/plugins/url-rewrite/url-rewrite.request.d.ts.map +1 -1
  287. package/src/plugins/url-rewrite/url-rewrite.request.js.map +1 -1
  288. package/src/plugins/wait-for/wait-for.fetch.d.ts.map +1 -1
  289. package/src/plugins/wait-for/wait-for.fetch.js +2 -2
  290. package/src/plugins/wait-for/wait-for.fetch.js.map +1 -1
  291. package/src/utils/crypto.d.ts.map +1 -1
  292. package/src/utils/crypto.js +7 -7
  293. package/src/utils/crypto.js.map +1 -1
  294. package/src/utils/encoder.d.ts +1 -1
  295. package/src/utils/encoder.d.ts.map +1 -1
  296. package/src/utils/encoder.js +22 -28
  297. package/src/utils/encoder.js.map +1 -1
  298. package/src/utils/generic-api.d.ts +1 -2
  299. package/src/utils/generic-api.d.ts.map +1 -1
  300. package/src/utils/generic-api.js +3 -6
  301. package/src/utils/generic-api.js.map +1 -1
  302. package/src/utils/ie11.d.ts.map +1 -1
  303. package/src/utils/ie11.js +1 -0
  304. package/src/utils/ie11.js.map +1 -1
  305. package/src/utils/index.d.ts +1 -1
  306. package/src/utils/index.d.ts.map +1 -1
  307. package/src/utils/index.js +1 -1
  308. package/src/utils/index.js.map +1 -1
  309. package/src/utils/json-token.d.ts.map +1 -1
  310. package/src/utils/json-token.js +12 -12
  311. package/src/utils/json-token.js.map +1 -1
  312. package/src/utils/mime-types.d.ts.map +1 -1
  313. package/src/utils/mime-types.js +1 -1
  314. package/src/utils/mime-types.js.map +1 -1
  315. package/src/fwk/Reviver.d.ts.map +0 -1
  316. package/src/fwk/Reviver.js.map +0 -1
@@ -170,15 +170,15 @@ function _ts_generator(thisArg, body) {
170
170
  }
171
171
  }
172
172
  import { createJwtEncoder } from '../../utils/json-token';
173
+ var jwtPayload = function(data) {
174
+ return _object_spread({
175
+ sub: 'fact'
176
+ }, data);
177
+ };
173
178
  /**
174
179
  * Creates a JWT encoding function which transforms the provided Facts as a unsecured JWT format https://tools.ietf.org/html/rfc7519#section-6
175
180
  */ export function createJwtFactsEncoder() {
176
181
  var jwtEncoder = createJwtEncoder();
177
- var jwtPayload = function(data) {
178
- return _object_spread({
179
- sub: 'fact'
180
- }, data);
181
- };
182
182
  return function(data) {
183
183
  return jwtEncoder(jwtPayload(data));
184
184
  };
@@ -182,7 +182,7 @@ function _ts_generator(thisArg, body) {
182
182
  value: /**
183
183
  * Unstack and resolve the promise stopping the call to start
184
184
  */ function unstackResolve() {
185
- if (this.canStart() && this.waitingResolvers.length) {
185
+ if (this.canStart() && this.waitingResolvers.length > 0) {
186
186
  this.waitingResolvers.shift()(true);
187
187
  }
188
188
  }
@@ -201,7 +201,7 @@ function _ts_generator(thisArg, body) {
201
201
  },
202
202
  transform: /*#__PURE__*/ function() {
203
203
  var _ref = _async_to_generator(function(fetchCall) {
204
- var fetchResponse, e;
204
+ var fetchResponse;
205
205
  return _ts_generator(this, function(_state) {
206
206
  switch(_state.label){
207
207
  case 0:
@@ -210,9 +210,9 @@ function _ts_generator(thisArg, body) {
210
210
  case 1:
211
211
  _state.trys.push([
212
212
  1,
213
+ ,
213
214
  3,
214
- 4,
215
- 5
215
+ 4
216
216
  ]);
217
217
  return [
218
218
  4,
@@ -225,10 +225,6 @@ function _ts_generator(thisArg, body) {
225
225
  fetchResponse
226
226
  ];
227
227
  case 3:
228
- e = _state.sent();
229
- throw e;
230
- case 4:
231
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
232
228
  _this1.pool = _this1.pool.filter(function(call) {
233
229
  return call !== fetchCall;
234
230
  });
@@ -237,7 +233,7 @@ function _ts_generator(thisArg, body) {
237
233
  return [
238
234
  7
239
235
  ];
240
- case 5:
236
+ case 4:
241
237
  return [
242
238
  2
243
239
  ];
@@ -1,4 +1,4 @@
1
- export * from './plugin';
2
1
  export * from './fetch-plugin';
3
- export * from './request-plugin';
2
+ export * from './plugin';
4
3
  export * from './reply-plugin';
4
+ export * from './request-plugin';
@@ -45,8 +45,7 @@ function _define_property(obj, key, value) {
45
45
  value: /**
46
46
  * Checks if the reply has a customInfo node
47
47
  * @param reply
48
- */ // eslint-disable-next-line no-use-before-define
49
- function hasCustomInfo(reply) {
48
+ */ function hasCustomInfo(reply) {
50
49
  return !!(reply && reply.customInfo);
51
50
  }
52
51
  },
@@ -57,6 +56,7 @@ function _define_property(obj, key, value) {
57
56
  return {
58
57
  transform: function(data) {
59
58
  return Object.assign(data || Object.assign({}, data), {
59
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- explicit `any`
60
60
  customInfo: data && data.customInfo ? Object.assign(data.customInfo, _this.customInfo) : _this.customInfo
61
61
  });
62
62
  }
@@ -113,7 +113,7 @@ describe('Exception Reply Plugin', function() {
113
113
  status: 444,
114
114
  statusText: 'test'
115
115
  },
116
- exception: new Error()
116
+ exception: new Error('error')
117
117
  });
118
118
  var data = {
119
119
  data: {}
@@ -93,7 +93,7 @@ function _object_spread_props(target, source) {
93
93
  */ _define_property(this, "shouldAddCacheControlHeaders", void 0);
94
94
  this.fetchCache = fetchCache;
95
95
  this.cacheControl = cacheControl;
96
- this.shouldAddCacheControlHeaders = typeof shouldAddCacheControlHeaders !== 'undefined' ? shouldAddCacheControlHeaders : typeof fetch === 'undefined' || fetch.polyfill;
96
+ this.shouldAddCacheControlHeaders = typeof shouldAddCacheControlHeaders === 'undefined' ? typeof fetch === 'undefined' || fetch.polyfill : shouldAddCacheControlHeaders;
97
97
  }
98
98
  _create_class(FetchCacheRequest, [
99
99
  {
@@ -130,7 +130,7 @@ describe('Fetch API credentials Request Plugin', function() {
130
130
  method: 'get'
131
131
  };
132
132
  it('credentials should be set to same-origin by default', /*#__PURE__*/ _async_to_generator(function() {
133
- var plugin, runner, cred;
133
+ var plugin, runner, _ref, cred;
134
134
  return _ts_generator(this, function(_state) {
135
135
  switch(_state.label){
136
136
  case 0:
@@ -147,7 +147,7 @@ describe('Fetch API credentials Request Plugin', function() {
147
147
  plugin.load().transform(options)
148
148
  ];
149
149
  case 2:
150
- cred = _state.sent().credentials;
150
+ _ref = _state.sent(), cred = _ref.credentials;
151
151
  expect(cred).toBe('same-origin');
152
152
  return [
153
153
  2
@@ -156,7 +156,7 @@ describe('Fetch API credentials Request Plugin', function() {
156
156
  });
157
157
  }));
158
158
  it('credentials should be set correctly', /*#__PURE__*/ _async_to_generator(function() {
159
- var plugin, runner, cred;
159
+ var plugin, runner, _ref, cred;
160
160
  return _ts_generator(this, function(_state) {
161
161
  switch(_state.label){
162
162
  case 0:
@@ -173,7 +173,7 @@ describe('Fetch API credentials Request Plugin', function() {
173
173
  plugin.load().transform(options)
174
174
  ];
175
175
  case 2:
176
- cred = _state.sent().credentials;
176
+ _ref = _state.sent(), cred = _ref.credentials;
177
177
  expect(cred).toBe('include');
178
178
  return [
179
179
  2
@@ -54,16 +54,16 @@ function _define_property(obj, key, value) {
54
54
  }
55
55
  if (context.response.headers.has('Authorization')) {
56
56
  var token = context.response.headers.get('Authorization');
57
- if (typeof sessionStorage !== 'undefined') {
58
- sessionStorage.setItem(_this.storageTokenKey, token);
59
- } else {
57
+ if (typeof sessionStorage === 'undefined') {
60
58
  _this.sharedMemory[_this.storageTokenKey] = token;
59
+ } else {
60
+ sessionStorage.setItem(_this.storageTokenKey, token);
61
61
  }
62
62
  } else {
63
- if (typeof sessionStorage !== 'undefined') {
64
- sessionStorage.removeItem(_this.storageTokenKey);
65
- } else {
63
+ if (typeof sessionStorage === 'undefined') {
66
64
  _this.sharedMemory[_this.storageTokenKey] = undefined;
65
+ } else {
66
+ sessionStorage.removeItem(_this.storageTokenKey);
67
67
  }
68
68
  }
69
69
  return data;
@@ -50,7 +50,7 @@ function _define_property(obj, key, value) {
50
50
  return {
51
51
  transform: function(data) {
52
52
  // Handle Authorization Tokens
53
- var token = typeof sessionStorage !== 'undefined' ? sessionStorage.getItem(_this.storageTokenKey) : _this.sharedMemory[_this.storageTokenKey];
53
+ var token = typeof sessionStorage === 'undefined' ? _this.sharedMemory[_this.storageTokenKey] : sessionStorage.getItem(_this.storageTokenKey);
54
54
  if (token) {
55
55
  data.credentials = 'same-origin';
56
56
  data.headers.append('Authorization', token);
@@ -165,8 +165,8 @@ describe('Json Token', function() {
165
165
  case 1:
166
166
  result = _state.sent();
167
167
  if (typeof window !== 'undefined' && typeof window.sessionStorage !== 'undefined') {
168
- expect(window.sessionStorage.getItem).toHaveBeenCalledWith(tokenKey);
169
- }
168
+ /* eslint-disable jest/no-conditional-expect -- the same condition is verified above to set up the checked spy */ expect(window.sessionStorage.getItem).toHaveBeenCalledWith(tokenKey);
169
+ /* eslint-enable jest/no-conditional-expect */ }
170
170
  expect(result.credentials).toBe('same-origin');
171
171
  expect(result.headers.get('Authorization')).toBe(tokenValue);
172
172
  return [
@@ -195,8 +195,8 @@ describe('Json Token', function() {
195
195
  case 1:
196
196
  result = _state.sent();
197
197
  if (typeof window !== 'undefined' && typeof window.sessionStorage !== 'undefined') {
198
- expect(window.sessionStorage.getItem).toHaveBeenCalledWith(tokenKey);
199
- }
198
+ /* eslint-disable jest/no-conditional-expect -- the same condition is verified above to set up the checked spy */ expect(window.sessionStorage.getItem).toHaveBeenCalledWith(tokenKey);
199
+ /* eslint-enable jest/no-conditional-expect */ }
200
200
  expect(result.credentials).toBeUndefined();
201
201
  expect(result.headers.get('Authorization')).toBeNull();
202
202
  return [
@@ -220,7 +220,6 @@ describe('Json Token', function() {
220
220
  runner = plugin.load({
221
221
  reviver: reviver,
222
222
  apiType: ApiTypes.DEFAULT,
223
- // eslint-disable-next-line @typescript-eslint/naming-convention
224
223
  response: {
225
224
  headers: new Headers({
226
225
  Authorization: tokenValue
@@ -238,10 +237,9 @@ describe('Json Token', function() {
238
237
  case 1:
239
238
  _state.sent();
240
239
  if (typeof window !== 'undefined' && typeof window.sessionStorage !== 'undefined') {
241
- expect(window.sessionStorage.setItem).toHaveBeenCalledWith(tokenKey, tokenValue);
242
- } else {
243
- expect(memory.testToken).toBe(tokenValue);
244
- }
240
+ /* eslint-disable jest/no-conditional-expect -- the same condition is verified above to set up the checked spy */ expect(window.sessionStorage.setItem).toHaveBeenCalledWith(tokenKey, tokenValue);
241
+ /* eslint-enable jest/no-conditional-expect */ }
242
+ expect(memory.testToken).toBe(tokenValue);
245
243
  return [
246
244
  2
247
245
  ];
@@ -322,7 +322,6 @@ describe('JSON auth token request plugin', function() {
322
322
  ];
323
323
  case 3:
324
324
  secretKey = _state.sent();
325
- // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
326
325
  message = "".concat(base64UrlEncoder(JSON.stringify(header)), ".").concat(base64UrlEncoder(JSON.stringify(payload)));
327
326
  return [
328
327
  4,
@@ -371,7 +370,6 @@ describe('JSON auth token request plugin', function() {
371
370
  ];
372
371
  case 3:
373
372
  secretKey = _state.sent();
374
- // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
375
373
  message = "".concat(base64UrlEncoder(JSON.stringify(header)), ".").concat(base64UrlEncoder(JSON.stringify(payload)));
376
374
  return [
377
375
  4,
@@ -1,3 +1,3 @@
1
- export * from './mock-intercept.request';
2
1
  export * from './mock-intercept.fetch';
3
2
  export * from './mock-intercept.interface';
3
+ export * from './mock-intercept.request';
@@ -200,10 +200,10 @@ function _ts_generator(thisArg, body) {
200
200
  };
201
201
  }
202
202
  }
203
+ import { HttpResponse } from '@angular/common/http';
203
204
  import { delay, from, mergeMap } from 'rxjs';
204
205
  import { CUSTOM_MOCK_OPERATION_ID_HEADER } from './mock-intercept.interface';
205
206
  import { MockInterceptRequest } from './mock-intercept.request';
206
- import { HttpResponse } from '@angular/common/http';
207
207
  /**
208
208
  * Plugin to mock and intercept the call of SDK
209
209
  *
@@ -242,7 +242,7 @@ import { HttpResponse } from '@angular/common/http';
242
242
  case 1:
243
243
  _state.sent();
244
244
  originalCall = call;
245
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
245
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- type of options is explicitly `any`
246
246
  if (!context.options.headers || !_instanceof(context.options.headers, Headers) || !context.options.headers.has(CUSTOM_MOCK_OPERATION_ID_HEADER)) {
247
247
  return [
248
248
  2,
@@ -278,7 +278,7 @@ import { HttpResponse } from '@angular/common/http';
278
278
  originalCall = originalCall.pipe(delay(delayTime));
279
279
  _state.label = 5;
280
280
  case 5:
281
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
281
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- type of options is explicitly `any`
282
282
  operationId = context.options.headers.get(CUSTOM_MOCK_OPERATION_ID_HEADER);
283
283
  try {
284
284
  mock = _this1.options.adapter.getLatestMock(operationId);
@@ -313,7 +313,7 @@ import { HttpResponse } from '@angular/common/http';
313
313
  ];
314
314
  }
315
315
  });
316
- });
316
+ /* eslint-enable-next-line @typescript-eslint/no-unsafe-assignment */ });
317
317
  return function(res) {
318
318
  return _ref.apply(this, arguments);
319
319
  };
@@ -200,7 +200,6 @@ import { MockInterceptRequest } from './mock-intercept.request';
200
200
  case 1:
201
201
  _state.sent();
202
202
  responsePromise = fetchCall;
203
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
204
203
  if (!context.options.headers || !_instanceof(context.options.headers, Headers) || !context.options.headers.has(CUSTOM_MOCK_OPERATION_ID_HEADER)) {
205
204
  return [
206
205
  2,
@@ -243,7 +242,6 @@ import { MockInterceptRequest } from './mock-intercept.request';
243
242
  });
244
243
  _state.label = 6;
245
244
  case 6:
246
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
247
245
  operationId = context.options.headers.get(CUSTOM_MOCK_OPERATION_ID_HEADER);
248
246
  try {
249
247
  mock = _this.options.adapter.getLatestMock(operationId);
@@ -234,7 +234,7 @@ describe('Mock intercept', function() {
234
234
  });
235
235
  }));
236
236
  it('should intercept the request', /*#__PURE__*/ _async_to_generator(function() {
237
- var plugin, originalRequest, loaded, transformed, res;
237
+ var plugin, originalRequest, loaded, transformed, res, text;
238
238
  return _ts_generator(this, function(_state) {
239
239
  switch(_state.label){
240
240
  case 0:
@@ -261,14 +261,15 @@ describe('Mock intercept', function() {
261
261
  fetch(transformed.basePath, transformed)
262
262
  ];
263
263
  case 2:
264
+ res = _state.sent();
264
265
  return [
265
266
  4,
266
- _state.sent().text()
267
+ res.text()
267
268
  ];
268
269
  case 3:
269
- res = _state.sent();
270
+ text = _state.sent();
270
271
  expect(getMockSpy).toHaveBeenCalled();
271
- expect(res).toBe(JSON.stringify(testMock.mockData));
272
+ expect(text).toBe(JSON.stringify(testMock.mockData));
272
273
  expect(initializeSpy).toHaveBeenCalled();
273
274
  return [
274
275
  2
@@ -59,6 +59,13 @@ function _define_property(obj, key, value) {
59
59
  }
60
60
  return obj;
61
61
  }
62
+ function _instanceof(left, right) {
63
+ if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
64
+ return !!right[Symbol.hasInstance](left);
65
+ } else {
66
+ return left instanceof right;
67
+ }
68
+ }
62
69
  function _object_spread(target) {
63
70
  for(var i = 1; i < arguments.length; i++){
64
71
  var source = arguments[i] != null ? arguments[i] : {};
@@ -229,7 +236,7 @@ import { v4 } from 'uuid';
229
236
  return "sdk:".concat(status, ":").concat(markId);
230
237
  });
231
238
  this.getPerformanceTag = (options === null || options === void 0 ? void 0 : options.getPerformanceTag) || this.getPerformanceTag;
232
- this.performance = (options === null || options === void 0 ? void 0 : options.performance) || (typeof window !== 'undefined' ? window.performance : undefined);
239
+ this.performance = (options === null || options === void 0 ? void 0 : options.performance) || (typeof window === 'undefined' ? undefined : window.performance);
233
240
  this.onMarkComplete = options ? options.onMarkComplete : this.onMarkComplete;
234
241
  this.onMarkError = options ? options.onMarkError : this.onMarkError;
235
242
  this.onMarkOpen = options ? options.onMarkOpen : this.onMarkOpen;
@@ -343,7 +350,8 @@ import { v4 } from 'uuid';
343
350
  ];
344
351
  case 3:
345
352
  exception = _state.sent();
346
- _this.closeMarkWithError(markId, exception);
353
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access -- type is explicitly `any`
354
+ _this.closeMarkWithError(markId, _instanceof(exception, Error) ? exception : new Error(exception.toString()));
347
355
  throw exception;
348
356
  case 4:
349
357
  return [
@@ -184,7 +184,6 @@ import { createJweEncoder, createJwtEncoder } from '../../utils/json-token';
184
184
  iat: timestamp,
185
185
  exp: timestamp + expirationDelay,
186
186
  iss: applicationId,
187
- // eslint-disable-next-line @typescript-eslint/naming-convention
188
187
  'ama-tokens': values
189
188
  };
190
189
  };
@@ -211,7 +210,6 @@ import { createJweEncoder, createJwtEncoder } from '../../utils/json-token';
211
210
  iat: timestamp,
212
211
  exp: timestamp + expirationDelay,
213
212
  iss: applicationId,
214
- // eslint-disable-next-line @typescript-eslint/naming-convention
215
213
  'ama-tokens': values
216
214
  };
217
215
  };
@@ -288,14 +286,10 @@ import { createJweEncoder, createJwtEncoder } from '../../utils/json-token';
288
286
  this.tokensHeader = options.headerName || 'ama-client-facts';
289
287
  this.challengeHeader = options.challengeHeaderName || 'ama-client-facts-challenge';
290
288
  this.silent = options.silent || false;
291
- if (options.key) {
292
- this.tokenEncoder = createJwePiiEncoder(options.applicationId, options.expirationDelay, options.key, options.publicProperties || [
293
- 'iss',
294
- 'sub'
295
- ], options.useHeaderAsAdditionalAuthenticatedData);
296
- } else {
297
- this.tokenEncoder = createJwtPiiEncoder(options.applicationId, options.expirationDelay);
298
- }
289
+ this.tokenEncoder = options.key ? createJwePiiEncoder(options.applicationId, options.expirationDelay, options.key, options.publicProperties || [
290
+ 'iss',
291
+ 'sub'
292
+ ], options.useHeaderAsAdditionalAuthenticatedData) : createJwtPiiEncoder(options.applicationId, options.expirationDelay);
299
293
  }
300
294
  _create_class(PiiTokenizerRequest, [
301
295
  {
@@ -329,7 +323,7 @@ import { createJweEncoder, createJwtEncoder } from '../../utils/json-token';
329
323
  case 2:
330
324
  e = _state.sent();
331
325
  if (_this.silent) {
332
- (logger || console).error('Couldn\'t encode the token');
326
+ (logger || console).error('Couldn\'t encode the token', e);
333
327
  } else {
334
328
  throw new Error('Couldn\'t encode the token');
335
329
  }
@@ -276,7 +276,7 @@ describe('Tokenizer Request Plugin', function() {
276
276
  expect(result.queryParams.classicParam).toEqual('classicParamValue');
277
277
  expect(result.queryParams.sensitiveParam).toEqual('sensitiveParamValue');
278
278
  expect(result.headers.get('ama-client-facts')).toBeNull();
279
- // eslint-disable-next-line no-console
279
+ // eslint-disable-next-line no-console -- not calling console.error but expect if it has been called or not
280
280
  expect(console.error).toHaveBeenCalled();
281
281
  return [
282
282
  2
@@ -307,7 +307,7 @@ describe('Tokenizer Request Plugin', function() {
307
307
  expect(result.queryParams.classicParam).toEqual('classicParamValue');
308
308
  expect(result.queryParams.sensitiveParam).toEqual('sensitiveParamValue');
309
309
  expect(result.headers.get('ama-client-facts')).toBeNull();
310
- // eslint-disable-next-line no-console
310
+ // eslint-disable-next-line no-console -- not calling console.error but expect if it has been called or not
311
311
  expect(console.error).not.toHaveBeenCalled();
312
312
  return [
313
313
  2
@@ -373,7 +373,6 @@ describe('Tokenizer Request Plugin', function() {
373
373
  case 1:
374
374
  result = _state.sent();
375
375
  expectedJwePayload = {
376
- // eslint-disable-next-line @typescript-eslint/naming-convention
377
376
  'ama-tokens': {
378
377
  $pathParamToken$: 'pathParamValue',
379
378
  $sensitiveParamToken$: 'sensitiveParamValue'
@@ -422,7 +421,7 @@ describe('Tokenizer Request Plugin', function() {
422
421
  case 1:
423
422
  _state.sent();
424
423
  expect(mockJweEncoder).toHaveBeenCalled();
425
- // eslint-disable-next-line no-console
424
+ // eslint-disable-next-line no-console -- not calling console.error but expect if it has been called or not
426
425
  expect(console.error).not.toHaveBeenCalled();
427
426
  return [
428
427
  2
@@ -458,7 +457,7 @@ describe('Tokenizer Request Plugin', function() {
458
457
  case 1:
459
458
  _state.sent();
460
459
  expect(mockJweEncoder).toHaveBeenCalled();
461
- // eslint-disable-next-line no-console
460
+ // eslint-disable-next-line no-console -- not calling console.error but expect if it has been called or not
462
461
  expect(console.error).toHaveBeenCalled();
463
462
  return [
464
463
  2
@@ -501,7 +500,7 @@ describe('Tokenizer Request Plugin', function() {
501
500
  expect(result.queryParams.classicParam).toEqual('classicParamValue');
502
501
  expect(result.queryParams.sensitiveParam).toEqual('$sensitiveParamToken$');
503
502
  expect(result.headers.get('ama-client-facts')).toEqual('myDeepLinkToken');
504
- // eslint-disable-next-line no-console
503
+ // eslint-disable-next-line no-console -- not calling console.error but expect if it has been called or not
505
504
  expect(console.error).not.toHaveBeenCalled();
506
505
  return [
507
506
  2
@@ -217,38 +217,23 @@ import { CanceledCallError } from '../../fwk/errors';
217
217
  value: function delay(countDown) {
218
218
  var _this = this;
219
219
  return _async_to_generator(function() {
220
+ var time;
220
221
  return _ts_generator(this, function(_state) {
221
- // eslint-disable-next-line no-async-promise-executor
222
- return [
223
- 2,
224
- new Promise(/*#__PURE__*/ function() {
225
- var _ref = _async_to_generator(function(resolve) {
226
- var _tmp;
227
- return _ts_generator(this, function(_state) {
228
- switch(_state.label){
229
- case 0:
230
- _tmp = [
231
- resolve
232
- ];
233
- return [
234
- 4,
235
- _this.sleepBetweenRetry(countDown)
236
- ];
237
- case 1:
238
- return [
239
- 2,
240
- setTimeout.apply(void 0, _tmp.concat([
241
- _state.sent()
242
- ]))
243
- ];
244
- }
245
- });
246
- });
247
- return function(resolve) {
248
- return _ref.apply(this, arguments);
249
- };
250
- }())
251
- ];
222
+ switch(_state.label){
223
+ case 0:
224
+ return [
225
+ 4,
226
+ _this.sleepBetweenRetry(countDown)
227
+ ];
228
+ case 1:
229
+ time = _state.sent();
230
+ return [
231
+ 2,
232
+ new Promise(function(resolve) {
233
+ return setTimeout(resolve, time);
234
+ })
235
+ ];
236
+ }
252
237
  });
253
238
  })();
254
239
  }
@@ -331,7 +316,7 @@ import { CanceledCallError } from '../../fwk/errors';
331
316
  ];
332
317
  return [
333
318
  4,
334
- _this.condition(context, undefined, e)
319
+ _this.condition(context, undefined, _instanceof(e, Error) ? e : new Error(e.toString()))
335
320
  ];
336
321
  case 5:
337
322
  conditionResult1 = _state.sent();
@@ -202,10 +202,10 @@ describe('Retry Fetch Plugin', function() {
202
202
  fetchPlugins: runners
203
203
  });
204
204
  runners.push(runner);
205
- call = Promise.reject({
205
+ call = Promise.reject(new Error(JSON.stringify({
206
206
  text: 'test',
207
207
  ok: true
208
- });
208
+ })));
209
209
  callback = jest.fn();
210
210
  runner.transform(call).catch(callback);
211
211
  return [
@@ -238,10 +238,10 @@ describe('Retry Fetch Plugin', function() {
238
238
  fetchPlugins: runners
239
239
  });
240
240
  runners.push(runner);
241
- call = Promise.reject({
241
+ call = Promise.reject(new Error(JSON.stringify({
242
242
  text: 'test',
243
243
  ok: true
244
- });
244
+ })));
245
245
  callback = jest.fn();
246
246
  runner.transform(call).catch(callback);
247
247
  return [
@@ -64,9 +64,9 @@ import { v4 } from 'uuid';
64
64
  {
65
65
  key: "logSessionId",
66
66
  value: function logSessionId(sessionId, date, logger) {
67
- ((logger === null || logger === void 0 ? void 0 : logger.info) || (logger === null || logger === void 0 ? void 0 : logger.log) || console.info).bind(logger || console)('Your debug ID associated to the header "'.concat(this.sessionIdHeader, '" is: ').concat(sessionId, "."));
67
+ /* eslint-disable no-console -- console are default value */ ((logger === null || logger === void 0 ? void 0 : logger.info) || (logger === null || logger === void 0 ? void 0 : logger.log) || console.info).bind(logger || console)('Your debug ID associated to the header "'.concat(this.sessionIdHeader, '" is: ').concat(sessionId, "."));
68
68
  ((logger === null || logger === void 0 ? void 0 : logger.info) || (logger === null || logger === void 0 ? void 0 : logger.log) || console.info).bind(logger || console)("Generated at: ".concat(date));
69
- }
69
+ /* eslint-enable no-console */ }
70
70
  },
71
71
  {
72
72
  key: "load",
@@ -126,12 +126,12 @@ import { v4 } from 'uuid';
126
126
  * Generates a request ID.
127
127
  */ function generateRequestId() {
128
128
  var requestCountKey = this.sessionIdHeader + '-Request-Count';
129
- var requestCount = NaN;
129
+ var requestCount = Number.NaN;
130
130
  // Check if we already have a request count in the shared memory or session storage
131
131
  if (SessionIdRequest.sharedMemory[requestCountKey] !== undefined) {
132
132
  requestCount = SessionIdRequest.sharedMemory[requestCountKey];
133
133
  } else if (typeof sessionStorage !== 'undefined') {
134
- requestCount = +(sessionStorage.getItem(requestCountKey) || NaN);
134
+ requestCount = +(sessionStorage.getItem(requestCountKey) || Number.NaN);
135
135
  }
136
136
  // If the request count is not defined yet or if it has been corrupted somehow, we start at 0.
137
137
  requestCount = requestCount + 1 || 0;
@@ -204,7 +204,7 @@ describe('Session ID Request Plugin', function() {
204
204
  ];
205
205
  case 1:
206
206
  _state.sent();
207
- expect(sessionId).toMatch(/[a-zA-Z0-9-]{10,48}/);
207
+ expect(sessionId).toMatch(/[\dA-Za-z-]{10,48}/);
208
208
  expect(options.headers.get('Ama-Client-Ref')).toMatch(new RegExp(sessionId + ':[0-9a-zA-Z]{1,10}'));
209
209
  return [
210
210
  2
@@ -226,7 +226,7 @@ describe('Session ID Request Plugin', function() {
226
226
  ];
227
227
  case 1:
228
228
  _state.sent();
229
- expect(sessionId).toMatch(/[a-zA-Z0-9-]{10,48}/);
229
+ expect(sessionId).toMatch(/[\dA-Za-z-]{10,48}/);
230
230
  expect(options.headers.get(TEST_KEY)).toEqual(sessionId);
231
231
  return [
232
232
  2
@@ -122,8 +122,8 @@ function _ts_generator(thisArg, body) {
122
122
  };
123
123
  }
124
124
  }
125
- import { SimpleApiKeyAuthenticationRequest } from './simple-api-key-authentication.request';
126
125
  import { createBase64UrlDecoder } from '../../utils/json-token';
126
+ import { SimpleApiKeyAuthenticationRequest } from './simple-api-key-authentication.request';
127
127
  var base64UrlDecoder = createBase64UrlDecoder();
128
128
  function getJWTPayload(jwt) {
129
129
  return JSON.parse(base64UrlDecoder(jwt.split('.')[1]));