From 547ceb6fa1f4e2f3994b040be4cfe1b6e81dc392 Mon Sep 17 00:00:00 2001 From: James Sumners Date: Wed, 22 Feb 2023 12:28:36 -0500 Subject: [PATCH] Update deps --- examples/inmemory.js | 2 +- lib/client/client.js | 34 +++++++++++++++++----------------- lib/client/index.js | 2 +- lib/client/search_pager.js | 2 +- lib/errors/index.js | 2 +- lib/index.js | 14 +++++++------- lib/messages/index.js | 4 ++-- lib/messages/parser.js | 4 ++-- lib/persistent_search.js | 6 +++--- package.json | 37 +++++++++++++++++++------------------ 10 files changed, 54 insertions(+), 53 deletions(-) diff --git a/examples/inmemory.js b/examples/inmemory.js index c13ee6a..000641b 100644 --- a/examples/inmemory.js +++ b/examples/inmemory.js @@ -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] }) } diff --git a/lib/client/client.js b/lib/client/client.js index 1dbde42..ff81b01 100644 --- a/lib/client/client.js +++ b/lib/client/client.js @@ -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() diff --git a/lib/client/index.js b/lib/client/index.js index fb9db3a..64f2a69 100644 --- a/lib/client/index.js +++ b/lib/client/index.js @@ -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') diff --git a/lib/client/search_pager.js b/lib/client/search_pager.js index e3ae992..a9befc2 100644 --- a/lib/client/search_pager.js +++ b/lib/client/search_pager.js @@ -137,7 +137,7 @@ SearchPager.prototype._nextPage = function _nextPage (cookie) { controls.push(new PagedResultsControl({ value: { size: this.pageSize, - cookie: cookie + cookie } })) diff --git a/lib/errors/index.js b/lib/errors/index.js index 07c5745..203a98b 100644 --- a/lib/errors/index.js +++ b/lib/errors/index.js @@ -86,7 +86,7 @@ Object.keys(CODES).forEach(function (code) { }) ERRORS[CODES[code]] = { - err: err, + err, message: msg } }) diff --git a/lib/index.js b/lib/index.js index f410452..e49ada0 100644 --- a/lib/index.js +++ b/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 } diff --git a/lib/messages/index.js b/lib/messages/index.js index 78b33eb..8baa126 100644 --- a/lib/messages/index.js +++ b/lib/messages/index.js @@ -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 } diff --git a/lib/messages/parser.js b/lib/messages/parser.js index 066cfe9..307d4e5 100644 --- a/lib/messages/parser.js +++ b/lib/messages/parser.js @@ -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 }) } diff --git a/lib/persistent_search.js b/lib/persistent_search.js index db0ac3e..ecfdc75 100644 --- a/lib/persistent_search.js +++ b/lib/persistent_search.js @@ -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 } diff --git a/package.json b/package.json index 60689e3..c2c19a5 100644 --- a/package.json +++ b/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",