@trackunit/react-core-contexts 0.4.172 → 0.4.173
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/index.cjs +8 -14
- package/index.js +8 -11
- package/package.json +1 -2
package/index.cjs
CHANGED
|
@@ -8,7 +8,6 @@ var context = require('@apollo/client/link/context');
|
|
|
8
8
|
var error = require('@apollo/client/link/error');
|
|
9
9
|
var Sentry = require('@sentry/browser');
|
|
10
10
|
var reactCoreHooks = require('@trackunit/react-core-hooks');
|
|
11
|
-
var amplitude = require('amplitude-js');
|
|
12
11
|
var apolloUploadClient = require('apollo-upload-client');
|
|
13
12
|
var React = require('react');
|
|
14
13
|
var irisAppRuntimeCore = require('@trackunit/iris-app-runtime-core');
|
|
@@ -17,8 +16,6 @@ var i18nLibraryTranslation = require('@trackunit/i18n-library-translation');
|
|
|
17
16
|
var reactComponents = require('@trackunit/react-components');
|
|
18
17
|
var reactRouterDom = require('react-router-dom');
|
|
19
18
|
|
|
20
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
21
|
-
|
|
22
19
|
function _interopNamespace(e) {
|
|
23
20
|
if (e && e.__esModule) return e;
|
|
24
21
|
var n = Object.create(null);
|
|
@@ -38,7 +35,6 @@ function _interopNamespace(e) {
|
|
|
38
35
|
}
|
|
39
36
|
|
|
40
37
|
var Sentry__namespace = /*#__PURE__*/_interopNamespace(Sentry);
|
|
41
|
-
var amplitude__default = /*#__PURE__*/_interopDefaultLegacy(amplitude);
|
|
42
38
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
43
39
|
|
|
44
40
|
/******************************************************************************
|
|
@@ -127,16 +123,14 @@ const createApolloClient = ({ graphqlManagerUrl, graphqlPublicUrl, graphqlManage
|
|
|
127
123
|
((_c = x === null || x === void 0 ? void 0 : x.message) === null || _c === void 0 ? void 0 : _c.includes("Access denied! You need to be authorized to perform this action!")));
|
|
128
124
|
});
|
|
129
125
|
if (invalidToken) {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
// },
|
|
139
|
-
// });
|
|
126
|
+
Sentry__namespace.captureException({
|
|
127
|
+
category: "GraphQL",
|
|
128
|
+
message: "GraphQL Error - invalidToken",
|
|
129
|
+
level: "warning",
|
|
130
|
+
data: {
|
|
131
|
+
log: JSON.stringify(errorResponse.graphQLErrors),
|
|
132
|
+
},
|
|
133
|
+
});
|
|
140
134
|
}
|
|
141
135
|
}
|
|
142
136
|
if (errorResponse.networkError) {
|
package/index.js
CHANGED
|
@@ -4,7 +4,6 @@ import { setContext } from '@apollo/client/link/context';
|
|
|
4
4
|
import { onError } from '@apollo/client/link/error';
|
|
5
5
|
import * as Sentry from '@sentry/browser';
|
|
6
6
|
import { useEnvironment, useCurrentUser, useToken, ToastProvider, AnalyticsContextProvider, AssetSortingProvider, EnvironmentContextProvider, GlobalSelectionProvider, OemBrandingContextProvider, TokenProvider, useURLSynchronization, CurrentUserProvider, UserSubscriptionProvider } from '@trackunit/react-core-hooks';
|
|
7
|
-
import amplitude from 'amplitude-js';
|
|
8
7
|
import { createUploadLink } from 'apollo-upload-client';
|
|
9
8
|
import * as React from 'react';
|
|
10
9
|
import { useMemo, useEffect, useState } from 'react';
|
|
@@ -100,16 +99,14 @@ const createApolloClient = ({ graphqlManagerUrl, graphqlPublicUrl, graphqlManage
|
|
|
100
99
|
((_c = x === null || x === void 0 ? void 0 : x.message) === null || _c === void 0 ? void 0 : _c.includes("Access denied! You need to be authorized to perform this action!")));
|
|
101
100
|
});
|
|
102
101
|
if (invalidToken) {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
// },
|
|
112
|
-
// });
|
|
102
|
+
Sentry.captureException({
|
|
103
|
+
category: "GraphQL",
|
|
104
|
+
message: "GraphQL Error - invalidToken",
|
|
105
|
+
level: "warning",
|
|
106
|
+
data: {
|
|
107
|
+
log: JSON.stringify(errorResponse.graphQLErrors),
|
|
108
|
+
},
|
|
109
|
+
});
|
|
113
110
|
}
|
|
114
111
|
}
|
|
115
112
|
if (errorResponse.networkError) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-core-contexts",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.173",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"dependencies": {
|
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
"@trackunit/react-core-contexts-api": "0.2.38",
|
|
15
15
|
"@trackunit/react-core-contexts-test": "0.1.72",
|
|
16
16
|
"@trackunit/react-core-hooks": "0.2.62",
|
|
17
|
-
"amplitude-js": "7.4.4",
|
|
18
17
|
"apollo-upload-client": "17.0.0",
|
|
19
18
|
"react": "18.2.0",
|
|
20
19
|
"react-router-dom": "6.4.5"
|