From ca8adc098b455b0a51f8145dd56315134615face Mon Sep 17 00:00:00 2001 From: Allen Benny Date: Tue, 18 Jun 2024 12:00:08 +0530 Subject: [PATCH 1/3] Add Sentry --- package-lock.json | 488 ++++++++++++++++++++++++++++++++++++++++++++++ package.json | 1 + src/onboarding.js | 27 ++- 3 files changed, 509 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index ce0feaeac..d7d00a783 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,6 +11,7 @@ "dependencies": { "@newfold-labs/js-utility-ui-analytics": "1.2.0", "@newfold-labs/wp-module-facebook": "^1.0.9", + "@sentry/react": "^8.9.2", "@wordpress/interface": "^5.25.0", "@wordpress/style-engine": "^0.11.0", "bytes": "^3.1.2", @@ -3390,6 +3391,232 @@ "node": ">=14.0.0" } }, + "node_modules/@sentry-internal/browser-utils": { + "version": "8.9.2", + "resolved": "https://registry.npmjs.org/@sentry-internal/browser-utils/-/browser-utils-8.9.2.tgz", + "integrity": "sha512-2A0A6TnfzFDvYCRWS9My3t+JKG6KlslhyaN35BTiOTlYDauEekyJP7BFFyeTJXCHm2BQgI8aRZhBKm+oR9QuYw==", + "dependencies": { + "@sentry/core": "8.9.2", + "@sentry/types": "8.9.2", + "@sentry/utils": "8.9.2" + }, + "engines": { + "node": ">=14.18" + } + }, + "node_modules/@sentry-internal/browser-utils/node_modules/@sentry/core": { + "version": "8.9.2", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-8.9.2.tgz", + "integrity": "sha512-ixm8NISFlPlEo3FjSaqmq4nnd13BRHoafwJ5MG+okCz6BKGZ1SexEggP42/QpGvDprUUHnfncG6WUMgcarr1zA==", + "dependencies": { + "@sentry/types": "8.9.2", + "@sentry/utils": "8.9.2" + }, + "engines": { + "node": ">=14.18" + } + }, + "node_modules/@sentry-internal/browser-utils/node_modules/@sentry/types": { + "version": "8.9.2", + "resolved": "https://registry.npmjs.org/@sentry/types/-/types-8.9.2.tgz", + "integrity": "sha512-+LFOyQGl+zk5SZRGZD2MEURf7i5RHgP/mt3s85Rza+vz8M211WJ0YsjkIGUJFSY842nged5QLx4JysLaBlLymg==", + "engines": { + "node": ">=14.18" + } + }, + "node_modules/@sentry-internal/browser-utils/node_modules/@sentry/utils": { + "version": "8.9.2", + "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-8.9.2.tgz", + "integrity": "sha512-A4srR9mEBFdVXwSEKjQ94msUbVkMr8JeFiEj9ouOFORw/Y/ux/WV2bWVD/ZI9wq0TcTNK8L1wBgU8UMS5lIq3A==", + "dependencies": { + "@sentry/types": "8.9.2" + }, + "engines": { + "node": ">=14.18" + } + }, + "node_modules/@sentry-internal/feedback": { + "version": "8.9.2", + "resolved": "https://registry.npmjs.org/@sentry-internal/feedback/-/feedback-8.9.2.tgz", + "integrity": "sha512-v04Q+08ohwautwmiDfK5hI+nFW2B/IYhBz7pZM9x1srkwmNA69XOFyo5u34TeVHhYOPbMM2Ubs0uNEcSWHgbbQ==", + "dependencies": { + "@sentry/core": "8.9.2", + "@sentry/types": "8.9.2", + "@sentry/utils": "8.9.2" + }, + "engines": { + "node": ">=14.18" + } + }, + "node_modules/@sentry-internal/feedback/node_modules/@sentry/core": { + "version": "8.9.2", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-8.9.2.tgz", + "integrity": "sha512-ixm8NISFlPlEo3FjSaqmq4nnd13BRHoafwJ5MG+okCz6BKGZ1SexEggP42/QpGvDprUUHnfncG6WUMgcarr1zA==", + "dependencies": { + "@sentry/types": "8.9.2", + "@sentry/utils": "8.9.2" + }, + "engines": { + "node": ">=14.18" + } + }, + "node_modules/@sentry-internal/feedback/node_modules/@sentry/types": { + "version": "8.9.2", + "resolved": "https://registry.npmjs.org/@sentry/types/-/types-8.9.2.tgz", + "integrity": "sha512-+LFOyQGl+zk5SZRGZD2MEURf7i5RHgP/mt3s85Rza+vz8M211WJ0YsjkIGUJFSY842nged5QLx4JysLaBlLymg==", + "engines": { + "node": ">=14.18" + } + }, + "node_modules/@sentry-internal/feedback/node_modules/@sentry/utils": { + "version": "8.9.2", + "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-8.9.2.tgz", + "integrity": "sha512-A4srR9mEBFdVXwSEKjQ94msUbVkMr8JeFiEj9ouOFORw/Y/ux/WV2bWVD/ZI9wq0TcTNK8L1wBgU8UMS5lIq3A==", + "dependencies": { + "@sentry/types": "8.9.2" + }, + "engines": { + "node": ">=14.18" + } + }, + "node_modules/@sentry-internal/replay": { + "version": "8.9.2", + "resolved": "https://registry.npmjs.org/@sentry-internal/replay/-/replay-8.9.2.tgz", + "integrity": "sha512-YPnrnXJd6mJpJspJ8pI8hd1KTMOxw+BARP5twiDwXlij1RTotwnNoX9UGaSm+ZPTexPD++6Zyp6xQf4vKKP3yg==", + "dependencies": { + "@sentry-internal/browser-utils": "8.9.2", + "@sentry/core": "8.9.2", + "@sentry/types": "8.9.2", + "@sentry/utils": "8.9.2" + }, + "engines": { + "node": ">=14.18" + } + }, + "node_modules/@sentry-internal/replay-canvas": { + "version": "8.9.2", + "resolved": "https://registry.npmjs.org/@sentry-internal/replay-canvas/-/replay-canvas-8.9.2.tgz", + "integrity": "sha512-vu9TssSjO+XbZjnoyYxMrBI4KgXG+zyqw3ThfPqG6o7O0BGa54fFwtZiMdGq/BHz017FuNiEz4fgtzuDd4gZJQ==", + "dependencies": { + "@sentry-internal/replay": "8.9.2", + "@sentry/core": "8.9.2", + "@sentry/types": "8.9.2", + "@sentry/utils": "8.9.2" + }, + "engines": { + "node": ">=14.18" + } + }, + "node_modules/@sentry-internal/replay-canvas/node_modules/@sentry/core": { + "version": "8.9.2", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-8.9.2.tgz", + "integrity": "sha512-ixm8NISFlPlEo3FjSaqmq4nnd13BRHoafwJ5MG+okCz6BKGZ1SexEggP42/QpGvDprUUHnfncG6WUMgcarr1zA==", + "dependencies": { + "@sentry/types": "8.9.2", + "@sentry/utils": "8.9.2" + }, + "engines": { + "node": ">=14.18" + } + }, + "node_modules/@sentry-internal/replay-canvas/node_modules/@sentry/types": { + "version": "8.9.2", + "resolved": "https://registry.npmjs.org/@sentry/types/-/types-8.9.2.tgz", + "integrity": "sha512-+LFOyQGl+zk5SZRGZD2MEURf7i5RHgP/mt3s85Rza+vz8M211WJ0YsjkIGUJFSY842nged5QLx4JysLaBlLymg==", + "engines": { + "node": ">=14.18" + } + }, + "node_modules/@sentry-internal/replay-canvas/node_modules/@sentry/utils": { + "version": "8.9.2", + "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-8.9.2.tgz", + "integrity": "sha512-A4srR9mEBFdVXwSEKjQ94msUbVkMr8JeFiEj9ouOFORw/Y/ux/WV2bWVD/ZI9wq0TcTNK8L1wBgU8UMS5lIq3A==", + "dependencies": { + "@sentry/types": "8.9.2" + }, + "engines": { + "node": ">=14.18" + } + }, + "node_modules/@sentry-internal/replay/node_modules/@sentry/core": { + "version": "8.9.2", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-8.9.2.tgz", + "integrity": "sha512-ixm8NISFlPlEo3FjSaqmq4nnd13BRHoafwJ5MG+okCz6BKGZ1SexEggP42/QpGvDprUUHnfncG6WUMgcarr1zA==", + "dependencies": { + "@sentry/types": "8.9.2", + "@sentry/utils": "8.9.2" + }, + "engines": { + "node": ">=14.18" + } + }, + "node_modules/@sentry-internal/replay/node_modules/@sentry/types": { + "version": "8.9.2", + "resolved": "https://registry.npmjs.org/@sentry/types/-/types-8.9.2.tgz", + "integrity": "sha512-+LFOyQGl+zk5SZRGZD2MEURf7i5RHgP/mt3s85Rza+vz8M211WJ0YsjkIGUJFSY842nged5QLx4JysLaBlLymg==", + "engines": { + "node": ">=14.18" + } + }, + "node_modules/@sentry-internal/replay/node_modules/@sentry/utils": { + "version": "8.9.2", + "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-8.9.2.tgz", + "integrity": "sha512-A4srR9mEBFdVXwSEKjQ94msUbVkMr8JeFiEj9ouOFORw/Y/ux/WV2bWVD/ZI9wq0TcTNK8L1wBgU8UMS5lIq3A==", + "dependencies": { + "@sentry/types": "8.9.2" + }, + "engines": { + "node": ">=14.18" + } + }, + "node_modules/@sentry/browser": { + "version": "8.9.2", + "resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-8.9.2.tgz", + "integrity": "sha512-jI5XY4j8Sa+YteokI+4SW+A/ErZxPDnspjvV3dm5pIPWvEFhvDyXWZSepqaoqwo3L7fdkRMzXY8Bi4T7qDVMWg==", + "dependencies": { + "@sentry-internal/browser-utils": "8.9.2", + "@sentry-internal/feedback": "8.9.2", + "@sentry-internal/replay": "8.9.2", + "@sentry-internal/replay-canvas": "8.9.2", + "@sentry/core": "8.9.2", + "@sentry/types": "8.9.2", + "@sentry/utils": "8.9.2" + }, + "engines": { + "node": ">=14.18" + } + }, + "node_modules/@sentry/browser/node_modules/@sentry/core": { + "version": "8.9.2", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-8.9.2.tgz", + "integrity": "sha512-ixm8NISFlPlEo3FjSaqmq4nnd13BRHoafwJ5MG+okCz6BKGZ1SexEggP42/QpGvDprUUHnfncG6WUMgcarr1zA==", + "dependencies": { + "@sentry/types": "8.9.2", + "@sentry/utils": "8.9.2" + }, + "engines": { + "node": ">=14.18" + } + }, + "node_modules/@sentry/browser/node_modules/@sentry/types": { + "version": "8.9.2", + "resolved": "https://registry.npmjs.org/@sentry/types/-/types-8.9.2.tgz", + "integrity": "sha512-+LFOyQGl+zk5SZRGZD2MEURf7i5RHgP/mt3s85Rza+vz8M211WJ0YsjkIGUJFSY842nged5QLx4JysLaBlLymg==", + "engines": { + "node": ">=14.18" + } + }, + "node_modules/@sentry/browser/node_modules/@sentry/utils": { + "version": "8.9.2", + "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-8.9.2.tgz", + "integrity": "sha512-A4srR9mEBFdVXwSEKjQ94msUbVkMr8JeFiEj9ouOFORw/Y/ux/WV2bWVD/ZI9wq0TcTNK8L1wBgU8UMS5lIq3A==", + "dependencies": { + "@sentry/types": "8.9.2" + }, + "engines": { + "node": ">=14.18" + } + }, "node_modules/@sentry/core": { "version": "6.19.7", "resolved": "https://registry.npmjs.org/@sentry/core/-/core-6.19.7.tgz", @@ -3477,6 +3704,55 @@ "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", "dev": true }, + "node_modules/@sentry/react": { + "version": "8.9.2", + "resolved": "https://registry.npmjs.org/@sentry/react/-/react-8.9.2.tgz", + "integrity": "sha512-RK4tnkmGg1U9bAjMkY7iyKvZf1diGHYi5o8eOIrJ29OTg3c73C3/MyEuqAlP386tLglcQBn22u9JeP6g4yfiFg==", + "dependencies": { + "@sentry/browser": "8.9.2", + "@sentry/core": "8.9.2", + "@sentry/types": "8.9.2", + "@sentry/utils": "8.9.2", + "hoist-non-react-statics": "^3.3.2" + }, + "engines": { + "node": ">=14.18" + }, + "peerDependencies": { + "react": "^16.14.0 || 17.x || 18.x || 19.x" + } + }, + "node_modules/@sentry/react/node_modules/@sentry/core": { + "version": "8.9.2", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-8.9.2.tgz", + "integrity": "sha512-ixm8NISFlPlEo3FjSaqmq4nnd13BRHoafwJ5MG+okCz6BKGZ1SexEggP42/QpGvDprUUHnfncG6WUMgcarr1zA==", + "dependencies": { + "@sentry/types": "8.9.2", + "@sentry/utils": "8.9.2" + }, + "engines": { + "node": ">=14.18" + } + }, + "node_modules/@sentry/react/node_modules/@sentry/types": { + "version": "8.9.2", + "resolved": "https://registry.npmjs.org/@sentry/types/-/types-8.9.2.tgz", + "integrity": "sha512-+LFOyQGl+zk5SZRGZD2MEURf7i5RHgP/mt3s85Rza+vz8M211WJ0YsjkIGUJFSY842nged5QLx4JysLaBlLymg==", + "engines": { + "node": ">=14.18" + } + }, + "node_modules/@sentry/react/node_modules/@sentry/utils": { + "version": "8.9.2", + "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-8.9.2.tgz", + "integrity": "sha512-A4srR9mEBFdVXwSEKjQ94msUbVkMr8JeFiEj9ouOFORw/Y/ux/WV2bWVD/ZI9wq0TcTNK8L1wBgU8UMS5lIq3A==", + "dependencies": { + "@sentry/types": "8.9.2" + }, + "engines": { + "node": ">=14.18" + } + }, "node_modules/@sentry/types": { "version": "6.19.7", "resolved": "https://registry.npmjs.org/@sentry/types/-/types-6.19.7.tgz", @@ -24585,6 +24861,182 @@ "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.15.1.tgz", "integrity": "sha512-zcU0gM3z+3iqj8UX45AmWY810l3oUmXM7uH4dt5xtzvMhRtYVhKGOmgOd1877dOPPepfCjUv57w+syamWIYe7w==" }, + "@sentry-internal/browser-utils": { + "version": "8.9.2", + "resolved": "https://registry.npmjs.org/@sentry-internal/browser-utils/-/browser-utils-8.9.2.tgz", + "integrity": "sha512-2A0A6TnfzFDvYCRWS9My3t+JKG6KlslhyaN35BTiOTlYDauEekyJP7BFFyeTJXCHm2BQgI8aRZhBKm+oR9QuYw==", + "requires": { + "@sentry/core": "8.9.2", + "@sentry/types": "8.9.2", + "@sentry/utils": "8.9.2" + }, + "dependencies": { + "@sentry/core": { + "version": "8.9.2", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-8.9.2.tgz", + "integrity": "sha512-ixm8NISFlPlEo3FjSaqmq4nnd13BRHoafwJ5MG+okCz6BKGZ1SexEggP42/QpGvDprUUHnfncG6WUMgcarr1zA==", + "requires": { + "@sentry/types": "8.9.2", + "@sentry/utils": "8.9.2" + } + }, + "@sentry/types": { + "version": "8.9.2", + "resolved": "https://registry.npmjs.org/@sentry/types/-/types-8.9.2.tgz", + "integrity": "sha512-+LFOyQGl+zk5SZRGZD2MEURf7i5RHgP/mt3s85Rza+vz8M211WJ0YsjkIGUJFSY842nged5QLx4JysLaBlLymg==" + }, + "@sentry/utils": { + "version": "8.9.2", + "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-8.9.2.tgz", + "integrity": "sha512-A4srR9mEBFdVXwSEKjQ94msUbVkMr8JeFiEj9ouOFORw/Y/ux/WV2bWVD/ZI9wq0TcTNK8L1wBgU8UMS5lIq3A==", + "requires": { + "@sentry/types": "8.9.2" + } + } + } + }, + "@sentry-internal/feedback": { + "version": "8.9.2", + "resolved": "https://registry.npmjs.org/@sentry-internal/feedback/-/feedback-8.9.2.tgz", + "integrity": "sha512-v04Q+08ohwautwmiDfK5hI+nFW2B/IYhBz7pZM9x1srkwmNA69XOFyo5u34TeVHhYOPbMM2Ubs0uNEcSWHgbbQ==", + "requires": { + "@sentry/core": "8.9.2", + "@sentry/types": "8.9.2", + "@sentry/utils": "8.9.2" + }, + "dependencies": { + "@sentry/core": { + "version": "8.9.2", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-8.9.2.tgz", + "integrity": "sha512-ixm8NISFlPlEo3FjSaqmq4nnd13BRHoafwJ5MG+okCz6BKGZ1SexEggP42/QpGvDprUUHnfncG6WUMgcarr1zA==", + "requires": { + "@sentry/types": "8.9.2", + "@sentry/utils": "8.9.2" + } + }, + "@sentry/types": { + "version": "8.9.2", + "resolved": "https://registry.npmjs.org/@sentry/types/-/types-8.9.2.tgz", + "integrity": "sha512-+LFOyQGl+zk5SZRGZD2MEURf7i5RHgP/mt3s85Rza+vz8M211WJ0YsjkIGUJFSY842nged5QLx4JysLaBlLymg==" + }, + "@sentry/utils": { + "version": "8.9.2", + "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-8.9.2.tgz", + "integrity": "sha512-A4srR9mEBFdVXwSEKjQ94msUbVkMr8JeFiEj9ouOFORw/Y/ux/WV2bWVD/ZI9wq0TcTNK8L1wBgU8UMS5lIq3A==", + "requires": { + "@sentry/types": "8.9.2" + } + } + } + }, + "@sentry-internal/replay": { + "version": "8.9.2", + "resolved": "https://registry.npmjs.org/@sentry-internal/replay/-/replay-8.9.2.tgz", + "integrity": "sha512-YPnrnXJd6mJpJspJ8pI8hd1KTMOxw+BARP5twiDwXlij1RTotwnNoX9UGaSm+ZPTexPD++6Zyp6xQf4vKKP3yg==", + "requires": { + "@sentry-internal/browser-utils": "8.9.2", + "@sentry/core": "8.9.2", + "@sentry/types": "8.9.2", + "@sentry/utils": "8.9.2" + }, + "dependencies": { + "@sentry/core": { + "version": "8.9.2", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-8.9.2.tgz", + "integrity": "sha512-ixm8NISFlPlEo3FjSaqmq4nnd13BRHoafwJ5MG+okCz6BKGZ1SexEggP42/QpGvDprUUHnfncG6WUMgcarr1zA==", + "requires": { + "@sentry/types": "8.9.2", + "@sentry/utils": "8.9.2" + } + }, + "@sentry/types": { + "version": "8.9.2", + "resolved": "https://registry.npmjs.org/@sentry/types/-/types-8.9.2.tgz", + "integrity": "sha512-+LFOyQGl+zk5SZRGZD2MEURf7i5RHgP/mt3s85Rza+vz8M211WJ0YsjkIGUJFSY842nged5QLx4JysLaBlLymg==" + }, + "@sentry/utils": { + "version": "8.9.2", + "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-8.9.2.tgz", + "integrity": "sha512-A4srR9mEBFdVXwSEKjQ94msUbVkMr8JeFiEj9ouOFORw/Y/ux/WV2bWVD/ZI9wq0TcTNK8L1wBgU8UMS5lIq3A==", + "requires": { + "@sentry/types": "8.9.2" + } + } + } + }, + "@sentry-internal/replay-canvas": { + "version": "8.9.2", + "resolved": "https://registry.npmjs.org/@sentry-internal/replay-canvas/-/replay-canvas-8.9.2.tgz", + "integrity": "sha512-vu9TssSjO+XbZjnoyYxMrBI4KgXG+zyqw3ThfPqG6o7O0BGa54fFwtZiMdGq/BHz017FuNiEz4fgtzuDd4gZJQ==", + "requires": { + "@sentry-internal/replay": "8.9.2", + "@sentry/core": "8.9.2", + "@sentry/types": "8.9.2", + "@sentry/utils": "8.9.2" + }, + "dependencies": { + "@sentry/core": { + "version": "8.9.2", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-8.9.2.tgz", + "integrity": "sha512-ixm8NISFlPlEo3FjSaqmq4nnd13BRHoafwJ5MG+okCz6BKGZ1SexEggP42/QpGvDprUUHnfncG6WUMgcarr1zA==", + "requires": { + "@sentry/types": "8.9.2", + "@sentry/utils": "8.9.2" + } + }, + "@sentry/types": { + "version": "8.9.2", + "resolved": "https://registry.npmjs.org/@sentry/types/-/types-8.9.2.tgz", + "integrity": "sha512-+LFOyQGl+zk5SZRGZD2MEURf7i5RHgP/mt3s85Rza+vz8M211WJ0YsjkIGUJFSY842nged5QLx4JysLaBlLymg==" + }, + "@sentry/utils": { + "version": "8.9.2", + "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-8.9.2.tgz", + "integrity": "sha512-A4srR9mEBFdVXwSEKjQ94msUbVkMr8JeFiEj9ouOFORw/Y/ux/WV2bWVD/ZI9wq0TcTNK8L1wBgU8UMS5lIq3A==", + "requires": { + "@sentry/types": "8.9.2" + } + } + } + }, + "@sentry/browser": { + "version": "8.9.2", + "resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-8.9.2.tgz", + "integrity": "sha512-jI5XY4j8Sa+YteokI+4SW+A/ErZxPDnspjvV3dm5pIPWvEFhvDyXWZSepqaoqwo3L7fdkRMzXY8Bi4T7qDVMWg==", + "requires": { + "@sentry-internal/browser-utils": "8.9.2", + "@sentry-internal/feedback": "8.9.2", + "@sentry-internal/replay": "8.9.2", + "@sentry-internal/replay-canvas": "8.9.2", + "@sentry/core": "8.9.2", + "@sentry/types": "8.9.2", + "@sentry/utils": "8.9.2" + }, + "dependencies": { + "@sentry/core": { + "version": "8.9.2", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-8.9.2.tgz", + "integrity": "sha512-ixm8NISFlPlEo3FjSaqmq4nnd13BRHoafwJ5MG+okCz6BKGZ1SexEggP42/QpGvDprUUHnfncG6WUMgcarr1zA==", + "requires": { + "@sentry/types": "8.9.2", + "@sentry/utils": "8.9.2" + } + }, + "@sentry/types": { + "version": "8.9.2", + "resolved": "https://registry.npmjs.org/@sentry/types/-/types-8.9.2.tgz", + "integrity": "sha512-+LFOyQGl+zk5SZRGZD2MEURf7i5RHgP/mt3s85Rza+vz8M211WJ0YsjkIGUJFSY842nged5QLx4JysLaBlLymg==" + }, + "@sentry/utils": { + "version": "8.9.2", + "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-8.9.2.tgz", + "integrity": "sha512-A4srR9mEBFdVXwSEKjQ94msUbVkMr8JeFiEj9ouOFORw/Y/ux/WV2bWVD/ZI9wq0TcTNK8L1wBgU8UMS5lIq3A==", + "requires": { + "@sentry/types": "8.9.2" + } + } + } + }, "@sentry/core": { "version": "6.19.7", "resolved": "https://registry.npmjs.org/@sentry/core/-/core-6.19.7.tgz", @@ -24668,6 +25120,42 @@ } } }, + "@sentry/react": { + "version": "8.9.2", + "resolved": "https://registry.npmjs.org/@sentry/react/-/react-8.9.2.tgz", + "integrity": "sha512-RK4tnkmGg1U9bAjMkY7iyKvZf1diGHYi5o8eOIrJ29OTg3c73C3/MyEuqAlP386tLglcQBn22u9JeP6g4yfiFg==", + "requires": { + "@sentry/browser": "8.9.2", + "@sentry/core": "8.9.2", + "@sentry/types": "8.9.2", + "@sentry/utils": "8.9.2", + "hoist-non-react-statics": "^3.3.2" + }, + "dependencies": { + "@sentry/core": { + "version": "8.9.2", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-8.9.2.tgz", + "integrity": "sha512-ixm8NISFlPlEo3FjSaqmq4nnd13BRHoafwJ5MG+okCz6BKGZ1SexEggP42/QpGvDprUUHnfncG6WUMgcarr1zA==", + "requires": { + "@sentry/types": "8.9.2", + "@sentry/utils": "8.9.2" + } + }, + "@sentry/types": { + "version": "8.9.2", + "resolved": "https://registry.npmjs.org/@sentry/types/-/types-8.9.2.tgz", + "integrity": "sha512-+LFOyQGl+zk5SZRGZD2MEURf7i5RHgP/mt3s85Rza+vz8M211WJ0YsjkIGUJFSY842nged5QLx4JysLaBlLymg==" + }, + "@sentry/utils": { + "version": "8.9.2", + "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-8.9.2.tgz", + "integrity": "sha512-A4srR9mEBFdVXwSEKjQ94msUbVkMr8JeFiEj9ouOFORw/Y/ux/WV2bWVD/ZI9wq0TcTNK8L1wBgU8UMS5lIq3A==", + "requires": { + "@sentry/types": "8.9.2" + } + } + } + }, "@sentry/types": { "version": "6.19.7", "resolved": "https://registry.npmjs.org/@sentry/types/-/types-6.19.7.tgz", diff --git a/package.json b/package.json index c828e8d08..f1265d83f 100644 --- a/package.json +++ b/package.json @@ -31,6 +31,7 @@ "dependencies": { "@newfold-labs/js-utility-ui-analytics": "1.2.0", "@newfold-labs/wp-module-facebook": "^1.0.9", + "@sentry/react": "^8.9.2", "@wordpress/interface": "^5.25.0", "@wordpress/style-engine": "^0.11.0", "bytes": "^3.1.2", diff --git a/src/onboarding.js b/src/onboarding.js index 83805ad3e..b96a6707a 100644 --- a/src/onboarding.js +++ b/src/onboarding.js @@ -2,34 +2,47 @@ import './webpack-public-path'; import { NFD_ONBOARDING_ELEMENT_ID, runtimeDataExists } from './constants'; +import * as Sentry from '@sentry/react'; import domReady from '@wordpress/dom-ready'; +const version = require('../package.json').version; import { registerCoreBlocks } from '@wordpress/block-library'; import initializeNFDOnboarding from './OnboardingSPA'; import { HiiveAnalytics } from '@newfold-labs/js-utility-ui-analytics'; import { onboardingRestURL } from './OnboardingSPA/utils/api/common'; import { CATEGORY } from './OnboardingSPA/utils/analytics/hiive/constants'; -if ( runtimeDataExists ) { - domReady( () => { - HiiveAnalytics.initialize( { +const releaseVersion = `wp-onboarding@${version}`; + +if (runtimeDataExists) { + domReady(() => { + // Integrate Sentry to send errors and data for tracking + Sentry.init({ + dsn: 'https://cd5bd4c30b914e0d1d0f49413e600afa@o4506197201715200.ingest.us.sentry.io/4507383861805056', + integrations: [Sentry.browserTracingIntegration()], + release: releaseVersion, + // Performance Monitoring + tracesSampleRate: 1.0, // Capture 100% of the transactions + }); + + HiiveAnalytics.initialize({ namespace: CATEGORY, urls: { - single: onboardingRestURL( 'events' ), - batch: onboardingRestURL( 'events/batch' ), + single: onboardingRestURL('events'), + batch: onboardingRestURL('events/batch'), }, settings: { debounce: { time: 3000, }, }, - } ); + }); initializeNFDOnboarding( NFD_ONBOARDING_ELEMENT_ID, window.nfdOnboarding ); registerCoreBlocks(); - } ); + }); } else { /* eslint-disable no-console */ console.log( From 16e86b8cf6cce46354b1535f58af614120a1af53 Mon Sep 17 00:00:00 2001 From: Allen Benny Date: Tue, 18 Jun 2024 12:12:09 +0530 Subject: [PATCH 2/3] Lint --- src/onboarding.js | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/onboarding.js b/src/onboarding.js index b96a6707a..cf7d0505c 100644 --- a/src/onboarding.js +++ b/src/onboarding.js @@ -4,45 +4,45 @@ import { NFD_ONBOARDING_ELEMENT_ID, runtimeDataExists } from './constants'; import * as Sentry from '@sentry/react'; import domReady from '@wordpress/dom-ready'; -const version = require('../package.json').version; +const version = require( '../package.json' ).version; import { registerCoreBlocks } from '@wordpress/block-library'; import initializeNFDOnboarding from './OnboardingSPA'; import { HiiveAnalytics } from '@newfold-labs/js-utility-ui-analytics'; import { onboardingRestURL } from './OnboardingSPA/utils/api/common'; import { CATEGORY } from './OnboardingSPA/utils/analytics/hiive/constants'; -const releaseVersion = `wp-onboarding@${version}`; +const releaseVersion = `wp-onboarding@${ version }`; -if (runtimeDataExists) { - domReady(() => { +if ( runtimeDataExists ) { + domReady( () => { // Integrate Sentry to send errors and data for tracking - Sentry.init({ + Sentry.init( { dsn: 'https://cd5bd4c30b914e0d1d0f49413e600afa@o4506197201715200.ingest.us.sentry.io/4507383861805056', - integrations: [Sentry.browserTracingIntegration()], + integrations: [ Sentry.browserTracingIntegration() ], release: releaseVersion, // Performance Monitoring tracesSampleRate: 1.0, // Capture 100% of the transactions - }); + } ); - HiiveAnalytics.initialize({ + HiiveAnalytics.initialize( { namespace: CATEGORY, urls: { - single: onboardingRestURL('events'), - batch: onboardingRestURL('events/batch'), + single: onboardingRestURL( 'events' ), + batch: onboardingRestURL( 'events/batch' ), }, settings: { debounce: { time: 3000, }, }, - }); + } ); initializeNFDOnboarding( NFD_ONBOARDING_ELEMENT_ID, window.nfdOnboarding ); registerCoreBlocks(); - }); + } ); } else { /* eslint-disable no-console */ console.log( From 9537f5c799bd98ce41d7315aee0ef0a3e46bb98e Mon Sep 17 00:00:00 2001 From: Allen Benny Date: Tue, 25 Jun 2024 11:59:44 +0530 Subject: [PATCH 3/3] Update onboarding.js --- src/onboarding.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/onboarding.js b/src/onboarding.js index cf7d0505c..ccb1810ef 100644 --- a/src/onboarding.js +++ b/src/onboarding.js @@ -17,7 +17,7 @@ if ( runtimeDataExists ) { domReady( () => { // Integrate Sentry to send errors and data for tracking Sentry.init( { - dsn: 'https://cd5bd4c30b914e0d1d0f49413e600afa@o4506197201715200.ingest.us.sentry.io/4507383861805056', + dsn: window.nfdOnboarding.sentryInitDsnURL, integrations: [ Sentry.browserTracingIntegration() ], release: releaseVersion, // Performance Monitoring