@splitsoftware/splitio-commons 1.0.1-rc.4 → 1.1.1-rc.0

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 (565) hide show
  1. package/CHANGES.txt +13 -3
  2. package/LICENSE +1 -1
  3. package/README.md +1 -1
  4. package/cjs/evaluator/Engine.js +6 -5
  5. package/cjs/evaluator/combiners/and.js +4 -4
  6. package/cjs/evaluator/combiners/ifelseif.js +4 -3
  7. package/cjs/evaluator/condition/index.js +4 -3
  8. package/cjs/evaluator/index.js +10 -11
  9. package/cjs/evaluator/matchers/all.js +2 -1
  10. package/cjs/evaluator/matchers/between.js +2 -1
  11. package/cjs/evaluator/matchers/boolean.js +2 -1
  12. package/cjs/evaluator/matchers/cont_all.js +3 -2
  13. package/cjs/evaluator/matchers/cont_any.js +3 -2
  14. package/cjs/evaluator/matchers/cont_str.js +2 -1
  15. package/cjs/evaluator/matchers/dependency.js +4 -4
  16. package/cjs/evaluator/matchers/eq.js +2 -1
  17. package/cjs/evaluator/matchers/eq_set.js +2 -1
  18. package/cjs/evaluator/matchers/ew.js +2 -1
  19. package/cjs/evaluator/matchers/gte.js +2 -1
  20. package/cjs/evaluator/matchers/index.js +36 -36
  21. package/cjs/evaluator/matchers/lte.js +2 -1
  22. package/cjs/evaluator/matchers/part_of.js +3 -2
  23. package/cjs/evaluator/matchers/segment.js +5 -5
  24. package/cjs/evaluator/matchers/string.js +2 -1
  25. package/cjs/evaluator/matchers/sw.js +2 -1
  26. package/cjs/evaluator/matchers/whitelist.js +2 -1
  27. package/cjs/evaluator/matchersTransform/index.js +12 -12
  28. package/cjs/evaluator/matchersTransform/segment.js +3 -2
  29. package/cjs/evaluator/matchersTransform/set.js +3 -2
  30. package/cjs/evaluator/matchersTransform/unaryNumeric.js +3 -2
  31. package/cjs/evaluator/matchersTransform/whitelist.js +3 -2
  32. package/cjs/evaluator/parser/index.js +16 -16
  33. package/cjs/evaluator/treatments/index.js +2 -1
  34. package/cjs/evaluator/value/index.js +5 -5
  35. package/cjs/evaluator/value/sanitize.js +2 -1
  36. package/cjs/integrations/browser.js +4 -4
  37. package/cjs/integrations/ga/GaToSplit.js +3 -4
  38. package/cjs/integrations/pluggable.js +3 -2
  39. package/cjs/listeners/browser.js +4 -4
  40. package/cjs/listeners/node.js +4 -4
  41. package/cjs/logger/index.js +2 -3
  42. package/cjs/logger/messages/info.js +1 -1
  43. package/cjs/logger/messages/warn.js +2 -2
  44. package/cjs/readiness/readinessManager.js +3 -4
  45. package/cjs/readiness/sdkReadinessManager.js +7 -7
  46. package/cjs/sdkClient/client.js +5 -5
  47. package/cjs/sdkClient/clientAttributesDecoration.js +108 -0
  48. package/cjs/sdkClient/clientCS.js +12 -10
  49. package/cjs/sdkClient/clientInputValidation.js +5 -5
  50. package/cjs/sdkClient/sdkClient.js +5 -6
  51. package/cjs/sdkClient/sdkClientMethodCS.js +4 -5
  52. package/cjs/sdkClient/sdkClientMethodCSWithTT.js +4 -5
  53. package/cjs/sdkFactory/index.js +9 -10
  54. package/cjs/sdkManager/index.js +6 -7
  55. package/cjs/services/splitApi.js +2 -3
  56. package/cjs/services/splitHttpClient.js +3 -4
  57. package/cjs/storages/AbstractSegmentsCacheSync.js +2 -1
  58. package/cjs/storages/AbstractSplitsCacheAsync.js +2 -1
  59. package/cjs/storages/AbstractSplitsCacheSync.js +2 -2
  60. package/cjs/storages/KeyBuilder.js +2 -2
  61. package/cjs/storages/KeyBuilderCS.js +4 -3
  62. package/cjs/storages/KeyBuilderSS.js +4 -3
  63. package/cjs/storages/findLatencyIndex.js +2 -1
  64. package/cjs/storages/inLocalStorage/MySegmentsCacheInLocal.js +4 -3
  65. package/cjs/storages/inLocalStorage/SplitsCacheInLocal.js +4 -3
  66. package/cjs/storages/inLocalStorage/index.js +20 -21
  67. package/cjs/storages/inMemory/AttributesCacheInMemory.js +70 -0
  68. package/cjs/storages/inMemory/CountsCacheInMemory.js +2 -1
  69. package/cjs/storages/inMemory/EventsCacheInMemory.js +2 -1
  70. package/cjs/storages/inMemory/ImpressionCountsCacheInMemory.js +2 -1
  71. package/cjs/storages/inMemory/ImpressionsCacheInMemory.js +2 -1
  72. package/cjs/storages/inMemory/InMemoryStorage.js +10 -11
  73. package/cjs/storages/inMemory/InMemoryStorageCS.js +12 -13
  74. package/cjs/storages/inMemory/LatenciesCacheInMemory.js +4 -4
  75. package/cjs/storages/inMemory/MySegmentsCacheInMemory.js +4 -3
  76. package/cjs/storages/inMemory/SegmentsCacheInMemory.js +4 -3
  77. package/cjs/storages/inMemory/SplitsCacheInMemory.js +4 -3
  78. package/cjs/storages/inRedis/CountsCacheInRedis.js +2 -1
  79. package/cjs/storages/inRedis/EventsCacheInRedis.js +2 -1
  80. package/cjs/storages/inRedis/ImpressionsCacheInRedis.js +2 -1
  81. package/cjs/storages/inRedis/LatenciesCacheInRedis.js +4 -4
  82. package/cjs/storages/inRedis/RedisAdapter.js +6 -5
  83. package/cjs/storages/inRedis/SegmentsCacheInRedis.js +2 -1
  84. package/cjs/storages/inRedis/SplitsCacheInRedis.js +4 -3
  85. package/cjs/storages/inRedis/index.js +16 -17
  86. package/cjs/storages/pluggable/SplitsCachePluggable.js +2 -2
  87. package/cjs/storages/pluggable/index.js +8 -8
  88. package/cjs/sync/offline/splitsParser/parseCondition.js +2 -1
  89. package/cjs/sync/offline/splitsParser/splitsParserFromFile.js +3 -3
  90. package/cjs/sync/offline/splitsParser/splitsParserFromSettings.js +2 -3
  91. package/cjs/sync/offline/syncManagerOffline.js +3 -4
  92. package/cjs/sync/offline/syncTasks/fromObjectSyncTask.js +4 -5
  93. package/cjs/sync/polling/fetchers/mySegmentsFetcher.js +2 -1
  94. package/cjs/sync/polling/fetchers/segmentChangesFetcher.js +2 -1
  95. package/cjs/sync/polling/fetchers/splitChangesFetcher.js +2 -1
  96. package/cjs/sync/polling/pollingManagerCS.js +6 -6
  97. package/cjs/sync/polling/pollingManagerSS.js +8 -8
  98. package/cjs/sync/polling/syncTasks/mySegmentsSyncTask.js +5 -5
  99. package/cjs/sync/polling/syncTasks/segmentsSyncTask.js +5 -5
  100. package/cjs/sync/polling/syncTasks/splitsSyncTask.js +5 -5
  101. package/cjs/sync/polling/updaters/mySegmentsUpdater.js +2 -3
  102. package/cjs/sync/polling/updaters/segmentChangesUpdater.js +2 -3
  103. package/cjs/sync/polling/updaters/splitChangesUpdater.js +8 -6
  104. package/cjs/sync/streaming/AuthClient/index.js +2 -3
  105. package/cjs/sync/streaming/SSEClient/index.js +2 -1
  106. package/cjs/sync/streaming/SSEHandler/NotificationKeeper.js +2 -1
  107. package/cjs/sync/streaming/SSEHandler/index.js +4 -4
  108. package/cjs/sync/streaming/UpdateWorkers/MySegmentsUpdateWorker.js +4 -4
  109. package/cjs/sync/streaming/UpdateWorkers/SegmentsUpdateWorker.js +4 -4
  110. package/cjs/sync/streaming/UpdateWorkers/SplitsUpdateWorker.js +4 -4
  111. package/cjs/sync/streaming/pushManager.js +18 -17
  112. package/cjs/sync/submitters/submitterSyncTask.js +2 -3
  113. package/cjs/sync/syncTask.js +2 -1
  114. package/cjs/trackers/eventTracker.js +7 -7
  115. package/cjs/trackers/impressionObserver/ImpressionObserver.js +4 -4
  116. package/cjs/trackers/impressionObserver/impressionObserverCS.js +2 -3
  117. package/cjs/trackers/impressionObserver/impressionObserverSS.js +2 -3
  118. package/cjs/trackers/impressionsTracker.js +6 -6
  119. package/cjs/utils/Backoff.js +2 -1
  120. package/cjs/utils/LRUCache/index.js +2 -1
  121. package/cjs/utils/MinEventEmitter.js +2 -1
  122. package/cjs/utils/MinEvents.js +13 -15
  123. package/cjs/utils/inputValidation/attribute.js +20 -0
  124. package/cjs/utils/inputValidation/attributes.js +13 -1
  125. package/cjs/utils/inputValidation/trafficTypeExistance.js +2 -3
  126. package/cjs/utils/lang/binarySearch.js +2 -1
  127. package/cjs/utils/lang/objectAssign.js +85 -0
  128. package/cjs/utils/promise/thenable.js +5 -1
  129. package/cjs/utils/promise/timeout.js +2 -1
  130. package/cjs/utils/promise/wrapper.js +2 -1
  131. package/cjs/utils/settingsValidation/impressionsMode.js +2 -1
  132. package/cjs/utils/settingsValidation/index.js +5 -6
  133. package/cjs/utils/settingsValidation/mode.js +2 -1
  134. package/cjs/utils/timeTracker/index.js +7 -8
  135. package/cjs/utils/timeTracker/now/browser.js +2 -2
  136. package/cjs/utils/timeTracker/now/node.js +2 -1
  137. package/cjs/utils/timeTracker/timer.js +3 -2
  138. package/esm/evaluator/Engine.js +3 -3
  139. package/esm/evaluator/combiners/and.js +2 -2
  140. package/esm/evaluator/combiners/ifelseif.js +2 -2
  141. package/esm/evaluator/condition/index.js +2 -2
  142. package/esm/evaluator/index.js +5 -6
  143. package/esm/evaluator/matchers/all.js +1 -1
  144. package/esm/evaluator/matchers/between.js +1 -1
  145. package/esm/evaluator/matchers/boolean.js +1 -1
  146. package/esm/evaluator/matchers/cont_all.js +1 -1
  147. package/esm/evaluator/matchers/cont_any.js +1 -1
  148. package/esm/evaluator/matchers/cont_str.js +1 -1
  149. package/esm/evaluator/matchers/dependency.js +2 -2
  150. package/esm/evaluator/matchers/eq.js +1 -1
  151. package/esm/evaluator/matchers/eq_set.js +1 -1
  152. package/esm/evaluator/matchers/ew.js +1 -1
  153. package/esm/evaluator/matchers/gte.js +1 -1
  154. package/esm/evaluator/matchers/index.js +35 -35
  155. package/esm/evaluator/matchers/lte.js +1 -1
  156. package/esm/evaluator/matchers/part_of.js +1 -1
  157. package/esm/evaluator/matchers/segment.js +2 -2
  158. package/esm/evaluator/matchers/string.js +1 -1
  159. package/esm/evaluator/matchers/sw.js +1 -1
  160. package/esm/evaluator/matchers/whitelist.js +1 -1
  161. package/esm/evaluator/matchersTransform/index.js +5 -5
  162. package/esm/evaluator/matchersTransform/segment.js +1 -1
  163. package/esm/evaluator/matchersTransform/set.js +1 -1
  164. package/esm/evaluator/matchersTransform/unaryNumeric.js +1 -1
  165. package/esm/evaluator/matchersTransform/whitelist.js +1 -1
  166. package/esm/evaluator/parser/index.js +11 -11
  167. package/esm/evaluator/treatments/index.js +1 -1
  168. package/esm/evaluator/value/index.js +3 -3
  169. package/esm/evaluator/value/sanitize.js +1 -1
  170. package/esm/integrations/browser.js +2 -2
  171. package/esm/integrations/ga/GaToSplit.js +1 -1
  172. package/esm/integrations/pluggable.js +1 -1
  173. package/esm/listeners/browser.js +2 -2
  174. package/esm/listeners/node.js +2 -2
  175. package/esm/logger/index.js +1 -1
  176. package/esm/logger/messages/info.js +1 -1
  177. package/esm/logger/messages/warn.js +2 -2
  178. package/esm/readiness/readinessManager.js +1 -1
  179. package/esm/readiness/sdkReadinessManager.js +3 -3
  180. package/esm/sdkClient/client.js +2 -2
  181. package/esm/sdkClient/clientAttributesDecoration.js +104 -0
  182. package/esm/sdkClient/clientCS.js +10 -8
  183. package/esm/sdkClient/clientInputValidation.js +2 -2
  184. package/esm/sdkClient/sdkClient.js +3 -3
  185. package/esm/sdkClient/sdkClientMethodCS.js +4 -4
  186. package/esm/sdkClient/sdkClientMethodCSWithTT.js +4 -4
  187. package/esm/sdkFactory/index.js +6 -6
  188. package/esm/sdkManager/index.js +2 -2
  189. package/esm/services/splitApi.js +1 -1
  190. package/esm/services/splitHttpClient.js +1 -1
  191. package/esm/storages/AbstractSegmentsCacheSync.js +1 -1
  192. package/esm/storages/AbstractSplitsCacheAsync.js +1 -1
  193. package/esm/storages/AbstractSplitsCacheSync.js +1 -1
  194. package/esm/storages/KeyBuilder.js +1 -1
  195. package/esm/storages/KeyBuilderCS.js +2 -2
  196. package/esm/storages/KeyBuilderSS.js +2 -2
  197. package/esm/storages/findLatencyIndex.js +1 -1
  198. package/esm/storages/inLocalStorage/MySegmentsCacheInLocal.js +2 -2
  199. package/esm/storages/inLocalStorage/SplitsCacheInLocal.js +2 -2
  200. package/esm/storages/inLocalStorage/index.js +8 -8
  201. package/esm/storages/inMemory/AttributesCacheInMemory.js +67 -0
  202. package/esm/storages/inMemory/CountsCacheInMemory.js +1 -1
  203. package/esm/storages/inMemory/EventsCacheInMemory.js +1 -1
  204. package/esm/storages/inMemory/ImpressionCountsCacheInMemory.js +1 -1
  205. package/esm/storages/inMemory/ImpressionsCacheInMemory.js +1 -1
  206. package/esm/storages/inMemory/InMemoryStorage.js +5 -5
  207. package/esm/storages/inMemory/InMemoryStorageCS.js +5 -5
  208. package/esm/storages/inMemory/LatenciesCacheInMemory.js +2 -2
  209. package/esm/storages/inMemory/MySegmentsCacheInMemory.js +2 -2
  210. package/esm/storages/inMemory/SegmentsCacheInMemory.js +2 -2
  211. package/esm/storages/inMemory/SplitsCacheInMemory.js +2 -2
  212. package/esm/storages/inRedis/CountsCacheInRedis.js +1 -1
  213. package/esm/storages/inRedis/EventsCacheInRedis.js +1 -1
  214. package/esm/storages/inRedis/ImpressionsCacheInRedis.js +1 -1
  215. package/esm/storages/inRedis/LatenciesCacheInRedis.js +2 -2
  216. package/esm/storages/inRedis/RedisAdapter.js +3 -3
  217. package/esm/storages/inRedis/SegmentsCacheInRedis.js +1 -1
  218. package/esm/storages/inRedis/SplitsCacheInRedis.js +2 -2
  219. package/esm/storages/inRedis/index.js +8 -8
  220. package/esm/storages/pluggable/SplitsCachePluggable.js +1 -1
  221. package/esm/storages/pluggable/index.js +4 -4
  222. package/esm/sync/offline/splitsParser/parseCondition.js +1 -1
  223. package/esm/sync/offline/splitsParser/splitsParserFromFile.js +1 -1
  224. package/esm/sync/offline/splitsParser/splitsParserFromSettings.js +1 -1
  225. package/esm/sync/offline/syncManagerOffline.js +2 -2
  226. package/esm/sync/offline/syncTasks/fromObjectSyncTask.js +2 -2
  227. package/esm/sync/polling/fetchers/mySegmentsFetcher.js +1 -1
  228. package/esm/sync/polling/fetchers/segmentChangesFetcher.js +1 -1
  229. package/esm/sync/polling/fetchers/splitChangesFetcher.js +1 -1
  230. package/esm/sync/polling/pollingManagerCS.js +3 -3
  231. package/esm/sync/polling/pollingManagerSS.js +4 -4
  232. package/esm/sync/polling/syncTasks/mySegmentsSyncTask.js +3 -3
  233. package/esm/sync/polling/syncTasks/segmentsSyncTask.js +3 -3
  234. package/esm/sync/polling/syncTasks/splitsSyncTask.js +3 -3
  235. package/esm/sync/polling/updaters/mySegmentsUpdater.js +1 -1
  236. package/esm/sync/polling/updaters/segmentChangesUpdater.js +1 -1
  237. package/esm/sync/polling/updaters/splitChangesUpdater.js +7 -4
  238. package/esm/sync/streaming/AuthClient/index.js +1 -1
  239. package/esm/sync/streaming/SSEClient/index.js +1 -1
  240. package/esm/sync/streaming/SSEHandler/NotificationKeeper.js +1 -1
  241. package/esm/sync/streaming/SSEHandler/index.js +2 -2
  242. package/esm/sync/streaming/UpdateWorkers/MySegmentsUpdateWorker.js +2 -2
  243. package/esm/sync/streaming/UpdateWorkers/SegmentsUpdateWorker.js +2 -2
  244. package/esm/sync/streaming/UpdateWorkers/SplitsUpdateWorker.js +2 -2
  245. package/esm/sync/streaming/pushManager.js +10 -9
  246. package/esm/sync/submitters/submitterSyncTask.js +1 -1
  247. package/esm/sync/syncTask.js +1 -1
  248. package/esm/trackers/eventTracker.js +3 -3
  249. package/esm/trackers/impressionObserver/ImpressionObserver.js +2 -2
  250. package/esm/trackers/impressionObserver/impressionObserverCS.js +1 -1
  251. package/esm/trackers/impressionObserver/impressionObserverSS.js +1 -1
  252. package/esm/trackers/impressionsTracker.js +3 -3
  253. package/esm/utils/Backoff.js +1 -1
  254. package/esm/utils/LRUCache/index.js +1 -1
  255. package/esm/utils/MinEventEmitter.js +1 -1
  256. package/esm/utils/MinEvents.js +2 -5
  257. package/esm/utils/inputValidation/attribute.js +16 -0
  258. package/esm/utils/inputValidation/attributes.js +11 -0
  259. package/esm/utils/inputValidation/trafficTypeExistance.js +1 -1
  260. package/esm/utils/lang/binarySearch.js +1 -1
  261. package/esm/utils/lang/objectAssign.js +82 -0
  262. package/esm/utils/promise/thenable.js +3 -1
  263. package/esm/utils/promise/timeout.js +1 -1
  264. package/esm/utils/promise/wrapper.js +1 -1
  265. package/esm/utils/settingsValidation/impressionsMode.js +1 -1
  266. package/esm/utils/settingsValidation/index.js +3 -3
  267. package/esm/utils/settingsValidation/mode.js +1 -1
  268. package/esm/utils/timeTracker/index.js +4 -5
  269. package/esm/utils/timeTracker/now/browser.js +1 -2
  270. package/esm/utils/timeTracker/now/node.js +1 -1
  271. package/esm/utils/timeTracker/timer.js +1 -1
  272. package/package.json +2 -3
  273. package/src/evaluator/Engine.ts +3 -3
  274. package/src/evaluator/combiners/and.ts +2 -2
  275. package/src/evaluator/combiners/ifelseif.ts +2 -2
  276. package/src/evaluator/condition/index.ts +2 -2
  277. package/src/evaluator/index.ts +5 -6
  278. package/src/evaluator/matchers/all.ts +1 -1
  279. package/src/evaluator/matchers/between.ts +1 -1
  280. package/src/evaluator/matchers/boolean.ts +1 -1
  281. package/src/evaluator/matchers/cont_all.ts +1 -1
  282. package/src/evaluator/matchers/cont_any.ts +1 -1
  283. package/src/evaluator/matchers/cont_str.ts +1 -1
  284. package/src/evaluator/matchers/dependency.ts +2 -2
  285. package/src/evaluator/matchers/eq.ts +1 -1
  286. package/src/evaluator/matchers/eq_set.ts +1 -1
  287. package/src/evaluator/matchers/ew.ts +1 -1
  288. package/src/evaluator/matchers/gte.ts +1 -1
  289. package/src/evaluator/matchers/index.ts +35 -35
  290. package/src/evaluator/matchers/lte.ts +1 -1
  291. package/src/evaluator/matchers/part_of.ts +1 -1
  292. package/src/evaluator/matchers/segment.ts +2 -2
  293. package/src/evaluator/matchers/string.ts +1 -1
  294. package/src/evaluator/matchers/sw.ts +1 -1
  295. package/src/evaluator/matchers/whitelist.ts +1 -1
  296. package/src/evaluator/matchersTransform/index.ts +5 -5
  297. package/src/evaluator/matchersTransform/segment.ts +1 -1
  298. package/src/evaluator/matchersTransform/set.ts +1 -1
  299. package/src/evaluator/matchersTransform/unaryNumeric.ts +1 -1
  300. package/src/evaluator/matchersTransform/whitelist.ts +1 -1
  301. package/src/evaluator/parser/index.ts +12 -12
  302. package/src/evaluator/treatments/index.ts +1 -1
  303. package/src/evaluator/value/index.ts +3 -3
  304. package/src/evaluator/value/sanitize.ts +1 -1
  305. package/src/integrations/browser.ts +2 -2
  306. package/src/integrations/ga/GaToSplit.ts +1 -1
  307. package/src/integrations/pluggable.ts +1 -1
  308. package/src/listeners/browser.ts +2 -2
  309. package/src/listeners/node.ts +2 -2
  310. package/src/logger/index.ts +1 -1
  311. package/src/logger/messages/info.ts +1 -1
  312. package/src/logger/messages/warn.ts +2 -2
  313. package/src/readiness/readinessManager.ts +2 -2
  314. package/src/readiness/sdkReadinessManager.ts +3 -3
  315. package/src/sdkClient/client.ts +2 -2
  316. package/src/sdkClient/clientAttributesDecoration.ts +122 -0
  317. package/src/sdkClient/clientCS.ts +13 -8
  318. package/src/sdkClient/clientInputValidation.ts +2 -2
  319. package/src/sdkClient/sdkClient.ts +3 -3
  320. package/src/sdkClient/sdkClientMethodCS.ts +4 -2
  321. package/src/sdkClient/sdkClientMethodCSWithTT.ts +4 -2
  322. package/src/sdkFactory/index.ts +6 -6
  323. package/src/sdkManager/index.ts +2 -2
  324. package/src/services/splitApi.ts +1 -1
  325. package/src/services/splitHttpClient.ts +1 -1
  326. package/src/storages/AbstractSegmentsCacheSync.ts +1 -1
  327. package/src/storages/AbstractSplitsCacheAsync.ts +1 -1
  328. package/src/storages/AbstractSplitsCacheSync.ts +1 -1
  329. package/src/storages/KeyBuilder.ts +1 -1
  330. package/src/storages/KeyBuilderCS.ts +2 -2
  331. package/src/storages/KeyBuilderSS.ts +2 -2
  332. package/src/storages/findLatencyIndex.ts +1 -1
  333. package/src/storages/inLocalStorage/MySegmentsCacheInLocal.ts +3 -3
  334. package/src/storages/inLocalStorage/SplitsCacheInLocal.ts +3 -3
  335. package/src/storages/inLocalStorage/index.ts +8 -8
  336. package/src/storages/inMemory/AttributesCacheInMemory.ts +73 -0
  337. package/src/storages/inMemory/CountsCacheInMemory.ts +1 -1
  338. package/src/storages/inMemory/EventsCacheInMemory.ts +1 -1
  339. package/src/storages/inMemory/ImpressionCountsCacheInMemory.ts +1 -1
  340. package/src/storages/inMemory/ImpressionsCacheInMemory.ts +1 -1
  341. package/src/storages/inMemory/InMemoryStorage.ts +5 -5
  342. package/src/storages/inMemory/InMemoryStorageCS.ts +5 -5
  343. package/src/storages/inMemory/LatenciesCacheInMemory.ts +2 -2
  344. package/src/storages/inMemory/MySegmentsCacheInMemory.ts +2 -2
  345. package/src/storages/inMemory/SegmentsCacheInMemory.ts +2 -2
  346. package/src/storages/inMemory/SplitsCacheInMemory.ts +2 -2
  347. package/src/storages/inRedis/CountsCacheInRedis.ts +2 -2
  348. package/src/storages/inRedis/EventsCacheInRedis.ts +1 -1
  349. package/src/storages/inRedis/ImpressionsCacheInRedis.ts +1 -1
  350. package/src/storages/inRedis/LatenciesCacheInRedis.ts +3 -3
  351. package/src/storages/inRedis/RedisAdapter.ts +3 -3
  352. package/src/storages/inRedis/SegmentsCacheInRedis.ts +2 -2
  353. package/src/storages/inRedis/SplitsCacheInRedis.ts +3 -3
  354. package/src/storages/inRedis/index.ts +8 -8
  355. package/src/storages/pluggable/SegmentsCachePluggable.ts +1 -1
  356. package/src/storages/pluggable/SplitsCachePluggable.ts +2 -2
  357. package/src/storages/pluggable/index.ts +4 -4
  358. package/src/storages/types.ts +2 -2
  359. package/src/sync/offline/splitsParser/parseCondition.ts +1 -1
  360. package/src/sync/offline/splitsParser/splitsParserFromFile.ts +1 -1
  361. package/src/sync/offline/splitsParser/splitsParserFromSettings.ts +1 -1
  362. package/src/sync/offline/syncManagerOffline.ts +2 -2
  363. package/src/sync/offline/syncTasks/fromObjectSyncTask.ts +2 -2
  364. package/src/sync/polling/fetchers/mySegmentsFetcher.ts +1 -1
  365. package/src/sync/polling/fetchers/segmentChangesFetcher.ts +1 -1
  366. package/src/sync/polling/fetchers/splitChangesFetcher.ts +1 -1
  367. package/src/sync/polling/pollingManagerCS.ts +3 -3
  368. package/src/sync/polling/pollingManagerSS.ts +4 -4
  369. package/src/sync/polling/syncTasks/mySegmentsSyncTask.ts +3 -3
  370. package/src/sync/polling/syncTasks/segmentsSyncTask.ts +3 -3
  371. package/src/sync/polling/syncTasks/splitsSyncTask.ts +3 -3
  372. package/src/sync/polling/updaters/mySegmentsUpdater.ts +1 -1
  373. package/src/sync/polling/updaters/segmentChangesUpdater.ts +1 -1
  374. package/src/sync/polling/updaters/splitChangesUpdater.ts +6 -3
  375. package/src/sync/streaming/AuthClient/index.ts +1 -1
  376. package/src/sync/streaming/SSEClient/index.ts +1 -1
  377. package/src/sync/streaming/SSEHandler/NotificationKeeper.ts +1 -1
  378. package/src/sync/streaming/SSEHandler/index.ts +2 -2
  379. package/src/sync/streaming/UpdateWorkers/MySegmentsUpdateWorker.ts +2 -2
  380. package/src/sync/streaming/UpdateWorkers/SegmentsUpdateWorker.ts +2 -2
  381. package/src/sync/streaming/UpdateWorkers/SplitsUpdateWorker.ts +2 -2
  382. package/src/sync/streaming/UpdateWorkers/types.ts +1 -1
  383. package/src/sync/streaming/pushManager.ts +10 -9
  384. package/src/sync/submitters/submitterSyncTask.ts +1 -1
  385. package/src/sync/syncTask.ts +1 -1
  386. package/src/trackers/eventTracker.ts +3 -3
  387. package/src/trackers/impressionObserver/ImpressionObserver.ts +2 -2
  388. package/src/trackers/impressionObserver/impressionObserverCS.ts +1 -1
  389. package/src/trackers/impressionObserver/impressionObserverSS.ts +1 -1
  390. package/src/trackers/impressionsTracker.ts +3 -3
  391. package/src/types.ts +39 -0
  392. package/src/utils/Backoff.ts +1 -1
  393. package/src/utils/LRUCache/index.ts +1 -1
  394. package/src/utils/MinEventEmitter.ts +1 -1
  395. package/src/utils/MinEvents.ts +2 -7
  396. package/src/utils/inputValidation/attribute.ts +21 -0
  397. package/src/utils/inputValidation/attributes.ts +14 -0
  398. package/src/utils/inputValidation/trafficTypeExistance.ts +1 -1
  399. package/src/utils/lang/binarySearch.ts +1 -1
  400. package/src/utils/lang/objectAssign.ts +104 -0
  401. package/src/utils/promise/thenable.ts +3 -1
  402. package/src/utils/promise/timeout.ts +1 -1
  403. package/src/utils/promise/wrapper.ts +1 -1
  404. package/src/utils/settingsValidation/impressionsMode.ts +1 -1
  405. package/src/utils/settingsValidation/index.ts +3 -3
  406. package/src/utils/settingsValidation/mode.ts +1 -1
  407. package/src/utils/timeTracker/index.ts +4 -6
  408. package/src/utils/timeTracker/now/browser.ts +1 -3
  409. package/src/utils/timeTracker/now/node.ts +1 -1
  410. package/src/utils/timeTracker/timer.ts +1 -1
  411. package/types/evaluator/Engine.d.ts +1 -1
  412. package/types/evaluator/combiners/and.d.ts +1 -1
  413. package/types/evaluator/combiners/ifelseif.d.ts +1 -1
  414. package/types/evaluator/condition/index.d.ts +1 -1
  415. package/types/evaluator/matchers/all.d.ts +1 -1
  416. package/types/evaluator/matchers/between.d.ts +1 -1
  417. package/types/evaluator/matchers/boolean.d.ts +1 -1
  418. package/types/evaluator/matchers/cont_all.d.ts +1 -1
  419. package/types/evaluator/matchers/cont_any.d.ts +1 -1
  420. package/types/evaluator/matchers/cont_str.d.ts +1 -1
  421. package/types/evaluator/matchers/dependency.d.ts +1 -1
  422. package/types/evaluator/matchers/eq.d.ts +1 -1
  423. package/types/evaluator/matchers/eq_set.d.ts +1 -1
  424. package/types/evaluator/matchers/ew.d.ts +1 -1
  425. package/types/evaluator/matchers/gte.d.ts +1 -1
  426. package/types/evaluator/matchers/index.d.ts +1 -1
  427. package/types/evaluator/matchers/lte.d.ts +1 -1
  428. package/types/evaluator/matchers/part_of.d.ts +1 -1
  429. package/types/evaluator/matchers/segment.d.ts +1 -1
  430. package/types/evaluator/matchers/string.d.ts +1 -1
  431. package/types/evaluator/matchers/sw.d.ts +1 -1
  432. package/types/evaluator/matchers/whitelist.d.ts +1 -1
  433. package/types/evaluator/matchersTransform/index.d.ts +1 -1
  434. package/types/evaluator/matchersTransform/segment.d.ts +1 -1
  435. package/types/evaluator/matchersTransform/set.d.ts +1 -1
  436. package/types/evaluator/matchersTransform/unaryNumeric.d.ts +1 -1
  437. package/types/evaluator/matchersTransform/whitelist.d.ts +1 -1
  438. package/types/evaluator/parser/index.d.ts +1 -1
  439. package/types/evaluator/treatments/index.d.ts +1 -1
  440. package/types/evaluator/value/index.d.ts +1 -1
  441. package/types/evaluator/value/sanitize.d.ts +1 -1
  442. package/types/integrations/browser.d.ts +1 -1
  443. package/types/integrations/pluggable.d.ts +1 -1
  444. package/types/listeners/browser.d.ts +1 -1
  445. package/types/listeners/node.d.ts +1 -1
  446. package/types/logger/browser/{debugLogger.d.ts → DebugLogger.d.ts} +0 -0
  447. package/types/logger/browser/{errorLogger.d.ts → ErrorLogger.d.ts} +0 -0
  448. package/types/logger/browser/{infoLogger.d.ts → InfoLogger.d.ts} +0 -0
  449. package/types/logger/browser/{warnLogger.d.ts → WarnLogger.d.ts} +0 -0
  450. package/types/readiness/sdkReadinessManager.d.ts +1 -1
  451. package/types/sdkClient/client.d.ts +1 -1
  452. package/types/sdkClient/clientAttributesDecoration.d.ts +51 -0
  453. package/types/sdkClient/clientCS.d.ts +2 -1
  454. package/types/sdkClient/clientInputValidation.d.ts +1 -1
  455. package/types/storages/AbstractSegmentsCacheSync.d.ts +1 -1
  456. package/types/storages/AbstractSplitsCacheAsync.d.ts +1 -1
  457. package/types/storages/AbstractSplitsCacheSync.d.ts +1 -1
  458. package/types/storages/KeyBuilder.d.ts +1 -1
  459. package/types/storages/KeyBuilderCS.d.ts +2 -2
  460. package/types/storages/KeyBuilderSS.d.ts +2 -2
  461. package/types/storages/findLatencyIndex.d.ts +1 -1
  462. package/types/storages/inLocalStorage/MySegmentsCacheInLocal.d.ts +3 -3
  463. package/types/storages/inLocalStorage/SplitsCacheInLocal.d.ts +3 -3
  464. package/types/storages/inMemory/AttributesCacheInMemory.d.ts +43 -0
  465. package/types/storages/inMemory/CountsCacheInMemory.d.ts +1 -1
  466. package/types/storages/inMemory/EventsCacheInMemory.d.ts +1 -1
  467. package/types/storages/inMemory/ImpressionCountsCacheInMemory.d.ts +1 -1
  468. package/types/storages/inMemory/ImpressionsCacheInMemory.d.ts +1 -1
  469. package/types/storages/inMemory/LatenciesCacheInMemory.d.ts +1 -1
  470. package/types/storages/inMemory/MySegmentsCacheInMemory.d.ts +2 -2
  471. package/types/storages/inMemory/SegmentsCacheInMemory.d.ts +2 -2
  472. package/types/storages/inMemory/SplitsCacheInMemory.d.ts +2 -2
  473. package/types/storages/inRedis/CountsCacheInRedis.d.ts +2 -2
  474. package/types/storages/inRedis/EventsCacheInRedis.d.ts +1 -1
  475. package/types/storages/inRedis/ImpressionsCacheInRedis.d.ts +1 -1
  476. package/types/storages/inRedis/LatenciesCacheInRedis.d.ts +2 -2
  477. package/types/storages/inRedis/RedisAdapter.d.ts +1 -1
  478. package/types/storages/inRedis/SegmentsCacheInRedis.d.ts +2 -2
  479. package/types/storages/inRedis/SplitsCacheInRedis.d.ts +3 -3
  480. package/types/storages/pluggable/SegmentsCachePluggable.d.ts +1 -1
  481. package/types/storages/pluggable/SplitsCachePluggable.d.ts +2 -2
  482. package/types/storages/types.d.ts +2 -2
  483. package/types/sync/offline/splitsParser/parseCondition.d.ts +1 -1
  484. package/types/sync/offline/syncTasks/fromObjectSyncTask.d.ts +1 -1
  485. package/types/sync/polling/fetchers/mySegmentsFetcher.d.ts +1 -1
  486. package/types/sync/polling/fetchers/segmentChangesFetcher.d.ts +1 -1
  487. package/types/sync/polling/fetchers/splitChangesFetcher.d.ts +1 -1
  488. package/types/sync/polling/pollingManagerCS.d.ts +1 -1
  489. package/types/sync/polling/pollingManagerSS.d.ts +1 -1
  490. package/types/sync/polling/syncTasks/mySegmentsSyncTask.d.ts +1 -1
  491. package/types/sync/polling/syncTasks/segmentsSyncTask.d.ts +1 -1
  492. package/types/sync/polling/syncTasks/splitsSyncTask.d.ts +1 -1
  493. package/types/sync/streaming/SSEClient/index.d.ts +1 -1
  494. package/types/sync/streaming/SSEHandler/NotificationKeeper.d.ts +1 -1
  495. package/types/sync/streaming/SSEHandler/index.d.ts +1 -1
  496. package/types/sync/streaming/UpdateWorkers/MySegmentsUpdateWorker.d.ts +2 -2
  497. package/types/sync/streaming/UpdateWorkers/SegmentsUpdateWorker.d.ts +2 -2
  498. package/types/sync/streaming/UpdateWorkers/SplitsUpdateWorker.d.ts +2 -2
  499. package/types/sync/streaming/UpdateWorkers/types.d.ts +1 -1
  500. package/types/sync/streaming/pushManager.d.ts +1 -1
  501. package/types/sync/syncTask.d.ts +1 -1
  502. package/types/trackers/eventTracker.d.ts +1 -1
  503. package/types/trackers/impressionObserver/ImpressionObserver.d.ts +1 -1
  504. package/types/trackers/impressionObserver/impressionObserverCS.d.ts +1 -1
  505. package/types/trackers/impressionObserver/impressionObserverSS.d.ts +1 -1
  506. package/types/trackers/impressionsTracker.d.ts +1 -1
  507. package/types/types.d.ts +39 -0
  508. package/types/utils/Backoff.d.ts +1 -1
  509. package/types/utils/LRUCache/index.d.ts +1 -1
  510. package/types/utils/MinEventEmitter.d.ts +1 -1
  511. package/types/utils/MinEvents.d.ts +3 -2
  512. package/types/utils/inputValidation/attribute.d.ts +2 -0
  513. package/types/utils/inputValidation/attributes.d.ts +1 -0
  514. package/types/utils/lang/binarySearch.d.ts +1 -1
  515. package/types/utils/lang/objectAssign.d.ts +3 -0
  516. package/types/utils/promise/thenable.d.ts +1 -2
  517. package/types/utils/promise/timeout.d.ts +1 -1
  518. package/types/utils/promise/wrapper.d.ts +1 -1
  519. package/types/utils/settingsValidation/impressionsMode.d.ts +1 -1
  520. package/types/utils/settingsValidation/mode.d.ts +1 -1
  521. package/types/utils/timeTracker/index.d.ts +2 -2
  522. package/types/utils/timeTracker/now/browser.d.ts +1 -2
  523. package/types/utils/timeTracker/now/node.d.ts +1 -1
  524. package/types/utils/timeTracker/timer.d.ts +1 -1
  525. package/src/logger/.DS_Store +0 -0
  526. package/types/integrations/ga/GaToSplitPlugin.d.ts +0 -3
  527. package/types/integrations/ga/SplitToGaPlugin.d.ts +0 -4
  528. package/types/logger/codes.d.ts +0 -2
  529. package/types/logger/codesConstants.d.ts +0 -117
  530. package/types/logger/codesConstantsBrowser.d.ts +0 -2
  531. package/types/logger/codesConstantsNode.d.ts +0 -14
  532. package/types/logger/codesDebug.d.ts +0 -1
  533. package/types/logger/codesDebugBrowser.d.ts +0 -1
  534. package/types/logger/codesDebugNode.d.ts +0 -1
  535. package/types/logger/codesError.d.ts +0 -1
  536. package/types/logger/codesErrorNode.d.ts +0 -1
  537. package/types/logger/codesInfo.d.ts +0 -1
  538. package/types/logger/codesWarn.d.ts +0 -1
  539. package/types/logger/codesWarnNode.d.ts +0 -1
  540. package/types/logger/debugLogger.d.ts +0 -2
  541. package/types/logger/errorLogger.d.ts +0 -2
  542. package/types/logger/infoLogger.d.ts +0 -2
  543. package/types/logger/messages/debugBrowser.d.ts +0 -1
  544. package/types/logger/messages/debugNode.d.ts +0 -1
  545. package/types/logger/messages/errorNode.d.ts +0 -1
  546. package/types/logger/messages/warnNode.d.ts +0 -1
  547. package/types/logger/noopLogger.d.ts +0 -2
  548. package/types/logger/warnLogger.d.ts +0 -2
  549. package/types/sdkManager/sdkManagerMethod.d.ts +0 -6
  550. package/types/storages/getRegisteredSegments.d.ts +0 -10
  551. package/types/sync/polling/syncTasks/splitsSyncTask.copy.d.ts +0 -35
  552. package/types/sync/polling/syncTasks/splitsSyncTask.morelikeoriginal.d.ts +0 -35
  553. package/types/sync/streaming/AuthClient/indexV1.d.ts +0 -12
  554. package/types/sync/streaming/AuthClient/indexV2.d.ts +0 -8
  555. package/types/sync/streaming/pushManagerCS.d.ts +0 -12
  556. package/types/sync/streaming/pushManagerNoUsers.d.ts +0 -13
  557. package/types/sync/streaming/pushManagerSS.d.ts +0 -11
  558. package/types/sync/syncManagerFromFile.d.ts +0 -2
  559. package/types/sync/syncManagerFromObject.d.ts +0 -2
  560. package/types/sync/syncManagerOffline.d.ts +0 -9
  561. package/types/utils/lang/errors.d.ts +0 -10
  562. package/types/utils/murmur3/commons.d.ts +0 -12
  563. package/types/utils/settingsValidation/buildMetadata.d.ts +0 -3
  564. package/types/utils/settingsValidation/localhost/index.d.ts +0 -9
  565. package/types/utils/settingsValidation/logger.d.ts +0 -11
@@ -1,9 +1,9 @@
1
- import clientCSDecorator from './clientCS';
1
+ import { clientCSDecorator } from './clientCS';
2
2
  import { validateKey } from '../utils/inputValidation/key';
3
3
  import { validateTrafficType } from '../utils/inputValidation/trafficType';
4
4
  import { getMatching, keyParser } from '../utils/key';
5
5
  import { sdkClientFactory } from './sdkClient';
6
- import objectAssign from 'object-assign';
6
+ import { objectAssign } from '../utils/lang/objectAssign';
7
7
  import { RETRIEVE_CLIENT_DEFAULT, NEW_SHARED_CLIENT, RETRIEVE_CLIENT_EXISTING } from '../logger/constants';
8
8
  import { SDK_SEGMENTS_ARRIVED } from '../readiness/constants';
9
9
  function buildInstanceId(key, trafficType) {
@@ -26,7 +26,7 @@ export function sdkClientMethodCSFactory(params) {
26
26
  if (trafficType !== undefined) {
27
27
  validTrafficType = validateTrafficType(log, trafficType, method);
28
28
  }
29
- var mainClientInstance = clientCSDecorator(sdkClientFactory(params), // @ts-ignore
29
+ var mainClientInstance = clientCSDecorator(log, sdkClientFactory(params), // @ts-ignore
30
30
  validKey, validTrafficType);
31
31
  var parsedDefaultKey = keyParser(key);
32
32
  var defaultInstanceId = buildInstanceId(parsedDefaultKey, trafficType);
@@ -68,7 +68,7 @@ export function sdkClientMethodCSFactory(params) {
68
68
  var sharedSyncManager = syncManager && sharedStorage && syncManager.shared(matchingKey, sharedSdkReadiness_1.readinessManager, sharedStorage);
69
69
  // As shared clients reuse all the storage information, we don't need to check here if we
70
70
  // will use offline or online mode. We should stick with the original decision.
71
- clientInstances[instanceId] = clientCSDecorator(sdkClientFactory(objectAssign({}, params, {
71
+ clientInstances[instanceId] = clientCSDecorator(log, sdkClientFactory(objectAssign({}, params, {
72
72
  sdkReadinessManager: sharedSdkReadiness_1,
73
73
  storage: sharedStorage || storage,
74
74
  syncManager: sharedSyncManager,
@@ -1,6 +1,6 @@
1
- import sdkReadinessManagerFactory from '../readiness/sdkReadinessManager';
2
- import impressionsTrackerFactory from '../trackers/impressionsTracker';
3
- import eventTrackerFactory from '../trackers/eventTracker';
1
+ import { sdkReadinessManagerFactory } from '../readiness/sdkReadinessManager';
2
+ import { impressionsTrackerFactory } from '../trackers/impressionsTracker';
3
+ import { eventTrackerFactory } from '../trackers/eventTracker';
4
4
  import { getMatching } from '../utils/key';
5
5
  import { shouldBeOptimized } from '../trackers/impressionObserver/utils';
6
6
  import { validateAndTrackApiKey } from '../utils/inputValidation/apiKey';
@@ -29,11 +29,11 @@ export function sdkFactory(params) {
29
29
  splitFiltersValidation: settings.sync.__splitFiltersValidation,
30
30
  // ATM, only used by PluggableStorage
31
31
  mode: settings.mode,
32
- // Callback used to emit SDK_READY in consumer mode, where `syncManagerFactory` is undefined
33
- // or only instantiates submitters, and therefore it is not able to emit readiness events.
32
+ // Callback used to emit SDK_READY in consumer mode, where `syncManagerFactory` is undefined,
33
+ // or partial consumer mode, where it only has submitters, and therefore it doesn't emit readiness events.
34
34
  onReadyCb: function (error) {
35
35
  if (error)
36
- return; // don't emit SDK_READY if storage failed to connect.
36
+ return; // Don't emit SDK_READY if storage failed to connect. Error message is logged by wrapperAdapter
37
37
  readinessManager.splits.emit(SDK_SPLITS_ARRIVED);
38
38
  readinessManager.segments.emit(SDK_SEGMENTS_ARRIVED);
39
39
  },
@@ -1,5 +1,5 @@
1
- import objectAssign from 'object-assign';
2
- import thenable from '../utils/promise/thenable';
1
+ import { objectAssign } from '../utils/lang/objectAssign';
2
+ import { thenable } from '../utils/promise/thenable';
3
3
  import { find } from '../utils/lang';
4
4
  import { validateSplit, validateSplitExistance, validateIfNotDestroyed, validateIfOperational } from '../utils/inputValidation';
5
5
  function collectTreatments(splitObject) {
@@ -1,5 +1,5 @@
1
1
  import { splitHttpClientFactory } from './splitHttpClient';
2
- import objectAssign from 'object-assign';
2
+ import { objectAssign } from '../utils/lang/objectAssign';
3
3
  var noCacheHeaderOptions = { headers: { 'Cache-Control': 'no-cache' } };
4
4
  function userKeyToQueryParam(userKey) {
5
5
  return 'users=' + encodeURIComponent(userKey); // no need to check availability of `encodeURIComponent`, since it is a global highly supported.
@@ -1,4 +1,4 @@
1
- import objectAssign from 'object-assign';
1
+ import { objectAssign } from '../utils/lang/objectAssign';
2
2
  import { ERROR_HTTP, ERROR_CLIENT_CANNOT_GET_READY } from '../logger/constants';
3
3
  var messageNoFetch = 'Global fetch API is not available.';
4
4
  /**
@@ -32,4 +32,4 @@ var AbstractSegmentsCacheSync = /** @class */ (function () {
32
32
  AbstractSegmentsCacheSync.prototype.resetSegments = function (names) { return true; };
33
33
  return AbstractSegmentsCacheSync;
34
34
  }());
35
- export default AbstractSegmentsCacheSync;
35
+ export { AbstractSegmentsCacheSync };
@@ -46,4 +46,4 @@ var AbstractSplitsCacheAsync = /** @class */ (function () {
46
46
  };
47
47
  return AbstractSplitsCacheAsync;
48
48
  }());
49
- export default AbstractSplitsCacheAsync;
49
+ export { AbstractSplitsCacheAsync };
@@ -58,7 +58,7 @@ var AbstractSplitsCacheSync = /** @class */ (function () {
58
58
  };
59
59
  return AbstractSplitsCacheSync;
60
60
  }());
61
- export default AbstractSplitsCacheSync;
61
+ export { AbstractSplitsCacheSync };
62
62
  /**
63
63
  * Given a parsed split, it returns a boolean flagging if its conditions use segments matchers (rules & whitelists).
64
64
  * This util is intended to simplify the implementation of `splitsCache::usesSegments` method
@@ -57,4 +57,4 @@ var KeyBuilder = /** @class */ (function () {
57
57
  };
58
58
  return KeyBuilder;
59
59
  }());
60
- export default KeyBuilder;
60
+ export { KeyBuilder };
@@ -1,6 +1,6 @@
1
1
  import { __extends } from "tslib";
2
2
  import { startsWith } from '../utils/lang';
3
- import KeyBuilder from './KeyBuilder';
3
+ import { KeyBuilder } from './KeyBuilder';
4
4
  var KeyBuilderCS = /** @class */ (function (_super) {
5
5
  __extends(KeyBuilderCS, _super);
6
6
  function KeyBuilderCS(prefix, matchingKey) {
@@ -31,4 +31,4 @@ var KeyBuilderCS = /** @class */ (function (_super) {
31
31
  };
32
32
  return KeyBuilderCS;
33
33
  }(KeyBuilder));
34
- export default KeyBuilderCS;
34
+ export { KeyBuilderCS };
@@ -1,5 +1,5 @@
1
1
  import { __extends } from "tslib";
2
- import KeyBuilder from './KeyBuilder';
2
+ import { KeyBuilder } from './KeyBuilder';
3
3
  // NOT USED
4
4
  // const everythingAfterCount = /count\.([^/]+)$/;
5
5
  // const latencyMetricNameAndBucket = /latency\.([^/]+)\.bucket\.([0-9]+)$/;
@@ -44,4 +44,4 @@ var KeyBuilderSS = /** @class */ (function (_super) {
44
44
  };
45
45
  return KeyBuilderSS;
46
46
  }(KeyBuilder));
47
- export default KeyBuilderSS;
47
+ export { KeyBuilderSS };
@@ -1,6 +1,6 @@
1
1
  import { isNaNNumber } from '../utils/lang';
2
2
  // @TODO add unit tests
3
- export default function findLatencyIndex(latency, min, max, base) {
3
+ export function findLatencyIndex(latency, min, max, base) {
4
4
  if (min === void 0) { min = 0; }
5
5
  if (max === void 0) { max = 23; }
6
6
  if (base === void 0) { base = 1.5; }
@@ -1,5 +1,5 @@
1
1
  import { __extends } from "tslib";
2
- import AbstractSegmentsCacheSync from '../AbstractSegmentsCacheSync';
2
+ import { AbstractSegmentsCacheSync } from '../AbstractSegmentsCacheSync';
3
3
  import { LOG_PREFIX, DEFINED } from './constants';
4
4
  var MySegmentsCacheInLocal = /** @class */ (function (_super) {
5
5
  __extends(MySegmentsCacheInLocal, _super);
@@ -86,4 +86,4 @@ var MySegmentsCacheInLocal = /** @class */ (function (_super) {
86
86
  };
87
87
  return MySegmentsCacheInLocal;
88
88
  }(AbstractSegmentsCacheSync));
89
- export default MySegmentsCacheInLocal;
89
+ export { MySegmentsCacheInLocal };
@@ -1,5 +1,5 @@
1
1
  import { __extends } from "tslib";
2
- import AbstractSplitsCacheSync, { usesSegments } from '../AbstractSplitsCacheSync';
2
+ import { AbstractSplitsCacheSync, usesSegments } from '../AbstractSplitsCacheSync';
3
3
  import { isFiniteNumber, toNumber, isNaNNumber } from '../../utils/lang';
4
4
  import { LOG_PREFIX } from './constants';
5
5
  /**
@@ -248,4 +248,4 @@ var SplitsCacheInLocal = /** @class */ (function (_super) {
248
248
  };
249
249
  return SplitsCacheInLocal;
250
250
  }(AbstractSplitsCacheSync));
251
- export default SplitsCacheInLocal;
251
+ export { SplitsCacheInLocal };
@@ -1,13 +1,13 @@
1
- import ImpressionsCacheInMemory from '../inMemory/ImpressionsCacheInMemory';
2
- import ImpressionCountsCacheInMemory from '../inMemory/ImpressionCountsCacheInMemory';
3
- import EventsCacheInMemory from '../inMemory/EventsCacheInMemory';
1
+ import { ImpressionsCacheInMemory } from '../inMemory/ImpressionsCacheInMemory';
2
+ import { ImpressionCountsCacheInMemory } from '../inMemory/ImpressionCountsCacheInMemory';
3
+ import { EventsCacheInMemory } from '../inMemory/EventsCacheInMemory';
4
4
  import { validatePrefix } from '../KeyBuilder';
5
- import KeyBuilderCS from '../KeyBuilderCS';
5
+ import { KeyBuilderCS } from '../KeyBuilderCS';
6
6
  import { isLocalStorageAvailable } from '../../utils/env/isLocalStorageAvailable';
7
- import SplitsCacheInLocal from './SplitsCacheInLocal';
8
- import MySegmentsCacheInLocal from './MySegmentsCacheInLocal';
9
- import MySegmentsCacheInMemory from '../inMemory/MySegmentsCacheInMemory';
10
- import SplitsCacheInMemory from '../inMemory/SplitsCacheInMemory';
7
+ import { SplitsCacheInLocal } from './SplitsCacheInLocal';
8
+ import { MySegmentsCacheInLocal } from './MySegmentsCacheInLocal';
9
+ import { MySegmentsCacheInMemory } from '../inMemory/MySegmentsCacheInMemory';
10
+ import { SplitsCacheInMemory } from '../inMemory/SplitsCacheInMemory';
11
11
  import { DEFAULT_CACHE_EXPIRATION_IN_MILLIS } from '../../utils/constants/browser';
12
12
  import { InMemoryStorageCSFactory } from '../inMemory/InMemoryStorageCS';
13
13
  import { LOG_PREFIX } from './constants';
@@ -0,0 +1,67 @@
1
+ import { objectAssign } from '../../utils/lang/objectAssign';
2
+ var AttributesCacheInMemory = /** @class */ (function () {
3
+ function AttributesCacheInMemory() {
4
+ this.attributesCache = {};
5
+ }
6
+ /**
7
+ * Create or update the value for the given attribute
8
+ *
9
+ * @param {string} attributeName attribute name
10
+ * @param {Object} attributeValue attribute value
11
+ * @returns {boolean} the attribute was stored
12
+ */
13
+ AttributesCacheInMemory.prototype.setAttribute = function (attributeName, attributeValue) {
14
+ this.attributesCache[attributeName] = attributeValue;
15
+ return true;
16
+ };
17
+ /**
18
+ * Retrieves the value of a given attribute
19
+ *
20
+ * @param {string} attributeName attribute name
21
+ * @returns {Object?} stored attribute value
22
+ */
23
+ AttributesCacheInMemory.prototype.getAttribute = function (attributeName) {
24
+ return this.attributesCache[attributeName];
25
+ };
26
+ /**
27
+ * Create or update all the given attributes
28
+ *
29
+ * @param {[string, Object]} attributes attributes to create or update
30
+ * @returns {boolean} attributes were stored
31
+ */
32
+ AttributesCacheInMemory.prototype.setAttributes = function (attributes) {
33
+ this.attributesCache = objectAssign(this.attributesCache, attributes);
34
+ return true;
35
+ };
36
+ /**
37
+ * Retrieve the full attributes map
38
+ *
39
+ * @returns {Map<string, Object>} stored attributes
40
+ */
41
+ AttributesCacheInMemory.prototype.getAll = function () {
42
+ return this.attributesCache;
43
+ };
44
+ /**
45
+ * Removes a given attribute from the map
46
+ *
47
+ * @param {string} attributeName attribute to remove
48
+ * @returns {boolean} attribute removed
49
+ */
50
+ AttributesCacheInMemory.prototype.removeAttribute = function (attributeName) {
51
+ if (Object.keys(this.attributesCache).indexOf(attributeName) >= 0) {
52
+ delete this.attributesCache[attributeName];
53
+ return true;
54
+ }
55
+ return false;
56
+ };
57
+ /**
58
+ * Clears all attributes stored in the SDK
59
+ *
60
+ */
61
+ AttributesCacheInMemory.prototype.clear = function () {
62
+ this.attributesCache = {};
63
+ return true;
64
+ };
65
+ return AttributesCacheInMemory;
66
+ }());
67
+ export { AttributesCacheInMemory };
@@ -32,4 +32,4 @@ var CountsCacheInMemory = /** @class */ (function () {
32
32
  };
33
33
  return CountsCacheInMemory;
34
34
  }());
35
- export default CountsCacheInMemory;
35
+ export { CountsCacheInMemory };
@@ -55,4 +55,4 @@ var EventsCacheInMemory = /** @class */ (function () {
55
55
  };
56
56
  return EventsCacheInMemory;
57
57
  }());
58
- export default EventsCacheInMemory;
58
+ export { EventsCacheInMemory };
@@ -31,4 +31,4 @@ var ImpressionCountsCacheInMemory = /** @class */ (function () {
31
31
  };
32
32
  return ImpressionCountsCacheInMemory;
33
33
  }());
34
- export default ImpressionCountsCacheInMemory;
34
+ export { ImpressionCountsCacheInMemory };
@@ -29,4 +29,4 @@ var ImpressionsCacheInMemory = /** @class */ (function () {
29
29
  };
30
30
  return ImpressionsCacheInMemory;
31
31
  }());
32
- export default ImpressionsCacheInMemory;
32
+ export { ImpressionsCacheInMemory };
@@ -1,8 +1,8 @@
1
- import SplitsCacheInMemory from './SplitsCacheInMemory';
2
- import SegmentsCacheInMemory from './SegmentsCacheInMemory';
3
- import ImpressionsCacheInMemory from './ImpressionsCacheInMemory';
4
- import EventsCacheInMemory from './EventsCacheInMemory';
5
- import ImpressionCountsCacheInMemory from './ImpressionCountsCacheInMemory';
1
+ import { SplitsCacheInMemory } from './SplitsCacheInMemory';
2
+ import { SegmentsCacheInMemory } from './SegmentsCacheInMemory';
3
+ import { ImpressionsCacheInMemory } from './ImpressionsCacheInMemory';
4
+ import { EventsCacheInMemory } from './EventsCacheInMemory';
5
+ import { ImpressionCountsCacheInMemory } from './ImpressionCountsCacheInMemory';
6
6
  import { STORAGE_MEMORY } from '../../utils/constants';
7
7
  /**
8
8
  * InMemory storage factory for standalone server-side SplitFactory
@@ -1,8 +1,8 @@
1
- import SplitsCacheInMemory from './SplitsCacheInMemory';
2
- import MySegmentsCacheInMemory from './MySegmentsCacheInMemory';
3
- import ImpressionsCacheInMemory from './ImpressionsCacheInMemory';
4
- import EventsCacheInMemory from './EventsCacheInMemory';
5
- import ImpressionCountsCacheInMemory from './ImpressionCountsCacheInMemory';
1
+ import { SplitsCacheInMemory } from './SplitsCacheInMemory';
2
+ import { MySegmentsCacheInMemory } from './MySegmentsCacheInMemory';
3
+ import { ImpressionsCacheInMemory } from './ImpressionsCacheInMemory';
4
+ import { EventsCacheInMemory } from './EventsCacheInMemory';
5
+ import { ImpressionCountsCacheInMemory } from './ImpressionCountsCacheInMemory';
6
6
  import { STORAGE_MEMORY } from '../../utils/constants';
7
7
  /**
8
8
  * InMemory storage factory for standalone client-side SplitFactory
@@ -1,4 +1,4 @@
1
- import findLatencyIndex from '../findLatencyIndex';
1
+ import { findLatencyIndex } from '../findLatencyIndex';
2
2
  var LatenciesCacheInMemory = /** @class */ (function () {
3
3
  function LatenciesCacheInMemory() {
4
4
  this.counters = {};
@@ -37,4 +37,4 @@ var LatenciesCacheInMemory = /** @class */ (function () {
37
37
  };
38
38
  return LatenciesCacheInMemory;
39
39
  }());
40
- export default LatenciesCacheInMemory;
40
+ export { LatenciesCacheInMemory };
@@ -1,5 +1,5 @@
1
1
  import { __extends } from "tslib";
2
- import AbstractSegmentsCacheSync from '../AbstractSegmentsCacheSync';
2
+ import { AbstractSegmentsCacheSync } from '../AbstractSegmentsCacheSync';
3
3
  /**
4
4
  * Default MySegmentsCacheInMemory implementation that stores MySegments in memory.
5
5
  * Supported by all JS runtimes.
@@ -65,4 +65,4 @@ var MySegmentsCacheInMemory = /** @class */ (function (_super) {
65
65
  };
66
66
  return MySegmentsCacheInMemory;
67
67
  }(AbstractSegmentsCacheSync));
68
- export default MySegmentsCacheInMemory;
68
+ export { MySegmentsCacheInMemory };
@@ -1,5 +1,5 @@
1
1
  import { __extends } from "tslib";
2
- import AbstractSegmentsCacheSync from '../AbstractSegmentsCacheSync';
2
+ import { AbstractSegmentsCacheSync } from '../AbstractSegmentsCacheSync';
3
3
  import { _Set } from '../../utils/lang/sets';
4
4
  import { isIntegerNumber } from '../../utils/lang';
5
5
  /**
@@ -64,4 +64,4 @@ var SegmentsCacheInMemory = /** @class */ (function (_super) {
64
64
  };
65
65
  return SegmentsCacheInMemory;
66
66
  }(AbstractSegmentsCacheSync));
67
- export default SegmentsCacheInMemory;
67
+ export { SegmentsCacheInMemory };
@@ -1,5 +1,5 @@
1
1
  import { __extends } from "tslib";
2
- import AbstractSplitsCacheSync, { usesSegments } from '../AbstractSplitsCacheSync';
2
+ import { AbstractSplitsCacheSync, usesSegments } from '../AbstractSplitsCacheSync';
3
3
  import { isFiniteNumber } from '../../utils/lang';
4
4
  /**
5
5
  * Default ISplitsCacheSync implementation that stores split definitions in memory.
@@ -97,4 +97,4 @@ var SplitsCacheInMemory = /** @class */ (function (_super) {
97
97
  };
98
98
  return SplitsCacheInMemory;
99
99
  }(AbstractSplitsCacheSync));
100
- export default SplitsCacheInMemory;
100
+ export { SplitsCacheInMemory };
@@ -10,4 +10,4 @@ var CountsCacheInRedis = /** @class */ (function () {
10
10
  };
11
11
  return CountsCacheInRedis;
12
12
  }());
13
- export default CountsCacheInRedis;
13
+ export { CountsCacheInRedis };
@@ -54,4 +54,4 @@ var EventsCacheInRedis = /** @class */ (function () {
54
54
  };
55
55
  return EventsCacheInRedis;
56
56
  }());
57
- export default EventsCacheInRedis;
57
+ export { EventsCacheInRedis };
@@ -56,4 +56,4 @@ var ImpressionsCacheInRedis = /** @class */ (function () {
56
56
  };
57
57
  return ImpressionsCacheInRedis;
58
58
  }());
59
- export default ImpressionsCacheInRedis;
59
+ export { ImpressionsCacheInRedis };
@@ -1,4 +1,4 @@
1
- import findLatencyIndex from '../findLatencyIndex';
1
+ import { findLatencyIndex } from '../findLatencyIndex';
2
2
  var LatenciesCacheInRedis = /** @class */ (function () {
3
3
  function LatenciesCacheInRedis(keys, redis) {
4
4
  this.keys = keys;
@@ -12,4 +12,4 @@ var LatenciesCacheInRedis = /** @class */ (function () {
12
12
  };
13
13
  return LatenciesCacheInRedis;
14
14
  }());
15
- export default LatenciesCacheInRedis;
15
+ export { LatenciesCacheInRedis };
@@ -2,8 +2,8 @@ import { __extends } from "tslib";
2
2
  import ioredis from 'ioredis';
3
3
  import { merge, isString } from '../../utils/lang';
4
4
  import { _Set, setToArray } from '../../utils/lang/sets';
5
- import thenable from '../../utils/promise/thenable';
6
- import timeout from '../../utils/promise/timeout';
5
+ import { thenable } from '../../utils/promise/thenable';
6
+ import { timeout } from '../../utils/promise/timeout';
7
7
  var LOG_PREFIX = 'storage:redis-adapter: ';
8
8
  // If we ever decide to fully wrap every method, there's a Commander.getBuiltinCommands from ioredis.
9
9
  var METHODS_TO_PROMISE_WRAP = ['set', 'exec', 'del', 'get', 'keys', 'sadd', 'srem', 'sismember', 'smembers', 'incr', 'rpush', 'pipeline', 'expire', 'mget', 'lrange', 'ltrim'];
@@ -157,4 +157,4 @@ var RedisAdapter = /** @class */ (function (_super) {
157
157
  };
158
158
  return RedisAdapter;
159
159
  }(ioredis));
160
- export default RedisAdapter;
160
+ export { RedisAdapter };
@@ -57,4 +57,4 @@ var SegmentsCacheInRedis = /** @class */ (function () {
57
57
  };
58
58
  return SegmentsCacheInRedis;
59
59
  }());
60
- export default SegmentsCacheInRedis;
60
+ export { SegmentsCacheInRedis };
@@ -1,7 +1,7 @@
1
1
  import { __extends } from "tslib";
2
2
  import { isFiniteNumber, isNaNNumber } from '../../utils/lang';
3
3
  import { LOG_PREFIX } from './constants';
4
- import AbstractSplitsCacheAsync from '../AbstractSplitsCacheAsync';
4
+ import { AbstractSplitsCacheAsync } from '../AbstractSplitsCacheAsync';
5
5
  /**
6
6
  * Discard errors for an answer of multiple operations.
7
7
  */
@@ -226,4 +226,4 @@ var SplitsCacheInRedis = /** @class */ (function (_super) {
226
226
  };
227
227
  return SplitsCacheInRedis;
228
228
  }(AbstractSplitsCacheAsync));
229
- export default SplitsCacheInRedis;
229
+ export { SplitsCacheInRedis };
@@ -1,12 +1,12 @@
1
- import RedisAdapter from './RedisAdapter';
1
+ import { RedisAdapter } from './RedisAdapter';
2
2
  import { validatePrefix } from '../KeyBuilder';
3
- import KeyBuilderSS from '../KeyBuilderSS';
4
- import SplitsCacheInRedis from './SplitsCacheInRedis';
5
- import SegmentsCacheInRedis from './SegmentsCacheInRedis';
6
- import ImpressionsCacheInRedis from './ImpressionsCacheInRedis';
7
- import EventsCacheInRedis from './EventsCacheInRedis';
8
- import LatenciesCacheInRedis from './LatenciesCacheInRedis';
9
- import CountsCacheInRedis from './CountsCacheInRedis';
3
+ import { KeyBuilderSS } from '../KeyBuilderSS';
4
+ import { SplitsCacheInRedis } from './SplitsCacheInRedis';
5
+ import { SegmentsCacheInRedis } from './SegmentsCacheInRedis';
6
+ import { ImpressionsCacheInRedis } from './ImpressionsCacheInRedis';
7
+ import { EventsCacheInRedis } from './EventsCacheInRedis';
8
+ import { LatenciesCacheInRedis } from './LatenciesCacheInRedis';
9
+ import { CountsCacheInRedis } from './CountsCacheInRedis';
10
10
  import { STORAGE_REDIS } from '../../utils/constants';
11
11
  /**
12
12
  * InRedis storage factory for consumer server-side SplitFactory, that uses `Ioredis` Redis client for Node.
@@ -1,7 +1,7 @@
1
1
  import { __extends } from "tslib";
2
2
  import { isFiniteNumber, isNaNNumber } from '../../utils/lang';
3
3
  import { LOG_PREFIX } from './constants';
4
- import AbstractSplitsCacheAsync from '../AbstractSplitsCacheAsync';
4
+ import { AbstractSplitsCacheAsync } from '../AbstractSplitsCacheAsync';
5
5
  /**
6
6
  * ISplitsCacheAsync implementation for pluggable storages.
7
7
  */
@@ -1,5 +1,5 @@
1
1
  import { __assign } from "tslib";
2
- import KeyBuilderSS from '../KeyBuilderSS';
2
+ import { KeyBuilderSS } from '../KeyBuilderSS';
3
3
  import { SplitsCachePluggable } from './SplitsCachePluggable';
4
4
  import { SegmentsCachePluggable } from './SegmentsCachePluggable';
5
5
  import { ImpressionsCachePluggable } from './ImpressionsCachePluggable';
@@ -8,9 +8,9 @@ import { wrapperAdapter, METHODS_TO_PROMISE_WRAP } from './wrapperAdapter';
8
8
  import { isObject } from '../../utils/lang';
9
9
  import { validatePrefix } from '../KeyBuilder';
10
10
  import { CONSUMER_PARTIAL_MODE, STORAGE_PLUGGABLE } from '../../utils/constants';
11
- import ImpressionsCacheInMemory from '../inMemory/ImpressionsCacheInMemory';
12
- import EventsCacheInMemory from '../inMemory/EventsCacheInMemory';
13
- import ImpressionCountsCacheInMemory from '../inMemory/ImpressionCountsCacheInMemory';
11
+ import { ImpressionsCacheInMemory } from '../inMemory/ImpressionsCacheInMemory';
12
+ import { EventsCacheInMemory } from '../inMemory/EventsCacheInMemory';
13
+ import { ImpressionCountsCacheInMemory } from '../inMemory/ImpressionCountsCacheInMemory';
14
14
  var NO_VALID_WRAPPER = 'Expecting pluggable storage `wrapper` in options, but no valid wrapper instance was provided.';
15
15
  var NO_VALID_WRAPPER_INTERFACE = 'The provided wrapper instance doesn’t follow the expected interface. Check our docs.';
16
16
  /**
@@ -1,5 +1,5 @@
1
1
  import { isString } from '../../../utils/lang';
2
- export default function parseCondition(data) {
2
+ export function parseCondition(data) {
3
3
  var treatment = data.treatment;
4
4
  if (data.keys) {
5
5
  return {
@@ -5,7 +5,7 @@ import path from 'path';
5
5
  // @ts-ignore
6
6
  import yaml from 'js-yaml';
7
7
  import { isString, endsWith, find, forOwn, uniq, } from '../../../utils/lang';
8
- import parseCondition from './parseCondition';
8
+ import { parseCondition } from './parseCondition';
9
9
  var logPrefix = 'sync:offline:splits-fetcher: ';
10
10
  var DEFAULT_FILENAME = '.split';
11
11
  function configFilesPath(configFilePath) {
@@ -1,5 +1,5 @@
1
1
  import { isObject, forOwn } from '../../../utils/lang';
2
- import parseCondition from './parseCondition';
2
+ import { parseCondition } from './parseCondition';
3
3
  function hasTreatmentChanged(prev, curr) {
4
4
  if (typeof prev !== typeof curr)
5
5
  return true;
@@ -1,5 +1,5 @@
1
- import fromObjectSyncTaskFactory from './syncTasks/fromObjectSyncTask';
2
- import objectAssign from 'object-assign';
1
+ import { fromObjectSyncTaskFactory } from './syncTasks/fromObjectSyncTask';
2
+ import { objectAssign } from '../../utils/lang/objectAssign';
3
3
  import { SDK_SEGMENTS_ARRIVED } from '../../readiness/constants';
4
4
  function flush() {
5
5
  return Promise.resolve();
@@ -1,5 +1,5 @@
1
1
  import { forOwn } from '../../../utils/lang';
2
- import syncTaskFactory from '../../syncTask';
2
+ import { syncTaskFactory } from '../../syncTask';
3
3
  import { CONTROL } from '../../../utils/constants';
4
4
  import { SDK_SPLITS_ARRIVED, SDK_SEGMENTS_ARRIVED, SDK_SPLITS_CACHE_LOADED } from '../../../readiness/constants';
5
5
  import { SYNC_OFFLINE_DATA, ERROR_SYNC_OFFLINE_LOADING } from '../../../logger/constants';
@@ -63,6 +63,6 @@ export function fromObjectUpdaterFactory(splitsParser, storage, readiness, setti
63
63
  /**
64
64
  * PollingManager in Offline mode
65
65
  */
66
- export default function fromObjectSyncTaskFactory(splitsParser, storage, readiness, settings) {
66
+ export function fromObjectSyncTaskFactory(splitsParser, storage, readiness, settings) {
67
67
  return syncTaskFactory(settings.log, fromObjectUpdaterFactory(splitsParser, storage, readiness, settings), settings.scheduler.offlineRefreshRate, 'offlineUpdater');
68
68
  }
@@ -2,7 +2,7 @@
2
2
  * Factory of MySegments fetcher.
3
3
  * MySegments fetcher is a wrapper around `mySegments` API service that parses the response and handle errors.
4
4
  */
5
- export default function mySegmentsFetcherFactory(fetchMySegments, userMatchingKey) {
5
+ export function mySegmentsFetcherFactory(fetchMySegments, userMatchingKey) {
6
6
  return function mySegmentsFetcher(noCache,
7
7
  // Optional decorator for `fetchMySegments` promise, such as timeout or time tracker
8
8
  decorator) {
@@ -18,7 +18,7 @@ function greedyFetch(fetchSegmentChanges, since, segmentName, noCache) {
18
18
  * Factory of SegmentChanges fetcher.
19
19
  * SegmentChanges fetcher is a wrapper around `segmentChanges` API service that parses the response and handle errors and retries.
20
20
  */
21
- export default function segmentChangesFetcherFactory(fetchSegmentChanges) {
21
+ export function segmentChangesFetcherFactory(fetchSegmentChanges) {
22
22
  return function segmentChangesFetcher(since, segmentName, noCache,
23
23
  // Optional decorator for `fetchMySegments` promise, such as timeout or time tracker
24
24
  decorator) {
@@ -2,7 +2,7 @@
2
2
  * Factory of SplitChanges fetcher.
3
3
  * SplitChanges fetcher is a wrapper around `splitChanges` API service that parses the response and handle errors.
4
4
  */
5
- export default function splitChangesFetcherFactory(fetchSplitChanges) {
5
+ export function splitChangesFetcherFactory(fetchSplitChanges) {
6
6
  return function splitChangesFetcher(since, noCache,
7
7
  // Optional decorator for `fetchSplitChanges` promise, such as timeout or time tracker
8
8
  decorator) {
@@ -1,6 +1,6 @@
1
1
  import { forOwn } from '../../utils/lang';
2
- import mySegmentsSyncTaskFactory from './syncTasks/mySegmentsSyncTask';
3
- import splitsSyncTaskFactory from './syncTasks/splitsSyncTask';
2
+ import { mySegmentsSyncTaskFactory } from './syncTasks/mySegmentsSyncTask';
3
+ import { splitsSyncTaskFactory } from './syncTasks/splitsSyncTask';
4
4
  import { getMatching } from '../../utils/key';
5
5
  import { SDK_SPLITS_ARRIVED, SDK_SEGMENTS_ARRIVED } from '../../readiness/constants';
6
6
  import { POLLING_SMART_PAUSING, POLLING_START, POLLING_STOP } from '../../logger/constants';
@@ -8,7 +8,7 @@ import { POLLING_SMART_PAUSING, POLLING_START, POLLING_STOP } from '../../logger
8
8
  * Expose start / stop mechanism for polling data from services.
9
9
  * For client-side API with multiple clients.
10
10
  */
11
- export default function pollingManagerCSFactory(splitApi, storage, readiness, settings) {
11
+ export function pollingManagerCSFactory(splitApi, storage, readiness, settings) {
12
12
  var log = settings.log;
13
13
  var splitsSyncTask = splitsSyncTaskFactory(splitApi.fetchSplitChanges, storage, readiness, settings);
14
14
  // Map of matching keys to their corresponding MySegmentsSyncTask.