@microsoft/paris
Advanced tools
Comparing version 1.7.4 to 1.7.5
@@ -0,0 +0,0 @@ import { ParisConfig } from "./paris-config"; |
@@ -136,6 +136,6 @@ var __assign = (this && this.__assign) || Object.assign || function(t) { | ||
} | ||
var requestOptions = { | ||
responseType: apiCallType.config.responseType, | ||
timeout: apiCallType.config.timeout | ||
}; | ||
var requestOptions = apiCallType.config.responseType ? { responseType: apiCallType.config.responseType } : null; | ||
if (apiCallType.config.timeout) { | ||
requestOptions = Object.assign({}, requestOptions, { timeout: apiCallType.config.timeout }); | ||
} | ||
var apiCall$ = this.makeApiCall(apiCallType.config, apiCallType.config.method || "GET", httpOptions, undefined, requestOptions) | ||
@@ -296,3 +296,7 @@ .pipe(catchError(function (err) { | ||
}); | ||
return this.makeApiCall(apiCallConfig, "GET", httpOptions, query).pipe(catchError(function (error) { | ||
var requestOptions; | ||
if (backendConfig.timeout) { | ||
requestOptions = { timeout: backendConfig.timeout }; | ||
} | ||
return this.makeApiCall(apiCallConfig, "GET", httpOptions, query, requestOptions).pipe(catchError(function (error) { | ||
_this._errorSubject$.next(Object.assign({}, error, { entity: entityConstructor })); | ||
@@ -299,0 +303,0 @@ return throwError(error.originalError || error); |
import 'reflect-metadata'; | ||
(<any>global)['Reflect'] = Reflect; |
@@ -5,3 +5,3 @@ { | ||
"json-stringify-safe@5.0.1", | ||
"/mnt/c/Users/aagreenw/code/paris" | ||
"C:\\Users\\shrose\\Documents\\repos\\paris" | ||
] | ||
@@ -33,3 +33,3 @@ ], | ||
"_spec": "5.0.1", | ||
"_where": "/mnt/c/Users/aagreenw/code/paris", | ||
"_where": "C:\\Users\\shrose\\Documents\\repos\\paris", | ||
"author": { | ||
@@ -36,0 +36,0 @@ "name": "Isaac Z. Schlueter", |
{ | ||
"name": "@microsoft/paris", | ||
"version": "1.7.4", | ||
"version": "1.7.5", | ||
"description": "Library for the implementation of Domain Driven Design with TypeScript + RxJS", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -0,0 +0,0 @@ # Paris |
@@ -0,0 +0,0 @@ import {Paris} from '../../lib/paris'; |
@@ -0,0 +0,0 @@ import {Paris} from '../../lib/paris'; |
@@ -0,0 +0,0 @@ import {TodoList} from "./todo-list.entity"; |
@@ -340,3 +340,3 @@ import { Observable, of, forkJoin } from 'rxjs'; | ||
undefined, | ||
jasmine.any(Object) | ||
null | ||
); | ||
@@ -354,3 +354,3 @@ }); | ||
undefined, | ||
jasmine.any(Object) | ||
null | ||
); | ||
@@ -376,3 +376,3 @@ }); | ||
const [ , , , , requestOptions] = (<any>paris).makeApiCall.mock.calls[0]; | ||
const [, , , , requestOptions] = (<any>paris).makeApiCall.mock.calls[0]; | ||
expect(requestOptions.timeout).toBe(timeout); | ||
@@ -383,5 +383,13 @@ }); | ||
describe('callQuery', () => { | ||
let jestGetApiCallCacheSpy: jest.SpyInstance<Observable<Paris>>; | ||
let jestMakeApiCallSpy: jest.SpyInstance<Observable<any>>; | ||
beforeEach(() => { | ||
paris = new Paris(); | ||
jest.spyOn(paris.dataStore.httpService, 'request'); | ||
jestGetApiCallCacheSpy = jest.spyOn(paris, 'getApiCallCache' as any); | ||
jestMakeApiCallSpy = jest.spyOn(paris, 'makeApiCall' as any); | ||
}); | ||
it('should call makeApiCall with correct params', () => { }); | ||
@@ -404,2 +412,18 @@ | ||
it('should call Http.request with correct params', () => { }); | ||
it('should pass the timeout property as part of the options if it exists', () => { | ||
const timeout = 123456; | ||
const createToDoListApiCall = { | ||
...CreateTodoListApiCall, | ||
config: { | ||
...(<any>CreateTodoListApiCall).config, | ||
timeout | ||
} | ||
}; | ||
paris.callQuery(<any>createToDoListApiCall, createToDoListApiCall.config); | ||
const [, , , , requestOptions] = (<any>paris).makeApiCall.mock.calls[0]; | ||
expect(requestOptions.timeout).toBe(timeout); | ||
}); | ||
}); | ||
@@ -406,0 +430,0 @@ |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
261790
5303
1