@atlaskit/emoji 67.6.9 → 67.6.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 CHANGED
@@ -1,5 +1,18 @@
1
1
  # @atlaskit/emoji
2
2
 
3
+ ## 67.6.11
4
+
5
+ ### Patch Changes
6
+
7
+ - [#75387](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/75387) [`a1d427c64ec5`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/a1d427c64ec5) - [ux] ED-22014 Emojis now use SHA256 for media uploads
8
+ - Updated dependencies
9
+
10
+ ## 67.6.10
11
+
12
+ ### Patch Changes
13
+
14
+ - [#73588](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/73588) [`d06aa1426a45`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/d06aa1426a45) - Thess packages has been added to the Jira push model.
15
+
3
16
  ## 67.6.9
4
17
 
5
18
  ### Patch Changes
@@ -19,6 +19,7 @@ var _MediaEmojiCache = _interopRequireDefault(require("./MediaEmojiCache"));
19
19
  var _EmojiUtils = require("../EmojiUtils");
20
20
  var _TokenManager = _interopRequireDefault(require("./TokenManager"));
21
21
  var _logger = _interopRequireDefault(require("../../util/logger"));
22
+ var _environment = require("../../util/environment");
22
23
  var _excluded = ["altRepresentations"];
23
24
  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; }
24
25
  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; }
@@ -184,8 +185,10 @@ var SiteEmojiResource = exports.default = /*#__PURE__*/function () {
184
185
  token: uploadToken.jwt,
185
186
  baseUrl: url
186
187
  });
187
- }
188
+ },
189
+ useSha256ForUploads: (0, _environment.isFedRamp)() // SHA256 is not supported yet in commecrial regions
188
190
  });
191
+
189
192
  var subscription = mediaClient.file.upload({
190
193
  content: upload.dataURL,
191
194
  name: upload.filename,
@@ -19,7 +19,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
19
19
  actionSubjectId: actionSubjectId,
20
20
  attributes: _objectSpread({
21
21
  packageName: "@atlaskit/emoji",
22
- packageVersion: "67.6.9"
22
+ packageVersion: "67.6.11"
23
23
  }, attributes)
24
24
  };
25
25
  };
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.isFedRamp = isFedRamp;
7
+ var FEDRAMP_MODERATE = 'fedramp-moderate';
8
+ function isFedRamp() {
9
+ var _globalThis$location;
10
+ // MICROS_PERIMETER is already used by few products, so we need to keep it for backward compatibility
11
+ var env = globalThis.MICROS_PERIMETER || globalThis.UNSAFE_ATL_CONTEXT_BOUNDARY;
12
+ if (env) {
13
+ return env === FEDRAMP_MODERATE;
14
+ }
15
+ var matches = (_globalThis$location = globalThis.location) === null || _globalThis$location === void 0 || (_globalThis$location = _globalThis$location.hostname) === null || _globalThis$location === void 0 ? void 0 : _globalThis$location.match(/atlassian-us-gov-mod\.com|atlassian-us-gov\.com|atlassian-fex\.(com|net)/);
16
+ return matches ? matches.length > 0 : false;
17
+ }
@@ -6,6 +6,7 @@ import MediaEmojiCache from './MediaEmojiCache';
6
6
  import { denormaliseEmojiServiceResponse, emojiRequest, getAltRepresentation } from '../EmojiUtils';
7
7
  import TokenManager from './TokenManager';
8
8
  import debug from '../../util/logger';
9
+ import { isFedRamp } from '../../util/environment';
9
10
  // Assume media is 95% of total upload time.
10
11
  export const mediaProportionOfProgress = 95 / 100;
11
12
  export default class SiteEmojiResource {
@@ -142,8 +143,10 @@ export default class SiteEmojiResource {
142
143
  clientId,
143
144
  token: uploadToken.jwt,
144
145
  baseUrl: url
145
- })
146
+ }),
147
+ useSha256ForUploads: isFedRamp() // SHA256 is not supported yet in commecrial regions
146
148
  });
149
+
147
150
  const subscription = mediaClient.file.upload({
148
151
  content: upload.dataURL,
149
152
  name: upload.filename,
@@ -7,7 +7,7 @@ const createEvent = (eventType, action, actionSubject, actionSubjectId, attribut
7
7
  actionSubjectId,
8
8
  attributes: {
9
9
  packageName: "@atlaskit/emoji",
10
- packageVersion: "67.6.9",
10
+ packageVersion: "67.6.11",
11
11
  ...attributes
12
12
  }
13
13
  });
@@ -0,0 +1,11 @@
1
+ const FEDRAMP_MODERATE = 'fedramp-moderate';
2
+ export function isFedRamp() {
3
+ var _globalThis$location, _globalThis$location$;
4
+ // MICROS_PERIMETER is already used by few products, so we need to keep it for backward compatibility
5
+ const env = globalThis.MICROS_PERIMETER || globalThis.UNSAFE_ATL_CONTEXT_BOUNDARY;
6
+ if (env) {
7
+ return env === FEDRAMP_MODERATE;
8
+ }
9
+ const matches = (_globalThis$location = globalThis.location) === null || _globalThis$location === void 0 ? void 0 : (_globalThis$location$ = _globalThis$location.hostname) === null || _globalThis$location$ === void 0 ? void 0 : _globalThis$location$.match(/atlassian-us-gov-mod\.com|atlassian-us-gov\.com|atlassian-fex\.(com|net)/);
10
+ return matches ? matches.length > 0 : false;
11
+ }
@@ -15,6 +15,7 @@ import MediaEmojiCache from './MediaEmojiCache';
15
15
  import { denormaliseEmojiServiceResponse, emojiRequest, getAltRepresentation } from '../EmojiUtils';
16
16
  import TokenManager from './TokenManager';
17
17
  import debug from '../../util/logger';
18
+ import { isFedRamp } from '../../util/environment';
18
19
  // Assume media is 95% of total upload time.
19
20
  export var mediaProportionOfProgress = 95 / 100;
20
21
  var SiteEmojiResource = /*#__PURE__*/function () {
@@ -177,8 +178,10 @@ var SiteEmojiResource = /*#__PURE__*/function () {
177
178
  token: uploadToken.jwt,
178
179
  baseUrl: url
179
180
  });
180
- }
181
+ },
182
+ useSha256ForUploads: isFedRamp() // SHA256 is not supported yet in commecrial regions
181
183
  });
184
+
182
185
  var subscription = mediaClient.file.upload({
183
186
  content: upload.dataURL,
184
187
  name: upload.filename,
@@ -12,7 +12,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
12
12
  actionSubjectId: actionSubjectId,
13
13
  attributes: _objectSpread({
14
14
  packageName: "@atlaskit/emoji",
15
- packageVersion: "67.6.9"
15
+ packageVersion: "67.6.11"
16
16
  }, attributes)
17
17
  };
18
18
  };
@@ -0,0 +1,11 @@
1
+ var FEDRAMP_MODERATE = 'fedramp-moderate';
2
+ export function isFedRamp() {
3
+ var _globalThis$location;
4
+ // MICROS_PERIMETER is already used by few products, so we need to keep it for backward compatibility
5
+ var env = globalThis.MICROS_PERIMETER || globalThis.UNSAFE_ATL_CONTEXT_BOUNDARY;
6
+ if (env) {
7
+ return env === FEDRAMP_MODERATE;
8
+ }
9
+ var matches = (_globalThis$location = globalThis.location) === null || _globalThis$location === void 0 || (_globalThis$location = _globalThis$location.hostname) === null || _globalThis$location === void 0 ? void 0 : _globalThis$location.match(/atlassian-us-gov-mod\.com|atlassian-us-gov\.com|atlassian-fex\.(com|net)/);
10
+ return matches ? matches.length > 0 : false;
11
+ }
@@ -0,0 +1 @@
1
+ export declare function isFedRamp(): boolean;
@@ -0,0 +1 @@
1
+ export declare function isFedRamp(): boolean;
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@atlaskit/emoji",
3
- "version": "67.6.9",
3
+ "version": "67.6.11",
4
4
  "description": "Fabric emoji React components",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
7
7
  },
8
- "repository": "https://bitbucket.org/atlassian/atlassian-frontend",
8
+ "repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
9
9
  "author": "Atlassian Pty Ltd",
10
10
  "license": "Apache-2.0",
11
11
  "main": "dist/cjs/index.js",
@@ -25,6 +25,9 @@
25
25
  "atlassian": {
26
26
  "team": "Foundational Elements",
27
27
  "releaseModel": "continuous",
28
+ "productPushConsumption": [
29
+ "jira"
30
+ ],
28
31
  "website": {
29
32
  "name": "Emoji"
30
33
  },
@@ -34,15 +37,15 @@
34
37
  "access": "public"
35
38
  },
36
39
  "dependencies": {
37
- "@atlaskit/analytics-next": "^9.1.0",
38
- "@atlaskit/button": "^17.2.0",
39
- "@atlaskit/icon": "^22.0.0",
40
- "@atlaskit/media-client": "^26.1.0",
40
+ "@atlaskit/analytics-next": "^9.2.0",
41
+ "@atlaskit/button": "^17.4.0",
42
+ "@atlaskit/icon": "^22.1.0",
43
+ "@atlaskit/media-client": "^26.2.0",
41
44
  "@atlaskit/media-client-react": "^2.0.0",
42
45
  "@atlaskit/spinner": "^16.0.0",
43
46
  "@atlaskit/textfield": "^6.0.0",
44
47
  "@atlaskit/theme": "^12.6.0",
45
- "@atlaskit/tokens": "^1.33.0",
48
+ "@atlaskit/tokens": "^1.38.0",
46
49
  "@atlaskit/tooltip": "^18.1.0",
47
50
  "@atlaskit/ufo": "^0.2.0",
48
51
  "@atlaskit/util-service-support": "^6.2.0",
@@ -66,7 +69,7 @@
66
69
  "devDependencies": {
67
70
  "@af/integration-testing": "*",
68
71
  "@atlaskit/elements-test-helpers": "^0.7.0",
69
- "@atlaskit/media-core": "^34.1.0",
72
+ "@atlaskit/media-core": "^34.2.0",
70
73
  "@atlaskit/ssr": "*",
71
74
  "@atlaskit/visual-regression": "*",
72
75
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",