Skip to content

Commit 01e162b

Browse files
author
Mathieu Bour
committed
feat(*): first release of @csquare/ldapjs-client
0 parents  commit 01e162b

17 files changed

+9873
-0
lines changed

.github/workflows/publish.yaml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Publish on NPM registry
2+
on:
3+
push:
4+
branches: [main]
5+
tags: ['**']
6+
pull_request:
7+
types: [opened, synchronize]
8+
jobs:
9+
format:
10+
name: Check format with Prettier
11+
runs-on: ubuntu-20.04
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v2
15+
- name: Setup Node.js
16+
uses: actions/setup-node@v2
17+
with:
18+
node-version: '15'
19+
registry-url: https://npm.pkg.github.com
20+
- name: Cache dependencies
21+
uses: actions/cache@v2
22+
with:
23+
path: ~/.npm
24+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
25+
restore-keys: |
26+
${{ runner.os }}-node-
27+
- name: Install NPM dependencies
28+
run: npm install
29+
- name: Run Prettier
30+
run: npm run format:check
31+
publish:
32+
name: Publish to GitHub registry
33+
needs: [format]
34+
if: startsWith(github.ref, 'refs/tags/')
35+
runs-on: ubuntu-20.04
36+
env:
37+
HUSKY: '0'
38+
steps:
39+
- name: Checkout
40+
uses: actions/checkout@v2
41+
- name: Ensure tag validity
42+
run: |
43+
if [ $(jq -r .version package.json) != ${GITHUB_REF/refs\/tags\//} ]; then
44+
echo "Error: $GITHUB_REF does not match package.json version"
45+
exit 1
46+
fi
47+
- name: Setup Node.js
48+
uses: actions/setup-node@v2
49+
with:
50+
node-version: '15'
51+
registry-url: https://npm.pkg.github.com
52+
- name: Cache dependencies
53+
uses: actions/cache@v2
54+
with:
55+
path: ~/.npm
56+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
57+
restore-keys: |
58+
${{ runner.os }}-node-
59+
- name: Install NPM dependencies
60+
run: npm install
61+
- name: Publish new release
62+
uses: JS-DevTools/npm-publish@v1
63+
with:
64+
token: ${{ secrets.NODE_AUTH_TOKEN }}
65+
access: public

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.idea/
2+
dist/
3+
node_modules/

.husky/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_

.husky/commit-msg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx --no-install standard-commithook

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx --no-install lint-staged

.lintstagedrc.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
'**/*.{js,jsx,ts,tsx,json,css,scss,md}':
2+
- prettier --write

.prettierignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.idea/
2+
dist/
3+
node_modules/
4+
package-lock.json

.standard-commitrc.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"types": ["feat", "fix", "chore", "build", "ci", "docs", "perf", "refactor", "revert", "style", "test"],
3+
"promptScope": "suggest",
4+
"scopes": "staged"
5+
}

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2021-present Cohesive Computing SA
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# @csquare/ldapjs-client
2+
3+
Promisified version of the `ldapjs` package with additional typings.
4+
5+
## Acknowledgments
6+
7+
This library heavily relies on the [ldapjs](https://github.com/ldapjs/node-ldapjs) package.
8+
Please see http://ldapjs.org/ for the complete detailed usage.
9+
10+
## Installation
11+
12+
Install with npm:
13+
14+
```shell
15+
npm install --save @csquare/ldapjs-client
16+
```
17+
18+
Install with Yarn:
19+
20+
```shell
21+
yarn add @csquare/ldapjs-client
22+
```
23+
24+
## Usage
25+
26+
```typescript
27+
import { createClient } from '@csquare/ldapjs-client';
28+
29+
(async () => {
30+
const options = {};
31+
const client = createClient(options);
32+
await client.bind(/* args */);
33+
})();
34+
```

0 commit comments

Comments
 (0)