From d8d1968162395d944795ca54f2d345a1c1a2e4a6 Mon Sep 17 00:00:00 2001 From: Krishna Acondy Date: Thu, 27 May 2021 08:06:21 +0100 Subject: [PATCH] chore(*): fix formatting --- src/ContextManager.ts | 4 +--- src/SASViyaApiClient.ts | 23 ++++++++++------------- src/SASjs.ts | 7 +------ src/SessionManager.ts | 5 +---- src/job-execution/WebJobExecutor.ts | 6 ++---- src/test/utils/isUrl.spec.ts | 4 ++-- 6 files changed, 17 insertions(+), 32 deletions(-) diff --git a/src/ContextManager.ts b/src/ContextManager.ts index 3c15ff5..eec0dff 100644 --- a/src/ContextManager.ts +++ b/src/ContextManager.ts @@ -314,9 +314,7 @@ export class ContextManager { contextId: string, accessToken?: string ): Promise { - const { - result: context - } = await this.requestClient + const { result: context } = await this.requestClient .get( `${this.serverUrl}/compute/contexts/${contextId}`, accessToken diff --git a/src/SASViyaApiClient.ts b/src/SASViyaApiClient.ts index 5150524..8f177ad 100644 --- a/src/SASViyaApiClient.ts +++ b/src/SASViyaApiClient.ts @@ -594,16 +594,15 @@ export class SASViyaApiClient { } } - const { - result: createFolderResponse - } = await this.requestClient.post( - `/folders/folders?parentFolderUri=${parentFolderUri}`, - { - name: folderName, - type: 'folder' - }, - accessToken - ) + const { result: createFolderResponse } = + await this.requestClient.post( + `/folders/folders?parentFolderUri=${parentFolderUri}`, + { + name: folderName, + type: 'folder' + }, + accessToken + ) // update folder map with newly created folder. await this.populateFolderMap( @@ -875,9 +874,7 @@ export class SASViyaApiClient { throw new Error(`URI of job definition was not found.`) } - const { - result: jobDefinition - } = await this.requestClient + const { result: jobDefinition } = await this.requestClient .get( `${this.serverUrl}${jobDefinitionLink.href}`, accessToken diff --git a/src/SASjs.ts b/src/SASjs.ts index 38e4b28..4d9c71c 100644 --- a/src/SASjs.ts +++ b/src/SASjs.ts @@ -576,12 +576,7 @@ export default class SASjs { config.username && config.password ) { - return await this.sas9JobExecutor!.execute( - sasJob, - data, - config, - loginRequiredCallback - ) + return await this.sas9JobExecutor!.execute(sasJob, data, config) } else { return await this.webJobExecutor!.execute( sasJob, diff --git a/src/SessionManager.ts b/src/SessionManager.ts index 3c780dd..2120471 100644 --- a/src/SessionManager.ts +++ b/src/SessionManager.ts @@ -91,10 +91,7 @@ export class SessionManager { } private async createAndWaitForSession(accessToken?: string) { - const { - result: createdSession, - etag - } = await this.requestClient + const { result: createdSession, etag } = await this.requestClient .post( `${this.serverUrl}/compute/contexts/${ this.currentContext!.id diff --git a/src/job-execution/WebJobExecutor.ts b/src/job-execution/WebJobExecutor.ts index 816c6d7..61f215c 100644 --- a/src/job-execution/WebJobExecutor.ts +++ b/src/job-execution/WebJobExecutor.ts @@ -71,10 +71,8 @@ export class WebJobExecutor extends BaseJobExecutor { } else { // param based approach try { - const { - formData: newFormData, - requestParams: params - } = generateTableUploadForm(formData, data) + const { formData: newFormData, requestParams: params } = + generateTableUploadForm(formData, data) formData = newFormData requestParams = { ...requestParams, ...params } } catch (e) { diff --git a/src/test/utils/isUrl.spec.ts b/src/test/utils/isUrl.spec.ts index 4ff92a9..928048c 100644 --- a/src/test/utils/isUrl.spec.ts +++ b/src/test/utils/isUrl.spec.ts @@ -28,12 +28,12 @@ describe('urlValidator', () => { it('should return false when the URL is null', () => { const url = null - expect(isUrl((url as unknown) as string)).toEqual(false) + expect(isUrl(url as unknown as string)).toEqual(false) }) it('should return false when the URL is undefined', () => { const url = undefined - expect(isUrl((url as unknown) as string)).toEqual(false) + expect(isUrl(url as unknown as string)).toEqual(false) }) })