@atlaskit/media-client 35.3.6 → 35.5.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.
- package/CHANGELOG.md +14 -0
- package/dist/cjs/client/media-store/MediaStore.js +10 -2
- package/dist/es2019/client/media-store/MediaStore.js +5 -1
- package/dist/esm/client/media-store/MediaStore.js +10 -2
- package/dist/types/models/document.d.ts +1 -0
- package/dist/types-ts4.5/models/document.d.ts +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/media-client
|
|
2
2
|
|
|
3
|
+
## 35.5.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`3d3db676b30c1`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3d3db676b30c1) -
|
|
8
|
+
Add support for path based routing for artifact urls
|
|
9
|
+
|
|
10
|
+
## 35.4.0
|
|
11
|
+
|
|
12
|
+
### Minor Changes
|
|
13
|
+
|
|
14
|
+
- [`a3ad3feab3758`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a3ad3feab3758) -
|
|
15
|
+
Updated types to add mulitline text support for document endpoints
|
|
16
|
+
|
|
3
17
|
## 35.3.6
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -512,6 +512,7 @@ var MediaStore = exports.MediaStore = /*#__PURE__*/function () {
|
|
|
512
512
|
artifactUrl,
|
|
513
513
|
auth,
|
|
514
514
|
options,
|
|
515
|
+
url,
|
|
515
516
|
_args0 = arguments;
|
|
516
517
|
return _regenerator.default.wrap(function _callee0$(_context0) {
|
|
517
518
|
while (1) switch (_context0.prev = _context0.next) {
|
|
@@ -549,8 +550,15 @@ var MediaStore = exports.MediaStore = /*#__PURE__*/function () {
|
|
|
549
550
|
},
|
|
550
551
|
auth: auth
|
|
551
552
|
};
|
|
552
|
-
|
|
553
|
-
|
|
553
|
+
url = (0, _helpers.createUrl)((0, _mediaCdn.mapToMediaCdnUrl)(artifactUrl, auth.token), options);
|
|
554
|
+
if (!(0, _platformFeatureFlags.fg)('platform_media_path_based_route')) {
|
|
555
|
+
_context0.next = 11;
|
|
556
|
+
break;
|
|
557
|
+
}
|
|
558
|
+
return _context0.abrupt("return", (0, _pathBasedUrl.mapToPathBasedUrl)(url));
|
|
559
|
+
case 11:
|
|
560
|
+
return _context0.abrupt("return", url);
|
|
561
|
+
case 12:
|
|
554
562
|
case "end":
|
|
555
563
|
return _context0.stop();
|
|
556
564
|
}
|
|
@@ -339,7 +339,11 @@ export class MediaStore {
|
|
|
339
339
|
},
|
|
340
340
|
auth
|
|
341
341
|
};
|
|
342
|
-
|
|
342
|
+
const url = createUrl(mapToMediaCdnUrl(artifactUrl, auth.token), options);
|
|
343
|
+
if (fg('platform_media_path_based_route')) {
|
|
344
|
+
return mapToPathBasedUrl(url);
|
|
345
|
+
}
|
|
346
|
+
return url;
|
|
343
347
|
}
|
|
344
348
|
async getImage(id, params, controller, fetchMaxRes, traceContext) {
|
|
345
349
|
// TODO add checkWebpSupport() back https://product-fabric.atlassian.net/browse/MPT-584
|
|
@@ -506,6 +506,7 @@ export var MediaStore = /*#__PURE__*/function () {
|
|
|
506
506
|
artifactUrl,
|
|
507
507
|
auth,
|
|
508
508
|
options,
|
|
509
|
+
url,
|
|
509
510
|
_args0 = arguments;
|
|
510
511
|
return _regeneratorRuntime.wrap(function _callee0$(_context0) {
|
|
511
512
|
while (1) switch (_context0.prev = _context0.next) {
|
|
@@ -543,8 +544,15 @@ export var MediaStore = /*#__PURE__*/function () {
|
|
|
543
544
|
},
|
|
544
545
|
auth: auth
|
|
545
546
|
};
|
|
546
|
-
|
|
547
|
-
|
|
547
|
+
url = createUrl(mapToMediaCdnUrl(artifactUrl, auth.token), options);
|
|
548
|
+
if (!fg('platform_media_path_based_route')) {
|
|
549
|
+
_context0.next = 11;
|
|
550
|
+
break;
|
|
551
|
+
}
|
|
552
|
+
return _context0.abrupt("return", mapToPathBasedUrl(url));
|
|
553
|
+
case 11:
|
|
554
|
+
return _context0.abrupt("return", url);
|
|
555
|
+
case 12:
|
|
548
556
|
case "end":
|
|
549
557
|
return _context0.stop();
|
|
550
558
|
}
|