@my-devkit/firebase 1.0.73 → 1.0.77

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 (203) hide show
  1. package/{dist/aggregate.d.ts → aggregate.d.ts} +0 -0
  2. package/{dist/aggregate.js → aggregate.js} +0 -0
  3. package/{dist/aggregate.js.map → aggregate.js.map} +0 -0
  4. package/{dist/app-factory.d.ts → app-factory.d.ts} +0 -0
  5. package/{dist/app-factory.js → app-factory.js} +0 -0
  6. package/{dist/app-factory.js.map → app-factory.js.map} +0 -0
  7. package/{dist/bus.d.ts → bus.d.ts} +0 -0
  8. package/{dist/bus.js → bus.js} +0 -0
  9. package/{dist/bus.js.map → bus.js.map} +0 -0
  10. package/{dist/constants.d.ts → constants.d.ts} +0 -0
  11. package/{dist/constants.js → constants.js} +0 -0
  12. package/{dist/constants.js.map → constants.js.map} +0 -0
  13. package/{dist/context.d.ts → context.d.ts} +0 -0
  14. package/{dist/context.js → context.js} +0 -0
  15. package/{dist/context.js.map → context.js.map} +0 -0
  16. package/{dist/decorators → decorators}/controller/body.d.ts +0 -0
  17. package/{dist/decorators → decorators}/controller/body.js +0 -0
  18. package/{dist/decorators → decorators}/controller/body.js.map +0 -0
  19. package/{dist/decorators → decorators}/controller/body.spec.d.ts +0 -0
  20. package/{dist/decorators → decorators}/controller/body.spec.js +0 -0
  21. package/{dist/decorators → decorators}/controller/body.spec.js.map +0 -0
  22. package/{dist/decorators → decorators}/controller/controller.d.ts +0 -0
  23. package/{dist/decorators → decorators}/controller/controller.js +0 -0
  24. package/{dist/decorators → decorators}/controller/controller.js.map +0 -0
  25. package/{dist/decorators → decorators}/controller/controller.spec.d.ts +0 -0
  26. package/{dist/decorators → decorators}/controller/controller.spec.js +0 -0
  27. package/{dist/decorators → decorators}/controller/controller.spec.js.map +0 -0
  28. package/{dist/decorators → decorators}/controller/get.d.ts +0 -0
  29. package/{dist/decorators → decorators}/controller/get.js +0 -0
  30. package/{dist/decorators → decorators}/controller/get.js.map +0 -0
  31. package/{dist/decorators → decorators}/controller/get.spec.d.ts +0 -0
  32. package/{dist/decorators → decorators}/controller/get.spec.js +0 -0
  33. package/{dist/decorators → decorators}/controller/get.spec.js.map +0 -0
  34. package/{dist/decorators → decorators}/controller/index.d.ts +0 -0
  35. package/{dist/decorators → decorators}/controller/index.js +0 -0
  36. package/{dist/decorators → decorators}/controller/index.js.map +0 -0
  37. package/{dist/decorators → decorators}/controller/param.d.ts +0 -0
  38. package/{dist/decorators → decorators}/controller/param.js +0 -0
  39. package/{dist/decorators → decorators}/controller/param.js.map +0 -0
  40. package/{dist/decorators → decorators}/controller/param.spec.d.ts +0 -0
  41. package/{dist/decorators → decorators}/controller/param.spec.js +0 -0
  42. package/{dist/decorators → decorators}/controller/param.spec.js.map +0 -0
  43. package/{dist/decorators → decorators}/controller/post.d.ts +0 -0
  44. package/{dist/decorators → decorators}/controller/post.js +0 -0
  45. package/{dist/decorators → decorators}/controller/post.js.map +0 -0
  46. package/{dist/decorators → decorators}/controller/post.spec.d.ts +0 -0
  47. package/{dist/decorators → decorators}/controller/post.spec.js +0 -0
  48. package/{dist/decorators → decorators}/controller/post.spec.js.map +0 -0
  49. package/{dist/decorators → decorators}/controller/query.d.ts +0 -0
  50. package/{dist/decorators → decorators}/controller/query.js +0 -0
  51. package/{dist/decorators → decorators}/controller/query.js.map +0 -0
  52. package/{dist/decorators → decorators}/controller/query.spec.d.ts +0 -0
  53. package/{dist/decorators → decorators}/controller/query.spec.js +0 -0
  54. package/{dist/decorators → decorators}/controller/query.spec.js.map +0 -0
  55. package/{dist/decorators → decorators}/handler/command-handler.d.ts +0 -0
  56. package/{dist/decorators → decorators}/handler/command-handler.js +3 -4
  57. package/decorators/handler/command-handler.js.map +1 -0
  58. package/{dist/decorators → decorators}/handler/command-handler.spec.d.ts +0 -0
  59. package/{dist/decorators → decorators}/handler/command-handler.spec.js +0 -0
  60. package/{dist/decorators → decorators}/handler/command-handler.spec.js.map +0 -0
  61. package/{dist/decorators → decorators}/handler/event-handler.d.ts +0 -0
  62. package/{dist/decorators → decorators}/handler/event-handler.js +3 -4
  63. package/decorators/handler/event-handler.js.map +1 -0
  64. package/{dist/decorators → decorators}/handler/event-handler.spec.d.ts +0 -0
  65. package/{dist/decorators → decorators}/handler/event-handler.spec.js +0 -0
  66. package/{dist/decorators → decorators}/handler/event-handler.spec.js.map +0 -0
  67. package/{dist/decorators → decorators}/handler/index.d.ts +0 -0
  68. package/{dist/decorators → decorators}/handler/index.js +0 -0
  69. package/{dist/decorators → decorators}/handler/index.js.map +0 -0
  70. package/{dist/decorators → decorators}/index.d.ts +0 -0
  71. package/{dist/decorators → decorators}/index.js +0 -0
  72. package/{dist/decorators → decorators}/index.js.map +0 -0
  73. package/{dist/decorators → decorators}/injectable.d.ts +0 -0
  74. package/{dist/decorators → decorators}/injectable.js +0 -0
  75. package/{dist/decorators → decorators}/injectable.js.map +0 -0
  76. package/{dist/decorators → decorators}/module.d.ts +0 -0
  77. package/{dist/decorators → decorators}/module.js +0 -0
  78. package/{dist/decorators → decorators}/module.js.map +0 -0
  79. package/{dist/decorators → decorators}/transactional-client.d.ts +0 -0
  80. package/{dist/decorators → decorators}/transactional-client.js +0 -0
  81. package/{dist/decorators → decorators}/transactional-client.js.map +0 -0
  82. package/{dist/execution-mode-enum.d.ts → execution-mode-enum.d.ts} +0 -0
  83. package/{dist/execution-mode-enum.js → execution-mode-enum.js} +0 -0
  84. package/{dist/execution-mode-enum.js.map → execution-mode-enum.js.map} +0 -0
  85. package/{dist/firestore-client.d.ts → firestore-client.d.ts} +0 -0
  86. package/{dist/firestore-client.js → firestore-client.js} +0 -0
  87. package/{dist/firestore-client.js.map → firestore-client.js.map} +0 -0
  88. package/{dist/handler-helper.d.ts → handler-helper.d.ts} +0 -0
  89. package/{dist/handler-helper.js → handler-helper.js} +0 -0
  90. package/{dist/handler-helper.js.map → handler-helper.js.map} +0 -0
  91. package/{dist/index.d.ts → index.d.ts} +0 -0
  92. package/{dist/index.js → index.js} +0 -0
  93. package/{dist/index.js.map → index.js.map} +0 -0
  94. package/{dist/injector.d.ts → injector.d.ts} +0 -0
  95. package/{dist/injector.js → injector.js} +0 -0
  96. package/{dist/injector.js.map → injector.js.map} +0 -0
  97. package/{dist/interfaces → interfaces}/app-config.d.ts +0 -0
  98. package/{dist/interfaces → interfaces}/app-config.js +0 -0
  99. package/{dist/interfaces → interfaces}/app-config.js.map +0 -0
  100. package/{dist/interfaces → interfaces}/from-array.d.ts +0 -0
  101. package/{dist/interfaces → interfaces}/from-array.js +0 -0
  102. package/{dist/interfaces → interfaces}/from-array.js.map +0 -0
  103. package/{dist/interfaces → interfaces}/index.d.ts +0 -0
  104. package/{dist/interfaces → interfaces}/index.js +0 -0
  105. package/{dist/interfaces → interfaces}/index.js.map +0 -0
  106. package/{dist/interfaces → interfaces}/newable.d.ts +0 -0
  107. package/{dist/interfaces → interfaces}/newable.js +0 -0
  108. package/{dist/interfaces → interfaces}/newable.js.map +0 -0
  109. package/{dist/interfaces → interfaces}/transactional-client.d.ts +0 -0
  110. package/{dist/interfaces → interfaces}/transactional-client.js +0 -0
  111. package/{dist/interfaces → interfaces}/transactional-client.js.map +0 -0
  112. package/{dist/interfaces → interfaces}/type.d.ts +0 -0
  113. package/{dist/interfaces → interfaces}/type.js +0 -0
  114. package/{dist/interfaces → interfaces}/type.js.map +0 -0
  115. package/my-devkit-firebase-1.0.77.tgz +0 -0
  116. package/package.json +9 -9
  117. package/{dist/reflect.d.ts → reflect.d.ts} +0 -0
  118. package/{dist/reflect.js → reflect.js} +0 -0
  119. package/{dist/reflect.js.map → reflect.js.map} +0 -0
  120. package/{dist/request-method.enum.d.ts → request-method.enum.d.ts} +0 -0
  121. package/{dist/request-method.enum.js → request-method.enum.js} +0 -0
  122. package/{dist/request-method.enum.js.map → request-method.enum.js.map} +0 -0
  123. package/{dist/server → server}/index.d.ts +0 -0
  124. package/{dist/server → server}/index.js +0 -0
  125. package/{dist/server → server}/index.js.map +0 -0
  126. package/{dist/server → server}/middlewares/authentication-middleware.d.ts +0 -0
  127. package/{dist/server → server}/middlewares/authentication-middleware.js +0 -0
  128. package/{dist/server → server}/middlewares/authentication-middleware.js.map +0 -0
  129. package/{dist/server → server}/middlewares/create-context-middleware.d.ts +0 -0
  130. package/{dist/server → server}/middlewares/create-context-middleware.js +0 -0
  131. package/{dist/server → server}/middlewares/create-context-middleware.js.map +0 -0
  132. package/{dist/server → server}/middlewares/error-middleware.d.ts +0 -0
  133. package/{dist/server → server}/middlewares/error-middleware.js +0 -0
  134. package/{dist/server → server}/middlewares/error-middleware.js.map +0 -0
  135. package/{dist/server → server}/middlewares/headers-middleware.d.ts +0 -0
  136. package/{dist/server → server}/middlewares/headers-middleware.js +0 -0
  137. package/{dist/server → server}/middlewares/headers-middleware.js.map +0 -0
  138. package/{dist/server → server}/middlewares/index.d.ts +0 -0
  139. package/{dist/server → server}/middlewares/index.js +0 -0
  140. package/{dist/server → server}/middlewares/index.js.map +0 -0
  141. package/{dist/server → server}/middlewares/not-found-middleware.d.ts +0 -0
  142. package/{dist/server → server}/middlewares/not-found-middleware.js +0 -0
  143. package/{dist/server → server}/middlewares/not-found-middleware.js.map +0 -0
  144. package/{dist/server → server}/server.d.ts +0 -0
  145. package/{dist/server → server}/server.js +0 -0
  146. package/{dist/server → server}/server.js.map +0 -0
  147. package/tsconfig.tsbuildinfo +1 -0
  148. package/.eslintrc.js +0 -15
  149. package/.vscode/settings.json +0 -7
  150. package/dist/decorators/handler/command-handler.js.map +0 -1
  151. package/dist/decorators/handler/event-handler.js.map +0 -1
  152. package/dist/package.json +0 -54
  153. package/dist/tsconfig.tsbuildinfo +0 -1
  154. package/my-devkit-firebase-1.0.73.tgz +0 -0
  155. package/src/aggregate.ts +0 -54
  156. package/src/app-factory.ts +0 -252
  157. package/src/bus.ts +0 -70
  158. package/src/constants.ts +0 -5
  159. package/src/context.ts +0 -108
  160. package/src/decorators/controller/body.spec.ts +0 -52
  161. package/src/decorators/controller/body.ts +0 -17
  162. package/src/decorators/controller/controller.spec.ts +0 -19
  163. package/src/decorators/controller/controller.ts +0 -10
  164. package/src/decorators/controller/get.spec.ts +0 -32
  165. package/src/decorators/controller/get.ts +0 -8
  166. package/src/decorators/controller/index.ts +0 -8
  167. package/src/decorators/controller/param.spec.ts +0 -51
  168. package/src/decorators/controller/param.ts +0 -21
  169. package/src/decorators/controller/post.spec.ts +0 -60
  170. package/src/decorators/controller/post.ts +0 -8
  171. package/src/decorators/controller/query.spec.ts +0 -51
  172. package/src/decorators/controller/query.ts +0 -21
  173. package/src/decorators/handler/command-handler.spec.ts +0 -101
  174. package/src/decorators/handler/command-handler.ts +0 -23
  175. package/src/decorators/handler/event-handler.spec.ts +0 -104
  176. package/src/decorators/handler/event-handler.ts +0 -24
  177. package/src/decorators/handler/index.ts +0 -2
  178. package/src/decorators/index.ts +0 -5
  179. package/src/decorators/injectable.ts +0 -7
  180. package/src/decorators/module.ts +0 -29
  181. package/src/decorators/transactional-client.ts +0 -7
  182. package/src/execution-mode-enum.ts +0 -4
  183. package/src/firestore-client.ts +0 -125
  184. package/src/handler-helper.ts +0 -68
  185. package/src/index.ts +0 -7
  186. package/src/injector.ts +0 -31
  187. package/src/interfaces/app-config.ts +0 -1
  188. package/src/interfaces/from-array.ts +0 -1
  189. package/src/interfaces/index.ts +0 -4
  190. package/src/interfaces/newable.ts +0 -1
  191. package/src/interfaces/transactional-client.ts +0 -3
  192. package/src/interfaces/type.ts +0 -3
  193. package/src/reflect.ts +0 -164
  194. package/src/request-method.enum.ts +0 -4
  195. package/src/server/index.ts +0 -1
  196. package/src/server/middlewares/authentication-middleware.ts +0 -47
  197. package/src/server/middlewares/create-context-middleware.ts +0 -16
  198. package/src/server/middlewares/error-middleware.ts +0 -33
  199. package/src/server/middlewares/headers-middleware.ts +0 -16
  200. package/src/server/middlewares/index.ts +0 -5
  201. package/src/server/middlewares/not-found-middleware.ts +0 -9
  202. package/src/server/server.ts +0 -96
  203. package/tsconfig.json +0 -24
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CommandHandler = void 0;
4
- var core_1 = require("@my-devkit/core");
5
4
  var reflect_1 = require("../../reflect");
6
5
  function CommandHandler() {
7
6
  return function (target, propertyKey) {
@@ -12,9 +11,9 @@ function CommandHandler() {
12
11
  if (paramTypes.length > 1) {
13
12
  throw new Error("".concat(target.constructor.name, ".").concat(propertyKey.toString(), " should have only one argument!"));
14
13
  }
15
- if (!(paramTypes[0].prototype instanceof core_1.Command)) {
16
- throw new Error("".concat(target.constructor.name, ".").concat(propertyKey.toString(), " should have a command as argument!"));
17
- }
14
+ // if (!(paramTypes[0].prototype instanceof Command)) {
15
+ // throw new Error(`${target.constructor.name}.${propertyKey.toString()} should have a command as argument!`);
16
+ // }
18
17
  (0, reflect_1.reflect)(target, propertyKey).registerCommandHandler(paramTypes[0].prototype);
19
18
  };
20
19
  }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"command-handler.js","sourceRoot":"","sources":["../../../src/decorators/handler/command-handler.ts"],"names":[],"mappings":";;;AAAA,yCAAwC;AAExC,SAAgB,cAAc;IAC1B,OAAO,UAAC,MAAM,EAAE,WAAW;QACvB,IAAM,UAAU,GAAG,IAAA,iBAAO,EAAC,MAAM,EAAE,WAAW,CAAC,CAAC,aAAa,EAAE,CAAC;QAEhE,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE;YACzB,MAAM,IAAI,KAAK,CAAC,UAAG,MAAM,CAAC,WAAW,CAAC,IAAI,cAAI,WAAW,CAAC,QAAQ,EAAE,+BAA4B,CAAC,CAAC;SACrG;QAED,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE;YACvB,MAAM,IAAI,KAAK,CAAC,UAAG,MAAM,CAAC,WAAW,CAAC,IAAI,cAAI,WAAW,CAAC,QAAQ,EAAE,oCAAiC,CAAC,CAAC;SAC1G;QAED,uDAAuD;QACvD,kHAAkH;QAClH,IAAI;QAEJ,IAAA,iBAAO,EAAC,MAAM,EAAE,WAAW,CAAC,CAAC,sBAAsB,CAAM,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IACtF,CAAC,CAAA;AACL,CAAC;AAlBD,wCAkBC"}
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.EventHandler = void 0;
4
- var core_1 = require("@my-devkit/core");
5
4
  var reflect_1 = require("../../reflect");
6
5
  function EventHandler(mode) {
7
6
  return function (target, propertyKey) {
@@ -12,9 +11,9 @@ function EventHandler(mode) {
12
11
  if (paramTypes.length > 1) {
13
12
  throw new Error("".concat(target.constructor.name, ".").concat(propertyKey.toString(), " should have only one argument!"));
14
13
  }
15
- if (!(paramTypes[0].prototype instanceof core_1.Event)) {
16
- throw new Error("".concat(target.constructor.name, ".").concat(propertyKey.toString(), " should have an event as argument!"));
17
- }
14
+ // if (!(paramTypes[0].prototype instanceof Event)) {
15
+ // throw new Error(`${target.constructor.name}.${propertyKey.toString()} should have an event as argument!`);
16
+ // }
18
17
  (0, reflect_1.reflect)(target, propertyKey).registerEventHandler(paramTypes[0].prototype, mode);
19
18
  };
20
19
  }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event-handler.js","sourceRoot":"","sources":["../../../src/decorators/handler/event-handler.ts"],"names":[],"mappings":";;;AACA,yCAAwC;AAExC,SAAgB,YAAY,CAAC,IAAmB;IAC5C,OAAO,UAAC,MAAM,EAAE,WAAW;QACvB,IAAM,UAAU,GAAG,IAAA,iBAAO,EAAC,MAAM,EAAE,WAAW,CAAC,CAAC,aAAa,EAAE,CAAC;QAEhE,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE;YACzB,MAAM,IAAI,KAAK,CAAC,UAAG,MAAM,CAAC,WAAW,CAAC,IAAI,cAAI,WAAW,CAAC,QAAQ,EAAE,+BAA4B,CAAC,CAAC;SACrG;QAED,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE;YACvB,MAAM,IAAI,KAAK,CAAC,UAAG,MAAM,CAAC,WAAW,CAAC,IAAI,cAAI,WAAW,CAAC,QAAQ,EAAE,oCAAiC,CAAC,CAAC;SAC1G;QAED,qDAAqD;QACrD,iHAAiH;QACjH,IAAI;QAEJ,IAAA,iBAAO,EAAC,MAAM,EAAE,WAAW,CAAC,CAAC,oBAAoB,CAAM,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IAC1F,CAAC,CAAA;AACL,CAAC;AAlBD,oCAkBC"}
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
Binary file
package/package.json CHANGED
@@ -1,9 +1,8 @@
1
1
  {
2
2
  "name": "@my-devkit/firebase",
3
- "version": "1.0.73",
3
+ "version": "1.0.77",
4
4
  "description": "My Devkit: firebase tools for CQRS implementation",
5
- "main": "dist/index.js",
6
- "typings": "dist/index.d.ts",
5
+ "typings": "index.d.ts",
7
6
  "keywords": [],
8
7
  "author": "Jean-Guy BUON",
9
8
  "license": "MIT",
@@ -12,9 +11,9 @@
12
11
  "url": "https://github.com/BUONJG/my-devkit.git"
13
12
  },
14
13
  "scripts": {
15
- "clean": "pnpx ts-cleaner -d ./dist -s ./src || true",
16
- "build": "pnpm run clean && tsc",
17
- "watch": "pnpm run clean && tsc -w",
14
+ "clean": "npx ts-cleaner -d ./dist -s ./src || true",
15
+ "build": "npm run clean && tsc",
16
+ "watch": "npm run clean && tsc -w",
18
17
  "test": "mocha ./dist/**/**.spec.js --async-only"
19
18
  },
20
19
  "dependencies": {
@@ -24,12 +23,12 @@
24
23
  "reflect-metadata": "^0.1.13"
25
24
  },
26
25
  "peerDependencies": {
27
- "@my-devkit/core": "1.0.39",
26
+ "@my-devkit/core": "1.0.53",
28
27
  "firebase-admin": "10.0.0",
29
28
  "firebase-functions": "3.16.0"
30
29
  },
31
30
  "devDependencies": {
32
- "@my-devkit/core": "1.0.39",
31
+ "@my-devkit/core": "1.0.53",
33
32
  "@types/cors": "2.8.10",
34
33
  "@types/express": "4.17.8",
35
34
  "@types/node": "^14.14.19",
@@ -49,5 +48,6 @@
49
48
  "sinon-chai": "3.7.0",
50
49
  "ts-cleaner": "1.0.5",
51
50
  "typescript": "^4.5.2"
52
- }
51
+ },
52
+ "module": "index.js"
53
53
  }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes