web_api_base 3.6.8 → 3.7.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.
- package/dist/Application.d.ts +24 -24
- package/dist/Application.js +449 -421
- package/dist/Application.js.map +1 -1
- package/dist/ApplicationConfiguration.d.ts +18 -18
- package/dist/ApplicationConfiguration.js +126 -126
- package/dist/bin/CreateApplication.d.ts +1 -1
- package/dist/bin/CreateApplication.js +16 -16
- package/dist/bin/CreateController.d.ts +1 -1
- package/dist/bin/CreateController.js +21 -21
- package/dist/controllers/base/ControllerBase.d.ts +19 -19
- package/dist/controllers/base/ControllerBase.js +46 -46
- package/dist/decorators/controllers/ControllerDecorators.d.ts +50 -46
- package/dist/decorators/controllers/ControllerDecorators.js +172 -166
- package/dist/decorators/controllers/ControllerDecorators.js.map +1 -1
- package/dist/decorators/documentation/DocumentationDecorators.d.ts +17 -17
- package/dist/decorators/documentation/DocumentationDecorators.js +38 -38
- package/dist/decorators/validations/ValidationDecorators.d.ts +53 -53
- package/dist/decorators/validations/ValidationDecorators.js +180 -180
- package/dist/decorators/validations/ValidationDecorators.js.map +1 -1
- package/dist/dependencyInjection/DependecyService.d.ts +28 -28
- package/dist/dependencyInjection/DependecyService.js +135 -135
- package/dist/dependencyInjection/DependecyService.js.map +1 -1
- package/dist/dependencyInjection/IDIContext.d.ts +7 -7
- package/dist/dependencyInjection/IDIContext.js +2 -2
- package/dist/documentation/CSS.d.ts +6 -6
- package/dist/documentation/CSS.js +18 -18
- package/dist/documentation/CSS.js.map +1 -1
- package/dist/documentation/Documentation.d.ts +7 -7
- package/dist/documentation/Documentation.js +80 -80
- package/dist/documentation/HTML.d.ts +4 -4
- package/dist/documentation/HTML.js +13 -13
- package/dist/documentation/HTML.js.map +1 -1
- package/dist/documentation/JS.d.ts +5 -5
- package/dist/documentation/JS.js +36 -34
- package/dist/documentation/JS.js.map +1 -1
- package/dist/enums/httpVerbs/HttpVerbs.d.ts +6 -6
- package/dist/enums/httpVerbs/HttpVerbs.js +10 -10
- package/dist/enums/httpVerbs/HttpVerbs.js.map +1 -1
- package/dist/exceptions/ArgumentNullException.d.ts +3 -3
- package/dist/exceptions/ArgumentNullException.js +9 -9
- package/dist/exceptions/ControllerLoadException.d.ts +3 -3
- package/dist/exceptions/ControllerLoadException.js +9 -9
- package/dist/exceptions/Exception.d.ts +4 -4
- package/dist/exceptions/Exception.js +9 -9
- package/dist/exceptions/FindDependencyException.d.ts +3 -3
- package/dist/exceptions/FindDependencyException.js +9 -9
- package/dist/index.d.ts +47 -45
- package/dist/index.js +155 -147
- package/dist/index.js.map +1 -1
- package/dist/interfaces/IApplication.d.ts +13 -13
- package/dist/interfaces/IApplication.js +2 -2
- package/dist/interfaces/IApplicationConfiguration.d.ts +12 -12
- package/dist/interfaces/IApplicationConfiguration.js +2 -2
- package/dist/interfaces/IController.d.ts +5 -5
- package/dist/interfaces/IController.js +2 -2
- package/dist/metadata/FunctionAnalizer.d.ts +8 -8
- package/dist/metadata/FunctionAnalizer.js +22 -22
- package/dist/metadata/OwnMetaDataContainer.d.ts +12 -12
- package/dist/metadata/OwnMetaDataContainer.js +32 -32
- package/dist/metadata/OwnMetaDataContainer.js.map +1 -1
- package/dist/metadata/Type.d.ts +4 -4
- package/dist/metadata/Type.js +36 -36
- package/dist/midlewares/IMidleware.d.ts +19 -19
- package/dist/midlewares/IMidleware.js +2 -2
- package/package.json +8 -11
|
@@ -1,136 +1,136 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.DIEscope = void 0;
|
|
7
|
-
require("reflect-metadata");
|
|
8
|
-
const FindDependencyException_1 = __importDefault(require("../exceptions/FindDependencyException"));
|
|
9
|
-
class DependecyService {
|
|
10
|
-
static RegisterFor(type, ctor, scope, builder) {
|
|
11
|
-
let defaultBuilder = DependecyService.DefaultObjectBuilder(type, ctor);
|
|
12
|
-
let exist = this._services.find(s => s.Type == type);
|
|
13
|
-
if (exist === undefined)
|
|
14
|
-
this._services.push({ Type: type, Builder: builder !== null && builder !== void 0 ? builder : defaultBuilder, Scope: scope !== null && scope !== void 0 ? scope : DIEscope.TRANSIENT });
|
|
15
|
-
else {
|
|
16
|
-
exist.Scope = scope !== null && scope !== void 0 ? scope : exist.Scope;
|
|
17
|
-
exist.Builder = builder !== null && builder !== void 0 ? builder : defaultBuilder;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
static Register(type, scope, builder) {
|
|
21
|
-
let defaultBuilder = DependecyService.DefaultObjectBuilder(type);
|
|
22
|
-
let exist = this._services.find(s => s.Type == type);
|
|
23
|
-
if (exist === undefined)
|
|
24
|
-
this._services.push({ Type: type, Builder: builder !== null && builder !== void 0 ? builder : defaultBuilder, Scope: scope !== null && scope !== void 0 ? scope : DIEscope.TRANSIENT });
|
|
25
|
-
else {
|
|
26
|
-
exist.Scope = scope !== null && scope !== void 0 ? scope : exist.Scope;
|
|
27
|
-
exist.Builder = builder !== null && builder !== void 0 ? builder : defaultBuilder;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
static DefaultObjectBuilder(type, ctor) {
|
|
31
|
-
return function (context) {
|
|
32
|
-
let service = DependecyService._services.find(u => u.Type == type);
|
|
33
|
-
if (context && context.Intances && (service === null || service === void 0 ? void 0 : service.Scope) == DIEscope.SCOPED) {
|
|
34
|
-
let scopped = context.Intances.filter(s => s.Type == type);
|
|
35
|
-
if (scopped.length > 0 && scopped[0].Object) {
|
|
36
|
-
return scopped[0].Object;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
let insance = Reflect.construct(ctor !== null && ctor !== void 0 ? ctor : type, []);
|
|
40
|
-
DependecyService.CheckForDependenciesAndResolve(insance, (context !== null && context !== void 0 ? context : DependecyService.IsDIConext(insance)) ? insance : undefined);
|
|
41
|
-
return insance;
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
static Resolve(type, context) {
|
|
45
|
-
let service = this._services.find(u => u.Type == type);
|
|
46
|
-
if (!service)
|
|
47
|
-
return undefined;
|
|
48
|
-
let insance = service.Builder(context);
|
|
49
|
-
if (service.Scope == DIEscope.SINGLETON) {
|
|
50
|
-
service.Builder = () => insance;
|
|
51
|
-
}
|
|
52
|
-
return insance;
|
|
53
|
-
}
|
|
54
|
-
static ResolveCtor(ctor, context) {
|
|
55
|
-
let service = this._services.find(u => u.Type == ctor);
|
|
56
|
-
if (!service)
|
|
57
|
-
return undefined;
|
|
58
|
-
let insance = service.Builder(context);
|
|
59
|
-
if (service.Scope == DIEscope.SINGLETON) {
|
|
60
|
-
service.Builder = () => insance;
|
|
61
|
-
}
|
|
62
|
-
return insance;
|
|
63
|
-
}
|
|
64
|
-
static Injectable() {
|
|
65
|
-
return function (target, property) {
|
|
66
|
-
Reflect.defineMetadata(DependecyService._injectableKey, true, target.constructor, property);
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
static IsInjectable(target, property) {
|
|
70
|
-
var _a;
|
|
71
|
-
let marked = (_a = Reflect.getMetadata(DependecyService._injectableKey, target, property)) !== null && _a !== void 0 ? _a : false;
|
|
72
|
-
let type = Reflect.getMetadata(DependecyService._injectableTypeKey, target, property) != undefined;
|
|
73
|
-
return marked || type;
|
|
74
|
-
}
|
|
75
|
-
static InjectOne(cTor) {
|
|
76
|
-
return function (target, property) {
|
|
77
|
-
Reflect.defineMetadata(DependecyService._injectableTypeKey, cTor, target.constructor, property);
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
static GetDIType(target, property) {
|
|
81
|
-
let type = Reflect.getMetadata(DependecyService._injectableTypeKey, target.constructor, property);
|
|
82
|
-
if (!type)
|
|
83
|
-
type = Reflect.getMetadata("design:type", target, property);
|
|
84
|
-
return type;
|
|
85
|
-
}
|
|
86
|
-
static CheckForDependenciesAndResolve(object, context) {
|
|
87
|
-
for (let k of Object.keys(object)) {
|
|
88
|
-
if (object[k] != 'function') {
|
|
89
|
-
if (DependecyService.IsInjectable(object.constructor, k)) {
|
|
90
|
-
let tp = DependecyService.GetDIType(object, k);
|
|
91
|
-
if (tp == undefined)
|
|
92
|
-
throw new FindDependencyException_1.default(`Can not resolve the dependecy of ${object.constructor.name}.${k}`);
|
|
93
|
-
let service = this._services.find(u => u.Type == tp);
|
|
94
|
-
if (context && context.Intances && (service === null || service === void 0 ? void 0 : service.Scope) == DIEscope.SCOPED) {
|
|
95
|
-
let scopped = context.Intances.filter(s => s.Type == tp);
|
|
96
|
-
if (scopped.length > 0 && scopped[0]) {
|
|
97
|
-
object[k] = scopped[0].Object;
|
|
98
|
-
continue;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
let instance = DependecyService.Resolve(tp);
|
|
102
|
-
if (instance == undefined)
|
|
103
|
-
throw new FindDependencyException_1.default(`Can not resolve the dependecy of ${object.constructor.name}.${k}`);
|
|
104
|
-
if (DependecyService.IsDIConext(object) && (service === null || service === void 0 ? void 0 : service.Scope) == DIEscope.SCOPED) {
|
|
105
|
-
if (!object.Intances)
|
|
106
|
-
object.Intances = [];
|
|
107
|
-
object.Intances.push({
|
|
108
|
-
Object: instance,
|
|
109
|
-
Type: tp
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
object[k] = instance;
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
static Build(Ctor) {
|
|
118
|
-
let object = Reflect.construct(Ctor, []);
|
|
119
|
-
this.CheckForDependenciesAndResolve(object);
|
|
120
|
-
return object;
|
|
121
|
-
}
|
|
122
|
-
static IsDIConext(object) {
|
|
123
|
-
return "Intances" in object;
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
DependecyService.
|
|
128
|
-
DependecyService.
|
|
129
|
-
|
|
130
|
-
var DIEscope;
|
|
131
|
-
(function (DIEscope) {
|
|
132
|
-
DIEscope[DIEscope["SCOPED"] = 0] = "SCOPED";
|
|
133
|
-
DIEscope[DIEscope["TRANSIENT"] = 1] = "TRANSIENT";
|
|
134
|
-
DIEscope[DIEscope["SINGLETON"] = 2] = "SINGLETON";
|
|
135
|
-
})(DIEscope
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.DIEscope = void 0;
|
|
7
|
+
require("reflect-metadata");
|
|
8
|
+
const FindDependencyException_1 = __importDefault(require("../exceptions/FindDependencyException"));
|
|
9
|
+
class DependecyService {
|
|
10
|
+
static RegisterFor(type, ctor, scope, builder) {
|
|
11
|
+
let defaultBuilder = DependecyService.DefaultObjectBuilder(type, ctor);
|
|
12
|
+
let exist = this._services.find(s => s.Type == type);
|
|
13
|
+
if (exist === undefined)
|
|
14
|
+
this._services.push({ Type: type, Builder: builder !== null && builder !== void 0 ? builder : defaultBuilder, Scope: scope !== null && scope !== void 0 ? scope : DIEscope.TRANSIENT });
|
|
15
|
+
else {
|
|
16
|
+
exist.Scope = scope !== null && scope !== void 0 ? scope : exist.Scope;
|
|
17
|
+
exist.Builder = builder !== null && builder !== void 0 ? builder : defaultBuilder;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
static Register(type, scope, builder) {
|
|
21
|
+
let defaultBuilder = DependecyService.DefaultObjectBuilder(type);
|
|
22
|
+
let exist = this._services.find(s => s.Type == type);
|
|
23
|
+
if (exist === undefined)
|
|
24
|
+
this._services.push({ Type: type, Builder: builder !== null && builder !== void 0 ? builder : defaultBuilder, Scope: scope !== null && scope !== void 0 ? scope : DIEscope.TRANSIENT });
|
|
25
|
+
else {
|
|
26
|
+
exist.Scope = scope !== null && scope !== void 0 ? scope : exist.Scope;
|
|
27
|
+
exist.Builder = builder !== null && builder !== void 0 ? builder : defaultBuilder;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
static DefaultObjectBuilder(type, ctor) {
|
|
31
|
+
return function (context) {
|
|
32
|
+
let service = DependecyService._services.find(u => u.Type == type);
|
|
33
|
+
if (context && context.Intances && (service === null || service === void 0 ? void 0 : service.Scope) == DIEscope.SCOPED) {
|
|
34
|
+
let scopped = context.Intances.filter(s => s.Type == type);
|
|
35
|
+
if (scopped.length > 0 && scopped[0].Object) {
|
|
36
|
+
return scopped[0].Object;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
let insance = Reflect.construct(ctor !== null && ctor !== void 0 ? ctor : type, []);
|
|
40
|
+
DependecyService.CheckForDependenciesAndResolve(insance, (context !== null && context !== void 0 ? context : DependecyService.IsDIConext(insance)) ? insance : undefined);
|
|
41
|
+
return insance;
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
static Resolve(type, context) {
|
|
45
|
+
let service = this._services.find(u => u.Type == type);
|
|
46
|
+
if (!service)
|
|
47
|
+
return undefined;
|
|
48
|
+
let insance = service.Builder(context);
|
|
49
|
+
if (service.Scope == DIEscope.SINGLETON) {
|
|
50
|
+
service.Builder = () => insance;
|
|
51
|
+
}
|
|
52
|
+
return insance;
|
|
53
|
+
}
|
|
54
|
+
static ResolveCtor(ctor, context) {
|
|
55
|
+
let service = this._services.find(u => u.Type == ctor);
|
|
56
|
+
if (!service)
|
|
57
|
+
return undefined;
|
|
58
|
+
let insance = service.Builder(context);
|
|
59
|
+
if (service.Scope == DIEscope.SINGLETON) {
|
|
60
|
+
service.Builder = () => insance;
|
|
61
|
+
}
|
|
62
|
+
return insance;
|
|
63
|
+
}
|
|
64
|
+
static Injectable() {
|
|
65
|
+
return function (target, property) {
|
|
66
|
+
Reflect.defineMetadata(DependecyService._injectableKey, true, target.constructor, property);
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
static IsInjectable(target, property) {
|
|
70
|
+
var _a;
|
|
71
|
+
let marked = (_a = Reflect.getMetadata(DependecyService._injectableKey, target, property)) !== null && _a !== void 0 ? _a : false;
|
|
72
|
+
let type = Reflect.getMetadata(DependecyService._injectableTypeKey, target, property) != undefined;
|
|
73
|
+
return marked || type;
|
|
74
|
+
}
|
|
75
|
+
static InjectOne(cTor) {
|
|
76
|
+
return function (target, property) {
|
|
77
|
+
Reflect.defineMetadata(DependecyService._injectableTypeKey, cTor, target.constructor, property);
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
static GetDIType(target, property) {
|
|
81
|
+
let type = Reflect.getMetadata(DependecyService._injectableTypeKey, target.constructor, property);
|
|
82
|
+
if (!type)
|
|
83
|
+
type = Reflect.getMetadata("design:type", target, property);
|
|
84
|
+
return type;
|
|
85
|
+
}
|
|
86
|
+
static CheckForDependenciesAndResolve(object, context) {
|
|
87
|
+
for (let k of Object.keys(object)) {
|
|
88
|
+
if (object[k] != 'function') {
|
|
89
|
+
if (DependecyService.IsInjectable(object.constructor, k)) {
|
|
90
|
+
let tp = DependecyService.GetDIType(object, k);
|
|
91
|
+
if (tp == undefined)
|
|
92
|
+
throw new FindDependencyException_1.default(`Can not resolve the dependecy of ${object.constructor.name}.${k}`);
|
|
93
|
+
let service = this._services.find(u => u.Type == tp);
|
|
94
|
+
if (context && context.Intances && (service === null || service === void 0 ? void 0 : service.Scope) == DIEscope.SCOPED) {
|
|
95
|
+
let scopped = context.Intances.filter(s => s.Type == tp);
|
|
96
|
+
if (scopped.length > 0 && scopped[0]) {
|
|
97
|
+
object[k] = scopped[0].Object;
|
|
98
|
+
continue;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
let instance = DependecyService.Resolve(tp);
|
|
102
|
+
if (instance == undefined)
|
|
103
|
+
throw new FindDependencyException_1.default(`Can not resolve the dependecy of ${object.constructor.name}.${k}`);
|
|
104
|
+
if (DependecyService.IsDIConext(object) && (service === null || service === void 0 ? void 0 : service.Scope) == DIEscope.SCOPED) {
|
|
105
|
+
if (!object.Intances)
|
|
106
|
+
object.Intances = [];
|
|
107
|
+
object.Intances.push({
|
|
108
|
+
Object: instance,
|
|
109
|
+
Type: tp
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
object[k] = instance;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
static Build(Ctor) {
|
|
118
|
+
let object = Reflect.construct(Ctor, []);
|
|
119
|
+
this.CheckForDependenciesAndResolve(object);
|
|
120
|
+
return object;
|
|
121
|
+
}
|
|
122
|
+
static IsDIConext(object) {
|
|
123
|
+
return "Intances" in object;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
DependecyService._services = [];
|
|
127
|
+
DependecyService._injectableKey = "di:injectable";
|
|
128
|
+
DependecyService._injectableTypeKey = "di:injectable-type";
|
|
129
|
+
exports.default = DependecyService;
|
|
130
|
+
var DIEscope;
|
|
131
|
+
(function (DIEscope) {
|
|
132
|
+
DIEscope[DIEscope["SCOPED"] = 0] = "SCOPED";
|
|
133
|
+
DIEscope[DIEscope["TRANSIENT"] = 1] = "TRANSIENT";
|
|
134
|
+
DIEscope[DIEscope["SINGLETON"] = 2] = "SINGLETON";
|
|
135
|
+
})(DIEscope || (exports.DIEscope = DIEscope = {}));
|
|
136
136
|
//# sourceMappingURL=DependecyService.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DependecyService.js","sourceRoot":"","sources":["../../dependencyInjection/DependecyService.ts"],"names":[],"mappings":";;;;;;AAAA,4BAA0B;AAG1B,oGAA4E;AAE5E,MAAqB,gBAAgB;IAO1B,MAAM,CAAC,WAAW,CAAC,IAAe,EAAE,IAAsC,EAAE,KAAkB,EAAE,OAAoB;QAEvH,IAAI,cAAc,GAAG,gBAAgB,CAAC,oBAAoB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAEvE,IAAI,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,C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BACV;oBAED,MAAM,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC;iBACxB;aACJ;SACJ;IACL,CAAC;IAGM,MAAM,CAAC,KAAK,CAAqB,IAAQ;QAE5C,IAAI,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QAEzC,IAAI,CAAC,8BAA8B,CAAC,MAAM,CAAC,CAAC;QAE5C,OAAO,MAAW,CAAC;IACvB,CAAC;IAEO,MAAM,CAAC,UAAU,CAAC,MAAY;QAElC,OAAO,UAAU,IAAI,MAAM,CAAC;IAChC,CAAC;;AA7Lc,0BAAS,GAAgB,EAAE,CAAC;AAE5B,+BAAc,GAAY,eAAe,CAAC;AAC1C,mCAAkB,GAAY,oBAAoB,CAAC;kBALjD,gBAAgB;AAoMrC,IAAY,QAKX;AALD,WAAY,QAAQ;IAEhB,2CAAM,CAAA;IACN,iDAAS,CAAA;IACT,iDAAS,CAAA;AACb,CAAC,EALW,QAAQ,wBAAR,QAAQ,QAKnB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export default interface IDIContext {
|
|
2
|
-
Intances: IDIItem[];
|
|
3
|
-
}
|
|
4
|
-
export interface IDIItem {
|
|
5
|
-
Object: any;
|
|
6
|
-
Type: Function;
|
|
7
|
-
}
|
|
1
|
+
export default interface IDIContext {
|
|
2
|
+
Intances: IDIItem[];
|
|
3
|
+
}
|
|
4
|
+
export interface IDIItem {
|
|
5
|
+
Object: any;
|
|
6
|
+
Type: Function;
|
|
7
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
//# sourceMappingURL=IDIContext.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export default class CSS {
|
|
2
|
-
private static _dark;
|
|
3
|
-
private static _light;
|
|
4
|
-
private static _css;
|
|
5
|
-
static Save(): void;
|
|
6
|
-
}
|
|
1
|
+
export default class CSS {
|
|
2
|
+
private static _dark;
|
|
3
|
+
private static _light;
|
|
4
|
+
private static _css;
|
|
5
|
+
static Save(): void;
|
|
6
|
+
}
|
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const fs_1 = __importDefault(require("fs"));
|
|
7
|
-
class CSS {
|
|
8
|
-
static Save() {
|
|
9
|
-
let theme = CSS._light;
|
|
10
|
-
if (process.argv.indexOf("--dark") > -1 || process.argv.indexOf("--DARK") > -1)
|
|
11
|
-
theme = CSS._dark;
|
|
12
|
-
fs_1.default.writeFileSync(`${__dirname}\\style.css`, theme + '\r\n' + CSS._css, 'utf-8');
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
exports.default = CSS;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const fs_1 = __importDefault(require("fs"));
|
|
7
|
+
class CSS {
|
|
8
|
+
static Save() {
|
|
9
|
+
let theme = CSS._light;
|
|
10
|
+
if (process.argv.indexOf("--dark") > -1 || process.argv.indexOf("--DARK") > -1)
|
|
11
|
+
theme = CSS._dark;
|
|
12
|
+
fs_1.default.writeFileSync(`${__dirname}\\style.css`, theme + '\r\n' + CSS._css, 'utf-8');
|
|
13
|
+
}
|
|
14
|
+
}
|
|
16
15
|
CSS._dark = `
|
|
17
16
|
:root
|
|
18
17
|
{
|
|
@@ -33,7 +32,7 @@ CSS._dark = `
|
|
|
33
32
|
--h-to : rgb(26, 26, 26);
|
|
34
33
|
--tx-color : rgb(199, 226, 136);
|
|
35
34
|
--b-color : rgb(233, 233, 233);
|
|
36
|
-
}`;
|
|
35
|
+
}`;
|
|
37
36
|
CSS._light = `
|
|
38
37
|
:root
|
|
39
38
|
{
|
|
@@ -53,7 +52,7 @@ CSS._light = `
|
|
|
53
52
|
--tx-color : rgb(73, 73, 73);
|
|
54
53
|
--b-color : rgb(233, 233, 233);
|
|
55
54
|
}
|
|
56
|
-
`;
|
|
55
|
+
`;
|
|
57
56
|
CSS._css = `
|
|
58
57
|
|
|
59
58
|
body
|
|
@@ -298,5 +297,6 @@ CSS._css = `
|
|
|
298
297
|
|
|
299
298
|
|
|
300
299
|
|
|
301
|
-
`;
|
|
300
|
+
`;
|
|
301
|
+
exports.default = CSS;
|
|
302
302
|
//# sourceMappingURL=CSS.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CSS.js","sourceRoot":"","sources":["../../documentation/CSS.ts"],"names":[],"mappings":";;;;;AAAA,4CAAoB;AAGpB,MAAqB,GAAG;IAoSb,MAAM,CAAC,IAAI;QAEd,IAAI,KAAK,GAAG,GAAG,CAAC,MAAM,CAAC;QAEvB,IAAG,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;YACzE,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC;QAEtB,YAAE,CAAC,aAAa,CAAC,GAAG,SAAS,aAAa,EAAE,KAAK,GAAG,MAAM,GAAE,GAAG,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACnF,CAAC;;
|
|
1
|
+
{"version":3,"file":"CSS.js","sourceRoot":"","sources":["../../documentation/CSS.ts"],"names":[],"mappings":";;;;;AAAA,4CAAoB;AAGpB,MAAqB,GAAG;IAoSb,MAAM,CAAC,IAAI;QAEd,IAAI,KAAK,GAAG,GAAG,CAAC,MAAM,CAAC;QAEvB,IAAG,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;YACzE,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC;QAEtB,YAAE,CAAC,aAAa,CAAC,GAAG,SAAS,aAAa,EAAE,KAAK,GAAG,MAAM,GAAE,GAAG,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACnF,CAAC;;AAzSc,SAAK,GAAG;;;;;;;;;;;;;;;;;;;;MAoBrB,CAAC;AAEY,UAAM,GAAG;;;;;;;;;;;;;;;;;;;KAmBvB,CAAC;AAEa,QAAI,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAoPrB,CAAC;kBAlSe,GAAG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import IController from "../interfaces/IController";
|
|
2
|
-
import { Express } from "express";
|
|
3
|
-
export default class Documentation {
|
|
4
|
-
CreateDocumentation(controllers: {
|
|
5
|
-
new (...args: any[]): IController;
|
|
6
|
-
}[], app: Express): void;
|
|
7
|
-
}
|
|
1
|
+
import IController from "../interfaces/IController";
|
|
2
|
+
import { Express } from "express";
|
|
3
|
+
export default class Documentation {
|
|
4
|
+
CreateDocumentation(controllers: {
|
|
5
|
+
new (...args: any[]): IController;
|
|
6
|
+
}[], app: Express): void;
|
|
7
|
+
}
|
|
@@ -1,81 +1,81 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const ControllerDecorators_1 = __importDefault(require("../decorators/controllers/ControllerDecorators"));
|
|
7
|
-
const HTML_1 = __importDefault(require("./HTML"));
|
|
8
|
-
const JS_1 = __importDefault(require("./JS"));
|
|
9
|
-
const CSS_1 = __importDefault(require("./CSS"));
|
|
10
|
-
const Type_1 = __importDefault(require("../metadata/Type"));
|
|
11
|
-
const DocumentationDecorators_1 = require("../decorators/documentation/DocumentationDecorators");
|
|
12
|
-
const child_process_1 = __importDefault(require("child_process"));
|
|
13
|
-
const Application_1 = __importDefault(require("../Application"));
|
|
14
|
-
class Documentation {
|
|
15
|
-
CreateDocumentation(controllers, app) {
|
|
16
|
-
var _a;
|
|
17
|
-
let documentations = [];
|
|
18
|
-
for (let c of controllers) {
|
|
19
|
-
let empty = new c();
|
|
20
|
-
let methods = Reflect.ownKeys(empty.constructor.prototype).filter(m => {
|
|
21
|
-
return typeof empty[m] == "function";
|
|
22
|
-
});
|
|
23
|
-
let route = ControllerDecorators_1.default.GetRoute(empty);
|
|
24
|
-
let doc = {
|
|
25
|
-
Id: 'c_' + documentations.length,
|
|
26
|
-
Route: route !== null && route !== void 0 ? route : "",
|
|
27
|
-
Controller: c.name,
|
|
28
|
-
Resources: []
|
|
29
|
-
};
|
|
30
|
-
for (let method of methods) {
|
|
31
|
-
let action = ControllerDecorators_1.default.GetAction(empty, method.toString());
|
|
32
|
-
if (!action) {
|
|
33
|
-
continue;
|
|
34
|
-
}
|
|
35
|
-
let verb = ControllerDecorators_1.default.GetVerb(empty, method.toString());
|
|
36
|
-
let fromBody = ControllerDecorators_1.default.GetFromBodyArgs(empty.constructor, method.toString());
|
|
37
|
-
let fromQuery = ControllerDecorators_1.default.GetFromQueryArgs(empty.constructor, method.toString());
|
|
38
|
-
let template = DocumentationDecorators_1.DocumentationDecorators.GetRequestJson(empty, method.toString());
|
|
39
|
-
if (!template && fromBody.length > 0) {
|
|
40
|
-
template = JSON.stringify(Type_1.default.CreateTemplateFrom(fromBody[0].Type));
|
|
41
|
-
}
|
|
42
|
-
let description = DocumentationDecorators_1.DocumentationDecorators.GetDescription(empty, method.toString());
|
|
43
|
-
doc.Resources.push({
|
|
44
|
-
Description: description !== null && description !== void 0 ? description : "",
|
|
45
|
-
Id: `${doc.Id}-${doc.Resources.length}`,
|
|
46
|
-
Route: `${route}${action}`,
|
|
47
|
-
Verb: (_a = verb === null || verb === void 0 ? void 0 : verb.toString()) !== null && _a !== void 0 ? _a : "GET",
|
|
48
|
-
Template: template !== null && template !== void 0 ? template : "",
|
|
49
|
-
Response: DocumentationDecorators_1.DocumentationDecorators.GetProducesResponse(empty.constructor, method.toString()),
|
|
50
|
-
FromBody: fromBody.map(s => { return { Field: s.Field, Type: s.Type.name }; }),
|
|
51
|
-
FromQuery: fromQuery.map(s => { return { Field: s.Field, Type: s.Type.name }; })
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
if (doc.Resources.length > 0) {
|
|
55
|
-
JS_1.default.Append(`AddResource(${JSON.stringify(doc)});`);
|
|
56
|
-
documentations.push(doc);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
if (documentations.length > 0) {
|
|
60
|
-
JS_1.default.Save();
|
|
61
|
-
HTML_1.default.Save();
|
|
62
|
-
CSS_1.default.Save();
|
|
63
|
-
app.get('/playground', (_, resp) => {
|
|
64
|
-
resp.sendFile(`${__dirname}\\index.html`);
|
|
65
|
-
});
|
|
66
|
-
app.get('/style.css', (_, resp) => {
|
|
67
|
-
resp.sendFile(`${__dirname}\\style.css`);
|
|
68
|
-
});
|
|
69
|
-
app.get('/script.js', (_, resp) => {
|
|
70
|
-
resp.sendFile(`${__dirname}\\script.js`);
|
|
71
|
-
});
|
|
72
|
-
console.log(Application_1.default.Configurations);
|
|
73
|
-
child_process_1.default.exec(`start "" "http://${Application_1.default.Configurations.Host}:${Application_1.default.Configurations.Port}/playground"`, (error, stdout, stdin) => {
|
|
74
|
-
if (error)
|
|
75
|
-
console.error(error);
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
exports.default = Documentation;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const ControllerDecorators_1 = __importDefault(require("../decorators/controllers/ControllerDecorators"));
|
|
7
|
+
const HTML_1 = __importDefault(require("./HTML"));
|
|
8
|
+
const JS_1 = __importDefault(require("./JS"));
|
|
9
|
+
const CSS_1 = __importDefault(require("./CSS"));
|
|
10
|
+
const Type_1 = __importDefault(require("../metadata/Type"));
|
|
11
|
+
const DocumentationDecorators_1 = require("../decorators/documentation/DocumentationDecorators");
|
|
12
|
+
const child_process_1 = __importDefault(require("child_process"));
|
|
13
|
+
const Application_1 = __importDefault(require("../Application"));
|
|
14
|
+
class Documentation {
|
|
15
|
+
CreateDocumentation(controllers, app) {
|
|
16
|
+
var _a;
|
|
17
|
+
let documentations = [];
|
|
18
|
+
for (let c of controllers) {
|
|
19
|
+
let empty = new c();
|
|
20
|
+
let methods = Reflect.ownKeys(empty.constructor.prototype).filter(m => {
|
|
21
|
+
return typeof empty[m] == "function";
|
|
22
|
+
});
|
|
23
|
+
let route = ControllerDecorators_1.default.GetRoute(empty);
|
|
24
|
+
let doc = {
|
|
25
|
+
Id: 'c_' + documentations.length,
|
|
26
|
+
Route: route !== null && route !== void 0 ? route : "",
|
|
27
|
+
Controller: c.name,
|
|
28
|
+
Resources: []
|
|
29
|
+
};
|
|
30
|
+
for (let method of methods) {
|
|
31
|
+
let action = ControllerDecorators_1.default.GetAction(empty, method.toString());
|
|
32
|
+
if (!action) {
|
|
33
|
+
continue;
|
|
34
|
+
}
|
|
35
|
+
let verb = ControllerDecorators_1.default.GetVerb(empty, method.toString());
|
|
36
|
+
let fromBody = ControllerDecorators_1.default.GetFromBodyArgs(empty.constructor, method.toString());
|
|
37
|
+
let fromQuery = ControllerDecorators_1.default.GetFromQueryArgs(empty.constructor, method.toString());
|
|
38
|
+
let template = DocumentationDecorators_1.DocumentationDecorators.GetRequestJson(empty, method.toString());
|
|
39
|
+
if (!template && fromBody.length > 0) {
|
|
40
|
+
template = JSON.stringify(Type_1.default.CreateTemplateFrom(fromBody[0].Type));
|
|
41
|
+
}
|
|
42
|
+
let description = DocumentationDecorators_1.DocumentationDecorators.GetDescription(empty, method.toString());
|
|
43
|
+
doc.Resources.push({
|
|
44
|
+
Description: description !== null && description !== void 0 ? description : "",
|
|
45
|
+
Id: `${doc.Id}-${doc.Resources.length}`,
|
|
46
|
+
Route: `${route}${action}`,
|
|
47
|
+
Verb: (_a = verb === null || verb === void 0 ? void 0 : verb.toString()) !== null && _a !== void 0 ? _a : "GET",
|
|
48
|
+
Template: template !== null && template !== void 0 ? template : "",
|
|
49
|
+
Response: DocumentationDecorators_1.DocumentationDecorators.GetProducesResponse(empty.constructor, method.toString()),
|
|
50
|
+
FromBody: fromBody.map(s => { return { Field: s.Field, Type: s.Type.name }; }),
|
|
51
|
+
FromQuery: fromQuery.map(s => { return { Field: s.Field, Type: s.Type.name }; })
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
if (doc.Resources.length > 0) {
|
|
55
|
+
JS_1.default.Append(`AddResource(${JSON.stringify(doc)});`);
|
|
56
|
+
documentations.push(doc);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
if (documentations.length > 0) {
|
|
60
|
+
JS_1.default.Save();
|
|
61
|
+
HTML_1.default.Save();
|
|
62
|
+
CSS_1.default.Save();
|
|
63
|
+
app.get('/playground', (_, resp) => {
|
|
64
|
+
resp.sendFile(`${__dirname}\\index.html`);
|
|
65
|
+
});
|
|
66
|
+
app.get('/style.css', (_, resp) => {
|
|
67
|
+
resp.sendFile(`${__dirname}\\style.css`);
|
|
68
|
+
});
|
|
69
|
+
app.get('/script.js', (_, resp) => {
|
|
70
|
+
resp.sendFile(`${__dirname}\\script.js`);
|
|
71
|
+
});
|
|
72
|
+
console.log(Application_1.default.Configurations);
|
|
73
|
+
child_process_1.default.exec(`start "" "http://${Application_1.default.Configurations.Host}:${Application_1.default.Configurations.Port}/playground"`, (error, stdout, stdin) => {
|
|
74
|
+
if (error)
|
|
75
|
+
console.error(error);
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
exports.default = Documentation;
|
|
81
81
|
//# sourceMappingURL=Documentation.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export default class HTML {
|
|
2
|
-
private static _html;
|
|
3
|
-
static Save(): void;
|
|
4
|
-
}
|
|
1
|
+
export default class HTML {
|
|
2
|
+
private static _html;
|
|
3
|
+
static Save(): void;
|
|
4
|
+
}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const fs_1 = __importDefault(require("fs"));
|
|
7
|
-
class HTML {
|
|
8
|
-
static Save() {
|
|
9
|
-
fs_1.default.writeFileSync(`${__dirname}\\index.html`, HTML._html, 'utf-8');
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
exports.default = HTML;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const fs_1 = __importDefault(require("fs"));
|
|
7
|
+
class HTML {
|
|
8
|
+
static Save() {
|
|
9
|
+
fs_1.default.writeFileSync(`${__dirname}\\index.html`, HTML._html, 'utf-8');
|
|
10
|
+
}
|
|
11
|
+
}
|
|
13
12
|
HTML._html = `<!DOCTYPE html>
|
|
14
13
|
<html lang="en">
|
|
15
14
|
<head>
|
|
@@ -22,5 +21,6 @@ HTML._html = `<!DOCTYPE html>
|
|
|
22
21
|
<div id="root"></div>
|
|
23
22
|
<script src="./script.js"> </script>
|
|
24
23
|
</body>
|
|
25
|
-
</html>`;
|
|
24
|
+
</html>`;
|
|
25
|
+
exports.default = HTML;
|
|
26
26
|
//# sourceMappingURL=HTML.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HTML.js","sourceRoot":"","sources":["../../documentation/HTML.ts"],"names":[],"mappings":";;;;;AAAA,4CAAoB;AAGpB,MAAqB,IAAI;IAgBd,MAAM,CAAC,IAAI;QAEd,YAAE,CAAC,aAAa,CAAC,GAAG,SAAS,cAAc,EAAE,IAAI,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IACtE,CAAC;;
|
|
1
|
+
{"version":3,"file":"HTML.js","sourceRoot":"","sources":["../../documentation/HTML.ts"],"names":[],"mappings":";;;;;AAAA,4CAAoB;AAGpB,MAAqB,IAAI;IAgBd,MAAM,CAAC,IAAI;QAEd,YAAE,CAAC,aAAa,CAAC,GAAG,SAAS,cAAc,EAAE,IAAI,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IACtE,CAAC;;AAjBc,UAAK,GAAG;;;;;;;;;;;;YAYf,CAAC;kBAdQ,IAAI"}
|