diff options
| author | Max Isom <[email protected]> | 2022-02-05 13:11:32 -0500 |
|---|---|---|
| committer | Max Isom <[email protected]> | 2022-02-05 13:11:32 -0500 |
| commit | b9e21222f58882fda0abe2b56c94efd8e3044e91 (patch) | |
| tree | dcb88700a7bea1735708c8448c4a79573e29bda4 | |
| parent | d1228eb6417a8256ec818398d830cf9e862ba9c3 (diff) | |
| parent | e883275d831f3d9bf3a57bd91e0deeeaf4951242 (diff) | |
| download | muse-b9e21222f58882fda0abe2b56c94efd8e3044e91.tar.xz muse-b9e21222f58882fda0abe2b56c94efd8e3044e91.zip | |
Merge branch 'master' into feature/slash-commands
| -rw-r--r-- | CHANGELOG.md | 12 | ||||
| -rw-r--r-- | package.json | 2 | ||||
| -rw-r--r-- | src/services/config.ts | 2 | ||||
| -rw-r--r-- | src/utils/create-database-url.ts | 10 |
4 files changed, 22 insertions, 4 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 409b96c..ea445de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Migrated to [Slash Commands](https://support.discord.com/hc/en-us/articles/1500000368501-Slash-Commands-FAQ) - The queue embed now automatically updates every 5 seconds (and has buttons for quick interactions) +## [0.5.4] - 2022-02-01 +### Fixed +- Prisma no longer causes a crash when running on Windows + +## [0.5.3] - 2022-02-01 +### Changed +- Environment variable values are now trimmed (whitespace is removed) + ## [0.5.2] - 2022-01-29 ### Fixed - Playing livestreams now works again @@ -57,7 +65,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Initial release -[Unreleased]: https://github.com/codetheweb/muse/compare/v0.5.2...HEAD +[Unreleased]: https://github.com/codetheweb/muse/compare/v0.5.4...HEAD +[0.5.4]: https://github.com/codetheweb/muse/compare/v0.5.3...v0.5.4 +[0.5.3]: https://github.com/codetheweb/muse/compare/v0.5.2...v0.5.3 [0.5.2]: https://github.com/codetheweb/muse/compare/v0.5.1...v0.5.2 [0.5.1]: https://github.com/codetheweb/muse/compare/v0.5.0...v0.5.1 [0.5.0]: https://github.com/codetheweb/muse/compare/v0.4.0...v0.5.0 diff --git a/package.json b/package.json index cfe54d4..8b45124 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "muse", - "version": "0.5.2", + "version": "0.5.4", "description": "🎧 a self-hosted Discord music bot that doesn't suck ", "exports": "./dist/src/index.js", "repository": "[email protected]:codetheweb/muse.git", diff --git a/src/services/config.ts b/src/services/config.ts index 82cffee..cd56915 100644 --- a/src/services/config.ts +++ b/src/services/config.ts @@ -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 { diff --git a/src/utils/create-database-url.ts b/src/utils/create-database-url.ts index becc973..d17789b 100644 --- a/src/utils/create-database-url.ts +++ b/src/utils/create-database-url.ts @@ -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; |
