+11
-2
@@ -1,12 +1,21 @@
|
||||
import { promises as fs } from 'fs';
|
||||
import { resolve, join } from 'path';
|
||||
|
||||
import { getExecutorFilePath } from 'src/engine/core-modules/logic-function/logic-function-drivers/utils/get-executor-file-path';
|
||||
import { ASSET_PATH } from 'src/constants/assets-path';
|
||||
|
||||
const EXECUTOR_FILE_PATH = resolve(
|
||||
__dirname,
|
||||
join(
|
||||
ASSET_PATH,
|
||||
`engine/core-modules/logic-function/logic-function-drivers/constants/executor`,
|
||||
),
|
||||
);
|
||||
|
||||
export const copyExecutor = async (buildDirectory: string) => {
|
||||
await fs.mkdir(buildDirectory, {
|
||||
recursive: true,
|
||||
});
|
||||
await fs.cp(getExecutorFilePath(), buildDirectory, {
|
||||
await fs.cp(EXECUTOR_FILE_PATH, buildDirectory, {
|
||||
recursive: true,
|
||||
});
|
||||
};
|
||||
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
import path from 'path';
|
||||
|
||||
import { ASSET_PATH } from 'src/constants/assets-path';
|
||||
|
||||
export const getExecutorFilePath = (): string => {
|
||||
const baseTypescriptProjectPath = path.join(
|
||||
ASSET_PATH,
|
||||
`engine/core-modules/logic-function/logic-function-drivers/constants/executor`,
|
||||
);
|
||||
|
||||
return path.resolve(__dirname, baseTypescriptProjectPath);
|
||||
};
|
||||
Reference in New Issue
Block a user