@grandlinex/kernel 0.25.3 → 0.26.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/Kernel.d.ts +1 -0
- package/dist/KernelModule.js +1 -1
- package/dist/actions/ApiAuthTestAction.js +1 -1
- package/dist/actions/ApiVersionAction.js +1 -1
- package/dist/actions/GetTokenAction.js +1 -1
- package/dist/classes/BaseAction.js +1 -1
- package/dist/classes/BaseApiAction.js +1 -1
- package/dist/classes/BaseAuthProvider.d.ts +1 -1
- package/dist/classes/BaseEndpoint.js +1 -1
- package/dist/classes/timing/ExpressServerTiming.d.ts +1 -1
- package/dist/classes/timing/ExpressServerTiming.js +1 -1
- package/dist/classes/timing/ServerTiming.js +1 -1
- package/dist/classes/timing/ServerTimingElement.d.ts +1 -1
- package/dist/lib/index.d.ts +8 -8
- package/dist/modules/crypto/CryptoClient.js +1 -1
- package/dist/modules/crypto/utils/cors.d.ts +1 -1
- package/package.json +25 -29
package/dist/Kernel.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ export default class Kernel extends CoreKernel<ICClient> implements IKernel {
|
|
|
16
16
|
pathOverride?: string;
|
|
17
17
|
portOverride?: number;
|
|
18
18
|
envFilePath?: string;
|
|
19
|
+
loadFromLocalEnv?: boolean;
|
|
19
20
|
logger?: (k: CoreKernel<any>) => CoreLogger;
|
|
20
21
|
});
|
|
21
22
|
getAppServerPort(): number;
|
package/dist/KernelModule.js
CHANGED
|
@@ -29,7 +29,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
29
29
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
30
|
function step(op) {
|
|
31
31
|
if (f) throw new TypeError("Generator is already executing.");
|
|
32
|
-
while (_) try {
|
|
32
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
33
33
|
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;
|
|
34
34
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
35
35
|
switch (op[0]) {
|
|
@@ -29,7 +29,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
29
29
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
30
|
function step(op) {
|
|
31
31
|
if (f) throw new TypeError("Generator is already executing.");
|
|
32
|
-
while (_) try {
|
|
32
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
33
33
|
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;
|
|
34
34
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
35
35
|
switch (op[0]) {
|
|
@@ -29,7 +29,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
29
29
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
30
|
function step(op) {
|
|
31
31
|
if (f) throw new TypeError("Generator is already executing.");
|
|
32
|
-
while (_) try {
|
|
32
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
33
33
|
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;
|
|
34
34
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
35
35
|
switch (op[0]) {
|
|
@@ -29,7 +29,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
29
29
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
30
|
function step(op) {
|
|
31
31
|
if (f) throw new TypeError("Generator is already executing.");
|
|
32
|
-
while (_) try {
|
|
32
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
33
33
|
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;
|
|
34
34
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
35
35
|
switch (op[0]) {
|
|
@@ -29,7 +29,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
29
29
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
30
|
function step(op) {
|
|
31
31
|
if (f) throw new TypeError("Generator is already executing.");
|
|
32
|
-
while (_) try {
|
|
32
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
33
33
|
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;
|
|
34
34
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
35
35
|
switch (op[0]) {
|
|
@@ -36,7 +36,7 @@ var BaseApiAction = /** @class */ (function (_super) {
|
|
|
36
36
|
endpoint = this.getModule().getPresenter();
|
|
37
37
|
}
|
|
38
38
|
if (endpoint) {
|
|
39
|
-
this.
|
|
39
|
+
this.debug("register ".concat(this.type, " ").concat(this.getName()));
|
|
40
40
|
var app = endpoint.getApp();
|
|
41
41
|
switch (this.type) {
|
|
42
42
|
case 'POST':
|
|
@@ -37,7 +37,7 @@ var BaseEndpoint = /** @class */ (function (_super) {
|
|
|
37
37
|
return new Promise(function (resolve) {
|
|
38
38
|
_this.httpServer
|
|
39
39
|
.listen(_this.port, function () {
|
|
40
|
-
_this.
|
|
40
|
+
_this.info("Endpoint listen on ".concat(_this.port));
|
|
41
41
|
resolve(true);
|
|
42
42
|
})
|
|
43
43
|
.on('error', function (err) {
|
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
18
|
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;
|
|
19
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
18
|
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;
|
|
19
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
package/dist/lib/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import express, { Request, Response } from 'express';
|
|
|
2
2
|
import { ICoreAction, ICoreBridge, ICoreCache, ICoreCClient, ICoreClient, ICoreElement, ICoreKernel, ICoreKernelModule, ICorePresenter, ICoreService, IDataBase } from '@grandlinex/core';
|
|
3
3
|
import { IAuthProvider, JwtToken } from '../classes/BaseAuthProvider';
|
|
4
4
|
import { IExtensionInterface } from '../classes/timing/ExpressServerTiming';
|
|
5
|
-
export
|
|
5
|
+
export type ActionTypes = 'POST' | 'GET' | 'USE' | 'PATCH' | 'DELETE';
|
|
6
6
|
export interface ICClient extends ICoreCClient {
|
|
7
7
|
setAuthProvider(provider: IAuthProvider): boolean;
|
|
8
8
|
jwtVerifyAccessToken(token: string): Promise<JwtToken | null>;
|
|
@@ -24,13 +24,13 @@ export interface IKernel extends ICoreKernel<ICClient> {
|
|
|
24
24
|
req: Request;
|
|
25
25
|
}): void;
|
|
26
26
|
}
|
|
27
|
-
export
|
|
28
|
-
export
|
|
29
|
-
export
|
|
30
|
-
export
|
|
31
|
-
export
|
|
32
|
-
export
|
|
33
|
-
export
|
|
27
|
+
export type IBaseKernelModule<K extends IKernel = IKernel, T extends IDataBase<any, any> | null = any, P extends IBaseClient | null = any, C extends IBaseCache | null = any, E extends IBasePresenter | null = any> = ICoreKernelModule<K, T, P, C, E>;
|
|
28
|
+
export type IBasePresenter = ICorePresenter<express.Express>;
|
|
29
|
+
export type IBaseService<K extends IKernel = IKernel, T extends IDataBase<any, any> | null = any, P extends IBaseClient | null = any, C extends IBaseCache | null = any, E extends IBasePresenter | null = any> = ICoreService<K, T, P, C, E>;
|
|
30
|
+
export type IBaseClient<K extends IKernel = IKernel, T extends IDataBase<any, any> | null = any, P extends IBaseClient | null = any, C extends IBaseCache | null = any, E extends IBasePresenter | null = any> = ICoreClient;
|
|
31
|
+
export type IBaseBrige = ICoreBridge;
|
|
32
|
+
export type IBaseCache<K extends IKernel = IKernel, T extends IDataBase<any, any> | null = any, P extends IBaseClient | null = any, C extends IBaseCache | null = any, E extends IBasePresenter | null = any> = ICoreCache<K, T, P, C, E>;
|
|
33
|
+
export type IBaseElement<K extends IKernel = IKernel, T extends IDataBase<any, any> | null = any, P extends IBaseClient | null = any, C extends IBaseCache | null = any, E extends IBasePresenter | null = any> = ICoreElement<K, T, P, C, E>;
|
|
34
34
|
export interface IBaseAction<K extends IKernel = IKernel, T extends IDataBase<any, any> | null = any, P extends IBaseClient | null = any, C extends IBaseCache | null = any, E extends IBasePresenter | null = any> extends ICoreAction<K, T, P, C, E> {
|
|
35
35
|
handler(req: Request, res: Response, next: () => void, data: JwtToken | null, extension: IExtensionInterface): Promise<void>;
|
|
36
36
|
}
|
|
@@ -29,7 +29,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
29
29
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
30
|
function step(op) {
|
|
31
31
|
if (f) throw new TypeError("Generator is already executing.");
|
|
32
|
-
while (_) try {
|
|
32
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
33
33
|
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;
|
|
34
34
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
35
35
|
switch (op[0]) {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { NextFunction, Request, Response } from 'express';
|
|
2
|
-
export
|
|
2
|
+
export type CorsMiddleWare = (req: Request, res: Response, next: NextFunction) => void;
|
|
3
3
|
export declare const cors: CorsMiddleWare;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grandlinex/kernel",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.26.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,40 +27,36 @@
|
|
|
27
27
|
},
|
|
28
28
|
"license": "BSD-3-Clause",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@grandlinex/core": "^0.
|
|
30
|
+
"@grandlinex/core": "^0.26.0",
|
|
31
31
|
"axios": "^0.27.2",
|
|
32
|
-
"body-parser": "^1.20.
|
|
33
|
-
"express": "^4.18.
|
|
32
|
+
"body-parser": "^1.20.1",
|
|
33
|
+
"express": "^4.18.2",
|
|
34
34
|
"jsonwebtoken": "^8.5.1"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@
|
|
38
|
-
"@types/
|
|
39
|
-
"@types/
|
|
40
|
-
"@types/jsonwebtoken": "^8.5.6",
|
|
37
|
+
"@types/express": "^4.17.14",
|
|
38
|
+
"@types/jest": "^29.2.3",
|
|
39
|
+
"@types/jsonwebtoken": "^8.5.9",
|
|
41
40
|
"@types/node": "^16.11.12",
|
|
42
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
43
|
-
"@typescript-eslint/parser": "^5.
|
|
41
|
+
"@typescript-eslint/eslint-plugin": "^5.44.0",
|
|
42
|
+
"@typescript-eslint/parser": "^5.44.0",
|
|
44
43
|
"cross-env": "^7.0.3",
|
|
45
|
-
"eslint": "^8.
|
|
46
|
-
"eslint-config-airbnb": "^19.0.
|
|
47
|
-
"eslint-config-airbnb-typescript": "^
|
|
48
|
-
"eslint-config-prettier": "^8.
|
|
49
|
-
"eslint-plugin-import": "^2.
|
|
50
|
-
"eslint-plugin-jest": "^
|
|
51
|
-
"eslint-plugin-jsx-a11y": "^6.
|
|
52
|
-
"eslint-plugin-prettier": "^4.
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"jest": "^
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"ts-node": "^10.4.0",
|
|
62
|
-
"typedoc": "^0.22.10",
|
|
63
|
-
"typescript": "^4.5.4"
|
|
44
|
+
"eslint": "^8.28.0",
|
|
45
|
+
"eslint-config-airbnb": "^19.0.4",
|
|
46
|
+
"eslint-config-airbnb-typescript": "^17.0.0",
|
|
47
|
+
"eslint-config-prettier": "^8.5.0",
|
|
48
|
+
"eslint-plugin-import": "^2.26.0",
|
|
49
|
+
"eslint-plugin-jest": "^27.1.5",
|
|
50
|
+
"eslint-plugin-jsx-a11y": "^6.6.1",
|
|
51
|
+
"eslint-plugin-prettier": "^4.2.1",
|
|
52
|
+
"jest": "^29.3.1",
|
|
53
|
+
"jest-junit": "^15.0.0",
|
|
54
|
+
"prettier": "^2.8.0",
|
|
55
|
+
"ts-jest": "^29.0.3",
|
|
56
|
+
"ts-loader": "^9.4.1",
|
|
57
|
+
"ts-node": "^10.9.1",
|
|
58
|
+
"typedoc": "^0.23.21",
|
|
59
|
+
"typescript": "^4.9.3"
|
|
64
60
|
},
|
|
65
61
|
"repository": {
|
|
66
62
|
"type": "git",
|