@atlaskit/util-service-support 6.0.2 → 6.1.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.
Files changed (39) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/build/tsconfig.json +6 -2
  3. package/dist/cjs/index.js +46 -7
  4. package/dist/cjs/serviceResources.js +71 -43
  5. package/dist/cjs/serviceUtils.js +131 -90
  6. package/dist/cjs/types.js +23 -4
  7. package/dist/cjs/version.json +1 -1
  8. package/dist/es2019/index.js +1 -2
  9. package/dist/es2019/serviceResources.js +48 -40
  10. package/dist/es2019/serviceUtils.js +106 -87
  11. package/dist/es2019/types.js +15 -3
  12. package/dist/es2019/version.json +1 -1
  13. package/dist/esm/index.js +1 -2
  14. package/dist/esm/serviceResources.js +61 -42
  15. package/dist/esm/serviceUtils.js +122 -90
  16. package/dist/esm/types.js +15 -3
  17. package/dist/esm/version.json +1 -1
  18. package/dist/types/types.d.ts +1 -0
  19. package/package.json +7 -6
  20. package/dist/cjs/index.js.map +0 -1
  21. package/dist/cjs/serviceResources.js.map +0 -1
  22. package/dist/cjs/serviceUtils.js.map +0 -1
  23. package/dist/cjs/types.js.map +0 -1
  24. package/dist/es2019/index.d.ts +0 -4
  25. package/dist/es2019/index.js.map +0 -1
  26. package/dist/es2019/serviceResources.d.ts +0 -12
  27. package/dist/es2019/serviceResources.js.map +0 -1
  28. package/dist/es2019/serviceUtils.d.ts +0 -5
  29. package/dist/es2019/serviceUtils.js.map +0 -1
  30. package/dist/es2019/types.d.ts +0 -79
  31. package/dist/es2019/types.js.map +0 -1
  32. package/dist/esm/index.d.ts +0 -4
  33. package/dist/esm/index.js.map +0 -1
  34. package/dist/esm/serviceResources.d.ts +0 -12
  35. package/dist/esm/serviceResources.js.map +0 -1
  36. package/dist/esm/serviceUtils.d.ts +0 -5
  37. package/dist/esm/serviceUtils.js.map +0 -1
  38. package/dist/esm/types.d.ts +0 -79
  39. package/dist/esm/types.js.map +0 -1
@@ -1,104 +1,123 @@
1
- import * as URL from 'url';
2
- import USP from 'url-search-params'; // IE, Safari, Mobile Chrome, Mobile Safari
3
- import { buildCredentials, } from './types';
4
- const URLSearchParams = USP.default || USP;
1
+ import { buildCredentials } from './types';
5
2
  const defaultRequestServiceOptions = {};
3
+
6
4
  const buildUrl = (baseUrl, path = '', queryParams, secOptions) => {
7
- const searchParam = new URLSearchParams(URL.parse(baseUrl).search || undefined);
8
- baseUrl = baseUrl.split('?')[0];
9
- if (queryParams) {
10
- for (const key in queryParams) {
11
- if ({}.hasOwnProperty.call(queryParams, key)) {
12
- searchParam.append(key, queryParams[key]);
13
- }
14
- }
5
+ const searchParam = new URLSearchParams( // For relative urls, the URL class requires base to be set. It's ignored if a url is not relative.
6
+ // Since we only care about search params it is fine to have any base url here.
7
+ new URL(baseUrl, 'https://BASE_FALLBACK').search || undefined);
8
+ baseUrl = baseUrl.split('?')[0];
9
+
10
+ if (queryParams) {
11
+ for (const key in queryParams) {
12
+ if ({}.hasOwnProperty.call(queryParams, key)) {
13
+ searchParam.append(key, queryParams[key]);
14
+ }
15
15
  }
16
- if (secOptions && secOptions.params) {
17
- for (const key in secOptions.params) {
18
- if ({}.hasOwnProperty.call(secOptions.params, key)) {
19
- const values = secOptions.params[key];
20
- if (Array.isArray(values)) {
21
- for (let i = 0; i < values.length; i++) {
22
- searchParam.append(key, values[i]);
23
- }
24
- }
25
- else {
26
- searchParam.append(key, values);
27
- }
28
- }
16
+ }
17
+
18
+ if (secOptions && secOptions.params) {
19
+ for (const key in secOptions.params) {
20
+ if ({}.hasOwnProperty.call(secOptions.params, key)) {
21
+ const values = secOptions.params[key];
22
+
23
+ if (Array.isArray(values)) {
24
+ for (let i = 0; i < values.length; i++) {
25
+ searchParam.append(key, values[i]);
26
+ }
27
+ } else {
28
+ searchParam.append(key, values);
29
29
  }
30
+ }
30
31
  }
31
- let seperator = '';
32
- if (path && baseUrl.substr(-1) !== '/') {
33
- seperator = '/';
34
- }
35
- let params = searchParam.toString();
36
- if (params) {
37
- params = '?' + params;
38
- }
39
- return `${baseUrl}${seperator}${path}${params}`;
32
+ }
33
+
34
+ let separator = '';
35
+
36
+ if (path && baseUrl.substr(-1) !== '/' && !path.startsWith('/')) {
37
+ separator = '/';
38
+ }
39
+
40
+ let params = searchParam.toString();
41
+
42
+ if (params) {
43
+ params = '?' + params;
44
+ }
45
+
46
+ return `${baseUrl}${separator}${path}${params}`;
40
47
  };
48
+
41
49
  const addToHeaders = (headers, keyValues) => {
42
- if (keyValues) {
43
- for (const key in keyValues) {
44
- if ({}.hasOwnProperty.call(keyValues, key)) {
45
- const values = keyValues[key];
46
- if (Array.isArray(values)) {
47
- for (let i = 0; i < values.length; i++) {
48
- headers[key] = values[i];
49
- }
50
- }
51
- else {
52
- headers[key] = values;
53
- }
54
- }
50
+ if (keyValues) {
51
+ for (const key in keyValues) {
52
+ if ({}.hasOwnProperty.call(keyValues, key)) {
53
+ const values = keyValues[key];
54
+
55
+ if (Array.isArray(values)) {
56
+ for (let i = 0; i < values.length; i++) {
57
+ headers[key] = values[i];
58
+ }
59
+ } else {
60
+ headers[key] = values;
55
61
  }
62
+ }
56
63
  }
64
+ }
57
65
  };
66
+
58
67
  const buildHeaders = (secOptions, extraHeaders) => {
59
- const headers = {};
60
- addToHeaders(headers, extraHeaders);
61
- if (secOptions) {
62
- addToHeaders(headers, secOptions.headers);
63
- }
64
- return headers;
68
+ const headers = {};
69
+ addToHeaders(headers, extraHeaders);
70
+
71
+ if (secOptions) {
72
+ addToHeaders(headers, secOptions.headers);
73
+ }
74
+
75
+ return headers;
65
76
  };
66
77
  /**
67
78
  * @returns Promise containing the json response
68
79
  */
80
+
81
+
69
82
  export const requestService = (serviceConfig, options) => {
70
- const { url, securityProvider, refreshedSecurityProvider } = serviceConfig;
71
- const { path, queryParams, requestInit } = options || defaultRequestServiceOptions;
72
- const secOptions = securityProvider && securityProvider();
73
- const requestUrl = buildUrl(url, path, queryParams, secOptions);
74
- const headers = buildHeaders(secOptions, requestInit && requestInit.headers);
75
- const credentials = buildCredentials(secOptions);
76
- const requestOptions = {
77
- ...requestInit,
78
- headers,
79
- credentials,
80
- };
81
- return fetch(requestUrl, requestOptions).then((response) => {
82
- if (response.status === 204) {
83
- return Promise.resolve();
84
- }
85
- else if (response.ok) {
86
- return response.json();
87
- }
88
- else if (response.status === 401 && refreshedSecurityProvider) {
89
- // auth issue - try once
90
- return refreshedSecurityProvider().then(newSecOptions => {
91
- const retryServiceConfig = {
92
- url,
93
- securityProvider: () => newSecOptions,
94
- };
95
- return requestService(retryServiceConfig, options);
96
- });
97
- }
98
- return Promise.reject({
99
- code: response.status,
100
- reason: response.statusText,
101
- });
83
+ const {
84
+ url,
85
+ securityProvider,
86
+ refreshedSecurityProvider
87
+ } = serviceConfig;
88
+ const {
89
+ path,
90
+ queryParams,
91
+ requestInit
92
+ } = options || defaultRequestServiceOptions;
93
+ const secOptions = securityProvider && securityProvider();
94
+ const requestUrl = buildUrl(url, path, queryParams, secOptions);
95
+ const headers = buildHeaders(secOptions, requestInit && requestInit.headers);
96
+ const credentials = buildCredentials(secOptions);
97
+ const ignoreResponsePayload = (options === null || options === void 0 ? void 0 : options.ignoreResponsePayload) || false;
98
+ const requestOptions = { ...requestInit,
99
+ headers,
100
+ credentials
101
+ };
102
+ return fetch(requestUrl, requestOptions).then(response => {
103
+ if (response.status === 204) {
104
+ return Promise.resolve();
105
+ } else if (response.ok) {
106
+ return ignoreResponsePayload ? Promise.resolve() : response.json();
107
+ } else if (response.status === 401 && refreshedSecurityProvider) {
108
+ // auth issue - try once
109
+ return refreshedSecurityProvider().then(newSecOptions => {
110
+ const retryServiceConfig = {
111
+ url,
112
+ securityProvider: () => newSecOptions
113
+ };
114
+ return requestService(retryServiceConfig, options);
115
+ });
116
+ }
117
+
118
+ return Promise.reject({
119
+ code: response.status,
120
+ reason: response.statusText
102
121
  });
103
- };
104
- //# sourceMappingURL=serviceUtils.js.map
122
+ });
123
+ };
@@ -1,4 +1,16 @@
1
- export const buildCredentials = (secOptions) => {
2
- return secOptions && secOptions.omitCredentials ? 'omit' : 'include';
1
+ /**
2
+ * Defines a typical Resource.
3
+ *
4
+ * Q = query type
5
+ * R = result type
6
+ * E = error type
7
+ * I = info type
8
+ * O = options that filter can accept
9
+ */
10
+ export const buildCredentials = secOptions => {
11
+ return secOptions && secOptions.omitCredentials ? 'omit' : 'include';
3
12
  };
4
- //# sourceMappingURL=types.js.map
13
+ /**
14
+ * Returns a promise to a SecurityOptions that has just been forcibly refreshed with a
15
+ * new token. Will be used for single retry per request if a 401 is returned.
16
+ */
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "@atlaskit/util-service-support",
3
- "version": "6.0.2"
3
+ "version": "6.1.0"
4
4
  }
package/dist/esm/index.js CHANGED
@@ -1,5 +1,4 @@
1
1
  export * from './types';
2
2
  export * from './serviceResources';
3
3
  import * as serviceUtils from './serviceUtils';
4
- export var utils = serviceUtils;
5
- //# sourceMappingURL=index.js.map
4
+ export var utils = serviceUtils;
@@ -1,44 +1,63 @@
1
- var AbstractResource = /** @class */ (function () {
2
- function AbstractResource() {
3
- this.listeners = new Set();
1
+ import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
+ import _createClass from "@babel/runtime/helpers/createClass";
3
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
4
+ export var AbstractResource = /*#__PURE__*/function () {
5
+ function AbstractResource() {
6
+ _classCallCheck(this, AbstractResource);
7
+
8
+ _defineProperty(this, "listeners", new Set());
9
+ }
10
+
11
+ _createClass(AbstractResource, [{
12
+ key: "subscribe",
13
+ value: function subscribe(onChange) {
14
+ this.listeners.add(onChange);
15
+
16
+ if (this.lastResult) {
17
+ // Notify subscribe of last result (i.e. initial state)
18
+ onChange.result(this.lastResult);
19
+ }
4
20
  }
5
- AbstractResource.prototype.subscribe = function (onChange) {
6
- this.listeners.add(onChange);
7
- if (this.lastResult) {
8
- // Notify subscribe of last result (i.e. initial state)
9
- onChange.result(this.lastResult);
21
+ }, {
22
+ key: "unsubscribe",
23
+ value: function unsubscribe(onChange) {
24
+ this.listeners.delete(onChange);
25
+ }
26
+ }, {
27
+ key: "notifyResult",
28
+ value: function notifyResult(result) {
29
+ this.listeners.forEach(function (onChange) {
30
+ onChange.result(result);
31
+ });
32
+ }
33
+ }, {
34
+ key: "notifyError",
35
+ value: function notifyError(error) {
36
+ this.listeners.forEach(function (onChange) {
37
+ if (onChange.error) {
38
+ onChange.error(error);
39
+ }
40
+ });
41
+ }
42
+ }, {
43
+ key: "notifyInfo",
44
+ value: function notifyInfo(info) {
45
+ this.listeners.forEach(function (onChange) {
46
+ if (onChange.info) {
47
+ onChange.info(info);
10
48
  }
11
- };
12
- AbstractResource.prototype.unsubscribe = function (onChange) {
13
- this.listeners.delete(onChange);
14
- };
15
- AbstractResource.prototype.notifyResult = function (result) {
16
- this.listeners.forEach(function (onChange) {
17
- onChange.result(result);
18
- });
19
- };
20
- AbstractResource.prototype.notifyError = function (error) {
21
- this.listeners.forEach(function (onChange) {
22
- if (onChange.error) {
23
- onChange.error(error);
24
- }
25
- });
26
- };
27
- AbstractResource.prototype.notifyInfo = function (info) {
28
- this.listeners.forEach(function (onChange) {
29
- if (onChange.info) {
30
- onChange.info(info);
31
- }
32
- });
33
- };
34
- AbstractResource.prototype.notifyNotReady = function () {
35
- this.listeners.forEach(function (onChange) {
36
- if (onChange.notReady) {
37
- onChange.notReady();
38
- }
39
- });
40
- };
41
- return AbstractResource;
42
- }());
43
- export { AbstractResource };
44
- //# sourceMappingURL=serviceResources.js.map
49
+ });
50
+ }
51
+ }, {
52
+ key: "notifyNotReady",
53
+ value: function notifyNotReady() {
54
+ this.listeners.forEach(function (onChange) {
55
+ if (onChange.notReady) {
56
+ onChange.notReady();
57
+ }
58
+ });
59
+ }
60
+ }]);
61
+
62
+ return AbstractResource;
63
+ }();
@@ -1,103 +1,135 @@
1
- import { __assign } from "tslib";
2
- import * as URL from 'url';
3
- import USP from 'url-search-params'; // IE, Safari, Mobile Chrome, Mobile Safari
4
- import { buildCredentials, } from './types';
5
- var URLSearchParams = USP.default || USP;
1
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+
3
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
4
+
5
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
6
+
7
+ import { buildCredentials } from './types';
6
8
  var defaultRequestServiceOptions = {};
7
- var buildUrl = function (baseUrl, path, queryParams, secOptions) {
8
- if (path === void 0) { path = ''; }
9
- var searchParam = new URLSearchParams(URL.parse(baseUrl).search || undefined);
10
- baseUrl = baseUrl.split('?')[0];
11
- if (queryParams) {
12
- for (var key in queryParams) {
13
- if ({}.hasOwnProperty.call(queryParams, key)) {
14
- searchParam.append(key, queryParams[key]);
15
- }
16
- }
9
+
10
+ var buildUrl = function buildUrl(baseUrl) {
11
+ var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
12
+ var queryParams = arguments.length > 2 ? arguments[2] : undefined;
13
+ var secOptions = arguments.length > 3 ? arguments[3] : undefined;
14
+ var searchParam = new URLSearchParams( // For relative urls, the URL class requires base to be set. It's ignored if a url is not relative.
15
+ // Since we only care about search params it is fine to have any base url here.
16
+ new URL(baseUrl, 'https://BASE_FALLBACK').search || undefined);
17
+ baseUrl = baseUrl.split('?')[0];
18
+
19
+ if (queryParams) {
20
+ for (var key in queryParams) {
21
+ if ({}.hasOwnProperty.call(queryParams, key)) {
22
+ searchParam.append(key, queryParams[key]);
23
+ }
17
24
  }
18
- if (secOptions && secOptions.params) {
19
- for (var key in secOptions.params) {
20
- if ({}.hasOwnProperty.call(secOptions.params, key)) {
21
- var values = secOptions.params[key];
22
- if (Array.isArray(values)) {
23
- for (var i = 0; i < values.length; i++) {
24
- searchParam.append(key, values[i]);
25
- }
26
- }
27
- else {
28
- searchParam.append(key, values);
29
- }
30
- }
25
+ }
26
+
27
+ if (secOptions && secOptions.params) {
28
+ for (var _key in secOptions.params) {
29
+ if ({}.hasOwnProperty.call(secOptions.params, _key)) {
30
+ var values = secOptions.params[_key];
31
+
32
+ if (Array.isArray(values)) {
33
+ for (var i = 0; i < values.length; i++) {
34
+ searchParam.append(_key, values[i]);
35
+ }
36
+ } else {
37
+ searchParam.append(_key, values);
31
38
  }
39
+ }
32
40
  }
33
- var seperator = '';
34
- if (path && baseUrl.substr(-1) !== '/') {
35
- seperator = '/';
36
- }
37
- var params = searchParam.toString();
38
- if (params) {
39
- params = '?' + params;
40
- }
41
- return "" + baseUrl + seperator + path + params;
41
+ }
42
+
43
+ var separator = '';
44
+
45
+ if (path && baseUrl.substr(-1) !== '/' && !path.startsWith('/')) {
46
+ separator = '/';
47
+ }
48
+
49
+ var params = searchParam.toString();
50
+
51
+ if (params) {
52
+ params = '?' + params;
53
+ }
54
+
55
+ return "".concat(baseUrl).concat(separator).concat(path).concat(params);
42
56
  };
43
- var addToHeaders = function (headers, keyValues) {
44
- if (keyValues) {
45
- for (var key in keyValues) {
46
- if ({}.hasOwnProperty.call(keyValues, key)) {
47
- var values = keyValues[key];
48
- if (Array.isArray(values)) {
49
- for (var i = 0; i < values.length; i++) {
50
- headers[key] = values[i];
51
- }
52
- }
53
- else {
54
- headers[key] = values;
55
- }
56
- }
57
+
58
+ var addToHeaders = function addToHeaders(headers, keyValues) {
59
+ if (keyValues) {
60
+ for (var key in keyValues) {
61
+ if ({}.hasOwnProperty.call(keyValues, key)) {
62
+ var values = keyValues[key];
63
+
64
+ if (Array.isArray(values)) {
65
+ for (var i = 0; i < values.length; i++) {
66
+ headers[key] = values[i];
67
+ }
68
+ } else {
69
+ headers[key] = values;
57
70
  }
71
+ }
58
72
  }
73
+ }
59
74
  };
60
- var buildHeaders = function (secOptions, extraHeaders) {
61
- var headers = {};
62
- addToHeaders(headers, extraHeaders);
63
- if (secOptions) {
64
- addToHeaders(headers, secOptions.headers);
65
- }
66
- return headers;
75
+
76
+ var buildHeaders = function buildHeaders(secOptions, extraHeaders) {
77
+ var headers = {};
78
+ addToHeaders(headers, extraHeaders);
79
+
80
+ if (secOptions) {
81
+ addToHeaders(headers, secOptions.headers);
82
+ }
83
+
84
+ return headers;
67
85
  };
68
86
  /**
69
87
  * @returns Promise containing the json response
70
88
  */
71
- export var requestService = function (serviceConfig, options) {
72
- var url = serviceConfig.url, securityProvider = serviceConfig.securityProvider, refreshedSecurityProvider = serviceConfig.refreshedSecurityProvider;
73
- var _a = options || defaultRequestServiceOptions, path = _a.path, queryParams = _a.queryParams, requestInit = _a.requestInit;
74
- var secOptions = securityProvider && securityProvider();
75
- var requestUrl = buildUrl(url, path, queryParams, secOptions);
76
- var headers = buildHeaders(secOptions, requestInit && requestInit.headers);
77
- var credentials = buildCredentials(secOptions);
78
- var requestOptions = __assign(__assign({}, requestInit), { headers: headers,
79
- credentials: credentials });
80
- return fetch(requestUrl, requestOptions).then(function (response) {
81
- if (response.status === 204) {
82
- return Promise.resolve();
83
- }
84
- else if (response.ok) {
85
- return response.json();
86
- }
87
- else if (response.status === 401 && refreshedSecurityProvider) {
88
- // auth issue - try once
89
- return refreshedSecurityProvider().then(function (newSecOptions) {
90
- var retryServiceConfig = {
91
- url: url,
92
- securityProvider: function () { return newSecOptions; },
93
- };
94
- return requestService(retryServiceConfig, options);
95
- });
96
- }
97
- return Promise.reject({
98
- code: response.status,
99
- reason: response.statusText,
100
- });
89
+
90
+
91
+ export var requestService = function requestService(serviceConfig, options) {
92
+ var url = serviceConfig.url,
93
+ securityProvider = serviceConfig.securityProvider,
94
+ refreshedSecurityProvider = serviceConfig.refreshedSecurityProvider;
95
+
96
+ var _ref = options || defaultRequestServiceOptions,
97
+ path = _ref.path,
98
+ queryParams = _ref.queryParams,
99
+ requestInit = _ref.requestInit;
100
+
101
+ var secOptions = securityProvider && securityProvider();
102
+ var requestUrl = buildUrl(url, path, queryParams, secOptions);
103
+ var headers = buildHeaders(secOptions, requestInit && requestInit.headers);
104
+ var credentials = buildCredentials(secOptions);
105
+ var ignoreResponsePayload = (options === null || options === void 0 ? void 0 : options.ignoreResponsePayload) || false;
106
+
107
+ var requestOptions = _objectSpread(_objectSpread({}, requestInit), {}, {
108
+ headers: headers,
109
+ credentials: credentials
110
+ });
111
+
112
+ return fetch(requestUrl, requestOptions).then(function (response) {
113
+ if (response.status === 204) {
114
+ return Promise.resolve();
115
+ } else if (response.ok) {
116
+ return ignoreResponsePayload ? Promise.resolve() : response.json();
117
+ } else if (response.status === 401 && refreshedSecurityProvider) {
118
+ // auth issue - try once
119
+ return refreshedSecurityProvider().then(function (newSecOptions) {
120
+ var retryServiceConfig = {
121
+ url: url,
122
+ securityProvider: function securityProvider() {
123
+ return newSecOptions;
124
+ }
125
+ };
126
+ return requestService(retryServiceConfig, options);
127
+ });
128
+ }
129
+
130
+ return Promise.reject({
131
+ code: response.status,
132
+ reason: response.statusText
101
133
  });
102
- };
103
- //# sourceMappingURL=serviceUtils.js.map
134
+ });
135
+ };
package/dist/esm/types.js CHANGED
@@ -1,4 +1,16 @@
1
- export var buildCredentials = function (secOptions) {
2
- return secOptions && secOptions.omitCredentials ? 'omit' : 'include';
1
+ /**
2
+ * Defines a typical Resource.
3
+ *
4
+ * Q = query type
5
+ * R = result type
6
+ * E = error type
7
+ * I = info type
8
+ * O = options that filter can accept
9
+ */
10
+ export var buildCredentials = function buildCredentials(secOptions) {
11
+ return secOptions && secOptions.omitCredentials ? 'omit' : 'include';
3
12
  };
4
- //# sourceMappingURL=types.js.map
13
+ /**
14
+ * Returns a promise to a SecurityOptions that has just been forcibly refreshed with a
15
+ * new token. Will be used for single retry per request if a 401 is returned.
16
+ */
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "@atlaskit/util-service-support",
3
- "version": "6.0.2"
3
+ "version": "6.1.0"
4
4
  }
@@ -76,4 +76,5 @@ export interface RequestServiceOptions {
76
76
  path?: string;
77
77
  queryParams?: KeyValues;
78
78
  requestInit?: RequestInit;
79
+ ignoreResponsePayload?: boolean;
79
80
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/util-service-support",
3
- "version": "6.0.2",
3
+ "version": "6.1.0",
4
4
  "description": "A library of support classes for integrating React components with REST HTTP services",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -15,18 +15,18 @@
15
15
  "atlaskit:src": "src/index.ts",
16
16
  "atlassian": {
17
17
  "deprecatedAutoEntryPoints": true,
18
- "releaseModel": "continuous"
18
+ "releaseModel": "continuous",
19
+ "team": "AFP: Monorepo"
19
20
  },
20
21
  "config": {
21
22
  "access": "public"
22
23
  },
23
24
  "dependencies": {
24
- "tslib": "^2.0.0",
25
- "url": "^0.11.0",
26
- "url-search-params": "^0.10.0"
25
+ "@babel/runtime": "^7.0.0"
27
26
  },
28
27
  "devDependencies": {
29
28
  "@atlaskit/docs": "*",
29
+ "@atlassian/atlassian-frontend-prettier-config-1.0.0": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.0",
30
30
  "es6-promise": "^4.0.5",
31
31
  "fetch-mock": "^8.0.0",
32
32
  "sinon": "^2.2.0",
@@ -41,5 +41,6 @@
41
41
  "@atlassian/frontend": {
42
42
  "tree-shaking": []
43
43
  }
44
- }
44
+ },
45
+ "prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.0"
45
46
  }