Update deps
This commit is contained in:
parent
0ed048233e
commit
547ceb6fa1
|
@ -130,7 +130,7 @@ server.search(SUFFIX, authorize, function (req, res, next) {
|
|||
case 'base':
|
||||
if (req.filter.matches(db[dn])) {
|
||||
res.send({
|
||||
dn: dn,
|
||||
dn,
|
||||
attributes: db[dn]
|
||||
})
|
||||
}
|
||||
|
|
|
@ -191,7 +191,7 @@ Client.prototype.abandon = function abandon (messageId, controls, callback) {
|
|||
|
||||
const req = new AbandonRequest({
|
||||
abandonId: messageId,
|
||||
controls: controls
|
||||
controls
|
||||
})
|
||||
|
||||
return this._send(req, 'abandon', null, callback)
|
||||
|
@ -247,7 +247,7 @@ Client.prototype.add = function add (name, entry, controls, callback) {
|
|||
const req = new AddRequest({
|
||||
entry: ensureDN(name),
|
||||
attributes: entry,
|
||||
controls: controls
|
||||
controls
|
||||
})
|
||||
|
||||
return this._send(req, [errors.LDAP_SUCCESS], null, callback)
|
||||
|
@ -286,7 +286,7 @@ Client.prototype.bind = function bind (name,
|
|||
name: name || '',
|
||||
authentication: 'Simple',
|
||||
credentials: credentials || '',
|
||||
controls: controls
|
||||
controls
|
||||
})
|
||||
|
||||
// Connection errors will be reported to the bind callback too (useful when the LDAP server is not available)
|
||||
|
@ -329,8 +329,8 @@ Client.prototype.compare = function compare (name,
|
|||
const req = new CompareRequest({
|
||||
entry: ensureDN(name),
|
||||
attribute: attr,
|
||||
value: value,
|
||||
controls: controls
|
||||
value,
|
||||
controls
|
||||
})
|
||||
|
||||
return this._send(req, CMP_EXPECT, null, function (err, res) {
|
||||
|
@ -360,7 +360,7 @@ Client.prototype.del = function del (name, controls, callback) {
|
|||
|
||||
const req = new DeleteRequest({
|
||||
entry: ensureDN(name),
|
||||
controls: controls
|
||||
controls
|
||||
})
|
||||
|
||||
return this._send(req, [errors.LDAP_SUCCESS], null, callback)
|
||||
|
@ -397,7 +397,7 @@ Client.prototype.exop = function exop (name, value, controls, callback) {
|
|||
const req = new ExtendedRequest({
|
||||
requestName: name,
|
||||
requestValue: value,
|
||||
controls: controls
|
||||
controls
|
||||
})
|
||||
|
||||
return this._send(req, [errors.LDAP_SUCCESS], null, function (err, res) {
|
||||
|
@ -471,8 +471,8 @@ Client.prototype.modify = function modify (name, change, controls, callback) {
|
|||
|
||||
const req = new ModifyRequest({
|
||||
object: ensureDN(name),
|
||||
changes: changes,
|
||||
controls: controls
|
||||
changes,
|
||||
controls
|
||||
})
|
||||
|
||||
return this._send(req, [errors.LDAP_SUCCESS], null, callback)
|
||||
|
@ -511,7 +511,7 @@ Client.prototype.modifyDN = function modifyDN (name,
|
|||
const req = new ModifyDNRequest({
|
||||
entry: DN.fromString(name),
|
||||
deleteOldRdn: true,
|
||||
controls: controls
|
||||
controls
|
||||
})
|
||||
|
||||
if (newDN.length !== 1) {
|
||||
|
@ -629,11 +629,11 @@ Client.prototype.search = function search (base,
|
|||
}
|
||||
|
||||
const pager = new SearchPager({
|
||||
callback: callback,
|
||||
controls: controls,
|
||||
callback,
|
||||
controls,
|
||||
pageSize: size,
|
||||
pagePause: pageOpts.pagePause,
|
||||
sendRequest: sendRequest
|
||||
sendRequest
|
||||
})
|
||||
pager.begin()
|
||||
} else {
|
||||
|
@ -723,7 +723,7 @@ Client.prototype.starttls = function starttls (options,
|
|||
self._tracker.parser.write(data)
|
||||
})
|
||||
secure.on('error', function (err) {
|
||||
self.log.trace({ err: err }, 'error event: %s', new Error().stack)
|
||||
self.log.trace({ err }, 'error event: %s', new Error().stack)
|
||||
|
||||
self.emit('error', err)
|
||||
sock.destroy()
|
||||
|
@ -744,7 +744,7 @@ Client.prototype.starttls = function starttls (options,
|
|||
const req = new ExtendedRequest({
|
||||
requestName: '1.3.6.1.4.1.1466.20037',
|
||||
requestValue: null,
|
||||
controls: controls
|
||||
controls
|
||||
})
|
||||
|
||||
return this._send(req,
|
||||
|
@ -857,7 +857,7 @@ Client.prototype.connect = function connect () {
|
|||
function initSocket (server) {
|
||||
tracker = messageTrackerFactory({
|
||||
id: server ? server.href : self.socketPath,
|
||||
parser: new Parser({ log: log })
|
||||
parser: new Parser({ log })
|
||||
})
|
||||
|
||||
// This won't be set on TLS. So. Very. Annoying.
|
||||
|
@ -996,7 +996,7 @@ Client.prototype.connect = function connect () {
|
|||
socket.end()
|
||||
})
|
||||
socket.on('error', function onSocketError (err) {
|
||||
log.trace({ err: err }, 'error event: %s', new Error().stack)
|
||||
log.trace({ err }, 'error event: %s', new Error().stack)
|
||||
|
||||
self.emit('error', err)
|
||||
socket.destroy()
|
||||
|
|
|
@ -4,7 +4,7 @@ const logger = require('../logger')
|
|||
const Client = require('./client')
|
||||
|
||||
module.exports = {
|
||||
Client: Client,
|
||||
Client,
|
||||
createClient: function createClient (options) {
|
||||
if (isObject(options) === false) throw TypeError('options (object) required')
|
||||
if (options.url && typeof options.url !== 'string' && !Array.isArray(options.url)) throw TypeError('options.url (string|array) required')
|
||||
|
|
|
@ -137,7 +137,7 @@ SearchPager.prototype._nextPage = function _nextPage (cookie) {
|
|||
controls.push(new PagedResultsControl({
|
||||
value: {
|
||||
size: this.pageSize,
|
||||
cookie: cookie
|
||||
cookie
|
||||
}
|
||||
}))
|
||||
|
||||
|
|
|
@ -86,7 +86,7 @@ Object.keys(CODES).forEach(function (code) {
|
|||
})
|
||||
|
||||
ERRORS[CODES[code]] = {
|
||||
err: err,
|
||||
err,
|
||||
message: msg
|
||||
}
|
||||
})
|
||||
|
|
14
lib/index.js
14
lib/index.js
|
@ -24,7 +24,7 @@ module.exports = {
|
|||
Client: client.Client,
|
||||
createClient: client.createClient,
|
||||
|
||||
Server: Server,
|
||||
Server,
|
||||
createServer: function (options) {
|
||||
if (options === undefined) { options = {} }
|
||||
|
||||
|
@ -37,21 +37,21 @@ module.exports = {
|
|||
return new Server(options)
|
||||
},
|
||||
|
||||
Attribute: Attribute,
|
||||
Change: Change,
|
||||
Attribute,
|
||||
Change,
|
||||
|
||||
dn: dn,
|
||||
dn,
|
||||
DN: dn.DN,
|
||||
RDN: dn.RDN,
|
||||
parseDN: dn.DN.fromString,
|
||||
|
||||
persistentSearch: persistentSearch,
|
||||
persistentSearch,
|
||||
PersistentSearchCache: persistentSearch.PersistentSearchCache,
|
||||
|
||||
filters: filters,
|
||||
filters,
|
||||
parseFilter: filters.parseString,
|
||||
|
||||
url: url,
|
||||
url,
|
||||
parseURL: url.parse
|
||||
}
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ module.exports = {
|
|||
|
||||
LDAPMessage: messages.LdapMessage,
|
||||
LDAPResult: messages.LdapResult,
|
||||
Parser: Parser,
|
||||
Parser,
|
||||
|
||||
AbandonRequest: messages.AbandonRequest,
|
||||
AbandonResponse: messages.AbandonResponse,
|
||||
|
@ -33,7 +33,7 @@ module.exports = {
|
|||
SearchRequest: messages.SearchRequest,
|
||||
SearchEntry: messages.SearchResultEntry,
|
||||
SearchReference: messages.SearchResultReference,
|
||||
SearchResponse: SearchResponse,
|
||||
SearchResponse,
|
||||
UnbindRequest: messages.UnbindRequest
|
||||
|
||||
}
|
||||
|
|
|
@ -231,7 +231,7 @@ Parser.prototype.getMessage = function (ber) {
|
|||
new Error('Op 0x' + (type ? type.toString(16) : '??') +
|
||||
' not supported'),
|
||||
new LDAPResult({
|
||||
messageId: messageId,
|
||||
messageId,
|
||||
protocolOp: type || Protocol.operations.LDAP_RES_EXTENSION
|
||||
}))
|
||||
|
||||
|
@ -239,7 +239,7 @@ Parser.prototype.getMessage = function (ber) {
|
|||
}
|
||||
|
||||
return new Message({
|
||||
messageId: messageId,
|
||||
messageId,
|
||||
log: self.log
|
||||
})
|
||||
}
|
||||
|
|
|
@ -89,7 +89,7 @@ function getEntryChangeNotificationControl (req, obj) {
|
|||
}
|
||||
|
||||
value.changeNumber = attrs.changenumber
|
||||
return new EntryChangeNotificationControl({ value: value })
|
||||
return new EntryChangeNotificationControl({ value })
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
|
@ -104,6 +104,6 @@ function checkChangeType (req, requestType) {
|
|||
|
||||
module.exports = {
|
||||
PersistentSearchCache: PersistentSearch,
|
||||
checkChangeType: checkChangeType,
|
||||
getEntryChangeNotificationControl: getEntryChangeNotificationControl
|
||||
checkChangeType,
|
||||
getEntryChangeNotificationControl
|
||||
}
|
||||
|
|
37
package.json
37
package.json
|
@ -11,33 +11,34 @@
|
|||
},
|
||||
"main": "lib/index.js",
|
||||
"dependencies": {
|
||||
"@ldapjs/asn1": "2.0.0-rc.4",
|
||||
"@ldapjs/attribute": "1.0.0-rc.5",
|
||||
"@ldapjs/change": "1.0.0-rc.3",
|
||||
"@ldapjs/controls": "2.0.0-rc.1",
|
||||
"@ldapjs/dn": "1.0.0-rc.1",
|
||||
"@ldapjs/filter": "2.0.0-rc.5",
|
||||
"@ldapjs/messages": "1.0.0-rc.3",
|
||||
"@ldapjs/protocol": "^1.0.0",
|
||||
"abstract-logging": "^2.0.0",
|
||||
"@ldapjs/asn1": "2.0.0",
|
||||
"@ldapjs/attribute": "1.0.0",
|
||||
"@ldapjs/change": "1.0.0",
|
||||
"@ldapjs/controls": "2.0.0",
|
||||
"@ldapjs/dn": "1.0.0",
|
||||
"@ldapjs/filter": "2.0.0",
|
||||
"@ldapjs/messages": "1.0.0",
|
||||
"@ldapjs/protocol": "^1.2.1",
|
||||
"abstract-logging": "^2.0.1",
|
||||
"assert-plus": "^1.0.0",
|
||||
"backoff": "^2.5.0",
|
||||
"once": "^1.4.0",
|
||||
"vasync": "^2.2.0",
|
||||
"verror": "^1.8.1"
|
||||
"vasync": "^2.2.1",
|
||||
"verror": "^1.10.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@fastify/pre-commit": "^2.0.2",
|
||||
"eslint": "8.12.0",
|
||||
"eslint-config-standard": "^16.0.2",
|
||||
"eslint-plugin-import": "^2.22.1",
|
||||
"eslint": "8.34.0",
|
||||
"eslint-config-standard": "^17.0.0",
|
||||
"eslint-plugin-import": "^2.27.5",
|
||||
"eslint-plugin-n": "^15.6.1",
|
||||
"eslint-plugin-node": "^11.1.0",
|
||||
"eslint-plugin-promise": "6.0.0",
|
||||
"eslint-plugin-promise": "6.1.1",
|
||||
"front-matter": "^4.0.2",
|
||||
"get-port": "^5.1.1",
|
||||
"highlight.js": "^11.0.1",
|
||||
"marked": "^4.0.0",
|
||||
"tap": "16.0.1"
|
||||
"highlight.js": "^11.7.0",
|
||||
"marked": "^4.2.12",
|
||||
"tap": "16.3.4"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "tap --no-cov -R terse",
|
||||
|
|
Loading…
Reference in New Issue