diff --git a/.git-hooks/commit-msg b/.git-hooks/commit-msg index d12ec2f..003f76b 100755 --- a/.git-hooks/commit-msg +++ b/.git-hooks/commit-msg @@ -6,7 +6,7 @@ GREEN="\033[1;32m" # temporary file which holds the message). commit_message=$(cat "$1") -if (echo "$commit_message" | grep -Eq "^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test)(\([a-z0-9 \-]+\))?!?: .+$") then +if (echo "$commit_message" | grep -Eq "^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test)(\([a-z0-9 \-\*]+\))?!?: .+$") then echo "${GREEN} ✔ Commit message meets Conventional Commit standards" exit 0 fi diff --git a/src/SASjs.ts b/src/SASjs.ts index 593e890..2229209 100644 --- a/src/SASjs.ts +++ b/src/SASjs.ts @@ -584,7 +584,7 @@ export default class SASjs { data: { [key: string]: any } | null, config: { [key: string]: any } = {}, loginRequiredCallback?: () => any, - accessToken?: string, + authConfig?: AuthConfig, extraResponseAttributes: ExtraResponseAttributes[] = [] ) { config = { @@ -602,7 +602,7 @@ export default class SASjs { data, config, loginRequiredCallback, - accessToken + authConfig ) } else { return await this.jesJobExecutor!.execute( @@ -610,7 +610,7 @@ export default class SASjs { data, config, loginRequiredCallback, - accessToken, + authConfig, extraResponseAttributes ) } @@ -626,7 +626,7 @@ export default class SASjs { data, config, loginRequiredCallback, - accessToken, + authConfig, extraResponseAttributes ) } diff --git a/src/job-execution/ComputeJobExecutor.ts b/src/job-execution/ComputeJobExecutor.ts index 33f31ca..46d84be 100644 --- a/src/job-execution/ComputeJobExecutor.ts +++ b/src/job-execution/ComputeJobExecutor.ts @@ -1,4 +1,4 @@ -import { ServerType } from '@sasjs/utils/types' +import { AuthConfig, ServerType } from '@sasjs/utils/types' import { SASViyaApiClient } from '../SASViyaApiClient' import { ErrorResponse, @@ -17,7 +17,7 @@ export class ComputeJobExecutor extends BaseJobExecutor { data: any, config: any, loginRequiredCallback?: any, - accessToken?: string + authConfig?: AuthConfig ) { const loginCallback = loginRequiredCallback || (() => Promise.resolve()) const waitForResult = true @@ -30,7 +30,7 @@ export class ComputeJobExecutor extends BaseJobExecutor { config.contextName, config.debug, data, - accessToken, + authConfig, waitForResult, expectWebout ) diff --git a/src/job-execution/JesJobExecutor.ts b/src/job-execution/JesJobExecutor.ts index ce82083..d924cfd 100644 --- a/src/job-execution/JesJobExecutor.ts +++ b/src/job-execution/JesJobExecutor.ts @@ -1,4 +1,4 @@ -import { ServerType } from '@sasjs/utils/types' +import { AuthConfig, ServerType } from '@sasjs/utils/types' import { SASViyaApiClient } from '../SASViyaApiClient' import { ErrorResponse, @@ -18,20 +18,14 @@ export class JesJobExecutor extends BaseJobExecutor { data: any, config: any, loginRequiredCallback?: any, - accessToken?: string, + authConfig?: AuthConfig, extraResponseAttributes: ExtraResponseAttributes[] = [] ) { const loginCallback = loginRequiredCallback || (() => Promise.resolve()) const requestPromise = new Promise((resolve, reject) => { this.sasViyaApiClient - ?.executeJob( - sasJob, - config.contextName, - config.debug, - data, - accessToken - ) + ?.executeJob(sasJob, config.contextName, config.debug, data, authConfig) .then((response: any) => { this.appendRequest(response, sasJob, config.debug) @@ -69,7 +63,7 @@ export class JesJobExecutor extends BaseJobExecutor { data, config, loginRequiredCallback, - accessToken, + authConfig, extraResponseAttributes ).then( (res: any) => { diff --git a/src/job-execution/JobExecutor.ts b/src/job-execution/JobExecutor.ts index 2517a57..ffcdace 100644 --- a/src/job-execution/JobExecutor.ts +++ b/src/job-execution/JobExecutor.ts @@ -1,4 +1,4 @@ -import { ServerType } from '@sasjs/utils/types' +import { AuthConfig, ServerType } from '@sasjs/utils/types' import { SASjsRequest } from '../types' import { ExtraResponseAttributes } from '@sasjs/utils/types' import { asyncForEach, parseGeneratedCode, parseSourceCode } from '../utils' @@ -11,7 +11,7 @@ export interface JobExecutor { data: any, config: any, loginRequiredCallback?: any, - accessToken?: string, + authConfig?: AuthConfig, extraResponseAttributes?: ExtraResponseAttributes[] ) => Promise resendWaitingRequests: () => Promise @@ -30,7 +30,7 @@ export abstract class BaseJobExecutor implements JobExecutor { data: any, config: any, loginRequiredCallback?: any, - accessToken?: string | undefined, + authConfig?: AuthConfig | undefined, extraResponseAttributes?: ExtraResponseAttributes[] ): Promise