blob: d17789ba828d4a79545d4cb163a83f9510d6023d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
import {join} from 'path';
export const createDatabasePath = (directory: string) => join(directory, 'db.sqlite');
const createDatabaseUrl = (directory: string) => {
const url = `file:${createDatabasePath(directory)}`;
if (process.platform === 'win32') {
return url.replaceAll(/\\/g, '\\\\');
}
return url;
};
export default createDatabaseUrl;
|