From 6f4b813efbaeb869c9d18177f11ed458e636e573 Mon Sep 17 00:00:00 2001 From: Matthew Peveler Date: Fri, 22 Jan 2021 23:09:41 -0500 Subject: [PATCH] fix typing of encrypt and appName mssql settings (#7) Signed-off-by: Matthew Peveler --- src/adapters/sqlserver.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/adapters/sqlserver.ts b/src/adapters/sqlserver.ts index 6f064b9..0c7c4d3 100644 --- a/src/adapters/sqlserver.ts +++ b/src/adapters/sqlserver.ts @@ -56,20 +56,20 @@ export default class SqlServerAdapter extends AbstractAdapter { } configDatabase(): config { - const config = { + const config: config = { user: this.server.config.user, password: this.server.config.password, server: this.server.config.host, database: this.database.database, port: this.server.config.port, requestTimeout: Infinity, - appName: this.server.config.applicationName || 'sqlectron', domain: this.server.config.domain, pool: { max: 5, }, options: { - encrypt: this.server.config.ssl, + encrypt: !!this.server.config.ssl, + appName: this.server.config.applicationName || 'sqlectron', enableArithAbort: true, }, }; @@ -79,7 +79,7 @@ export default class SqlServerAdapter extends AbstractAdapter { config.port = this.server.config.localPort; } - return config; + return config; } async connect(): Promise {