mirror of
https://github.com/BluemediaDev/muse.git
synced 2025-05-09 19:51:36 +02:00
Merge branch 'master' into feature/slash-commands
This commit is contained in:
commit
b9e21222f5
4 changed files with 22 additions and 4 deletions
|
@ -40,7 +40,7 @@ export default class Config {
|
|||
if (typeof value === 'number') {
|
||||
this[key as ConditionalKeys<typeof CONFIG_MAP, number>] = value;
|
||||
} else if (typeof value === 'string') {
|
||||
this[key as ConditionalKeys<typeof CONFIG_MAP, string>] = value;
|
||||
this[key as ConditionalKeys<typeof CONFIG_MAP, string>] = value.trim();
|
||||
} else if (typeof value === 'boolean') {
|
||||
this[key as ConditionalKeys<typeof CONFIG_MAP, boolean>] = value;
|
||||
} else {
|
||||
|
|
|
@ -2,6 +2,14 @@ import {join} from 'path';
|
|||
|
||||
export const createDatabasePath = (directory: string) => join(directory, 'db.sqlite');
|
||||
|
||||
const createDatabaseUrl = (directory: string) => `file:${createDatabasePath(directory)}`;
|
||||
const createDatabaseUrl = (directory: string) => {
|
||||
const url = `file:${createDatabasePath(directory)}`;
|
||||
|
||||
if (process.platform === 'win32') {
|
||||
return url.replaceAll(/\\/g, '\\\\');
|
||||
}
|
||||
|
||||
return url;
|
||||
};
|
||||
|
||||
export default createDatabaseUrl;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue