diff --git a/api/package.json b/api/package.json index 346bb49..25395ec 100644 --- a/api/package.json +++ b/api/package.json @@ -29,6 +29,7 @@ "assets": [ "./build/public/**/*", "./build/sasjsbuild/**/*", + "./build/sasjscore/**/*", "./web/build/**/*" ], "targets": [ diff --git a/api/src/app.ts b/api/src/app.ts index 9fdf244..17350ee 100644 --- a/api/src/app.ts +++ b/api/src/app.ts @@ -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') diff --git a/api/src/controllers/internal/Execution.ts b/api/src/controllers/internal/Execution.ts index ff6bdcd..052cc42 100644 --- a/api/src/controllers/internal/Execution.ts +++ b/api/src/controllers/internal/Execution.ts @@ -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} diff --git a/api/src/utils/copySASjsCore.ts b/api/src/utils/copySASjsCore.ts deleted file mode 100644 index 3d3d553..0000000 --- a/api/src/utils/copySASjsCore.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { copy } from '@sasjs/utils' - -import { getTmpMacrosPath, sasJSCoreMacros } from '.' - -export const copySASjsCore = async () => { - const macrosDrivePath = getTmpMacrosPath() - await copy(sasJSCoreMacros, macrosDrivePath) -} diff --git a/api/src/utils/file.ts b/api/src/utils/file.ts index 42bb12c..2cce265 100644 --- a/api/src/utils/file.ts +++ b/api/src/utils/file.ts @@ -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 = () => diff --git a/api/src/utils/index.ts b/api/src/utils/index.ts index 80b3580..1527080 100644 --- a/api/src/utils/index.ts +++ b/api/src/utils/index.ts @@ -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'