@my-devkit/firebase 1.0.80 → 1.0.84
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/.eslintrc.js +15 -0
- package/.vscode/settings.json +7 -0
- package/{aggregate.d.ts → dist/aggregate.d.ts} +0 -0
- package/{aggregate.js → dist/aggregate.js} +0 -0
- package/{aggregate.js.map → dist/aggregate.js.map} +0 -0
- package/{app-factory.d.ts → dist/app-factory.d.ts} +0 -0
- package/{app-factory.js → dist/app-factory.js} +0 -0
- package/{app-factory.js.map → dist/app-factory.js.map} +0 -0
- package/{bus.d.ts → dist/bus.d.ts} +0 -0
- package/{bus.js → dist/bus.js} +0 -0
- package/{bus.js.map → dist/bus.js.map} +0 -0
- package/{constants.d.ts → dist/constants.d.ts} +0 -0
- package/{constants.js → dist/constants.js} +0 -0
- package/{constants.js.map → dist/constants.js.map} +0 -0
- package/{context.d.ts → dist/context.d.ts} +0 -0
- package/{context.js → dist/context.js} +0 -0
- package/{context.js.map → dist/context.js.map} +0 -0
- package/{decorators → dist/decorators}/controller/body.d.ts +0 -0
- package/{decorators → dist/decorators}/controller/body.js +0 -0
- package/{decorators → dist/decorators}/controller/body.js.map +0 -0
- package/{decorators → dist/decorators}/controller/body.spec.d.ts +0 -0
- package/{decorators → dist/decorators}/controller/body.spec.js +0 -0
- package/{decorators → dist/decorators}/controller/body.spec.js.map +0 -0
- package/{decorators → dist/decorators}/controller/controller.d.ts +0 -0
- package/{decorators → dist/decorators}/controller/controller.js +0 -0
- package/{decorators → dist/decorators}/controller/controller.js.map +0 -0
- package/{decorators → dist/decorators}/controller/controller.spec.d.ts +0 -0
- package/{decorators → dist/decorators}/controller/controller.spec.js +0 -0
- package/{decorators → dist/decorators}/controller/controller.spec.js.map +0 -0
- package/{decorators → dist/decorators}/controller/get.d.ts +0 -0
- package/{decorators → dist/decorators}/controller/get.js +0 -0
- package/{decorators → dist/decorators}/controller/get.js.map +0 -0
- package/{decorators → dist/decorators}/controller/get.spec.d.ts +0 -0
- package/{decorators → dist/decorators}/controller/get.spec.js +0 -0
- package/{decorators → dist/decorators}/controller/get.spec.js.map +0 -0
- package/{decorators → dist/decorators}/controller/index.d.ts +0 -0
- package/{decorators → dist/decorators}/controller/index.js +0 -0
- package/{decorators → dist/decorators}/controller/index.js.map +0 -0
- package/{decorators → dist/decorators}/controller/param.d.ts +0 -0
- package/{decorators → dist/decorators}/controller/param.js +0 -0
- package/{decorators → dist/decorators}/controller/param.js.map +0 -0
- package/{decorators → dist/decorators}/controller/param.spec.d.ts +0 -0
- package/{decorators → dist/decorators}/controller/param.spec.js +0 -0
- package/{decorators → dist/decorators}/controller/param.spec.js.map +0 -0
- package/{decorators → dist/decorators}/controller/post.d.ts +0 -0
- package/{decorators → dist/decorators}/controller/post.js +0 -0
- package/{decorators → dist/decorators}/controller/post.js.map +0 -0
- package/{decorators → dist/decorators}/controller/post.spec.d.ts +0 -0
- package/{decorators → dist/decorators}/controller/post.spec.js +0 -0
- package/{decorators → dist/decorators}/controller/post.spec.js.map +0 -0
- package/{decorators → dist/decorators}/controller/query.d.ts +0 -0
- package/{decorators → dist/decorators}/controller/query.js +0 -0
- package/{decorators → dist/decorators}/controller/query.js.map +0 -0
- package/{decorators → dist/decorators}/controller/query.spec.d.ts +0 -0
- package/{decorators → dist/decorators}/controller/query.spec.js +0 -0
- package/{decorators → dist/decorators}/controller/query.spec.js.map +0 -0
- package/{decorators → dist/decorators}/handler/command-handler.d.ts +0 -0
- package/{decorators → dist/decorators}/handler/command-handler.js +4 -3
- package/dist/decorators/handler/command-handler.js.map +1 -0
- package/{decorators → dist/decorators}/handler/command-handler.spec.d.ts +0 -0
- package/{decorators → dist/decorators}/handler/command-handler.spec.js +0 -0
- package/{decorators → dist/decorators}/handler/command-handler.spec.js.map +0 -0
- package/{decorators → dist/decorators}/handler/event-handler.d.ts +0 -0
- package/{decorators → dist/decorators}/handler/event-handler.js +4 -3
- package/dist/decorators/handler/event-handler.js.map +1 -0
- package/{decorators → dist/decorators}/handler/event-handler.spec.d.ts +0 -0
- package/{decorators → dist/decorators}/handler/event-handler.spec.js +0 -0
- package/{decorators → dist/decorators}/handler/event-handler.spec.js.map +0 -0
- package/{decorators → dist/decorators}/handler/index.d.ts +0 -0
- package/{decorators → dist/decorators}/handler/index.js +0 -0
- package/{decorators → dist/decorators}/handler/index.js.map +0 -0
- package/{decorators → dist/decorators}/index.d.ts +0 -0
- package/{decorators → dist/decorators}/index.js +0 -0
- package/{decorators → dist/decorators}/index.js.map +0 -0
- package/{decorators → dist/decorators}/injectable.d.ts +0 -0
- package/{decorators → dist/decorators}/injectable.js +0 -0
- package/{decorators → dist/decorators}/injectable.js.map +0 -0
- package/{decorators → dist/decorators}/module.d.ts +0 -0
- package/{decorators → dist/decorators}/module.js +0 -0
- package/{decorators → dist/decorators}/module.js.map +0 -0
- package/{decorators → dist/decorators}/transactional-client.d.ts +0 -0
- package/{decorators → dist/decorators}/transactional-client.js +0 -0
- package/{decorators → dist/decorators}/transactional-client.js.map +0 -0
- package/{execution-mode-enum.d.ts → dist/execution-mode-enum.d.ts} +0 -0
- package/{execution-mode-enum.js → dist/execution-mode-enum.js} +0 -0
- package/{execution-mode-enum.js.map → dist/execution-mode-enum.js.map} +0 -0
- package/{firestore-client.d.ts → dist/firestore-client.d.ts} +0 -0
- package/{firestore-client.js → dist/firestore-client.js} +0 -0
- package/{firestore-client.js.map → dist/firestore-client.js.map} +0 -0
- package/{handler-helper.d.ts → dist/handler-helper.d.ts} +0 -0
- package/{handler-helper.js → dist/handler-helper.js} +0 -0
- package/{handler-helper.js.map → dist/handler-helper.js.map} +0 -0
- package/{index.d.ts → dist/index.d.ts} +0 -0
- package/{index.js → dist/index.js} +0 -0
- package/{index.js.map → dist/index.js.map} +0 -0
- package/{injector.d.ts → dist/injector.d.ts} +0 -0
- package/{injector.js → dist/injector.js} +0 -0
- package/{injector.js.map → dist/injector.js.map} +0 -0
- package/{interfaces → dist/interfaces}/app-config.d.ts +0 -0
- package/{interfaces → dist/interfaces}/app-config.js +0 -0
- package/{interfaces → dist/interfaces}/app-config.js.map +0 -0
- package/{interfaces → dist/interfaces}/from-array.d.ts +0 -0
- package/{interfaces → dist/interfaces}/from-array.js +0 -0
- package/{interfaces → dist/interfaces}/from-array.js.map +0 -0
- package/{interfaces → dist/interfaces}/index.d.ts +0 -0
- package/{interfaces → dist/interfaces}/index.js +0 -0
- package/{interfaces → dist/interfaces}/index.js.map +0 -0
- package/{interfaces → dist/interfaces}/newable.d.ts +0 -0
- package/{interfaces → dist/interfaces}/newable.js +0 -0
- package/{interfaces → dist/interfaces}/newable.js.map +0 -0
- package/{interfaces → dist/interfaces}/transactional-client.d.ts +0 -0
- package/{interfaces → dist/interfaces}/transactional-client.js +0 -0
- package/{interfaces → dist/interfaces}/transactional-client.js.map +0 -0
- package/{interfaces → dist/interfaces}/type.d.ts +0 -0
- package/{interfaces → dist/interfaces}/type.js +0 -0
- package/{interfaces → dist/interfaces}/type.js.map +0 -0
- package/{reflect.d.ts → dist/reflect.d.ts} +0 -0
- package/{reflect.js → dist/reflect.js} +0 -0
- package/{reflect.js.map → dist/reflect.js.map} +0 -0
- package/{request-method.enum.d.ts → dist/request-method.enum.d.ts} +0 -0
- package/{request-method.enum.js → dist/request-method.enum.js} +0 -0
- package/{request-method.enum.js.map → dist/request-method.enum.js.map} +0 -0
- package/{server → dist/server}/index.d.ts +0 -0
- package/{server → dist/server}/index.js +0 -0
- package/{server → dist/server}/index.js.map +0 -0
- package/{server → dist/server}/middlewares/authentication-middleware.d.ts +0 -0
- package/{server → dist/server}/middlewares/authentication-middleware.js +0 -0
- package/{server → dist/server}/middlewares/authentication-middleware.js.map +0 -0
- package/{server → dist/server}/middlewares/create-context-middleware.d.ts +0 -0
- package/{server → dist/server}/middlewares/create-context-middleware.js +0 -0
- package/{server → dist/server}/middlewares/create-context-middleware.js.map +0 -0
- package/{server → dist/server}/middlewares/error-middleware.d.ts +0 -0
- package/{server → dist/server}/middlewares/error-middleware.js +0 -0
- package/{server → dist/server}/middlewares/error-middleware.js.map +0 -0
- package/{server → dist/server}/middlewares/headers-middleware.d.ts +0 -0
- package/{server → dist/server}/middlewares/headers-middleware.js +0 -0
- package/{server → dist/server}/middlewares/headers-middleware.js.map +0 -0
- package/{server → dist/server}/middlewares/index.d.ts +0 -0
- package/{server → dist/server}/middlewares/index.js +0 -0
- package/{server → dist/server}/middlewares/index.js.map +0 -0
- package/{server → dist/server}/middlewares/not-found-middleware.d.ts +0 -0
- package/{server → dist/server}/middlewares/not-found-middleware.js +0 -0
- package/{server → dist/server}/middlewares/not-found-middleware.js.map +0 -0
- package/{server → dist/server}/server.d.ts +0 -0
- package/{server → dist/server}/server.js +0 -0
- package/{server → dist/server}/server.js.map +0 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +6 -6
- package/src/aggregate.ts +54 -0
- package/src/app-factory.ts +252 -0
- package/src/bus.ts +70 -0
- package/src/constants.ts +5 -0
- package/src/context.ts +108 -0
- package/src/decorators/controller/body.spec.ts +52 -0
- package/src/decorators/controller/body.ts +17 -0
- package/src/decorators/controller/controller.spec.ts +19 -0
- package/src/decorators/controller/controller.ts +10 -0
- package/src/decorators/controller/get.spec.ts +32 -0
- package/src/decorators/controller/get.ts +8 -0
- package/src/decorators/controller/index.ts +8 -0
- package/src/decorators/controller/param.spec.ts +51 -0
- package/src/decorators/controller/param.ts +21 -0
- package/src/decorators/controller/post.spec.ts +60 -0
- package/src/decorators/controller/post.ts +8 -0
- package/src/decorators/controller/query.spec.ts +51 -0
- package/src/decorators/controller/query.ts +21 -0
- package/src/decorators/handler/command-handler.spec.ts +101 -0
- package/src/decorators/handler/command-handler.ts +23 -0
- package/src/decorators/handler/event-handler.spec.ts +104 -0
- package/src/decorators/handler/event-handler.ts +24 -0
- package/src/decorators/handler/index.ts +2 -0
- package/src/decorators/index.ts +5 -0
- package/src/decorators/injectable.ts +7 -0
- package/src/decorators/module.ts +29 -0
- package/src/decorators/transactional-client.ts +7 -0
- package/src/execution-mode-enum.ts +4 -0
- package/src/firestore-client.ts +125 -0
- package/src/handler-helper.ts +68 -0
- package/src/index.ts +7 -0
- package/src/injector.ts +31 -0
- package/src/interfaces/app-config.ts +1 -0
- package/src/interfaces/from-array.ts +1 -0
- package/src/interfaces/index.ts +4 -0
- package/src/interfaces/newable.ts +1 -0
- package/src/interfaces/transactional-client.ts +3 -0
- package/src/interfaces/type.ts +3 -0
- package/src/reflect.ts +164 -0
- package/src/request-method.enum.ts +4 -0
- package/src/server/index.ts +1 -0
- package/src/server/middlewares/authentication-middleware.ts +47 -0
- package/src/server/middlewares/create-context-middleware.ts +16 -0
- package/src/server/middlewares/error-middleware.ts +33 -0
- package/src/server/middlewares/headers-middleware.ts +16 -0
- package/src/server/middlewares/index.ts +5 -0
- package/src/server/middlewares/not-found-middleware.ts +9 -0
- package/src/server/server.ts +96 -0
- package/tsconfig.json +24 -0
- package/decorators/handler/command-handler.js.map +0 -1
- package/decorators/handler/event-handler.js.map +0 -1
- package/tsconfig.tsbuildinfo +0 -1
package/.eslintrc.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
parser: '@typescript-eslint/parser',
|
|
3
|
+
extends: [
|
|
4
|
+
'plugin:@typescript-eslint/recommended'
|
|
5
|
+
],
|
|
6
|
+
parserOptions: {
|
|
7
|
+
ecmaVersion: 2018,
|
|
8
|
+
sourceType: 'module'
|
|
9
|
+
},
|
|
10
|
+
rules: {
|
|
11
|
+
'@typescript-eslint/no-namespace': 'off',
|
|
12
|
+
'@typescript-eslint/no-explicit-any': 'off',
|
|
13
|
+
quotes: ['error', 'single', { avoidEscape: true, allowTemplateLiterals: true }]
|
|
14
|
+
}
|
|
15
|
+
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/{bus.js → dist/bus.js}
RENAMED
|
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
|
|
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
|
|
@@ -1,6 +1,7 @@
|
|
|
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");
|
|
4
5
|
var reflect_1 = require("../../reflect");
|
|
5
6
|
function CommandHandler() {
|
|
6
7
|
return function (target, propertyKey) {
|
|
@@ -11,9 +12,9 @@ function CommandHandler() {
|
|
|
11
12
|
if (paramTypes.length > 1) {
|
|
12
13
|
throw new Error("".concat(target.constructor.name, ".").concat(propertyKey.toString(), " should have only one argument!"));
|
|
13
14
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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
|
+
}
|
|
17
18
|
(0, reflect_1.reflect)(target, propertyKey).registerCommandHandler(paramTypes[0].prototype);
|
|
18
19
|
};
|
|
19
20
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-handler.js","sourceRoot":"","sources":["../../../src/decorators/handler/command-handler.ts"],"names":[],"mappings":";;;AAAA,wCAA0C;AAE1C,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,IAAI,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,YAAY,cAAO,CAAC,EAAE;YAC/C,MAAM,IAAI,KAAK,CAAC,UAAG,MAAM,CAAC,WAAW,CAAC,IAAI,cAAI,WAAW,CAAC,QAAQ,EAAE,wCAAqC,CAAC,CAAC;SAC9G;QAED,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"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,6 +1,7 @@
|
|
|
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");
|
|
4
5
|
var reflect_1 = require("../../reflect");
|
|
5
6
|
function EventHandler(mode) {
|
|
6
7
|
return function (target, propertyKey) {
|
|
@@ -11,9 +12,9 @@ function EventHandler(mode) {
|
|
|
11
12
|
if (paramTypes.length > 1) {
|
|
12
13
|
throw new Error("".concat(target.constructor.name, ".").concat(propertyKey.toString(), " should have only one argument!"));
|
|
13
14
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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
|
+
}
|
|
17
18
|
(0, reflect_1.reflect)(target, propertyKey).registerEventHandler(paramTypes[0].prototype, mode);
|
|
18
19
|
};
|
|
19
20
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-handler.js","sourceRoot":"","sources":["../../../src/decorators/handler/event-handler.ts"],"names":[],"mappings":";;;AAAA,wCAAwC;AAGxC,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,IAAI,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,YAAY,YAAK,CAAC,EAAE;YAC7C,MAAM,IAAI,KAAK,CAAC,UAAG,MAAM,CAAC,WAAW,CAAC,IAAI,cAAI,WAAW,CAAC,QAAQ,EAAE,uCAAoC,CAAC,CAAC;SAC7G;QAED,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
|
|
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
|
|
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
|