@anarchitects/auth-nest 0.5.1 → 0.6.0

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.
Files changed (127) hide show
  1. package/README.md +102 -61
  2. package/package.json +24 -4
  3. package/src/application/application.module.js +61 -36
  4. package/src/application/application.module.js.map +1 -1
  5. package/src/application/index.d.ts +0 -2
  6. package/src/application/index.js +0 -2
  7. package/src/application/index.js.map +1 -1
  8. package/src/application/ports/auth-account.repository.d.ts +18 -0
  9. package/src/application/ports/auth-account.repository.js +12 -0
  10. package/src/application/ports/auth-account.repository.js.map +1 -0
  11. package/src/{infrastructure-persistence/repositories → application/ports}/auth-user.repository.d.ts +1 -2
  12. package/src/application/ports/auth-user.repository.js.map +1 -0
  13. package/src/application/resource-authorization.types.d.ts +1 -16
  14. package/src/application/services/auth-engine.port.d.ts +22 -17
  15. package/src/application/services/auth-engine.port.js.map +1 -1
  16. package/src/application/services/auth-orchestration.service.d.ts +15 -10
  17. package/src/application/services/auth-orchestration.service.js +78 -61
  18. package/src/application/services/auth-orchestration.service.js.map +1 -1
  19. package/src/application/services/auth.service.d.ts +10 -7
  20. package/src/application/services/auth.service.js.map +1 -1
  21. package/src/application/services/better-auth-database.port.d.ts +3 -0
  22. package/src/application/services/better-auth-database.port.js +12 -0
  23. package/src/application/services/better-auth-database.port.js.map +1 -0
  24. package/src/application/services/policies.service.d.ts +1 -1
  25. package/src/application/services/policies.service.js +1 -1
  26. package/src/application/services/policies.service.js.map +1 -1
  27. package/src/application/services/resource-authorization.d.ts +1 -1
  28. package/src/auth.module.js +29 -3
  29. package/src/auth.module.js.map +1 -1
  30. package/src/config/auth.config.d.ts +62 -48
  31. package/src/config/auth.config.js +82 -76
  32. package/src/config/auth.config.js.map +1 -1
  33. package/src/config/index.d.ts +1 -0
  34. package/src/config/index.js +1 -0
  35. package/src/config/index.js.map +1 -1
  36. package/src/config/module-options.d.ts +69 -49
  37. package/src/config/module-options.js +79 -50
  38. package/src/config/module-options.js.map +1 -1
  39. package/src/config/resource-authorization.types.d.ts +16 -0
  40. package/src/config/resource-authorization.types.js +3 -0
  41. package/src/config/resource-authorization.types.js.map +1 -0
  42. package/src/infrastructure-engine/better-auth/better-auth-auth-engine.adapter.d.ts +32 -10
  43. package/src/infrastructure-engine/better-auth/better-auth-auth-engine.adapter.js +190 -90
  44. package/src/infrastructure-engine/better-auth/better-auth-auth-engine.adapter.js.map +1 -1
  45. package/src/infrastructure-engine/better-auth/better-auth-options.d.ts +21 -0
  46. package/src/infrastructure-engine/better-auth/better-auth-options.js +94 -0
  47. package/src/infrastructure-engine/better-auth/better-auth-options.js.map +1 -0
  48. package/src/infrastructure-engine/better-auth/better-auth-typeorm-adapter-persistence.adapter.d.ts +14 -0
  49. package/src/infrastructure-engine/better-auth/better-auth-typeorm-adapter-persistence.adapter.js +62 -0
  50. package/src/infrastructure-engine/better-auth/better-auth-typeorm-adapter-persistence.adapter.js.map +1 -0
  51. package/src/infrastructure-engine/better-auth/better-auth.module-loader.d.ts +6 -0
  52. package/src/infrastructure-engine/better-auth/better-auth.module-loader.js +9 -1
  53. package/src/infrastructure-engine/better-auth/better-auth.module-loader.js.map +1 -1
  54. package/src/infrastructure-engine/better-auth/plugins/jwt/better-auth-jwt-plugin.service.d.ts +21 -0
  55. package/src/infrastructure-engine/{legacy-jwt-auth-engine.adapter.js → better-auth/plugins/jwt/better-auth-jwt-plugin.service.js} +31 -63
  56. package/src/infrastructure-engine/better-auth/plugins/jwt/better-auth-jwt-plugin.service.js.map +1 -0
  57. package/src/infrastructure-engine/better-auth/plugins/jwt/better-auth-jwt-typeorm-support.module.d.ts +2 -0
  58. package/src/infrastructure-engine/better-auth/plugins/jwt/better-auth-jwt-typeorm-support.module.js +26 -0
  59. package/src/infrastructure-engine/better-auth/plugins/jwt/better-auth-jwt-typeorm-support.module.js.map +1 -0
  60. package/src/{infrastructure-persistence/entities → infrastructure-engine/better-auth/plugins/jwt}/invalidated-token.entity.js +1 -1
  61. package/src/infrastructure-engine/better-auth/plugins/jwt/invalidated-token.entity.js.map +1 -0
  62. package/src/infrastructure-engine/better-auth/plugins/jwt/jwt-auth-plugin.controller.d.ts +10 -0
  63. package/src/infrastructure-engine/better-auth/plugins/jwt/jwt-auth-plugin.controller.js +65 -0
  64. package/src/infrastructure-engine/better-auth/plugins/jwt/jwt-auth-plugin.controller.js.map +1 -0
  65. package/src/infrastructure-engine/better-auth/plugins/jwt/jwt-token-invalidation.repository.d.ts +4 -0
  66. package/src/infrastructure-engine/better-auth/plugins/jwt/jwt-token-invalidation.repository.js +12 -0
  67. package/src/infrastructure-engine/better-auth/plugins/jwt/jwt-token-invalidation.repository.js.map +1 -0
  68. package/src/infrastructure-engine/better-auth/plugins/jwt/typeorm-jwt-token-invalidation.repository.d.ts +9 -0
  69. package/src/infrastructure-engine/better-auth/plugins/jwt/typeorm-jwt-token-invalidation.repository.js +33 -0
  70. package/src/infrastructure-engine/better-auth/plugins/jwt/typeorm-jwt-token-invalidation.repository.js.map +1 -0
  71. package/src/infrastructure-engine/better-auth/plugins/passkeys/better-auth-passkeys-typeorm-support.module.d.ts +2 -0
  72. package/src/infrastructure-engine/better-auth/plugins/passkeys/better-auth-passkeys-typeorm-support.module.js +17 -0
  73. package/src/infrastructure-engine/better-auth/plugins/passkeys/better-auth-passkeys-typeorm-support.module.js.map +1 -0
  74. package/src/infrastructure-engine/better-auth/plugins/passkeys/migrations/1760200001000-create-better-auth-passkeys-table.d.ts +6 -0
  75. package/src/infrastructure-engine/better-auth/plugins/passkeys/migrations/1760200001000-create-better-auth-passkeys-table.js +83 -0
  76. package/src/infrastructure-engine/better-auth/plugins/passkeys/migrations/1760200001000-create-better-auth-passkeys-table.js.map +1 -0
  77. package/src/infrastructure-engine/better-auth/plugins/passkeys/passkey.entity.d.ts +14 -0
  78. package/src/infrastructure-engine/better-auth/plugins/passkeys/passkey.entity.js +71 -0
  79. package/src/infrastructure-engine/better-auth/plugins/passkeys/passkey.entity.js.map +1 -0
  80. package/src/infrastructure-persistence/entities/account.entity.d.ts +16 -0
  81. package/src/infrastructure-persistence/entities/account.entity.js +81 -0
  82. package/src/infrastructure-persistence/entities/account.entity.js.map +1 -0
  83. package/src/infrastructure-persistence/entities/session.entity.d.ts +11 -0
  84. package/src/infrastructure-persistence/entities/session.entity.js +58 -0
  85. package/src/infrastructure-persistence/entities/session.entity.js.map +1 -0
  86. package/src/infrastructure-persistence/entities/user.entity.d.ts +3 -4
  87. package/src/infrastructure-persistence/entities/user.entity.js +5 -9
  88. package/src/infrastructure-persistence/entities/user.entity.js.map +1 -1
  89. package/src/infrastructure-persistence/entities/verification.entity.d.ts +9 -0
  90. package/src/infrastructure-persistence/entities/verification.entity.js +50 -0
  91. package/src/infrastructure-persistence/entities/verification.entity.js.map +1 -0
  92. package/src/infrastructure-persistence/index.d.ts +1 -2
  93. package/src/infrastructure-persistence/index.js +1 -2
  94. package/src/infrastructure-persistence/index.js.map +1 -1
  95. package/src/infrastructure-persistence/migrations/1720200000000-create-auth-schema.js +189 -93
  96. package/src/infrastructure-persistence/migrations/1720200000000-create-auth-schema.js.map +1 -1
  97. package/src/infrastructure-persistence/persistence.module-definition.d.ts +1 -1
  98. package/src/infrastructure-persistence/persistence.module-definition.js +2 -2
  99. package/src/infrastructure-persistence/persistence.module-definition.js.map +1 -1
  100. package/src/infrastructure-persistence/persistence.module.js +34 -26
  101. package/src/infrastructure-persistence/persistence.module.js.map +1 -1
  102. package/src/infrastructure-persistence/repositories/typeorm-auth-account.repository.d.ts +14 -0
  103. package/src/infrastructure-persistence/repositories/typeorm-auth-account.repository.js +64 -0
  104. package/src/infrastructure-persistence/repositories/typeorm-auth-account.repository.js.map +1 -0
  105. package/src/infrastructure-persistence/repositories/typeorm-auth-user.repository.d.ts +6 -7
  106. package/src/infrastructure-persistence/repositories/typeorm-auth-user.repository.js +27 -17
  107. package/src/infrastructure-persistence/repositories/typeorm-auth-user.repository.js.map +1 -1
  108. package/src/presentation/controllers/auth.controller.d.ts +12 -7
  109. package/src/presentation/controllers/auth.controller.js +46 -26
  110. package/src/presentation/controllers/auth.controller.js.map +1 -1
  111. package/src/presentation/presentation.module.js +32 -3
  112. package/src/presentation/presentation.module.js.map +1 -1
  113. package/src/application/services/jwt-auth.service.d.ts +0 -11
  114. package/src/application/services/jwt-auth.service.js +0 -27
  115. package/src/application/services/jwt-auth.service.js.map +0 -1
  116. package/src/application/strategies/jwt-strategy.d.ts +0 -17
  117. package/src/application/strategies/jwt-strategy.js +0 -27
  118. package/src/application/strategies/jwt-strategy.js.map +0 -1
  119. package/src/infrastructure-engine/better-auth/better-auth-spike.harness.d.ts +0 -17
  120. package/src/infrastructure-engine/better-auth/better-auth-spike.harness.js +0 -32
  121. package/src/infrastructure-engine/better-auth/better-auth-spike.harness.js.map +0 -1
  122. package/src/infrastructure-engine/legacy-jwt-auth-engine.adapter.d.ts +0 -22
  123. package/src/infrastructure-engine/legacy-jwt-auth-engine.adapter.js.map +0 -1
  124. package/src/infrastructure-persistence/entities/invalidated-token.entity.js.map +0 -1
  125. package/src/infrastructure-persistence/repositories/auth-user.repository.js.map +0 -1
  126. /package/src/{infrastructure-persistence/repositories → application/ports}/auth-user.repository.js +0 -0
  127. /package/src/{infrastructure-persistence/entities → infrastructure-engine/better-auth/plugins/jwt}/invalidated-token.entity.d.ts +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"file":"auth-user.repository.js","sourceRoot":"","sources":["../../../../../../../libs/auth/nest/src/infrastructure-persistence/repositories/auth-user.repository.ts"],"names":[],"mappings":";;;;AAAA,2CAA4C;AAIrC,IAAe,kBAAkB,GAAjC,MAAe,kBAAkB;CAWvC,CAAA;AAXqB,gDAAkB;6BAAlB,kBAAkB;IADvC,IAAA,mBAAU,GAAE;GACS,kBAAkB,CAWvC"}