@sasscore/database 0.0.1

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 (254) hide show
  1. package/README.md +281 -0
  2. package/dist/connection/index.d.ts +7 -0
  3. package/dist/connection/index.d.ts.map +1 -0
  4. package/dist/connection/index.js +7 -0
  5. package/dist/connection/index.js.map +1 -0
  6. package/dist/connection/infrastructure/connection.module.d.ts +18 -0
  7. package/dist/connection/infrastructure/connection.module.d.ts.map +1 -0
  8. package/dist/connection/infrastructure/connection.module.js +75 -0
  9. package/dist/connection/infrastructure/connection.module.js.map +1 -0
  10. package/dist/connection/infrastructure/sequelize.service.d.ts +16 -0
  11. package/dist/connection/infrastructure/sequelize.service.d.ts.map +1 -0
  12. package/dist/connection/infrastructure/sequelize.service.js +56 -0
  13. package/dist/connection/infrastructure/sequelize.service.js.map +1 -0
  14. package/dist/database.module.d.ts +25 -0
  15. package/dist/database.module.d.ts.map +1 -0
  16. package/dist/database.module.js +71 -0
  17. package/dist/database.module.js.map +1 -0
  18. package/dist/health/database-health.service.d.ts +12 -0
  19. package/dist/health/database-health.service.d.ts.map +1 -0
  20. package/dist/health/database-health.service.js +48 -0
  21. package/dist/health/database-health.service.js.map +1 -0
  22. package/dist/health/database-health.types.d.ts +8 -0
  23. package/dist/health/database-health.types.d.ts.map +1 -0
  24. package/dist/health/database-health.types.js +2 -0
  25. package/dist/health/database-health.types.js.map +1 -0
  26. package/dist/health/health.module.d.ts +3 -0
  27. package/dist/health/health.module.d.ts.map +1 -0
  28. package/dist/health/health.module.js +20 -0
  29. package/dist/health/health.module.js.map +1 -0
  30. package/dist/health/index.d.ts +12 -0
  31. package/dist/health/index.d.ts.map +1 -0
  32. package/dist/health/index.js +9 -0
  33. package/dist/health/index.js.map +1 -0
  34. package/dist/health/migration-health.service.d.ts +14 -0
  35. package/dist/health/migration-health.service.d.ts.map +1 -0
  36. package/dist/health/migration-health.service.js +43 -0
  37. package/dist/health/migration-health.service.js.map +1 -0
  38. package/dist/health/migration-health.types.d.ts +9 -0
  39. package/dist/health/migration-health.types.d.ts.map +1 -0
  40. package/dist/health/migration-health.types.js +2 -0
  41. package/dist/health/migration-health.types.js.map +1 -0
  42. package/dist/health/outbox-health.service.d.ts +14 -0
  43. package/dist/health/outbox-health.service.d.ts.map +1 -0
  44. package/dist/health/outbox-health.service.js +79 -0
  45. package/dist/health/outbox-health.service.js.map +1 -0
  46. package/dist/health/outbox-health.types.d.ts +15 -0
  47. package/dist/health/outbox-health.types.d.ts.map +1 -0
  48. package/dist/health/outbox-health.types.js +2 -0
  49. package/dist/health/outbox-health.types.js.map +1 -0
  50. package/dist/index.d.ts +26 -0
  51. package/dist/index.d.ts.map +1 -0
  52. package/dist/index.js +24 -0
  53. package/dist/index.js.map +1 -0
  54. package/dist/migrations/20260826173000-create-outbox-events.d.ts +5 -0
  55. package/dist/migrations/20260826173000-create-outbox-events.d.ts.map +1 -0
  56. package/dist/migrations/20260826173000-create-outbox-events.js +102 -0
  57. package/dist/migrations/20260826173000-create-outbox-events.js.map +1 -0
  58. package/dist/migrations/create-migration-registry.d.ts +9 -0
  59. package/dist/migrations/create-migration-registry.d.ts.map +1 -0
  60. package/dist/migrations/create-migration-registry.js +37 -0
  61. package/dist/migrations/create-migration-registry.js.map +1 -0
  62. package/dist/migrations/index.d.ts +7 -0
  63. package/dist/migrations/index.d.ts.map +1 -0
  64. package/dist/migrations/index.js +6 -0
  65. package/dist/migrations/index.js.map +1 -0
  66. package/dist/migrations/migration-registry.d.ts +4 -0
  67. package/dist/migrations/migration-registry.d.ts.map +1 -0
  68. package/dist/migrations/migration-registry.js +4 -0
  69. package/dist/migrations/migration-registry.js.map +1 -0
  70. package/dist/migrations/migration-runner.d.ts +27 -0
  71. package/dist/migrations/migration-runner.d.ts.map +1 -0
  72. package/dist/migrations/migration-runner.js +135 -0
  73. package/dist/migrations/migration-runner.js.map +1 -0
  74. package/dist/migrations/migration.helpers.d.ts +8 -0
  75. package/dist/migrations/migration.helpers.d.ts.map +1 -0
  76. package/dist/migrations/migration.helpers.js +9 -0
  77. package/dist/migrations/migration.helpers.js.map +1 -0
  78. package/dist/migrations/migration.types.d.ts +26 -0
  79. package/dist/migrations/migration.types.d.ts.map +1 -0
  80. package/dist/migrations/migration.types.js +2 -0
  81. package/dist/migrations/migration.types.js.map +1 -0
  82. package/dist/models/base.model.d.ts +17 -0
  83. package/dist/models/base.model.d.ts.map +1 -0
  84. package/dist/models/base.model.js +56 -0
  85. package/dist/models/base.model.js.map +1 -0
  86. package/dist/models/index.d.ts +2 -0
  87. package/dist/models/index.d.ts.map +1 -0
  88. package/dist/models/index.js +2 -0
  89. package/dist/models/index.js.map +1 -0
  90. package/dist/outbox/application/outbox.processor.d.ts +20 -0
  91. package/dist/outbox/application/outbox.processor.d.ts.map +1 -0
  92. package/dist/outbox/application/outbox.processor.js +66 -0
  93. package/dist/outbox/application/outbox.processor.js.map +1 -0
  94. package/dist/outbox/application/outbox.publisher.d.ts +17 -0
  95. package/dist/outbox/application/outbox.publisher.d.ts.map +1 -0
  96. package/dist/outbox/application/outbox.publisher.js +33 -0
  97. package/dist/outbox/application/outbox.publisher.js.map +1 -0
  98. package/dist/outbox/application/ports/event-dispatcher.port.d.ts +7 -0
  99. package/dist/outbox/application/ports/event-dispatcher.port.d.ts.map +1 -0
  100. package/dist/outbox/application/ports/event-dispatcher.port.js +2 -0
  101. package/dist/outbox/application/ports/event-dispatcher.port.js.map +1 -0
  102. package/dist/outbox/domain/entities/domain-event.entity.d.ts +11 -0
  103. package/dist/outbox/domain/entities/domain-event.entity.d.ts.map +1 -0
  104. package/dist/outbox/domain/entities/domain-event.entity.js +15 -0
  105. package/dist/outbox/domain/entities/domain-event.entity.js.map +1 -0
  106. package/dist/outbox/domain/entities/outbox-event.types.d.ts +21 -0
  107. package/dist/outbox/domain/entities/outbox-event.types.d.ts.map +1 -0
  108. package/dist/outbox/domain/entities/outbox-event.types.js +2 -0
  109. package/dist/outbox/domain/entities/outbox-event.types.js.map +1 -0
  110. package/dist/outbox/domain/index.d.ts +5 -0
  111. package/dist/outbox/domain/index.d.ts.map +1 -0
  112. package/dist/outbox/domain/index.js +3 -0
  113. package/dist/outbox/domain/index.js.map +1 -0
  114. package/dist/outbox/domain/repositories/outbox.repository.interface.d.ts +13 -0
  115. package/dist/outbox/domain/repositories/outbox.repository.interface.d.ts.map +1 -0
  116. package/dist/outbox/domain/repositories/outbox.repository.interface.js +2 -0
  117. package/dist/outbox/domain/repositories/outbox.repository.interface.js.map +1 -0
  118. package/dist/outbox/domain/value-objects/event-types.d.ts +19 -0
  119. package/dist/outbox/domain/value-objects/event-types.d.ts.map +1 -0
  120. package/dist/outbox/domain/value-objects/event-types.js +18 -0
  121. package/dist/outbox/domain/value-objects/event-types.js.map +1 -0
  122. package/dist/outbox/event-dispatcher.d.ts +3 -0
  123. package/dist/outbox/event-dispatcher.d.ts.map +1 -0
  124. package/dist/outbox/event-dispatcher.js +3 -0
  125. package/dist/outbox/event-dispatcher.js.map +1 -0
  126. package/dist/outbox/event.entity.d.ts +4 -0
  127. package/dist/outbox/event.entity.d.ts.map +1 -0
  128. package/dist/outbox/event.entity.js +3 -0
  129. package/dist/outbox/event.entity.js.map +1 -0
  130. package/dist/outbox/index.d.ts +19 -0
  131. package/dist/outbox/index.d.ts.map +1 -0
  132. package/dist/outbox/index.js +17 -0
  133. package/dist/outbox/index.js.map +1 -0
  134. package/dist/outbox/infrastructure/dispatch/event-dispatcher.d.ts +21 -0
  135. package/dist/outbox/infrastructure/dispatch/event-dispatcher.d.ts.map +1 -0
  136. package/dist/outbox/infrastructure/dispatch/event-dispatcher.js +55 -0
  137. package/dist/outbox/infrastructure/dispatch/event-dispatcher.js.map +1 -0
  138. package/dist/outbox/infrastructure/dispatch/flat-handler.registry.d.ts +13 -0
  139. package/dist/outbox/infrastructure/dispatch/flat-handler.registry.d.ts.map +1 -0
  140. package/dist/outbox/infrastructure/dispatch/flat-handler.registry.js +46 -0
  141. package/dist/outbox/infrastructure/dispatch/flat-handler.registry.js.map +1 -0
  142. package/dist/outbox/infrastructure/outbox.module.d.ts +13 -0
  143. package/dist/outbox/infrastructure/outbox.module.d.ts.map +1 -0
  144. package/dist/outbox/infrastructure/outbox.module.js +53 -0
  145. package/dist/outbox/infrastructure/outbox.module.js.map +1 -0
  146. package/dist/outbox/infrastructure/persistence/outbox-event.model.d.ts +106 -0
  147. package/dist/outbox/infrastructure/persistence/outbox-event.model.d.ts.map +1 -0
  148. package/dist/outbox/infrastructure/persistence/outbox-event.model.js +186 -0
  149. package/dist/outbox/infrastructure/persistence/outbox-event.model.js.map +1 -0
  150. package/dist/outbox/infrastructure/persistence/outbox-persistence.module.d.ts +9 -0
  151. package/dist/outbox/infrastructure/persistence/outbox-persistence.module.d.ts.map +1 -0
  152. package/dist/outbox/infrastructure/persistence/outbox-persistence.module.js +25 -0
  153. package/dist/outbox/infrastructure/persistence/outbox-persistence.module.js.map +1 -0
  154. package/dist/outbox/infrastructure/persistence/sequelize-outbox.repository.d.ts +24 -0
  155. package/dist/outbox/infrastructure/persistence/sequelize-outbox.repository.d.ts.map +1 -0
  156. package/dist/outbox/infrastructure/persistence/sequelize-outbox.repository.js +191 -0
  157. package/dist/outbox/infrastructure/persistence/sequelize-outbox.repository.js.map +1 -0
  158. package/dist/outbox/outbox-flat-handler.registry.d.ts +4 -0
  159. package/dist/outbox/outbox-flat-handler.registry.d.ts.map +1 -0
  160. package/dist/outbox/outbox-flat-handler.registry.js +4 -0
  161. package/dist/outbox/outbox-flat-handler.registry.js.map +1 -0
  162. package/dist/outbox/outbox.constants.d.ts +3 -0
  163. package/dist/outbox/outbox.constants.d.ts.map +1 -0
  164. package/dist/outbox/outbox.constants.js +3 -0
  165. package/dist/outbox/outbox.constants.js.map +1 -0
  166. package/dist/outbox/outbox.module.d.ts +3 -0
  167. package/dist/outbox/outbox.module.d.ts.map +1 -0
  168. package/dist/outbox/outbox.module.js +3 -0
  169. package/dist/outbox/outbox.module.js.map +1 -0
  170. package/dist/outbox/outbox.processor.d.ts +4 -0
  171. package/dist/outbox/outbox.processor.d.ts.map +1 -0
  172. package/dist/outbox/outbox.processor.js +4 -0
  173. package/dist/outbox/outbox.processor.js.map +1 -0
  174. package/dist/outbox/outbox.publisher.d.ts +3 -0
  175. package/dist/outbox/outbox.publisher.d.ts.map +1 -0
  176. package/dist/outbox/outbox.publisher.js +3 -0
  177. package/dist/outbox/outbox.publisher.js.map +1 -0
  178. package/dist/outbox/outbox.repository.d.ts +3 -0
  179. package/dist/outbox/outbox.repository.d.ts.map +1 -0
  180. package/dist/outbox/outbox.repository.js +3 -0
  181. package/dist/outbox/outbox.repository.js.map +1 -0
  182. package/dist/providers/database.providers.d.ts +4 -0
  183. package/dist/providers/database.providers.d.ts.map +1 -0
  184. package/dist/providers/database.providers.js +25 -0
  185. package/dist/providers/database.providers.js.map +1 -0
  186. package/dist/providers/database.tokens.d.ts +43 -0
  187. package/dist/providers/database.tokens.d.ts.map +1 -0
  188. package/dist/providers/database.tokens.js +43 -0
  189. package/dist/providers/database.tokens.js.map +1 -0
  190. package/dist/providers/index.d.ts +3 -0
  191. package/dist/providers/index.d.ts.map +1 -0
  192. package/dist/providers/index.js +3 -0
  193. package/dist/providers/index.js.map +1 -0
  194. package/dist/repositories/index.d.ts +5 -0
  195. package/dist/repositories/index.d.ts.map +1 -0
  196. package/dist/repositories/index.js +4 -0
  197. package/dist/repositories/index.js.map +1 -0
  198. package/dist/repositories/main.repository.d.ts +163 -0
  199. package/dist/repositories/main.repository.d.ts.map +1 -0
  200. package/dist/repositories/main.repository.js +1120 -0
  201. package/dist/repositories/main.repository.js.map +1 -0
  202. package/dist/repositories/repository-execution-mode.enum.d.ts +11 -0
  203. package/dist/repositories/repository-execution-mode.enum.d.ts.map +1 -0
  204. package/dist/repositories/repository-execution-mode.enum.js +12 -0
  205. package/dist/repositories/repository-execution-mode.enum.js.map +1 -0
  206. package/dist/repositories/repository.types.d.ts +65 -0
  207. package/dist/repositories/repository.types.d.ts.map +1 -0
  208. package/dist/repositories/repository.types.js +2 -0
  209. package/dist/repositories/repository.types.js.map +1 -0
  210. package/dist/repositories/tenant-scope-mode.enum.d.ts +13 -0
  211. package/dist/repositories/tenant-scope-mode.enum.d.ts.map +1 -0
  212. package/dist/repositories/tenant-scope-mode.enum.js +14 -0
  213. package/dist/repositories/tenant-scope-mode.enum.js.map +1 -0
  214. package/dist/tenancy/domain/ports/tenant-context.port.d.ts +22 -0
  215. package/dist/tenancy/domain/ports/tenant-context.port.d.ts.map +1 -0
  216. package/dist/tenancy/domain/ports/tenant-context.port.js +2 -0
  217. package/dist/tenancy/domain/ports/tenant-context.port.js.map +1 -0
  218. package/dist/tenancy/index.d.ts +8 -0
  219. package/dist/tenancy/index.d.ts.map +1 -0
  220. package/dist/tenancy/index.js +7 -0
  221. package/dist/tenancy/index.js.map +1 -0
  222. package/dist/tenancy/infrastructure/cls-tenant-context.adapter.d.ts +26 -0
  223. package/dist/tenancy/infrastructure/cls-tenant-context.adapter.d.ts.map +1 -0
  224. package/dist/tenancy/infrastructure/cls-tenant-context.adapter.js +73 -0
  225. package/dist/tenancy/infrastructure/cls-tenant-context.adapter.js.map +1 -0
  226. package/dist/tenancy/infrastructure/tenant-context.module.d.ts +7 -0
  227. package/dist/tenancy/infrastructure/tenant-context.module.d.ts.map +1 -0
  228. package/dist/tenancy/infrastructure/tenant-context.module.js +32 -0
  229. package/dist/tenancy/infrastructure/tenant-context.module.js.map +1 -0
  230. package/dist/tokens.d.ts +6 -0
  231. package/dist/tokens.d.ts.map +1 -0
  232. package/dist/tokens.js +6 -0
  233. package/dist/tokens.js.map +1 -0
  234. package/dist/transaction-manager/application/transaction-manager.service.d.ts +12 -0
  235. package/dist/transaction-manager/application/transaction-manager.service.d.ts.map +1 -0
  236. package/dist/transaction-manager/application/transaction-manager.service.js +29 -0
  237. package/dist/transaction-manager/application/transaction-manager.service.js.map +1 -0
  238. package/dist/transaction-manager/domain/ports/transaction-manager.port.d.ts +9 -0
  239. package/dist/transaction-manager/domain/ports/transaction-manager.port.d.ts.map +1 -0
  240. package/dist/transaction-manager/domain/ports/transaction-manager.port.js +2 -0
  241. package/dist/transaction-manager/domain/ports/transaction-manager.port.js.map +1 -0
  242. package/dist/transaction-manager/index.d.ts +7 -0
  243. package/dist/transaction-manager/index.d.ts.map +1 -0
  244. package/dist/transaction-manager/index.js +6 -0
  245. package/dist/transaction-manager/index.js.map +1 -0
  246. package/dist/types/database-module-options.d.ts +12 -0
  247. package/dist/types/database-module-options.d.ts.map +1 -0
  248. package/dist/types/database-module-options.js +2 -0
  249. package/dist/types/database-module-options.js.map +1 -0
  250. package/dist/types/index.d.ts +2 -0
  251. package/dist/types/index.d.ts.map +1 -0
  252. package/dist/types/index.js +2 -0
  253. package/dist/types/index.js.map +1 -0
  254. package/package.json +69 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../types/index.ts"],"names":[],"mappings":""}
package/package.json ADDED
@@ -0,0 +1,69 @@
1
+ {
2
+ "name": "@sasscore/database",
3
+ "version": "0.0.1",
4
+ "private": false,
5
+ "description": "SassCore Database Foundation — Sequelize + PostgreSQL + tenancy + transactions + outbox",
6
+ "type": "module",
7
+ "main": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.js"
13
+ },
14
+ "./connection": {
15
+ "types": "./dist/connection/index.d.ts",
16
+ "import": "./dist/connection/index.js"
17
+ },
18
+ "./tenancy": {
19
+ "types": "./dist/tenancy/index.d.ts",
20
+ "import": "./dist/tenancy/index.js"
21
+ },
22
+ "./transaction-manager": {
23
+ "types": "./dist/transaction-manager/index.d.ts",
24
+ "import": "./dist/transaction-manager/index.js"
25
+ },
26
+ "./outbox": {
27
+ "types": "./dist/outbox/index.d.ts",
28
+ "import": "./dist/outbox/index.js"
29
+ },
30
+ "./health": {
31
+ "types": "./dist/health/index.d.ts",
32
+ "import": "./dist/health/index.js"
33
+ },
34
+ "./migrations": {
35
+ "types": "./dist/migrations/index.d.ts",
36
+ "import": "./dist/migrations/index.js"
37
+ },
38
+ "./models": {
39
+ "types": "./dist/models/index.d.ts",
40
+ "import": "./dist/models/index.js"
41
+ },
42
+ "./repositories": {
43
+ "types": "./dist/repositories/index.d.ts",
44
+ "import": "./dist/repositories/index.js"
45
+ }
46
+ },
47
+ "files": [
48
+ "dist",
49
+ "README.md"
50
+ ],
51
+ "scripts": {
52
+ "clean": "rm -rf dist",
53
+ "build": "npm run clean && tsc -p tsconfig.json",
54
+ "build:watch": "tsc -p tsconfig.json --watch --preserveWatchOutput",
55
+ "test": "cd ../../.. && NODE_OPTIONS=--experimental-vm-modules npx jest --testPathPattern=src/domains/database/_tests --runInBand",
56
+ "publish:npm": "./scripts/npm-publish.sh"
57
+ },
58
+ "peerDependencies": {
59
+ "@nestjs/common": "^11.0.0",
60
+ "@nestjs/core": "^11.0.0",
61
+ "@nestjs/cqrs": "^11.0.0",
62
+ "@nestjs/sequelize": "^11.0.0",
63
+ "nestjs-cls": "^5.0.0",
64
+ "sequelize": "^6.0.0",
65
+ "sequelize-typescript": "^2.0.0",
66
+ "uuid": "^9.0.0 || ^10.0.0 || ^11.0.0"
67
+ },
68
+ "devDependencies": {}
69
+ }