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

Merge pull request #103 from sasjs/executable-macros-fix

Executable macros fix
This commit is contained in:
Muhammad Saad
2022-03-23 18:07:01 +05:00
committed by GitHub
6 changed files with 5 additions and 18 deletions

View File

@@ -29,6 +29,7 @@
"assets": [
"./build/public/**/*",
"./build/sasjsbuild/**/*",
"./build/sasjscore/**/*",
"./web/build/**/*"
],
"targets": [

View File

@@ -7,7 +7,6 @@ import cors from 'cors'
import {
connectDB,
copySASjsCore,
getWebBuildFolderPath,
loadAppStreamConfig,
sasJSCoreMacros,
@@ -43,8 +42,6 @@ const onError: ErrorRequestHandler = (err, req, res, next) => {
}
export default setProcessVariables().then(async () => {
await copySASjsCore()
// loading these modules after setting up variables due to
// multer's usage of process var process.driveLoc
const { setupRoutes } = await import('./routes/setupRoutes')

View File

@@ -13,9 +13,9 @@ import {
extractHeaders,
generateFileUploadSasCode,
getTmpFilesFolderPath,
getTmpMacrosPath,
HTTPHeaders,
isDebugOn
isDebugOn,
sasJSCoreMacros
} from '../../utils'
export interface ExecutionVars {
@@ -106,7 +106,7 @@ export class ExecutionController {
`
program = `
options insert=(SASAUTOS="${getTmpMacrosPath()}");
options insert=(SASAUTOS="${sasJSCoreMacros}");
/* runtime vars */
${varStatments}

View File

@@ -1,8 +0,0 @@
import { copy } from '@sasjs/utils'
import { getTmpMacrosPath, sasJSCoreMacros } from '.'
export const copySASjsCore = async () => {
const macrosDrivePath = getTmpMacrosPath()
await copy(sasJSCoreMacros, macrosDrivePath)
}

View File

@@ -18,8 +18,6 @@ export const getTmpFolderPath = () => process.driveLoc
export const getTmpAppStreamConfigPath = () =>
path.join(getTmpFolderPath(), 'appStreamConfig.json')
export const getTmpMacrosPath = () => path.join(getTmpFolderPath(), 'sasjscore')
export const getTmpUploadsPath = () => path.join(getTmpFolderPath(), 'uploads')
export const getTmpFilesFolderPath = () =>

View File

@@ -1,14 +1,13 @@
export * from './appStreamConfig'
export * from './connectDB'
export * from './copySASjsCore'
export * from './extractHeaders'
export * from './file'
export * from './generateAccessToken'
export * from './generateAuthCode'
export * from './generateRefreshToken'
export * from './isDebugOn'
export * from './getCertificates'
export * from './getDesktopFields'
export * from './isDebugOn'
export * from './parseLogToArray'
export * from './removeTokensInDB'
export * from './saveTokensInDB'