@commercetools-frontend/application-shell-connectors 22.39.0 → 22.40.0

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.
@@ -24,7 +24,6 @@ var jsxRuntime = require('@emotion/react/jsx-runtime');
24
24
  var react$1 = require('@apollo/client/react');
25
25
  var warning = require('tiny-warning');
26
26
  var constants = require('@commercetools-frontend/constants');
27
- var _URLSearchParams = require('@babel/runtime-corejs3/core-js-stable/url-search-params');
28
27
  var _findInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/find');
29
28
  var client = require('@apollo/client');
30
29
  var loggerLink = require('apollo-link-logger');
@@ -66,7 +65,6 @@ var _reduceInstanceProperty__default = /*#__PURE__*/_interopDefault(_reduceInsta
66
65
  var _Object$entries__default = /*#__PURE__*/_interopDefault(_Object$entries);
67
66
  var _valuesInstanceProperty__default = /*#__PURE__*/_interopDefault(_valuesInstanceProperty);
68
67
  var warning__default = /*#__PURE__*/_interopDefault(warning);
69
- var _URLSearchParams__default = /*#__PURE__*/_interopDefault(_URLSearchParams);
70
68
  var _findInstanceProperty__default = /*#__PURE__*/_interopDefault(_findInstanceProperty);
71
69
  var loggerLink__default = /*#__PURE__*/_interopDefault(loggerLink);
72
70
  var history__default = /*#__PURE__*/_interopDefault(history);
@@ -81,7 +79,7 @@ var _Reflect$construct__default = /*#__PURE__*/_interopDefault(_Reflect$construc
81
79
  var _JSON$stringify__default = /*#__PURE__*/_interopDefault(_JSON$stringify);
82
80
 
83
81
  // NOTE: This string will be replaced on build time with the package version.
84
- var version = "22.39.0";
82
+ var version = "22.40.0";
85
83
 
86
84
  // From https://github.com/acdlite/recompose/blob/master/src/packages/recompose/getDisplayName.js
87
85
  const getDisplayName = Component => {
@@ -954,24 +952,11 @@ const tokenRetryLink = new retry.RetryLink({
954
952
 
955
953
  function ownKeys(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
956
954
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
957
- // Inspired by https://www.apollographql.com/docs/react/api/link/apollo-link-http#dynamic-uri
958
- const customFetch = (uri, options) => {
959
- const searchParams = new _URLSearchParams__default["default"]();
960
- // We attempt to read the GraphQL `operationName` to append it as a query parameter.
961
- // This is only useful for debugging purposes (network tab) and does not have any functional implication.
962
- if (options?.body) try {
963
- const parsed = JSON.parse(options.body);
964
- searchParams.set('op', parsed.operationName);
965
- } catch {
966
- // noop
967
- }
968
- return fetch(searchParams.size > 0 ? `${uri}?${searchParams.toString()}` : uri, options);
969
- };
970
955
  const createApolloLink = function () {
971
956
  let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
972
957
  const httpLink = client.createHttpLink({
973
958
  uri: `${getMcApiUrl()}/graphql`,
974
- fetch: customFetch
959
+ fetch
975
960
  });
976
961
 
977
962
  // The order of links is IMPORTANT!
@@ -24,7 +24,6 @@ var jsxRuntime = require('@emotion/react/jsx-runtime');
24
24
  var react$1 = require('@apollo/client/react');
25
25
  require('tiny-warning');
26
26
  var constants = require('@commercetools-frontend/constants');
27
- var _URLSearchParams = require('@babel/runtime-corejs3/core-js-stable/url-search-params');
28
27
  var _findInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/find');
29
28
  var client = require('@apollo/client');
30
29
  var loggerLink = require('apollo-link-logger');
@@ -64,7 +63,6 @@ var _URL__default = /*#__PURE__*/_interopDefault(_URL);
64
63
  var _reduceInstanceProperty__default = /*#__PURE__*/_interopDefault(_reduceInstanceProperty);
65
64
  var _Object$entries__default = /*#__PURE__*/_interopDefault(_Object$entries);
66
65
  var _valuesInstanceProperty__default = /*#__PURE__*/_interopDefault(_valuesInstanceProperty);
67
- var _URLSearchParams__default = /*#__PURE__*/_interopDefault(_URLSearchParams);
68
66
  var _findInstanceProperty__default = /*#__PURE__*/_interopDefault(_findInstanceProperty);
69
67
  var loggerLink__default = /*#__PURE__*/_interopDefault(loggerLink);
70
68
  var history__default = /*#__PURE__*/_interopDefault(history);
@@ -79,7 +77,7 @@ var _Reflect$construct__default = /*#__PURE__*/_interopDefault(_Reflect$construc
79
77
  var _JSON$stringify__default = /*#__PURE__*/_interopDefault(_JSON$stringify);
80
78
 
81
79
  // NOTE: This string will be replaced on build time with the package version.
82
- var version = "22.39.0";
80
+ var version = "22.40.0";
83
81
 
84
82
  // From https://github.com/acdlite/recompose/blob/master/src/packages/recompose/getDisplayName.js
85
83
  const getDisplayName = Component => {
@@ -932,24 +930,11 @@ const tokenRetryLink = new retry.RetryLink({
932
930
 
933
931
  function ownKeys(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
934
932
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
935
- // Inspired by https://www.apollographql.com/docs/react/api/link/apollo-link-http#dynamic-uri
936
- const customFetch = (uri, options) => {
937
- const searchParams = new _URLSearchParams__default["default"]();
938
- // We attempt to read the GraphQL `operationName` to append it as a query parameter.
939
- // This is only useful for debugging purposes (network tab) and does not have any functional implication.
940
- if (options?.body) try {
941
- const parsed = JSON.parse(options.body);
942
- searchParams.set('op', parsed.operationName);
943
- } catch {
944
- // noop
945
- }
946
- return fetch(searchParams.size > 0 ? `${uri}?${searchParams.toString()}` : uri, options);
947
- };
948
933
  const createApolloLink = function () {
949
934
  let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
950
935
  const httpLink = client.createHttpLink({
951
936
  uri: `${getMcApiUrl()}/graphql`,
952
- fetch: customFetch
937
+ fetch
953
938
  });
954
939
 
955
940
  // The order of links is IMPORTANT!
@@ -20,7 +20,6 @@ import { jsx } from '@emotion/react/jsx-runtime';
20
20
  import { useQuery, useLazyQuery, useMutation } from '@apollo/client/react';
21
21
  import warning from 'tiny-warning';
22
22
  import { GRAPHQL_TARGETS, SUPPORTED_HEADERS, STATUS_CODES, LOGOUT_REASONS, STORAGE_KEYS, LOGIN_STRATEGY_OIDC } from '@commercetools-frontend/constants';
23
- import _URLSearchParams from '@babel/runtime-corejs3/core-js-stable/url-search-params';
24
23
  import _findInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/find';
25
24
  import { ApolloLink, ApolloClient, InMemoryCache, createHttpLink, from } from '@apollo/client';
26
25
  import loggerLink from 'apollo-link-logger';
@@ -46,7 +45,7 @@ import _JSON$stringify from '@babel/runtime-corejs3/core-js-stable/json/stringif
46
45
  import { RetryLink } from '@apollo/client/link/retry';
47
46
 
48
47
  // NOTE: This string will be replaced on build time with the package version.
49
- var version = "22.39.0";
48
+ var version = "22.40.0";
50
49
 
51
50
  // From https://github.com/acdlite/recompose/blob/master/src/packages/recompose/getDisplayName.js
52
51
  const getDisplayName = Component => {
@@ -919,24 +918,11 @@ const tokenRetryLink = new RetryLink({
919
918
 
920
919
  function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
921
920
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
922
- // Inspired by https://www.apollographql.com/docs/react/api/link/apollo-link-http#dynamic-uri
923
- const customFetch = (uri, options) => {
924
- const searchParams = new _URLSearchParams();
925
- // We attempt to read the GraphQL `operationName` to append it as a query parameter.
926
- // This is only useful for debugging purposes (network tab) and does not have any functional implication.
927
- if (options?.body) try {
928
- const parsed = JSON.parse(options.body);
929
- searchParams.set('op', parsed.operationName);
930
- } catch {
931
- // noop
932
- }
933
- return fetch(searchParams.size > 0 ? `${uri}?${searchParams.toString()}` : uri, options);
934
- };
935
921
  const createApolloLink = function () {
936
922
  let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
937
923
  const httpLink = createHttpLink({
938
924
  uri: `${getMcApiUrl()}/graphql`,
939
- fetch: customFetch
925
+ fetch
940
926
  });
941
927
 
942
928
  // The order of links is IMPORTANT!
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commercetools-frontend/application-shell-connectors",
3
- "version": "22.39.0",
3
+ "version": "22.40.0",
4
4
  "description": "Contains complementary tools for @commercetools-frontend/application-shell",
5
5
  "bugs": "https://github.com/commercetools/merchant-center-application-kit/issues",
6
6
  "repository": {
@@ -37,10 +37,10 @@
37
37
  "dependencies": {
38
38
  "@babel/runtime": "^7.22.15",
39
39
  "@babel/runtime-corejs3": "^7.22.15",
40
- "@commercetools-frontend/application-config": "22.39.0",
41
- "@commercetools-frontend/browser-history": "22.39.0",
42
- "@commercetools-frontend/constants": "22.39.0",
43
- "@commercetools-frontend/sentry": "22.39.0",
40
+ "@commercetools-frontend/application-config": "22.40.0",
41
+ "@commercetools-frontend/browser-history": "22.40.0",
42
+ "@commercetools-frontend/constants": "22.40.0",
43
+ "@commercetools-frontend/sentry": "22.40.0",
44
44
  "@commercetools/http-user-agent": "3.0.0",
45
45
  "@emotion/react": "^11.11.4",
46
46
  "@types/lodash": "^4.14.198",