web_api_base 3.5.0 → 3.6.2
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/Application.d.ts +5 -1
- package/dist/Application.js +57 -18
- package/dist/Application.js.map +1 -1
- package/dist/ApplicationConfiguration.d.ts +3 -2
- package/dist/ApplicationConfiguration.js +13 -18
- package/dist/ApplicationConfiguration.js.map +1 -1
- package/dist/bin/CreateApplication.js +4 -1
- package/dist/bin/CreateApplication.js.map +1 -1
- package/dist/bin/CreateController.js +2 -1
- package/dist/bin/CreateController.js.map +1 -1
- package/dist/decorators/controllers/ControllerDecorators.d.ts +2 -3
- package/dist/decorators/controllers/ControllerDecorators.js +6 -6
- package/dist/decorators/controllers/ControllerDecorators.js.map +1 -1
- package/dist/decorators/documentation/DocumentationDecorators.d.ts +17 -0
- package/dist/decorators/documentation/DocumentationDecorators.js +39 -0
- package/dist/decorators/documentation/DocumentationDecorators.js.map +1 -0
- package/dist/dependencyInjection/DependecyService.js +6 -2
- package/dist/dependencyInjection/DependecyService.js.map +1 -1
- package/dist/documentation/CSS.d.ts +6 -0
- package/dist/documentation/CSS.js +293 -0
- package/dist/documentation/CSS.js.map +1 -0
- package/dist/documentation/Documentation.d.ts +7 -0
- package/dist/documentation/Documentation.js +81 -0
- package/dist/documentation/Documentation.js.map +1 -0
- package/dist/documentation/HTML.d.ts +4 -0
- package/dist/documentation/HTML.js +26 -0
- package/dist/documentation/HTML.js.map +1 -0
- package/dist/documentation/JS.d.ts +5 -0
- package/dist/documentation/JS.js +239 -0
- package/dist/documentation/JS.js.map +1 -0
- package/dist/exceptions/ArgumentNullException.d.ts +3 -0
- package/dist/exceptions/ArgumentNullException.js +10 -0
- package/dist/exceptions/ArgumentNullException.js.map +1 -0
- package/dist/exceptions/FindDependencyException.d.ts +3 -0
- package/dist/exceptions/FindDependencyException.js +10 -0
- package/dist/exceptions/FindDependencyException.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +19 -1
- package/dist/index.js.map +1 -1
- package/dist/interfaces/IApplication.d.ts +1 -0
- package/dist/interfaces/IApplicationConfiguration.d.ts +2 -1
- package/dist/metadata/Type.d.ts +4 -0
- package/dist/metadata/Type.js +37 -0
- package/dist/metadata/Type.js.map +1 -0
- package/dist/midlewares/IMidleware.d.ts +2 -1
- package/package.json +1 -1
- package/readme.md +64 -1
- package/dist/temp/Application.d.ts +0 -5
- package/dist/temp/Application.js +0 -27
- package/dist/temp/Application.js.map +0 -1
- package/dist/temp/Index.d.ts +0 -1
- package/dist/temp/Index.js +0 -19
- package/dist/temp/Index.js.map +0 -1
- package/dist/temp/controllers/StatusController.d.ts +0 -21
- package/dist/temp/controllers/StatusController.js +0 -117
- package/dist/temp/controllers/StatusController.js.map +0 -1
- package/dist/temp/service/SampleService.d.ts +0 -9
- package/dist/temp/service/SampleService.js +0 -19
- package/dist/temp/service/SampleService.js.map +0 -1
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
const index_1 = require("../../index");
|
|
16
|
-
const SampleService_1 = require("../service/SampleService");
|
|
17
|
-
let StatusController = class StatusController extends index_1.ControllerBase {
|
|
18
|
-
constructor(some) {
|
|
19
|
-
super();
|
|
20
|
-
this.SomeService = some;
|
|
21
|
-
this.TypeInferedInjection = undefined;
|
|
22
|
-
}
|
|
23
|
-
CheckStatus(s, some) {
|
|
24
|
-
this.SomeService.DoSomething();
|
|
25
|
-
return this.OK({ status: "OK" });
|
|
26
|
-
}
|
|
27
|
-
TestAction(name) {
|
|
28
|
-
console.log(name);
|
|
29
|
-
this.OK();
|
|
30
|
-
}
|
|
31
|
-
TestActionTwo(name, age) {
|
|
32
|
-
console.log(name, age);
|
|
33
|
-
this.OK();
|
|
34
|
-
}
|
|
35
|
-
PostAction(user) {
|
|
36
|
-
this.OK(user);
|
|
37
|
-
}
|
|
38
|
-
PutAction(user) {
|
|
39
|
-
this.OK(user);
|
|
40
|
-
}
|
|
41
|
-
DeleteAction(id) {
|
|
42
|
-
return id;
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
__decorate([
|
|
46
|
-
(0, index_1.InjectAbstract)(SampleService_1.SampleServiceAbstract),
|
|
47
|
-
__metadata("design:type", SampleService_1.SampleServiceAbstract)
|
|
48
|
-
], StatusController.prototype, "SomeService", void 0);
|
|
49
|
-
__decorate([
|
|
50
|
-
(0, index_1.Inject)(),
|
|
51
|
-
__metadata("design:type", SampleService_1.SampleServiceAbstract)
|
|
52
|
-
], StatusController.prototype, "TypeInferedInjection", void 0);
|
|
53
|
-
__decorate([
|
|
54
|
-
(0, index_1.Verb)(index_1.HTTPVerbs.GET),
|
|
55
|
-
(0, index_1.Action)("/check"),
|
|
56
|
-
__param(0, (0, index_1.FromBody)()),
|
|
57
|
-
__param(1, (0, index_1.FromBody)()),
|
|
58
|
-
__metadata("design:type", Function),
|
|
59
|
-
__metadata("design:paramtypes", [String, SampleService_1.SampleServiceAbstract]),
|
|
60
|
-
__metadata("design:returntype", void 0)
|
|
61
|
-
], StatusController.prototype, "CheckStatus", null);
|
|
62
|
-
__decorate([
|
|
63
|
-
(0, index_1.GET)(),
|
|
64
|
-
(0, index_1.Action)("Test"),
|
|
65
|
-
__param(0, (0, index_1.FromQuery)()),
|
|
66
|
-
__metadata("design:type", Function),
|
|
67
|
-
__metadata("design:paramtypes", [String]),
|
|
68
|
-
__metadata("design:returntype", void 0)
|
|
69
|
-
], StatusController.prototype, "TestAction", null);
|
|
70
|
-
__decorate([
|
|
71
|
-
(0, index_1.GET)(),
|
|
72
|
-
(0, index_1.Action)(),
|
|
73
|
-
__param(0, (0, index_1.FromQuery)("name")),
|
|
74
|
-
__param(1, (0, index_1.FromQuery)()),
|
|
75
|
-
__metadata("design:type", Function),
|
|
76
|
-
__metadata("design:paramtypes", [String, Number]),
|
|
77
|
-
__metadata("design:returntype", void 0)
|
|
78
|
-
], StatusController.prototype, "TestActionTwo", null);
|
|
79
|
-
__decorate([
|
|
80
|
-
(0, index_1.POST)(),
|
|
81
|
-
__param(0, (0, index_1.FromBody)()),
|
|
82
|
-
__metadata("design:type", Function),
|
|
83
|
-
__metadata("design:paramtypes", [Object]),
|
|
84
|
-
__metadata("design:returntype", void 0)
|
|
85
|
-
], StatusController.prototype, "PostAction", null);
|
|
86
|
-
__decorate([
|
|
87
|
-
(0, index_1.PUT)(),
|
|
88
|
-
__param(0, (0, index_1.FromBody)()),
|
|
89
|
-
__metadata("design:type", Function),
|
|
90
|
-
__metadata("design:paramtypes", [Object]),
|
|
91
|
-
__metadata("design:returntype", void 0)
|
|
92
|
-
], StatusController.prototype, "PutAction", null);
|
|
93
|
-
__decorate([
|
|
94
|
-
(0, index_1.DELETE)(),
|
|
95
|
-
__param(0, (0, index_1.FromQuery)()),
|
|
96
|
-
__metadata("design:type", Function),
|
|
97
|
-
__metadata("design:paramtypes", [Number]),
|
|
98
|
-
__metadata("design:returntype", Number)
|
|
99
|
-
], StatusController.prototype, "DeleteAction", null);
|
|
100
|
-
StatusController = __decorate([
|
|
101
|
-
(0, index_1.Route)("/status"),
|
|
102
|
-
(0, index_1.UseBefore)(context => {
|
|
103
|
-
console.debug("First midleware");
|
|
104
|
-
context.Next();
|
|
105
|
-
}),
|
|
106
|
-
(0, index_1.UseBefore)(context => {
|
|
107
|
-
console.debug("Second midleware");
|
|
108
|
-
context.Next();
|
|
109
|
-
}),
|
|
110
|
-
(0, index_1.UseAfter)(s => {
|
|
111
|
-
console.log(s.Exception);
|
|
112
|
-
console.log(s.Result);
|
|
113
|
-
}),
|
|
114
|
-
__metadata("design:paramtypes", [SampleService_1.SampleServiceAbstract])
|
|
115
|
-
], StatusController);
|
|
116
|
-
exports.default = StatusController;
|
|
117
|
-
//# sourceMappingURL=StatusController.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StatusController.js","sourceRoot":"","sources":["../../../temp/controllers/StatusController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,uCAAkL;AAClL,4DAAiE;AAoBjE,IAAqB,gBAAgB,GAArC,MAAqB,gBAAiB,SAAQ,sBAAc;IASxD,YAAY,IAA4B;QAEpC,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;QACxB,IAAI,CAAC,oBAAoB,GAAG,SAAS,CAAC;IAC1C,CAAC;IAIM,WAAW,CAAa,CAAU,EAAa,IAA4B;QAE9E,IAAI,CAAC,WAAW,CAAC,WAAW,EAAE,CAAC;QAC/B,OAAO,IAAI,CAAC,EAAE,CAAC,EAAC,MAAM,EAAG,IAAI,EAAC,CAAC,CAAC;IACpC,CAAC;IAIM,UAAU,CAAa,IAAa;QAEvC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAClB,IAAI,CAAC,EAAE,EAAE,CAAC;IACd,CAAC;IAIM,aAAa,CAAmB,IAAa,EAAc,GAAY;QAE1E,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC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AAK,CAAC,iBAAiB,CAAC,CAAC;QACjC,OAAO,CAAC,IAAI,EAAE,CAAC;IACnB,CAAC,CAAC;IACD,IAAA,iBAAS,EAAC,OAAO,CAAC,EAAE;QAEjB,OAAO,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;QAClC,OAAO,CAAC,IAAI,EAAE,CAAC;IACnB,CAAC,CAAC;IACD,IAAA,gBAAQ,EAAC,CAAC,CAAC,EAAE;QAGN,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;QACzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;IAE1B,CAAC,CAAC;qCAUiB,qCAAqB;GATvB,gBAAgB,CA2DpC;kBA3DoB,gBAAgB"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export declare abstract class SampleServiceAbstract {
|
|
2
|
-
abstract DoSomething(): void;
|
|
3
|
-
}
|
|
4
|
-
export declare class SampleService extends SampleServiceAbstract {
|
|
5
|
-
DoSomething(): void;
|
|
6
|
-
}
|
|
7
|
-
export declare class AnotherService extends SampleServiceAbstract {
|
|
8
|
-
DoSomething(): void;
|
|
9
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AnotherService = exports.SampleService = exports.SampleServiceAbstract = void 0;
|
|
4
|
-
class SampleServiceAbstract {
|
|
5
|
-
}
|
|
6
|
-
exports.SampleServiceAbstract = SampleServiceAbstract;
|
|
7
|
-
class SampleService extends SampleServiceAbstract {
|
|
8
|
-
DoSomething() {
|
|
9
|
-
console.log("Doing");
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
exports.SampleService = SampleService;
|
|
13
|
-
class AnotherService extends SampleServiceAbstract {
|
|
14
|
-
DoSomething() {
|
|
15
|
-
console.log("Doing another job");
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
exports.AnotherService = AnotherService;
|
|
19
|
-
//# sourceMappingURL=SampleService.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SampleService.js","sourceRoot":"","sources":["../../../temp/service/SampleService.ts"],"names":[],"mappings":";;;AAAA,MAAsB,qBAAqB;CAG1C;AAHD,sDAGC;AAID,MAAa,aAAc,SAAQ,qBAAqB;IAE7C,WAAW;QACd,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACzB,CAAC;CACJ;AALD,sCAKC;AAID,MAAa,cAAe,SAAQ,qBAAqB;IAE9C,WAAW;QACd,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;IACrC,CAAC;CACJ;AALD,wCAKC"}
|