ldap-ts-client
Advanced tools
Comparing version 0.13.0 to 0.13.1
@@ -7,2 +7,9 @@ ### Changelog | ||
#### [v0.13.0](https://github.com/saostad/ldap-ts-client/compare/v0.12.0...v0.13.0) | ||
> 4 June 2020 | ||
- breaking: make reconnect option default value true [`6a9fb83`](https://github.com/saostad/ldap-ts-client/commit/6a9fb83c011c15596ccaaeb66bb524c3ee145c9e) | ||
- doc: change log [`4fc901a`](https://github.com/saostad/ldap-ts-client/commit/4fc901a4731d3745b3b3704f31523dceb89d1187) | ||
#### [v0.12.0](https://github.com/saostad/ldap-ts-client/compare/v0.11.1...v0.12.0) | ||
@@ -9,0 +16,0 @@ |
@@ -12,3 +12,2 @@ "use strict"; | ||
constructor(config) { | ||
var _a; | ||
/** connection status */ | ||
@@ -20,3 +19,7 @@ this.getConnectionStatus = () => { | ||
this.baseDN = config.baseDN; | ||
this.client = ldapjs_1.default.createClient(Object.assign(Object.assign({}, this.config), { reconnect: (_a = config.reconnect) !== null && _a !== void 0 ? _a : true, url: this.config.ldapServerUrl, log: this.config.logger })); | ||
let reconnect = true; | ||
if (typeof config.reconnect !== "undefined") { | ||
reconnect = config.reconnect; | ||
} | ||
this.client = ldapjs_1.default.createClient(Object.assign(Object.assign({}, this.config), { reconnect, url: this.config.ldapServerUrl, log: this.config.logger })); | ||
} | ||
@@ -23,0 +26,0 @@ /** @return a connected ldap client that is useful for use flexibility of [ldap.js](http://ldapjs.org/) directly. */ |
{ | ||
"name": "ldap-ts-client", | ||
"version": "0.13.0", | ||
"version": "0.13.1", | ||
"description": "Type-safe LDAP client written in typescript", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -91,5 +91,10 @@ import ldap, { SearchOptions, Control, SearchEntryObject } from "ldapjs"; | ||
let reconnect: any = true; | ||
if (typeof config.reconnect !== "undefined") { | ||
reconnect = config.reconnect; | ||
} | ||
this.client = ldap.createClient({ | ||
...this.config, | ||
reconnect: config.reconnect ?? true, | ||
reconnect, | ||
url: this.config.ldapServerUrl, | ||
@@ -96,0 +101,0 @@ log: this.config.logger, |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
64113
1224