forked from charmverse/app.charmverse.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
copyPrismaFiles.js
20 lines (16 loc) · 865 Bytes
/
copyPrismaFiles.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
const fs = require('fs');
const path = require('path');
const sourceDir = path.join(__dirname, 'node_modules', '.prisma', 'client');
const targetDir = path.join(__dirname, 'serverless');
const copyPrismaFiles = () => {
const sourceFile = path.join(sourceDir, 'libquery_engine-rhel-openssl-1.0.x.so.node');
const targetFile = path.join(targetDir, 'libquery_engine-rhel-openssl-1.0.x.so.node');
fs.copyFileSync(sourceFile, targetFile);
// const source2File = path.join(sourceDir, 'libquery_engine-darwin-arm64.dylib.node');
// const target2File = path.join(targetDir, 'libquery_engine-darwin-arm64.dylib.node');
// fs.copyFileSync(source2File, target2File);
const sourceSchema = path.join(sourceDir, 'schema.prisma');
const targetSchema = path.join(targetDir, 'schema.prisma');
fs.copyFileSync(sourceSchema, targetSchema);
};
copyPrismaFiles();