mirror of
https://github.com/sasjs/server.git
synced 2026-04-09 15:13:13 +00:00
fix: macros are available Sessions with SASAUTOS
This commit is contained in:
@@ -13,7 +13,8 @@ import {
|
||||
extractHeaders,
|
||||
generateFileUploadSasCode,
|
||||
getTmpFilesFolderPath,
|
||||
HTTPHeaders
|
||||
HTTPHeaders,
|
||||
sasJSCoreMacros
|
||||
} from '../../utils'
|
||||
|
||||
export interface ExecutionVars {
|
||||
@@ -104,6 +105,8 @@ export class ExecutionController {
|
||||
`
|
||||
|
||||
program = `
|
||||
options insert=(SASAUTOS="${sasJSCoreMacros}");
|
||||
|
||||
/* runtime vars */
|
||||
${varStatments}
|
||||
filename _webout "${weboutPath}" mod;
|
||||
|
||||
@@ -67,7 +67,10 @@ export class SessionController {
|
||||
|
||||
// the autoexec file is executed on SAS startup
|
||||
const autoExecPath = path.join(sessionFolder, 'autoexec.sas')
|
||||
const contentForAutoExec = `/* compiled systemInit */\n${compiledSystemInitContent}\n/* autoexec */\n${autoExecContent}`
|
||||
const contentForAutoExec = `/* compiled systemInit */
|
||||
${compiledSystemInitContent}
|
||||
/* autoexec */
|
||||
${autoExecContent}`
|
||||
await createFile(autoExecPath, contentForAutoExec)
|
||||
|
||||
// create empty code.sas as SAS will not start without a SYSIN
|
||||
|
||||
@@ -8,6 +8,8 @@ export const sysInitCompiledPath = path.join(
|
||||
'systemInitCompiled.sas'
|
||||
)
|
||||
|
||||
export const sasJSCoreMacros = path.join(apiRoot, 'sasjscore')
|
||||
|
||||
export const getWebBuildFolderPath = () =>
|
||||
path.join(codebaseRoot, 'web', 'build')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user