@formo/analytics 1.13.4-alpha.0 → 1.13.4-alpha.2

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/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@formo/analytics",
3
- "version": "1.13.4-alpha.0",
3
+ "version": "1.13.4-alpha.2",
4
4
  "repository": {
5
5
  "type": "git",
6
- "url": "https://github.com/getformo/sdk.git"
6
+ "url": "git+https://github.com/getformo/sdk.git"
7
7
  },
8
8
  "main": "dist/cjs/src/index.js",
9
9
  "types": "dist/esm/src/index.d.ts",
@@ -21,9 +21,7 @@
21
21
  },
22
22
  "license": "MIT",
23
23
  "dependencies": {
24
- "@highlight-run/react": "^7.0.2",
25
- "axios": "^1.7.7",
26
- "highlight.run": "^9.5.2",
24
+ "axios": "^1.7.8",
27
25
  "mipd": "^0.0.7"
28
26
  },
29
27
  "devDependencies": {
@@ -77,7 +75,8 @@
77
75
  "test": "mocha --require ts-node/register test/**/*.ts",
78
76
  "test-watch": "nodemon --config test.nodemon.json",
79
77
  "prepare": "husky install",
80
- "commit": "git add . && cz"
78
+ "commit": "git add . && cz",
79
+ "pub": "yarn build && npm publish"
81
80
  },
82
81
  "peerDependencies": {
83
82
  "@types/react": ">=16.14.34",
@@ -6,7 +6,6 @@ import {
6
6
  EVENTS_API_URL,
7
7
  Event,
8
8
  } from "./constants";
9
- import { H } from "highlight.run";
10
9
  import {
11
10
  ChainID,
12
11
  Address,
@@ -620,10 +619,6 @@ export class FormoAnalytics implements IFormoAnalytics {
620
619
  throw new Error(`Failed with status: ${response.status}`);
621
620
  }
622
621
  } catch (error) {
623
- H.consumeError(
624
- error as Error,
625
- `Request data: ${JSON.stringify(requestData)}`
626
- );
627
622
  console.error(`Event "${action}" failed. Error: ${error}`);
628
623
  }
629
624
  }
@@ -7,10 +7,6 @@ import React, {
7
7
  } from "react";
8
8
  import { FormoAnalytics } from "./FormoAnalytics";
9
9
  import { FormoAnalyticsProviderProps } from "./types";
10
- import { ErrorBoundary } from "@highlight-run/react";
11
- import { H } from "highlight.run";
12
-
13
- const HIGHLIGHT_PROJECT_ID = process.env.REACT_APP_HIGHLIGHT_PROJECT_ID;
14
10
 
15
11
  export const FormoAnalyticsContext = createContext<FormoAnalytics | undefined>(
16
12
  undefined
@@ -42,28 +38,6 @@ const InitializedAnalytics = ({
42
38
  const [isInitialized, setIsInitialized] = useState(false);
43
39
  const initializedStartedRef = useRef(false);
44
40
 
45
- const initializeHighlight = async () => {
46
- if (HIGHLIGHT_PROJECT_ID) {
47
- try {
48
- H.init(HIGHLIGHT_PROJECT_ID, {
49
- serviceName: "formo-analytics-sdk",
50
- tracingOrigins: true,
51
- networkRecording: {
52
- enabled: true,
53
- recordHeadersAndBody: true,
54
- urlBlocklist: [
55
- "https://www.googleapis.com/identitytoolkit",
56
- "https://securetoken.googleapis.com",
57
- ],
58
- },
59
- });
60
- console.log("Highlight.run initialized successfully");
61
- } catch (error) {
62
- console.error("Failed to initialize Highlight.run", error);
63
- }
64
- }
65
- };
66
-
67
41
  const initializeFormoAnalytics = async (apiKey: string, options: any) => {
68
42
  try {
69
43
  const sdkInstance = await FormoAnalytics.init(apiKey, options);
@@ -81,7 +55,6 @@ const InitializedAnalytics = ({
81
55
  if (initializedStartedRef.current) return;
82
56
  initializedStartedRef.current = true;
83
57
 
84
- await initializeHighlight();
85
58
  await initializeFormoAnalytics(apiKey, options);
86
59
  };
87
60
 
@@ -94,11 +67,9 @@ const InitializedAnalytics = ({
94
67
  }
95
68
 
96
69
  return (
97
- <ErrorBoundary onError={(error, info) => H?.consumeError(error, info)}>
98
- <FormoAnalyticsContext.Provider value={sdk}>
99
- {children}
100
- </FormoAnalyticsContext.Provider>
101
- </ErrorBoundary>
70
+ <FormoAnalyticsContext.Provider value={sdk}>
71
+ {children}
72
+ </FormoAnalyticsContext.Provider>
102
73
  );
103
74
  };
104
75