@atlaskit/media-client 35.1.0 → 35.2.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
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/media-client
|
|
2
2
|
|
|
3
|
+
## 35.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#188575](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/188575)
|
|
8
|
+
[`f5ac80e740159`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f5ac80e740159) -
|
|
9
|
+
Add feature flag and logic that disable CDN delivery for requests from Isolated Cloud
|
|
10
|
+
|
|
3
11
|
## 35.1.0
|
|
4
12
|
|
|
5
13
|
### Minor Changes
|
|
@@ -7,6 +7,7 @@ exports.MEDIA_CDN_MAP = void 0;
|
|
|
7
7
|
exports.mapToMediaCdnUrl = mapToMediaCdnUrl;
|
|
8
8
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
9
9
|
var _isCommercial = require("./isCommercial");
|
|
10
|
+
var _atlassianContext = require("@atlaskit/atlassian-context");
|
|
10
11
|
var MEDIA_CDN_MAP = exports.MEDIA_CDN_MAP = {
|
|
11
12
|
'api.media.atlassian.com': 'media-cdn.atlassian.com',
|
|
12
13
|
'media.staging.atl-paas.net': 'media-cdn.stg.atlassian.com'
|
|
@@ -22,6 +23,12 @@ function mapToMediaCdnUrl(url, token) {
|
|
|
22
23
|
if (!(0, _isCommercial.isCommercial)() || tokenLength > MEDIA_TOKEN_LENGTH_LIMIT) {
|
|
23
24
|
return url;
|
|
24
25
|
}
|
|
26
|
+
if ((0, _platformFeatureFlags.fg)('platform_disable_isolated_cloud_media_cdn_delivery')) {
|
|
27
|
+
if ((0, _atlassianContext.isIsolatedCloud)()) {
|
|
28
|
+
return url;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
25
32
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
26
33
|
if ((0, _platformFeatureFlags.fg)('platform_media_cdn_delivery') && (0, _platformFeatureFlags.fg)('platform_media_cdn_single_host')) {
|
|
27
34
|
try {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
2
|
import { isCommercial } from './isCommercial';
|
|
3
|
+
import { isIsolatedCloud } from '@atlaskit/atlassian-context';
|
|
3
4
|
export const MEDIA_CDN_MAP = {
|
|
4
5
|
'api.media.atlassian.com': 'media-cdn.atlassian.com',
|
|
5
6
|
'media.staging.atl-paas.net': 'media-cdn.stg.atlassian.com'
|
|
@@ -15,6 +16,12 @@ export function mapToMediaCdnUrl(url, token) {
|
|
|
15
16
|
if (!isCommercial() || tokenLength > MEDIA_TOKEN_LENGTH_LIMIT) {
|
|
16
17
|
return url;
|
|
17
18
|
}
|
|
19
|
+
if (fg('platform_disable_isolated_cloud_media_cdn_delivery')) {
|
|
20
|
+
if (isIsolatedCloud()) {
|
|
21
|
+
return url;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
18
25
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
19
26
|
if (fg('platform_media_cdn_delivery') && fg('platform_media_cdn_single_host')) {
|
|
20
27
|
try {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
2
|
import { isCommercial } from './isCommercial';
|
|
3
|
+
import { isIsolatedCloud } from '@atlaskit/atlassian-context';
|
|
3
4
|
export var MEDIA_CDN_MAP = {
|
|
4
5
|
'api.media.atlassian.com': 'media-cdn.atlassian.com',
|
|
5
6
|
'media.staging.atl-paas.net': 'media-cdn.stg.atlassian.com'
|
|
@@ -15,6 +16,12 @@ export function mapToMediaCdnUrl(url, token) {
|
|
|
15
16
|
if (!isCommercial() || tokenLength > MEDIA_TOKEN_LENGTH_LIMIT) {
|
|
16
17
|
return url;
|
|
17
18
|
}
|
|
19
|
+
if (fg('platform_disable_isolated_cloud_media_cdn_delivery')) {
|
|
20
|
+
if (isIsolatedCloud()) {
|
|
21
|
+
return url;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
18
25
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
19
26
|
if (fg('platform_media_cdn_delivery') && fg('platform_media_cdn_single_host')) {
|
|
20
27
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/media-client",
|
|
3
|
-
"version": "35.
|
|
3
|
+
"version": "35.2.0",
|
|
4
4
|
"description": "Media API Web Client Library",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
+
"@atlaskit/atlassian-context": "^0.3.0",
|
|
37
38
|
"@atlaskit/chunkinator": "^7.0.0",
|
|
38
39
|
"@atlaskit/media-common": "^12.3.0",
|
|
39
40
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
@@ -57,7 +58,7 @@
|
|
|
57
58
|
"@atlaskit/media-core": "^37.0.0",
|
|
58
59
|
"@atlaskit/media-state": "^1.8.0",
|
|
59
60
|
"@atlaskit/ssr": "workspace:^",
|
|
60
|
-
"@atlaskit/tokens": "^5.
|
|
61
|
+
"@atlaskit/tokens": "^5.6.0",
|
|
61
62
|
"@atlassian/feature-flags-test-utils": "^0.3.0",
|
|
62
63
|
"@emotion/react": "^11.7.1",
|
|
63
64
|
"@types/deep-equal": "^1.0.1",
|
|
@@ -86,6 +87,9 @@
|
|
|
86
87
|
},
|
|
87
88
|
"platform_media_cdn_delivery": {
|
|
88
89
|
"type": "boolean"
|
|
90
|
+
},
|
|
91
|
+
"platform_disable_isolated_cloud_media_cdn_delivery": {
|
|
92
|
+
"type": "boolean"
|
|
89
93
|
}
|
|
90
94
|
}
|
|
91
95
|
}
|