@revisium/core 1.0.2 → 1.2.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 (175) hide show
  1. package/dist/package.json +65 -57
  2. package/dist/prisma/seed/generateSeedApi.js +1 -1
  3. package/dist/prisma/seed/generateSeedApi.js.map +1 -1
  4. package/dist/src/__tests__/utils/prepareProject.js +4 -4
  5. package/dist/src/__tests__/utils/prepareProject.js.map +1 -1
  6. package/dist/src/__tests__/utils/schema/schema.mocks.d.ts +1 -4
  7. package/dist/src/__tests__/utils/schema/schema.mocks.js +4 -7
  8. package/dist/src/__tests__/utils/schema/schema.mocks.js.map +1 -1
  9. package/dist/src/api/rest-api/revision/dto/create-table.dto.js +1 -1
  10. package/dist/src/api/rest-api/revision/dto/create-table.dto.js.map +1 -1
  11. package/dist/src/api/rest-api/row/dto/update-row.dto.js +1 -1
  12. package/dist/src/api/rest-api/row/dto/update-row.dto.js.map +1 -1
  13. package/dist/src/api/rest-api/row/model/row.model.js +1 -1
  14. package/dist/src/api/rest-api/row/model/row.model.js.map +1 -1
  15. package/dist/src/api/rest-api/share/model/order-by.model.d.ts +13 -0
  16. package/dist/src/api/rest-api/share/model/order-by.model.js +39 -0
  17. package/dist/src/api/rest-api/share/model/order-by.model.js.map +1 -0
  18. package/dist/src/api/rest-api/share/utils/mapToPrismaOrderBy.d.ts +3 -0
  19. package/dist/src/api/rest-api/share/utils/mapToPrismaOrderBy.js +12 -0
  20. package/dist/src/api/rest-api/share/utils/mapToPrismaOrderBy.js.map +1 -0
  21. package/dist/src/api/rest-api/share/validators/is-unique-order-by-fields.validator.d.ts +2 -0
  22. package/dist/src/api/rest-api/share/validators/is-unique-order-by-fields.validator.js +28 -0
  23. package/dist/src/api/rest-api/share/validators/is-unique-order-by-fields.validator.js.map +1 -0
  24. package/dist/src/api/rest-api/table/dto/create-row.dto.js +1 -1
  25. package/dist/src/api/rest-api/table/dto/create-row.dto.js.map +1 -1
  26. package/dist/src/api/rest-api/table/dto/get-table-rows.dto.d.ts +2 -0
  27. package/dist/src/api/rest-api/table/dto/get-table-rows.dto.js +28 -1
  28. package/dist/src/api/rest-api/table/dto/get-table-rows.dto.js.map +1 -1
  29. package/dist/src/api/rest-api/table/table-by-id.controller.d.ts +1 -1
  30. package/dist/src/api/rest-api/table/table-by-id.controller.js +8 -4
  31. package/dist/src/api/rest-api/table/table-by-id.controller.js.map +1 -1
  32. package/dist/src/app-mode.d.ts +4 -0
  33. package/dist/src/app-mode.js +5 -0
  34. package/dist/src/app-mode.js.map +1 -0
  35. package/dist/src/app.module.js +1 -1
  36. package/dist/src/app.module.js.map +1 -1
  37. package/dist/src/core/app-options.module.d.ts +5 -0
  38. package/dist/src/core/app-options.module.js +27 -0
  39. package/dist/src/core/app-options.module.js.map +1 -0
  40. package/dist/src/core/core.module.d.ts +3 -0
  41. package/dist/src/core/core.module.js +40 -33
  42. package/dist/src/core/core.module.js.map +1 -1
  43. package/dist/src/features/auth/strategy/jwt.strategy.d.ts +3 -1
  44. package/dist/src/features/draft/commands/handlers/__tests__/utils.js +10 -20
  45. package/dist/src/features/draft/commands/handlers/__tests__/utils.js.map +1 -1
  46. package/dist/src/features/draft/commands/handlers/transactional/get-or-create-draft-rows.handler.d.ts +1 -3
  47. package/dist/src/features/draft/commands/handlers/transactional/get-or-create-draft-rows.handler.js +4 -4
  48. package/dist/src/features/draft/commands/handlers/transactional/get-or-create-draft-rows.handler.js.map +1 -1
  49. package/dist/src/features/draft/draft.handler.d.ts +1 -2
  50. package/dist/src/features/draft/draft.handler.js.map +1 -1
  51. package/dist/src/features/plugin/index.d.ts +9 -0
  52. package/dist/src/features/plugin/index.js +22 -0
  53. package/dist/src/features/plugin/index.js.map +1 -0
  54. package/dist/src/features/plugin/plugin.list.service.d.ts +8 -1
  55. package/dist/src/features/plugin/plugin.list.service.js +23 -2
  56. package/dist/src/features/plugin/plugin.list.service.js.map +1 -1
  57. package/dist/src/features/plugin/plugin.module.js +3 -3
  58. package/dist/src/features/plugin/plugin.module.js.map +1 -1
  59. package/dist/src/features/plugin/row-created-at/row-created-at.plugin.d.ts +11 -0
  60. package/dist/src/features/plugin/row-created-at/row-created-at.plugin.js +61 -0
  61. package/dist/src/features/plugin/row-created-at/row-created-at.plugin.js.map +1 -0
  62. package/dist/src/features/plugin/row-created-id/row-created-id.plugin.d.ts +11 -0
  63. package/dist/src/features/plugin/row-created-id/row-created-id.plugin.js +61 -0
  64. package/dist/src/features/plugin/row-created-id/row-created-id.plugin.js.map +1 -0
  65. package/dist/src/features/plugin/row-hash/row-hash.plugin.d.ts +11 -0
  66. package/dist/src/features/plugin/row-hash/row-hash.plugin.js +61 -0
  67. package/dist/src/features/plugin/row-hash/row-hash.plugin.js.map +1 -0
  68. package/dist/src/features/plugin/row-id/row-id.plugin.d.ts +11 -0
  69. package/dist/src/features/plugin/row-id/row-id.plugin.js +61 -0
  70. package/dist/src/features/plugin/row-id/row-id.plugin.js.map +1 -0
  71. package/dist/src/features/plugin/row-schema-hash/row-schema-hash.plugin.d.ts +11 -0
  72. package/dist/src/features/plugin/row-schema-hash/row-schema-hash.plugin.js +61 -0
  73. package/dist/src/features/plugin/row-schema-hash/row-schema-hash.plugin.js.map +1 -0
  74. package/dist/src/features/plugin/row-updated-at/row-updated-at.plugin.d.ts +11 -0
  75. package/dist/src/features/plugin/row-updated-at/row-updated-at.plugin.js +61 -0
  76. package/dist/src/features/plugin/row-updated-at/row-updated-at.plugin.js.map +1 -0
  77. package/dist/src/features/plugin/row-version-id/row-version-id.plugin.d.ts +11 -0
  78. package/dist/src/features/plugin/row-version-id/row-version-id.plugin.js +61 -0
  79. package/dist/src/features/plugin/row-version-id/row-version-id.plugin.js.map +1 -0
  80. package/dist/src/features/plugin/types.d.ts +4 -4
  81. package/dist/src/features/project/commands/handlers/__tests__/utils.js +9 -8
  82. package/dist/src/features/project/commands/handlers/__tests__/utils.js.map +1 -1
  83. package/dist/src/features/share/json-schema-store.service.js +9 -2
  84. package/dist/src/features/share/json-schema-store.service.js.map +1 -1
  85. package/dist/src/features/share/json-schema-validator.service.d.ts +1 -0
  86. package/dist/src/features/share/json-schema-validator.service.js +24 -2
  87. package/dist/src/features/share/json-schema-validator.service.js.map +1 -1
  88. package/dist/src/features/share/schema/meta-schema.d.ts +1 -0
  89. package/dist/src/features/share/schema/meta-schema.js +45 -19
  90. package/dist/src/features/share/schema/meta-schema.js.map +1 -1
  91. package/dist/src/features/share/schema/plugins/index.d.ts +8 -0
  92. package/dist/src/features/share/schema/plugins/index.js +25 -0
  93. package/dist/src/features/share/schema/plugins/index.js.map +1 -0
  94. package/dist/src/features/share/schema/plugins/row-created-at.schema.d.ts +4 -0
  95. package/dist/src/features/share/schema/plugins/row-created-at.schema.js +15 -0
  96. package/dist/src/features/share/schema/plugins/row-created-at.schema.js.map +1 -0
  97. package/dist/src/features/share/schema/plugins/row-created-id.schema.d.ts +4 -0
  98. package/dist/src/features/share/schema/plugins/row-created-id.schema.js +15 -0
  99. package/dist/src/features/share/schema/plugins/row-created-id.schema.js.map +1 -0
  100. package/dist/src/features/share/schema/plugins/row-hash.schema.d.ts +4 -0
  101. package/dist/src/features/share/schema/plugins/row-hash.schema.js +15 -0
  102. package/dist/src/features/share/schema/plugins/row-hash.schema.js.map +1 -0
  103. package/dist/src/features/share/schema/plugins/row-id.schema.d.ts +4 -0
  104. package/dist/src/features/share/schema/plugins/row-id.schema.js +15 -0
  105. package/dist/src/features/share/schema/plugins/row-id.schema.js.map +1 -0
  106. package/dist/src/features/share/schema/plugins/row-schema-hash.schema.d.ts +4 -0
  107. package/dist/src/features/share/schema/plugins/row-schema-hash.schema.js +15 -0
  108. package/dist/src/features/share/schema/plugins/row-schema-hash.schema.js.map +1 -0
  109. package/dist/src/features/share/schema/plugins/row-updated-at.schema.d.ts +4 -0
  110. package/dist/src/features/share/schema/plugins/row-updated-at.schema.js +15 -0
  111. package/dist/src/features/share/schema/plugins/row-updated-at.schema.js.map +1 -0
  112. package/dist/src/features/share/schema/plugins/row-version-id.schema.d.ts +4 -0
  113. package/dist/src/features/share/schema/plugins/row-version-id.schema.js +15 -0
  114. package/dist/src/features/share/schema/plugins/row-version-id.schema.js.map +1 -0
  115. package/dist/src/features/share/schema/shared-fields.d.ts +11 -0
  116. package/dist/src/features/share/schema/shared-fields.js +15 -0
  117. package/dist/src/features/share/schema/shared-fields.js.map +1 -0
  118. package/dist/src/features/share/schema-ids.consts.d.ts +7 -0
  119. package/dist/src/features/share/schema-ids.consts.js +7 -0
  120. package/dist/src/features/share/schema-ids.consts.js.map +1 -1
  121. package/dist/src/features/share/utils/schema/lib/createJsonSchemaStore.d.ts +2 -1
  122. package/dist/src/features/share/utils/schema/lib/createJsonSchemaStore.js +22 -4
  123. package/dist/src/features/share/utils/schema/lib/createJsonSchemaStore.js.map +1 -1
  124. package/dist/src/features/share/utils/schema/model/schema/json-array.store.d.ts +3 -0
  125. package/dist/src/features/share/utils/schema/model/schema/json-array.store.js +3 -0
  126. package/dist/src/features/share/utils/schema/model/schema/json-array.store.js.map +1 -1
  127. package/dist/src/features/share/utils/schema/model/schema/json-boolean.store.d.ts +4 -0
  128. package/dist/src/features/share/utils/schema/model/schema/json-boolean.store.js +4 -0
  129. package/dist/src/features/share/utils/schema/model/schema/json-boolean.store.js.map +1 -1
  130. package/dist/src/features/share/utils/schema/model/schema/json-number.store.d.ts +4 -0
  131. package/dist/src/features/share/utils/schema/model/schema/json-number.store.js +4 -0
  132. package/dist/src/features/share/utils/schema/model/schema/json-number.store.js.map +1 -1
  133. package/dist/src/features/share/utils/schema/model/schema/json-object.store.d.ts +3 -0
  134. package/dist/src/features/share/utils/schema/model/schema/json-object.store.js +3 -0
  135. package/dist/src/features/share/utils/schema/model/schema/json-object.store.js.map +1 -1
  136. package/dist/src/features/share/utils/schema/model/schema/json-string.store.d.ts +8 -0
  137. package/dist/src/features/share/utils/schema/model/schema/json-string.store.js +12 -5
  138. package/dist/src/features/share/utils/schema/model/schema/json-string.store.js.map +1 -1
  139. package/dist/src/features/share/utils/schema/types/schema.types.d.ts +20 -0
  140. package/dist/src/features/table/queries/handlers/get-rows-by-table.handler.js +8 -9
  141. package/dist/src/features/table/queries/handlers/get-rows-by-table.handler.js.map +1 -1
  142. package/dist/src/features/table/queries/impl/get-rows-by-table.query.d.ts +3 -0
  143. package/dist/src/features/table/queries/impl/get-rows-by-table.query.js.map +1 -1
  144. package/dist/src/index.d.ts +0 -1
  145. package/dist/src/index.js +1 -3
  146. package/dist/src/index.js.map +1 -1
  147. package/dist/src/infrastructure/health/database.check.d.ts +1 -1
  148. package/dist/src/infrastructure/health/notification.check.d.ts +1 -1
  149. package/dist/src/infrastructure/notification/endpoint-notification.service.d.ts +2 -2
  150. package/dist/src/infrastructure/notification/endpoint-notification.service.js +1 -2
  151. package/dist/src/infrastructure/notification/endpoint-notification.service.js.map +1 -1
  152. package/dist/src/infrastructure/notification/in-memory-notification-client.d.ts +7 -0
  153. package/dist/src/infrastructure/notification/in-memory-notification-client.js +13 -0
  154. package/dist/src/infrastructure/notification/in-memory-notification-client.js.map +1 -0
  155. package/dist/src/infrastructure/notification/notification-client.interface.d.ts +3 -0
  156. package/dist/src/infrastructure/notification/notification-client.interface.js +3 -0
  157. package/dist/src/infrastructure/notification/notification-client.interface.js.map +1 -0
  158. package/dist/src/infrastructure/notification/notification.module.js +13 -20
  159. package/dist/src/infrastructure/notification/notification.module.js.map +1 -1
  160. package/dist/src/infrastructure/notification/redis-notification-client.d.ts +7 -0
  161. package/dist/src/infrastructure/notification/redis-notification-client.js +13 -0
  162. package/dist/src/infrastructure/notification/redis-notification-client.js.map +1 -0
  163. package/dist/src/main.js +7 -1
  164. package/dist/src/main.js.map +1 -1
  165. package/dist/tsconfig.build.tsbuildinfo +1 -1
  166. package/package.json +65 -57
  167. package/dist/src/infrastructure/notification/in-memory-client.d.ts +0 -10
  168. package/dist/src/infrastructure/notification/in-memory-client.js +0 -24
  169. package/dist/src/infrastructure/notification/in-memory-client.js.map +0 -1
  170. package/dist/src/infrastructure/notification/in-memory-server.d.ts +0 -6
  171. package/dist/src/infrastructure/notification/in-memory-server.js +0 -19
  172. package/dist/src/infrastructure/notification/in-memory-server.js.map +0 -1
  173. package/dist/src/infrastructure/notification/notification-event-emitter.d.ts +0 -2
  174. package/dist/src/infrastructure/notification/notification-event-emitter.js +0 -6
  175. package/dist/src/infrastructure/notification/notification-event-emitter.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@revisium/core",
3
- "version": "1.0.2",
3
+ "version": "1.2.0",
4
4
  "description": "Revisium is a tool (UI/API) inspired by JSON (JSON Schema) and Git, designed to provide a flexible and low-level headless CMS solution.",
5
5
  "private": false,
6
6
  "homepage": "https://revisium.io",
@@ -31,8 +31,8 @@
31
31
  "start:dev": "nest start --watch",
32
32
  "start:debug": "nest start --debug --watch",
33
33
  "start:prod": "NODE_ENV=production npm run prisma:migrate:deploy && npm run seed:prod && node dist/src/main",
34
- "lint:ci": "eslint \"{src,apps,libs,test}/**/*.ts\"",
35
- "lint:fix": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
34
+ "lint:ci": "eslint \"{src,apps,libs,test}/**/*.ts\" --max-warnings 0",
35
+ "lint:fix": "eslint \"{src,apps,libs,test}/**/*.ts\" --max-warnings 0 --fix",
36
36
  "test": "NODE_ENV=test jest",
37
37
  "test:watch": "NODE_ENV=test jest --watch",
38
38
  "test:cov": "NODE_ENV=test jest --coverage",
@@ -45,82 +45,88 @@
45
45
  "version:patch": "npm version patch --no-git-tag-version"
46
46
  },
47
47
  "dependencies": {
48
- "@apollo/server": "^4.10.1",
49
- "@aws-sdk/client-s3": "^3.800.0",
50
- "@aws-sdk/s3-request-presigner": "^3.800.0",
51
- "@casl/ability": "^6.7.2",
52
- "@nestjs/apollo": "^12.1.0",
53
- "@nestjs/cache-manager": "^2.2.2",
54
- "@nestjs/common": "^10.3.3",
55
- "@nestjs/config": "^3.2.0",
56
- "@nestjs/core": "^10.3.3",
57
- "@nestjs/cqrs": "^10.2.7",
58
- "@nestjs/graphql": "^12.1.1",
59
- "@nestjs/jwt": "^10.2.0",
60
- "@nestjs/microservices": "^10.3.3",
61
- "@nestjs/passport": "^10.0.3",
62
- "@nestjs/platform-express": "^10.3.3",
63
- "@nestjs/schedule": "^4.0.1",
64
- "@nestjs/serve-static": "^4.0.2",
65
- "@nestjs/swagger": "^7.4.2",
66
- "@nestjs/terminus": "^10.2.3",
67
- "@prisma/client": "^6.7.0",
68
- "ajv": "^8.16.0",
69
- "bcrypt": "^5.1.1",
70
- "cache-manager": "^5.7.6",
48
+ "@apollo/server": "^4.12.1",
49
+ "@aws-sdk/client-s3": "^3.816.0",
50
+ "@aws-sdk/s3-request-presigner": "^3.816.0",
51
+ "@casl/ability": "^6.7.3",
52
+ "@nestjs/apollo": "^13.1.0",
53
+ "@nestjs/cache-manager": "^3.0.1",
54
+ "@nestjs/common": "^11.1.1",
55
+ "@nestjs/config": "^4.0.2",
56
+ "@nestjs/core": "^11.1.1",
57
+ "@nestjs/cqrs": "^11.0.3",
58
+ "@nestjs/event-emitter": "^3.0.1",
59
+ "@nestjs/graphql": "^13.1.0",
60
+ "@nestjs/jwt": "^11.0.0",
61
+ "@nestjs/microservices": "^11.1.1",
62
+ "@nestjs/passport": "^11.0.5",
63
+ "@nestjs/platform-express": "^11.1.1",
64
+ "@nestjs/schedule": "^6.0.0",
65
+ "@nestjs/serve-static": "^5.0.3",
66
+ "@nestjs/swagger": "^11.2.0",
67
+ "@nestjs/terminus": "^11.0.0",
68
+ "@prisma/client": "^6.8.2",
69
+ "ajv": "^8.17.1",
70
+ "bcrypt": "^6.0.0",
71
+ "cache-manager": "^6.4.3",
71
72
  "class-transformer": "^0.5.1",
72
- "class-validator": "^0.14.1",
73
- "graphql": "^16.8.1",
73
+ "class-validator": "^0.14.2",
74
+ "graphql": "^16.11.0",
74
75
  "graphql-type-json": "^0.3.2",
75
76
  "handlebars": "^4.7.8",
76
- "ioredis": "^5.3.2",
77
+ "ioredis": "^5.6.1",
77
78
  "nanoid": "^3.3.11",
78
- "nodemailer": "^6.9.16",
79
+ "nodemailer": "^7.0.3",
79
80
  "object-hash": "^3.0.0",
80
81
  "passport": "^0.7.0",
81
82
  "passport-jwt": "^4.0.1",
82
83
  "prom-client": "^15.1.3",
83
- "reflect-metadata": "^0.2.1",
84
- "rxjs": "^7.8.1",
85
- "sharp": "^0.34.1"
84
+ "reflect-metadata": "^0.2.2",
85
+ "rxjs": "^7.8.2",
86
+ "sharp": "^0.34.2"
86
87
  },
87
88
  "devDependencies": {
88
- "@eslint/js": "^9.24.0",
89
- "@nestjs/cli": "^10.3.2",
90
- "@nestjs/schematics": "^10.1.1",
91
- "@nestjs/testing": "^10.3.3",
89
+ "@eslint/js": "^9.27.0",
90
+ "@nestjs/cli": "^11.0.7",
91
+ "@nestjs/schematics": "^11.0.5",
92
+ "@nestjs/testing": "^11.1.1",
92
93
  "@types/bcrypt": "^5.0.2",
93
- "@types/express": "^4.17.21",
94
- "@types/jest": "^29.5.12",
94
+ "@types/express": "^5.0.2",
95
+ "@types/jest": "^29.5.14",
95
96
  "@types/multer": "^1.4.12",
96
- "@types/node": "^20.11.25",
97
+ "@types/node": "^22.15.21",
97
98
  "@types/nodemailer": "^6.4.17",
98
99
  "@types/object-hash": "^3.0.6",
99
100
  "@types/passport-jwt": "^4.0.1",
100
- "@types/supertest": "^6.0.2",
101
- "@typescript-eslint/eslint-plugin": "^8.30.1",
102
- "@typescript-eslint/parser": "^8.30.1",
101
+ "@types/supertest": "^6.0.3",
102
+ "@typescript-eslint/eslint-plugin": "^8.32.1",
103
+ "@typescript-eslint/parser": "^8.32.1",
103
104
  "aws-sdk-client-mock": "^4.1.0",
104
105
  "dotenv-cli": "^8.0.0",
105
- "eslint": "^9.24.0",
106
- "eslint-config-prettier": "^10.1.2",
107
- "eslint-plugin-prettier": "^5.2.6",
108
- "globals": "^16.0.0",
106
+ "eslint": "^9.27.0",
107
+ "eslint-config-prettier": "^10.1.5",
108
+ "eslint-plugin-prettier": "^5.4.0",
109
+ "globals": "^16.1.0",
109
110
  "jest": "^29.7.0",
110
- "jest-mock-extended": "^3.0.5",
111
+ "jest-mock-extended": "^3.0.7",
111
112
  "prettier": "^3.5.3",
112
- "prisma": "^6.7.0",
113
+ "prisma": "^6.8.2",
113
114
  "shx": "^0.4.0",
114
115
  "source-map-support": "^0.5.21",
115
- "supertest": "^6.3.4",
116
- "swagger-typescript-api": "^13.0.22",
117
- "ts-jest": "^29.1.2",
118
- "ts-loader": "^9.5.1",
116
+ "supertest": "^7.1.1",
117
+ "swagger-typescript-api": "^13.1.3",
118
+ "ts-jest": "^29.3.4",
119
+ "ts-loader": "^9.5.2",
119
120
  "ts-node": "^10.9.2",
120
- "tsc-alias": "^1.8.10",
121
+ "tsc-alias": "^1.8.16",
121
122
  "tsconfig-paths": "^4.2.0",
122
- "typescript": "^5.4.2",
123
- "typescript-eslint": "^8.30.1"
123
+ "typescript": "^5.8.3",
124
+ "typescript-eslint": "^8.32.1"
125
+ },
126
+ "overrides": {
127
+ "@nestjs/platform-express": {
128
+ "multer": "^2.0.0"
129
+ }
124
130
  },
125
131
  "jest": {
126
132
  "modulePaths": [
@@ -138,9 +144,11 @@
138
144
  },
139
145
  "collectCoverageFrom": [
140
146
  "<rootDir>/src/**/*.(t|j)s",
147
+ "!<rootDir>/src/main.ts",
141
148
  "!<rootDir>/src/__generated__/**",
142
149
  "!<rootDir>/src/**/__tests__/**",
143
- "!<rootDir>/src/**/index.ts"
150
+ "!<rootDir>/src/**/index.ts",
151
+ "!<rootDir>/src/**/*.module.ts"
144
152
  ],
145
153
  "testEnvironment": "node",
146
154
  "setupFiles": [
@@ -1,10 +0,0 @@
1
- import { ClientProxy, ReadPacket } from '@nestjs/microservices';
2
- import { EventEmitter } from 'node:events';
3
- export declare class InMemoryClient extends ClientProxy {
4
- private readonly client;
5
- constructor(client: EventEmitter);
6
- close(): void;
7
- connect(): Promise<boolean>;
8
- protected dispatchEvent(packet: ReadPacket): Promise<any>;
9
- protected publish(): () => void;
10
- }
@@ -1,24 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.InMemoryClient = void 0;
4
- const microservices_1 = require("@nestjs/microservices");
5
- class InMemoryClient extends microservices_1.ClientProxy {
6
- constructor(client) {
7
- super();
8
- this.client = client;
9
- }
10
- close() {
11
- }
12
- connect() {
13
- return Promise.resolve(true);
14
- }
15
- dispatchEvent(packet) {
16
- this.client.emit(packet.pattern, packet.data);
17
- return Promise.resolve(packet);
18
- }
19
- publish() {
20
- return () => { };
21
- }
22
- }
23
- exports.InMemoryClient = InMemoryClient;
24
- //# sourceMappingURL=in-memory-client.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"in-memory-client.js","sourceRoot":"","sources":["../../../../src/infrastructure/notification/in-memory-client.ts"],"names":[],"mappings":";;;AAAA,yDAAgE;AAGhE,MAAa,cAAe,SAAQ,2BAAW;IAC7C,YAA6B,MAAoB;QAC/C,KAAK,EAAE,CAAC;QADmB,WAAM,GAAN,MAAM,CAAc;IAEjD,CAAC;IAED,KAAK;IAKL,CAAC;IAED,OAAO;QACL,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;IAES,aAAa,CAAC,MAAkB;QACxC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;QAC9C,OAAO,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IACjC,CAAC;IAES,OAAO;QACf,OAAO,GAAG,EAAE,GAAE,CAAC,CAAC;IAClB,CAAC;CACF;AAxBD,wCAwBC"}
@@ -1,6 +0,0 @@
1
- import { Server, CustomTransportStrategy } from '@nestjs/microservices';
2
- export declare class InMemoryServer extends Server implements CustomTransportStrategy {
3
- constructor();
4
- close(): any;
5
- listen(callback: (...optionalParams: unknown[]) => any): any;
6
- }
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.InMemoryServer = void 0;
4
- const microservices_1 = require("@nestjs/microservices");
5
- const notification_event_emitter_1 = require("./notification-event-emitter");
6
- class InMemoryServer extends microservices_1.Server {
7
- constructor() {
8
- super();
9
- }
10
- close() { }
11
- listen(callback) {
12
- for (const [pattern, handler] of this.messageHandlers) {
13
- notification_event_emitter_1.notificationEventEmitter.on(pattern, handler);
14
- }
15
- callback();
16
- }
17
- }
18
- exports.InMemoryServer = InMemoryServer;
19
- //# sourceMappingURL=in-memory-server.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"in-memory-server.js","sourceRoot":"","sources":["../../../../src/infrastructure/notification/in-memory-server.ts"],"names":[],"mappings":";;;AAAA,yDAAwE;AACxE,6EAAsG;AAEtG,MAAa,cAAe,SAAQ,sBAAM;IACxC;QACE,KAAK,EAAE,CAAC;IACV,CAAC;IAED,KAAK,KAAS,CAAC;IAEf,MAAM,CAAC,QAA+C;QACpD,KAAK,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,IAAI,IAAI,CAAC,eAAe,EAAE,CAAC;YACtD,qDAAwB,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAChD,CAAC;QAED,QAAQ,EAAE,CAAC;IACb,CAAC;CACF;AAdD,wCAcC"}
@@ -1,2 +0,0 @@
1
- import { EventEmitter } from 'node:events';
2
- export declare const notificationEventEmitter: EventEmitter<[never]>;
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.notificationEventEmitter = void 0;
4
- const node_events_1 = require("node:events");
5
- exports.notificationEventEmitter = new node_events_1.EventEmitter();
6
- //# sourceMappingURL=notification-event-emitter.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"notification-event-emitter.js","sourceRoot":"","sources":["../../../../src/infrastructure/notification/notification-event-emitter.ts"],"names":[],"mappings":";;;AAAA,6CAA2C;AAE9B,QAAA,wBAAwB,GAAG,IAAI,0BAAY,EAAE,CAAC"}