1
0
mirror of https://github.com/sasjs/server.git synced 2026-01-08 07:00:04 +00:00

feat: on startup add webout.sas file in sasautos folder

This commit is contained in:
2022-11-17 17:03:23 +05:00
parent 1b7ccda6e9
commit 200f6c596a
5 changed files with 38 additions and 9 deletions

View File

@@ -0,0 +1,18 @@
import path from 'path'
import { createFile } from '@sasjs/utils'
import { getMacrosFolder } from './file'
const fileContent = `%macro webout(action,ds,dslabel=,fmt=,missing=NULL,showmeta=NO,maxobs=MAX);
%ms_webout(&action,ds=&ds,dslabel=&dslabel,fmt=&fmt
,missing=&missing
,showmeta=&showmeta
,maxobs=&maxobs
)
%mend;`
export const createWeboutSasFile = async () => {
const macrosDrivePath = getMacrosFolder()
console.log(`Creating webout.sas at ${macrosDrivePath}`)
const filePath = path.join(macrosDrivePath, 'webout.sas')
await createFile(filePath, fileContent)
}

View File

@@ -1,6 +1,7 @@
export * from './appStreamConfig'
export * from './connectDB'
export * from './copySASjsCore'
export * from './createWeboutSasFile'
export * from './desktopAutoExec'
export * from './extractHeaders'
export * from './extractName'

View File

@@ -1,7 +1,9 @@
import { createFolder } from '@sasjs/utils'
import { getFilesFolder, getPackagesFolder } from './file'
export const setupFolders = async () => {
export const setupFilesFolder = async () =>
await createFolder(getFilesFolder())
export const setupPackagesFolder = async () =>
await createFolder(getPackagesFolder())
}