@my-devkit/firebase 1.0.157 → 1.0.158
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/dist/aggregate.js +30 -52
- package/dist/aggregate.js.map +1 -1
- package/dist/app-factory.js +139 -261
- package/dist/app-factory.js.map +1 -1
- package/dist/bus.js +44 -101
- package/dist/bus.js.map +1 -1
- package/dist/context.js +69 -132
- package/dist/context.js.map +1 -1
- package/dist/decorators/controller/body.js +6 -6
- package/dist/decorators/controller/body.js.map +1 -1
- package/dist/decorators/controller/body.spec.js +55 -90
- package/dist/decorators/controller/body.spec.js.map +1 -1
- package/dist/decorators/controller/controller.js +3 -3
- package/dist/decorators/controller/controller.js.map +1 -1
- package/dist/decorators/controller/controller.spec.js +14 -48
- package/dist/decorators/controller/controller.spec.js.map +1 -1
- package/dist/decorators/controller/get.js +4 -4
- package/dist/decorators/controller/get.js.map +1 -1
- package/dist/decorators/controller/get.spec.js +30 -62
- package/dist/decorators/controller/get.spec.js.map +1 -1
- package/dist/decorators/controller/index.js +5 -1
- package/dist/decorators/controller/index.js.map +1 -1
- package/dist/decorators/controller/param.js +6 -6
- package/dist/decorators/controller/param.js.map +1 -1
- package/dist/decorators/controller/param.spec.js +48 -82
- package/dist/decorators/controller/param.spec.js.map +1 -1
- package/dist/decorators/controller/post.js +4 -4
- package/dist/decorators/controller/post.js.map +1 -1
- package/dist/decorators/controller/post.spec.js +69 -102
- package/dist/decorators/controller/post.spec.js.map +1 -1
- package/dist/decorators/controller/query.js +6 -6
- package/dist/decorators/controller/query.js.map +1 -1
- package/dist/decorators/controller/query.spec.js +48 -82
- package/dist/decorators/controller/query.spec.js.map +1 -1
- package/dist/decorators/handler/command-handler.js +7 -7
- package/dist/decorators/handler/command-handler.js.map +1 -1
- package/dist/decorators/handler/command-handler.spec.js +95 -178
- package/dist/decorators/handler/command-handler.spec.js.map +1 -1
- package/dist/decorators/handler/event-handler.js +7 -7
- package/dist/decorators/handler/event-handler.js.map +1 -1
- package/dist/decorators/handler/event-handler.spec.js +98 -181
- package/dist/decorators/handler/event-handler.spec.js.map +1 -1
- package/dist/decorators/handler/index.js +5 -1
- package/dist/decorators/handler/index.js.map +1 -1
- package/dist/decorators/index.js +5 -1
- package/dist/decorators/index.js.map +1 -1
- package/dist/decorators/injectable.js +2 -2
- package/dist/decorators/injectable.js.map +1 -1
- package/dist/decorators/module.js +2 -2
- package/dist/decorators/module.js.map +1 -1
- package/dist/decorators/transactional-client.js +2 -2
- package/dist/decorators/transactional-client.js.map +1 -1
- package/dist/execution-mode-enum.js +1 -1
- package/dist/execution-mode-enum.js.map +1 -1
- package/dist/firestore-client.js +179 -277
- package/dist/firestore-client.js.map +1 -1
- package/dist/handler-helper.js +57 -140
- package/dist/handler-helper.js.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/injector.js +14 -25
- package/dist/injector.js.map +1 -1
- package/dist/interfaces/from-array.d.ts +1 -1
- package/dist/interfaces/index.js +5 -1
- package/dist/interfaces/index.js.map +1 -1
- package/dist/interfaces/newable.d.ts +1 -1
- package/dist/reflect.d.ts +3 -3
- package/dist/reflect.js +51 -57
- package/dist/reflect.js.map +1 -1
- package/dist/request-method.enum.js +1 -1
- package/dist/request-method.enum.js.map +1 -1
- package/dist/sanity-check/controller.js +29 -64
- package/dist/sanity-check/controller.js.map +1 -1
- package/dist/sanity-check/module.js +11 -14
- package/dist/sanity-check/module.js.map +1 -1
- package/dist/server/index.js +5 -1
- package/dist/server/index.js.map +1 -1
- package/dist/server/middlewares/authentication-middleware.js +45 -93
- package/dist/server/middlewares/authentication-middleware.js.map +1 -1
- package/dist/server/middlewares/create-context-middleware.js +8 -39
- package/dist/server/middlewares/create-context-middleware.js.map +1 -1
- package/dist/server/middlewares/error-middleware.js +30 -62
- package/dist/server/middlewares/error-middleware.js.map +1 -1
- package/dist/server/middlewares/headers-middleware.js +11 -42
- package/dist/server/middlewares/headers-middleware.js.map +1 -1
- package/dist/server/middlewares/index.js +5 -1
- package/dist/server/middlewares/index.js.map +1 -1
- package/dist/server/middlewares/not-found-middleware.js +4 -34
- package/dist/server/middlewares/not-found-middleware.js.map +1 -1
- package/dist/server/server.d.ts +1 -1
- package/dist/server/server.js +73 -103
- package/dist/server/server.js.map +1 -1
- package/dist/zip-helper.js +32 -12
- package/dist/zip-helper.js.map +1 -1
- package/package.json +28 -25
- package/src/decorators/handler/command-handler.spec.ts +7 -6
- package/src/decorators/handler/event-handler.spec.ts +9 -8
- package/src/reflect.ts +1 -1
- package/src/server/server.ts +2 -2
- package/tsconfig.json +11 -17
- package/dist/tsconfig.tsbuildinfo +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"param.spec.js","sourceRoot":"","sources":["../../../src/decorators/controller/param.spec.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"param.spec.js","sourceRoot":"","sources":["../../../src/decorators/controller/param.spec.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAA8B;AAE9B,2CAAwC;AACxC,6CAA0C;AAC1C,+BAA4B;AAC5B,mCAAgC;AAEhC,QAAQ,CAAC,yBAAyB,EAAE,GAAG,EAAE;IAErC,IAAK,MAGJ;IAHD,WAAK,MAAM;QACP,mCAAQ,CAAA;QACR,2BAAiB,CAAA;IACrB,CAAC,EAHI,MAAM,KAAN,MAAM,QAGV;IAGD,IAAM,SAAS,GAAf,MAAM,SAAS;QAEJ,OAAO,CAAc,EAAU;YAClC,OAAO,YAAY,EAAE,EAAE,CAAC;QAC5B,CAAC;QAGM,oBAAoB,CAAmB,OAAa,EAAmB,MAAc;YACxF,OAAO,yBAAyB,MAAM,IAAI,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC;QACtE,CAAC;KACJ,CAAA;IARU;QADN,IAAA,SAAG,EAAC,KAAK,CAAC;QACK,WAAA,IAAA,aAAK,EAAC,IAAI,CAAC,CAAA;;;;4CAE1B;IAGM;QADN,IAAA,S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CAAC,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,yDAAyD,CAAC,CAAC;YAEtH,IAAA,aAAM,EAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;YACxE,IAAA,aAAM,EAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,IAAI,CAAC,0BAA0B,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;YAEnI,IAAA,aAAM,EAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YAE5E,QAAQ,CAAC,MAAM,CAAC,MAAM,GAAG,QAAQ,CAAC;YAClC,IAAA,aAAM,EAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAClF,CAAC,CAAA,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Post = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
const reflect_1 = require("../../reflect");
|
|
5
|
+
const request_method_enum_1 = require("../../request-method.enum");
|
|
6
6
|
function Post(path) {
|
|
7
|
-
return
|
|
8
|
-
(0, reflect_1.reflect)(target.constructor, propertyKey).registerControllerRoute({ path
|
|
7
|
+
return (target, propertyKey) => {
|
|
8
|
+
(0, reflect_1.reflect)(target.constructor, propertyKey).registerControllerRoute({ path, requestMethod: request_method_enum_1.RequestMethod.POST });
|
|
9
9
|
};
|
|
10
10
|
}
|
|
11
11
|
exports.Post = Post;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"post.js","sourceRoot":"","sources":["../../../src/decorators/controller/post.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"post.js","sourceRoot":"","sources":["../../../src/decorators/controller/post.ts"],"names":[],"mappings":";;;AAAA,2CAAwC;AACxC,mEAA0D;AAE1D,SAAgB,IAAI,CAAC,IAAY;IAC7B,OAAO,CAAC,MAAM,EAAE,WAAW,EAAE,EAAE;QAC3B,IAAA,iBAAO,EAAC,MAAM,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC,uBAAuB,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,mCAAa,CAAC,IAAI,EAAE,CAAC,CAAC;IAClH,CAAC,CAAA;AACL,CAAC;AAJD,oBAIC"}
|
|
@@ -20,114 +20,81 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
20
20
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
24
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
25
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
26
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
27
|
-
function step(op) {
|
|
28
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
29
|
-
while (_) try {
|
|
30
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
31
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
32
|
-
switch (op[0]) {
|
|
33
|
-
case 0: case 1: t = op; break;
|
|
34
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
35
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
36
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
37
|
-
default:
|
|
38
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
39
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
40
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
41
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
42
|
-
if (t[2]) _.ops.pop();
|
|
43
|
-
_.trys.pop(); continue;
|
|
44
|
-
}
|
|
45
|
-
op = body.call(thisArg, _);
|
|
46
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
47
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
23
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
describe('Given a Post decorator',
|
|
59
|
-
|
|
60
|
-
|
|
24
|
+
const core_1 = require("@my-devkit/core");
|
|
25
|
+
const chai_1 = require("chai");
|
|
26
|
+
const reflect_1 = require("../../reflect");
|
|
27
|
+
const request_method_enum_1 = require("../../request-method.enum");
|
|
28
|
+
const body_1 = require("./body");
|
|
29
|
+
const controller_1 = require("./controller");
|
|
30
|
+
const post_1 = require("./post");
|
|
31
|
+
describe('Given a Post decorator', () => {
|
|
32
|
+
class Command {
|
|
33
|
+
constructor() {
|
|
61
34
|
this.testString = null;
|
|
62
35
|
this.testDate = null;
|
|
63
36
|
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
function TestClass() {
|
|
37
|
+
}
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, core_1.autoserializeAs)(String),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], Command.prototype, "testString", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, core_1.autoserializeAs)(Date),
|
|
44
|
+
__metadata("design:type", Date)
|
|
45
|
+
], Command.prototype, "testDate", void 0);
|
|
46
|
+
let TestClass = class TestClass {
|
|
47
|
+
constructor() {
|
|
76
48
|
this.test = (0, core_1.guid)();
|
|
77
49
|
}
|
|
78
|
-
|
|
79
|
-
return
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
return
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
return
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
(0, chai_1.expect)(config.routes[2].methodName).equal('deleteMethod');
|
|
127
|
-
(0, chai_1.expect)(config.routes[2].requestMethod).equal(request_method_enum_1.RequestMethod.POST);
|
|
128
|
-
return [2 /*return*/];
|
|
129
|
-
});
|
|
130
|
-
}); });
|
|
50
|
+
createMethod(param1) {
|
|
51
|
+
return `createMethod: ${param1}`;
|
|
52
|
+
}
|
|
53
|
+
updateMethod(param1) {
|
|
54
|
+
return `updateMethod: ${param1}`;
|
|
55
|
+
}
|
|
56
|
+
deleteMethod(param1) {
|
|
57
|
+
return `deleteMethod: ${param1}`;
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, post_1.Post)('create'),
|
|
62
|
+
__param(0, (0, body_1.Body)()),
|
|
63
|
+
__metadata("design:type", Function),
|
|
64
|
+
__metadata("design:paramtypes", [Date]),
|
|
65
|
+
__metadata("design:returntype", String)
|
|
66
|
+
], TestClass.prototype, "createMethod", null);
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, post_1.Post)('update'),
|
|
69
|
+
__param(0, (0, body_1.Body)()),
|
|
70
|
+
__metadata("design:type", Function),
|
|
71
|
+
__metadata("design:paramtypes", [Command]),
|
|
72
|
+
__metadata("design:returntype", String)
|
|
73
|
+
], TestClass.prototype, "updateMethod", null);
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, post_1.Post)('delete'),
|
|
76
|
+
__param(0, (0, body_1.Body)()),
|
|
77
|
+
__metadata("design:type", Function),
|
|
78
|
+
__metadata("design:paramtypes", [Command]),
|
|
79
|
+
__metadata("design:returntype", String)
|
|
80
|
+
], TestClass.prototype, "deleteMethod", null);
|
|
81
|
+
TestClass = __decorate([
|
|
82
|
+
(0, controller_1.Controller)('test')
|
|
83
|
+
], TestClass);
|
|
84
|
+
describe('When decorator is called', () => {
|
|
85
|
+
it('Then we should retrieve information via reflect', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
86
|
+
const config = (0, reflect_1.reflect)(TestClass).getControllerConfiguration();
|
|
87
|
+
(0, chai_1.expect)(config.routes.length).equal(3, 'Wrong route count detected');
|
|
88
|
+
(0, chai_1.expect)(config.routes[0].path).equal('create');
|
|
89
|
+
(0, chai_1.expect)(config.routes[0].methodName).equal('createMethod');
|
|
90
|
+
(0, chai_1.expect)(config.routes[0].requestMethod).equal(request_method_enum_1.RequestMethod.POST);
|
|
91
|
+
(0, chai_1.expect)(config.routes[1].path).equal('update');
|
|
92
|
+
(0, chai_1.expect)(config.routes[1].methodName).equal('updateMethod');
|
|
93
|
+
(0, chai_1.expect)(config.routes[1].requestMethod).equal(request_method_enum_1.RequestMethod.POST);
|
|
94
|
+
(0, chai_1.expect)(config.routes[2].path).equal('delete');
|
|
95
|
+
(0, chai_1.expect)(config.routes[2].methodName).equal('deleteMethod');
|
|
96
|
+
(0, chai_1.expect)(config.routes[2].requestMethod).equal(request_method_enum_1.RequestMethod.POST);
|
|
97
|
+
}));
|
|
131
98
|
});
|
|
132
99
|
});
|
|
133
100
|
//# sourceMappingURL=post.spec.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"post.spec.js","sourceRoot":"","sources":["../../../src/decorators/controller/post.spec.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"post.spec.js","sourceRoot":"","sources":["../../../src/decorators/controller/post.spec.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,0CAAwD;AACxD,+BAA8B;AAE9B,2CAAwC;AACxC,mEAA0D;AAC1D,iCAA8B;AAC9B,6CAA0C;AAC1C,iCAA8B;AAE9B,QAAQ,CAAC,wBAAwB,EAAE,GAAG,EAAE;IAEpC,MAAM,OAAO;QAAb;YAEW,eAAU,GAAW,IAAI,CAAC;YAG1B,aAAQ,GAAS,IAAI,CAAC;QACjC,CAAC;KAAA;IAJU;QADN,IAAA,sBAAe,EAAC,MAAM,CAAC;;+CACS;IAG1B;QADN,IAAA,sBAAe,EAAC,IAAI,CAAC;kCACL,IAAI;6CAAQ;IAK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AAM,EAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,KAAK,CAAC,mCAAa,CAAC,IAAI,CAAC,CAAC;YAEjE,IAAA,aAAM,EAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;YAC9C,IAAA,aAAM,EAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;YAC1D,IAAA,aAAM,EAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,KAAK,CAAC,mCAAa,CAAC,IAAI,CAAC,CAAC;YAEjE,IAAA,aAAM,EAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;YAC9C,IAAA,aAAM,EAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;YAC1D,IAAA,aAAM,EAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,KAAK,CAAC,mCAAa,CAAC,IAAI,CAAC,CAAC;QACrE,CAAC,CAAA,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Query = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
const core_1 = require("@my-devkit/core");
|
|
5
|
+
const reflect_1 = require("../../reflect");
|
|
6
6
|
function Query(key) {
|
|
7
|
-
return
|
|
8
|
-
|
|
7
|
+
return (target, propertyKey, parameterIndex) => {
|
|
8
|
+
const methodArguments = (0, reflect_1.reflect)(target, propertyKey).getParameters();
|
|
9
9
|
if (!methodArguments.hasOwnProperty(parameterIndex)) {
|
|
10
|
-
throw new Error(
|
|
10
|
+
throw new Error(`Query: can't find argument ${parameterIndex} on ${target.constructor.name}.${propertyKey.toString()}`);
|
|
11
11
|
}
|
|
12
|
-
|
|
12
|
+
const injector = (req) => {
|
|
13
13
|
if (req.query.hasOwnProperty(key)) {
|
|
14
14
|
return (0, core_1.deserialize)(req.query[key], methodArguments[parameterIndex]);
|
|
15
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query.js","sourceRoot":"","sources":["../../../src/decorators/controller/query.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"query.js","sourceRoot":"","sources":["../../../src/decorators/controller/query.ts"],"names":[],"mappings":";;;AAAA,0CAA8C;AAE9C,2CAAiE;AAGjE,SAAgB,KAAK,CAAC,GAAW;IAC7B,OAAO,CAAC,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,EAAE;QAC3C,MAAM,eAAe,GAAG,IAAA,iBAAO,EAAC,MAAM,EAAE,WAAW,CAAC,CAAC,aAAa,EAAE,CAAC;QACrE,IAAI,CAAC,eAAe,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE;YACjD,MAAM,IAAI,KAAK,CAAC,8BAA8B,cAAc,OAAO,MAAM,CAAC,WAAW,CAAC,IAAI,IAAI,WAAW,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;SAC3H;QAED,MAAM,QAAQ,GAA4B,CAAC,GAAmB,EAAE,EAAE;YAC9D,IAAI,GAAG,CAAC,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;gBAC/B,OAAO,IAAA,kBAAW,EAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,eAAe,CAAC,cAAc,CAAC,CAAC,CAAC;aACvE;QACL,CAAC,CAAC;QAEF,IAAA,iBAAO,EAAC,MAAM,EAAE,WAAW,CAAC,CAAC,uCAAuC,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC;IACnG,CAAC,CAAA;AACL,CAAC;AAfD,sBAeC"}
|
|
@@ -20,94 +20,60 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
20
20
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
24
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
25
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
26
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
27
|
-
function step(op) {
|
|
28
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
29
|
-
while (_) try {
|
|
30
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
31
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
32
|
-
switch (op[0]) {
|
|
33
|
-
case 0: case 1: t = op; break;
|
|
34
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
35
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
36
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
37
|
-
default:
|
|
38
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
39
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
40
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
41
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
42
|
-
if (t[2]) _.ops.pop();
|
|
43
|
-
_.trys.pop(); continue;
|
|
44
|
-
}
|
|
45
|
-
op = body.call(thisArg, _);
|
|
46
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
47
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
23
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
describe('Given a Query decorator',
|
|
57
|
-
|
|
24
|
+
const chai_1 = require("chai");
|
|
25
|
+
const reflect_1 = require("../../reflect");
|
|
26
|
+
const controller_1 = require("./controller");
|
|
27
|
+
const get_1 = require("./get");
|
|
28
|
+
const query_1 = require("./query");
|
|
29
|
+
describe('Given a Query decorator', () => {
|
|
30
|
+
let Gender;
|
|
58
31
|
(function (Gender) {
|
|
59
32
|
Gender[Gender["Male"] = 0] = "Male";
|
|
60
33
|
Gender["Female"] = "Female";
|
|
61
34
|
})(Gender || (Gender = {}));
|
|
62
|
-
|
|
63
|
-
|
|
35
|
+
let TestClass = class TestClass {
|
|
36
|
+
getById(id) {
|
|
37
|
+
return `getById: ${id}`;
|
|
38
|
+
}
|
|
39
|
+
all(minDate, gender) {
|
|
40
|
+
return `getByGenderOlderThan: ${gender} ${minDate.toISOString()}`;
|
|
64
41
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
(0,
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
(0, chai_1.expect)(config.routes[0].argumentInjectors[0](request1)).equals('guid 1');
|
|
101
|
-
request2 = { query: { gender: 0, minDate: '2021-02-15T14:23:00.318Z' } };
|
|
102
|
-
(0, chai_1.expect)(config.routes[1].argumentInjectors.length).equal(2, 'Wrong argumentInjectors length for getByGenderOlderThan');
|
|
103
|
-
(0, chai_1.expect)(config.routes[1].argumentInjectors[0](request2)).to.be.a('Date');
|
|
104
|
-
(0, chai_1.expect)(config.routes[1].argumentInjectors[0](request2).toISOString()).equals((new Date('2021-02-15T14:23:00.318Z')).toISOString());
|
|
105
|
-
(0, chai_1.expect)(config.routes[1].argumentInjectors[1](request2)).equals(Gender.Male);
|
|
106
|
-
request2.query.gender = 'Female';
|
|
107
|
-
(0, chai_1.expect)(config.routes[1].argumentInjectors[1](request2)).equals(Gender.Female);
|
|
108
|
-
return [2 /*return*/];
|
|
109
|
-
});
|
|
110
|
-
}); });
|
|
42
|
+
};
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, get_1.Get)('by-id'),
|
|
45
|
+
__param(0, (0, query_1.Query)('id')),
|
|
46
|
+
__metadata("design:type", Function),
|
|
47
|
+
__metadata("design:paramtypes", [String]),
|
|
48
|
+
__metadata("design:returntype", String)
|
|
49
|
+
], TestClass.prototype, "getById", null);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, get_1.Get)('all'),
|
|
52
|
+
__param(0, (0, query_1.Query)('minDate')),
|
|
53
|
+
__param(1, (0, query_1.Query)('gender')),
|
|
54
|
+
__metadata("design:type", Function),
|
|
55
|
+
__metadata("design:paramtypes", [Date, Object]),
|
|
56
|
+
__metadata("design:returntype", String)
|
|
57
|
+
], TestClass.prototype, "all", null);
|
|
58
|
+
TestClass = __decorate([
|
|
59
|
+
(0, controller_1.Controller)('test')
|
|
60
|
+
], TestClass);
|
|
61
|
+
describe('When decorator is called', () => {
|
|
62
|
+
it('Then we should retrieve information via reflect', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
63
|
+
const config = (0, reflect_1.reflect)(TestClass).getControllerConfiguration();
|
|
64
|
+
(0, chai_1.expect)(config.routes.length).equal(2, 'Wrong route count detected');
|
|
65
|
+
const request1 = { query: { id: 'guid 1' } };
|
|
66
|
+
(0, chai_1.expect)(config.routes[0].argumentInjectors.length).equal(1, 'Wrong argumentInjectors length for getById');
|
|
67
|
+
(0, chai_1.expect)(config.routes[0].argumentInjectors[0](request1)).to.be.a('string');
|
|
68
|
+
(0, chai_1.expect)(config.routes[0].argumentInjectors[0](request1)).equals('guid 1');
|
|
69
|
+
const request2 = { query: { gender: 0, minDate: '2021-02-15T14:23:00.318Z' } };
|
|
70
|
+
(0, chai_1.expect)(config.routes[1].argumentInjectors.length).equal(2, 'Wrong argumentInjectors length for getByGenderOlderThan');
|
|
71
|
+
(0, chai_1.expect)(config.routes[1].argumentInjectors[0](request2)).to.be.a('Date');
|
|
72
|
+
(0, chai_1.expect)(config.routes[1].argumentInjectors[0](request2).toISOString()).equals((new Date('2021-02-15T14:23:00.318Z')).toISOString());
|
|
73
|
+
(0, chai_1.expect)(config.routes[1].argumentInjectors[1](request2)).equals(Gender.Male);
|
|
74
|
+
request2.query.gender = 'Female';
|
|
75
|
+
(0, chai_1.expect)(config.routes[1].argumentInjectors[1](request2)).equals(Gender.Female);
|
|
76
|
+
}));
|
|
111
77
|
});
|
|
112
78
|
});
|
|
113
79
|
//# sourceMappingURL=query.spec.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query.spec.js","sourceRoot":"","sources":["../../../src/decorators/controller/query.spec.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"query.spec.js","sourceRoot":"","sources":["../../../src/decorators/controller/query.spec.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAA8B;AAE9B,2CAAwC;AACxC,6CAA0C;AAC1C,+BAA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CAAC,MAAM,GAAG,QAAQ,CAAC;YACjC,IAAA,aAAM,EAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAClF,CAAC,CAAA,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CommandHandler = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
const core_1 = require("@my-devkit/core");
|
|
5
|
+
const reflect_1 = require("../../reflect");
|
|
6
6
|
function CommandHandler() {
|
|
7
|
-
return
|
|
8
|
-
|
|
7
|
+
return (target, propertyKey) => {
|
|
8
|
+
const paramTypes = (0, reflect_1.reflect)(target, propertyKey).getParameters();
|
|
9
9
|
if (paramTypes.length === 0) {
|
|
10
|
-
throw new Error(
|
|
10
|
+
throw new Error(`${target.constructor.name}.${propertyKey.toString()} should have one argument!`);
|
|
11
11
|
}
|
|
12
12
|
if (paramTypes.length > 1) {
|
|
13
|
-
throw new Error(
|
|
13
|
+
throw new Error(`${target.constructor.name}.${propertyKey.toString()} should have only one argument!`);
|
|
14
14
|
}
|
|
15
15
|
if (!(paramTypes[0].prototype instanceof core_1.Command)) {
|
|
16
|
-
throw new Error(
|
|
16
|
+
throw new Error(`${target.constructor.name}.${propertyKey.toString()} should have a command as argument!`);
|
|
17
17
|
}
|
|
18
18
|
(0, reflect_1.reflect)(target, propertyKey).registerCommandHandler(paramTypes[0].prototype);
|
|
19
19
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-handler.js","sourceRoot":"","sources":["../../../src/decorators/handler/command-handler.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"command-handler.js","sourceRoot":"","sources":["../../../src/decorators/handler/command-handler.ts"],"names":[],"mappings":";;;AAAA,0CAA0C;AAE1C,2CAAwC;AAExC,SAAgB,cAAc;IAC1B,OAAO,CAAC,MAAM,EAAE,WAAW,EAAE,EAAE;QAC3B,MAAM,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,GAAG,MAAM,CAAC,WAAW,CAAC,IAAI,IAAI,WAAW,CAAC,QAAQ,EAAE,4BAA4B,CAAC,CAAC;SACrG;QAED,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE;YACvB,MAAM,IAAI,KAAK,CAAC,GAAG,MAAM,CAAC,WAAW,CAAC,IAAI,IAAI,WAAW,CAAC,QAAQ,EAAE,iCAAiC,CAAC,CAAC;SAC1G;QAED,IAAI,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,YAAY,cAAO,CAAC,EAAE;YAC/C,MAAM,IAAI,KAAK,CAAC,GAAG,MAAM,CAAC,WAAW,CAAC,IAAI,IAAI,WAAW,CAAC,QAAQ,EAAE,qCAAqC,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"}
|