mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
Fix: prettier config in resources\ not being standard.
This commit is contained in:
1 parent
d56112a0cb
commit
ec1451a9aa
28 files changed
+349
-349
No files matched your search
@@ -1,7 +1,7 @@
|
||||
export const CONNECTION_STRING = "mysql_connection_string";
|
||||
export const CONNECTION_STRING = 'mysql_connection_string';
|
||||
export const DEFAULT_PORT = 3306;
|
||||
export const DEFAULT_HOST = "localhost";
|
||||
export const DEFAULT_USER = "root";
|
||||
export const DEFAULT_HOST = 'localhost';
|
||||
export const DEFAULT_USER = 'root';
|
||||
|
||||
interface Map {
|
||||
[key: string]: string;
|
||||
@@ -12,7 +12,7 @@ interface Map {
|
||||
* @param connectionString - mysql_connection_string value
|
||||
*/
|
||||
export function parseSemiColonFormat(connectionString: string): Map {
|
||||
const parts = connectionString.split(";");
|
||||
const parts = connectionString.split(';');
|
||||
if (parts.length === 1) {
|
||||
throw new Error(
|
||||
`Connection string ${connectionString} is in the incorrect format. Please follow the README.`
|
||||
@@ -20,7 +20,7 @@ export function parseSemiColonFormat(connectionString: string): Map {
|
||||
}
|
||||
|
||||
return parts.reduce((connectionInfo: Map, part) => {
|
||||
const [key, value] = part.split("=");
|
||||
const [key, value] = part.split('=');
|
||||
connectionInfo[key] = value;
|
||||
return connectionInfo;
|
||||
}, {});
|
||||
@@ -34,7 +34,7 @@ export function getServerHost(config: Map): string {
|
||||
return (
|
||||
config.host ||
|
||||
config.server ||
|
||||
config["data source"] ||
|
||||
config['data source'] ||
|
||||
config.datasource ||
|
||||
config.addr ||
|
||||
config.address ||
|
||||
@@ -49,9 +49,9 @@ export function getServerHost(config: Map): string {
|
||||
export function getUserId(config: Map): string {
|
||||
return (
|
||||
config.user ||
|
||||
config["user id"] ||
|
||||
config['user id'] ||
|
||||
config.userid ||
|
||||
config["user name"] ||
|
||||
config['user name'] ||
|
||||
config.username ||
|
||||
config.uid ||
|
||||
DEFAULT_USER
|
||||
|
||||
Reference in new issue
Block a user