mirror of
https://github.com/sasjs/adapter.git
synced 2025-12-11 01:14:36 +00:00
chore: prettier
This commit is contained in:
@@ -32,10 +32,7 @@ export class ContextManager {
|
||||
return this.defaultLauncherContexts
|
||||
}
|
||||
|
||||
constructor(
|
||||
private serverUrl: string,
|
||||
private requestClient: RequestClient
|
||||
) {
|
||||
constructor(private serverUrl: string, private requestClient: RequestClient) {
|
||||
if (serverUrl) isUrl(serverUrl)
|
||||
}
|
||||
|
||||
|
||||
@@ -882,8 +882,9 @@ export class SASViyaApiClient {
|
||||
}
|
||||
|
||||
files.forEach((fileInfo, index) => {
|
||||
jobArguments[`_webin_fileuri${index + 1}`] =
|
||||
`/files/files/${fileInfo.file.id}`
|
||||
jobArguments[
|
||||
`_webin_fileuri${index + 1}`
|
||||
] = `/files/files/${fileInfo.file.id}`
|
||||
jobArguments[`_webin_name${index + 1}`] = fileInfo.tableName
|
||||
})
|
||||
|
||||
|
||||
@@ -125,8 +125,9 @@ export async function executeOnComputeApi(
|
||||
jobVariables['_webin_file_count'] = files.length
|
||||
|
||||
files.forEach((fileInfo, index) => {
|
||||
jobVariables[`_webin_fileuri${index + 1}`] =
|
||||
`/files/files/${fileInfo.file.id}`
|
||||
jobVariables[
|
||||
`_webin_fileuri${index + 1}`
|
||||
] = `/files/files/${fileInfo.file.id}`
|
||||
jobVariables[`_webin_name${index + 1}`] = fileInfo.tableName
|
||||
})
|
||||
} else {
|
||||
|
||||
@@ -10,7 +10,7 @@ describe('openWebPage', () => {
|
||||
describe('window.open is not blocked', () => {
|
||||
const mockedOpen = jest
|
||||
.fn()
|
||||
.mockImplementation(() => ({}) as unknown as Window)
|
||||
.mockImplementation(() => ({} as unknown as Window))
|
||||
const originalOpen = window.open
|
||||
|
||||
beforeAll(() => {
|
||||
|
||||
@@ -8,10 +8,7 @@ import {
|
||||
import { BaseJobExecutor } from './JobExecutor'
|
||||
|
||||
export class ComputeJobExecutor extends BaseJobExecutor {
|
||||
constructor(
|
||||
serverUrl: string,
|
||||
private sasViyaApiClient: SASViyaApiClient
|
||||
) {
|
||||
constructor(serverUrl: string, private sasViyaApiClient: SASViyaApiClient) {
|
||||
super(serverUrl, ServerType.SasViya)
|
||||
}
|
||||
|
||||
|
||||
@@ -10,10 +10,7 @@ import { BaseJobExecutor } from './JobExecutor'
|
||||
import { appendExtraResponseAttributes } from '../utils'
|
||||
|
||||
export class JesJobExecutor extends BaseJobExecutor {
|
||||
constructor(
|
||||
serverUrl: string,
|
||||
private sasViyaApiClient: SASViyaApiClient
|
||||
) {
|
||||
constructor(serverUrl: string, private sasViyaApiClient: SASViyaApiClient) {
|
||||
super(serverUrl, ServerType.SasViya)
|
||||
}
|
||||
|
||||
|
||||
@@ -17,10 +17,7 @@ export interface JobExecutor {
|
||||
}
|
||||
|
||||
export abstract class BaseJobExecutor implements JobExecutor {
|
||||
constructor(
|
||||
protected serverUrl: string,
|
||||
protected serverType: ServerType
|
||||
) {}
|
||||
constructor(protected serverUrl: string, protected serverType: ServerType) {}
|
||||
|
||||
private waitingRequests: ExecuteFunction[] = []
|
||||
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
export class AuthorizeError extends Error {
|
||||
constructor(
|
||||
public message: string,
|
||||
public confirmUrl: string
|
||||
) {
|
||||
constructor(public message: string, public confirmUrl: string) {
|
||||
super(message)
|
||||
this.name = 'AuthorizeError'
|
||||
Object.setPrototypeOf(this, AuthorizeError.prototype)
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
import { Job } from '../Job'
|
||||
|
||||
export class ComputeJobExecutionError extends Error {
|
||||
constructor(
|
||||
public job: Job,
|
||||
public log: string
|
||||
) {
|
||||
constructor(public job: Job, public log: string) {
|
||||
super('Error: Job execution failed')
|
||||
this.name = 'ComputeJobExecutionError'
|
||||
Object.setPrototypeOf(this, ComputeJobExecutionError.prototype)
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
export class JobStatePollError extends Error {
|
||||
constructor(
|
||||
id: string,
|
||||
public originalError: Error
|
||||
) {
|
||||
constructor(id: string, public originalError: Error) {
|
||||
super(
|
||||
`Error while polling job state for job ${id}: ${
|
||||
originalError.message || originalError
|
||||
|
||||
Reference in New Issue
Block a user