Skip to content
This repository was archived by the owner on Mar 24, 2026. It is now read-only.

Commit 804e7ae

Browse files
feat: initial commit
1 parent 7619b3c commit 804e7ae

File tree

16 files changed

+4729
-0
lines changed

16 files changed

+4729
-0
lines changed

.editorconfig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
root = true
2+
[*]
3+
charset = utf-8
4+
indent_style = space
5+
indent_size = 2

.github/dependabot.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: 'npm'
4+
commit-message:
5+
prefix: 'build(deps-node): '
6+
labels: []
7+
directory: '/'
8+
versioning-strategy: increase-if-necessary
9+
schedule:
10+
interval: 'weekly'
11+
open-pull-requests-limit: 20

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# system files
2+
.DS_Store
3+
4+
# node
5+
node_modules
6+
7+
# typescript
8+
*.tsbuildinfo
9+
10+
# dist
11+
/dist

.npmignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# system files
2+
.DS_Store
3+
4+
# source
5+
/src
6+
7+
# typescript
8+
*.tsbuildinfo
9+
tsconfig.json

.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# needed for phpstorm on windows
2+
node-linker=hoisted

.release-it.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"plugins": {
3+
"release-it-pnpm": {}
4+
},
5+
"git": {
6+
"commitMessage": "chore: release ${version}",
7+
"tagName": "v${version}"
8+
}
9+
}

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# @tony-stark-eth/lucia-mikro-orm-adapter
2+
[Mikro ORM v6](https://mikro-orm.io/) adapter for [Lucia auth v3 library](https://lucia-auth.com/).
3+
4+
## Installation
5+
```bash
6+
npm i -S @tony-stark-eth/lucia-mikro-orm-adapter
7+
```
8+
9+
## Usage
10+
```js
11+
import { lucia } from "lucia";
12+
import { MikroOrmAdapter, User, Session, OAuthProviderAttributes } from "@tony-stark-eth/lucia-mikro-orm-adapter";
13+
14+
export const orm = await MikroORM.init({
15+
// register auth entities
16+
entities: [User, Session, OAuthProviderAttributes],
17+
// ...
18+
});
19+
20+
export const auth = lucia({
21+
adapter: MikroOrmAdapter(orm.em),
22+
// ...
23+
});
24+
```

eslint.config.mjs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import eslint from '@eslint/js';
2+
import tseslint from 'typescript-eslint';
3+
import stylistic from '@stylistic/eslint-plugin';
4+
5+
export default tseslint.config(
6+
eslint.configs.recommended,
7+
...tseslint.configs.recommended,
8+
stylistic.configs.customize({
9+
indent: 2,
10+
quotes: 'single',
11+
semi: true,
12+
jsx: true,
13+
}),
14+
{
15+
ignores: [
16+
'node_modules',
17+
'dist',
18+
'tsconfig.tsbuildinfo',
19+
],
20+
},
21+
);

package.json

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
{
2+
"name": "@tony-stark-eth/lucia-mikro-orm-adapter",
3+
"version": "1.0.0",
4+
"description": "mikro-orm adapter for lucia auth",
5+
"main": "dist/index.js",
6+
"types": "dist/index.d.ts",
7+
"module": "dist/index.js",
8+
"type": "module",
9+
"packageManager": "pnpm@9.10.0",
10+
"engines": {
11+
"pnpm": "^9.0.0"
12+
},
13+
"exports": {
14+
".": "./dist/index.js"
15+
},
16+
"scripts": {
17+
"test": "echo \"Error: no test specified\" && exit 1",
18+
"build": "pnpm run lint:fix && tsc && tsc-alias",
19+
"release": "pnpm run lint:fix && release-it",
20+
"lint": "pnpm run lint:base -- .",
21+
"lint:base": "eslint --cache --cache-location='node_modules/.cache/eslint/'",
22+
"lint:fix": "pnpm run lint:base --fix ."
23+
},
24+
"repository": {
25+
"type": "git",
26+
"url": "git+https://github.com/tony-stark-eth/lucia-mikro-orm-adapter.git"
27+
},
28+
"keywords": [
29+
"lucia",
30+
"lucia-auth",
31+
"mikro-orm",
32+
"adapter",
33+
"lucia-auth-adapter"
34+
],
35+
"author": "tony-stark-eth",
36+
"license": "BSD-3-Clause",
37+
"bugs": {
38+
"url": "https://github.com/tony-stark-eth/lucia-mikro-orm-adapter/issues"
39+
},
40+
"homepage": "https://github.com/tony-stark-eth/lucia-mikro-orm-adapter#readme",
41+
"peerDependencies": {
42+
"@mikro-orm/core": "^6.3.10",
43+
"lucia": "^3.2.0"
44+
},
45+
"devDependencies": {
46+
"@eslint/js": "^9.11.1",
47+
"@mikro-orm/core": "^6.3.10",
48+
"@stylistic/eslint-plugin": "^2.8.0",
49+
"@types/eslint__js": "^8.42.3",
50+
"@types/node": "^22.7.1",
51+
"@types/uuid": "^10.0.0",
52+
"eslint": "^9.11.1",
53+
"lucia": "^3.2.0",
54+
"release-it": "^17.6.0",
55+
"release-it-pnpm": "^4.6.3",
56+
"tsc-alias": "^1.8.10",
57+
"typescript": "^5.6.2",
58+
"typescript-eslint": "^8.7.0"
59+
},
60+
"dependencies": {
61+
"uuid": "^10.0.0"
62+
},
63+
"publishConfig": {
64+
"access": "public"
65+
}
66+
}

0 commit comments

Comments
 (0)