@atlaskit/media-client 27.6.0 → 27.6.1
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 +8 -0
- package/dist/cjs/client/file-fetcher/error.js +1 -1
- package/dist/cjs/client/media-client.js +1 -1
- package/dist/cjs/client/media-store/MediaStore.js +5 -4
- package/dist/cjs/client/media-store/error.js +1 -1
- package/dist/cjs/models/artifacts.js +2 -1
- package/dist/cjs/models/errors/index.js +1 -1
- package/dist/cjs/uploader/error.js +1 -1
- package/dist/cjs/utils/hashing/hasherCreator.js +1 -1
- package/dist/cjs/utils/hashing/simpleHasher.js +1 -1
- package/dist/cjs/utils/isFedRamp.js +23 -0
- package/dist/cjs/utils/mediaCdn.js +2 -1
- package/dist/cjs/utils/mobileUpload/error.js +1 -1
- package/dist/cjs/utils/polling/errors.js +1 -1
- package/dist/cjs/utils/request/errors.js +1 -1
- package/dist/es2019/client/media-store/MediaStore.js +5 -4
- package/dist/es2019/models/artifacts.js +2 -1
- package/dist/es2019/utils/isFedRamp.js +17 -0
- package/dist/es2019/utils/mediaCdn.js +2 -1
- package/dist/esm/client/file-fetcher/error.js +1 -1
- package/dist/esm/client/media-store/MediaStore.js +5 -4
- package/dist/esm/client/media-store/error.js +1 -1
- package/dist/esm/models/artifacts.js +2 -1
- package/dist/esm/models/errors/index.js +1 -1
- package/dist/esm/uploader/error.js +1 -1
- package/dist/esm/utils/isFedRamp.js +17 -0
- package/dist/esm/utils/mediaCdn.js +2 -1
- package/dist/esm/utils/mobileUpload/error.js +1 -1
- package/dist/esm/utils/polling/errors.js +1 -1
- package/dist/esm/utils/request/errors.js +1 -1
- package/dist/types/utils/isFedRamp.d.ts +1 -0
- package/dist/types-ts4.5/utils/isFedRamp.d.ts +1 -0
- package/package.json +1 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/media-client
|
|
2
2
|
|
|
3
|
+
## 27.6.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#139979](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/139979)
|
|
8
|
+
[`7db4a3764719f`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/7db4a3764719f) -
|
|
9
|
+
Implementing a safe guard for platform.media-cdn-delivery against FedRAMP environment
|
|
10
|
+
|
|
3
11
|
## 27.6.0
|
|
4
12
|
|
|
5
13
|
### Minor Changes
|
|
@@ -12,7 +12,7 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
|
|
|
12
12
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
13
13
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
14
14
|
var _errors = require("../../models/errors");
|
|
15
|
-
function _createSuper(
|
|
15
|
+
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = (0, _getPrototypeOf2.default)(t); if (r) { var s = (0, _getPrototypeOf2.default)(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return (0, _possibleConstructorReturn2.default)(this, e); }; }
|
|
16
16
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
17
17
|
var FileFetcherError = exports.FileFetcherError = /*#__PURE__*/function (_BaseMediaClientError) {
|
|
18
18
|
(0, _inherits2.default)(FileFetcherError, _BaseMediaClientError);
|
|
@@ -17,7 +17,7 @@ var _fileFetcher = require("./file-fetcher");
|
|
|
17
17
|
var _stargateClient = require("./stargate-client");
|
|
18
18
|
var _mediaState = require("@atlaskit/media-state");
|
|
19
19
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
20
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u &&
|
|
20
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
21
21
|
var MediaClient = exports.MediaClient = /*#__PURE__*/function () {
|
|
22
22
|
// mobile upload is lazily loaded
|
|
23
23
|
|
|
@@ -19,6 +19,7 @@ var _helpers = require("../../utils/request/helpers");
|
|
|
19
19
|
var _mediaCdn = require("../../utils/mediaCdn");
|
|
20
20
|
var _resolveAuth = require("./resolveAuth");
|
|
21
21
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
22
|
+
var _isFedRamp = require("../../utils/isFedRamp");
|
|
22
23
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
23
24
|
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) { (0, _defineProperty2.default)(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; }
|
|
24
25
|
var MEDIA_API_REGION = 'media-api-region';
|
|
@@ -292,7 +293,7 @@ var MediaStore = exports.MediaStore = /*#__PURE__*/function () {
|
|
|
292
293
|
params: extendImageParams(params),
|
|
293
294
|
auth: auth
|
|
294
295
|
};
|
|
295
|
-
var imageEndpoint = (0, _platformFeatureFlags.fg)('platform.media-cdn-delivery') ? 'image/cdn' : 'image';
|
|
296
|
+
var imageEndpoint = !(0, _isFedRamp.isFedRamp)() && (0, _platformFeatureFlags.fg)('platform.media-cdn-delivery') ? 'image/cdn' : 'image';
|
|
296
297
|
return (0, _mediaCdn.mapToMediaCdnUrl)((0, _helpers.createUrl)("".concat(auth.baseUrl, "/file/").concat(id, "/").concat(imageEndpoint), options));
|
|
297
298
|
}
|
|
298
299
|
}, {
|
|
@@ -310,7 +311,7 @@ var MediaStore = exports.MediaStore = /*#__PURE__*/function () {
|
|
|
310
311
|
case 0:
|
|
311
312
|
maxAge = _args5.length > 2 && _args5[2] !== undefined ? _args5[2] : _constants.FILE_CACHE_MAX_AGE;
|
|
312
313
|
headers = {};
|
|
313
|
-
binaryEndpoint = (0, _platformFeatureFlags.fg)('platform.media-cdn-delivery') ? 'binary/cdn' : 'binary';
|
|
314
|
+
binaryEndpoint = !(0, _isFedRamp.isFedRamp)() && (0, _platformFeatureFlags.fg)('platform.media-cdn-delivery') ? 'binary/cdn' : 'binary';
|
|
314
315
|
metadata = {
|
|
315
316
|
method: 'GET',
|
|
316
317
|
endpoint: "/file/{fileId}/".concat(binaryEndpoint)
|
|
@@ -364,7 +365,7 @@ var MediaStore = exports.MediaStore = /*#__PURE__*/function () {
|
|
|
364
365
|
},
|
|
365
366
|
auth: auth
|
|
366
367
|
};
|
|
367
|
-
binaryEndpoint = (0, _platformFeatureFlags.fg)('platform.media-cdn-delivery') ? 'binary/cdn' : 'binary';
|
|
368
|
+
binaryEndpoint = !(0, _isFedRamp.isFedRamp)() && (0, _platformFeatureFlags.fg)('platform.media-cdn-delivery') ? 'binary/cdn' : 'binary';
|
|
368
369
|
return _context6.abrupt("return", (0, _mediaCdn.mapToMediaCdnUrl)((0, _helpers.createUrl)("".concat(auth.baseUrl, "/file/").concat(id, "/").concat(binaryEndpoint), options)));
|
|
369
370
|
case 7:
|
|
370
371
|
case "end":
|
|
@@ -431,7 +432,7 @@ var MediaStore = exports.MediaStore = /*#__PURE__*/function () {
|
|
|
431
432
|
if (isWebpSupported) {
|
|
432
433
|
headers.accept = 'image/webp,image/*,*/*;q=0.8';
|
|
433
434
|
}
|
|
434
|
-
imageEndpoint = (0, _platformFeatureFlags.fg)('platform.media-cdn-delivery') ? 'image/cdn' : 'image';
|
|
435
|
+
imageEndpoint = !(0, _isFedRamp.isFedRamp)() && (0, _platformFeatureFlags.fg)('platform.media-cdn-delivery') ? 'image/cdn' : 'image';
|
|
435
436
|
metadata = {
|
|
436
437
|
method: 'GET',
|
|
437
438
|
endpoint: "/file/{fileId}/".concat(imageEndpoint)
|
|
@@ -12,7 +12,7 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
|
|
|
12
12
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
13
13
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
14
14
|
var _errors = require("../../models/errors");
|
|
15
|
-
function _createSuper(
|
|
15
|
+
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = (0, _getPrototypeOf2.default)(t); if (r) { var s = (0, _getPrototypeOf2.default)(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return (0, _possibleConstructorReturn2.default)(this, e); }; }
|
|
16
16
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
17
17
|
var MediaStoreError = exports.MediaStoreError = /*#__PURE__*/function (_BaseMediaClientError) {
|
|
18
18
|
(0, _inherits2.default)(MediaStoreError, _BaseMediaClientError);
|
|
@@ -6,9 +6,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.getArtifactUrl = void 0;
|
|
7
7
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
8
8
|
var _mediaCdn = require("../utils/mediaCdn");
|
|
9
|
+
var _isFedRamp = require("../utils/isFedRamp");
|
|
9
10
|
var getArtifactUrl = exports.getArtifactUrl = function getArtifactUrl(artifacts, prop) {
|
|
10
11
|
var _artifacts$prop2;
|
|
11
|
-
if ((0, _platformFeatureFlags.fg)('platform.media-cdn-delivery')) {
|
|
12
|
+
if (!(0, _isFedRamp.isFedRamp)() && (0, _platformFeatureFlags.fg)('platform.media-cdn-delivery')) {
|
|
12
13
|
var _artifacts$prop;
|
|
13
14
|
return (0, _mediaCdn.mapToMediaCdnUrl)("".concat((_artifacts$prop = artifacts[prop]) === null || _artifacts$prop === void 0 ? void 0 : _artifacts$prop.url, "/cdn"));
|
|
14
15
|
}
|
|
@@ -25,7 +25,7 @@ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime
|
|
|
25
25
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
26
26
|
var _wrapNativeSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/wrapNativeSuper"));
|
|
27
27
|
var _helpers = require("./helpers");
|
|
28
|
-
function _createSuper(
|
|
28
|
+
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = (0, _getPrototypeOf2.default)(t); if (r) { var s = (0, _getPrototypeOf2.default)(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return (0, _possibleConstructorReturn2.default)(this, e); }; }
|
|
29
29
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
30
30
|
/**
|
|
31
31
|
* Base class for media errors
|
|
@@ -12,7 +12,7 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
|
|
|
12
12
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
13
13
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
14
14
|
var _errors = require("../models/errors");
|
|
15
|
-
function _createSuper(
|
|
15
|
+
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = (0, _getPrototypeOf2.default)(t); if (r) { var s = (0, _getPrototypeOf2.default)(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return (0, _possibleConstructorReturn2.default)(this, e); }; }
|
|
16
16
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
17
17
|
var UploaderError = exports.UploaderError = /*#__PURE__*/function (_BaseMediaClientError) {
|
|
18
18
|
(0, _inherits2.default)(UploaderError, _BaseMediaClientError);
|
|
@@ -10,7 +10,7 @@ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"))
|
|
|
10
10
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
11
11
|
var _mediaCore = require("@atlaskit/media-core");
|
|
12
12
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
13
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u &&
|
|
13
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
14
14
|
var hasher = null;
|
|
15
15
|
var sha256Hasher = null;
|
|
16
16
|
var destroyHasher = exports.destroyHasher = function destroyHasher() {
|
|
@@ -10,7 +10,7 @@ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/cl
|
|
|
10
10
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
11
11
|
var Rusha = _interopRequireWildcard(require("rusha"));
|
|
12
12
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
13
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u &&
|
|
13
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
14
14
|
var SimpleHasher = exports.SimpleHasher = /*#__PURE__*/function () {
|
|
15
15
|
function SimpleHasher() {
|
|
16
16
|
(0, _classCallCheck2.default)(this, SimpleHasher);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.isFedRamp = isFedRamp;
|
|
7
|
+
var FEDRAMP_MODERATE = 'fedramp-moderate';
|
|
8
|
+
|
|
9
|
+
// To determine whether an instance is a FedRAMP instance
|
|
10
|
+
// Copied from platform/pfeackages/uip/atl-context/src/services/is-fedramp/index.tsx
|
|
11
|
+
// We cannot import the same-named function from @atlassian/atl-context due to media-co being a public package (and atl-context being private)
|
|
12
|
+
// TODO: Seek alternatives
|
|
13
|
+
function isFedRamp() {
|
|
14
|
+
var _global$location;
|
|
15
|
+
var global = globalThis;
|
|
16
|
+
// MICROS_PERIMETER is already used by few products, so we need to keep it for backward compatibility
|
|
17
|
+
var env = global.MICROS_PERIMETER || global.UNSAFE_ATL_CONTEXT_BOUNDARY;
|
|
18
|
+
if (env) {
|
|
19
|
+
return env === FEDRAMP_MODERATE;
|
|
20
|
+
}
|
|
21
|
+
var matches = (_global$location = global.location) === null || _global$location === void 0 || (_global$location = _global$location.hostname) === null || _global$location === void 0 ? void 0 : _global$location.match(/atlassian-us-gov-mod\.(com|net)|atlassian-us-gov\.(com|net)|atlassian-fex\.(com|net)|atlassian-stg-fedm\.(com|net)/);
|
|
22
|
+
return matches ? matches.length > 0 : false;
|
|
23
|
+
}
|
|
@@ -6,13 +6,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.MEDIA_CDN_MAP = void 0;
|
|
7
7
|
exports.mapToMediaCdnUrl = mapToMediaCdnUrl;
|
|
8
8
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
9
|
+
var _isFedRamp = require("./isFedRamp");
|
|
9
10
|
var MEDIA_CDN_MAP = exports.MEDIA_CDN_MAP = {
|
|
10
11
|
'api.media.atlassian.com': 'media-cdn.atlassian.com',
|
|
11
12
|
'media.staging.atl-paas.net': 'media-cdn.stg.atlassian.com'
|
|
12
13
|
};
|
|
13
14
|
function mapToMediaCdnUrl(url) {
|
|
14
15
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
15
|
-
if ((0, _platformFeatureFlags.fg)('platform.media-cdn-delivery') && (0, _platformFeatureFlags.fg)('platform.media-cdn-single-host')) {
|
|
16
|
+
if (!(0, _isFedRamp.isFedRamp)() && (0, _platformFeatureFlags.fg)('platform.media-cdn-delivery') && (0, _platformFeatureFlags.fg)('platform.media-cdn-single-host')) {
|
|
16
17
|
try {
|
|
17
18
|
var parsedUrl = new URL(url);
|
|
18
19
|
var cdnHost = MEDIA_CDN_MAP[parsedUrl.host];
|
|
@@ -12,7 +12,7 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
|
|
|
12
12
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
13
13
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
14
14
|
var _errors = require("../../models/errors");
|
|
15
|
-
function _createSuper(
|
|
15
|
+
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = (0, _getPrototypeOf2.default)(t); if (r) { var s = (0, _getPrototypeOf2.default)(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return (0, _possibleConstructorReturn2.default)(this, e); }; }
|
|
16
16
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
17
17
|
var MobileUploadError = exports.MobileUploadError = /*#__PURE__*/function (_BaseMediaClientError) {
|
|
18
18
|
(0, _inherits2.default)(MobileUploadError, _BaseMediaClientError);
|
|
@@ -12,7 +12,7 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
|
|
|
12
12
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
13
13
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
14
14
|
var _errors = require("../../models/errors");
|
|
15
|
-
function _createSuper(
|
|
15
|
+
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = (0, _getPrototypeOf2.default)(t); if (r) { var s = (0, _getPrototypeOf2.default)(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return (0, _possibleConstructorReturn2.default)(this, e); }; }
|
|
16
16
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
17
17
|
var PollingError = exports.PollingError = /*#__PURE__*/function (_BaseMediaClientError) {
|
|
18
18
|
(0, _inherits2.default)(PollingError, _BaseMediaClientError);
|
|
@@ -12,7 +12,7 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
|
|
|
12
12
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
13
13
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
14
14
|
var _errors = require("../../models/errors");
|
|
15
|
-
function _createSuper(
|
|
15
|
+
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = (0, _getPrototypeOf2.default)(t); if (r) { var s = (0, _getPrototypeOf2.default)(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return (0, _possibleConstructorReturn2.default)(this, e); }; }
|
|
16
16
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
17
17
|
var RequestError = exports.RequestError = /*#__PURE__*/function (_BaseMediaClientError) {
|
|
18
18
|
(0, _inherits2.default)(RequestError, _BaseMediaClientError);
|
|
@@ -9,6 +9,7 @@ import { mapToMediaCdnUrl } from '../../utils/mediaCdn';
|
|
|
9
9
|
import { resolveAuth, resolveInitialAuth } from './resolveAuth';
|
|
10
10
|
import { ChunkHashAlgorithm } from '@atlaskit/media-core';
|
|
11
11
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
|
+
import { isFedRamp } from '../../utils/isFedRamp';
|
|
12
13
|
const MEDIA_API_REGION = 'media-api-region';
|
|
13
14
|
const MEDIA_API_ENVIRONMENT = 'media-api-environment';
|
|
14
15
|
const extendImageParams = (params, fetchMaxRes = false) => {
|
|
@@ -187,12 +188,12 @@ export class MediaStore {
|
|
|
187
188
|
params: extendImageParams(params),
|
|
188
189
|
auth
|
|
189
190
|
};
|
|
190
|
-
const imageEndpoint = fg('platform.media-cdn-delivery') ? 'image/cdn' : 'image';
|
|
191
|
+
const imageEndpoint = !isFedRamp() && fg('platform.media-cdn-delivery') ? 'image/cdn' : 'image';
|
|
191
192
|
return mapToMediaCdnUrl(createUrl(`${auth.baseUrl}/file/${id}/${imageEndpoint}`, options));
|
|
192
193
|
}
|
|
193
194
|
async getFileBinary(id, collectionName, maxAge = FILE_CACHE_MAX_AGE) {
|
|
194
195
|
const headers = {};
|
|
195
|
-
const binaryEndpoint = fg('platform.media-cdn-delivery') ? 'binary/cdn' : 'binary';
|
|
196
|
+
const binaryEndpoint = !isFedRamp() && fg('platform.media-cdn-delivery') ? 'binary/cdn' : 'binary';
|
|
196
197
|
const metadata = {
|
|
197
198
|
method: 'GET',
|
|
198
199
|
endpoint: `/file/{fileId}/${binaryEndpoint}`
|
|
@@ -222,7 +223,7 @@ export class MediaStore {
|
|
|
222
223
|
},
|
|
223
224
|
auth
|
|
224
225
|
};
|
|
225
|
-
const binaryEndpoint = fg('platform.media-cdn-delivery') ? 'binary/cdn' : 'binary';
|
|
226
|
+
const binaryEndpoint = !isFedRamp() && fg('platform.media-cdn-delivery') ? 'binary/cdn' : 'binary';
|
|
226
227
|
return mapToMediaCdnUrl(createUrl(`${auth.baseUrl}/file/${id}/${binaryEndpoint}`, options));
|
|
227
228
|
}
|
|
228
229
|
async getArtifactURL(artifacts, artifactName, collectionName) {
|
|
@@ -249,7 +250,7 @@ export class MediaStore {
|
|
|
249
250
|
if (isWebpSupported) {
|
|
250
251
|
headers.accept = 'image/webp,image/*,*/*;q=0.8';
|
|
251
252
|
}
|
|
252
|
-
const imageEndpoint = fg('platform.media-cdn-delivery') ? 'image/cdn' : 'image';
|
|
253
|
+
const imageEndpoint = !isFedRamp() && fg('platform.media-cdn-delivery') ? 'image/cdn' : 'image';
|
|
253
254
|
const metadata = {
|
|
254
255
|
method: 'GET',
|
|
255
256
|
endpoint: `/file/{fileId}/${imageEndpoint}`
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
2
|
import { mapToMediaCdnUrl } from '../utils/mediaCdn';
|
|
3
|
+
import { isFedRamp } from '../utils/isFedRamp';
|
|
3
4
|
export const getArtifactUrl = (artifacts, prop) => {
|
|
4
5
|
var _artifacts$prop2;
|
|
5
|
-
if (fg('platform.media-cdn-delivery')) {
|
|
6
|
+
if (!isFedRamp() && fg('platform.media-cdn-delivery')) {
|
|
6
7
|
var _artifacts$prop;
|
|
7
8
|
return mapToMediaCdnUrl(`${(_artifacts$prop = artifacts[prop]) === null || _artifacts$prop === void 0 ? void 0 : _artifacts$prop.url}/cdn`);
|
|
8
9
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const FEDRAMP_MODERATE = 'fedramp-moderate';
|
|
2
|
+
|
|
3
|
+
// To determine whether an instance is a FedRAMP instance
|
|
4
|
+
// Copied from platform/pfeackages/uip/atl-context/src/services/is-fedramp/index.tsx
|
|
5
|
+
// We cannot import the same-named function from @atlassian/atl-context due to media-co being a public package (and atl-context being private)
|
|
6
|
+
// TODO: Seek alternatives
|
|
7
|
+
export function isFedRamp() {
|
|
8
|
+
var _global$location, _global$location$host;
|
|
9
|
+
const global = globalThis;
|
|
10
|
+
// MICROS_PERIMETER is already used by few products, so we need to keep it for backward compatibility
|
|
11
|
+
const env = global.MICROS_PERIMETER || global.UNSAFE_ATL_CONTEXT_BOUNDARY;
|
|
12
|
+
if (env) {
|
|
13
|
+
return env === FEDRAMP_MODERATE;
|
|
14
|
+
}
|
|
15
|
+
const matches = (_global$location = global.location) === null || _global$location === void 0 ? void 0 : (_global$location$host = _global$location.hostname) === null || _global$location$host === void 0 ? void 0 : _global$location$host.match(/atlassian-us-gov-mod\.(com|net)|atlassian-us-gov\.(com|net)|atlassian-fex\.(com|net)|atlassian-stg-fedm\.(com|net)/);
|
|
16
|
+
return matches ? matches.length > 0 : false;
|
|
17
|
+
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
|
+
import { isFedRamp } from './isFedRamp';
|
|
2
3
|
export const MEDIA_CDN_MAP = {
|
|
3
4
|
'api.media.atlassian.com': 'media-cdn.atlassian.com',
|
|
4
5
|
'media.staging.atl-paas.net': 'media-cdn.stg.atlassian.com'
|
|
5
6
|
};
|
|
6
7
|
export function mapToMediaCdnUrl(url) {
|
|
7
8
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
8
|
-
if (fg('platform.media-cdn-delivery') && fg('platform.media-cdn-single-host')) {
|
|
9
|
+
if (!isFedRamp() && fg('platform.media-cdn-delivery') && fg('platform.media-cdn-single-host')) {
|
|
9
10
|
try {
|
|
10
11
|
const parsedUrl = new URL(url);
|
|
11
12
|
const cdnHost = MEDIA_CDN_MAP[parsedUrl.host];
|
|
@@ -3,7 +3,7 @@ import _createClass from "@babel/runtime/helpers/createClass";
|
|
|
3
3
|
import _inherits from "@babel/runtime/helpers/inherits";
|
|
4
4
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
5
5
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
|
-
function _createSuper(
|
|
6
|
+
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
|
|
7
7
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
8
8
|
import { BaseMediaClientError } from '../../models/errors';
|
|
9
9
|
export var FileFetcherError = /*#__PURE__*/function (_BaseMediaClientError) {
|
|
@@ -15,6 +15,7 @@ import { mapToMediaCdnUrl } from '../../utils/mediaCdn';
|
|
|
15
15
|
import { resolveAuth, resolveInitialAuth } from './resolveAuth';
|
|
16
16
|
import { ChunkHashAlgorithm } from '@atlaskit/media-core';
|
|
17
17
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
18
|
+
import { isFedRamp } from '../../utils/isFedRamp';
|
|
18
19
|
var MEDIA_API_REGION = 'media-api-region';
|
|
19
20
|
var MEDIA_API_ENVIRONMENT = 'media-api-environment';
|
|
20
21
|
var extendImageParams = function extendImageParams(params) {
|
|
@@ -286,7 +287,7 @@ export var MediaStore = /*#__PURE__*/function () {
|
|
|
286
287
|
params: extendImageParams(params),
|
|
287
288
|
auth: auth
|
|
288
289
|
};
|
|
289
|
-
var imageEndpoint = fg('platform.media-cdn-delivery') ? 'image/cdn' : 'image';
|
|
290
|
+
var imageEndpoint = !isFedRamp() && fg('platform.media-cdn-delivery') ? 'image/cdn' : 'image';
|
|
290
291
|
return mapToMediaCdnUrl(createUrl("".concat(auth.baseUrl, "/file/").concat(id, "/").concat(imageEndpoint), options));
|
|
291
292
|
}
|
|
292
293
|
}, {
|
|
@@ -304,7 +305,7 @@ export var MediaStore = /*#__PURE__*/function () {
|
|
|
304
305
|
case 0:
|
|
305
306
|
maxAge = _args5.length > 2 && _args5[2] !== undefined ? _args5[2] : FILE_CACHE_MAX_AGE;
|
|
306
307
|
headers = {};
|
|
307
|
-
binaryEndpoint = fg('platform.media-cdn-delivery') ? 'binary/cdn' : 'binary';
|
|
308
|
+
binaryEndpoint = !isFedRamp() && fg('platform.media-cdn-delivery') ? 'binary/cdn' : 'binary';
|
|
308
309
|
metadata = {
|
|
309
310
|
method: 'GET',
|
|
310
311
|
endpoint: "/file/{fileId}/".concat(binaryEndpoint)
|
|
@@ -358,7 +359,7 @@ export var MediaStore = /*#__PURE__*/function () {
|
|
|
358
359
|
},
|
|
359
360
|
auth: auth
|
|
360
361
|
};
|
|
361
|
-
binaryEndpoint = fg('platform.media-cdn-delivery') ? 'binary/cdn' : 'binary';
|
|
362
|
+
binaryEndpoint = !isFedRamp() && fg('platform.media-cdn-delivery') ? 'binary/cdn' : 'binary';
|
|
362
363
|
return _context6.abrupt("return", mapToMediaCdnUrl(createUrl("".concat(auth.baseUrl, "/file/").concat(id, "/").concat(binaryEndpoint), options)));
|
|
363
364
|
case 7:
|
|
364
365
|
case "end":
|
|
@@ -425,7 +426,7 @@ export var MediaStore = /*#__PURE__*/function () {
|
|
|
425
426
|
if (isWebpSupported) {
|
|
426
427
|
headers.accept = 'image/webp,image/*,*/*;q=0.8';
|
|
427
428
|
}
|
|
428
|
-
imageEndpoint = fg('platform.media-cdn-delivery') ? 'image/cdn' : 'image';
|
|
429
|
+
imageEndpoint = !isFedRamp() && fg('platform.media-cdn-delivery') ? 'image/cdn' : 'image';
|
|
429
430
|
metadata = {
|
|
430
431
|
method: 'GET',
|
|
431
432
|
endpoint: "/file/{fileId}/".concat(imageEndpoint)
|
|
@@ -3,7 +3,7 @@ import _createClass from "@babel/runtime/helpers/createClass";
|
|
|
3
3
|
import _inherits from "@babel/runtime/helpers/inherits";
|
|
4
4
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
5
5
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
|
-
function _createSuper(
|
|
6
|
+
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
|
|
7
7
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
8
8
|
import { BaseMediaClientError } from '../../models/errors';
|
|
9
9
|
export var MediaStoreError = /*#__PURE__*/function (_BaseMediaClientError) {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
2
|
import { mapToMediaCdnUrl } from '../utils/mediaCdn';
|
|
3
|
+
import { isFedRamp } from '../utils/isFedRamp';
|
|
3
4
|
export var getArtifactUrl = function getArtifactUrl(artifacts, prop) {
|
|
4
5
|
var _artifacts$prop2;
|
|
5
|
-
if (fg('platform.media-cdn-delivery')) {
|
|
6
|
+
if (!isFedRamp() && fg('platform.media-cdn-delivery')) {
|
|
6
7
|
var _artifacts$prop;
|
|
7
8
|
return mapToMediaCdnUrl("".concat((_artifacts$prop = artifacts[prop]) === null || _artifacts$prop === void 0 ? void 0 : _artifacts$prop.url, "/cdn"));
|
|
8
9
|
}
|
|
@@ -5,7 +5,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
5
5
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
6
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
7
7
|
import _wrapNativeSuper from "@babel/runtime/helpers/wrapNativeSuper";
|
|
8
|
-
function _createSuper(
|
|
8
|
+
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
|
|
9
9
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
10
10
|
export { isMediaClientError, getMediaClientErrorReason } from './helpers';
|
|
11
11
|
|
|
@@ -3,7 +3,7 @@ import _createClass from "@babel/runtime/helpers/createClass";
|
|
|
3
3
|
import _inherits from "@babel/runtime/helpers/inherits";
|
|
4
4
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
5
5
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
|
-
function _createSuper(
|
|
6
|
+
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
|
|
7
7
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
8
8
|
import { BaseMediaClientError } from '../models/errors';
|
|
9
9
|
export var UploaderError = /*#__PURE__*/function (_BaseMediaClientError) {
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
var FEDRAMP_MODERATE = 'fedramp-moderate';
|
|
2
|
+
|
|
3
|
+
// To determine whether an instance is a FedRAMP instance
|
|
4
|
+
// Copied from platform/pfeackages/uip/atl-context/src/services/is-fedramp/index.tsx
|
|
5
|
+
// We cannot import the same-named function from @atlassian/atl-context due to media-co being a public package (and atl-context being private)
|
|
6
|
+
// TODO: Seek alternatives
|
|
7
|
+
export function isFedRamp() {
|
|
8
|
+
var _global$location;
|
|
9
|
+
var global = globalThis;
|
|
10
|
+
// MICROS_PERIMETER is already used by few products, so we need to keep it for backward compatibility
|
|
11
|
+
var env = global.MICROS_PERIMETER || global.UNSAFE_ATL_CONTEXT_BOUNDARY;
|
|
12
|
+
if (env) {
|
|
13
|
+
return env === FEDRAMP_MODERATE;
|
|
14
|
+
}
|
|
15
|
+
var matches = (_global$location = global.location) === null || _global$location === void 0 || (_global$location = _global$location.hostname) === null || _global$location === void 0 ? void 0 : _global$location.match(/atlassian-us-gov-mod\.(com|net)|atlassian-us-gov\.(com|net)|atlassian-fex\.(com|net)|atlassian-stg-fedm\.(com|net)/);
|
|
16
|
+
return matches ? matches.length > 0 : false;
|
|
17
|
+
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
|
+
import { isFedRamp } from './isFedRamp';
|
|
2
3
|
export var MEDIA_CDN_MAP = {
|
|
3
4
|
'api.media.atlassian.com': 'media-cdn.atlassian.com',
|
|
4
5
|
'media.staging.atl-paas.net': 'media-cdn.stg.atlassian.com'
|
|
5
6
|
};
|
|
6
7
|
export function mapToMediaCdnUrl(url) {
|
|
7
8
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
8
|
-
if (fg('platform.media-cdn-delivery') && fg('platform.media-cdn-single-host')) {
|
|
9
|
+
if (!isFedRamp() && fg('platform.media-cdn-delivery') && fg('platform.media-cdn-single-host')) {
|
|
9
10
|
try {
|
|
10
11
|
var parsedUrl = new URL(url);
|
|
11
12
|
var cdnHost = MEDIA_CDN_MAP[parsedUrl.host];
|
|
@@ -3,7 +3,7 @@ import _createClass from "@babel/runtime/helpers/createClass";
|
|
|
3
3
|
import _inherits from "@babel/runtime/helpers/inherits";
|
|
4
4
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
5
5
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
|
-
function _createSuper(
|
|
6
|
+
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
|
|
7
7
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
8
8
|
import { BaseMediaClientError } from '../../models/errors';
|
|
9
9
|
export var MobileUploadError = /*#__PURE__*/function (_BaseMediaClientError) {
|
|
@@ -3,7 +3,7 @@ import _createClass from "@babel/runtime/helpers/createClass";
|
|
|
3
3
|
import _inherits from "@babel/runtime/helpers/inherits";
|
|
4
4
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
5
5
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
|
-
function _createSuper(
|
|
6
|
+
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
|
|
7
7
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
8
8
|
import { BaseMediaClientError } from '../../models/errors';
|
|
9
9
|
export var PollingError = /*#__PURE__*/function (_BaseMediaClientError) {
|
|
@@ -3,7 +3,7 @@ import _createClass from "@babel/runtime/helpers/createClass";
|
|
|
3
3
|
import _inherits from "@babel/runtime/helpers/inherits";
|
|
4
4
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
5
5
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
|
-
function _createSuper(
|
|
6
|
+
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
|
|
7
7
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
8
8
|
import { BaseMediaClientError } from '../../models/errors';
|
|
9
9
|
export var RequestError = /*#__PURE__*/function (_BaseMediaClientError) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isFedRamp(): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isFedRamp(): boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/media-client",
|
|
3
|
-
"version": "27.6.
|
|
3
|
+
"version": "27.6.1",
|
|
4
4
|
"description": "Media API Web Client Library",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -29,8 +29,6 @@
|
|
|
29
29
|
},
|
|
30
30
|
"atlassian": {
|
|
31
31
|
"team": "Media Experience",
|
|
32
|
-
"inPublicMirror": true,
|
|
33
|
-
"releaseModel": "continuous",
|
|
34
32
|
"website": {
|
|
35
33
|
"name": "Media Client"
|
|
36
34
|
}
|