@splitsoftware/splitio-commons 2.0.0-rc.3 → 2.0.0-rc.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGES.txt +1 -0
- package/cjs/integrations/pluggable.js +2 -2
- package/cjs/logger/sdkLogger.js +2 -2
- package/cjs/readiness/sdkReadinessManager.js +2 -21
- package/cjs/sdkClient/client.js +0 -1
- package/cjs/sdkClient/clientAttributesDecoration.js +9 -9
- package/cjs/sdkClient/clientCS.js +2 -2
- package/cjs/services/splitApi.js +13 -13
- package/cjs/services/splitHttpClient.js +2 -2
- package/cjs/storages/AbstractSplitsCacheAsync.js +1 -4
- package/cjs/storages/AbstractSplitsCacheSync.js +1 -4
- package/cjs/storages/dataLoader.js +5 -6
- package/cjs/storages/findLatencyIndex.js +1 -1
- package/cjs/storages/inLocalStorage/SplitsCacheInLocal.js +1 -6
- package/cjs/storages/inMemory/AttributesCacheInMemory.js +10 -10
- package/cjs/storages/inMemory/EventsCacheInMemory.js +1 -1
- package/cjs/storages/inMemory/ImpressionsCacheInMemory.js +1 -1
- package/cjs/storages/inMemory/InMemoryStorage.js +1 -1
- package/cjs/storages/inMemory/InMemoryStorageCS.js +1 -1
- package/cjs/storages/inMemory/UniqueKeysCacheInMemoryCS.js +1 -1
- package/cjs/storages/inRedis/SplitsCacheInRedis.js +1 -3
- package/cjs/storages/inRedis/TelemetryCacheInRedis.js +3 -3
- package/cjs/storages/inRedis/UniqueKeysCacheInRedis.js +1 -1
- package/cjs/storages/pluggable/EventsCachePluggable.js +1 -1
- package/cjs/storages/pluggable/ImpressionsCachePluggable.js +1 -1
- package/cjs/storages/pluggable/SegmentsCachePluggable.js +1 -1
- package/cjs/storages/pluggable/SplitsCachePluggable.js +3 -3
- package/cjs/storages/pluggable/TelemetryCachePluggable.js +3 -3
- package/cjs/storages/pluggable/UniqueKeysCachePluggable.js +1 -1
- package/cjs/storages/pluggable/inMemoryWrapper.js +1 -1
- package/cjs/storages/pluggable/index.js +1 -1
- package/cjs/storages/pluggable/wrapperAdapter.js +2 -2
- package/cjs/sync/offline/splitsParser/splitsParserFromSettings.js +1 -1
- package/cjs/sync/offline/syncManagerOffline.js +1 -1
- package/cjs/sync/polling/updaters/mySegmentsUpdater.js +3 -3
- package/cjs/sync/polling/updaters/segmentChangesUpdater.js +8 -8
- package/cjs/sync/polling/updaters/splitChangesUpdater.js +13 -13
- package/cjs/sync/streaming/AuthClient/index.js +2 -2
- package/cjs/sync/streaming/SSEClient/index.js +4 -7
- package/cjs/sync/streaming/SSEHandler/NotificationKeeper.js +1 -1
- package/cjs/sync/streaming/SSEHandler/NotificationParser.js +5 -4
- package/cjs/sync/streaming/SSEHandler/index.js +2 -2
- package/cjs/sync/streaming/UpdateWorkers/MySegmentsUpdateWorker.js +3 -3
- package/cjs/sync/streaming/UpdateWorkers/SegmentsUpdateWorker.js +2 -2
- package/cjs/sync/streaming/UpdateWorkers/SplitsUpdateWorker.js +4 -4
- package/cjs/sync/streaming/parseUtils.js +13 -13
- package/cjs/sync/syncManagerOnline.js +2 -2
- package/cjs/sync/syncTask.js +4 -4
- package/cjs/trackers/eventTracker.js +2 -2
- package/cjs/trackers/impressionsTracker.js +5 -5
- package/cjs/trackers/strategy/strategyDebug.js +1 -1
- package/cjs/trackers/strategy/strategyNone.js +2 -2
- package/cjs/trackers/strategy/strategyOptimized.js +2 -2
- package/cjs/trackers/uniqueKeysTracker.js +3 -3
- package/cjs/utils/Backoff.js +0 -4
- package/cjs/utils/Semver.js +1 -1
- package/cjs/utils/base64/index.js +2 -2
- package/cjs/utils/decompress/index.js +4 -4
- package/cjs/utils/lang/binarySearch.js +2 -2
- package/cjs/utils/murmur3/murmur3_128.js +1 -1
- package/cjs/utils/murmur3/murmur3_128_x86.js +1 -1
- package/cjs/utils/murmur3/murmur3_64.js +1 -1
- package/cjs/utils/murmur3/utfx.js +10 -17
- package/cjs/utils/promise/wrapper.js +2 -2
- package/cjs/utils/settingsValidation/index.js +2 -2
- package/cjs/utils/settingsValidation/integrations/common.js +4 -4
- package/cjs/utils/settingsValidation/integrations/configurable.js +3 -3
- package/cjs/utils/settingsValidation/integrations/pluggable.js +2 -2
- package/cjs/utils/settingsValidation/logger/builtinLogger.js +1 -1
- package/cjs/utils/settingsValidation/logger/commons.js +1 -1
- package/cjs/utils/settingsValidation/logger/pluggableLogger.js +1 -1
- package/cjs/utils/settingsValidation/splitFilters.js +8 -11
- package/cjs/utils/settingsValidation/storage/storageCS.js +2 -2
- package/cjs/utils/settingsValidation/url.js +3 -3
- package/esm/integrations/pluggable.js +2 -2
- package/esm/logger/sdkLogger.js +2 -2
- package/esm/readiness/sdkReadinessManager.js +2 -21
- package/esm/sdkClient/client.js +0 -1
- package/esm/sdkClient/clientAttributesDecoration.js +9 -9
- package/esm/sdkClient/clientCS.js +2 -2
- package/esm/services/splitApi.js +13 -13
- package/esm/services/splitHttpClient.js +2 -2
- package/esm/storages/AbstractSplitsCacheAsync.js +1 -4
- package/esm/storages/AbstractSplitsCacheSync.js +1 -4
- package/esm/storages/dataLoader.js +5 -6
- package/esm/storages/findLatencyIndex.js +1 -1
- package/esm/storages/inLocalStorage/SplitsCacheInLocal.js +1 -6
- package/esm/storages/inMemory/AttributesCacheInMemory.js +10 -10
- package/esm/storages/inMemory/EventsCacheInMemory.js +1 -1
- package/esm/storages/inMemory/ImpressionsCacheInMemory.js +1 -1
- package/esm/storages/inMemory/InMemoryStorage.js +1 -1
- package/esm/storages/inMemory/InMemoryStorageCS.js +1 -1
- package/esm/storages/inMemory/UniqueKeysCacheInMemoryCS.js +1 -1
- package/esm/storages/inRedis/SplitsCacheInRedis.js +1 -3
- package/esm/storages/inRedis/TelemetryCacheInRedis.js +3 -3
- package/esm/storages/inRedis/UniqueKeysCacheInRedis.js +1 -1
- package/esm/storages/pluggable/EventsCachePluggable.js +1 -1
- package/esm/storages/pluggable/ImpressionsCachePluggable.js +1 -1
- package/esm/storages/pluggable/SegmentsCachePluggable.js +1 -1
- package/esm/storages/pluggable/SplitsCachePluggable.js +3 -3
- package/esm/storages/pluggable/TelemetryCachePluggable.js +3 -3
- package/esm/storages/pluggable/UniqueKeysCachePluggable.js +1 -1
- package/esm/storages/pluggable/inMemoryWrapper.js +1 -1
- package/esm/storages/pluggable/index.js +1 -1
- package/esm/storages/pluggable/wrapperAdapter.js +2 -2
- package/esm/sync/offline/splitsParser/splitsParserFromSettings.js +1 -1
- package/esm/sync/offline/syncManagerOffline.js +1 -1
- package/esm/sync/polling/updaters/mySegmentsUpdater.js +3 -3
- package/esm/sync/polling/updaters/segmentChangesUpdater.js +8 -8
- package/esm/sync/polling/updaters/splitChangesUpdater.js +13 -13
- package/esm/sync/streaming/AuthClient/index.js +2 -2
- package/esm/sync/streaming/SSEClient/index.js +4 -7
- package/esm/sync/streaming/SSEHandler/NotificationKeeper.js +1 -1
- package/esm/sync/streaming/SSEHandler/NotificationParser.js +5 -4
- package/esm/sync/streaming/SSEHandler/index.js +2 -2
- package/esm/sync/streaming/UpdateWorkers/MySegmentsUpdateWorker.js +3 -3
- package/esm/sync/streaming/UpdateWorkers/SegmentsUpdateWorker.js +2 -2
- package/esm/sync/streaming/UpdateWorkers/SplitsUpdateWorker.js +4 -4
- package/esm/sync/streaming/parseUtils.js +13 -13
- package/esm/sync/syncManagerOnline.js +2 -2
- package/esm/sync/syncTask.js +4 -4
- package/esm/trackers/eventTracker.js +2 -2
- package/esm/trackers/impressionsTracker.js +5 -5
- package/esm/trackers/strategy/strategyDebug.js +1 -1
- package/esm/trackers/strategy/strategyNone.js +2 -2
- package/esm/trackers/strategy/strategyOptimized.js +2 -2
- package/esm/trackers/uniqueKeysTracker.js +3 -3
- package/esm/utils/Backoff.js +0 -4
- package/esm/utils/Semver.js +1 -1
- package/esm/utils/base64/index.js +2 -2
- package/esm/utils/decompress/index.js +4 -4
- package/esm/utils/lang/binarySearch.js +2 -2
- package/esm/utils/murmur3/murmur3_128.js +1 -1
- package/esm/utils/murmur3/murmur3_128_x86.js +1 -1
- package/esm/utils/murmur3/murmur3_64.js +1 -1
- package/esm/utils/murmur3/utfx.js +10 -17
- package/esm/utils/promise/wrapper.js +2 -2
- package/esm/utils/settingsValidation/index.js +2 -2
- package/esm/utils/settingsValidation/integrations/common.js +4 -4
- package/esm/utils/settingsValidation/integrations/configurable.js +3 -3
- package/esm/utils/settingsValidation/integrations/pluggable.js +2 -2
- package/esm/utils/settingsValidation/logger/builtinLogger.js +1 -1
- package/esm/utils/settingsValidation/logger/commons.js +1 -1
- package/esm/utils/settingsValidation/logger/pluggableLogger.js +1 -1
- package/esm/utils/settingsValidation/splitFilters.js +8 -11
- package/esm/utils/settingsValidation/storage/storageCS.js +2 -2
- package/esm/utils/settingsValidation/url.js +3 -3
- package/package.json +5 -3
- package/src/dtos/types.ts +1 -1
- package/src/evaluator/Engine.ts +1 -1
- package/src/evaluator/combiners/ifelseif.ts +1 -1
- package/src/evaluator/condition/index.ts +1 -1
- package/src/evaluator/index.ts +1 -1
- package/src/evaluator/parser/index.ts +1 -1
- package/src/evaluator/types.ts +1 -1
- package/src/evaluator/value/index.ts +1 -1
- package/src/evaluator/value/sanitize.ts +1 -1
- package/src/integrations/pluggable.ts +3 -3
- package/src/integrations/types.ts +3 -2
- package/src/listeners/browser.ts +3 -2
- package/src/logger/index.ts +6 -6
- package/src/logger/sdkLogger.ts +4 -4
- package/src/logger/types.ts +11 -13
- package/src/readiness/readinessManager.ts +5 -4
- package/src/readiness/sdkReadinessManager.ts +6 -23
- package/src/readiness/types.ts +5 -4
- package/src/sdkClient/client.ts +7 -8
- package/src/sdkClient/clientAttributesDecoration.ts +11 -11
- package/src/sdkClient/clientCS.ts +5 -5
- package/src/sdkClient/clientInputValidation.ts +3 -2
- package/src/sdkClient/identity.ts +1 -1
- package/src/sdkClient/sdkClient.ts +3 -3
- package/src/sdkClient/sdkClientMethod.ts +2 -2
- package/src/sdkClient/sdkClientMethodCS.ts +5 -5
- package/src/sdkFactory/index.ts +3 -3
- package/src/sdkFactory/types.ts +7 -6
- package/src/sdkManager/index.ts +2 -1
- package/src/services/splitApi.ts +13 -13
- package/src/services/splitHttpClient.ts +2 -2
- package/src/storages/AbstractMySegmentsCacheSync.ts +1 -1
- package/src/storages/AbstractSplitsCacheAsync.ts +1 -4
- package/src/storages/AbstractSplitsCacheSync.ts +1 -4
- package/src/storages/dataLoader.ts +7 -8
- package/src/storages/findLatencyIndex.ts +1 -1
- package/src/storages/inLocalStorage/SplitsCacheInLocal.ts +1 -6
- package/src/storages/inMemory/AttributesCacheInMemory.ts +11 -11
- package/src/storages/inMemory/EventsCacheInMemory.ts +2 -2
- package/src/storages/inMemory/ImpressionsCacheInMemory.ts +5 -5
- package/src/storages/inMemory/InMemoryStorage.ts +1 -1
- package/src/storages/inMemory/InMemoryStorageCS.ts +1 -1
- package/src/storages/inMemory/UniqueKeysCacheInMemoryCS.ts +1 -1
- package/src/storages/inRedis/EventsCacheInRedis.ts +1 -1
- package/src/storages/inRedis/ImpressionsCacheInRedis.ts +2 -2
- package/src/storages/inRedis/SplitsCacheInRedis.ts +1 -3
- package/src/storages/inRedis/TelemetryCacheInRedis.ts +3 -3
- package/src/storages/inRedis/UniqueKeysCacheInRedis.ts +1 -1
- package/src/storages/pluggable/EventsCachePluggable.ts +2 -2
- package/src/storages/pluggable/ImpressionsCachePluggable.ts +3 -3
- package/src/storages/pluggable/SegmentsCachePluggable.ts +1 -1
- package/src/storages/pluggable/SplitsCachePluggable.ts +3 -3
- package/src/storages/pluggable/TelemetryCachePluggable.ts +3 -3
- package/src/storages/pluggable/UniqueKeysCachePluggable.ts +1 -1
- package/src/storages/pluggable/inMemoryWrapper.ts +1 -1
- package/src/storages/pluggable/index.ts +1 -1
- package/src/storages/pluggable/wrapperAdapter.ts +2 -2
- package/src/storages/types.ts +51 -68
- package/src/storages/utils.ts +3 -2
- package/src/sync/offline/splitsParser/splitsParserFromSettings.ts +3 -3
- package/src/sync/offline/syncManagerOffline.ts +1 -1
- package/src/sync/polling/updaters/mySegmentsUpdater.ts +3 -3
- package/src/sync/polling/updaters/segmentChangesUpdater.ts +8 -8
- package/src/sync/polling/updaters/splitChangesUpdater.ts +13 -13
- package/src/sync/streaming/AuthClient/index.ts +2 -2
- package/src/sync/streaming/SSEClient/index.ts +4 -7
- package/src/sync/streaming/SSEHandler/NotificationKeeper.ts +1 -1
- package/src/sync/streaming/SSEHandler/NotificationParser.ts +5 -4
- package/src/sync/streaming/SSEHandler/index.ts +2 -2
- package/src/sync/streaming/UpdateWorkers/MySegmentsUpdateWorker.ts +3 -3
- package/src/sync/streaming/UpdateWorkers/SegmentsUpdateWorker.ts +2 -2
- package/src/sync/streaming/UpdateWorkers/SplitsUpdateWorker.ts +4 -4
- package/src/sync/streaming/parseUtils.ts +13 -13
- package/src/sync/streaming/types.ts +2 -2
- package/src/sync/submitters/impressionsSubmitter.ts +2 -2
- package/src/sync/submitters/telemetrySubmitter.ts +4 -3
- package/src/sync/submitters/types.ts +1 -1
- package/src/sync/syncManagerOnline.ts +2 -2
- package/src/sync/syncTask.ts +4 -4
- package/src/trackers/eventTracker.ts +4 -3
- package/src/trackers/impressionObserver/ImpressionObserver.ts +4 -4
- package/src/trackers/impressionObserver/buildKey.ts +2 -2
- package/src/trackers/impressionObserver/impressionObserverCS.ts +2 -2
- package/src/trackers/impressionObserver/impressionObserverSS.ts +2 -2
- package/src/trackers/impressionObserver/types.ts +2 -2
- package/src/trackers/impressionsTracker.ts +8 -7
- package/src/trackers/strategy/strategyDebug.ts +3 -3
- package/src/trackers/strategy/strategyNone.ts +4 -4
- package/src/trackers/strategy/strategyOptimized.ts +5 -5
- package/src/trackers/types.ts +5 -5
- package/src/trackers/uniqueKeysTracker.ts +3 -3
- package/src/types.ts +37 -1355
- package/src/utils/Backoff.ts +0 -4
- package/src/utils/MinEventEmitter.ts +2 -3
- package/src/utils/MinEvents.ts +2 -2
- package/src/utils/Semver.ts +1 -1
- package/src/utils/base64/index.ts +2 -2
- package/src/utils/constants/index.ts +9 -10
- package/src/utils/decompress/index.ts +4 -4
- package/src/utils/inputValidation/attributes.ts +1 -1
- package/src/utils/inputValidation/eventProperties.ts +1 -1
- package/src/utils/inputValidation/key.ts +1 -1
- package/src/utils/inputValidation/preloadedData.ts +1 -2
- package/src/utils/inputValidation/trafficTypeExistence.ts +2 -2
- package/src/utils/key/index.ts +1 -1
- package/src/utils/lang/binarySearch.ts +2 -2
- package/src/utils/murmur3/murmur3_128.ts +1 -1
- package/src/utils/murmur3/murmur3_128_x86.ts +1 -1
- package/src/utils/murmur3/murmur3_64.ts +1 -1
- package/src/utils/murmur3/utfx.ts +10 -17
- package/src/utils/promise/wrapper.ts +2 -2
- package/src/utils/settingsValidation/consent.ts +2 -2
- package/src/utils/settingsValidation/impressionsMode.ts +1 -1
- package/src/utils/settingsValidation/index.ts +2 -2
- package/src/utils/settingsValidation/integrations/common.ts +4 -4
- package/src/utils/settingsValidation/integrations/configurable.ts +3 -3
- package/src/utils/settingsValidation/integrations/pluggable.ts +2 -2
- package/src/utils/settingsValidation/logger/builtinLogger.ts +3 -3
- package/src/utils/settingsValidation/logger/commons.ts +3 -3
- package/src/utils/settingsValidation/logger/pluggableLogger.ts +3 -3
- package/src/utils/settingsValidation/splitFilters.ts +9 -12
- package/src/utils/settingsValidation/storage/storageCS.ts +5 -4
- package/src/utils/settingsValidation/url.ts +3 -3
- package/types/index.d.ts +5 -5
- package/types/splitio.d.ts +1941 -0
- package/types/consent/index.d.ts +0 -2
- package/types/consent/sdkUserConsent.d.ts +0 -13
- package/types/dtos/types.d.ts +0 -209
- package/types/evaluator/Engine.d.ts +0 -15
- package/types/evaluator/combiners/and.d.ts +0 -4
- package/types/evaluator/combiners/ifelseif.d.ts +0 -3
- package/types/evaluator/condition/engineUtils.d.ts +0 -11
- package/types/evaluator/condition/index.d.ts +0 -6
- package/types/evaluator/convertions/index.d.ts +0 -2
- package/types/evaluator/index.d.ts +0 -8
- package/types/evaluator/matchers/all.d.ts +0 -1
- package/types/evaluator/matchers/between.d.ts +0 -2
- package/types/evaluator/matchers/boolean.d.ts +0 -1
- package/types/evaluator/matchers/cont_all.d.ts +0 -1
- package/types/evaluator/matchers/cont_any.d.ts +0 -1
- package/types/evaluator/matchers/cont_str.d.ts +0 -1
- package/types/evaluator/matchers/dependency.d.ts +0 -5
- package/types/evaluator/matchers/eq.d.ts +0 -1
- package/types/evaluator/matchers/eq_set.d.ts +0 -1
- package/types/evaluator/matchers/ew.d.ts +0 -1
- package/types/evaluator/matchers/gte.d.ts +0 -1
- package/types/evaluator/matchers/index.d.ts +0 -7
- package/types/evaluator/matchers/large_segment.d.ts +0 -5
- package/types/evaluator/matchers/lte.d.ts +0 -1
- package/types/evaluator/matchers/matcherTypes.d.ts +0 -10
- package/types/evaluator/matchers/part_of.d.ts +0 -1
- package/types/evaluator/matchers/segment.d.ts +0 -5
- package/types/evaluator/matchers/semver_between.d.ts +0 -2
- package/types/evaluator/matchers/semver_eq.d.ts +0 -1
- package/types/evaluator/matchers/semver_gte.d.ts +0 -1
- package/types/evaluator/matchers/semver_inlist.d.ts +0 -1
- package/types/evaluator/matchers/semver_lte.d.ts +0 -1
- package/types/evaluator/matchers/string.d.ts +0 -1
- package/types/evaluator/matchers/sw.d.ts +0 -1
- package/types/evaluator/matchers/whitelist.d.ts +0 -1
- package/types/evaluator/matchersTransform/index.d.ts +0 -6
- package/types/evaluator/matchersTransform/segment.d.ts +0 -5
- package/types/evaluator/matchersTransform/unaryNumeric.d.ts +0 -5
- package/types/evaluator/matchersTransform/whitelist.d.ts +0 -5
- package/types/evaluator/parser/index.d.ts +0 -5
- package/types/evaluator/treatments/index.d.ts +0 -8
- package/types/evaluator/types.d.ts +0 -28
- package/types/evaluator/value/index.d.ts +0 -7
- package/types/evaluator/value/sanitize.d.ts +0 -7
- package/types/integrations/pluggable.d.ts +0 -11
- package/types/integrations/types.d.ts +0 -18
- package/types/listeners/browser.d.ts +0 -40
- package/types/listeners/node.d.ts +0 -22
- package/types/listeners/types.d.ts +0 -4
- package/types/logger/browser/DebugLogger.d.ts +0 -2
- package/types/logger/browser/ErrorLogger.d.ts +0 -2
- package/types/logger/browser/InfoLogger.d.ts +0 -2
- package/types/logger/browser/WarnLogger.d.ts +0 -2
- package/types/logger/constants.d.ts +0 -134
- package/types/logger/index.d.ts +0 -21
- package/types/logger/messages/debug.d.ts +0 -1
- package/types/logger/messages/error.d.ts +0 -1
- package/types/logger/messages/info.d.ts +0 -1
- package/types/logger/messages/warn.d.ts +0 -1
- package/types/logger/sdkLogger.d.ts +0 -8
- package/types/logger/types.d.ts +0 -17
- package/types/readiness/constants.d.ts +0 -7
- package/types/readiness/readinessManager.d.ts +0 -6
- package/types/readiness/sdkReadinessManager.d.ts +0 -10
- package/types/readiness/types.d.ts +0 -67
- package/types/sdkClient/client.d.ts +0 -6
- package/types/sdkClient/clientAttributesDecoration.d.ts +0 -55
- package/types/sdkClient/clientCS.d.ts +0 -9
- package/types/sdkClient/clientInputValidation.d.ts +0 -7
- package/types/sdkClient/identity.d.ts +0 -2
- package/types/sdkClient/sdkClient.d.ts +0 -6
- package/types/sdkClient/sdkClientMethod.d.ts +0 -6
- package/types/sdkClient/sdkClientMethodCS.d.ts +0 -7
- package/types/sdkFactory/index.d.ts +0 -6
- package/types/sdkFactory/types.d.ts +0 -85
- package/types/sdkManager/index.d.ts +0 -4
- package/types/services/decorateHeaders.d.ts +0 -2
- package/types/services/splitApi.d.ts +0 -12
- package/types/services/splitHttpClient.d.ts +0 -10
- package/types/services/types.d.ts +0 -54
- package/types/storages/AbstractMySegmentsCacheSync.d.ts +0 -39
- package/types/storages/AbstractSplitsCacheAsync.d.ts +0 -38
- package/types/storages/AbstractSplitsCacheSync.d.ts +0 -43
- package/types/storages/KeyBuilder.d.ts +0 -22
- package/types/storages/KeyBuilderCS.d.ts +0 -20
- package/types/storages/KeyBuilderSS.d.ts +0 -20
- package/types/storages/dataLoader.d.ts +0 -10
- package/types/storages/findLatencyIndex.d.ts +0 -7
- package/types/storages/inLocalStorage/MySegmentsCacheInLocal.d.ts +0 -15
- package/types/storages/inLocalStorage/SplitsCacheInLocal.d.ts +0 -54
- package/types/storages/inLocalStorage/constants.d.ts +0 -2
- package/types/storages/inLocalStorage/index.d.ts +0 -8
- package/types/storages/inMemory/AttributesCacheInMemory.d.ts +0 -44
- package/types/storages/inMemory/EventsCacheInMemory.d.ts +0 -35
- package/types/storages/inMemory/ImpressionCountsCacheInMemory.d.ts +0 -28
- package/types/storages/inMemory/ImpressionsCacheInMemory.d.ts +0 -30
- package/types/storages/inMemory/InMemoryStorage.d.ts +0 -10
- package/types/storages/inMemory/InMemoryStorageCS.d.ts +0 -10
- package/types/storages/inMemory/MySegmentsCacheInMemory.d.ts +0 -16
- package/types/storages/inMemory/SegmentsCacheInMemory.d.ts +0 -17
- package/types/storages/inMemory/SplitsCacheInMemory.d.ts +0 -27
- package/types/storages/inMemory/TelemetryCacheInMemory.d.ts +0 -71
- package/types/storages/inMemory/UniqueKeysCacheInMemory.d.ts +0 -34
- package/types/storages/inMemory/UniqueKeysCacheInMemoryCS.d.ts +0 -35
- package/types/storages/inRedis/EventsCacheInRedis.d.ts +0 -32
- package/types/storages/inRedis/ImpressionCountsCacheInRedis.d.ts +0 -17
- package/types/storages/inRedis/ImpressionsCacheInRedis.d.ts +0 -17
- package/types/storages/inRedis/RedisAdapter.d.ts +0 -24
- package/types/storages/inRedis/SegmentsCacheInRedis.d.ts +0 -21
- package/types/storages/inRedis/SplitsCacheInRedis.d.ts +0 -95
- package/types/storages/inRedis/TelemetryCacheInRedis.d.ts +0 -35
- package/types/storages/inRedis/UniqueKeysCacheInRedis.d.ts +0 -22
- package/types/storages/inRedis/constants.d.ts +0 -4
- package/types/storages/inRedis/index.d.ts +0 -10
- package/types/storages/pluggable/EventsCachePluggable.d.ts +0 -38
- package/types/storages/pluggable/ImpressionCountsCachePluggable.d.ts +0 -16
- package/types/storages/pluggable/ImpressionsCachePluggable.d.ts +0 -34
- package/types/storages/pluggable/SegmentsCachePluggable.d.ts +0 -42
- package/types/storages/pluggable/SplitsCachePluggable.d.ts +0 -98
- package/types/storages/pluggable/TelemetryCachePluggable.d.ts +0 -34
- package/types/storages/pluggable/UniqueKeysCachePluggable.d.ts +0 -20
- package/types/storages/pluggable/constants.d.ts +0 -1
- package/types/storages/pluggable/inMemoryWrapper.d.ts +0 -12
- package/types/storages/pluggable/index.d.ts +0 -9
- package/types/storages/pluggable/wrapperAdapter.d.ts +0 -12
- package/types/storages/types.d.ts +0 -407
- package/types/storages/utils.d.ts +0 -8
- package/types/sync/offline/LocalhostFromObject.d.ts +0 -1
- package/types/sync/offline/splitsParser/parseCondition.d.ts +0 -7
- package/types/sync/offline/splitsParser/splitsParserFromSettings.d.ts +0 -3
- package/types/sync/offline/splitsParser/types.d.ts +0 -3
- package/types/sync/offline/syncManagerOffline.d.ts +0 -10
- package/types/sync/offline/syncTasks/fromObjectSyncTask.d.ts +0 -17
- package/types/sync/polling/fetchers/mySegmentsFetcher.d.ts +0 -7
- package/types/sync/polling/fetchers/segmentChangesFetcher.d.ts +0 -7
- package/types/sync/polling/fetchers/splitChangesFetcher.d.ts +0 -7
- package/types/sync/polling/fetchers/types.d.ts +0 -5
- package/types/sync/polling/pollingManagerCS.d.ts +0 -7
- package/types/sync/polling/pollingManagerSS.d.ts +0 -6
- package/types/sync/polling/syncTasks/mySegmentsSyncTask.d.ts +0 -9
- package/types/sync/polling/syncTasks/segmentsSyncTask.d.ts +0 -9
- package/types/sync/polling/syncTasks/splitsSyncTask.d.ts +0 -9
- package/types/sync/polling/types.d.ts +0 -33
- package/types/sync/polling/updaters/mySegmentsUpdater.d.ts +0 -14
- package/types/sync/polling/updaters/segmentChangesUpdater.d.ts +0 -18
- package/types/sync/polling/updaters/splitChangesUpdater.d.ts +0 -41
- package/types/sync/streaming/AuthClient/index.d.ts +0 -12
- package/types/sync/streaming/AuthClient/types.d.ts +0 -17
- package/types/sync/streaming/SSEClient/index.d.ts +0 -34
- package/types/sync/streaming/SSEClient/types.d.ts +0 -11
- package/types/sync/streaming/SSEHandler/NotificationKeeper.d.ts +0 -14
- package/types/sync/streaming/SSEHandler/NotificationParser.d.ts +0 -20
- package/types/sync/streaming/SSEHandler/index.d.ts +0 -11
- package/types/sync/streaming/SSEHandler/types.d.ts +0 -72
- package/types/sync/streaming/UpdateWorkers/MySegmentsUpdateWorker.d.ts +0 -9
- package/types/sync/streaming/UpdateWorkers/SegmentsUpdateWorker.d.ts +0 -9
- package/types/sync/streaming/UpdateWorkers/SplitsUpdateWorker.d.ts +0 -14
- package/types/sync/streaming/UpdateWorkers/constants.d.ts +0 -3
- package/types/sync/streaming/UpdateWorkers/types.d.ts +0 -4
- package/types/sync/streaming/constants.d.ts +0 -34
- package/types/sync/streaming/parseUtils.d.ts +0 -34
- package/types/sync/streaming/pushManager.d.ts +0 -9
- package/types/sync/streaming/types.d.ts +0 -35
- package/types/sync/submitters/eventsSubmitter.d.ts +0 -5
- package/types/sync/submitters/impressionCountsSubmitter.d.ts +0 -10
- package/types/sync/submitters/impressionsSubmitter.d.ts +0 -11
- package/types/sync/submitters/submitter.d.ts +0 -12
- package/types/sync/submitters/submitterManager.d.ts +0 -3
- package/types/sync/submitters/telemetrySubmitter.d.ts +0 -17
- package/types/sync/submitters/types.d.ts +0 -217
- package/types/sync/submitters/uniqueKeysSubmitter.d.ts +0 -5
- package/types/sync/syncManagerOnline.d.ts +0 -13
- package/types/sync/syncTask.d.ts +0 -13
- package/types/sync/types.d.ts +0 -43
- package/types/trackers/eventTracker.d.ts +0 -10
- package/types/trackers/impressionObserver/ImpressionObserver.d.ts +0 -8
- package/types/trackers/impressionObserver/buildKey.d.ts +0 -2
- package/types/trackers/impressionObserver/impressionObserverCS.d.ts +0 -4
- package/types/trackers/impressionObserver/impressionObserverSS.d.ts +0 -4
- package/types/trackers/impressionObserver/types.d.ts +0 -4
- package/types/trackers/impressionsTracker.d.ts +0 -13
- package/types/trackers/strategy/strategyDebug.d.ts +0 -9
- package/types/trackers/strategy/strategyNone.d.ts +0 -10
- package/types/trackers/strategy/strategyOptimized.d.ts +0 -11
- package/types/trackers/telemetryTracker.d.ts +0 -3
- package/types/trackers/types.d.ts +0 -68
- package/types/trackers/uniqueKeysTracker.d.ts +0 -13
- package/types/types.d.ts +0 -1398
- package/types/utils/Backoff.d.ts +0 -25
- package/types/utils/LRUCache/LinkedList.d.ts +0 -34
- package/types/utils/LRUCache/index.d.ts +0 -15
- package/types/utils/MinEventEmitter.d.ts +0 -12
- package/types/utils/MinEvents.d.ts +0 -4
- package/types/utils/Semver.d.ts +0 -15
- package/types/utils/base64/index.d.ts +0 -30
- package/types/utils/constants/browser.d.ts +0 -1
- package/types/utils/constants/index.d.ts +0 -83
- package/types/utils/decompress/index.d.ts +0 -16
- package/types/utils/env/isLocalStorageAvailable.d.ts +0 -1
- package/types/utils/env/isNode.d.ts +0 -5
- package/types/utils/inputValidation/apiKey.d.ts +0 -7
- package/types/utils/inputValidation/attribute.d.ts +0 -2
- package/types/utils/inputValidation/attributes.d.ts +0 -4
- package/types/utils/inputValidation/event.d.ts +0 -2
- package/types/utils/inputValidation/eventProperties.d.ts +0 -6
- package/types/utils/inputValidation/eventValue.d.ts +0 -2
- package/types/utils/inputValidation/index.d.ts +0 -13
- package/types/utils/inputValidation/isOperational.d.ts +0 -4
- package/types/utils/inputValidation/key.d.ts +0 -3
- package/types/utils/inputValidation/preloadedData.d.ts +0 -3
- package/types/utils/inputValidation/split.d.ts +0 -2
- package/types/utils/inputValidation/splitExistence.d.ts +0 -7
- package/types/utils/inputValidation/splits.d.ts +0 -2
- package/types/utils/inputValidation/trafficType.d.ts +0 -2
- package/types/utils/inputValidation/trafficTypeExistence.d.ts +0 -9
- package/types/utils/jwt/index.d.ts +0 -5
- package/types/utils/jwt/types.d.ts +0 -5
- package/types/utils/key/index.d.ts +0 -8
- package/types/utils/labels/index.d.ts +0 -8
- package/types/utils/lang/binarySearch.d.ts +0 -9
- package/types/utils/lang/getFnName.d.ts +0 -4
- package/types/utils/lang/getGlobal.d.ts +0 -4
- package/types/utils/lang/index.d.ts +0 -105
- package/types/utils/lang/objectAssign.d.ts +0 -6
- package/types/utils/lang/sets.d.ts +0 -3
- package/types/utils/murmur3/common.d.ts +0 -12
- package/types/utils/murmur3/legacy.d.ts +0 -2
- package/types/utils/murmur3/murmur3.d.ts +0 -2
- package/types/utils/murmur3/murmur3_128.d.ts +0 -6
- package/types/utils/murmur3/murmur3_128_x86.d.ts +0 -7
- package/types/utils/murmur3/murmur3_64.d.ts +0 -10
- package/types/utils/murmur3/utfx.d.ts +0 -27
- package/types/utils/promise/thenable.d.ts +0 -1
- package/types/utils/promise/timeout.d.ts +0 -1
- package/types/utils/promise/wrapper.d.ts +0 -21
- package/types/utils/settingsValidation/consent.d.ts +0 -6
- package/types/utils/settingsValidation/impressionsMode.d.ts +0 -3
- package/types/utils/settingsValidation/index.d.ts +0 -50
- package/types/utils/settingsValidation/integrations/common.d.ts +0 -14
- package/types/utils/settingsValidation/integrations/configurable.d.ts +0 -13
- package/types/utils/settingsValidation/integrations/pluggable.d.ts +0 -13
- package/types/utils/settingsValidation/logger/builtinLogger.d.ts +0 -10
- package/types/utils/settingsValidation/logger/commons.d.ts +0 -9
- package/types/utils/settingsValidation/logger/pluggableLogger.d.ts +0 -11
- package/types/utils/settingsValidation/mode.d.ts +0 -5
- package/types/utils/settingsValidation/runtime.d.ts +0 -2
- package/types/utils/settingsValidation/splitFilters.d.ts +0 -17
- package/types/utils/settingsValidation/storage/storageCS.d.ts +0 -21
- package/types/utils/settingsValidation/types.d.ts +0 -30
- package/types/utils/settingsValidation/url.d.ts +0 -10
- package/types/utils/time/index.d.ts +0 -4
- package/types/utils/timeTracker/now/browser.d.ts +0 -1
- package/types/utils/timeTracker/now/node.d.ts +0 -1
- package/types/utils/timeTracker/timer.d.ts +0 -1
|
@@ -45,7 +45,7 @@ var UniqueKeysCachePluggable = /** @class */ (function (_super) {
|
|
|
45
45
|
};
|
|
46
46
|
/**
|
|
47
47
|
* Async consumer API, used by synchronizer.
|
|
48
|
-
* @param count number of items to pop from the queue. If not provided or equal 0, all items will be popped.
|
|
48
|
+
* @param count - number of items to pop from the queue. If not provided or equal 0, all items will be popped.
|
|
49
49
|
*/
|
|
50
50
|
UniqueKeysCachePluggable.prototype.popNRaw = function (count) {
|
|
51
51
|
var _this = this;
|
|
@@ -5,7 +5,7 @@ import { setToArray } from '../../utils/lang/sets';
|
|
|
5
5
|
* The `_cache` property is the object were items are stored.
|
|
6
6
|
* Intended for testing purposes.
|
|
7
7
|
*
|
|
8
|
-
* @param connDelay delay in millis for `connect` resolve. If not provided, `connect` resolves immediately.
|
|
8
|
+
* @param connDelay - delay in millis for `connect` resolve. If not provided, `connect` resolves immediately.
|
|
9
9
|
*/
|
|
10
10
|
export function inMemoryWrapperFactory(connDelay) {
|
|
11
11
|
var _cache = {};
|
|
@@ -24,7 +24,7 @@ var NO_VALID_WRAPPER_INTERFACE = 'The provided wrapper instance doesn’t follow
|
|
|
24
24
|
/**
|
|
25
25
|
* Validate pluggable storage factory options.
|
|
26
26
|
*
|
|
27
|
-
* @param options user options
|
|
27
|
+
* @param options - user options
|
|
28
28
|
* @throws Will throw an error if the options are invalid. Example: wrapper is not provided or doesn't have some methods.
|
|
29
29
|
*/
|
|
30
30
|
function validatePluggableStorageOptions(options) {
|
|
@@ -22,8 +22,8 @@ export var METHODS_TO_PROMISE_WRAP = [
|
|
|
22
22
|
* Adapter of the Pluggable Storage Wrapper.
|
|
23
23
|
* Used to handle exceptions as rejected promises, in order to simplify the error handling on storages.
|
|
24
24
|
*
|
|
25
|
-
* @param log logger instance
|
|
26
|
-
* @param wrapper storage wrapper to adapt
|
|
25
|
+
* @param log - logger instance
|
|
26
|
+
* @param wrapper - storage wrapper to adapt
|
|
27
27
|
* @returns an adapted version of the given storage wrapper
|
|
28
28
|
*/
|
|
29
29
|
export function wrapperAdapter(log, wrapper) {
|
|
@@ -30,7 +30,7 @@ export function splitsParserFromSettingsFactory() {
|
|
|
30
30
|
}
|
|
31
31
|
/**
|
|
32
32
|
*
|
|
33
|
-
* @param settings validated object with mocked features mapping.
|
|
33
|
+
* @param settings - validated object with mocked features mapping.
|
|
34
34
|
*/
|
|
35
35
|
return function splitsParserFromSettings(settings) {
|
|
36
36
|
var features = settings.features || {};
|
|
@@ -8,7 +8,7 @@ function flush() {
|
|
|
8
8
|
* Offline SyncManager factory.
|
|
9
9
|
* Can be used for server-side API, and client-side API with or without multiple clients.
|
|
10
10
|
*
|
|
11
|
-
* @param splitsParser e.g., `splitsParserFromFile`, `splitsParserFromSettings`.
|
|
11
|
+
* @param splitsParser - e.g., `splitsParserFromFile`, `splitsParserFromSettings`.
|
|
12
12
|
*/
|
|
13
13
|
export function syncManagerOfflineFactory(splitsParserFactory) {
|
|
14
14
|
/**
|
|
@@ -63,12 +63,12 @@ export function mySegmentsUpdaterFactory(log, mySegmentsFetcher, storage, segmen
|
|
|
63
63
|
* MySegments updater returns a promise that resolves with a `false` boolean value if it fails to fetch mySegments or synchronize them with the storage.
|
|
64
64
|
* Returned promise will not be rejected.
|
|
65
65
|
*
|
|
66
|
-
* @param
|
|
66
|
+
* @param segmentsData - it can be:
|
|
67
67
|
* (1) the list of mySegments names to sync in the storage,
|
|
68
68
|
* (2) an object with a segment name and action (true: add, or false: delete) to update the storage,
|
|
69
69
|
* (3) or `undefined`, for which the updater will fetch mySegments in order to sync the storage.
|
|
70
|
-
* @param
|
|
71
|
-
* @param
|
|
70
|
+
* @param noCache - true to revalidate data to fetch
|
|
71
|
+
* @param till - query param to bypass CDN requests
|
|
72
72
|
*/
|
|
73
73
|
return function mySegmentsUpdater(segmentsData, noCache, till) {
|
|
74
74
|
return _mySegmentsUpdater(0, segmentsData, noCache, till);
|
|
@@ -6,10 +6,10 @@ import { LOG_PREFIX_INSTANTIATION, LOG_PREFIX_SYNC_SEGMENTS } from '../../../log
|
|
|
6
6
|
* - updates `segmentsCache`
|
|
7
7
|
* - uses `segmentsEventEmitter` to emit events related to segments data updates
|
|
8
8
|
*
|
|
9
|
-
* @param log logger instance
|
|
10
|
-
* @param segmentChangesFetcher fetcher of `/segmentChanges`
|
|
11
|
-
* @param segments segments storage, with sync or async methods
|
|
12
|
-
* @param readiness optional readiness manager. Not required for synchronizer or producer mode.
|
|
9
|
+
* @param log - logger instance
|
|
10
|
+
* @param segmentChangesFetcher - fetcher of `/segmentChanges`
|
|
11
|
+
* @param segments - segments storage, with sync or async methods
|
|
12
|
+
* @param readiness - optional readiness manager. Not required for synchronizer or producer mode.
|
|
13
13
|
*/
|
|
14
14
|
export function segmentChangesUpdaterFactory(log, segmentChangesFetcher, segments, readiness) {
|
|
15
15
|
var readyOnAlreadyExistentState = true;
|
|
@@ -35,11 +35,11 @@ export function segmentChangesUpdaterFactory(log, segmentChangesFetcher, segment
|
|
|
35
35
|
* Thus, a false result doesn't imply that SDK_SEGMENTS_ARRIVED was not emitted.
|
|
36
36
|
* Returned promise will not be rejected.
|
|
37
37
|
*
|
|
38
|
-
* @param
|
|
38
|
+
* @param fetchOnlyNew - if true, only fetch the segments that not exists, i.e., which `changeNumber` is equal to -1.
|
|
39
39
|
* This param is used by SplitUpdateWorker on server-side SDK, to fetch new registered segments on SPLIT_UPDATE notifications.
|
|
40
|
-
* @param
|
|
41
|
-
* @param
|
|
42
|
-
* @param
|
|
40
|
+
* @param segmentName - segment name to fetch. By passing `undefined` it fetches the list of segments registered at the storage
|
|
41
|
+
* @param noCache - true to revalidate data to fetch on a SEGMENT_UPDATE notifications.
|
|
42
|
+
* @param till - till target for the provided segmentName, for CDN bypass.
|
|
43
43
|
*/
|
|
44
44
|
return function segmentChangesUpdater(fetchOnlyNew, segmentName, noCache, till) {
|
|
45
45
|
log.debug(LOG_PREFIX_SYNC_SEGMENTS + "Started segments update");
|
|
@@ -34,8 +34,8 @@ export function parseSegments(_a) {
|
|
|
34
34
|
* If there are defined filters and one feature flag doesn't match with them, its status is changed to 'ARCHIVE' to avoid storing it
|
|
35
35
|
* If there are set filter defined, names filter is ignored
|
|
36
36
|
*
|
|
37
|
-
* @param featureFlag feature flag to be evaluated
|
|
38
|
-
* @param filters splitFiltersValidation bySet | byName
|
|
37
|
+
* @param featureFlag - feature flag to be evaluated
|
|
38
|
+
* @param filters - splitFiltersValidation bySet | byName
|
|
39
39
|
*/
|
|
40
40
|
function matchFilters(featureFlag, filters) {
|
|
41
41
|
var _a = filters.groupedFilters, setsFilter = _a.bySet, namesFilter = _a.byName, prefixFilter = _a.byPrefix;
|
|
@@ -77,13 +77,13 @@ export function computeSplitsMutation(entries, filters) {
|
|
|
77
77
|
* - updates `splitsCache`
|
|
78
78
|
* - uses `splitsEventEmitter` to emit events related to split data updates
|
|
79
79
|
*
|
|
80
|
-
* @param log Logger instance
|
|
81
|
-
* @param splitChangesFetcher Fetcher of `/splitChanges`
|
|
82
|
-
* @param splits Splits storage, with sync or async methods
|
|
83
|
-
* @param segments Segments storage, with sync or async methods
|
|
84
|
-
* @param splitsEventEmitter Optional readiness manager. Not required for synchronizer or producer mode.
|
|
85
|
-
* @param requestTimeoutBeforeReady How long the updater will wait for the request to timeout. Default 0, i.e., never timeout.
|
|
86
|
-
* @param retriesOnFailureBeforeReady How many retries on `/splitChanges` we the updater do in case of failure or timeout. Default 0, i.e., no retries.
|
|
80
|
+
* @param log - Logger instance
|
|
81
|
+
* @param splitChangesFetcher - Fetcher of `/splitChanges`
|
|
82
|
+
* @param splits - Splits storage, with sync or async methods
|
|
83
|
+
* @param segments - Segments storage, with sync or async methods
|
|
84
|
+
* @param splitsEventEmitter - Optional readiness manager. Not required for synchronizer or producer mode.
|
|
85
|
+
* @param requestTimeoutBeforeReady - How long the updater will wait for the request to timeout. Default 0, i.e., never timeout.
|
|
86
|
+
* @param retriesOnFailureBeforeReady - How many retries on `/splitChanges` we the updater do in case of failure or timeout. Default 0, i.e., no retries.
|
|
87
87
|
*/
|
|
88
88
|
export function splitChangesUpdaterFactory(log, splitChangesFetcher, splits, segments, splitFiltersValidation, splitsEventEmitter, requestTimeoutBeforeReady, retriesOnFailureBeforeReady, isClientSide) {
|
|
89
89
|
if (requestTimeoutBeforeReady === void 0) { requestTimeoutBeforeReady = 0; }
|
|
@@ -110,13 +110,13 @@ export function splitChangesUpdaterFactory(log, splitChangesFetcher, splits, seg
|
|
|
110
110
|
* SplitChanges updater returns a promise that resolves with a `false` boolean value if it fails to fetch splits or synchronize them with the storage.
|
|
111
111
|
* Returned promise will not be rejected.
|
|
112
112
|
*
|
|
113
|
-
* @param
|
|
114
|
-
* @param
|
|
113
|
+
* @param noCache - true to revalidate data to fetch
|
|
114
|
+
* @param till - query param to bypass CDN requests
|
|
115
115
|
*/
|
|
116
116
|
return function splitChangesUpdater(noCache, till, splitUpdateNotification) {
|
|
117
117
|
/**
|
|
118
|
-
* @param
|
|
119
|
-
* @param
|
|
118
|
+
* @param since - current changeNumber at splitsCache
|
|
119
|
+
* @param retry - current number of retry attempts
|
|
120
120
|
*/
|
|
121
121
|
function _splitChangesUpdater(since, retry) {
|
|
122
122
|
if (retry === void 0) { retry = 0; }
|
|
@@ -5,12 +5,12 @@ import { hash } from '../../../utils/murmur3/murmur3';
|
|
|
5
5
|
/**
|
|
6
6
|
* Factory of authentication function.
|
|
7
7
|
*
|
|
8
|
-
* @param fetchAuth `SplitAPI.fetchAuth` endpoint
|
|
8
|
+
* @param fetchAuth - `SplitAPI.fetchAuth` endpoint
|
|
9
9
|
*/
|
|
10
10
|
export function authenticateFactory(fetchAuth) {
|
|
11
11
|
/**
|
|
12
12
|
* Run authentication requests to Auth Server, and returns a promise that resolves with the decoded JTW token.
|
|
13
|
-
* @param
|
|
13
|
+
* @param userKeys - set of user Keys to track membership updates. It is undefined for server-side API.
|
|
14
14
|
*/
|
|
15
15
|
return function authenticate(userKeys) {
|
|
16
16
|
return fetchAuth(userKeys)
|
|
@@ -6,8 +6,8 @@ var CONTROL_CHANNEL_REGEX = /^control_/;
|
|
|
6
6
|
/**
|
|
7
7
|
* Build metadata headers for SSE connection.
|
|
8
8
|
*
|
|
9
|
-
* @param
|
|
10
|
-
* @returns
|
|
9
|
+
* @param settings - Validated settings.
|
|
10
|
+
* @returns Headers object
|
|
11
11
|
*/
|
|
12
12
|
function buildSSEHeaders(settings) {
|
|
13
13
|
var headers = {
|
|
@@ -29,8 +29,8 @@ var SSEClient = /** @class */ (function () {
|
|
|
29
29
|
/**
|
|
30
30
|
* SSEClient constructor.
|
|
31
31
|
*
|
|
32
|
-
* @param settings Validated settings.
|
|
33
|
-
* @param platform object containing environment-specific dependencies
|
|
32
|
+
* @param settings - Validated settings.
|
|
33
|
+
* @param platform - object containing environment-specific dependencies
|
|
34
34
|
* @throws 'EventSource API is not available.' if EventSource is not available.
|
|
35
35
|
*/
|
|
36
36
|
function SSEClient(settings, _a) {
|
|
@@ -48,9 +48,6 @@ var SSEClient = /** @class */ (function () {
|
|
|
48
48
|
};
|
|
49
49
|
/**
|
|
50
50
|
* Open the connection with a given authToken
|
|
51
|
-
*
|
|
52
|
-
* @param {IAuthTokenPushEnabled} authToken
|
|
53
|
-
* @throws {TypeError} Will throw an error if `authToken` is undefined
|
|
54
51
|
*/
|
|
55
52
|
SSEClient.prototype.open = function (authToken) {
|
|
56
53
|
var _a;
|
|
@@ -5,7 +5,7 @@ var STREAMING_EVENT_TYPES = [OCCUPANCY_PRI, OCCUPANCY_SEC];
|
|
|
5
5
|
/**
|
|
6
6
|
* Factory of notification keeper, which process OCCUPANCY and CONTROL notifications and emits the corresponding push events.
|
|
7
7
|
*
|
|
8
|
-
* @param pushEmitter emitter for events related to streaming support
|
|
8
|
+
* @param pushEmitter - emitter for events related to streaming support
|
|
9
9
|
*/
|
|
10
10
|
// @TODO update logic to handle OCCUPANCY for any region and rename according to new spec (e.g.: PUSH_SUBSYSTEM_UP --> PUSH_SUBSYSTEM_UP)
|
|
11
11
|
export function notificationKeeperFactory(pushEmitter, telemetryTracker) {
|
|
@@ -5,8 +5,9 @@ import { isString } from '../../../utils/lang';
|
|
|
5
5
|
* HTTP errors handled by Ably (e.g., 400 due to invalid token, 401 due to expired token, 500) have the `data` property.
|
|
6
6
|
* Other network and HTTP errors do not have this property.
|
|
7
7
|
*
|
|
8
|
-
* @param
|
|
9
|
-
* @
|
|
8
|
+
* @param error - The error event to parse
|
|
9
|
+
* @returns parsed notification error
|
|
10
|
+
* @throws SyntaxError if `error.data` is an invalid JSON string
|
|
10
11
|
*/
|
|
11
12
|
export function errorParser(error) {
|
|
12
13
|
// @ts-ignore
|
|
@@ -18,10 +19,10 @@ export function errorParser(error) {
|
|
|
18
19
|
* Parses the `data` JSON string of a given SSE message notifications.
|
|
19
20
|
* Also assigns the type OCCUPANCY, if it corresponds, so that all supported messages (e.g., SPLIT_UPDATE, CONTROL) have a type.
|
|
20
21
|
*
|
|
21
|
-
* @param message
|
|
22
|
+
* @param message - The message event to parse
|
|
22
23
|
* @returns parsed notification message or undefined if the given event data is falsy (e.g, '' or undefined).
|
|
23
24
|
* For example, the EventSource implementation of React-Native for iOS emits a message event with empty data for Ably keepalive comments.
|
|
24
|
-
* @throws
|
|
25
|
+
* @throws SyntaxError if `message.data` or `JSON.parse(message.data).data` are invalid JSON strings
|
|
25
26
|
*/
|
|
26
27
|
export function messageParser(message) {
|
|
27
28
|
if (!message.data)
|
|
@@ -6,8 +6,8 @@ import { ABLY_ERROR, NON_REQUESTED, SSE_CONNECTION_ERROR } from '../../../utils/
|
|
|
6
6
|
/**
|
|
7
7
|
* Factory for SSEHandler, which processes SSEClient messages and emits the corresponding push events.
|
|
8
8
|
*
|
|
9
|
-
* @param log factory logger
|
|
10
|
-
* @param pushEmitter emitter for events related to streaming support
|
|
9
|
+
* @param log - factory logger
|
|
10
|
+
* @param pushEmitter - emitter for events related to streaming support
|
|
11
11
|
*/
|
|
12
12
|
export function SSEHandlerFactory(log, pushEmitter, telemetryTracker) {
|
|
13
13
|
var notificationKeeper = notificationKeeperFactory(pushEmitter, telemetryTracker);
|
|
@@ -76,9 +76,9 @@ export function MySegmentsUpdateWorker(log, storage, mySegmentsSyncTask, telemet
|
|
|
76
76
|
/**
|
|
77
77
|
* Invoked by NotificationProcessor on MY_(LARGE)_SEGMENTS_UPDATE notifications
|
|
78
78
|
*
|
|
79
|
-
* @param changeNumber change number of the notification
|
|
80
|
-
* @param segmentsData data for KeyList or SegmentRemoval instant updates
|
|
81
|
-
* @param delay optional time to wait for BoundedFetchRequest or BoundedFetchRequest updates
|
|
79
|
+
* @param changeNumber - change number of the notification
|
|
80
|
+
* @param segmentsData - data for KeyList or SegmentRemoval instant updates
|
|
81
|
+
* @param delay - optional time to wait for BoundedFetchRequest or BoundedFetchRequest updates
|
|
82
82
|
*/
|
|
83
83
|
put: function (mySegmentsData, payload, delay) {
|
|
84
84
|
var type = mySegmentsData.type, cn = mySegmentsData.cn;
|
|
@@ -72,8 +72,8 @@ export function SegmentsUpdateWorker(log, segmentsSyncTask, segmentsCache) {
|
|
|
72
72
|
/**
|
|
73
73
|
* Invoked by NotificationProcessor on SEGMENT_UPDATE event
|
|
74
74
|
*
|
|
75
|
-
* @param
|
|
76
|
-
* @param
|
|
75
|
+
* @param changeNumber - change number of the SEGMENT_UPDATE notification
|
|
76
|
+
* @param segmentName - segment name of the SEGMENT_UPDATE notification
|
|
77
77
|
*/
|
|
78
78
|
put: function (_a) {
|
|
79
79
|
var changeNumber = _a.changeNumber, segmentName = _a.segmentName;
|
|
@@ -59,7 +59,7 @@ export function SplitsUpdateWorker(log, splitsCache, splitsSyncTask, splitsEvent
|
|
|
59
59
|
/**
|
|
60
60
|
* Invoked by NotificationProcessor on SPLIT_UPDATE event
|
|
61
61
|
*
|
|
62
|
-
* @param
|
|
62
|
+
* @param changeNumber - change number of the SPLIT_UPDATE notification
|
|
63
63
|
*/
|
|
64
64
|
function put(_a, _payload) {
|
|
65
65
|
var changeNumber = _a.changeNumber, pcn = _a.pcn;
|
|
@@ -82,9 +82,9 @@ export function SplitsUpdateWorker(log, splitsCache, splitsSyncTask, splitsEvent
|
|
|
82
82
|
/**
|
|
83
83
|
* Invoked by NotificationProcessor on SPLIT_KILL event
|
|
84
84
|
*
|
|
85
|
-
* @param
|
|
86
|
-
* @param
|
|
87
|
-
* @param
|
|
85
|
+
* @param changeNumber - change number of the SPLIT_UPDATE notification
|
|
86
|
+
* @param splitName - name of split to kill
|
|
87
|
+
* @param defaultTreatment - default treatment value
|
|
88
88
|
*/
|
|
89
89
|
killSplit: function (_a) {
|
|
90
90
|
var changeNumber = _a.changeNumber, splitName = _a.splitName, defaultTreatment = _a.defaultTreatment;
|
|
@@ -13,9 +13,9 @@ function StringToUint8Array(myString) {
|
|
|
13
13
|
/**
|
|
14
14
|
* Decode and decompress 'data' with 'compression' algorithm
|
|
15
15
|
*
|
|
16
|
-
* @param
|
|
17
|
-
* @param
|
|
18
|
-
* @returns
|
|
16
|
+
* @param data - base64 encoded string
|
|
17
|
+
* @param compression - 1 GZIP, 2 ZLIB
|
|
18
|
+
* @returns
|
|
19
19
|
* @throws if data string cannot be decoded, decompressed or the provided compression value is invalid (not 1 or 2)
|
|
20
20
|
*/
|
|
21
21
|
function decompress(data, compression) {
|
|
@@ -32,10 +32,10 @@ function decompress(data, compression) {
|
|
|
32
32
|
/**
|
|
33
33
|
* Decode, decompress and parse the provided 'data' into a KeyList object
|
|
34
34
|
*
|
|
35
|
-
* @param
|
|
36
|
-
* @param
|
|
37
|
-
* @param
|
|
38
|
-
* @returns
|
|
35
|
+
* @param data - base64 encoded string
|
|
36
|
+
* @param compression - 1 GZIP, 2 ZLIB
|
|
37
|
+
* @param avoidPrecisionLoss - true as default, set it as false if dont need to avoid precission loss
|
|
38
|
+
* @returns keyList
|
|
39
39
|
* @throws if data string cannot be decoded, decompressed or parsed
|
|
40
40
|
*/
|
|
41
41
|
export function parseKeyList(data, compression, avoidPrecisionLoss) {
|
|
@@ -50,9 +50,9 @@ export function parseKeyList(data, compression, avoidPrecisionLoss) {
|
|
|
50
50
|
/**
|
|
51
51
|
* Decode, decompress and parse the provided 'data' into a Bitmap object
|
|
52
52
|
*
|
|
53
|
-
* @param
|
|
54
|
-
* @param
|
|
55
|
-
* @returns
|
|
53
|
+
* @param data - base64 encoded string
|
|
54
|
+
* @param compression - 1 GZIP, 2 ZLIB
|
|
55
|
+
* @returns Bitmap
|
|
56
56
|
* @throws if data string cannot be decoded or decompressed
|
|
57
57
|
*/
|
|
58
58
|
export function parseBitmap(data, compression) {
|
|
@@ -61,9 +61,9 @@ export function parseBitmap(data, compression) {
|
|
|
61
61
|
/**
|
|
62
62
|
* Check if the 'bitmap' bit at 'hash64hex' position is 1
|
|
63
63
|
*
|
|
64
|
-
* @param
|
|
65
|
-
* @param
|
|
66
|
-
* @returns
|
|
64
|
+
* @param bitmap - Uint8Array bitmap
|
|
65
|
+
* @param hash64hex - 16-chars string, representing a number in hexa
|
|
66
|
+
* @returns whether the provided 'hash64hex' index is set in the bitmap
|
|
67
67
|
*/
|
|
68
68
|
export function isInBitmap(bitmap, hash64hex) {
|
|
69
69
|
// using the lowest 32 bits as index, to avoid losing precision when converting to number
|
|
@@ -7,9 +7,9 @@ import { POLLING, STREAMING, SYNC_MODE_UPDATE } from '../utils/constants';
|
|
|
7
7
|
* Online SyncManager factory.
|
|
8
8
|
* Can be used for server-side API, and client-side API with or without multiple clients.
|
|
9
9
|
*
|
|
10
|
-
* @param pollingManagerFactory allows to specialize the SyncManager for server-side or client-side API by passing
|
|
10
|
+
* @param pollingManagerFactory - allows to specialize the SyncManager for server-side or client-side API by passing
|
|
11
11
|
* `pollingManagerSSFactory` or `pollingManagerCSFactory` respectively.
|
|
12
|
-
* @param pushManagerFactory optional to build a SyncManager with or without streaming support
|
|
12
|
+
* @param pushManagerFactory - optional to build a SyncManager with or without streaming support
|
|
13
13
|
*/
|
|
14
14
|
export function syncManagerOnlineFactory(pollingManagerFactory, pushManagerFactory) {
|
|
15
15
|
/**
|
package/esm/sync/syncTask.js
CHANGED
|
@@ -3,10 +3,10 @@ import { SYNC_TASK_EXECUTE, SYNC_TASK_START, SYNC_TASK_STOP } from '../logger/co
|
|
|
3
3
|
* Creates an object that handles the periodic execution of a given task via "start" and "stop" methods.
|
|
4
4
|
* The task can be also executed by calling the "execute" method. Multiple calls run sequentially to avoid race conditions (e.g., submitters executed on SDK destroy or full queue, while periodic execution is pending).
|
|
5
5
|
*
|
|
6
|
-
* @param log Logger instance.
|
|
7
|
-
* @param task Task to execute that returns a promise that NEVER REJECTS. Otherwise, periodic execution can result in Unhandled Promise Rejections.
|
|
8
|
-
* @param period Period in milliseconds to execute the task.
|
|
9
|
-
* @param taskName Optional task name for logging.
|
|
6
|
+
* @param log - Logger instance.
|
|
7
|
+
* @param task - Task to execute that returns a promise that NEVER REJECTS. Otherwise, periodic execution can result in Unhandled Promise Rejections.
|
|
8
|
+
* @param period - Period in milliseconds to execute the task.
|
|
9
|
+
* @param taskName - Optional task name for logging.
|
|
10
10
|
* @returns A sync task that wraps the given task.
|
|
11
11
|
*/
|
|
12
12
|
export function syncTaskFactory(log, task, period, taskName) {
|
|
@@ -6,8 +6,8 @@ import { isConsumerMode } from '../utils/settingsValidation/mode';
|
|
|
6
6
|
/**
|
|
7
7
|
* Event tracker stores events in cache and pass them to the integrations manager if provided.
|
|
8
8
|
*
|
|
9
|
-
* @param eventsCache cache to save events
|
|
10
|
-
* @param integrationsManager optional event handler used for integrations
|
|
9
|
+
* @param eventsCache - cache to save events
|
|
10
|
+
* @param integrationsManager - optional event handler used for integrations
|
|
11
11
|
*/
|
|
12
12
|
export function eventTrackerFactory(settings, eventsCache, whenInit, integrationsManager, telemetryCache) {
|
|
13
13
|
var log = settings.log, mode = settings.mode;
|
|
@@ -5,11 +5,11 @@ import { CONSENT_DECLINED, DEDUPED, QUEUED } from '../utils/constants';
|
|
|
5
5
|
/**
|
|
6
6
|
* Impressions tracker stores impressions in cache and pass them to the listener and integrations manager if provided.
|
|
7
7
|
*
|
|
8
|
-
* @param impressionsCache cache to save impressions
|
|
9
|
-
* @param metadata runtime metadata (ip, hostname and version)
|
|
10
|
-
* @param impressionListener optional impression listener
|
|
11
|
-
* @param integrationsManager optional integrations manager
|
|
12
|
-
* @param strategy strategy for impressions tracking.
|
|
8
|
+
* @param impressionsCache - cache to save impressions
|
|
9
|
+
* @param metadata - runtime metadata (ip, hostname and version)
|
|
10
|
+
* @param impressionListener - optional impression listener
|
|
11
|
+
* @param integrationsManager - optional integrations manager
|
|
12
|
+
* @param strategy - strategy for impressions tracking.
|
|
13
13
|
*/
|
|
14
14
|
export function impressionsTrackerFactory(settings, impressionsCache, strategy, whenInit, integrationsManager, telemetryCache) {
|
|
15
15
|
var log = settings.log, impressionListener = settings.impressionListener, _a = settings.runtime, ip = _a.ip, hostname = _a.hostname, version = settings.version;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Debug strategy for impressions tracker. Wraps impressions to store and adds previousTime if it corresponds
|
|
3
3
|
*
|
|
4
|
-
* @param impressionsObserver impression observer. Previous time (pt property) is included in impression instances
|
|
4
|
+
* @param impressionsObserver - impression observer. Previous time (pt property) is included in impression instances
|
|
5
5
|
* @returns IStrategyResult
|
|
6
6
|
*/
|
|
7
7
|
export function strategyDebugFactory(impressionsObserver) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* None strategy for impressions tracker.
|
|
3
3
|
*
|
|
4
|
-
* @param impressionsCounter cache to save impressions count. impressions will be deduped (OPTIMIZED mode)
|
|
5
|
-
* @param uniqueKeysTracker unique keys tracker in charge of tracking the unique keys per split.
|
|
4
|
+
* @param impressionsCounter - cache to save impressions count. impressions will be deduped (OPTIMIZED mode)
|
|
5
|
+
* @param uniqueKeysTracker - unique keys tracker in charge of tracking the unique keys per split.
|
|
6
6
|
* @returns IStrategyResult
|
|
7
7
|
*/
|
|
8
8
|
export function strategyNoneFactory(impressionsCounter, uniqueKeysTracker) {
|
|
@@ -2,8 +2,8 @@ import { truncateTimeFrame } from '../../utils/time';
|
|
|
2
2
|
/**
|
|
3
3
|
* Optimized strategy for impressions tracker. Wraps impressions to store and adds previousTime if it corresponds
|
|
4
4
|
*
|
|
5
|
-
* @param impressionsObserver impression observer. previous time (pt property) is included in impression instances
|
|
6
|
-
* @param impressionsCounter cache to save impressions count. impressions will be deduped (OPTIMIZED mode)
|
|
5
|
+
* @param impressionsObserver - impression observer. previous time (pt property) is included in impression instances
|
|
6
|
+
* @param impressionsCounter - cache to save impressions count. impressions will be deduped (OPTIMIZED mode)
|
|
7
7
|
* @returns IStrategyResult
|
|
8
8
|
*/
|
|
9
9
|
export function strategyOptimizedFactory(impressionsObserver, impressionsCounter) {
|
|
@@ -9,9 +9,9 @@ var noopFilterAdapter = {
|
|
|
9
9
|
* Unique Keys Tracker will be in charge of checking if the MTK was already sent to the BE in the last period
|
|
10
10
|
* or schedule to be sent; if not it will be added in an internal cache and sent in the next post.
|
|
11
11
|
*
|
|
12
|
-
* @param log Logger instance
|
|
13
|
-
* @param uniqueKeysCache cache to save unique keys
|
|
14
|
-
* @param filterAdapter filter adapter
|
|
12
|
+
* @param log - Logger instance
|
|
13
|
+
* @param uniqueKeysCache - cache to save unique keys
|
|
14
|
+
* @param filterAdapter - filter adapter
|
|
15
15
|
*/
|
|
16
16
|
export function uniqueKeysTrackerFactory(log, uniqueKeysCache, filterAdapter) {
|
|
17
17
|
if (filterAdapter === void 0) { filterAdapter = noopFilterAdapter; }
|
package/esm/utils/Backoff.js
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
var Backoff = /** @class */ (function () {
|
|
2
2
|
/**
|
|
3
3
|
* Schedule function calls with exponential backoff
|
|
4
|
-
*
|
|
5
|
-
* @param {function} cb
|
|
6
|
-
* @param {number} baseMillis
|
|
7
|
-
* @param {number} maxMillis
|
|
8
4
|
*/
|
|
9
5
|
function Backoff(cb, baseMillis, maxMillis) {
|
|
10
6
|
this.baseMillis = Backoff.__TEST__BASE_MILLIS || baseMillis || Backoff.DEFAULT_BASE_MILLIS;
|
package/esm/utils/Semver.js
CHANGED
|
@@ -70,7 +70,7 @@ var Semver = /** @class */ (function () {
|
|
|
70
70
|
/**
|
|
71
71
|
* Precedence comparision between 2 Semver objects.
|
|
72
72
|
*
|
|
73
|
-
* @
|
|
73
|
+
* @returns `0` if `this === toCompare`, `-1` if `this < toCompare`, and `1` if `this > toCompare`
|
|
74
74
|
*/
|
|
75
75
|
Semver.prototype.compare = function (toCompare) {
|
|
76
76
|
if (this.version === toCompare.version)
|
|
@@ -20,7 +20,7 @@ var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
|
|
|
20
20
|
/**
|
|
21
21
|
* Decode a given string value in Base64 format
|
|
22
22
|
*
|
|
23
|
-
* @param
|
|
23
|
+
* @param input - value to decode
|
|
24
24
|
*/
|
|
25
25
|
export function decodeFromBase64(input) {
|
|
26
26
|
var str = (String(input)).replace(/[=]+$/, ''); // #31: ExtendScript bad parse of /=
|
|
@@ -45,7 +45,7 @@ export function decodeFromBase64(input) {
|
|
|
45
45
|
/**
|
|
46
46
|
* Encode a given string value to Base64 format.
|
|
47
47
|
*
|
|
48
|
-
* @param
|
|
48
|
+
* @param input - value to encode
|
|
49
49
|
*/
|
|
50
50
|
export function encodeToBase64(input) {
|
|
51
51
|
var str = String(input);
|
|
@@ -404,8 +404,8 @@ export var algorithms = (function iifeDecompress() {
|
|
|
404
404
|
return {
|
|
405
405
|
/**
|
|
406
406
|
* Expands GZIP data
|
|
407
|
-
* @param data The data to decompress
|
|
408
|
-
* @param out Where to write the data. GZIP already encodes the output size, so providing this doesn't save memory.
|
|
407
|
+
* @param data - The data to decompress
|
|
408
|
+
* @param out - Where to write the data. GZIP already encodes the output size, so providing this doesn't save memory.
|
|
409
409
|
* @returns The decompressed version of the data
|
|
410
410
|
*/
|
|
411
411
|
gunzipSync: function (data, out) {
|
|
@@ -413,8 +413,8 @@ export var algorithms = (function iifeDecompress() {
|
|
|
413
413
|
},
|
|
414
414
|
/**
|
|
415
415
|
* Expands Zlib data
|
|
416
|
-
* @param data The data to decompress
|
|
417
|
-
* @param out Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length.
|
|
416
|
+
* @param data - The data to decompress
|
|
417
|
+
* @param out - Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length.
|
|
418
418
|
* @returns The decompressed version of the data
|
|
419
419
|
*/
|
|
420
420
|
unzlibSync: function (data, out) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Searches the index of the specified `value` inside an ordered array of `items` using the binary search algorithm.
|
|
3
3
|
*
|
|
4
|
-
* @param items the array to be searched
|
|
5
|
-
* @param value the value to be searched for
|
|
4
|
+
* @param items - the array to be searched
|
|
5
|
+
* @param value - the value to be searched for
|
|
6
6
|
* @returns integer number between 0 and `items.length`. This value is the index of the search value,
|
|
7
7
|
* if it is contained in the array, or the index at which the value should be inserted to keep the array ordered.
|
|
8
8
|
*/
|
|
@@ -208,7 +208,7 @@ function hash128x64(key, seed) {
|
|
|
208
208
|
/**
|
|
209
209
|
* x64 version of Murmur3 for 128bits.
|
|
210
210
|
*
|
|
211
|
-
* @param
|
|
211
|
+
* @param str - The string to hash.
|
|
212
212
|
*/
|
|
213
213
|
export function hash128(str, seed) {
|
|
214
214
|
return hash128x64(UTF16ToUTF8(str), seed >>> 0);
|
|
@@ -143,7 +143,7 @@ function hash128x86(key, seed) {
|
|
|
143
143
|
* x86 version of Murmur3 for 128bits.
|
|
144
144
|
* Used by hashImpression128 because in JS it is more efficient than the x64 version, no matter the underlying OS/CPU arch.
|
|
145
145
|
*
|
|
146
|
-
* @param
|
|
146
|
+
* @param str - The string to hash.
|
|
147
147
|
*/
|
|
148
148
|
export function hash128(str, seed) {
|
|
149
149
|
return hash128x86(UTF16ToUTF8(str), seed >>> 0);
|
|
@@ -21,7 +21,7 @@ function hex2dec(s) {
|
|
|
21
21
|
/**
|
|
22
22
|
* Gets the higher 64 bits of the x64 version of Murmur3 for 128bits, as decimal and hexadecimal number strings.
|
|
23
23
|
* Used for MySegments channel V2 notifications.
|
|
24
|
-
* @param
|
|
24
|
+
* @param str - The string to hash
|
|
25
25
|
*/
|
|
26
26
|
export function hash64(str) {
|
|
27
27
|
var hex = hash128(str).slice(0, 16);
|