@stream-io/feeds-client 0.3.4 → 0.3.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.
@@ -2996,8 +2996,7 @@ class FeedsApi {
2996
2996
  return { ...response.body, metadata: response.metadata };
2997
2997
  }
2998
2998
  }
2999
- const configureLoggers = loggerInternal__namespace.configureLoggers;
3000
- const getLogger = loggerInternal__namespace.getLogger;
2999
+ const feedsLoggerSystem = loggerInternal__namespace.createLoggerSystem();
3001
3000
  const sleep = (m) => new Promise((resolve) => setTimeout(resolve, m));
3002
3001
  function isFunction(value) {
3003
3002
  return value && (Object.prototype.toString.call(value) === "[object Function]" || typeof value === "function" || value instanceof Function);
@@ -3112,7 +3111,7 @@ const capitalize = (s) => {
3112
3111
  };
3113
3112
  class TokenManager {
3114
3113
  constructor() {
3115
- this.logger = getLogger("token-manager");
3114
+ this.logger = feedsLoggerSystem.getLogger("token-manager");
3116
3115
  this.setTokenOrProvider = (tokenOrProvider) => {
3117
3116
  if (isFunction(tokenOrProvider)) {
3118
3117
  this.tokenProvider = tokenOrProvider;
@@ -3229,7 +3228,7 @@ class ConnectionIdManager {
3229
3228
  class EventDispatcher {
3230
3229
  constructor() {
3231
3230
  this.subscribers = {};
3232
- this.logger = getLogger("event-dispatcher");
3231
+ this.logger = feedsLoggerSystem.getLogger("event-dispatcher");
3233
3232
  this.dispatch = (event) => {
3234
3233
  const listeners = [
3235
3234
  ...this.subscribers[event.type] ?? [],
@@ -3274,7 +3273,7 @@ class StableWSConnection {
3274
3273
  this.connectionIdManager = connectionIdManager;
3275
3274
  this.decoders = decoders2;
3276
3275
  this.dispatcher = new EventDispatcher();
3277
- this.logger = getLogger("stable-ws-connection");
3276
+ this.logger = feedsLoggerSystem.getLogger("stable-ws-connection");
3278
3277
  this.on = this.dispatcher.on;
3279
3278
  this.off = this.dispatcher.off;
3280
3279
  this.offAll = this.dispatcher.offAll;
@@ -3782,14 +3781,14 @@ const getRateLimitFromResponseHeader = (response_headers) => {
3782
3781
  };
3783
3782
  return result;
3784
3783
  };
3785
- const version = "0.3.4";
3784
+ const version = "0.3.5";
3786
3785
  class ApiClient {
3787
3786
  constructor(apiKey, tokenManager, connectionIdManager, options) {
3788
3787
  this.apiKey = apiKey;
3789
3788
  this.tokenManager = tokenManager;
3790
3789
  this.connectionIdManager = connectionIdManager;
3791
3790
  this.extraHeaderInformation = {};
3792
- this.logger = getLogger("api-client");
3791
+ this.logger = feedsLoggerSystem.getLogger("api-client");
3793
3792
  this.sendRequest = async (method, url, pathParams, queryParams, body, requestContentType) => {
3794
3793
  queryParams = queryParams ?? {};
3795
3794
  queryParams.api_key = this.apiKey;
@@ -4566,7 +4565,7 @@ const isVideoFile = (file) => {
4566
4565
  return file.type.startsWith("video/");
4567
4566
  };
4568
4567
  const ensureExhausted = (x, message) => {
4569
- getLogger("helpers").warn(message, x);
4568
+ feedsLoggerSystem.getLogger("helpers").warn(message, x);
4570
4569
  };
4571
4570
  const shouldUpdateState = ({
4572
4571
  stateUpdateQueueId,
@@ -7070,7 +7069,7 @@ class FeedsClient extends FeedsApi {
7070
7069
  this.connectionIdManager = connectionIdManager;
7071
7070
  this.polls_by_id = /* @__PURE__ */ new Map();
7072
7071
  this.query_batch_own_capabilties_throttling_interval = options?.query_batch_own_capabilties_throttling_interval ?? DEFAULT_BATCH_OWN_CAPABILITIES_THROTTLING_INTERVAL;
7073
- configureLoggers(options?.configure_loggers_options);
7072
+ feedsLoggerSystem.configureLoggers(options?.configure_loggers_options);
7074
7073
  this.on("all", (event) => {
7075
7074
  const fid = event.fid;
7076
7075
  const feed = typeof fid === "string" ? this.activeFeeds[fid] : void 0;
@@ -7316,10 +7315,9 @@ exports.FeedsClient = FeedsClient;
7316
7315
  exports.StreamApiError = StreamApiError;
7317
7316
  exports.StreamPoll = StreamPoll;
7318
7317
  exports.checkHasAnotherPage = checkHasAnotherPage;
7319
- exports.configureLoggers = configureLoggers;
7320
7318
  exports.debounce = debounce;
7321
7319
  exports.ensureExhausted = ensureExhausted;
7322
- exports.getLogger = getLogger;
7320
+ exports.feedsLoggerSystem = feedsLoggerSystem;
7323
7321
  exports.getStateUpdateQueueId = getStateUpdateQueueId;
7324
7322
  exports.isCommentResponse = isCommentResponse;
7325
7323
  exports.isFollowResponse = isFollowResponse;
@@ -7331,4 +7329,4 @@ exports.replaceUniqueArrayMerge = replaceUniqueArrayMerge;
7331
7329
  exports.shouldUpdateState = shouldUpdateState;
7332
7330
  exports.uniqueArrayMerge = uniqueArrayMerge;
7333
7331
  exports.updateEntityInArray = updateEntityInArray;
7334
- //# sourceMappingURL=feeds-client-HvoTzr-z.js.map
7332
+ //# sourceMappingURL=feeds-client-DLRsdGJc.js.map