@lookiero/checkout 0.6.0-beta.10 → 0.6.0-beta.11
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/shared/logging/SentryDependencies.d.ts +5 -3
- package/dist/shared/logging/SentryDependencies.js +3 -1
- package/dist/shared/logging/SentryDependencies.native.d.ts +6 -3
- package/dist/shared/logging/SentryDependencies.native.js +4 -2
- package/dist/shared/logging/SentryLogger.js +7 -16
- package/package.json +1 -1
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { BrowserClient, Hub } from "@sentry/browser";
|
|
2
2
|
import { ErrorBoundary } from "@sentry/react";
|
|
3
3
|
import { ReactNativeTransportOptions } from "@sentry/react-native/dist/js/options";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { Transport, Integration } from "@sentry/types";
|
|
5
|
+
import { ComponentType } from "react";
|
|
6
6
|
declare const transport: (options: ReactNativeTransportOptions) => Transport;
|
|
7
|
-
|
|
7
|
+
declare const integrations: Integration[];
|
|
8
|
+
declare const wrap: <P>(Component: ComponentType<P>) => ComponentType<P>;
|
|
9
|
+
export { BrowserClient as Client, Hub, ErrorBoundary, transport, integrations, wrap };
|
|
@@ -3,4 +3,6 @@ import { makeFetchTransport } from "@sentry/browser";
|
|
|
3
3
|
import { ErrorBoundary } from "@sentry/react";
|
|
4
4
|
import { BrowserTracing } from "@sentry/tracing";
|
|
5
5
|
const transport = (options, nativeFetch) => makeFetchTransport(options, nativeFetch);
|
|
6
|
-
|
|
6
|
+
const integrations = [new BrowserTracing()];
|
|
7
|
+
const wrap = (Component) => Component;
|
|
8
|
+
export { BrowserClient as Client, Hub, ErrorBoundary, transport, integrations, wrap };
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import { ReactNativeClient, Hub, ErrorBoundary
|
|
1
|
+
import { ReactNativeClient, Hub, ErrorBoundary } from "@sentry/react-native";
|
|
2
2
|
import { ReactNativeTransportOptions } from "@sentry/react-native/dist/js/options";
|
|
3
|
-
import { Transport } from "@sentry/types";
|
|
3
|
+
import { Transport, Integration } from "@sentry/types";
|
|
4
|
+
import { ComponentType } from "react";
|
|
4
5
|
declare const transport: (options: ReactNativeTransportOptions) => Transport;
|
|
5
|
-
|
|
6
|
+
declare const integrations: Integration[];
|
|
7
|
+
declare const wrap: <P>(Component: ComponentType<P>) => ComponentType<P>;
|
|
8
|
+
export { ReactNativeClient as Client, Hub, ErrorBoundary, transport, integrations, wrap };
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { makeFetchTransport } from "@sentry/browser";
|
|
2
|
-
import { ReactNativeClient, Hub, ErrorBoundary,
|
|
2
|
+
import { ReactNativeClient, Hub, ErrorBoundary, wrap as sentryWrap } from "@sentry/react-native";
|
|
3
3
|
import { makeReactNativeTransport } from "@sentry/react-native/dist/js/transports/native";
|
|
4
4
|
import { NATIVE } from "@sentry/react-native/dist/js/wrapper";
|
|
5
5
|
const transport = (options, nativeFetch) => NATIVE.isNativeTransportAvailable() ? makeReactNativeTransport(options) : makeFetchTransport(options, nativeFetch);
|
|
6
|
-
|
|
6
|
+
const integrations = [];
|
|
7
|
+
const wrap = (Component) => sentryWrap(Component);
|
|
8
|
+
export { ReactNativeClient as Client, Hub, ErrorBoundary, transport, integrations, wrap };
|
|
@@ -1,21 +1,15 @@
|
|
|
1
1
|
import { defaultStackParser } from "@sentry/browser";
|
|
2
|
-
// import { FetchImpl } from "@sentry/browser/types/transports/utils";
|
|
3
2
|
import { makeMain } from "@sentry/core";
|
|
4
|
-
// import { ReactNativeTransportOptions } from "@sentry/react-native/dist/js/options";
|
|
5
|
-
// import { makeReactNativeTransport } from "@sentry/react-native/dist/js/transports/native";
|
|
6
|
-
// import { NATIVE } from "@sentry/react-native/dist/js/wrapper";
|
|
7
|
-
// import "@sentry/tracing";
|
|
8
|
-
// import { Transport } from "@sentry/types";
|
|
9
3
|
import React, { useEffect } from "react";
|
|
10
4
|
import { Platform } from "react-native";
|
|
11
|
-
import { Client, Hub, ErrorBoundary,
|
|
5
|
+
import { Client, Hub, ErrorBoundary, transport, integrations, wrap } from "./SentryDependencies";
|
|
12
6
|
const sentryLogger = ({ publicKey, environment, release, project }) => {
|
|
13
7
|
let mainHub;
|
|
14
8
|
const client = new Client({
|
|
15
9
|
environment,
|
|
16
10
|
release,
|
|
17
11
|
dsn: `https://${publicKey}@o179049.ingest.sentry.io/${project}`,
|
|
18
|
-
integrations
|
|
12
|
+
integrations,
|
|
19
13
|
tracesSampleRate: 1.0,
|
|
20
14
|
debug: true,
|
|
21
15
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -35,16 +29,13 @@ const sentryLogger = ({ publicKey, environment, release, project }) => {
|
|
|
35
29
|
};
|
|
36
30
|
return (Component) => {
|
|
37
31
|
switchMainHub();
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
return (props) => {
|
|
32
|
+
const WrappedComponent = wrap(Component);
|
|
33
|
+
const SentryLogger = (props) => {
|
|
41
34
|
useEffect(() => revertMainHub, []);
|
|
42
|
-
return (
|
|
43
|
-
|
|
44
|
-
// @ts-ignore
|
|
45
|
-
React.createElement(ErrorBoundary, null,
|
|
46
|
-
React.createElement(Component, { ...props })));
|
|
35
|
+
return (React.createElement(ErrorBoundary, null,
|
|
36
|
+
React.createElement(WrappedComponent, { ...props })));
|
|
47
37
|
};
|
|
38
|
+
return SentryLogger;
|
|
48
39
|
};
|
|
49
40
|
};
|
|
50
41
|
export { sentryLogger };
|