@jazim/test 2.0.5 → 2.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -41
- package/package.json +7 -4
package/README.md
CHANGED
|
@@ -385,35 +385,6 @@ try {
|
|
|
385
385
|
}
|
|
386
386
|
```
|
|
387
387
|
|
|
388
|
-
## TypeORM Integration
|
|
389
|
-
|
|
390
|
-
### Running Migrations
|
|
391
|
-
|
|
392
|
-
You can use TypeORM CLI to run migrations:
|
|
393
|
-
|
|
394
|
-
```bash
|
|
395
|
-
# Run migrations
|
|
396
|
-
npx typeorm migration:run -d ./data-source.ts
|
|
397
|
-
|
|
398
|
-
# Revert migrations
|
|
399
|
-
npx typeorm migration:revert -d ./data-source.ts
|
|
400
|
-
|
|
401
|
-
# Show migrations
|
|
402
|
-
npx typeorm migration:show -d ./data-source.ts
|
|
403
|
-
```
|
|
404
|
-
|
|
405
|
-
### Accessing Entities
|
|
406
|
-
|
|
407
|
-
You can access the generated entities in your application:
|
|
408
|
-
|
|
409
|
-
```typescript
|
|
410
|
-
import { User } from "./entities/auth";
|
|
411
|
-
import { dataSource } from "./data-source";
|
|
412
|
-
|
|
413
|
-
const userRepository = dataSource.getRepository(User);
|
|
414
|
-
const users = await userRepository.find();
|
|
415
|
-
```
|
|
416
|
-
|
|
417
388
|
## Database Schema
|
|
418
389
|
|
|
419
390
|
The adapter creates the following tables (default names):
|
|
@@ -434,18 +405,6 @@ Each table is fully compatible with Better Auth's requirements and supports all
|
|
|
434
405
|
5. **Custom Entities**: If using custom entity names, ensure consistency across your application
|
|
435
406
|
6. **Transaction Support**: Enable transactions for critical operations
|
|
436
407
|
|
|
437
|
-
## Troubleshooting
|
|
438
|
-
|
|
439
|
-
### Entities Not Found
|
|
440
|
-
|
|
441
|
-
Make sure your TypeORM configuration includes the correct entity paths:
|
|
442
|
-
|
|
443
|
-
```typescript
|
|
444
|
-
entities: ["./entities/**/*.ts"], // Development
|
|
445
|
-
// or
|
|
446
|
-
entities: ["./dist/entities/**/*.js"], // Production
|
|
447
|
-
```
|
|
448
|
-
|
|
449
408
|
### Migration Errors
|
|
450
409
|
|
|
451
410
|
If migrations fail:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jazim/test",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.6",
|
|
4
4
|
"description": "TypeORM adapter for Better-Auth",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -30,7 +30,11 @@
|
|
|
30
30
|
"authentication",
|
|
31
31
|
"auth"
|
|
32
32
|
],
|
|
33
|
-
"
|
|
33
|
+
"homepage": "https://github.com/jazimabbas/typeorm-better-auth#readme",
|
|
34
|
+
"repository": {
|
|
35
|
+
"url": "https://github.com/jazimabbas/typeorm-better-auth"
|
|
36
|
+
},
|
|
37
|
+
"author": "Jazim Abbas",
|
|
34
38
|
"license": "MIT",
|
|
35
39
|
"peerDependencies": {
|
|
36
40
|
"better-auth": ">=1.4.0",
|
|
@@ -49,7 +53,6 @@
|
|
|
49
53
|
"vitest": "^4.0.16"
|
|
50
54
|
},
|
|
51
55
|
"dependencies": {
|
|
52
|
-
"ejs": "^3.1.9"
|
|
53
|
-
"handlebars": "^4.7.8"
|
|
56
|
+
"ejs": "^3.1.9"
|
|
54
57
|
}
|
|
55
58
|
}
|