@atlaskit/media-test-helpers 41.1.0 → 42.0.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/AGENTS.md +58 -0
- package/CHANGELOG.md +37 -0
- package/I18nWrapper/package.json +1 -8
- package/MockGlobalImage/package.json +1 -8
- package/authProvider/package.json +1 -8
- package/await-error/package.json +1 -8
- package/clipboardEventMocks/package.json +1 -8
- package/collectionNames/package.json +1 -8
- package/createFileState/package.json +1 -8
- package/createMouseEvent/package.json +1 -8
- package/createTouchEvent/package.json +1 -8
- package/dist/cjs/authProvider.js +6 -6
- package/dist/cjs/await-error.js +13 -12
- package/dist/cjs/featureFlagsWrapper/dropdown.js +1 -2
- package/dist/cjs/fileStateFactory/factory/factory.js +7 -7
- package/dist/cjs/fileStateFactory/fileSimulation/simulations.js +66 -66
- package/dist/cjs/getAuthFromContextProvider.js +4 -4
- package/dist/cjs/getMediaAuthProvider.js +4 -4
- package/dist/cjs/mediaPickerAuthProvider.js +4 -4
- package/dist/cjs/mocks/routers/api-router.js +11 -11
- package/dist/cjs/waitUntil.js +2 -2
- package/dist/es2019/featureFlagsWrapper/dropdown.js +1 -2
- package/dist/esm/authProvider.js +6 -6
- package/dist/esm/await-error.js +13 -12
- package/dist/esm/featureFlagsWrapper/dropdown.js +1 -2
- package/dist/esm/fileStateFactory/factory/factory.js +7 -7
- package/dist/esm/fileStateFactory/fileSimulation/simulations.js +66 -66
- package/dist/esm/getAuthFromContextProvider.js +4 -4
- package/dist/esm/getMediaAuthProvider.js +4 -4
- package/dist/esm/mediaPickerAuthProvider.js +4 -4
- package/dist/esm/mocks/routers/api-router.js +11 -11
- package/dist/esm/waitUntil.js +2 -2
- package/docs-content-tabs/package.json +1 -8
- package/exampleMediaFeatureFlags/package.json +1 -8
- package/exampleMediaItems/package.json +1 -8
- package/factory/package.json +1 -8
- package/fakeI18n/package.json +1 -8
- package/fakeMediaClient/package.json +1 -8
- package/featureFlagsWrapper/package.json +1 -8
- package/fileReader/package.json +1 -8
- package/fileSimulation/package.json +1 -8
- package/flushPromises/package.json +1 -8
- package/getAuthFromContextProvider/package.json +1 -8
- package/getMediaAuthProvider/package.json +1 -8
- package/globalEventEmitterListeners/package.json +1 -8
- package/helpers/package.json +1 -8
- package/images/package.json +1 -8
- package/jestHelpers/package.json +1 -8
- package/keyboardEventWithKeyCode/package.json +1 -8
- package/media-mock/package.json +1 -8
- package/mediaBaseURLS/package.json +1 -8
- package/mediaClientProvider/package.json +1 -8
- package/mediaPickerAuthProvider/package.json +1 -8
- package/mock-data-utils/package.json +1 -8
- package/mockCanvas/package.json +1 -8
- package/mockData/package.json +1 -8
- package/mockLoadImage/package.json +1 -8
- package/nextTick/package.json +1 -8
- package/package.json +22 -33
- package/renderWithIntl/package.json +1 -8
- package/simulations/package.json +1 -8
- package/smallImageURI/package.json +1 -8
- package/smallTransparentImageURI/package.json +1 -8
- package/smart-card-state/package.json +1 -8
- package/story-list/package.json +1 -8
- package/story-styles/package.json +1 -8
- package/tallImageURI/package.json +1 -8
- package/timeoutPromise/package.json +1 -8
- package/ufoLogger/package.json +1 -8
- package/utils/package.json +1 -8
- package/videoPreviewURI/package.json +1 -8
- package/videoURI/package.json +1 -8
- package/vr-test-small-image/package.json +1 -8
- package/waitUntil/package.json +1 -8
- package/wideImageURI/package.json +1 -8
- package/wideTransparentImageURI/package.json +1 -8
- package/dist/types-ts4.5/I18nWrapper.d.ts +0 -10
- package/dist/types-ts4.5/MockGlobalImage.d.ts +0 -2
- package/dist/types-ts4.5/authProvider.d.ts +0 -6
- package/dist/types-ts4.5/await-error.d.ts +0 -1
- package/dist/types-ts4.5/clipboardEventMocks.d.ts +0 -122
- package/dist/types-ts4.5/collectionNames.d.ts +0 -5
- package/dist/types-ts4.5/createMouseEvent.d.ts +0 -8
- package/dist/types-ts4.5/createTouchEvent.d.ts +0 -4
- package/dist/types-ts4.5/dataURIs/smallImageURI.d.ts +0 -1
- package/dist/types-ts4.5/dataURIs/smallTransparentImageURI.d.ts +0 -1
- package/dist/types-ts4.5/dataURIs/tallImageURI.d.ts +0 -1
- package/dist/types-ts4.5/dataURIs/videoPreviewURI.d.ts +0 -1
- package/dist/types-ts4.5/dataURIs/videoURI.d.ts +0 -1
- package/dist/types-ts4.5/dataURIs/vr_test_small_image.d.ts +0 -1
- package/dist/types-ts4.5/dataURIs/wideImageURI.d.ts +0 -1
- package/dist/types-ts4.5/dataURIs/wideTransparentImageURI.d.ts +0 -1
- package/dist/types-ts4.5/docs-content-tabs.d.ts +0 -14
- package/dist/types-ts4.5/example-mediaFeatureFlags.d.ts +0 -2
- package/dist/types-ts4.5/exampleMediaItems.d.ts +0 -56
- package/dist/types-ts4.5/fakeI18n.d.ts +0 -1
- package/dist/types-ts4.5/fakeMediaClient.d.ts +0 -4
- package/dist/types-ts4.5/featureFlagsWrapper/dropdown.d.ts +0 -6
- package/dist/types-ts4.5/featureFlagsWrapper/helpers.d.ts +0 -5
- package/dist/types-ts4.5/featureFlagsWrapper/index.d.ts +0 -5
- package/dist/types-ts4.5/fileReader.d.ts +0 -19
- package/dist/types-ts4.5/fileStateFactory/factory/createFileState.d.ts +0 -10
- package/dist/types-ts4.5/fileStateFactory/factory/factory.d.ts +0 -45
- package/dist/types-ts4.5/fileStateFactory/factory/helpers.d.ts +0 -7
- package/dist/types-ts4.5/fileStateFactory/factory/index.d.ts +0 -4
- package/dist/types-ts4.5/fileStateFactory/fileSimulation/fileSimulation.d.ts +0 -18
- package/dist/types-ts4.5/fileStateFactory/fileSimulation/index.d.ts +0 -4
- package/dist/types-ts4.5/fileStateFactory/fileSimulation/simulations.d.ts +0 -36
- package/dist/types-ts4.5/fileStateFactory/index.d.ts +0 -8
- package/dist/types-ts4.5/flushPromises.d.ts +0 -2
- package/dist/types-ts4.5/getAuthFromContextProvider.d.ts +0 -1
- package/dist/types-ts4.5/getJest.d.ts +0 -15
- package/dist/types-ts4.5/getMediaAuthProvider.d.ts +0 -3
- package/dist/types-ts4.5/globalEventEmitterListeners.d.ts +0 -1
- package/dist/types-ts4.5/images.d.ts +0 -7
- package/dist/types-ts4.5/index.d.ts +0 -48
- package/dist/types-ts4.5/jestHelpers.d.ts +0 -12
- package/dist/types-ts4.5/keyboardEventWithKeyCode.d.ts +0 -2
- package/dist/types-ts4.5/mediaBaseURLS.d.ts +0 -2
- package/dist/types-ts4.5/mediaClientProvider.d.ts +0 -23
- package/dist/types-ts4.5/mediaPickerAuthProvider.d.ts +0 -3
- package/dist/types-ts4.5/mockCanvas.d.ts +0 -10
- package/dist/types-ts4.5/mockData/handlers/copyWithToken.d.ts +0 -3
- package/dist/types-ts4.5/mockData/handlers/getFile.d.ts +0 -3
- package/dist/types-ts4.5/mockData/handlers/getFileImage.d.ts +0 -3
- package/dist/types-ts4.5/mockData/handlers/index.d.ts +0 -5
- package/dist/types-ts4.5/mockData/handlers/tenantAuth.d.ts +0 -3
- package/dist/types-ts4.5/mockData/handlers/userCollectionFetch.d.ts +0 -3
- package/dist/types-ts4.5/mockData/index.d.ts +0 -50
- package/dist/types-ts4.5/mockData/matchers.d.ts +0 -7
- package/dist/types-ts4.5/mockData/staticCommon.d.ts +0 -4
- package/dist/types-ts4.5/mockData/utils.d.ts +0 -4
- package/dist/types-ts4.5/mockLoadImage.d.ts +0 -4
- package/dist/types-ts4.5/mocks/database/chunk.d.ts +0 -6
- package/dist/types-ts4.5/mocks/database/collection-item.d.ts +0 -29
- package/dist/types-ts4.5/mocks/database/collection.d.ts +0 -5
- package/dist/types-ts4.5/mocks/database/index.d.ts +0 -21
- package/dist/types-ts4.5/mocks/database/upload.d.ts +0 -6
- package/dist/types-ts4.5/mocks/fileAndDirectoriesUtils.d.ts +0 -16
- package/dist/types-ts4.5/mocks/media-mock.d.ts +0 -36
- package/dist/types-ts4.5/mocks/routers/api-router.d.ts +0 -3
- package/dist/types-ts4.5/mocks/routers/index.d.ts +0 -2
- package/dist/types-ts4.5/mocks/routers/media-playground-router.d.ts +0 -3
- package/dist/types-ts4.5/mocks/websockets/index.d.ts +0 -3
- package/dist/types-ts4.5/mocks/websockets/messages.d.ts +0 -34
- package/dist/types-ts4.5/mocks/websockets/remote-upload-server.d.ts +0 -14
- package/dist/types-ts4.5/mocks/websockets/types.d.ts +0 -4
- package/dist/types-ts4.5/nextTick.d.ts +0 -2
- package/dist/types-ts4.5/renderWithIntl.d.ts +0 -7
- package/dist/types-ts4.5/smart-card-state.d.ts +0 -4
- package/dist/types-ts4.5/story-list.d.ts +0 -13
- package/dist/types-ts4.5/story-styles.d.ts +0 -7
- package/dist/types-ts4.5/timeoutPromise.d.ts +0 -1
- package/dist/types-ts4.5/ufoLogger.d.ts +0 -5
- package/dist/types-ts4.5/utils/index.d.ts +0 -2
- package/dist/types-ts4.5/utils/logging.d.ts +0 -23
- package/dist/types-ts4.5/utils/mockData.d.ts +0 -11
- package/dist/types-ts4.5/waitUntil.d.ts +0 -2
|
@@ -11,16 +11,16 @@ export var simulateProcessed = function simulateProcessed() {
|
|
|
11
11
|
return {
|
|
12
12
|
simulation: function () {
|
|
13
13
|
var _simulation = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(factory) {
|
|
14
|
-
return _regeneratorRuntime.wrap(function
|
|
14
|
+
return _regeneratorRuntime.wrap(function (_context) {
|
|
15
15
|
while (1) switch (_context.prev = _context.next) {
|
|
16
16
|
case 0:
|
|
17
|
-
_context.next =
|
|
17
|
+
_context.next = 1;
|
|
18
18
|
return sleep(speed);
|
|
19
|
-
case
|
|
19
|
+
case 1:
|
|
20
20
|
factory.next('processed', {
|
|
21
21
|
withRemotePreview: withRemotePreview
|
|
22
22
|
});
|
|
23
|
-
case
|
|
23
|
+
case 2:
|
|
24
24
|
case "end":
|
|
25
25
|
return _context.stop();
|
|
26
26
|
}
|
|
@@ -41,20 +41,20 @@ export var simulateProcessing = function simulateProcessing() {
|
|
|
41
41
|
description: "File is processing, then ".concat(suceeded ? 'succeeds' : 'fails', " ").concat(withRemotePreview ? 'with' : 'without', " remote preview"),
|
|
42
42
|
simulation: function () {
|
|
43
43
|
var _simulation2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(factory) {
|
|
44
|
-
return _regeneratorRuntime.wrap(function
|
|
44
|
+
return _regeneratorRuntime.wrap(function (_context2) {
|
|
45
45
|
while (1) switch (_context2.prev = _context2.next) {
|
|
46
46
|
case 0:
|
|
47
|
-
_context2.next =
|
|
47
|
+
_context2.next = 1;
|
|
48
48
|
return sleep(speed);
|
|
49
|
-
case
|
|
49
|
+
case 1:
|
|
50
50
|
factory.next('processing');
|
|
51
|
-
_context2.next =
|
|
51
|
+
_context2.next = 2;
|
|
52
52
|
return sleep(speed);
|
|
53
|
-
case
|
|
53
|
+
case 2:
|
|
54
54
|
factory.next('processing');
|
|
55
|
-
_context2.next =
|
|
55
|
+
_context2.next = 3;
|
|
56
56
|
return sleep(speed * 0.5);
|
|
57
|
-
case
|
|
57
|
+
case 3:
|
|
58
58
|
if (!suceeded) {
|
|
59
59
|
factory.next('failed-processing', {
|
|
60
60
|
withRemotePreview: withRemotePreview
|
|
@@ -64,7 +64,7 @@ export var simulateProcessing = function simulateProcessing() {
|
|
|
64
64
|
withRemotePreview: withRemotePreview
|
|
65
65
|
});
|
|
66
66
|
}
|
|
67
|
-
case
|
|
67
|
+
case 4:
|
|
68
68
|
case "end":
|
|
69
69
|
return _context2.stop();
|
|
70
70
|
}
|
|
@@ -82,14 +82,14 @@ export var simulateImmediateFailProcessing = function simulateImmediateFailProce
|
|
|
82
82
|
description: 'The first sate is failed-processing with no preview',
|
|
83
83
|
simulation: function () {
|
|
84
84
|
var _simulation3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(factory) {
|
|
85
|
-
return _regeneratorRuntime.wrap(function
|
|
85
|
+
return _regeneratorRuntime.wrap(function (_context3) {
|
|
86
86
|
while (1) switch (_context3.prev = _context3.next) {
|
|
87
87
|
case 0:
|
|
88
|
-
_context3.next =
|
|
88
|
+
_context3.next = 1;
|
|
89
89
|
return sleep(speed);
|
|
90
|
-
case
|
|
90
|
+
case 1:
|
|
91
91
|
factory.next('failed-processing');
|
|
92
|
-
case
|
|
92
|
+
case 2:
|
|
93
93
|
case "end":
|
|
94
94
|
return _context3.stop();
|
|
95
95
|
}
|
|
@@ -109,49 +109,49 @@ export var simulateUpload = function simulateUpload(withLocalPreview) {
|
|
|
109
109
|
simulation: function () {
|
|
110
110
|
var _simulation4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(factory) {
|
|
111
111
|
var chunks, chunkUploadDelay, processingTime, uploadUpTo, index;
|
|
112
|
-
return _regeneratorRuntime.wrap(function
|
|
112
|
+
return _regeneratorRuntime.wrap(function (_context4) {
|
|
113
113
|
while (1) switch (_context4.prev = _context4.next) {
|
|
114
114
|
case 0:
|
|
115
115
|
chunks = 3;
|
|
116
116
|
chunkUploadDelay = 500;
|
|
117
117
|
processingTime = speed;
|
|
118
|
-
_context4.next =
|
|
118
|
+
_context4.next = 1;
|
|
119
119
|
return sleep(speed);
|
|
120
|
-
case
|
|
120
|
+
case 1:
|
|
121
121
|
factory.next('uploading', {
|
|
122
122
|
withLocalPreview: withLocalPreview
|
|
123
123
|
});
|
|
124
124
|
uploadUpTo = !suceeded ? chunks / 2 : chunks;
|
|
125
125
|
index = 0;
|
|
126
|
-
case
|
|
126
|
+
case 2:
|
|
127
127
|
if (!(index <= uploadUpTo)) {
|
|
128
|
-
_context4.next =
|
|
128
|
+
_context4.next = 4;
|
|
129
129
|
break;
|
|
130
130
|
}
|
|
131
131
|
factory.next('uploading', {
|
|
132
132
|
uploadProgress: index / chunks,
|
|
133
133
|
withLocalPreview: withLocalPreview
|
|
134
134
|
});
|
|
135
|
-
_context4.next =
|
|
135
|
+
_context4.next = 3;
|
|
136
136
|
return sleep(chunkUploadDelay);
|
|
137
|
-
case
|
|
137
|
+
case 3:
|
|
138
138
|
index++;
|
|
139
|
-
_context4.next =
|
|
139
|
+
_context4.next = 2;
|
|
140
140
|
break;
|
|
141
|
-
case
|
|
141
|
+
case 4:
|
|
142
142
|
if (!suceeded) {
|
|
143
143
|
factory.error(new Error('some-error'));
|
|
144
144
|
}
|
|
145
145
|
factory.next('processing', {
|
|
146
146
|
withLocalPreview: withLocalPreview
|
|
147
147
|
});
|
|
148
|
-
_context4.next =
|
|
148
|
+
_context4.next = 5;
|
|
149
149
|
return sleep(processingTime);
|
|
150
|
-
case
|
|
150
|
+
case 5:
|
|
151
151
|
factory.next('processed', {
|
|
152
152
|
withLocalPreview: withLocalPreview
|
|
153
153
|
});
|
|
154
|
-
case
|
|
154
|
+
case 6:
|
|
155
155
|
case "end":
|
|
156
156
|
return _context4.stop();
|
|
157
157
|
}
|
|
@@ -169,14 +169,14 @@ export var simulateErrorState = function simulateErrorState() {
|
|
|
169
169
|
description: 'File state is error',
|
|
170
170
|
simulation: function () {
|
|
171
171
|
var _simulation5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(factory) {
|
|
172
|
-
return _regeneratorRuntime.wrap(function
|
|
172
|
+
return _regeneratorRuntime.wrap(function (_context5) {
|
|
173
173
|
while (1) switch (_context5.prev = _context5.next) {
|
|
174
174
|
case 0:
|
|
175
|
-
_context5.next =
|
|
175
|
+
_context5.next = 1;
|
|
176
176
|
return sleep(speed);
|
|
177
|
-
case
|
|
177
|
+
case 1:
|
|
178
178
|
factory.next('error');
|
|
179
|
-
case
|
|
179
|
+
case 2:
|
|
180
180
|
case "end":
|
|
181
181
|
return _context5.stop();
|
|
182
182
|
}
|
|
@@ -194,14 +194,14 @@ export var simulateError = function simulateError() {
|
|
|
194
194
|
description: 'Subscription throws an error through the observer',
|
|
195
195
|
simulation: function () {
|
|
196
196
|
var _simulation6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6(factory) {
|
|
197
|
-
return _regeneratorRuntime.wrap(function
|
|
197
|
+
return _regeneratorRuntime.wrap(function (_context6) {
|
|
198
198
|
while (1) switch (_context6.prev = _context6.next) {
|
|
199
199
|
case 0:
|
|
200
|
-
_context6.next =
|
|
200
|
+
_context6.next = 1;
|
|
201
201
|
return sleep(speed);
|
|
202
|
-
case
|
|
202
|
+
case 1:
|
|
203
203
|
factory.error(new Error('error thrown from client'));
|
|
204
|
-
case
|
|
204
|
+
case 2:
|
|
205
205
|
case "end":
|
|
206
206
|
return _context6.stop();
|
|
207
207
|
}
|
|
@@ -225,28 +225,28 @@ export var simulateManyProcessed = function simulateManyProcessed() {
|
|
|
225
225
|
description: '',
|
|
226
226
|
simulation: function () {
|
|
227
227
|
var _simulation7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7(factory) {
|
|
228
|
-
return _regeneratorRuntime.wrap(function
|
|
228
|
+
return _regeneratorRuntime.wrap(function (_context7) {
|
|
229
229
|
while (1) switch (_context7.prev = _context7.next) {
|
|
230
230
|
case 0:
|
|
231
|
-
_context7.next =
|
|
231
|
+
_context7.next = 1;
|
|
232
232
|
return sleep(speed);
|
|
233
|
-
case
|
|
233
|
+
case 1:
|
|
234
234
|
factory.next('processed', {
|
|
235
235
|
withRemotePreview: withRemotePreview
|
|
236
236
|
});
|
|
237
|
-
_context7.next =
|
|
237
|
+
_context7.next = 2;
|
|
238
238
|
return sleep(speed);
|
|
239
|
-
case
|
|
239
|
+
case 2:
|
|
240
240
|
factory.next('processed', {
|
|
241
241
|
withRemotePreview: withRemotePreview
|
|
242
242
|
});
|
|
243
|
-
_context7.next =
|
|
243
|
+
_context7.next = 3;
|
|
244
244
|
return sleep(speed);
|
|
245
|
-
case
|
|
245
|
+
case 3:
|
|
246
246
|
factory.next('processed', {
|
|
247
247
|
withRemotePreview: withRemotePreview
|
|
248
248
|
});
|
|
249
|
-
case
|
|
249
|
+
case 4:
|
|
250
250
|
case "end":
|
|
251
251
|
return _context7.stop();
|
|
252
252
|
}
|
|
@@ -265,19 +265,19 @@ export var simulateEmptyDetails = function simulateEmptyDetails() {
|
|
|
265
265
|
simulation: function () {
|
|
266
266
|
var _simulation8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee8(factory) {
|
|
267
267
|
var emptyDetails;
|
|
268
|
-
return _regeneratorRuntime.wrap(function
|
|
268
|
+
return _regeneratorRuntime.wrap(function (_context8) {
|
|
269
269
|
while (1) switch (_context8.prev = _context8.next) {
|
|
270
270
|
case 0:
|
|
271
271
|
emptyDetails = {
|
|
272
272
|
createdAt: 1630986510989
|
|
273
273
|
};
|
|
274
|
-
_context8.next =
|
|
274
|
+
_context8.next = 1;
|
|
275
275
|
return sleep(speed);
|
|
276
|
-
case
|
|
276
|
+
case 1:
|
|
277
277
|
factory.next('processing', {
|
|
278
278
|
fileDetails: emptyDetails
|
|
279
279
|
});
|
|
280
|
-
case
|
|
280
|
+
case 2:
|
|
281
281
|
case "end":
|
|
282
282
|
return _context8.stop();
|
|
283
283
|
}
|
|
@@ -296,27 +296,27 @@ export var simulateUpdateFileId = function simulateUpdateFileId() {
|
|
|
296
296
|
simulation: function () {
|
|
297
297
|
var _simulation9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee9(factory, _ref) {
|
|
298
298
|
var updateIdentifier;
|
|
299
|
-
return _regeneratorRuntime.wrap(function
|
|
299
|
+
return _regeneratorRuntime.wrap(function (_context9) {
|
|
300
300
|
while (1) switch (_context9.prev = _context9.next) {
|
|
301
301
|
case 0:
|
|
302
302
|
updateIdentifier = _ref.updateIdentifier;
|
|
303
|
-
_context9.next =
|
|
303
|
+
_context9.next = 1;
|
|
304
304
|
return sleep(speed);
|
|
305
|
-
case
|
|
305
|
+
case 1:
|
|
306
306
|
factory.next('failed-processing');
|
|
307
|
-
_context9.next =
|
|
307
|
+
_context9.next = 2;
|
|
308
308
|
return sleep(speed);
|
|
309
|
-
case
|
|
309
|
+
case 2:
|
|
310
310
|
updateIdentifier('doc');
|
|
311
|
-
_context9.next =
|
|
311
|
+
_context9.next = 3;
|
|
312
312
|
return sleep(speed);
|
|
313
|
-
case
|
|
313
|
+
case 3:
|
|
314
314
|
factory.next('processing');
|
|
315
|
-
_context9.next =
|
|
315
|
+
_context9.next = 4;
|
|
316
316
|
return sleep(speed);
|
|
317
|
-
case
|
|
317
|
+
case 4:
|
|
318
318
|
factory.next('processed');
|
|
319
|
-
case
|
|
319
|
+
case 5:
|
|
320
320
|
case "end":
|
|
321
321
|
return _context9.stop();
|
|
322
322
|
}
|
|
@@ -334,7 +334,7 @@ export var simulateAlwaysLoading = function simulateAlwaysLoading() {
|
|
|
334
334
|
description: 'File state never fetched',
|
|
335
335
|
simulation: function () {
|
|
336
336
|
var _simulation0 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee0() {
|
|
337
|
-
return _regeneratorRuntime.wrap(function
|
|
337
|
+
return _regeneratorRuntime.wrap(function (_context0) {
|
|
338
338
|
while (1) switch (_context0.prev = _context0.next) {
|
|
339
339
|
case 0:
|
|
340
340
|
case "end":
|
|
@@ -354,20 +354,20 @@ export var simulateAlwaysProcessing = function simulateAlwaysProcessing() {
|
|
|
354
354
|
description: 'File state is permanently processing',
|
|
355
355
|
simulation: function () {
|
|
356
356
|
var _simulation1 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee1(factory) {
|
|
357
|
-
return _regeneratorRuntime.wrap(function
|
|
357
|
+
return _regeneratorRuntime.wrap(function (_context1) {
|
|
358
358
|
while (1) switch (_context1.prev = _context1.next) {
|
|
359
359
|
case 0:
|
|
360
|
-
_context1.next =
|
|
360
|
+
_context1.next = 1;
|
|
361
361
|
return sleep(speed);
|
|
362
|
-
case
|
|
362
|
+
case 1:
|
|
363
363
|
factory.next('processing');
|
|
364
|
-
_context1.next =
|
|
364
|
+
_context1.next = 2;
|
|
365
365
|
return sleep(speed);
|
|
366
|
-
case
|
|
366
|
+
case 2:
|
|
367
367
|
factory.next('processing');
|
|
368
|
-
_context1.next =
|
|
368
|
+
_context1.next = 3;
|
|
369
369
|
return sleep(speed * 0.5);
|
|
370
|
-
case
|
|
370
|
+
case 3:
|
|
371
371
|
case "end":
|
|
372
372
|
return _context1.stop();
|
|
373
373
|
}
|
|
@@ -13,7 +13,7 @@ var access = {
|
|
|
13
13
|
export var getAuthFromContextProvider = /*#__PURE__*/function () {
|
|
14
14
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
15
15
|
var url, body, headers, response;
|
|
16
|
-
return _regeneratorRuntime.wrap(function
|
|
16
|
+
return _regeneratorRuntime.wrap(function (_context) {
|
|
17
17
|
while (1) switch (_context.prev = _context.next) {
|
|
18
18
|
case 0:
|
|
19
19
|
url = 'https://media-playground.dev.atl-paas.net/token/tenant?environment=asap';
|
|
@@ -23,16 +23,16 @@ export var getAuthFromContextProvider = /*#__PURE__*/function () {
|
|
|
23
23
|
headers = new Headers();
|
|
24
24
|
headers.append('Content-Type', 'application/json; charset=utf-8');
|
|
25
25
|
headers.append('Accept', 'text/plain, */*; q=0.01');
|
|
26
|
-
_context.next =
|
|
26
|
+
_context.next = 1;
|
|
27
27
|
return fetch(url, {
|
|
28
28
|
method: 'POST',
|
|
29
29
|
body: body,
|
|
30
30
|
headers: headers
|
|
31
31
|
});
|
|
32
|
-
case
|
|
32
|
+
case 1:
|
|
33
33
|
response = _context.sent;
|
|
34
34
|
return _context.abrupt("return", response.json());
|
|
35
|
-
case
|
|
35
|
+
case 2:
|
|
36
36
|
case "end":
|
|
37
37
|
return _context.stop();
|
|
38
38
|
}
|
|
@@ -13,7 +13,7 @@ var access = {
|
|
|
13
13
|
export var requestMediaAuthProvider = /*#__PURE__*/function () {
|
|
14
14
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
15
15
|
var url, body, headers, response;
|
|
16
|
-
return _regeneratorRuntime.wrap(function
|
|
16
|
+
return _regeneratorRuntime.wrap(function (_context2) {
|
|
17
17
|
while (1) switch (_context2.prev = _context2.next) {
|
|
18
18
|
case 0:
|
|
19
19
|
url = "".concat(MEDIA_PLAYGROUND_BASE_URL, "/token/tenant?environment=asap");
|
|
@@ -23,16 +23,16 @@ export var requestMediaAuthProvider = /*#__PURE__*/function () {
|
|
|
23
23
|
headers = new Headers();
|
|
24
24
|
headers.append('Content-Type', 'application/json; charset=utf-8');
|
|
25
25
|
headers.append('Accept', 'text/plain, */*; q=0.01');
|
|
26
|
-
_context2.next =
|
|
26
|
+
_context2.next = 1;
|
|
27
27
|
return fetch(url, {
|
|
28
28
|
method: 'POST',
|
|
29
29
|
body: body,
|
|
30
30
|
headers: headers
|
|
31
31
|
});
|
|
32
|
-
case
|
|
32
|
+
case 1:
|
|
33
33
|
response = _context2.sent;
|
|
34
34
|
return _context2.abrupt("return", response.json());
|
|
35
|
-
case
|
|
35
|
+
case 2:
|
|
36
36
|
case "end":
|
|
37
37
|
return _context2.stop();
|
|
38
38
|
}
|
|
@@ -30,7 +30,7 @@ var requestAuthProvider = /*#__PURE__*/function () {
|
|
|
30
30
|
headers,
|
|
31
31
|
response,
|
|
32
32
|
_args = arguments;
|
|
33
|
-
return _regeneratorRuntime.wrap(function
|
|
33
|
+
return _regeneratorRuntime.wrap(function (_context) {
|
|
34
34
|
while (1) switch (_context.prev = _context.next) {
|
|
35
35
|
case 0:
|
|
36
36
|
env = _args.length > 2 && _args[2] !== undefined ? _args[2] : 'staging';
|
|
@@ -43,16 +43,16 @@ var requestAuthProvider = /*#__PURE__*/function () {
|
|
|
43
43
|
headers = new Headers();
|
|
44
44
|
headers.append('Content-Type', 'application/json; charset=utf-8');
|
|
45
45
|
headers.append('Accept', 'text/plain, */*; q=0.01');
|
|
46
|
-
_context.next =
|
|
46
|
+
_context.next = 1;
|
|
47
47
|
return fetch(url, {
|
|
48
48
|
method: 'POST',
|
|
49
49
|
body: body,
|
|
50
50
|
headers: headers
|
|
51
51
|
});
|
|
52
|
-
case
|
|
52
|
+
case 1:
|
|
53
53
|
response = _context.sent;
|
|
54
54
|
return _context.abrupt("return", response.json());
|
|
55
|
-
case
|
|
55
|
+
case 2:
|
|
56
56
|
case "end":
|
|
57
57
|
return _context.stop();
|
|
58
58
|
}
|
|
@@ -165,8 +165,8 @@ export function createApiRouter(isSlowServer, urlsReturnErrorsTo) {
|
|
|
165
165
|
});
|
|
166
166
|
router.get('/file/:fileId/image/metadata', /*#__PURE__*/function () {
|
|
167
167
|
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref5, database) {
|
|
168
|
-
var params, fileId, record, defaultDimensions, dimensions;
|
|
169
|
-
return _regeneratorRuntime.wrap(function
|
|
168
|
+
var params, fileId, record, defaultDimensions, dimensions, _t, _t2, _t3;
|
|
169
|
+
return _regeneratorRuntime.wrap(function (_context) {
|
|
170
170
|
while (1) switch (_context.prev = _context.next) {
|
|
171
171
|
case 0:
|
|
172
172
|
params = _ref5.params;
|
|
@@ -191,20 +191,20 @@ export function createApiRouter(isSlowServer, urlsReturnErrorsTo) {
|
|
|
191
191
|
};
|
|
192
192
|
});
|
|
193
193
|
}
|
|
194
|
-
|
|
195
|
-
_context.next =
|
|
194
|
+
_t = {};
|
|
195
|
+
_context.next = 1;
|
|
196
196
|
return dimensions;
|
|
197
|
-
case
|
|
198
|
-
|
|
199
|
-
|
|
197
|
+
case 1:
|
|
198
|
+
_t2 = _context.sent;
|
|
199
|
+
_t3 = {
|
|
200
200
|
pending: false,
|
|
201
|
-
preview:
|
|
202
|
-
original:
|
|
201
|
+
preview: _t,
|
|
202
|
+
original: _t2
|
|
203
203
|
};
|
|
204
204
|
return _context.abrupt("return", {
|
|
205
|
-
metadata:
|
|
205
|
+
metadata: _t3
|
|
206
206
|
});
|
|
207
|
-
case
|
|
207
|
+
case 2:
|
|
208
208
|
case "end":
|
|
209
209
|
return _context.stop();
|
|
210
210
|
}
|
package/dist/esm/waitUntil.js
CHANGED
|
@@ -8,7 +8,7 @@ function _waitUntil() {
|
|
|
8
8
|
var timeout,
|
|
9
9
|
maxRetries,
|
|
10
10
|
_args = arguments;
|
|
11
|
-
return _regeneratorRuntime.wrap(function
|
|
11
|
+
return _regeneratorRuntime.wrap(function (_context) {
|
|
12
12
|
while (1) switch (_context.prev = _context.next) {
|
|
13
13
|
case 0:
|
|
14
14
|
timeout = _args.length > 1 && _args[1] !== undefined ? _args[1] : 100;
|
|
@@ -27,7 +27,7 @@ function _waitUntil() {
|
|
|
27
27
|
};
|
|
28
28
|
_check(maxRetries);
|
|
29
29
|
}));
|
|
30
|
-
case
|
|
30
|
+
case 1:
|
|
31
31
|
case "end":
|
|
32
32
|
return _context.stop();
|
|
33
33
|
}
|
|
@@ -6,12 +6,5 @@
|
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"*.compiled.css"
|
|
8
8
|
],
|
|
9
|
-
"types": "../dist/types/docs-content-tabs.d.ts"
|
|
10
|
-
"typesVersions": {
|
|
11
|
-
">=4.5 <5.9": {
|
|
12
|
-
"*": [
|
|
13
|
-
"../dist/types-ts4.5/docs-content-tabs.d.ts"
|
|
14
|
-
]
|
|
15
|
-
}
|
|
16
|
-
}
|
|
9
|
+
"types": "../dist/types/docs-content-tabs.d.ts"
|
|
17
10
|
}
|
|
@@ -6,12 +6,5 @@
|
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"*.compiled.css"
|
|
8
8
|
],
|
|
9
|
-
"types": "../dist/types/example-mediaFeatureFlags.d.ts"
|
|
10
|
-
"typesVersions": {
|
|
11
|
-
">=4.5 <5.9": {
|
|
12
|
-
"*": [
|
|
13
|
-
"../dist/types-ts4.5/example-mediaFeatureFlags.d.ts"
|
|
14
|
-
]
|
|
15
|
-
}
|
|
16
|
-
}
|
|
9
|
+
"types": "../dist/types/example-mediaFeatureFlags.d.ts"
|
|
17
10
|
}
|
|
@@ -6,12 +6,5 @@
|
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"*.compiled.css"
|
|
8
8
|
],
|
|
9
|
-
"types": "../dist/types/exampleMediaItems.d.ts"
|
|
10
|
-
"typesVersions": {
|
|
11
|
-
">=4.5 <5.9": {
|
|
12
|
-
"*": [
|
|
13
|
-
"../dist/types-ts4.5/exampleMediaItems.d.ts"
|
|
14
|
-
]
|
|
15
|
-
}
|
|
16
|
-
}
|
|
9
|
+
"types": "../dist/types/exampleMediaItems.d.ts"
|
|
17
10
|
}
|
package/factory/package.json
CHANGED
|
@@ -6,12 +6,5 @@
|
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"*.compiled.css"
|
|
8
8
|
],
|
|
9
|
-
"types": "../dist/types/fileStateFactory/factory/factory.d.ts"
|
|
10
|
-
"typesVersions": {
|
|
11
|
-
">=4.5 <5.9": {
|
|
12
|
-
"*": [
|
|
13
|
-
"../dist/types-ts4.5/fileStateFactory/factory/factory.d.ts"
|
|
14
|
-
]
|
|
15
|
-
}
|
|
16
|
-
}
|
|
9
|
+
"types": "../dist/types/fileStateFactory/factory/factory.d.ts"
|
|
17
10
|
}
|
package/fakeI18n/package.json
CHANGED
|
@@ -6,12 +6,5 @@
|
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"*.compiled.css"
|
|
8
8
|
],
|
|
9
|
-
"types": "../dist/types/fakeMediaClient.d.ts"
|
|
10
|
-
"typesVersions": {
|
|
11
|
-
">=4.5 <5.9": {
|
|
12
|
-
"*": [
|
|
13
|
-
"../dist/types-ts4.5/fakeMediaClient.d.ts"
|
|
14
|
-
]
|
|
15
|
-
}
|
|
16
|
-
}
|
|
9
|
+
"types": "../dist/types/fakeMediaClient.d.ts"
|
|
17
10
|
}
|
|
@@ -6,12 +6,5 @@
|
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"*.compiled.css"
|
|
8
8
|
],
|
|
9
|
-
"types": "../dist/types/featureFlagsWrapper/index.d.ts"
|
|
10
|
-
"typesVersions": {
|
|
11
|
-
">=4.5 <5.9": {
|
|
12
|
-
"*": [
|
|
13
|
-
"../dist/types-ts4.5/featureFlagsWrapper/index.d.ts"
|
|
14
|
-
]
|
|
15
|
-
}
|
|
16
|
-
}
|
|
9
|
+
"types": "../dist/types/featureFlagsWrapper/index.d.ts"
|
|
17
10
|
}
|
package/fileReader/package.json
CHANGED
|
@@ -6,12 +6,5 @@
|
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"*.compiled.css"
|
|
8
8
|
],
|
|
9
|
-
"types": "../dist/types/fileStateFactory/fileSimulation/fileSimulation.d.ts"
|
|
10
|
-
"typesVersions": {
|
|
11
|
-
">=4.5 <5.9": {
|
|
12
|
-
"*": [
|
|
13
|
-
"../dist/types-ts4.5/fileStateFactory/fileSimulation/fileSimulation.d.ts"
|
|
14
|
-
]
|
|
15
|
-
}
|
|
16
|
-
}
|
|
9
|
+
"types": "../dist/types/fileStateFactory/fileSimulation/fileSimulation.d.ts"
|
|
17
10
|
}
|
|
@@ -6,12 +6,5 @@
|
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"*.compiled.css"
|
|
8
8
|
],
|
|
9
|
-
"types": "../dist/types/getAuthFromContextProvider.d.ts"
|
|
10
|
-
"typesVersions": {
|
|
11
|
-
">=4.5 <5.9": {
|
|
12
|
-
"*": [
|
|
13
|
-
"../dist/types-ts4.5/getAuthFromContextProvider.d.ts"
|
|
14
|
-
]
|
|
15
|
-
}
|
|
16
|
-
}
|
|
9
|
+
"types": "../dist/types/getAuthFromContextProvider.d.ts"
|
|
17
10
|
}
|
|
@@ -6,12 +6,5 @@
|
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"*.compiled.css"
|
|
8
8
|
],
|
|
9
|
-
"types": "../dist/types/getMediaAuthProvider.d.ts"
|
|
10
|
-
"typesVersions": {
|
|
11
|
-
">=4.5 <5.9": {
|
|
12
|
-
"*": [
|
|
13
|
-
"../dist/types-ts4.5/getMediaAuthProvider.d.ts"
|
|
14
|
-
]
|
|
15
|
-
}
|
|
16
|
-
}
|
|
9
|
+
"types": "../dist/types/getMediaAuthProvider.d.ts"
|
|
17
10
|
}
|
|
@@ -6,12 +6,5 @@
|
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"*.compiled.css"
|
|
8
8
|
],
|
|
9
|
-
"types": "../dist/types/globalEventEmitterListeners.d.ts"
|
|
10
|
-
"typesVersions": {
|
|
11
|
-
">=4.5 <5.9": {
|
|
12
|
-
"*": [
|
|
13
|
-
"../dist/types-ts4.5/globalEventEmitterListeners.d.ts"
|
|
14
|
-
]
|
|
15
|
-
}
|
|
16
|
-
}
|
|
9
|
+
"types": "../dist/types/globalEventEmitterListeners.d.ts"
|
|
17
10
|
}
|
package/helpers/package.json
CHANGED
|
@@ -6,12 +6,5 @@
|
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"*.compiled.css"
|
|
8
8
|
],
|
|
9
|
-
"types": "../dist/types/fileStateFactory/factory/helpers.d.ts"
|
|
10
|
-
"typesVersions": {
|
|
11
|
-
">=4.5 <5.9": {
|
|
12
|
-
"*": [
|
|
13
|
-
"../dist/types-ts4.5/fileStateFactory/factory/helpers.d.ts"
|
|
14
|
-
]
|
|
15
|
-
}
|
|
16
|
-
}
|
|
9
|
+
"types": "../dist/types/fileStateFactory/factory/helpers.d.ts"
|
|
17
10
|
}
|