mirror of
https://github.com/sasjs/adapter.git
synced 2026-01-06 20:10:05 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 435993e50e |
12
.github/issue_template.md
vendored
12
.github/issue_template.md
vendored
@@ -1,12 +0,0 @@
|
|||||||
## Expected behaviour
|
|
||||||
*Describe what should be happening*
|
|
||||||
|
|
||||||
## Current behaviour
|
|
||||||
*Describe what is actually happening*
|
|
||||||
|
|
||||||
## Environment info
|
|
||||||
**Client tech stack**: *Angular, React, Vue, VanillaJS, NodeJS etc.*
|
|
||||||
**Server type**: SASJS|SASVIYA|SAS9
|
|
||||||
**Login mechanism**: Default|Redirected
|
|
||||||
**Debug**: true|false
|
|
||||||
**Use Compute Api (relevant only on VIYA)**: true|false
|
|
||||||
@@ -53,7 +53,9 @@ export const basicTests = (
|
|||||||
return await newAdapterIns.checkSession()
|
return await newAdapterIns.checkSession()
|
||||||
},
|
},
|
||||||
assertion: (response: any) =>
|
assertion: (response: any) =>
|
||||||
response?.isLoggedIn && response?.userName === userName
|
adapter.getSasjsConfig().serverType === ServerType.Sas9
|
||||||
|
? response?.isLoggedIn
|
||||||
|
: response?.isLoggedIn && response?.userName === userName
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Multiple Log in attempts',
|
title: 'Multiple Log in attempts',
|
||||||
|
|||||||
@@ -895,7 +895,6 @@ export default class SASjs {
|
|||||||
await this.computeJobExecutor?.resendWaitingRequests()
|
await this.computeJobExecutor?.resendWaitingRequests()
|
||||||
await this.jesJobExecutor?.resendWaitingRequests()
|
await this.jesJobExecutor?.resendWaitingRequests()
|
||||||
await this.fileUploader?.resendWaitingRequests()
|
await this.fileUploader?.resendWaitingRequests()
|
||||||
await this.sasjsJobExecutor?.resendWaitingRequests()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ export class AuthManager {
|
|||||||
await this.performCASSecurityCheck()
|
await this.performCASSecurityCheck()
|
||||||
}
|
}
|
||||||
|
|
||||||
this.loginCallback()
|
await this.loginCallback()
|
||||||
this.userName = loginParams.username
|
this.userName = loginParams.username
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -239,7 +239,7 @@ export class AuthManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const { result: formResponse } = await this.requestClient.get<string>(
|
const { result: formResponse } = await this.requestClient.get<string>(
|
||||||
this.loginUrl.replace('/SASLogon/login.do', '/SASLogon/login'),
|
this.loginUrl.replace('.do', ''),
|
||||||
undefined,
|
undefined,
|
||||||
'text/plain'
|
'text/plain'
|
||||||
)
|
)
|
||||||
@@ -348,7 +348,7 @@ export class AuthManager {
|
|||||||
this.loginUrl =
|
this.loginUrl =
|
||||||
this.serverType === ServerType.SasViya
|
this.serverType === ServerType.SasViya
|
||||||
? tempLoginLink
|
? tempLoginLink
|
||||||
: loginUrl.replace('/SASLogon/login.do', '/SASLogon/login')
|
: loginUrl.replace('.do', '')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,8 @@ import { SASViyaApiClient } from '../SASViyaApiClient'
|
|||||||
import {
|
import {
|
||||||
isRelativePath,
|
isRelativePath,
|
||||||
parseSasViyaDebugResponse,
|
parseSasViyaDebugResponse,
|
||||||
appendExtraResponseAttributes
|
appendExtraResponseAttributes,
|
||||||
|
getValidJson
|
||||||
} from '../utils'
|
} from '../utils'
|
||||||
import { BaseJobExecutor } from './JobExecutor'
|
import { BaseJobExecutor } from './JobExecutor'
|
||||||
import { parseWeboutResponse } from '../utils/parseWeboutResponse'
|
import { parseWeboutResponse } from '../utils/parseWeboutResponse'
|
||||||
@@ -183,6 +184,10 @@ export class WebJobExecutor extends BaseJobExecutor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (typeof jsonResponse === 'string') {
|
||||||
|
jsonResponse = getValidJson(jsonResponse)
|
||||||
|
}
|
||||||
|
|
||||||
const responseObject = appendExtraResponseAttributes(
|
const responseObject = appendExtraResponseAttributes(
|
||||||
{ result: jsonResponse, log: res.log },
|
{ result: jsonResponse, log: res.log },
|
||||||
extraResponseAttributes
|
extraResponseAttributes
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import axiosCookieJarSupport from 'axios-cookiejar-support'
|
|||||||
import * as tough from 'tough-cookie'
|
import * as tough from 'tough-cookie'
|
||||||
import { prefixMessage } from '@sasjs/utils/error'
|
import { prefixMessage } from '@sasjs/utils/error'
|
||||||
import { RequestClient, throwIfError } from './RequestClient'
|
import { RequestClient, throwIfError } from './RequestClient'
|
||||||
import { JobExecutionError } from '../types/errors'
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Specific request client for SAS9 in Node.js environments.
|
* Specific request client for SAS9 in Node.js environments.
|
||||||
@@ -70,8 +69,6 @@ export class Sas9RequestClient extends RequestClient {
|
|||||||
return this.parseResponse<T>(response)
|
return this.parseResponse<T>(response)
|
||||||
})
|
})
|
||||||
.catch(async (e: any) => {
|
.catch(async (e: any) => {
|
||||||
if (e instanceof JobExecutionError) throw e
|
|
||||||
|
|
||||||
return await this.handleError(
|
return await this.handleError(
|
||||||
e,
|
e,
|
||||||
() =>
|
() =>
|
||||||
|
|||||||
Reference in New Issue
Block a user