dependency upgrades, server and platform module updates, linting wip

This commit is contained in:
William Welling
2017-07-12 14:33:16 -05:00
parent afc39022f8
commit c08f5c672b
190 changed files with 6321 additions and 4703 deletions

View File

@@ -52,7 +52,7 @@ export class RemoteDataBuildService {
const errorMessage = responseCacheObs
.filter((entry: ResponseCacheEntry) => !entry.response.isSuccessful)
.map((entry: ResponseCacheEntry) => (<ErrorResponse> entry.response).errorMessage)
.map((entry: ResponseCacheEntry) => (<ErrorResponse>entry.response).errorMessage)
.distinctUntilChanged();
const statusCode = responseCacheObs
@@ -61,7 +61,7 @@ export class RemoteDataBuildService {
const pageInfo = responseCacheObs
.filter((entry: ResponseCacheEntry) => hasValue(entry.response) && hasValue(entry.response['pageInfo']))
.map((entry: ResponseCacheEntry) => (<SuccessResponse> entry.response).pageInfo)
.map((entry: ResponseCacheEntry) => (<SuccessResponse>entry.response).pageInfo)
.distinctUntilChanged();
//always use self link if that is cached, only if it isn't, get it via the response.
@@ -70,7 +70,7 @@ export class RemoteDataBuildService {
this.objectCache.getBySelfLink<TNormalized>(href, normalizedType).startWith(undefined),
responseCacheObs
.filter((entry: ResponseCacheEntry) => entry.response.isSuccessful)
.map((entry: ResponseCacheEntry) => (<SuccessResponse> entry.response).resourceUUIDs)
.map((entry: ResponseCacheEntry) => (<SuccessResponse>entry.response).resourceUUIDs)
.flatMap((resourceUUIDs: Array<string>) => {
if (isNotEmpty(resourceUUIDs)) {
return this.objectCache.get(resourceUUIDs[0], normalizedType);
@@ -92,7 +92,7 @@ export class RemoteDataBuildService {
).filter(normalized => hasValue(normalized))
.map((normalized: TNormalized) => {
return this.build<TNormalized, TDomain>(normalized);
});
});
return new RemoteData(
@@ -124,7 +124,7 @@ export class RemoteDataBuildService {
const errorMessage = responseCacheObs
.filter((entry: ResponseCacheEntry) => !entry.response.isSuccessful)
.map((entry: ResponseCacheEntry) => (<ErrorResponse> entry.response).errorMessage)
.map((entry: ResponseCacheEntry) => (<ErrorResponse>entry.response).errorMessage)
.distinctUntilChanged();
const statusCode = responseCacheObs
@@ -133,12 +133,12 @@ export class RemoteDataBuildService {
const pageInfo = responseCacheObs
.filter((entry: ResponseCacheEntry) => hasValue(entry.response) && hasValue(entry.response['pageInfo']))
.map((entry: ResponseCacheEntry) => (<SuccessResponse> entry.response).pageInfo)
.map((entry: ResponseCacheEntry) => (<SuccessResponse>entry.response).pageInfo)
.distinctUntilChanged();
const payload = responseCacheObs
.filter((entry: ResponseCacheEntry) => entry.response.isSuccessful)
.map((entry: ResponseCacheEntry) => (<SuccessResponse> entry.response).resourceUUIDs)
.map((entry: ResponseCacheEntry) => (<SuccessResponse>entry.response).resourceUUIDs)
.flatMap((resourceUUIDs: Array<string>) => {
return this.objectCache.getList(resourceUUIDs, normalizedType)
.map((normList: TNormalized[]) => {
@@ -197,7 +197,7 @@ export class RemoteDataBuildService {
// are dispatched, but sometimes don't arrive. I'm unsure why atm.
setTimeout(() => {
this.requestService.configure(new Request(normalized[relationship]));
},0);
}, 0);
// The rest API can return a single URL to represent a list of resources (e.g. /items/:id/bitstreams)
// in that case only 1 href will be stored in the normalized obj (so the isArray above fails),
@@ -241,7 +241,7 @@ export class RemoteDataBuildService {
})
.filter(e => hasValue(e))
.join(", ")
);
);
const statusCode = Observable.combineLatest(
...input.map(rd => rd.statusCode),
@@ -253,11 +253,11 @@ export class RemoteDataBuildService {
})
.filter(c => hasValue(c))
.join(", ")
);
);
const pageInfo = Observable.of(undefined);
const payload = <Observable<T[]>> Observable.combineLatest(
const payload = <Observable<T[]>>Observable.combineLatest(
...input.map(rd => rd.payload)
);