Socket
Socket
Sign inDemoInstall

@atlaskit/media-store

Package Overview
Dependencies
Maintainers
1
Versions
87
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@atlaskit/media-store - npm Package Compare versions

Comparing version 9.0.2 to 9.1.0

11

CHANGELOG.md
# @atlaskit/media-store
## 9.1.0
- [minor] [72d37fb](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/72d37fb):
- Remove deprecated methods from media-core
- Use context.collection methods in MediaViewer
- Remove link support from media-card
- Remove legacy services + providers from media-core
- Remove link related methods from media-core
- Remove axios dependency
- Make context.getImage cancelable
## 9.0.2

@@ -4,0 +15,0 @@ - Updated dependencies [135ed00](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/135ed00):

1

dist/es2015/index.d.ts

@@ -7,1 +7,2 @@ export * from './media-store';

export { uploadFile, UploadableFile, UploadableFileUpfrontIds, UploadFileCallbacks, UploadFileResult, } from './uploader';
export * from './utils/request';

@@ -6,2 +6,3 @@ export * from './media-store';

export { uploadFile, } from './uploader';
export * from './utils/request';
//# sourceMappingURL=index.js.map

4

dist/es2015/media-store.d.ts

@@ -23,3 +23,3 @@ import { MediaFile, MediaCollection, MediaCollectionItems, MediaUpload, MediaChunksProbe, MediaCollectionItemFullDetails } from './models/media';

getArtifactURL: (artifacts: MediaFileArtifacts, artifactName: "video_1280.mp4" | "video_640.mp4" | "document.pdf" | "audio.mp3", collectionName?: string | undefined) => Promise<string>;
getImage: (id: string, params?: MediaStoreGetFileImageParams | undefined) => Promise<Blob>;
getImage: (id: string, params?: MediaStoreGetFileImageParams | undefined, controller?: AbortController | undefined) => Promise<Blob>;
getItems: (ids: string[], collectionName?: string | undefined) => Promise<MediaStoreResponse<ItemsPayload>>;

@@ -31,3 +31,3 @@ getImageMetadata: (id: string, params?: MediaStoreGetFileImageParams | undefined) => Promise<{

copyFileWithToken(body: MediaStoreCopyFileWithTokenBody, params: MediaStoreCopyFileWithTokenParams): Promise<MediaStoreResponse<MediaFile>>;
request(path: string, options?: MediaStoreRequestOptions): Promise<Response>;
request(path: string, options?: MediaStoreRequestOptions, controller?: AbortController): Promise<Response>;
}

@@ -34,0 +34,0 @@ export interface FileItem {

@@ -78,7 +78,8 @@ import * as tslib_1 from "tslib";

}); };
this.getImage = function (id, params) {
// TODO [MS-1352]: add WEBP header
this.getImage = function (id, params, controller) {
return _this.request("/file/" + id + "/image", {
params: extendImageParams(params),
authContext: { collectionName: params && params.collection },
}).then(mapResponseToBlob);
}, controller).then(mapResponseToBlob);
};

@@ -273,3 +274,3 @@ this.getItems = function (ids, collectionName) {

};
MediaStore.prototype.request = function (path, options) {
MediaStore.prototype.request = function (path, options, controller) {
if (options === void 0) { options = {

@@ -295,3 +296,3 @@ method: 'GET',

body: body,
})];
}, controller)];
}

@@ -298,0 +299,0 @@ });

@@ -16,3 +16,3 @@ import { Auth } from '../models/auth';

};
export declare function request(url: string, options?: RequestOptions): Promise<Response>;
export declare function request(url: string, options?: RequestOptions, controller?: AbortController): Promise<Response>;
export declare function mapResponseToJson(response: Response): Promise<any>;

@@ -19,0 +19,0 @@ export declare function mapResponseToBlob(response: Response): Promise<Blob>;

@@ -5,3 +5,3 @@ import * as tslib_1 from "tslib";

import { mapAuthToQueryParameters } from '../models/auth-query-parameters';
export function request(url, options) {
export function request(url, options, controller) {
if (options === void 0) { options = {}; }

@@ -22,2 +22,3 @@ var _a = options.method, method = _a === void 0 ? 'GET' : _a, auth = options.auth, params = options.params, headers = options.headers, body = options.body;

headers: headers,
signal: controller && controller.signal,
}).then(processFetchResponse);

@@ -24,0 +25,0 @@ }

@@ -7,1 +7,2 @@ export * from './media-store';

export { uploadFile, UploadableFile, UploadableFileUpfrontIds, UploadFileCallbacks, UploadFileResult, } from './uploader';
export * from './utils/request';

@@ -10,2 +10,3 @@ "use strict";

exports.uploadFile = uploader_1.uploadFile;
tslib_1.__exportStar(require("./utils/request"), exports);
//# sourceMappingURL=index.js.map

@@ -23,3 +23,3 @@ import { MediaFile, MediaCollection, MediaCollectionItems, MediaUpload, MediaChunksProbe, MediaCollectionItemFullDetails } from './models/media';

getArtifactURL: (artifacts: MediaFileArtifacts, artifactName: "video_1280.mp4" | "video_640.mp4" | "document.pdf" | "audio.mp3", collectionName?: string | undefined) => Promise<string>;
getImage: (id: string, params?: MediaStoreGetFileImageParams | undefined) => Promise<Blob>;
getImage: (id: string, params?: MediaStoreGetFileImageParams | undefined, controller?: AbortController | undefined) => Promise<Blob>;
getItems: (ids: string[], collectionName?: string | undefined) => Promise<MediaStoreResponse<ItemsPayload>>;

@@ -31,3 +31,3 @@ getImageMetadata: (id: string, params?: MediaStoreGetFileImageParams | undefined) => Promise<{

copyFileWithToken(body: MediaStoreCopyFileWithTokenBody, params: MediaStoreCopyFileWithTokenParams): Promise<MediaStoreResponse<MediaFile>>;
request(path: string, options?: MediaStoreRequestOptions): Promise<Response>;
request(path: string, options?: MediaStoreRequestOptions, controller?: AbortController): Promise<Response>;
}

@@ -34,0 +34,0 @@ export interface FileItem {

@@ -80,7 +80,8 @@ "use strict";

}); };
this.getImage = function (id, params) {
// TODO [MS-1352]: add WEBP header
this.getImage = function (id, params, controller) {
return _this.request("/file/" + id + "/image", {
params: extendImageParams(params),
authContext: { collectionName: params && params.collection },
}).then(request_1.mapResponseToBlob);
}, controller).then(request_1.mapResponseToBlob);
};

@@ -275,3 +276,3 @@ this.getItems = function (ids, collectionName) {

};
MediaStore.prototype.request = function (path, options) {
MediaStore.prototype.request = function (path, options, controller) {
if (options === void 0) { options = {

@@ -297,3 +298,3 @@ method: 'GET',

body: body,
})];
}, controller)];
}

@@ -300,0 +301,0 @@ });

@@ -16,3 +16,3 @@ import { Auth } from '../models/auth';

};
export declare function request(url: string, options?: RequestOptions): Promise<Response>;
export declare function request(url: string, options?: RequestOptions, controller?: AbortController): Promise<Response>;
export declare function mapResponseToJson(response: Response): Promise<any>;

@@ -19,0 +19,0 @@ export declare function mapResponseToBlob(response: Response): Promise<Blob>;

@@ -7,3 +7,3 @@ "use strict";

var auth_query_parameters_1 = require("../models/auth-query-parameters");
function request(url, options) {
function request(url, options, controller) {
if (options === void 0) { options = {}; }

@@ -24,2 +24,3 @@ var _a = options.method, method = _a === void 0 ? 'GET' : _a, auth = options.auth, params = options.params, headers = options.headers, body = options.body;

headers: headers,
signal: controller && controller.signal,
}).then(processFetchResponse);

@@ -26,0 +27,0 @@ }

{
"name": "@atlaskit/media-store",
"version": "9.0.2",
"version": "9.1.0",
"sideEffects": false
}
{
"name": "@atlaskit/media-store",
"version": "9.0.2",
"version": "9.1.0",
"description": "Media Store API Web Client Library",

@@ -31,4 +31,4 @@ "license": "Apache-2.0",

"@atlaskit/docs": "^6.0.0",
"@atlaskit/media-card": "^47.0.0",
"@atlaskit/media-test-helpers": "^18.7.2",
"@atlaskit/media-card": "^48.0.0",
"@atlaskit/media-test-helpers": "^18.9.0",
"@types/fetch-mock": "^6.0.3",

@@ -35,0 +35,0 @@ "fetch-mock": "^6.5.2",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc