1
0
mirror of https://github.com/sasjs/adapter.git synced 2025-12-11 01:14:36 +00:00

chore(*): fix formatting

This commit is contained in:
Krishna Acondy
2021-05-27 08:06:21 +01:00
parent 0e1d1f1d99
commit d8d1968162
6 changed files with 17 additions and 32 deletions

View File

@@ -314,9 +314,7 @@ export class ContextManager {
contextId: string,
accessToken?: string
): Promise<ContextAllAttributes> {
const {
result: context
} = await this.requestClient
const { result: context } = await this.requestClient
.get<ContextAllAttributes>(
`${this.serverUrl}/compute/contexts/${contextId}`,
accessToken

View File

@@ -594,16 +594,15 @@ export class SASViyaApiClient {
}
}
const {
result: createFolderResponse
} = await this.requestClient.post<Folder>(
`/folders/folders?parentFolderUri=${parentFolderUri}`,
{
name: folderName,
type: 'folder'
},
accessToken
)
const { result: createFolderResponse } =
await this.requestClient.post<Folder>(
`/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<JobDefinition>(
`${this.serverUrl}${jobDefinitionLink.href}`,
accessToken

View File

@@ -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,

View File

@@ -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<Session>(
`${this.serverUrl}/compute/contexts/${
this.currentContext!.id

View File

@@ -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) {

View File

@@ -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)
})
})