@futdevpro/nts-dynamo 1.9.4 → 1.9.6
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/.eslintrc.json +1 -1
- package/build/_constants/mocks/app-extended-server.mock.d.ts.map +1 -1
- package/build/_constants/mocks/app-extended-server.mock.js.map +1 -1
- package/build/_constants/mocks/app-server.mock.d.ts.map +1 -1
- package/build/_constants/mocks/app-server.mock.js.map +1 -1
- package/build/_constants/mocks/endpoint.mock.js +6 -6
- package/build/_constants/mocks/endpoint.mock.js.map +1 -1
- package/build/_models/control-models/endpoint-params.control-model.d.ts +3 -3
- package/build/_models/control-models/endpoint-params.control-model.d.ts.map +1 -1
- package/build/_models/control-models/endpoint-params.control-model.js +3 -3
- package/build/_models/control-models/endpoint-params.control-model.js.map +1 -1
- package/build/_modules/usage/usage.controller.js +1 -1
- package/build/_modules/usage/usage.controller.js.map +1 -1
- package/build/_services/base/data.service.d.ts.map +1 -1
- package/build/_services/base/data.service.js +1 -0
- package/build/_services/base/data.service.js.map +1 -1
- package/build/_services/core/auth.service.d.ts +2 -2
- package/build/_services/core/auth.service.d.ts.map +1 -1
- package/build/_services/core/auth.service.js.map +1 -1
- package/build/_services/index.d.ts +1 -0
- package/build/_services/index.d.ts.map +1 -1
- package/build/_services/index.js +1 -0
- package/build/_services/index.js.map +1 -1
- package/build/_services/route/controller.service.d.ts +6 -6
- package/build/_services/route/controller.service.d.ts.map +1 -1
- package/build/_services/route/controller.service.js +11 -5
- package/build/_services/route/controller.service.js.map +1 -1
- package/build/_services/server/app.server.d.ts.map +1 -1
- package/build/_services/server/app.server.js +5 -2
- package/build/_services/server/app.server.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/nodemon.json +1 -1
- package/package.json +5 -4
- package/src/_constants/mocks/app-extended-server.mock.ts +7 -7
- package/src/_constants/mocks/app-server.mock.ts +7 -7
- package/src/_constants/mocks/endpoint.mock.ts +6 -6
- package/src/_enums/http/http-call-type.enum.d.ts +12 -0
- package/src/_enums/http/http-call-type.enum.d.ts.map +1 -0
- package/src/_enums/http/http-call-type.enum.js +16 -0
- package/src/_enums/http/http-call-type.enum.js.map +1 -0
- package/src/_enums/http/http-response-type.enum.d.ts +7 -0
- package/src/_enums/http/http-response-type.enum.d.ts.map +1 -0
- package/src/_enums/http/http-response-type.enum.js +11 -0
- package/src/_enums/http/http-response-type.enum.js.map +1 -0
- package/src/_enums/http/socket-event-type.enum.d.ts +15 -0
- package/src/_enums/http/socket-event-type.enum.d.ts.map +1 -0
- package/src/_enums/http/socket-event-type.enum.js +19 -0
- package/src/_enums/http/socket-event-type.enum.js.map +1 -0
- package/src/_models/control-models/endpoint-params.control-model.ts +9 -6
- package/src/_modules/usage/usage.controller.ts +1 -1
- package/src/_services/base/data.service.ts +9 -4
- package/src/_services/core/auth.service.ts +2 -2
- package/src/_services/index.ts +1 -0
- package/src/_services/route/controller.service.ts +14 -8
- package/src/_services/server/app.server.ts +9 -3
- package/tsconfig.json +20 -3
- package/src/sync.ffs_db +0 -0
package/nodemon.json
CHANGED
package/package.json
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@futdevpro/nts-dynamo",
|
|
3
|
-
"version": "01.09.
|
|
3
|
+
"version": "01.09.06",
|
|
4
4
|
"description": "Dynamic NodeTS (NodeJS-Typescript), MongoDB Backend System Framework by Future Development Program Ltd.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"prep": "npm i rimraf nodemon -g",
|
|
7
7
|
"first-start": "npm run prep && nodemon",
|
|
8
8
|
"start": "nodemon",
|
|
9
9
|
|
|
10
|
-
"deploy": "npm run
|
|
10
|
+
"deploy": "npm run build",
|
|
11
|
+
"clean-deploy": "npm run clean && npm run build-all",
|
|
11
12
|
"build": "npm run build-base && jasmine && npm publish",
|
|
12
|
-
"build-tgz": "npm run build-base && jasmine && npm pack && move ./*.tgz ../
|
|
13
|
+
"build-tgz": "npm run build-base && jasmine && npm pack && move ./*.tgz ../tgz-collection/dynamo-nts",
|
|
13
14
|
"build-all": "npm run build-tgz && npm run build",
|
|
14
15
|
"build-base": "npm i && rimraf ./build && npx tsc",
|
|
15
16
|
|
|
@@ -198,7 +199,7 @@
|
|
|
198
199
|
},
|
|
199
200
|
"homepage": "https:/futdevpro.hu/projects/dynamo",
|
|
200
201
|
"peerDependencies": {
|
|
201
|
-
"@futdevpro/fsm-dynamo": "^1.9.
|
|
202
|
+
"@futdevpro/fsm-dynamo": "^1.9.4",
|
|
202
203
|
"@types/express": "^4.17.17",
|
|
203
204
|
"@types/geoip-lite": "^1.4.1",
|
|
204
205
|
"@types/node": "^20.5.7",
|
|
@@ -47,7 +47,7 @@ export class DynamoNTS_AppExtendedBase_Mock extends DynamoNTS_AppExtended {
|
|
|
47
47
|
return {};
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
getRoutingModules(): DynamoNTS_RoutingModule[] {
|
|
50
|
+
override getRoutingModules(): DynamoNTS_RoutingModule[] {
|
|
51
51
|
return [];
|
|
52
52
|
}
|
|
53
53
|
|
|
@@ -73,7 +73,7 @@ export class DynamoNTS_AppExtendedFull_Mock extends DynamoNTS_AppExtended {
|
|
|
73
73
|
});
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
overrideDynamoNTSGlobalSettings(): void {
|
|
76
|
+
override overrideDynamoNTSGlobalSettings(): void {
|
|
77
77
|
/* dynamoNTS_globalSettings.logSetup = true; */
|
|
78
78
|
/* dynamoNTS_globalSettings.defaultRouteSecurity = DynamoNTS_RouteSecurity.open; */
|
|
79
79
|
}
|
|
@@ -98,7 +98,7 @@ export class DynamoNTS_AppExtendedFull_Mock extends DynamoNTS_AppExtended {
|
|
|
98
98
|
};
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
-
getRoutingModules(): DynamoNTS_RoutingModule[] {
|
|
101
|
+
override getRoutingModules(): DynamoNTS_RoutingModule[] {
|
|
102
102
|
return [
|
|
103
103
|
new DynamoNTS_RoutingModule({
|
|
104
104
|
route: '/test-0',
|
|
@@ -119,7 +119,7 @@ export class DynamoNTS_AppExtendedFull_Mock extends DynamoNTS_AppExtended {
|
|
|
119
119
|
];
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
-
async getRootServices(): Promise<DynamoNTS_SingletonService[]> {
|
|
122
|
+
override async getRootServices(): Promise<DynamoNTS_SingletonService[]> {
|
|
123
123
|
return [
|
|
124
124
|
SocketClient_Mock.getInstance(),
|
|
125
125
|
];
|
|
@@ -143,7 +143,7 @@ export class DynamoNTS_AppWbMock_Mock extends DynamoNTS_AppExtended {
|
|
|
143
143
|
});
|
|
144
144
|
}
|
|
145
145
|
|
|
146
|
-
overrideDynamoNTSGlobalSettings(): void {
|
|
146
|
+
override overrideDynamoNTSGlobalSettings(): void {
|
|
147
147
|
DynamoNTS_globalSettings.logRequestsContent = true;
|
|
148
148
|
DynamoFM_error_defaults.issuerSystem = '-test-wb-mock-';
|
|
149
149
|
}
|
|
@@ -168,7 +168,7 @@ export class DynamoNTS_AppWbMock_Mock extends DynamoNTS_AppExtended {
|
|
|
168
168
|
};
|
|
169
169
|
}
|
|
170
170
|
|
|
171
|
-
getRoutingModules(): DynamoNTS_RoutingModule[] {
|
|
171
|
+
override getRoutingModules(): DynamoNTS_RoutingModule[] {
|
|
172
172
|
return [
|
|
173
173
|
new DynamoNTS_RoutingModule({
|
|
174
174
|
route: '/test-0',
|
|
@@ -189,7 +189,7 @@ export class DynamoNTS_AppWbMock_Mock extends DynamoNTS_AppExtended {
|
|
|
189
189
|
];
|
|
190
190
|
}
|
|
191
191
|
|
|
192
|
-
async getRootServices(): Promise<DynamoNTS_SingletonService[]> {
|
|
192
|
+
override async getRootServices(): Promise<DynamoNTS_SingletonService[]> {
|
|
193
193
|
return [
|
|
194
194
|
SocketClient_Mock.getInstance(),
|
|
195
195
|
];
|
|
@@ -40,7 +40,7 @@ export class DynamoNTS_AppBase_Mock extends DynamoNTS_App {
|
|
|
40
40
|
return {};
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
getRoutingModules(): DynamoNTS_RoutingModule[] {
|
|
43
|
+
override getRoutingModules(): DynamoNTS_RoutingModule[] {
|
|
44
44
|
return [];
|
|
45
45
|
}
|
|
46
46
|
}
|
|
@@ -62,7 +62,7 @@ export class DynamoNTS_AppFull_Mock extends DynamoNTS_App {
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
|
|
65
|
-
overrideDynamoNTSGlobalSettings(): void {
|
|
65
|
+
override overrideDynamoNTSGlobalSettings(): void {
|
|
66
66
|
/* dynamoNTS_globalSettings.logSetup = true; */
|
|
67
67
|
/* dynamoNTS_globalSettings.defaultRouteSecurity = DynamoNTS_RouteSecurity.open; */
|
|
68
68
|
}
|
|
@@ -87,7 +87,7 @@ export class DynamoNTS_AppFull_Mock extends DynamoNTS_App {
|
|
|
87
87
|
};
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
-
getRoutingModules(): DynamoNTS_RoutingModule[] {
|
|
90
|
+
override getRoutingModules(): DynamoNTS_RoutingModule[] {
|
|
91
91
|
return [
|
|
92
92
|
new DynamoNTS_RoutingModule({
|
|
93
93
|
route: '/test-extended-0',
|
|
@@ -102,7 +102,7 @@ export class DynamoNTS_AppFull_Mock extends DynamoNTS_App {
|
|
|
102
102
|
];
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
async getRootServices(): Promise<DynamoNTS_SingletonService[]> {
|
|
105
|
+
override async getRootServices(): Promise<DynamoNTS_SingletonService[]> {
|
|
106
106
|
return [];
|
|
107
107
|
}
|
|
108
108
|
}
|
|
@@ -152,7 +152,7 @@ export class DynamoNTS_AppTEST_Mock extends DynamoNTS_App {
|
|
|
152
152
|
});
|
|
153
153
|
}
|
|
154
154
|
|
|
155
|
-
overrideDynamoNTSGlobalSettings(): void {}
|
|
155
|
+
override overrideDynamoNTSGlobalSettings(): void {}
|
|
156
156
|
|
|
157
157
|
getGlobalServiceCollection(): DynamoNTS_GlobalService_Settings {
|
|
158
158
|
return {
|
|
@@ -173,11 +173,11 @@ export class DynamoNTS_AppTEST_Mock extends DynamoNTS_App {
|
|
|
173
173
|
};
|
|
174
174
|
}
|
|
175
175
|
|
|
176
|
-
getRoutingModules(): DynamoNTS_RoutingModule[] {
|
|
176
|
+
override getRoutingModules(): DynamoNTS_RoutingModule[] {
|
|
177
177
|
return [];
|
|
178
178
|
}
|
|
179
179
|
|
|
180
|
-
async getRootServices(): Promise<DynamoNTS_SingletonService[]> {
|
|
180
|
+
override async getRootServices(): Promise<DynamoNTS_SingletonService[]> {
|
|
181
181
|
return [];
|
|
182
182
|
}
|
|
183
183
|
}
|
|
@@ -7,7 +7,7 @@ export const DynamoNTS_endpointBase_mock: DynamoNTS_Endpoint_Params =
|
|
|
7
7
|
name: 'testBase',
|
|
8
8
|
type: DynamoNTS_HttpCallType.get,
|
|
9
9
|
endpoint: '/test-base',
|
|
10
|
-
|
|
10
|
+
preProcesses: [],
|
|
11
11
|
tasks: [
|
|
12
12
|
async (req, res): Promise<void> => {
|
|
13
13
|
res.send('test-base');
|
|
@@ -20,7 +20,7 @@ export const DynamoNTS_endpointSimple_mock: DynamoNTS_Endpoint_Params =
|
|
|
20
20
|
name: 'testSimple',
|
|
21
21
|
type: DynamoNTS_HttpCallType.get,
|
|
22
22
|
endpoint: '/test-simple',
|
|
23
|
-
|
|
23
|
+
preProcesses: [],
|
|
24
24
|
tasks: [
|
|
25
25
|
async (req, res): Promise<void> => {
|
|
26
26
|
res.send('test-simple');
|
|
@@ -33,7 +33,7 @@ export const DynamoNTS_endpointPost_mock: DynamoNTS_Endpoint_Params =
|
|
|
33
33
|
name: 'testPost',
|
|
34
34
|
type: DynamoNTS_HttpCallType.post,
|
|
35
35
|
endpoint: '/test-post',
|
|
36
|
-
|
|
36
|
+
preProcesses: [],
|
|
37
37
|
tasks: [
|
|
38
38
|
async (req, res): Promise<void> => {
|
|
39
39
|
res.send('test-post');
|
|
@@ -46,7 +46,7 @@ export const DynamoNTS_endpointPut_mock: DynamoNTS_Endpoint_Params =
|
|
|
46
46
|
name: 'testPut',
|
|
47
47
|
type: DynamoNTS_HttpCallType.put,
|
|
48
48
|
endpoint: '/test-put',
|
|
49
|
-
|
|
49
|
+
preProcesses: [],
|
|
50
50
|
tasks: [
|
|
51
51
|
async (req, res): Promise<void> => {
|
|
52
52
|
res.send('test-put');
|
|
@@ -59,7 +59,7 @@ export const DynamoNTS_endpointDelete_mock: DynamoNTS_Endpoint_Params =
|
|
|
59
59
|
name: 'testDelete',
|
|
60
60
|
type: DynamoNTS_HttpCallType.delete,
|
|
61
61
|
endpoint: '/test-delete',
|
|
62
|
-
|
|
62
|
+
preProcesses: [],
|
|
63
63
|
tasks: [
|
|
64
64
|
async (req, res): Promise<void> => {
|
|
65
65
|
res.send('test-delete');
|
|
@@ -72,7 +72,7 @@ export const DynamoNTS_endpointThrow_mock: DynamoNTS_Endpoint_Params =
|
|
|
72
72
|
name: 'testThrow',
|
|
73
73
|
type: DynamoNTS_HttpCallType.get,
|
|
74
74
|
endpoint: '/test-throw',
|
|
75
|
-
|
|
75
|
+
preProcesses: [],
|
|
76
76
|
tasks: [
|
|
77
77
|
async (req, res): Promise<void> => {
|
|
78
78
|
throw new Error('test-throw');
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* basic Http Call Types such as;
|
|
3
|
+
* get, post, put, patch, delete
|
|
4
|
+
*/
|
|
5
|
+
export declare enum DynamoNTS_HttpCallType {
|
|
6
|
+
get = "get",
|
|
7
|
+
post = "post",
|
|
8
|
+
put = "put",
|
|
9
|
+
patch = "patch",
|
|
10
|
+
delete = "delete"
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=http-call-type.enum.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http-call-type.enum.d.ts","sourceRoot":"","sources":["http-call-type.enum.ts"],"names":[],"mappings":"AACA;;;GAGG;AACH,oBAAY,sBAAsB;IAChC,GAAG,QAAQ;IACX,IAAI,SAAS;IACb,GAAG,QAAQ;IACX,KAAK,UAAU;IACf,MAAM,WAAW;CAClB"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DynamoNTS_HttpCallType = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* basic Http Call Types such as;
|
|
6
|
+
* get, post, put, patch, delete
|
|
7
|
+
*/
|
|
8
|
+
var DynamoNTS_HttpCallType;
|
|
9
|
+
(function (DynamoNTS_HttpCallType) {
|
|
10
|
+
DynamoNTS_HttpCallType["get"] = "get";
|
|
11
|
+
DynamoNTS_HttpCallType["post"] = "post";
|
|
12
|
+
DynamoNTS_HttpCallType["put"] = "put";
|
|
13
|
+
DynamoNTS_HttpCallType["patch"] = "patch";
|
|
14
|
+
DynamoNTS_HttpCallType["delete"] = "delete";
|
|
15
|
+
})(DynamoNTS_HttpCallType || (exports.DynamoNTS_HttpCallType = DynamoNTS_HttpCallType = {}));
|
|
16
|
+
//# sourceMappingURL=http-call-type.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http-call-type.enum.js","sourceRoot":"","sources":["http-call-type.enum.ts"],"names":[],"mappings":";;;AACA;;;GAGG;AACH,IAAY,sBAMX;AAND,WAAY,sBAAsB;IAChC,qCAAW,CAAA;IACX,uCAAa,CAAA;IACb,qCAAW,CAAA;IACX,yCAAe,CAAA;IACf,2CAAiB,CAAA;AACnB,CAAC,EANW,sBAAsB,sCAAtB,sBAAsB,QAMjC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http-response-type.enum.d.ts","sourceRoot":"","sources":["http-response-type.enum.ts"],"names":[],"mappings":"AACA,oBAAY,0BAA0B;IACpC,WAAW,gBAAgB;IAC3B,IAAI,SAAS;IACb,IAAI,SAAS;IACb,IAAI,SAAS;CACd"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DynamoNTS_HttpResponseType = void 0;
|
|
4
|
+
var DynamoNTS_HttpResponseType;
|
|
5
|
+
(function (DynamoNTS_HttpResponseType) {
|
|
6
|
+
DynamoNTS_HttpResponseType["arraybuffer"] = "arraybuffer";
|
|
7
|
+
DynamoNTS_HttpResponseType["blob"] = "blob";
|
|
8
|
+
DynamoNTS_HttpResponseType["json"] = "json";
|
|
9
|
+
DynamoNTS_HttpResponseType["text"] = "text";
|
|
10
|
+
})(DynamoNTS_HttpResponseType || (exports.DynamoNTS_HttpResponseType = DynamoNTS_HttpResponseType = {}));
|
|
11
|
+
//# sourceMappingURL=http-response-type.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http-response-type.enum.js","sourceRoot":"","sources":["http-response-type.enum.ts"],"names":[],"mappings":";;;AACA,IAAY,0BAKX;AALD,WAAY,0BAA0B;IACpC,yDAA2B,CAAA;IAC3B,2CAAa,CAAA;IACb,2CAAa,CAAA;IACb,2CAAa,CAAA;AACf,CAAC,EALW,0BAA0B,0CAA1B,0BAA0B,QAKrC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare enum DynamoNTS_SocketEventKey {
|
|
2
|
+
/** incoming connection */
|
|
3
|
+
connection = "connection",
|
|
4
|
+
/** outgoing connection */
|
|
5
|
+
connect = "connect",
|
|
6
|
+
subscribe = "subscribe",
|
|
7
|
+
subscriptionSuccessful = "subscriptionSuccessful",
|
|
8
|
+
unsubscribe = "unsubscribe",
|
|
9
|
+
unsubscribeSuccessful = "unsubscribeSuccessful",
|
|
10
|
+
disconnect = "disconnection",
|
|
11
|
+
ping = "ping",
|
|
12
|
+
event = "event",
|
|
13
|
+
error = "error"
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=socket-event-type.enum.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"socket-event-type.enum.d.ts","sourceRoot":"","sources":["socket-event-type.enum.ts"],"names":[],"mappings":"AACA,oBAAY,wBAAwB;IAClC,0BAA0B;IAC1B,UAAU,eAAe;IACzB,0BAA0B;IAC1B,OAAO,YAAY;IAEnB,SAAS,cAAc;IACvB,sBAAsB,2BAA2B;IACjD,WAAW,gBAAgB;IAC3B,qBAAqB,0BAA0B;IAC/C,UAAU,kBAAkB;IAE5B,IAAI,SAAS;IACb,KAAK,UAAU;IACf,KAAK,UAAU;CAChB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DynamoNTS_SocketEventKey = void 0;
|
|
4
|
+
var DynamoNTS_SocketEventKey;
|
|
5
|
+
(function (DynamoNTS_SocketEventKey) {
|
|
6
|
+
/** incoming connection */
|
|
7
|
+
DynamoNTS_SocketEventKey["connection"] = "connection";
|
|
8
|
+
/** outgoing connection */
|
|
9
|
+
DynamoNTS_SocketEventKey["connect"] = "connect";
|
|
10
|
+
DynamoNTS_SocketEventKey["subscribe"] = "subscribe";
|
|
11
|
+
DynamoNTS_SocketEventKey["subscriptionSuccessful"] = "subscriptionSuccessful";
|
|
12
|
+
DynamoNTS_SocketEventKey["unsubscribe"] = "unsubscribe";
|
|
13
|
+
DynamoNTS_SocketEventKey["unsubscribeSuccessful"] = "unsubscribeSuccessful";
|
|
14
|
+
DynamoNTS_SocketEventKey["disconnect"] = "disconnection";
|
|
15
|
+
DynamoNTS_SocketEventKey["ping"] = "ping";
|
|
16
|
+
DynamoNTS_SocketEventKey["event"] = "event";
|
|
17
|
+
DynamoNTS_SocketEventKey["error"] = "error";
|
|
18
|
+
})(DynamoNTS_SocketEventKey || (exports.DynamoNTS_SocketEventKey = DynamoNTS_SocketEventKey = {}));
|
|
19
|
+
//# sourceMappingURL=socket-event-type.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"socket-event-type.enum.js","sourceRoot":"","sources":["socket-event-type.enum.ts"],"names":[],"mappings":";;;AACA,IAAY,wBAeX;AAfD,WAAY,wBAAwB;IAClC,0BAA0B;IAC1B,qDAAyB,CAAA;IACzB,0BAA0B;IAC1B,+CAAmB,CAAA;IAEnB,mDAAuB,CAAA;IACvB,6EAAiD,CAAA;IACjD,uDAA2B,CAAA;IAC3B,2EAA+C,CAAA;IAC/C,wDAA4B,CAAA;IAE5B,yCAAa,CAAA;IACb,2CAAe,CAAA;IACf,2CAAe,CAAA;AACjB,CAAC,EAfW,wBAAwB,wCAAxB,wBAAwB,QAenC"}
|
|
@@ -22,7 +22,7 @@ export class DynamoNTS_Endpoint_Params {
|
|
|
22
22
|
|
|
23
23
|
private pathParams: string[];
|
|
24
24
|
|
|
25
|
-
private
|
|
25
|
+
private preProcesses: ((req: Request, res: Response) => Promise<void>)[];
|
|
26
26
|
private tasks: ((req: Request, res: Response, issuer?: string) => Promise<void>)[];
|
|
27
27
|
|
|
28
28
|
private logRequest: boolean;
|
|
@@ -55,10 +55,10 @@ export class DynamoNTS_Endpoint_Params {
|
|
|
55
55
|
endpoint: string,
|
|
56
56
|
|
|
57
57
|
/**
|
|
58
|
-
*
|
|
58
|
+
* preProcesses are the functions you need to run before the actual function,
|
|
59
59
|
* such as authentications
|
|
60
60
|
*/
|
|
61
|
-
|
|
61
|
+
preProcesses?: ((req: Request, res: Response) => Promise<void>)[],
|
|
62
62
|
/**
|
|
63
63
|
* the actual tasks to run,
|
|
64
64
|
* the last one should contain the res.send(); execution to send response on API requests
|
|
@@ -109,7 +109,7 @@ export class DynamoNTS_Endpoint_Params {
|
|
|
109
109
|
pathParts = pathParts.map((part: string): string => part.replace(':', ''));
|
|
110
110
|
this.pathParams = pathParts;
|
|
111
111
|
|
|
112
|
-
this.
|
|
112
|
+
this.preProcesses = set.preProcesses ?? [];
|
|
113
113
|
this.tasks = set.tasks ?? [];
|
|
114
114
|
|
|
115
115
|
this.logRequest = set.logRequest ?? DynamoNTS_globalSettings.logRequest;
|
|
@@ -172,7 +172,7 @@ export class DynamoNTS_Endpoint_Params {
|
|
|
172
172
|
await this.preLog(req, res, issuer);
|
|
173
173
|
}
|
|
174
174
|
|
|
175
|
-
await DynamoFM_Array.asyncForEach(this.
|
|
175
|
+
await DynamoFM_Array.asyncForEach(this.preProcesses,
|
|
176
176
|
async (preProcess: (req: Request, res: Response) => Promise<void>): Promise<void> => {
|
|
177
177
|
await preProcess(req, res);
|
|
178
178
|
}
|
|
@@ -238,7 +238,10 @@ export class DynamoNTS_Endpoint_Params {
|
|
|
238
238
|
res,
|
|
239
239
|
issuer
|
|
240
240
|
).catch((err): void => {
|
|
241
|
-
DynamoFM_Log.warn(
|
|
241
|
+
DynamoFM_Log.warn(
|
|
242
|
+
'DynamoNTS_GlobalService.globalErrorHandler failed to handle error: ',
|
|
243
|
+
err
|
|
244
|
+
);
|
|
242
245
|
DynamoFM_Log.warn('It will proceed as normal.');
|
|
243
246
|
});
|
|
244
247
|
|
|
@@ -99,7 +99,7 @@ export class DynamoNTS_Usage_Controller extends DynamoNTS_Controller {
|
|
|
99
99
|
name: 'getUsageData',
|
|
100
100
|
type: DynamoNTS_HttpCallType.get,
|
|
101
101
|
endpoint: DynamoFM_usageModule_settings.endPoints.getUsageData,
|
|
102
|
-
|
|
102
|
+
preProcesses: [this.authService.authTokenPermAccUsageData],
|
|
103
103
|
tasks: [
|
|
104
104
|
async (req: Request, res: Response): Promise<void> => {
|
|
105
105
|
const range: DynamoFM_RelativeDate = req.params.range as DynamoFM_RelativeDate;
|
|
@@ -376,7 +376,7 @@ export class DynamoNTS_DataService<T extends DynamoFM_Metadata> {
|
|
|
376
376
|
|
|
377
377
|
return dataListExists;
|
|
378
378
|
} catch (error) {
|
|
379
|
-
if (['NTS-DS0-GLD1', 'NTS-DS0-GLD2'].includes(error?.errorCode)) {
|
|
379
|
+
if ([ 'NTS-DS0-GLD1', 'NTS-DS0-GLD2' ].includes(error?.errorCode)) {
|
|
380
380
|
throw error;
|
|
381
381
|
} else {
|
|
382
382
|
throw new DynamoFM_Error({
|
|
@@ -630,6 +630,8 @@ export class DynamoNTS_DataService<T extends DynamoFM_Metadata> {
|
|
|
630
630
|
});
|
|
631
631
|
}
|
|
632
632
|
|
|
633
|
+
await this.validateForSave();
|
|
634
|
+
|
|
633
635
|
if (!this.data._id && (!this.depKey || !this.data[this.depKey])) {
|
|
634
636
|
// if ID of dependencyID is not present, data not exists, create new data
|
|
635
637
|
this.data = await this.dataDBService.createData(this.data, this.issuer);
|
|
@@ -718,7 +720,7 @@ export class DynamoNTS_DataService<T extends DynamoFM_Metadata> {
|
|
|
718
720
|
return this.data;
|
|
719
721
|
|
|
720
722
|
} catch (error) {
|
|
721
|
-
if (['NTS-DS0-SD1', 'NTS-DS0-SD2'].includes(error?.errorCode)) {
|
|
723
|
+
if ([ 'NTS-DS0-SD1', 'NTS-DS0-SD2' ].includes(error?.errorCode)) {
|
|
722
724
|
throw error;
|
|
723
725
|
|
|
724
726
|
} else {
|
|
@@ -824,7 +826,7 @@ export class DynamoNTS_DataService<T extends DynamoFM_Metadata> {
|
|
|
824
826
|
}
|
|
825
827
|
}
|
|
826
828
|
} catch (error) {
|
|
827
|
-
if (['NTS-DS0-VD1', 'NTS-DS0-VD2'].includes(error?.errorCode)) {
|
|
829
|
+
if ([ 'NTS-DS0-VD1', 'NTS-DS0-VD2' ].includes(error?.errorCode)) {
|
|
828
830
|
throw error;
|
|
829
831
|
} else {
|
|
830
832
|
throw new DynamoFM_Error({
|
|
@@ -891,7 +893,10 @@ export class DynamoNTS_DataService<T extends DynamoFM_Metadata> {
|
|
|
891
893
|
}
|
|
892
894
|
}
|
|
893
895
|
|
|
894
|
-
private _getDefaultErrorSettings(
|
|
896
|
+
private _getDefaultErrorSettings(
|
|
897
|
+
fnName: string,
|
|
898
|
+
error: DynamoFM_AnyError
|
|
899
|
+
): DynamoFM_Error_Settings {
|
|
895
900
|
return {
|
|
896
901
|
status: (error as DynamoFM_Error)?.___status ?? 500,
|
|
897
902
|
message:
|
|
@@ -20,9 +20,9 @@ import { DynamoNTS_SingletonService } from '../base/singleton.service';
|
|
|
20
20
|
*/
|
|
21
21
|
export abstract class DynamoNTS_AuthService extends DynamoNTS_SingletonService {
|
|
22
22
|
|
|
23
|
-
serviceName: string = 'AuthService';
|
|
23
|
+
readonly serviceName: string = 'AuthService';
|
|
24
24
|
|
|
25
|
-
defaultErrorUserMsg =
|
|
25
|
+
readonly defaultErrorUserMsg =
|
|
26
26
|
`We encountered an unhandled BackEnd Auth Error, ` +
|
|
27
27
|
`\nplease contact the responsible development team.`;
|
|
28
28
|
|
package/src/_services/index.ts
CHANGED
|
@@ -10,6 +10,7 @@ export * from './base/data.service';
|
|
|
10
10
|
export * from './base/db.service';
|
|
11
11
|
export * from './core/email.service';
|
|
12
12
|
export * from './core/global.service';
|
|
13
|
+
export * from './route/controller.service';
|
|
13
14
|
export * from './route/routing-module.service';
|
|
14
15
|
export * from './core/service-collection.service';
|
|
15
16
|
export * from './shared.static-service';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
import { DynamoFM_Log } from '@futdevpro/fsm-dynamo';
|
|
3
|
+
import { DynamoFM_Error, DynamoFM_ErrorLevel, DynamoFM_Log } from '@futdevpro/fsm-dynamo';
|
|
4
4
|
import {
|
|
5
5
|
DynamoNTS_Endpoint_Params
|
|
6
6
|
} from '../../_models/control-models/endpoint-params.control-model';
|
|
@@ -26,9 +26,9 @@ import { DynamoNTS_SingletonService } from '../base/singleton.service';
|
|
|
26
26
|
* this.endpoints = [
|
|
27
27
|
* new DynamoNTS_EndpointParams({
|
|
28
28
|
* name: 'getUserMatchStatistics',
|
|
29
|
-
* type:
|
|
29
|
+
* type: DynamoNX_HttpCallType.get,
|
|
30
30
|
* endpoint: '/get/user-match-statistics/:userId',
|
|
31
|
-
*
|
|
31
|
+
* preProcesses: [ this.authService.authenticateTokenSelf ],
|
|
32
32
|
* tasks: [
|
|
33
33
|
* async (req: Request, res: Response) => {
|
|
34
34
|
* const userMatchStatistics = new UserMatchStatisticsService({
|
|
@@ -57,9 +57,9 @@ export abstract class DynamoNTS_Controller extends DynamoNTS_SingletonService {
|
|
|
57
57
|
* this.endpoints = [
|
|
58
58
|
* new DynamoNTS_EndpointParams({
|
|
59
59
|
* name: 'getUserMatchStatistics',
|
|
60
|
-
* type:
|
|
60
|
+
* type: DynamoNX_HttpCallType.get,
|
|
61
61
|
* endpoint: '/get/user-match-statistics/:userId',
|
|
62
|
-
*
|
|
62
|
+
* preProcesses: [ this.authService.authenticateTokenSelf ],
|
|
63
63
|
* tasks: [
|
|
64
64
|
* async (req: Request, res: Response) => {
|
|
65
65
|
* const userMatchStatistics = new UserMatchStatisticsService({
|
|
@@ -84,7 +84,13 @@ export abstract class DynamoNTS_Controller extends DynamoNTS_SingletonService {
|
|
|
84
84
|
try {
|
|
85
85
|
this.setupEndpoints();
|
|
86
86
|
} catch (error) {
|
|
87
|
-
|
|
87
|
+
throw new DynamoFM_Error({
|
|
88
|
+
message: 'DynamoBEController setup failed. Please check the setupEndpoints() method.',
|
|
89
|
+
errorCode: 'NTS-COS-000',
|
|
90
|
+
issuerService: this?.constructor?.name,
|
|
91
|
+
error: error,
|
|
92
|
+
level: DynamoFM_ErrorLevel.critical,
|
|
93
|
+
});
|
|
88
94
|
}
|
|
89
95
|
}
|
|
90
96
|
|
|
@@ -99,9 +105,9 @@ export abstract class DynamoNTS_Controller extends DynamoNTS_SingletonService {
|
|
|
99
105
|
* this.endpoints = [
|
|
100
106
|
* new DynamoNTS_EndpointParams({
|
|
101
107
|
* name: 'getUserMatchStatistics',
|
|
102
|
-
* type:
|
|
108
|
+
* type: DynamoNX_HttpCallType.get,
|
|
103
109
|
* endpoint: '/get/user-match-statistics/:userId',
|
|
104
|
-
*
|
|
110
|
+
* preProcesses: [ this.authService.authenticateTokenSelf ],
|
|
105
111
|
* tasks: [
|
|
106
112
|
* async (req: Request, res: Response) => {
|
|
107
113
|
* const userMatchStatistics = new UserMatchStatisticsService({
|
|
@@ -279,7 +279,10 @@ export abstract class DynamoNTS_App extends DynamoNTS_SingletonService {
|
|
|
279
279
|
errorCode: 'NTS-AS0-BASE-UR',
|
|
280
280
|
message: 'Unhandled Rejection!',
|
|
281
281
|
error: new Error(p_passWhatIsThis),
|
|
282
|
-
additionalContent: {
|
|
282
|
+
additionalContent: {
|
|
283
|
+
reason: reason,
|
|
284
|
+
p_noIdeaWhatIsThisFromProcessRejection: p_passWhatIsThis,
|
|
285
|
+
},
|
|
283
286
|
level: DynamoFM_ErrorLevel.critical,
|
|
284
287
|
})
|
|
285
288
|
);
|
|
@@ -1099,10 +1102,13 @@ export abstract class DynamoNTS_App extends DynamoNTS_SingletonService {
|
|
|
1099
1102
|
}
|
|
1100
1103
|
}
|
|
1101
1104
|
|
|
1102
|
-
private _getDefaultErrorSettings(
|
|
1105
|
+
private _getDefaultErrorSettings(
|
|
1106
|
+
fnName: string,
|
|
1107
|
+
error: DynamoFM_AnyError
|
|
1108
|
+
): DynamoFM_Error_Settings {
|
|
1103
1109
|
return {
|
|
1104
1110
|
status: (error as DynamoFM_Error)?.___status ?? 500,
|
|
1105
|
-
message: (error as Error)?.message ?? `${fnName} was
|
|
1111
|
+
message: (error as Error)?.message ?? `${fnName} was UNSUCCESSFUL (NTS)`,
|
|
1106
1112
|
addECToUserMsg: !(error as DynamoFM_Error)?.__userMessage,
|
|
1107
1113
|
userMessage: (error as DynamoFM_Error)?.__userMessage ?? this.defaultErrorUserMsg,
|
|
1108
1114
|
issuerService: `${this?.constructor?.name}-DynamoNTS_App`,
|
package/tsconfig.json
CHANGED
|
@@ -13,16 +13,33 @@
|
|
|
13
13
|
"declaration": true,
|
|
14
14
|
"declarationMap": true,
|
|
15
15
|
"sourceMap": true,
|
|
16
|
-
"outDir": "build",
|
|
16
|
+
"outDir": "./build",
|
|
17
17
|
"importHelpers": true,
|
|
18
18
|
"moduleResolution": "node",
|
|
19
19
|
"esModuleInterop": true,
|
|
20
20
|
"skipLibCheck": true,
|
|
21
21
|
"allowSyntheticDefaultImports": true,
|
|
22
22
|
"forceConsistentCasingInFileNames": true,
|
|
23
|
-
"
|
|
23
|
+
"noImplicitOverride": true,
|
|
24
|
+
"resolveJsonModule": true,
|
|
25
|
+
"paths": {
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
}
|
|
24
29
|
},
|
|
25
30
|
"include": [
|
|
26
31
|
"src"
|
|
27
|
-
]
|
|
32
|
+
],
|
|
33
|
+
"DISABLED": {
|
|
34
|
+
|
|
35
|
+
"@futdevpro/fsm-dynamo": [
|
|
36
|
+
"../dynamo-fsm/src/index.ts",
|
|
37
|
+
],
|
|
38
|
+
"@futdevpro/fsm-dynamo/*": [
|
|
39
|
+
"../dynamo-fsm/src/_modules/*.index.ts",
|
|
40
|
+
],
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
"last": "line"
|
|
44
|
+
}
|
|
28
45
|
}
|
package/src/sync.ffs_db
DELETED
|
Binary file
|