@atlaskit/media-store
Advanced tools
Comparing version 5.1.1 to 6.0.0
# @atlaskit/media-store | ||
## 6.0.0 | ||
- [major] Synchronous property "serviceHost" as part of many Interfaces in media components (like MediaApiConfig) is removed and replaced with asynchronous "baseUrl" as part of Auth object. [d02746f](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/d02746f) | ||
- [major] Updated dependencies [d02746f](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/d02746f) | ||
- @atlaskit/media-test-helpers@16.0.0 | ||
## 5.1.1 | ||
@@ -4,0 +9,0 @@ - [patch] Updated dependencies [acd86a1](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/acd86a1) |
@@ -29,3 +29,3 @@ import * as tslib_1 from "tslib"; | ||
auth = _a.sent(); | ||
return [2 /*return*/, createUrl(this.config.serviceHost + "/file/" + id + "/image", { | ||
return [2 /*return*/, createUrl(auth.baseUrl + "/file/" + id + "/image", { | ||
params: extendImageParams(params), | ||
@@ -166,12 +166,12 @@ auth: auth, | ||
return tslib_1.__awaiter(this, void 0, void 0, function () { | ||
var _a, serviceHost, authProvider, method, authContext, params, headers, body, auth; | ||
return tslib_1.__generator(this, function (_b) { | ||
switch (_b.label) { | ||
var authProvider, method, authContext, params, headers, body, auth; | ||
return tslib_1.__generator(this, function (_a) { | ||
switch (_a.label) { | ||
case 0: | ||
_a = this.config, serviceHost = _a.serviceHost, authProvider = _a.authProvider; | ||
authProvider = this.config.authProvider; | ||
method = options.method, authContext = options.authContext, params = options.params, headers = options.headers, body = options.body; | ||
return [4 /*yield*/, authProvider(authContext)]; | ||
case 1: | ||
auth = _b.sent(); | ||
return [2 /*return*/, request("" + serviceHost + path, { | ||
auth = _a.sent(); | ||
return [2 /*return*/, request("" + auth.baseUrl + path, { | ||
method: method, | ||
@@ -178,0 +178,0 @@ auth: auth, |
export interface ClientAltBasedAuth { | ||
readonly id: string; | ||
readonly token: string; | ||
readonly baseUrl: string; | ||
} | ||
@@ -8,2 +9,3 @@ export interface ClientBasedAuth { | ||
readonly token: string; | ||
readonly baseUrl: string; | ||
} | ||
@@ -13,2 +15,3 @@ export interface AsapBasedAuth { | ||
readonly token: string; | ||
readonly baseUrl: string; | ||
} | ||
@@ -19,3 +22,2 @@ export declare type Auth = ClientBasedAuth | AsapBasedAuth; | ||
export interface ContextConfig { | ||
readonly serviceHost: string; | ||
readonly cacheSize?: number; | ||
@@ -30,4 +32,3 @@ readonly authProvider: AuthProvider; | ||
export declare type MediaApiConfig = { | ||
serviceHost: string; | ||
authProvider: AuthProvider; | ||
}; |
@@ -31,3 +31,3 @@ "use strict"; | ||
auth = _a.sent(); | ||
return [2 /*return*/, request_1.createUrl(this.config.serviceHost + "/file/" + id + "/image", { | ||
return [2 /*return*/, request_1.createUrl(auth.baseUrl + "/file/" + id + "/image", { | ||
params: extendImageParams(params), | ||
@@ -168,12 +168,12 @@ auth: auth, | ||
return tslib_1.__awaiter(this, void 0, void 0, function () { | ||
var _a, serviceHost, authProvider, method, authContext, params, headers, body, auth; | ||
return tslib_1.__generator(this, function (_b) { | ||
switch (_b.label) { | ||
var authProvider, method, authContext, params, headers, body, auth; | ||
return tslib_1.__generator(this, function (_a) { | ||
switch (_a.label) { | ||
case 0: | ||
_a = this.config, serviceHost = _a.serviceHost, authProvider = _a.authProvider; | ||
authProvider = this.config.authProvider; | ||
method = options.method, authContext = options.authContext, params = options.params, headers = options.headers, body = options.body; | ||
return [4 /*yield*/, authProvider(authContext)]; | ||
case 1: | ||
auth = _b.sent(); | ||
return [2 /*return*/, request_1.request("" + serviceHost + path, { | ||
auth = _a.sent(); | ||
return [2 /*return*/, request_1.request("" + auth.baseUrl + path, { | ||
method: method, | ||
@@ -180,0 +180,0 @@ auth: auth, |
export interface ClientAltBasedAuth { | ||
readonly id: string; | ||
readonly token: string; | ||
readonly baseUrl: string; | ||
} | ||
@@ -8,2 +9,3 @@ export interface ClientBasedAuth { | ||
readonly token: string; | ||
readonly baseUrl: string; | ||
} | ||
@@ -13,2 +15,3 @@ export interface AsapBasedAuth { | ||
readonly token: string; | ||
readonly baseUrl: string; | ||
} | ||
@@ -19,3 +22,2 @@ export declare type Auth = ClientBasedAuth | AsapBasedAuth; | ||
export interface ContextConfig { | ||
readonly serviceHost: string; | ||
readonly cacheSize?: number; | ||
@@ -30,4 +32,3 @@ readonly authProvider: AuthProvider; | ||
export declare type MediaApiConfig = { | ||
serviceHost: string; | ||
authProvider: AuthProvider; | ||
}; |
{ | ||
"name": "@atlaskit/media-store", | ||
"version": "5.1.0", | ||
"version": "5.1.1", | ||
"sideEffects": false | ||
} |
{ | ||
"name": "@atlaskit/media-store", | ||
"version": "5.1.1", | ||
"version": "6.0.0", | ||
"description": "Media Store API Web Client Library", | ||
@@ -28,3 +28,3 @@ "license": "Apache-2.0", | ||
"devDependencies": { | ||
"@atlaskit/media-test-helpers": "^15.2.1", | ||
"@atlaskit/media-test-helpers": "^16.0.0", | ||
"@types/fetch-mock": "^5.12.1", | ||
@@ -31,0 +31,0 @@ "fetch-mock": "^5.12.1", |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
102323
1680