@atlaskit/media-client 20.1.0 → 20.2.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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/media-client
2
2
 
3
+ ## 20.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`0e2981295ce`](https://bitbucket.org/atlassian/atlassian-frontend/commits/0e2981295ce) - Media Client accepts a feature flags object in the upload method overriding internal flags
8
+
3
9
  ## 20.1.0
4
10
 
5
11
  ### Minor Changes
@@ -484,8 +484,8 @@ var FileFetcherImpl = /*#__PURE__*/function () {
484
484
  }
485
485
  }, {
486
486
  key: "upload",
487
- value: function upload(file, controller, uploadableFileUpfrontIds, traceContext) {
488
- var shouldAlwaysFetchFileState = (0, _mediaCommon.getMediaFeatureFlag)('fetchFileStateAfterUpload', this.featureFlags);
487
+ value: function upload(file, controller, uploadableFileUpfrontIds, traceContext, featureFlags) {
488
+ var shouldAlwaysFetchFileState = (0, _mediaCommon.getMediaFeatureFlag)('fetchFileStateAfterUpload', featureFlags || this.featureFlags);
489
489
  if (shouldAlwaysFetchFileState) {
490
490
  return this.uploadAwlaysPullFileStates(file, controller, uploadableFileUpfrontIds, traceContext);
491
491
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/media-client",
3
- "version": "20.1.0",
3
+ "version": "20.2.0",
4
4
  "sideEffects": false
5
5
  }
@@ -371,8 +371,8 @@ export class FileFetcherImpl {
371
371
  }
372
372
  return fromObservable(subject);
373
373
  }
374
- upload(file, controller, uploadableFileUpfrontIds, traceContext) {
375
- const shouldAlwaysFetchFileState = getMediaFeatureFlag('fetchFileStateAfterUpload', this.featureFlags);
374
+ upload(file, controller, uploadableFileUpfrontIds, traceContext, featureFlags) {
375
+ const shouldAlwaysFetchFileState = getMediaFeatureFlag('fetchFileStateAfterUpload', featureFlags || this.featureFlags);
376
376
  if (shouldAlwaysFetchFileState) {
377
377
  return this.uploadAwlaysPullFileStates(file, controller, uploadableFileUpfrontIds, traceContext);
378
378
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/media-client",
3
- "version": "20.1.0",
3
+ "version": "20.2.0",
4
4
  "sideEffects": false
5
5
  }
@@ -468,8 +468,8 @@ export var FileFetcherImpl = /*#__PURE__*/function () {
468
468
  }
469
469
  }, {
470
470
  key: "upload",
471
- value: function upload(file, controller, uploadableFileUpfrontIds, traceContext) {
472
- var shouldAlwaysFetchFileState = getMediaFeatureFlag('fetchFileStateAfterUpload', this.featureFlags);
471
+ value: function upload(file, controller, uploadableFileUpfrontIds, traceContext, featureFlags) {
472
+ var shouldAlwaysFetchFileState = getMediaFeatureFlag('fetchFileStateAfterUpload', featureFlags || this.featureFlags);
473
473
  if (shouldAlwaysFetchFileState) {
474
474
  return this.uploadAwlaysPullFileStates(file, controller, uploadableFileUpfrontIds, traceContext);
475
475
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/media-client",
3
- "version": "20.1.0",
3
+ "version": "20.2.0",
4
4
  "sideEffects": false
5
5
  }
@@ -32,7 +32,7 @@ export interface FileFetcher {
32
32
  getFileState(id: string, options?: GetFileOptions): MediaSubscribable<FileState>;
33
33
  getArtifactURL(artifacts: MediaFileArtifacts, artifactName: keyof MediaFileArtifacts, collectionName?: string): Promise<string>;
34
34
  touchFiles(descriptors: TouchFileDescriptor[], collection?: string, traceContext?: MediaTraceContext): Promise<TouchedFiles>;
35
- upload(file: UploadableFile, controller?: UploadController, uploadableFileUpfrontIds?: UploadableFileUpfrontIds, traceContext?: MediaTraceContext): MediaSubscribable<FileState>;
35
+ upload(file: UploadableFile, controller?: UploadController, uploadableFileUpfrontIds?: UploadableFileUpfrontIds, traceContext?: MediaTraceContext, featureFlags?: MediaFeatureFlags): MediaSubscribable<FileState>;
36
36
  uploadExternal(url: string, collection?: string, traceContext?: MediaTraceContext): Promise<ExternalUploadPayload>;
37
37
  downloadBinary(id: string, name?: string, collectionName?: string): Promise<void>;
38
38
  getCurrentState(id: string, options?: GetFileOptions): Promise<FileState>;
@@ -55,7 +55,7 @@ export declare class FileFetcherImpl implements FileFetcher {
55
55
  private getUploadingFileStateBase;
56
56
  private uploadAwlaysPullFileStates;
57
57
  private uploadConditionallyPullFileStates;
58
- upload(file: UploadableFile, controller?: UploadController, uploadableFileUpfrontIds?: UploadableFileUpfrontIds, traceContext?: MediaTraceContext): MediaSubscribable<FileState>;
58
+ upload(file: UploadableFile, controller?: UploadController, uploadableFileUpfrontIds?: UploadableFileUpfrontIds, traceContext?: MediaTraceContext, featureFlags?: MediaFeatureFlags): MediaSubscribable<FileState>;
59
59
  downloadBinary(id: string, name?: string, collectionName?: string): Promise<void>;
60
60
  copyFile(source: CopySourceFile, destination: CopyDestination, options?: CopyFileOptions, traceContext?: MediaTraceContext): Promise<MediaFile>;
61
61
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/media-client",
3
- "version": "20.1.0",
3
+ "version": "20.2.0",
4
4
  "description": "Media API Web Client Library",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"