@trackunit/react-core-contexts 1.8.2 → 1.8.5

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.js CHANGED
@@ -96,9 +96,7 @@ const createApolloClient = ({ graphqlPublicUrl, graphqlInternalUrl, graphqlRepor
96
96
  },
97
97
  });
98
98
  const invalidToken = graphQLErrors.some(x => {
99
- return (
100
- // saw it not unnecessary
101
- x.extensions?.code === "UNAUTHENTICATED" ||
99
+ return (x.extensions?.code === "UNAUTHENTICATED" ||
102
100
  x.message.includes("Invalid token specified") ||
103
101
  x.message.includes("Access denied! You need to be authorized to perform this action!"));
104
102
  });
@@ -219,7 +217,6 @@ const useApolloClient = () => {
219
217
  if (client.getToken() !== currentToken) {
220
218
  client.setToken(currentToken);
221
219
  }
222
- return currentToken;
223
220
  }, [client, currentToken]);
224
221
  return client;
225
222
  };
package/index.esm.js CHANGED
@@ -94,9 +94,7 @@ const createApolloClient = ({ graphqlPublicUrl, graphqlInternalUrl, graphqlRepor
94
94
  },
95
95
  });
96
96
  const invalidToken = graphQLErrors.some(x => {
97
- return (
98
- // saw it not unnecessary
99
- x.extensions?.code === "UNAUTHENTICATED" ||
97
+ return (x.extensions?.code === "UNAUTHENTICATED" ||
100
98
  x.message.includes("Invalid token specified") ||
101
99
  x.message.includes("Access denied! You need to be authorized to perform this action!"));
102
100
  });
@@ -217,7 +215,6 @@ const useApolloClient = () => {
217
215
  if (client.getToken() !== currentToken) {
218
216
  client.setToken(currentToken);
219
217
  }
220
- return currentToken;
221
218
  }, [client, currentToken]);
222
219
  return client;
223
220
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-core-contexts",
3
- "version": "1.8.2",
3
+ "version": "1.8.5",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
@@ -11,15 +11,15 @@
11
11
  "react": "19.0.0",
12
12
  "@js-temporal/polyfill": "^0.4.4",
13
13
  "jest-fetch-mock": "^3.0.3",
14
- "@trackunit/iris-app-api": "1.6.3",
15
- "@trackunit/react-core-contexts-api": "1.7.3",
16
- "@trackunit/react-core-hooks": "1.6.3",
17
- "@trackunit/i18n-library-translation": "1.6.3",
18
- "@trackunit/react-components": "1.7.3",
19
- "@trackunit/iris-app-runtime-core": "1.7.3",
14
+ "@trackunit/iris-app-api": "1.6.4",
15
+ "@trackunit/react-core-contexts-api": "1.7.4",
16
+ "@trackunit/react-core-hooks": "1.6.4",
17
+ "@trackunit/i18n-library-translation": "1.6.4",
18
+ "@trackunit/react-components": "1.7.5",
19
+ "@trackunit/iris-app-runtime-core": "1.7.4",
20
20
  "graphql": "^16.10.0",
21
21
  "graphql-sse": "^2.5.4",
22
- "@trackunit/react-test-setup": "1.3.3"
22
+ "@trackunit/react-test-setup": "1.3.4"
23
23
  },
24
24
  "module": "./index.esm.js",
25
25
  "main": "./index.cjs.js",