@futdevpro/nts-dynamo 1.3.73 → 1.3.75
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/lib/_constants/dynamobe-global.settings.d.ts +1 -1
- package/lib/_constants/dynamobe-global.settings.d.ts.map +1 -1
- package/lib/_constants/dynamobe-global.settings.js +3 -2
- package/lib/_constants/dynamobe-global.settings.js.map +1 -1
- package/lib/_constants/index.d.ts +4 -0
- package/lib/_constants/index.d.ts.map +1 -0
- package/lib/_constants/index.js +7 -0
- package/lib/_constants/index.js.map +1 -0
- package/lib/_models/dynamobe-global-settings.d.ts +2 -1
- package/lib/_models/dynamobe-global-settings.d.ts.map +1 -1
- package/lib/_modules/test/test-routing-module.d.ts +2 -2
- package/lib/_modules/test/test-routing-module.d.ts.map +1 -1
- package/lib/_modules/test/test-routing-module.js +4 -4
- package/lib/_modules/test/test-routing-module.js.map +1 -1
- package/lib/_modules/usage/usage-routing-module.d.ts +2 -2
- package/lib/_modules/usage/usage-routing-module.d.ts.map +1 -1
- package/lib/_modules/usage/usage-routing-module.js +5 -5
- package/lib/_modules/usage/usage-routing-module.js.map +1 -1
- package/lib/_services/dynamobe-app.d.ts +2 -2
- package/lib/_services/dynamobe-app.d.ts.map +1 -1
- package/lib/_services/dynamobe-app.js +7 -7
- package/lib/_services/dynamobe-app.js.map +1 -1
- package/lib/_services/dynamobe-global.service.d.ts +0 -2
- package/lib/_services/dynamobe-global.service.d.ts.map +1 -1
- package/lib/_services/dynamobe-global.service.js +33 -41
- package/lib/_services/dynamobe-global.service.js.map +1 -1
- package/lib/_services/dynamobe-routing-module.service.d.ts +7 -8
- package/lib/_services/dynamobe-routing-module.service.d.ts.map +1 -1
- package/lib/_services/dynamobe-routing-module.service.js +9 -12
- package/lib/_services/dynamobe-routing-module.service.js.map +1 -1
- package/lib/app.d.ts +1 -0
- package/lib/app.d.ts.map +1 -1
- package/lib/app.js +2 -0
- package/lib/app.js.map +1 -1
- package/lib/dynamobe-global.settings.d.ts.map +1 -1
- package/lib/dynamobe-global.settings.js +1 -0
- package/lib/dynamobe-global.settings.js.map +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -0
- package/lib/index.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +66 -57
- package/package.json +10 -1
- package/src/_constants/dynamobe-global.settings.ts +2 -2
- package/src/_constants/index.ts +4 -0
- package/src/_models/dynamobe-global-settings.ts +2 -1
- package/src/_modules/test/test-routing-module.ts +6 -4
- package/src/_modules/usage/usage-routing-module.ts +6 -4
- package/src/_services/dynamobe-app.ts +18 -18
- package/src/_services/dynamobe-global.service.ts +26 -16
- package/src/_services/dynamobe-routing-module.service.ts +14 -11
- package/src/app.ts +4 -0
- package/src/index.ts +3 -0
- package/src/dynamobe-global.settings.ts +0 -10
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import { Router } from 'express';
|
|
3
|
+
import { dynamoBEGlobalSettings } from '../_constants/dynamobe-global.settings';
|
|
3
4
|
import { DynamoBERouteSecurity } from '../_enums/dynamobe-route-security.enum';
|
|
4
5
|
import { HttpCallType } from '../_enums/http/http-call-type.enum';
|
|
5
6
|
import { DynamoBEEndpointParams } from '../_models/dynamobe-endpoint-params';
|
|
@@ -8,7 +9,13 @@ import { DynamoBEController } from './dynamobe-controller.service';
|
|
|
8
9
|
import { DBE_Global_S } from './dynamobe-global.service';
|
|
9
10
|
import { DBE_Shared } from './dynamobe-shared.service';
|
|
10
11
|
|
|
11
|
-
export
|
|
12
|
+
export interface DynamoBERoutingModuleSettings {
|
|
13
|
+
route: string;
|
|
14
|
+
controllers: DynamoBEController[];
|
|
15
|
+
securityOverride?: DynamoBERouteSecurity;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export class DynamoBERoutingModule {
|
|
12
19
|
|
|
13
20
|
security: DynamoBERouteSecurity;
|
|
14
21
|
route: string;
|
|
@@ -22,14 +29,10 @@ export class DynamoBERountingModule {
|
|
|
22
29
|
protected log: boolean = DBE_Global_S.getGlobalSettings().logSetup;
|
|
23
30
|
|
|
24
31
|
constructor(
|
|
25
|
-
set:
|
|
26
|
-
route: string,
|
|
27
|
-
controllers: DynamoBEController[],
|
|
28
|
-
securityOverride?: DynamoBERouteSecurity,
|
|
29
|
-
}
|
|
32
|
+
set: DynamoBERoutingModuleSettings
|
|
30
33
|
){
|
|
31
34
|
try {
|
|
32
|
-
this.route = set.route;
|
|
35
|
+
this.route = dynamoBEGlobalSettings.baseUrl + set.route;
|
|
33
36
|
this.controllers = set.controllers;
|
|
34
37
|
this.setupRoutes();
|
|
35
38
|
this.mountRoutes(set.securityOverride);
|
|
@@ -40,10 +43,10 @@ export class DynamoBERountingModule {
|
|
|
40
43
|
}
|
|
41
44
|
}
|
|
42
45
|
|
|
43
|
-
securityOverride(securityOverride: DynamoBERouteSecurity): void {
|
|
46
|
+
/* securityOverride(securityOverride: DynamoBERouteSecurity): void {
|
|
44
47
|
this.resetRouters();
|
|
45
48
|
this.mountRoutes(securityOverride);
|
|
46
|
-
}
|
|
49
|
+
} */
|
|
47
50
|
|
|
48
51
|
/**
|
|
49
52
|
* You must setup endpoints and required services in this function
|
|
@@ -148,8 +151,8 @@ export class DynamoBERountingModule {
|
|
|
148
151
|
}
|
|
149
152
|
}
|
|
150
153
|
|
|
151
|
-
private resetRouters(): void {
|
|
154
|
+
/* private resetRouters(): void {
|
|
152
155
|
this.openRouter = Router();
|
|
153
156
|
this.secureRouter = Router();
|
|
154
|
-
}
|
|
157
|
+
} */
|
|
155
158
|
}
|
package/src/app.ts
CHANGED
package/src/index.ts
CHANGED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { DynamoBERouteSecurity } from './_enums/dynamobe-route-security.enum';
|
|
2
|
-
import { DynamoBEGlobalSettings } from './_models/dynamobe-global-settings';
|
|
3
|
-
|
|
4
|
-
export const dynamoBEGlobalSettings: DynamoBEGlobalSettings = {
|
|
5
|
-
defaultRouteSecurity: DynamoBERouteSecurity.open,
|
|
6
|
-
logSetup: false,
|
|
7
|
-
logRequests: true,
|
|
8
|
-
logRequestsContent: true,
|
|
9
|
-
logResponseContent: false,
|
|
10
|
-
};
|