mirror of
https://github.com/sasjs/adapter.git
synced 2026-01-03 18:50:05 +00:00
chore(default-contexts): made default contexts private
This commit is contained in:
@@ -9,7 +9,7 @@ import { SASViyaApiClient } from './SASViyaApiClient'
|
||||
import { prefixMessage } from '@sasjs/utils/error'
|
||||
|
||||
export class ContextManager {
|
||||
public defaultComputeContexts = [
|
||||
private defaultComputeContexts = [
|
||||
'CAS Formats service compute context',
|
||||
'Data Mining compute context',
|
||||
'Import 9 service compute context',
|
||||
@@ -18,7 +18,7 @@ export class ContextManager {
|
||||
'SAS Studio compute context',
|
||||
'SAS Visual Forecasting compute context'
|
||||
]
|
||||
public defaultLauncherContexts = [
|
||||
private defaultLauncherContexts = [
|
||||
'CAS Formats service launcher context',
|
||||
'Data Mining launcher context',
|
||||
'Import 9 service launcher context',
|
||||
@@ -31,6 +31,13 @@ export class ContextManager {
|
||||
|
||||
private csrfToken: CsrfToken | null = null
|
||||
|
||||
get getDefaultComputeContexts() {
|
||||
return this.defaultComputeContexts
|
||||
}
|
||||
get getDefaultLauncherContexts() {
|
||||
return this.defaultLauncherContexts
|
||||
}
|
||||
|
||||
constructor(
|
||||
private serverUrl: string,
|
||||
private setCsrfToken: (csrfToken: CsrfToken) => void
|
||||
|
||||
@@ -108,7 +108,7 @@ export class SASViyaApiClient {
|
||||
* Returns default(system) compute contexts.
|
||||
*/
|
||||
public getDefaultComputeContexts() {
|
||||
return this.contextManager.defaultComputeContexts
|
||||
return this.contextManager.getDefaultComputeContexts
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -31,8 +31,8 @@ describe('ContextManager', () => {
|
||||
() => {}
|
||||
)
|
||||
|
||||
const defaultComputeContexts = contextManager.defaultComputeContexts
|
||||
const defaultLauncherContexts = contextManager.defaultLauncherContexts
|
||||
const defaultComputeContexts = contextManager.getDefaultComputeContexts
|
||||
const defaultLauncherContexts = contextManager.getDefaultLauncherContexts
|
||||
|
||||
const getRandomDefaultComputeContext = () =>
|
||||
defaultComputeContexts[
|
||||
|
||||
Reference in New Issue
Block a user