@atlaskit/media-client 37.5.9 → 37.5.11
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/CHANGELOG.md +12 -0
- package/dist/cjs/client/file-fetcher/index.js +2 -2
- package/dist/cjs/client/media-store/MediaStore.js +3 -3
- package/dist/cjs/models/auth-headers.js +2 -2
- package/dist/cjs/models/auth-query-parameters.js +2 -2
- package/dist/cjs/utils/request/mapAuthToRequestHeaders.js +2 -2
- package/dist/es2019/client/file-fetcher/index.js +1 -1
- package/dist/es2019/client/media-store/MediaStore.js +1 -1
- package/dist/es2019/models/auth-headers.js +1 -1
- package/dist/es2019/models/auth-query-parameters.js +1 -1
- package/dist/es2019/utils/request/mapAuthToRequestHeaders.js +1 -1
- package/dist/esm/client/file-fetcher/index.js +1 -1
- package/dist/esm/client/media-store/MediaStore.js +1 -1
- package/dist/esm/models/auth-headers.js +1 -1
- package/dist/esm/models/auth-query-parameters.js +1 -1
- package/dist/esm/utils/request/mapAuthToRequestHeaders.js +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -25,7 +25,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
25
25
|
var _map = require("rxjs/operators/map");
|
|
26
26
|
var _Subscription = require("rxjs/Subscription");
|
|
27
27
|
var _v = _interopRequireDefault(require("uuid/v4"));
|
|
28
|
-
var
|
|
28
|
+
var _authToOwner = require("@atlaskit/media-core/auth-to-owner");
|
|
29
29
|
var _isValidUuid = require("@atlaskit/media-common/isValidUuid");
|
|
30
30
|
var _downloadUrl = require("@atlaskit/media-common/downloadUrl");
|
|
31
31
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
@@ -868,7 +868,7 @@ var FileFetcherImpl = exports.FileFetcherImpl = /*#__PURE__*/function () {
|
|
|
868
868
|
mediaStore = destination.mediaStore || new _MediaStore.MediaStore({
|
|
869
869
|
authProvider: destinationAuthProvider
|
|
870
870
|
});
|
|
871
|
-
_t6 =
|
|
871
|
+
_t6 = _authToOwner.authToOwner;
|
|
872
872
|
_context11.next = 1;
|
|
873
873
|
return authProvider({
|
|
874
874
|
collectionName: sourceCollection
|
|
@@ -28,7 +28,7 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/
|
|
|
28
28
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
29
29
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
30
30
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
31
|
-
var
|
|
31
|
+
var _isClientBasedAuth = require("@atlaskit/media-core/is-client-based-auth");
|
|
32
32
|
var _chunkHashAlgorithm = require("@atlaskit/media-core/chunk-hash-algorithm");
|
|
33
33
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
34
34
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
@@ -1031,7 +1031,7 @@ var MediaStore = exports.MediaStore = /*#__PURE__*/function () {
|
|
|
1031
1031
|
_t = _context17.sent;
|
|
1032
1032
|
case 3:
|
|
1033
1033
|
auth = _t;
|
|
1034
|
-
clientId = (0,
|
|
1034
|
+
clientId = (0, _isClientBasedAuth.isClientBasedAuth)(auth) ? auth.clientId : undefined;
|
|
1035
1035
|
extendedTraceContext = (0, _extendTraceContext.extendTraceContext)(traceContext);
|
|
1036
1036
|
extendedParams = addMediaClientParam ? _objectSpread(_objectSpread({}, params), {}, {
|
|
1037
1037
|
clientId: clientId
|
|
@@ -1111,7 +1111,7 @@ var MediaStore = exports.MediaStore = /*#__PURE__*/function () {
|
|
|
1111
1111
|
}], [{
|
|
1112
1112
|
key: "extractClientIdFromAuth",
|
|
1113
1113
|
value: function extractClientIdFromAuth(auth) {
|
|
1114
|
-
if ((0,
|
|
1114
|
+
if ((0, _isClientBasedAuth.isClientBasedAuth)(auth)) {
|
|
1115
1115
|
return auth.clientId;
|
|
1116
1116
|
}
|
|
1117
1117
|
// decode JWT token and get clientId (or iss) from payload
|
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.mapAuthToAuthHeaders = mapAuthToAuthHeaders;
|
|
7
|
-
var
|
|
7
|
+
var _isClientBasedAuth = require("@atlaskit/media-core/is-client-based-auth");
|
|
8
8
|
function mapAuthToAuthHeaders(auth) {
|
|
9
|
-
if ((0,
|
|
9
|
+
if ((0, _isClientBasedAuth.isClientBasedAuth)(auth)) {
|
|
10
10
|
return {
|
|
11
11
|
'X-Client-Id': auth.clientId,
|
|
12
12
|
Authorization: "Bearer ".concat(auth.token)
|
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.mapAuthToQueryParameters = mapAuthToQueryParameters;
|
|
7
|
-
var
|
|
7
|
+
var _isClientBasedAuth = require("@atlaskit/media-core/is-client-based-auth");
|
|
8
8
|
function mapAuthToQueryParameters(auth) {
|
|
9
|
-
if ((0,
|
|
9
|
+
if ((0, _isClientBasedAuth.isClientBasedAuth)(auth)) {
|
|
10
10
|
return {
|
|
11
11
|
client: auth.clientId,
|
|
12
12
|
token: auth.token
|
|
@@ -4,12 +4,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.mapAuthToRequestHeaders = mapAuthToRequestHeaders;
|
|
7
|
-
var
|
|
7
|
+
var _isClientBasedAuth = require("@atlaskit/media-core/is-client-based-auth");
|
|
8
8
|
function mapAuthToRequestHeaders(auth) {
|
|
9
9
|
if (!auth) {
|
|
10
10
|
return {};
|
|
11
11
|
}
|
|
12
|
-
if ((0,
|
|
12
|
+
if ((0, _isClientBasedAuth.isClientBasedAuth)(auth)) {
|
|
13
13
|
return {
|
|
14
14
|
'X-Client-Id': auth.clientId,
|
|
15
15
|
Authorization: "Bearer ".concat(auth.token)
|
|
@@ -4,7 +4,7 @@ import { map } from 'rxjs/operators/map';
|
|
|
4
4
|
import { Subscription } from 'rxjs/Subscription';
|
|
5
5
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
6
6
|
import uuid from 'uuid/v4';
|
|
7
|
-
import { authToOwner } from '@atlaskit/media-core';
|
|
7
|
+
import { authToOwner } from '@atlaskit/media-core/auth-to-owner';
|
|
8
8
|
import { isValidUuid } from '@atlaskit/media-common/isValidUuid';
|
|
9
9
|
import { downloadUrl } from '@atlaskit/media-common/downloadUrl';
|
|
10
10
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
/* eslint-disable @repo/internal/deprecations/deprecation-ticket-required -- VOLTC-139 tracks removal of these deprecated re-export shims. */
|
|
3
3
|
|
|
4
|
-
import { isClientBasedAuth } from '@atlaskit/media-core';
|
|
4
|
+
import { isClientBasedAuth } from '@atlaskit/media-core/is-client-based-auth';
|
|
5
5
|
import { ChunkHashAlgorithm } from '@atlaskit/media-core/chunk-hash-algorithm';
|
|
6
6
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
7
7
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
@@ -10,7 +10,7 @@ import { map } from 'rxjs/operators/map';
|
|
|
10
10
|
import { Subscription } from 'rxjs/Subscription';
|
|
11
11
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
12
12
|
import uuid from 'uuid/v4';
|
|
13
|
-
import { authToOwner } from '@atlaskit/media-core';
|
|
13
|
+
import { authToOwner } from '@atlaskit/media-core/auth-to-owner';
|
|
14
14
|
import { isValidUuid } from '@atlaskit/media-common/isValidUuid';
|
|
15
15
|
import { downloadUrl } from '@atlaskit/media-common/downloadUrl';
|
|
16
16
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
@@ -7,7 +7,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
7
7
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8
8
|
/* eslint-disable @repo/internal/deprecations/deprecation-ticket-required -- VOLTC-139 tracks removal of these deprecated re-export shims. */
|
|
9
9
|
|
|
10
|
-
import { isClientBasedAuth } from '@atlaskit/media-core';
|
|
10
|
+
import { isClientBasedAuth } from '@atlaskit/media-core/is-client-based-auth';
|
|
11
11
|
import { ChunkHashAlgorithm } from '@atlaskit/media-core/chunk-hash-algorithm';
|
|
12
12
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
13
13
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/media-client",
|
|
3
|
-
"version": "37.5.
|
|
3
|
+
"version": "37.5.11",
|
|
4
4
|
"description": "Media API Web Client Library",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"@atlaskit/chunkinator": "^8.0.0",
|
|
26
26
|
"@atlaskit/media-common": "^14.5.0",
|
|
27
27
|
"@atlaskit/platform-feature-flags": "^2.1.0",
|
|
28
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
28
|
+
"@atlaskit/tmp-editor-statsig": "^168.0.0",
|
|
29
29
|
"@babel/runtime": "^7.0.0",
|
|
30
30
|
"dataloader": "^2.1.0",
|
|
31
31
|
"deep-equal": "^1.0.1",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@atlaskit/media-core": "^38.1.0",
|
|
47
47
|
"@atlaskit/media-state": "^3.1.0",
|
|
48
48
|
"@atlaskit/ssr": "workspace:^",
|
|
49
|
-
"@atlaskit/tokens": "^16.
|
|
49
|
+
"@atlaskit/tokens": "^16.9.0",
|
|
50
50
|
"@atlassian/a11y-jest-testing": "^0.17.0",
|
|
51
51
|
"@atlassian/feature-flags-test-utils": "^1.2.0",
|
|
52
52
|
"@emotion/react": "^11.7.1",
|