1
0
mirror of https://github.com/sasjs/server.git synced 2025-12-10 19:34:34 +00:00

chore(execution): roll back changes related to returnLog var

This commit is contained in:
Yury Shkoda
2022-02-14 15:43:56 +03:00
parent f2000a1227
commit fde4bc051d
3 changed files with 4 additions and 9 deletions

View File

@@ -6,7 +6,7 @@ import { PreProgramVars, TreeNode } from '../../types'
import { generateFileUploadSasCode, getTmpFilesFolderPath } from '../../utils'
export interface ExecutionVars {
[key: string]: string | number | undefined | boolean
[key: string]: string | number | undefined
}
export class ExecutionController {
@@ -56,7 +56,7 @@ export class ExecutionController {
const varStatments = Object.keys(vars).reduce(
(computed: string, key: string) =>
key !== '_returnLog' ? `${computed}%let ${key}=${vars[key]};\n` : '',
`${computed}%let ${key}=${vars[key]};\n`,
''
)
@@ -135,11 +135,7 @@ ${program}`
return {
webout,
log:
(debugValue && debugValue >= 131) ||
session.crashed ||
Object.keys(vars).includes('_returnLog')
? log
: undefined
(debugValue && debugValue >= 131) || session.crashed ? log : undefined
}
}

View File

@@ -4,7 +4,6 @@ export interface ExecutionQuery {
_program: string
macroVars?: MacroVars
_debug?: number
_returnLog?: boolean
}
export interface FileQuery {

View File

@@ -86,5 +86,5 @@ export const executeProgramRawValidation = (data: any): Joi.ValidationResult =>
Joi.object({
_program: Joi.string().required()
})
.pattern(/^/, Joi.alternatives(Joi.string(), Joi.number(), Joi.boolean()))
.pattern(/^/, Joi.alternatives(Joi.string(), Joi.number()))
.validate(data)