@atlaskit/media-test-helpers 28.8.0 → 28.8.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 CHANGED
@@ -1,5 +1,14 @@
1
1
  # @atlaskit/media-test-helpers
2
2
 
3
+ ## 28.8.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`11df2d9b882`](https://bitbucket.org/atlassian/atlassian-frontend/commits/11df2d9b882) - Re-enabling non stargate url for media examples
8
+ - [`d15fbde3a83`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d15fbde3a83) - Reverting media playground url change because of broken regression tests
9
+ - [`e362e52fc66`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e362e52fc66) - Updating the media playground urls for media examples, to avoid stargate auth
10
+ - Updated dependencies
11
+
3
12
  ## 28.8.0
4
13
 
5
14
  ### Minor Changes
@@ -18,7 +18,7 @@ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/creat
18
18
  var _collectionNames = require("./collectionNames");
19
19
 
20
20
  var cachedAuths = {};
21
- var authProviderBaseURL = 'https://api-private.dev.atlassian.com/media-playground/api';
21
+ var authProviderBaseURL = 'https://media-playground.dev.atl-paas.net/';
22
22
 
23
23
  var StoryBookAuthProvider = /*#__PURE__*/function () {
24
24
  function StoryBookAuthProvider() {
@@ -41,7 +41,6 @@ var StoryBookAuthProvider = /*#__PURE__*/function () {
41
41
  headers.append('Accept', 'text/plain, */*; q=0.01');
42
42
  config = {
43
43
  method: 'POST',
44
- credentials: 'include',
45
44
  headers: headers,
46
45
  body: access ? JSON.stringify({
47
46
  access: access
@@ -29,7 +29,7 @@ var getAuthFromContextProvider = /*#__PURE__*/function () {
29
29
  while (1) {
30
30
  switch (_context.prev = _context.next) {
31
31
  case 0:
32
- url = 'https://api-private.dev.atlassian.com/media-playground/api/token/tenant?environment=asap';
32
+ url = 'https://media-playground.dev.atl-paas.net/token/tenant?environment=asap';
33
33
  body = JSON.stringify({
34
34
  access: access
35
35
  });
@@ -40,8 +40,7 @@ var getAuthFromContextProvider = /*#__PURE__*/function () {
40
40
  return fetch(url, {
41
41
  method: 'POST',
42
42
  body: body,
43
- headers: headers,
44
- credentials: 'include'
43
+ headers: headers
45
44
  });
46
45
 
47
46
  case 7:
@@ -43,7 +43,7 @@ var requestAuthProvider = /*#__PURE__*/function () {
43
43
  while (1) {
44
44
  switch (_context.prev = _context.next) {
45
45
  case 0:
46
- url = "https://api-private.dev.atlassian.com/media-playground/api/token/tenant?environment=".concat(authEnvironment);
46
+ url = "https://media-playground.dev.atl-paas.net/token/tenant?environment=".concat(authEnvironment);
47
47
  body = JSON.stringify({
48
48
  access: accessUrns[collectionName] || {}
49
49
  });
@@ -54,8 +54,7 @@ var requestAuthProvider = /*#__PURE__*/function () {
54
54
  return fetch(url, {
55
55
  method: 'POST',
56
56
  body: body,
57
- headers: headers,
58
- credentials: 'include'
57
+ headers: headers
59
58
  });
60
59
 
61
60
  case 7:
@@ -22,7 +22,7 @@ var tenantAuth = function tenantAuth(context) {
22
22
  var data1 = {
23
23
  method: 'POST',
24
24
  url: {
25
- path: '/media-playground/api/token/tenant',
25
+ path: '/token/tenant',
26
26
  query: {
27
27
  collection: context().tenantContext.collectionName,
28
28
  environment: ''
@@ -37,7 +37,7 @@ var tenantAuth = function tenantAuth(context) {
37
37
  var data2 = {
38
38
  method: 'GET',
39
39
  url: {
40
- path: '/media-playground/api/token/tenant',
40
+ path: '/token/tenant',
41
41
  query: {
42
42
  collection: context().tenantContext.collectionName,
43
43
  environment: ''
@@ -11,12 +11,12 @@ var _database = require("../database");
11
11
 
12
12
  function createMediaPlaygroundRouter() {
13
13
  var router = new _kakapo.Router({
14
- host: 'https://api-private.dev.atlassian.com',
14
+ host: 'https://media-playground.dev.atl-paas.net',
15
15
  requestDelay: 10
16
16
  }, {
17
17
  strategies: ['fetch']
18
18
  });
19
- router.get('/media-playground/api/token/user/impersonation', _database.userAuthProvider);
20
- router.post('/media-playground/api/token/tenant', _database.tenantAuthProvider);
19
+ router.get('/api/token/user/impersonation', _database.userAuthProvider);
20
+ router.post('/token/tenant', _database.tenantAuthProvider);
21
21
  return router;
22
22
  }
@@ -32,10 +32,9 @@ var userAuthProvider = function userAuthProvider() {
32
32
  return userAuthProviderPromiseCache;
33
33
  }
34
34
 
35
- var url = 'https://api-private.dev.atlassian.com/media-playground/api/token/user/impersonation';
35
+ var url = 'https://media-playground.dev.atl-paas.net/api/token/user/impersonation';
36
36
  userAuthProviderPromiseCache = fetch(url, {
37
- method: 'GET',
38
- credentials: 'include'
37
+ method: 'GET'
39
38
  }).then(function (response) {
40
39
  return (// We leverage the fact, that our internal /toke/tenant API returns data in the same format as Auth
41
40
  response.json()
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "@atlaskit/media-test-helpers",
3
- "version": "28.8.0"
3
+ "version": "28.8.1"
4
4
  }
@@ -1,6 +1,6 @@
1
1
  import { defaultCollectionName } from './collectionNames';
2
2
  const cachedAuths = {};
3
- const authProviderBaseURL = 'https://api-private.dev.atlassian.com/media-playground/api';
3
+ const authProviderBaseURL = 'https://media-playground.dev.atl-paas.net/';
4
4
  export class StoryBookAuthProvider {
5
5
  static create(isAsapEnvironment, access) {
6
6
  const loadTenatAuth = async collectionName => {
@@ -10,7 +10,6 @@ export class StoryBookAuthProvider {
10
10
  headers.append('Accept', 'text/plain, */*; q=0.01');
11
11
  const config = {
12
12
  method: 'POST',
13
- credentials: 'include',
14
13
  headers,
15
14
  body: access ? JSON.stringify({
16
15
  access
@@ -9,7 +9,7 @@ const access = {
9
9
  'urn:filestore:collection:mediapicker-test': ['read', 'insert']
10
10
  };
11
11
  export const getAuthFromContextProvider = async () => {
12
- const url = 'https://api-private.dev.atlassian.com/media-playground/api/token/tenant?environment=asap';
12
+ const url = 'https://media-playground.dev.atl-paas.net/token/tenant?environment=asap';
13
13
  const body = JSON.stringify({
14
14
  access
15
15
  });
@@ -19,8 +19,7 @@ export const getAuthFromContextProvider = async () => {
19
19
  const response = await fetch(url, {
20
20
  method: 'POST',
21
21
  body,
22
- headers,
23
- credentials: 'include'
22
+ headers
24
23
  });
25
24
  return response.json();
26
25
  };
@@ -22,7 +22,7 @@ const accessUrns = {
22
22
  };
23
23
 
24
24
  const requestAuthProvider = async (authEnvironment, collectionName) => {
25
- const url = `https://api-private.dev.atlassian.com/media-playground/api/token/tenant?environment=${authEnvironment}`;
25
+ const url = `https://media-playground.dev.atl-paas.net/token/tenant?environment=${authEnvironment}`;
26
26
  const body = JSON.stringify({
27
27
  access: accessUrns[collectionName] || {}
28
28
  });
@@ -32,8 +32,7 @@ const requestAuthProvider = async (authEnvironment, collectionName) => {
32
32
  const response = await fetch(url, {
33
33
  method: 'POST',
34
34
  body,
35
- headers,
36
- credentials: 'include'
35
+ headers
37
36
  }); // We leverage the fact, that our internal /toke/tenant API returns data in the same format as Auth
38
37
 
39
38
  return response.json();
@@ -12,7 +12,7 @@ export const tenantAuth = context => (req, res) => {
12
12
  const data1 = {
13
13
  method: 'POST',
14
14
  url: {
15
- path: '/media-playground/api/token/tenant',
15
+ path: '/token/tenant',
16
16
  query: {
17
17
  collection: context().tenantContext.collectionName,
18
18
  environment: ''
@@ -27,7 +27,7 @@ export const tenantAuth = context => (req, res) => {
27
27
  const data2 = {
28
28
  method: 'GET',
29
29
  url: {
30
- path: '/media-playground/api/token/tenant',
30
+ path: '/token/tenant',
31
31
  query: {
32
32
  collection: context().tenantContext.collectionName,
33
33
  environment: ''
@@ -2,12 +2,12 @@ import { Router } from 'kakapo';
2
2
  import { userAuthProvider, tenantAuthProvider } from '../database';
3
3
  export function createMediaPlaygroundRouter() {
4
4
  const router = new Router({
5
- host: 'https://api-private.dev.atlassian.com',
5
+ host: 'https://media-playground.dev.atl-paas.net',
6
6
  requestDelay: 10
7
7
  }, {
8
8
  strategies: ['fetch']
9
9
  });
10
- router.get('/media-playground/api/token/user/impersonation', userAuthProvider);
11
- router.post('/media-playground/api/token/tenant', tenantAuthProvider);
10
+ router.get('/api/token/user/impersonation', userAuthProvider);
11
+ router.post('/token/tenant', tenantAuthProvider);
12
12
  return router;
13
13
  }
@@ -15,10 +15,9 @@ export const userAuthProvider = () => {
15
15
  return userAuthProviderPromiseCache;
16
16
  }
17
17
 
18
- const url = 'https://api-private.dev.atlassian.com/media-playground/api/token/user/impersonation';
18
+ const url = 'https://media-playground.dev.atl-paas.net/api/token/user/impersonation';
19
19
  userAuthProviderPromiseCache = fetch(url, {
20
- method: 'GET',
21
- credentials: 'include'
20
+ method: 'GET'
22
21
  }).then(response => // We leverage the fact, that our internal /toke/tenant API returns data in the same format as Auth
23
22
  response.json());
24
23
  return userAuthProviderPromiseCache;
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "@atlaskit/media-test-helpers",
3
- "version": "28.8.0"
3
+ "version": "28.8.1"
4
4
  }
@@ -4,7 +4,7 @@ import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
4
4
  import _createClass from "@babel/runtime/helpers/createClass";
5
5
  import { defaultCollectionName } from './collectionNames';
6
6
  var cachedAuths = {};
7
- var authProviderBaseURL = 'https://api-private.dev.atlassian.com/media-playground/api';
7
+ var authProviderBaseURL = 'https://media-playground.dev.atl-paas.net/';
8
8
  export var StoryBookAuthProvider = /*#__PURE__*/function () {
9
9
  function StoryBookAuthProvider() {
10
10
  _classCallCheck(this, StoryBookAuthProvider);
@@ -26,7 +26,6 @@ export var StoryBookAuthProvider = /*#__PURE__*/function () {
26
26
  headers.append('Accept', 'text/plain, */*; q=0.01');
27
27
  config = {
28
28
  method: 'POST',
29
- credentials: 'include',
30
29
  headers: headers,
31
30
  body: access ? JSON.stringify({
32
31
  access: access
@@ -17,7 +17,7 @@ export var getAuthFromContextProvider = /*#__PURE__*/function () {
17
17
  while (1) {
18
18
  switch (_context.prev = _context.next) {
19
19
  case 0:
20
- url = 'https://api-private.dev.atlassian.com/media-playground/api/token/tenant?environment=asap';
20
+ url = 'https://media-playground.dev.atl-paas.net/token/tenant?environment=asap';
21
21
  body = JSON.stringify({
22
22
  access: access
23
23
  });
@@ -28,8 +28,7 @@ export var getAuthFromContextProvider = /*#__PURE__*/function () {
28
28
  return fetch(url, {
29
29
  method: 'POST',
30
30
  body: body,
31
- headers: headers,
32
- credentials: 'include'
31
+ headers: headers
33
32
  });
34
33
 
35
34
  case 7:
@@ -30,7 +30,7 @@ var requestAuthProvider = /*#__PURE__*/function () {
30
30
  while (1) {
31
31
  switch (_context.prev = _context.next) {
32
32
  case 0:
33
- url = "https://api-private.dev.atlassian.com/media-playground/api/token/tenant?environment=".concat(authEnvironment);
33
+ url = "https://media-playground.dev.atl-paas.net/token/tenant?environment=".concat(authEnvironment);
34
34
  body = JSON.stringify({
35
35
  access: accessUrns[collectionName] || {}
36
36
  });
@@ -41,8 +41,7 @@ var requestAuthProvider = /*#__PURE__*/function () {
41
41
  return fetch(url, {
42
42
  method: 'POST',
43
43
  body: body,
44
- headers: headers,
45
- credentials: 'include'
44
+ headers: headers
46
45
  });
47
46
 
48
47
  case 7:
@@ -13,7 +13,7 @@ export var tenantAuth = function tenantAuth(context) {
13
13
  var data1 = {
14
14
  method: 'POST',
15
15
  url: {
16
- path: '/media-playground/api/token/tenant',
16
+ path: '/token/tenant',
17
17
  query: {
18
18
  collection: context().tenantContext.collectionName,
19
19
  environment: ''
@@ -28,7 +28,7 @@ export var tenantAuth = function tenantAuth(context) {
28
28
  var data2 = {
29
29
  method: 'GET',
30
30
  url: {
31
- path: '/media-playground/api/token/tenant',
31
+ path: '/token/tenant',
32
32
  query: {
33
33
  collection: context().tenantContext.collectionName,
34
34
  environment: ''
@@ -2,12 +2,12 @@ import { Router } from 'kakapo';
2
2
  import { userAuthProvider, tenantAuthProvider } from '../database';
3
3
  export function createMediaPlaygroundRouter() {
4
4
  var router = new Router({
5
- host: 'https://api-private.dev.atlassian.com',
5
+ host: 'https://media-playground.dev.atl-paas.net',
6
6
  requestDelay: 10
7
7
  }, {
8
8
  strategies: ['fetch']
9
9
  });
10
- router.get('/media-playground/api/token/user/impersonation', userAuthProvider);
11
- router.post('/media-playground/api/token/tenant', tenantAuthProvider);
10
+ router.get('/api/token/user/impersonation', userAuthProvider);
11
+ router.post('/token/tenant', tenantAuthProvider);
12
12
  return router;
13
13
  }
@@ -15,10 +15,9 @@ export var userAuthProvider = function userAuthProvider() {
15
15
  return userAuthProviderPromiseCache;
16
16
  }
17
17
 
18
- var url = 'https://api-private.dev.atlassian.com/media-playground/api/token/user/impersonation';
18
+ var url = 'https://media-playground.dev.atl-paas.net/api/token/user/impersonation';
19
19
  userAuthProviderPromiseCache = fetch(url, {
20
- method: 'GET',
21
- credentials: 'include'
20
+ method: 'GET'
22
21
  }).then(function (response) {
23
22
  return (// We leverage the fact, that our internal /toke/tenant API returns data in the same format as Auth
24
23
  response.json()
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "@atlaskit/media-test-helpers",
3
- "version": "28.8.0"
3
+ "version": "28.8.1"
4
4
  }
@@ -2,4 +2,4 @@ import { MediaFeatureFlags } from '@atlaskit/media-common';
2
2
  export declare const setLocalFeatureFlag: (key: keyof MediaFeatureFlags, value: number | boolean | string | Object) => void;
3
3
  export declare const clearLocalFeatureFlag: (key: keyof MediaFeatureFlags) => void;
4
4
  export declare const clearAllLocalFeatureFlags: () => void;
5
- export declare const getMediaFeatureFlags: (filter?: ("newCardExperience" | "zipPreviews" | "captions" | "folderUploads" | "codeViewer" | "poll_intervalMs" | "poll_maxAttempts" | "poll_backoffFactor" | "poll_maxIntervalMs")[] | undefined) => MediaFeatureFlags;
5
+ export declare const getMediaFeatureFlags: (filter?: ("newCardExperience" | "zipPreviews" | "captions" | "folderUploads" | "codeViewer")[] | undefined) => MediaFeatureFlags;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/media-test-helpers",
3
- "version": "28.8.0",
3
+ "version": "28.8.1",
4
4
  "description": "Collection of test helpers used in media component stories and specs",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -23,11 +23,11 @@
23
23
  "@atlaskit/checkbox": "^12.2.0",
24
24
  "@atlaskit/icon": "^21.9.0",
25
25
  "@atlaskit/locale": "^2.1.0",
26
- "@atlaskit/media-client": "^14.2.0",
26
+ "@atlaskit/media-client": "^14.3.0",
27
27
  "@atlaskit/media-common": "^2.9.0",
28
28
  "@atlaskit/media-core": "^32.2.0",
29
29
  "@atlaskit/media-picker": "^58.1.0",
30
- "@atlaskit/media-ui": "^17.0.0",
30
+ "@atlaskit/media-ui": "^17.1.0",
31
31
  "@atlaskit/popup": "^1.1.0",
32
32
  "@atlaskit/textfield": "^5.0.1",
33
33
  "@atlaskit/tooltip": "^17.5.0",