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:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ export interface ExecutionQuery {
|
||||
_program: string
|
||||
macroVars?: MacroVars
|
||||
_debug?: number
|
||||
_returnLog?: boolean
|
||||
}
|
||||
|
||||
export interface FileQuery {
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user