ldap-async
Advanced tools
Comparing version 1.0.2 to 1.0.3
{ | ||
"name": "ldap-async", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "A wrapper around ldapjs to provide promises, pooling, config by environment, and other conveniences.", | ||
@@ -8,30 +8,27 @@ "main": "index.js", | ||
"scripts": { | ||
"prepublishOnly": "echo 'Must use command npm run pub' && exit 1", | ||
"build": "rm -rf ./lib && tsc", | ||
"prepublishOnly": "node prepublish.js", | ||
"build": "rm -rf ./lib && tsc && cp package.json ./lib/ && cp README.md ./lib/ && cp LICENSE ./lib/ && cp prepublish.js ./lib/", | ||
"mocha": "mocha -r ts-node/register test/**/*.ts --exit", | ||
"test": "./test.sh", | ||
"pub": "npm run build && cp package.json ./lib/ && cp README.md ./lib/ && cp LICENSE ./lib/ && cd ./lib && npm publish --ignore-scripts" | ||
"pub": "npm run build && cd ./lib && RELEASE_MODE=true npm publish" | ||
}, | ||
"dependencies": { | ||
"ldapjs": "^2.2.1", | ||
"@types/ldapjs": "^1.0.9" | ||
"ldapjs": "^2.3.1", | ||
"@types/ldapjs": "^2.2.0" | ||
}, | ||
"devDependencies": { | ||
"@types/chai": "^4.2.14", | ||
"@types/chai-as-promised": "^7.1.3", | ||
"@types/mocha": "^8.0.3", | ||
"@types/node": "^14.14.6", | ||
"@types/mocha": "^9.0.0", | ||
"@types/node": "^16.6.1", | ||
"@typescript-eslint/eslint-plugin": "^4.6.1", | ||
"@typescript-eslint/parser": "^4.6.1", | ||
"chai": "^4.2.0", | ||
"chai-as-promised": "^7.1.1", | ||
"eslint": "^7.12.1", | ||
"eslint-config-standard-with-typescript": "^19.0.1", | ||
"eslint-config-standard-with-typescript": "^20.0.0", | ||
"eslint-plugin-import": "^2.22.1", | ||
"eslint-plugin-node": "^11.1.0", | ||
"eslint-plugin-promise": "^4.2.1", | ||
"eslint-plugin-standard": "^4.0.2", | ||
"mocha": "^8.2.1", | ||
"ts-node": "^9.0.0", | ||
"typescript": "^4.0.5" | ||
"eslint-plugin-promise": "^5.1.0", | ||
"mocha": "^9.0.3", | ||
"ts-node": "^10.2.0", | ||
"typescript": "^4.3.5" | ||
}, | ||
@@ -38,0 +35,0 @@ "repository": { |
# Overview | ||
This library has a few core principles: | ||
This library is a wrapper around [ldapjs](http://ldapjs.org/) providing convenience with a few core principles: | ||
* Focus on promises and async iterators, do away with callbacks and event-emitting streams | ||
@@ -11,8 +11,22 @@ * Always use a connection pool | ||
An Ldap instance represents a connection pool. You will want to make a single pool and export it so that it can | ||
be imported all over your code. | ||
be imported in any other code file in your project. | ||
```javascript | ||
import Ldap from 'ldap-async' | ||
export const ldap = new Ldap({ | ||
// either | ||
url: 'ldap://yourhost:10389', | ||
// or | ||
host: 'yourhost', | ||
... | ||
port: 10389, | ||
secure: false, | ||
// optional pool size (default is 5 simultaneous connections) | ||
poolSize: 5, | ||
// then your login and password | ||
bindDN: 'cn=root', | ||
bindCredentials: 'secret', | ||
// and any other options supported by ldapjs | ||
timeout: 30000 | ||
}) | ||
@@ -19,0 +33,0 @@ |
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
21320
14
8
302
156
+ Added@types/ldapjs@2.2.5(transitive)
- Removed@types/ldapjs@1.0.11(transitive)
Updated@types/ldapjs@^2.2.0
Updatedldapjs@^2.3.1