Skip to content

Commit 976d1e8

Browse files
committed
initial commit
Signed-off-by: Matthew Peveler <[email protected]>
1 parent ef73f35 commit 976d1e8

File tree

10 files changed

+6394
-1
lines changed

10 files changed

+6394
-1
lines changed

.github/workflows/publish.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Publish
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
permissions:
8+
contents: write
9+
10+
jobs:
11+
publish:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: actions/setup-node@v4
16+
with:
17+
node-version: 20
18+
registry-url: https://registry.npmjs.org/
19+
20+
- run: npm ci
21+
22+
- run: npm publish
23+
env:
24+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

.github/workflows/test.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
node-version: [18.x, 20.x, 22.x, 23.x]
16+
steps:
17+
- uses: actions/checkout@v4
18+
- uses: actions/setup-node@v4
19+
with:
20+
cache: npm
21+
node-version: ${{ matrix.node-version }}
22+
- run: npm ci
23+
- run: npm test
24+
- run: npm build

README.md

+24-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,25 @@
11
# mysql2-auth-ed25519
2-
mysql2 auth plugin for ed25519
2+
3+
Repository provides [MariaDB's ed25519 plugin](https://mariadb.com/kb/en/authentication-plugin-ed25519/)
4+
to use as an auth plugin to [mysql2](https://www.npmjs.com/package/mysql2).
5+
6+
The code provided is a fork from
7+
[mariadb-connector-nodejs/lib/cmd/handshake/auth/ed25519-password-auth.js](https://github.com/mariadb-corporation/mariadb-connector-nodejs/blob/master/lib/cmd/handshake/auth/ed25519-password-auth.js#L1)
8+
9+
## Installation
10+
11+
```bash
12+
npm install @corejs/mysql2-auth-ed255119
13+
```
14+
15+
## Usage
16+
17+
```js
18+
const authPlugin = require('@coresql/mysql2-auth-ed25519');
19+
const client = mysql.createConnection({
20+
authPlugins: {
21+
'client_ed25519': authPlugin(),
22+
},
23+
// other settings
24+
});
25+
```

jest.config.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
transform: {
3+
'^.+\\.(t|j)sx?$': '@swc/jest',
4+
},
5+
}

0 commit comments

Comments
 (0)