1
0
mirror of https://github.com/sasjs/adapter.git synced 2026-01-19 10:00:06 +00:00

chore: prettier

This commit is contained in:
mulahasanovic
2025-09-18 18:06:05 +02:00
parent fb30ff8876
commit 9149f932c3
14 changed files with 24 additions and 43 deletions

View File

@@ -32,10 +32,7 @@ export class ContextManager {
return this.defaultLauncherContexts return this.defaultLauncherContexts
} }
constructor( constructor(private serverUrl: string, private requestClient: RequestClient) {
private serverUrl: string,
private requestClient: RequestClient
) {
if (serverUrl) isUrl(serverUrl) if (serverUrl) isUrl(serverUrl)
} }

View File

@@ -882,8 +882,9 @@ export class SASViyaApiClient {
} }
files.forEach((fileInfo, index) => { files.forEach((fileInfo, index) => {
jobArguments[`_webin_fileuri${index + 1}`] = jobArguments[
`/files/files/${fileInfo.file.id}` `_webin_fileuri${index + 1}`
] = `/files/files/${fileInfo.file.id}`
jobArguments[`_webin_name${index + 1}`] = fileInfo.tableName jobArguments[`_webin_name${index + 1}`] = fileInfo.tableName
}) })

View File

@@ -125,8 +125,9 @@ export async function executeOnComputeApi(
jobVariables['_webin_file_count'] = files.length jobVariables['_webin_file_count'] = files.length
files.forEach((fileInfo, index) => { files.forEach((fileInfo, index) => {
jobVariables[`_webin_fileuri${index + 1}`] = jobVariables[
`/files/files/${fileInfo.file.id}` `_webin_fileuri${index + 1}`
] = `/files/files/${fileInfo.file.id}`
jobVariables[`_webin_name${index + 1}`] = fileInfo.tableName jobVariables[`_webin_name${index + 1}`] = fileInfo.tableName
}) })
} else { } else {

View File

@@ -10,7 +10,7 @@ describe('openWebPage', () => {
describe('window.open is not blocked', () => { describe('window.open is not blocked', () => {
const mockedOpen = jest const mockedOpen = jest
.fn() .fn()
.mockImplementation(() => ({}) as unknown as Window) .mockImplementation(() => ({} as unknown as Window))
const originalOpen = window.open const originalOpen = window.open
beforeAll(() => { beforeAll(() => {

View File

@@ -8,10 +8,7 @@ import {
import { BaseJobExecutor } from './JobExecutor' import { BaseJobExecutor } from './JobExecutor'
export class ComputeJobExecutor extends BaseJobExecutor { export class ComputeJobExecutor extends BaseJobExecutor {
constructor( constructor(serverUrl: string, private sasViyaApiClient: SASViyaApiClient) {
serverUrl: string,
private sasViyaApiClient: SASViyaApiClient
) {
super(serverUrl, ServerType.SasViya) super(serverUrl, ServerType.SasViya)
} }

View File

@@ -10,10 +10,7 @@ import { BaseJobExecutor } from './JobExecutor'
import { appendExtraResponseAttributes } from '../utils' import { appendExtraResponseAttributes } from '../utils'
export class JesJobExecutor extends BaseJobExecutor { export class JesJobExecutor extends BaseJobExecutor {
constructor( constructor(serverUrl: string, private sasViyaApiClient: SASViyaApiClient) {
serverUrl: string,
private sasViyaApiClient: SASViyaApiClient
) {
super(serverUrl, ServerType.SasViya) super(serverUrl, ServerType.SasViya)
} }

View File

@@ -17,10 +17,7 @@ export interface JobExecutor {
} }
export abstract class BaseJobExecutor implements JobExecutor { export abstract class BaseJobExecutor implements JobExecutor {
constructor( constructor(protected serverUrl: string, protected serverType: ServerType) {}
protected serverUrl: string,
protected serverType: ServerType
) {}
private waitingRequests: ExecuteFunction[] = [] private waitingRequests: ExecuteFunction[] = []

View File

@@ -1,8 +1,5 @@
export class AuthorizeError extends Error { export class AuthorizeError extends Error {
constructor( constructor(public message: string, public confirmUrl: string) {
public message: string,
public confirmUrl: string
) {
super(message) super(message)
this.name = 'AuthorizeError' this.name = 'AuthorizeError'
Object.setPrototypeOf(this, AuthorizeError.prototype) Object.setPrototypeOf(this, AuthorizeError.prototype)

View File

@@ -1,10 +1,7 @@
import { Job } from '../Job' import { Job } from '../Job'
export class ComputeJobExecutionError extends Error { export class ComputeJobExecutionError extends Error {
constructor( constructor(public job: Job, public log: string) {
public job: Job,
public log: string
) {
super('Error: Job execution failed') super('Error: Job execution failed')
this.name = 'ComputeJobExecutionError' this.name = 'ComputeJobExecutionError'
Object.setPrototypeOf(this, ComputeJobExecutionError.prototype) Object.setPrototypeOf(this, ComputeJobExecutionError.prototype)

View File

@@ -1,8 +1,5 @@
export class JobStatePollError extends Error { export class JobStatePollError extends Error {
constructor( constructor(id: string, public originalError: Error) {
id: string,
public originalError: Error
) {
super( super(
`Error while polling job state for job ${id}: ${ `Error while polling job state for job ${id}: ${
originalError.message || originalError originalError.message || originalError