@lookiero/checkout 0.6.0-beta.5 → 0.6.0-beta.7
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.
|
@@ -7,7 +7,7 @@ import { Navigation } from "./navigation/Navigation";
|
|
|
7
7
|
const a = true;
|
|
8
8
|
const App = ({ customerId, menu, tabBar, children }) => {
|
|
9
9
|
if (a) {
|
|
10
|
-
throw new Error("This is an error (integrated in UAF)");
|
|
10
|
+
throw new Error("This is an error (while integrated in UAF)");
|
|
11
11
|
}
|
|
12
12
|
return (React.createElement(SafeAreaProvider, null,
|
|
13
13
|
React.createElement(Notifications, { contextId: MESSAGING_CONTEXT_ID }),
|
|
@@ -1,57 +1,51 @@
|
|
|
1
|
-
import { defaultStackParser, makeFetchTransport } from "@sentry/browser";
|
|
1
|
+
// import { defaultStackParser, makeFetchTransport } from "@sentry/browser";
|
|
2
|
+
// import { FetchImpl } from "@sentry/browser/types/transports/utils";
|
|
2
3
|
import { makeMain } from "@sentry/core";
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { ReactNativeClient, Hub, ErrorBoundary, ReactNativeTracing } from "@sentry/react-native";
|
|
5
|
+
// import { ReactNativeTransportOptions } from "@sentry/react-native/dist/js/options";
|
|
6
|
+
// import { makeReactNativeTransport } from "@sentry/react-native/dist/js/transports/native";
|
|
7
|
+
// import { NATIVE } from "@sentry/react-native/dist/js/wrapper";
|
|
6
8
|
import "@sentry/tracing";
|
|
9
|
+
// import { Transport } from "@sentry/types";
|
|
7
10
|
import React, { useEffect } from "react";
|
|
8
11
|
import { Platform } from "react-native";
|
|
9
|
-
const defaultTransport = (options, nativeFetch) => {
|
|
10
|
-
if (NATIVE.isNativeTransportAvailable()) {
|
|
11
|
-
return makeReactNativeTransport(options);
|
|
12
|
-
}
|
|
13
|
-
return makeFetchTransport(options, nativeFetch);
|
|
14
|
-
};
|
|
15
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
16
|
-
// @ts-ignore
|
|
17
12
|
const sentryLogger = ({ publicKey, environment, release, project }) => {
|
|
18
13
|
let mainHub;
|
|
19
|
-
|
|
20
|
-
* TS complains about not providing 'transport' and 'stackParser' implementations
|
|
21
|
-
* although 'ReactNativeClient' defaults to its own implementation for those options.
|
|
22
|
-
*/
|
|
23
|
-
const client = new Sentry.ReactNativeClient({
|
|
14
|
+
const client = new ReactNativeClient({
|
|
24
15
|
environment,
|
|
25
16
|
release,
|
|
26
17
|
dsn: `https://${publicKey}@o179049.ingest.sentry.io/${project}`,
|
|
27
18
|
integrations: [
|
|
28
|
-
new
|
|
19
|
+
new ReactNativeTracing({
|
|
29
20
|
enableAppStartTracking: true,
|
|
30
21
|
}),
|
|
31
22
|
],
|
|
32
23
|
tracesSampleRate: 1.0,
|
|
33
24
|
debug: true,
|
|
34
25
|
enableNative: Platform.OS !== "web",
|
|
35
|
-
stackParser: defaultStackParser,
|
|
36
|
-
transport: defaultTransport,
|
|
26
|
+
// stackParser: defaultStackParser,
|
|
27
|
+
// transport: defaultTransport,
|
|
37
28
|
});
|
|
38
|
-
const hub = new
|
|
29
|
+
const hub = new Hub(client);
|
|
39
30
|
const switchMainHub = () => {
|
|
40
|
-
|
|
41
|
-
|
|
31
|
+
if (!mainHub) {
|
|
32
|
+
mainHub = makeMain(hub);
|
|
33
|
+
}
|
|
42
34
|
};
|
|
43
35
|
const revertMainHub = () => {
|
|
44
|
-
console.log("revertMainHub");
|
|
45
36
|
makeMain(mainHub);
|
|
46
37
|
};
|
|
47
38
|
return (Component) => {
|
|
48
39
|
switchMainHub();
|
|
49
|
-
const WrappedComponent = Sentry.wrap(Component);
|
|
40
|
+
// const WrappedComponent = Sentry.wrap(Component);
|
|
50
41
|
// eslint-disable-next-line react/display-name
|
|
51
42
|
return (props) => {
|
|
52
43
|
useEffect(() => revertMainHub, []);
|
|
53
|
-
return (
|
|
54
|
-
|
|
44
|
+
return (
|
|
45
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
46
|
+
// @ts-ignore
|
|
47
|
+
React.createElement(ErrorBoundary, null,
|
|
48
|
+
React.createElement(Component, { ...props })));
|
|
55
49
|
};
|
|
56
50
|
};
|
|
57
51
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lookiero/checkout",
|
|
3
|
-
"version": "0.6.0-beta.
|
|
3
|
+
"version": "0.6.0-beta.7",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -33,7 +33,6 @@
|
|
|
33
33
|
"@lookiero/messaging": "^8.0.0",
|
|
34
34
|
"@lookiero/messaging-react": "^8.0.0",
|
|
35
35
|
"@react-spring/native": "^9.5.5",
|
|
36
|
-
"@sentry/react-native": "^4.12.0",
|
|
37
36
|
"inline-style-prefixer": "6.0.1",
|
|
38
37
|
"react-native-safe-area-context": "^4.4.1",
|
|
39
38
|
"react-native-svg": "^12.1.1",
|
|
@@ -48,6 +47,7 @@
|
|
|
48
47
|
"@lookiero/event": "^0.3",
|
|
49
48
|
"@lookiero/locale": "^0.3",
|
|
50
49
|
"@lookiero/payments-front": "^0.16.5",
|
|
50
|
+
"@sentry/react-native": "^3.2.13",
|
|
51
51
|
"apollo-boost": "0.4.4",
|
|
52
52
|
"graphql": "16.6.0",
|
|
53
53
|
"graphql-tag": "2.12.6",
|
|
@@ -71,6 +71,7 @@
|
|
|
71
71
|
"@lookiero/payments-front": "^0.16.5",
|
|
72
72
|
"@pact-foundation/pact": "^10.1.4",
|
|
73
73
|
"@pact-foundation/pact-node": "^10.17.6",
|
|
74
|
+
"@sentry/react-native": "^3.2.13",
|
|
74
75
|
"@testing-library/react": "^13.4.0",
|
|
75
76
|
"@testing-library/react-hooks": "^8.0.1",
|
|
76
77
|
"@testing-library/react-native": "^11.0.0",
|