eventfan
Advanced tools
Comparing version 2.0.3 to 2.0.4
@@ -41,2 +41,3 @@ var $3z6Hg$posthogjs = require("posthog-js"); | ||
$parcel$export(module.exports, "Drip", () => $bd642be1509d3962$export$2e2bcd8739ae039); | ||
$parcel$export(module.exports, "Sentry", () => $d3387ab2a8a6ba1a$export$2e2bcd8739ae039); | ||
$parcel$export(module.exports, "EventFanProvider", () => $ca20b098fa610eea$export$ea75af6803d9945b); | ||
@@ -52,2 +53,3 @@ $parcel$export(module.exports, "useEventFan", () => $ca20b098fa610eea$export$be337503ef190b40); | ||
$7492a395e3da1c0c$export$1d6d7503516a6f59["RUDDERSTACK"] = "RUDDERSTACK"; | ||
$7492a395e3da1c0c$export$1d6d7503516a6f59["SENTRY"] = "SENTRY"; | ||
})($7492a395e3da1c0c$export$1d6d7503516a6f59 || ($7492a395e3da1c0c$export$1d6d7503516a6f59 = {})); | ||
@@ -957,2 +959,31 @@ | ||
class $d3387ab2a8a6ba1a$export$2e2bcd8739ae039 { | ||
constructor(config){ | ||
this.config = config; | ||
this.name = $7492a395e3da1c0c$export$1d6d7503516a6f59.SENTRY; | ||
this.isLoaded = false; | ||
this.sentry = config; | ||
} | ||
/** | ||
* Identify | ||
*/ async identify(user) { | ||
this.sentry.setUser(user.traits); | ||
} | ||
/** | ||
* Track | ||
*/ async track(event) { | ||
this.sentry.addBreadcrumb({ | ||
category: event.name, | ||
data: event.properties, | ||
level: "info" | ||
}); | ||
} | ||
async initialise() { | ||
// Set the destination as loaded | ||
this.isLoaded = true; | ||
} | ||
} | ||
var $ea665efe368bcb3e$exports = {}; | ||
@@ -959,0 +990,0 @@ |
@@ -10,3 +10,4 @@ /** | ||
POSTHOG = "POSTHOG", | ||
RUDDERSTACK = "RUDDERSTACK" | ||
RUDDERSTACK = "RUDDERSTACK", | ||
SENTRY = "SENTRY" | ||
} |
@@ -15,2 +15,3 @@ /* eslint-disable import/prefer-default-export */ | ||
DestinationName["RUDDERSTACK"] = "RUDDERSTACK"; | ||
DestinationName["SENTRY"] = "SENTRY"; | ||
})(DestinationName || (DestinationName = {})); |
@@ -1,2 +0,1 @@ | ||
import type Destination from "./destinations/Destination"; | ||
import Drip from "./destinations/drip/Drip"; | ||
@@ -9,6 +8,8 @@ import EventFan from "./client/EventFan"; | ||
import Posthog from "./destinations/posthog/Posthog"; | ||
import Sentry from "./destinations/sentry/Sentry"; | ||
import type Destination from "./destinations/Destination"; | ||
export default EventFan; | ||
export { loadScript }; | ||
export type { Destination }; | ||
export { FacebookPixel, GA4, Hotjar, Posthog, Drip }; | ||
export { FacebookPixel, GA4, Hotjar, Posthog, Drip, Sentry }; | ||
declare const mocks: { | ||
@@ -15,0 +16,0 @@ mockPage: import("./types/PageViewProps").Page; |
@@ -8,2 +8,3 @@ import Drip from "./destinations/drip/Drip.js"; | ||
import Posthog from "./destinations/posthog/Posthog.js"; | ||
import Sentry from "./destinations/sentry/Sentry.js"; | ||
import * as allMocks from "./mocks/index.js"; // Client | ||
@@ -15,3 +16,3 @@ | ||
export { FacebookPixel, GA4, Hotjar, Posthog, Drip }; // Mocks for testing | ||
export { FacebookPixel, GA4, Hotjar, Posthog, Drip, Sentry }; // Mocks for testing | ||
@@ -18,0 +19,0 @@ const mocks = { ...allMocks |
{ | ||
"name": "eventfan", | ||
"version": "2.0.3", | ||
"version": "2.0.4", | ||
"description": "Send analytics events to multiple destinations (Google Analytics, Facebook...).", | ||
@@ -24,9 +24,10 @@ "repository": "https://github.com/alan-cooney/eventfan", | ||
"@babel/cli": "^7.17.10", | ||
"@babel/core": "^7.17.10", | ||
"@babel/preset-env": "^7.17.10", | ||
"@babel/preset-react": "^7.16.7", | ||
"@babel/preset-typescript": "^7.16.7", | ||
"@playwright/test": "^1.21.1", | ||
"@babel/core": "^7.17.12", | ||
"@babel/preset-env": "^7.17.12", | ||
"@babel/preset-react": "^7.17.12", | ||
"@babel/preset-typescript": "^7.17.12", | ||
"@playwright/test": "^1.22.0", | ||
"@sentry/browser": "^6.19.7", | ||
"@swc/cli": "^0.1.57", | ||
"@swc/core": "^1.2.182", | ||
"@swc/core": "^1.2.185", | ||
"@swc/jest": "^0.2.21", | ||
@@ -38,9 +39,9 @@ "@testing-library/dom": "^8.13.0", | ||
"@types/fs-extra": "^9.0.13", | ||
"@types/jest": "^27.5.0", | ||
"@types/node": "^17.0.32", | ||
"@types/jest": "^27.5.1", | ||
"@types/node": "^17.0.34", | ||
"@types/react": "^18.0.9", | ||
"@types/react-dom": "^18.0.3", | ||
"@types/react-dom": "^18.0.4", | ||
"@types/uuid": "^8.3.4", | ||
"@typescript-eslint/eslint-plugin": "^5.23.0", | ||
"@typescript-eslint/parser": "^5.23.0", | ||
"@typescript-eslint/eslint-plugin": "^5.24.0", | ||
"@typescript-eslint/parser": "^5.24.0", | ||
"@vitejs/plugin-react": "^1.3.2", | ||
@@ -55,3 +56,3 @@ "babel-plugin-add-import-extension": "^1.6.0", | ||
"eslint-plugin-import": "^2.26.0", | ||
"eslint-plugin-jest": "^26.1.5", | ||
"eslint-plugin-jest": "^26.2.2", | ||
"eslint-plugin-jest-dom": "^4.0.1", | ||
@@ -62,5 +63,5 @@ "eslint-plugin-jsx-a11y": "^6.4.1", | ||
"eslint-plugin-react-hooks": "^4.5.0", | ||
"eslint-plugin-testing-library": "^5.4.0", | ||
"eslint-plugin-testing-library": "^5.5.0", | ||
"fs-extra": "^10.1.0", | ||
"glob": "^8.0.1", | ||
"glob": "^8.0.3", | ||
"hygen": "^6.2.0", | ||
@@ -73,8 +74,8 @@ "jest": "^28.1.0", | ||
"parcel-plugin-nuke-dist": "^1.0.1", | ||
"playwright": "^1.21.1", | ||
"playwright": "^1.22.0", | ||
"postal-address-field-names": "^1.0.3", | ||
"prettier": "^2.6.2", | ||
"quicktype-core": "^6.0.71", | ||
"react-bootstrap": "^2.3.1", | ||
"react": "^18.1.0", | ||
"react-bootstrap": "^2.4.0", | ||
"react-dom": "^18.1.0", | ||
@@ -88,3 +89,3 @@ "react-router-dom": "^6.3.0", | ||
"versiony-cli": "^1.3.0", | ||
"vite": "^2.9.8" | ||
"vite": "^2.9.9" | ||
}, | ||
@@ -127,3 +128,3 @@ "peerDependencies": { | ||
"dependencies": { | ||
"posthog-js": "^1.21.0", | ||
"posthog-js": "^1.21.1", | ||
"uuid": "^8.3.2" | ||
@@ -130,0 +131,0 @@ }, |
Sorry, the diff of this file is not supported yet
301
7089
1337017
62
Updatedposthog-js@^1.21.1