@grandlinex/kernel 0.17.1 → 0.18.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/CHANGELOG.md +4 -0
- package/dist/KernelModule.d.ts +0 -3
- package/dist/KernelModule.js +1 -22
- package/dist/classes/BaseApiAction.js +7 -7
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
package/dist/KernelModule.d.ts
CHANGED
package/dist/KernelModule.js
CHANGED
|
@@ -130,7 +130,7 @@ var KernelModule = /** @class */ (function (_super) {
|
|
|
130
130
|
db.registerEntity(new GKey_1.default());
|
|
131
131
|
this.setDb(db);
|
|
132
132
|
endpoint = new KernelEndpoint_1.default('api', this, this.getKernel().getAppServerPort());
|
|
133
|
-
this.
|
|
133
|
+
this.setPresenter(endpoint);
|
|
134
134
|
return [4 /*yield*/, this.getKernel().triggerFunction('load')];
|
|
135
135
|
case 1:
|
|
136
136
|
_a.sent();
|
|
@@ -139,27 +139,6 @@ var KernelModule = /** @class */ (function (_super) {
|
|
|
139
139
|
});
|
|
140
140
|
});
|
|
141
141
|
};
|
|
142
|
-
KernelModule.prototype.startup = function () {
|
|
143
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
144
|
-
return __generator(this, function (_a) {
|
|
145
|
-
return [2 /*return*/, Promise.resolve()];
|
|
146
|
-
});
|
|
147
|
-
});
|
|
148
|
-
};
|
|
149
|
-
KernelModule.prototype.beforeServiceStart = function () {
|
|
150
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
151
|
-
return __generator(this, function (_a) {
|
|
152
|
-
return [2 /*return*/, Promise.resolve()];
|
|
153
|
-
});
|
|
154
|
-
});
|
|
155
|
-
};
|
|
156
|
-
KernelModule.prototype.final = function () {
|
|
157
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
158
|
-
return __generator(this, function (_a) {
|
|
159
|
-
return [2 /*return*/, Promise.resolve()];
|
|
160
|
-
});
|
|
161
|
-
});
|
|
162
|
-
};
|
|
163
142
|
return KernelModule;
|
|
164
143
|
}(BaseKernelModule_1.default));
|
|
165
144
|
exports.default = KernelModule;
|
|
@@ -30,29 +30,29 @@ var BaseApiAction = /** @class */ (function (_super) {
|
|
|
30
30
|
BaseApiAction.prototype.register = function () {
|
|
31
31
|
var endpoint;
|
|
32
32
|
if (this.exmod) {
|
|
33
|
-
endpoint = this.exmod.
|
|
33
|
+
endpoint = this.exmod.getPresenter();
|
|
34
34
|
}
|
|
35
35
|
else {
|
|
36
|
-
endpoint = this.getModule().
|
|
36
|
+
endpoint = this.getModule().getPresenter();
|
|
37
37
|
}
|
|
38
38
|
if (endpoint) {
|
|
39
|
-
this.log("register ".concat(this.
|
|
39
|
+
this.log("register ".concat(this.getName()));
|
|
40
40
|
var app = endpoint.getApp();
|
|
41
41
|
switch (this.type) {
|
|
42
42
|
case 'POST':
|
|
43
|
-
app.post(this.
|
|
43
|
+
app.post(this.getName(), this.secureHandler);
|
|
44
44
|
break;
|
|
45
45
|
case 'USE':
|
|
46
|
-
app.use(this.
|
|
46
|
+
app.use(this.getName(), this.secureHandler);
|
|
47
47
|
break;
|
|
48
48
|
case 'GET':
|
|
49
49
|
default:
|
|
50
|
-
app.get(this.
|
|
50
|
+
app.get(this.getName(), this.secureHandler);
|
|
51
51
|
break;
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
else {
|
|
55
|
-
this.error("on register -> ".concat(this.
|
|
55
|
+
this.error("on register -> ".concat(this.getName()));
|
|
56
56
|
this.error("No Endpoint found");
|
|
57
57
|
}
|
|
58
58
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grandlinex/kernel",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0",
|
|
4
4
|
"description": "GrandLineX is an out-of-the-box server framework on top of ExpressJs.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
},
|
|
28
28
|
"license": "BSD-3-Clause",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@grandlinex/bundle-elogger": "^0.
|
|
31
|
-
"@grandlinex/bundle-postgresql": "^0.
|
|
32
|
-
"@grandlinex/bundle-sqlight": "^0.
|
|
33
|
-
"@grandlinex/core": "^0.
|
|
30
|
+
"@grandlinex/bundle-elogger": "^0.18.0",
|
|
31
|
+
"@grandlinex/bundle-postgresql": "^0.18.0",
|
|
32
|
+
"@grandlinex/bundle-sqlight": "^0.18.0",
|
|
33
|
+
"@grandlinex/core": "^0.18.0",
|
|
34
34
|
"axios": "^0.24.0",
|
|
35
35
|
"body-parser": "^1.19.1",
|
|
36
36
|
"express": "^4.17.2",
|