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

feat(create-context): add launch context name

This commit is contained in:
Krishna Acondy
2020-09-06 21:27:44 +01:00
parent cc5a0cbec3
commit a318d61f83

View File

@@ -198,6 +198,7 @@ export class SASViyaApiClient {
*/ */
public async createContext( public async createContext(
contextName: string, contextName: string,
launchContextName: string,
sharedAccountId: string, sharedAccountId: string,
autoExecLines: string, autoExecLines: string,
accessToken?: string accessToken?: string
@@ -206,6 +207,10 @@ export class SASViyaApiClient {
throw new Error('Missing context name.') throw new Error('Missing context name.')
} }
if (!launchContextName) {
throw new Error('Missing launch context name.')
}
if (!sharedAccountId) { if (!sharedAccountId) {
throw new Error('Missing shared account ID.') throw new Error('Missing shared account ID.')
} }
@@ -226,6 +231,9 @@ export class SASViyaApiClient {
environment: { environment: {
autoExecLines: autoExecLines || '' autoExecLines: autoExecLines || ''
}, },
launchContext: {
contextName: launchContextName
},
authorizeAllAuthenticatedUsers: true, authorizeAllAuthenticatedUsers: true,
attributes: { attributes: {
reuseServerProcesses: true, reuseServerProcesses: true,