mirror of
https://github.com/sasjs/server.git
synced 2025-12-11 03:34:35 +00:00
fix: macros are available Sessions with SASAUTOS
This commit is contained in:
@@ -21,7 +21,6 @@ const compiledSystemInit = async (systemInit: string) =>
|
||||
}))
|
||||
|
||||
const createSysInitFile = async () => {
|
||||
console.log('macroCorePath', macroCorePath)
|
||||
const systemInitContent = await readFile(
|
||||
path.join(__dirname, 'systemInit.sas')
|
||||
)
|
||||
|
||||
25
api/scripts/copySASjsCore.ts
Normal file
25
api/scripts/copySASjsCore.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import path from 'path'
|
||||
import { asyncForEach, copy, createFolder, deleteFolder } from '@sasjs/utils'
|
||||
|
||||
import { apiRoot, sasJSCoreMacros } from '../src/utils'
|
||||
|
||||
const macroCorePath = path.join(apiRoot, 'node_modules', '@sasjs', 'core')
|
||||
|
||||
export const copySASjsCore = async () => {
|
||||
await deleteFolder(sasJSCoreMacros)
|
||||
await createFolder(sasJSCoreMacros)
|
||||
|
||||
console.log('Copying SASjs Core Macros...')
|
||||
|
||||
const foldersToCopy = ['base', 'ddl', 'fcmp', 'lua', 'server']
|
||||
|
||||
await asyncForEach(foldersToCopy, async (coreSubFolder) => {
|
||||
const coreSubFolderPath = path.join(macroCorePath, coreSubFolder)
|
||||
|
||||
await copy(coreSubFolderPath, sasJSCoreMacros)
|
||||
})
|
||||
|
||||
console.log('Macros available at: ', sasJSCoreMacros)
|
||||
}
|
||||
|
||||
copySASjsCore()
|
||||
Reference in New Issue
Block a user