1
0
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:
Saad Jutt
2022-03-06 01:57:14 +05:00
parent 5ba7661a83
commit 95843fa4c7
7 changed files with 41 additions and 6 deletions

View 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()