@kontextso/sdk-react-native 0.0.5-rc.7 → 0.0.5-rc.8

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/dist/index.js CHANGED
@@ -201,7 +201,7 @@ var parseMessageText = (text) => {
201
201
  var import_loglevel = __toESM(require("loglevel"));
202
202
 
203
203
  // package.json
204
- var version = "0.0.5-rc.6";
204
+ var version = "0.0.5-rc.7";
205
205
 
206
206
  // src/hooks/useInitializeAds.tsx
207
207
  async function initialize(adServerUrl, publisherToken, userId, conversationId, legacyVisitorId, character) {
@@ -764,8 +764,6 @@ var captureErrorFn = (adServerUrl, error, componentStack, context) => {
764
764
  })
765
765
  }).catch((e) => {
766
766
  import_loglevel4.default.warn("Error reporting client error", e);
767
- }).finally(() => {
768
- import_loglevel4.default.warn(error, componentStack);
769
767
  });
770
768
  };
771
769
  var ErrorBoundary = class extends import_react4.default.Component {
@@ -860,9 +858,12 @@ var AdsProviderWithoutBoundary = ({
860
858
  publisherToken
861
859
  });
862
860
  const ads = mergeAds({ initAds, preloadAds, streamAds, viewedAds });
863
- if (props.throwError && Math.random() < 0.5) {
861
+ if (props.throwError && Math.random() < 0.1) {
864
862
  throw new Error("Test error");
865
863
  }
864
+ if (props.throwError && Math.random() < 0.1) {
865
+ Promise.reject(new Error("Test async error"));
866
+ }
866
867
  const markAdAsViewed = (ad) => {
867
868
  import_loglevel5.default.debug("[Brain] Calling onAdView");
868
869
  onAdView && onAdView({
package/dist/index.mjs CHANGED
@@ -175,7 +175,7 @@ var parseMessageText = (text) => {
175
175
  import log from "loglevel";
176
176
 
177
177
  // package.json
178
- var version = "0.0.5-rc.6";
178
+ var version = "0.0.5-rc.7";
179
179
 
180
180
  // src/hooks/useInitializeAds.tsx
181
181
  async function initialize(adServerUrl, publisherToken, userId, conversationId, legacyVisitorId, character) {
@@ -738,8 +738,6 @@ var captureErrorFn = (adServerUrl, error, componentStack, context) => {
738
738
  })
739
739
  }).catch((e) => {
740
740
  log4.warn("Error reporting client error", e);
741
- }).finally(() => {
742
- log4.warn(error, componentStack);
743
741
  });
744
742
  };
745
743
  var ErrorBoundary = class extends React.Component {
@@ -834,9 +832,12 @@ var AdsProviderWithoutBoundary = ({
834
832
  publisherToken
835
833
  });
836
834
  const ads = mergeAds({ initAds, preloadAds, streamAds, viewedAds });
837
- if (props.throwError && Math.random() < 0.5) {
835
+ if (props.throwError && Math.random() < 0.1) {
838
836
  throw new Error("Test error");
839
837
  }
838
+ if (props.throwError && Math.random() < 0.1) {
839
+ Promise.reject(new Error("Test async error"));
840
+ }
840
841
  const markAdAsViewed = (ad) => {
841
842
  log5.debug("[Brain] Calling onAdView");
842
843
  onAdView && onAdView({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kontextso/sdk-react-native",
3
- "version": "0.0.5-rc.7",
3
+ "version": "0.0.5-rc.8",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",