@atlaskit/media-client 37.5.4 → 37.5.6
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/utils/isCDNEnabled.js +2 -2
- package/dist/cjs/utils/isPathBasedEnabled.js +2 -2
- package/dist/cjs/utils/mapToMediaCdnUrl.js +2 -2
- package/dist/es2019/utils/isCDNEnabled.js +1 -1
- package/dist/es2019/utils/isPathBasedEnabled.js +1 -1
- package/dist/es2019/utils/mapToMediaCdnUrl.js +1 -1
- package/dist/esm/utils/isCDNEnabled.js +1 -1
- package/dist/esm/utils/isPathBasedEnabled.js +1 -1
- package/dist/esm/utils/mapToMediaCdnUrl.js +1 -1
- package/dist/types/client/media-store/resolveInitialAuth.d.ts +1 -1
- package/dist/types/utils/request/extendHeaders.d.ts +1 -1
- package/dist/types/utils/request/mapAuthToRequestHeaders.d.ts +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -7,9 +7,9 @@ exports.isCDNEnabled = isCDNEnabled;
|
|
|
7
7
|
var _cloudProvider = require("@atlaskit/atlassian-context/cloud-provider");
|
|
8
8
|
var _isIsolatedCloud = require("@atlaskit/atlassian-context/is-isolated-cloud");
|
|
9
9
|
var _mediaEnvUtils = require("@atlaskit/media-common/mediaEnvUtils");
|
|
10
|
-
var
|
|
10
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
11
11
|
var _isCommercial = require("./isCommercial");
|
|
12
12
|
var _isPathBasedEnabled = require("./isPathBasedEnabled");
|
|
13
13
|
function isCDNEnabled() {
|
|
14
|
-
return (0, _isCommercial.isCommercial)() && !(0, _isIsolatedCloud.isIsolatedCloud)() && !((0, _cloudProvider.isGoogleCloudPlatform)() || (0, _mediaEnvUtils.isGCPtenant)()) && (0,
|
|
14
|
+
return (0, _isCommercial.isCommercial)() && !(0, _isIsolatedCloud.isIsolatedCloud)() && !((0, _cloudProvider.isGoogleCloudPlatform)() || (0, _mediaEnvUtils.isGCPtenant)()) && (0, _fg.fg)('platform_media_cdn_delivery') && !(0, _isPathBasedEnabled.isPathBasedEnabled)();
|
|
15
15
|
}
|
|
@@ -5,10 +5,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.isPathBasedEnabled = isPathBasedEnabled;
|
|
8
|
-
var
|
|
8
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
9
9
|
var _getDocument2 = _interopRequireDefault(require("./getDocument"));
|
|
10
10
|
function isPathBasedEnabled() {
|
|
11
11
|
var _getDocument;
|
|
12
12
|
var isLocalhost = ((_getDocument = (0, _getDocument2.default)()) === null || _getDocument === void 0 || (_getDocument = _getDocument.location) === null || _getDocument === void 0 ? void 0 : _getDocument.hostname) === 'localhost';
|
|
13
|
-
return (0,
|
|
13
|
+
return (0, _fg.fg)('platform_media_path_based_route') && !isLocalhost;
|
|
14
14
|
}
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.mapToMediaCdnUrl = mapToMediaCdnUrl;
|
|
7
7
|
var _cloudProvider = require("@atlaskit/atlassian-context/cloud-provider");
|
|
8
8
|
var _mediaEnvUtils = require("@atlaskit/media-common/mediaEnvUtils");
|
|
9
|
-
var
|
|
9
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
10
10
|
var _isCDNEnabled = require("./isCDNEnabled");
|
|
11
11
|
var _mediaCdn = require("./mediaCdn");
|
|
12
12
|
function mapToMediaCdnUrl(url, token) {
|
|
@@ -17,7 +17,7 @@ function mapToMediaCdnUrl(url, token) {
|
|
|
17
17
|
}
|
|
18
18
|
var isGcpTenant = (0, _cloudProvider.isGoogleCloudPlatform)() || (0, _mediaEnvUtils.isGCPtenant)();
|
|
19
19
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
20
|
-
if (!isGcpTenant && (0,
|
|
20
|
+
if (!isGcpTenant && (0, _fg.fg)('platform_media_cdn_delivery') && (0, _fg.fg)('platform_media_cdn_single_host')) {
|
|
21
21
|
try {
|
|
22
22
|
var parsedUrl = new URL(url);
|
|
23
23
|
var cdnHost = _mediaCdn.MEDIA_CDN_MAP[parsedUrl.host];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isGoogleCloudPlatform } from '@atlaskit/atlassian-context/cloud-provider';
|
|
2
2
|
import { isIsolatedCloud } from '@atlaskit/atlassian-context/is-isolated-cloud';
|
|
3
3
|
import { isGCPtenant as isGCPtenantInStaging } from '@atlaskit/media-common/mediaEnvUtils';
|
|
4
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
5
5
|
import { isCommercial } from './isCommercial';
|
|
6
6
|
import { isPathBasedEnabled } from './isPathBasedEnabled';
|
|
7
7
|
export function isCDNEnabled() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isGoogleCloudPlatform } from '@atlaskit/atlassian-context/cloud-provider';
|
|
2
2
|
import { isGCPtenant as isGCPtenantInStaging } from '@atlaskit/media-common/mediaEnvUtils';
|
|
3
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
4
4
|
import { isCDNEnabled } from './isCDNEnabled';
|
|
5
5
|
import { MEDIA_CDN_MAP, MEDIA_TOKEN_LENGTH_LIMIT } from './mediaCdn';
|
|
6
6
|
export function mapToMediaCdnUrl(url, token) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isGoogleCloudPlatform } from '@atlaskit/atlassian-context/cloud-provider';
|
|
2
2
|
import { isIsolatedCloud } from '@atlaskit/atlassian-context/is-isolated-cloud';
|
|
3
3
|
import { isGCPtenant as isGCPtenantInStaging } from '@atlaskit/media-common/mediaEnvUtils';
|
|
4
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
5
5
|
import { isCommercial } from './isCommercial';
|
|
6
6
|
import { isPathBasedEnabled } from './isPathBasedEnabled';
|
|
7
7
|
export function isCDNEnabled() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isGoogleCloudPlatform } from '@atlaskit/atlassian-context/cloud-provider';
|
|
2
2
|
import { isGCPtenant as isGCPtenantInStaging } from '@atlaskit/media-common/mediaEnvUtils';
|
|
3
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
4
4
|
import { isCDNEnabled } from './isCDNEnabled';
|
|
5
5
|
import { MEDIA_CDN_MAP, MEDIA_TOKEN_LENGTH_LIMIT } from './mediaCdn';
|
|
6
6
|
export function mapToMediaCdnUrl(url, token) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Auth } from '@atlaskit/media-core/auth';
|
|
2
2
|
export declare const resolveInitialAuth: (auth?: Auth) => Auth;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { type MediaTraceContext } from '@atlaskit/media-common';
|
|
2
|
-
import {
|
|
2
|
+
import type { Auth } from '@atlaskit/media-core/auth';
|
|
3
3
|
import { type RequestHeaders } from './types';
|
|
4
4
|
export declare function extendHeaders(headers?: RequestHeaders, auth?: Auth, traceContext?: Required<MediaTraceContext>): RequestHeaders | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/media-client",
|
|
3
|
-
"version": "37.5.
|
|
3
|
+
"version": "37.5.6",
|
|
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": "^163.0.0",
|
|
29
29
|
"@babel/runtime": "^7.0.0",
|
|
30
30
|
"dataloader": "^2.1.0",
|
|
31
31
|
"deep-equal": "^1.0.1",
|