@futdevpro/nts-dynamo 1.6.20 → 1.6.21
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/mocks/app-extended-server.mock.d.ts +12 -0
- package/lib/_constants/mocks/app-extended-server.mock.d.ts.map +1 -1
- package/lib/_constants/mocks/app-extended-server.mock.js +71 -2
- package/lib/_constants/mocks/app-extended-server.mock.js.map +1 -1
- package/lib/_constants/mocks/app-server.mock.d.ts.map +1 -1
- package/lib/_constants/mocks/app-server.mock.js +3 -0
- package/lib/_constants/mocks/app-server.mock.js.map +1 -1
- package/lib/_constants/mocks/data-model.mock.d.ts +27 -0
- package/lib/_constants/mocks/data-model.mock.d.ts.map +1 -0
- package/lib/_constants/mocks/data-model.mock.js +57 -0
- package/lib/_constants/mocks/data-model.mock.js.map +1 -0
- package/lib/_constants/mocks/email-service-collection.mock.d.ts +7 -0
- package/lib/_constants/mocks/email-service-collection.mock.d.ts.map +1 -0
- package/lib/_constants/mocks/email-service-collection.mock.js +16 -0
- package/lib/_constants/mocks/email-service-collection.mock.js.map +1 -0
- package/lib/_constants/mocks/email-service.mock.d.ts +5 -0
- package/lib/_constants/mocks/email-service.mock.d.ts.map +1 -0
- package/lib/_constants/mocks/email-service.mock.js +21 -0
- package/lib/_constants/mocks/email-service.mock.js.map +1 -0
- package/lib/_constants/mocks/socket-client.mock.d.ts +9 -0
- package/lib/_constants/mocks/socket-client.mock.d.ts.map +1 -0
- package/lib/_constants/mocks/socket-client.mock.js +39 -0
- package/lib/_constants/mocks/socket-client.mock.js.map +1 -0
- package/lib/_services/core/email.service.d.ts.map +1 -1
- package/lib/_services/core/email.service.js +0 -1
- package/lib/_services/core/email.service.js.map +1 -1
- package/lib/_services/server/app-extended.server.d.ts.map +1 -1
- package/lib/_services/server/app-extended.server.js +16 -18
- package/lib/_services/server/app-extended.server.js.map +1 -1
- package/lib/_services/server/app-extended.server.spec.js +16 -0
- package/lib/_services/server/app-extended.server.spec.js.map +1 -1
- package/lib/_services/server/app.server.d.ts +1 -1
- package/lib/_services/server/app.server.d.ts.map +1 -1
- package/lib/_services/server/app.server.js +58 -60
- package/lib/_services/server/app.server.js.map +1 -1
- package/lib/_services/socket/socket-server.service.d.ts.map +1 -1
- package/lib/_services/socket/socket-server.service.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/_constants/mocks/app-extended-server.mock.ts +81 -3
- package/src/_constants/mocks/app-server.mock.ts +3 -0
- package/src/_constants/mocks/data-model.mock.ts +83 -0
- package/src/_constants/mocks/email-service-collection.mock.ts +12 -0
- package/src/_constants/mocks/email-service.mock.ts +19 -0
- package/src/_constants/mocks/email-template.mock.html +15 -0
- package/src/_constants/mocks/socket-client.mock.ts +42 -0
- package/src/_services/core/email.service.ts +0 -1
- package/src/_services/server/app-extended.server.spec.ts +22 -1
- package/src/_services/server/app-extended.server.ts +11 -14
- package/src/_services/server/app.server.ts +66 -57
- package/src/_services/socket/socket-server.service.ts +0 -1
|
@@ -15,11 +15,16 @@ import { DynamoNTS_Controller_Mock } from './controller.mock';
|
|
|
15
15
|
import { AuthService_Mock } from './auth-service.mock';
|
|
16
16
|
import { DynamoNTS_AppExtended, dynamoNTS_globalSettings, DynamoNTS_SocketServerService } from '../../_modules/app-extended.index';
|
|
17
17
|
import { DynamoNTS_SocketServer_Mock } from './socket-server.mock';
|
|
18
|
+
import { SocketClient_Mock } from './socket-client.mock';
|
|
19
|
+
import { dependency_mock_DataParams, dependent_mock_DataParams } from './data-model.mock';
|
|
20
|
+
import { dynamo_error_default } from '@futdevpro/fsm-dynamo';
|
|
21
|
+
import { EmailServiceCollection_Mock } from './email-service-collection.mock';
|
|
18
22
|
|
|
19
23
|
/**
|
|
20
24
|
*
|
|
21
25
|
*/
|
|
22
26
|
export class DynamoNTS_AppExtendedBase_Mock extends DynamoNTS_AppExtended {
|
|
27
|
+
|
|
23
28
|
getAppParams(): DynamoNTS_AppParams {
|
|
24
29
|
return new DynamoNTS_AppParams({
|
|
25
30
|
name: 'test-extended-base',
|
|
@@ -55,6 +60,7 @@ export class DynamoNTS_AppExtendedBase_Mock extends DynamoNTS_AppExtended {
|
|
|
55
60
|
*
|
|
56
61
|
*/
|
|
57
62
|
export class DynamoNTS_AppExtendedFull_Mock extends DynamoNTS_AppExtended {
|
|
63
|
+
|
|
58
64
|
getAppParams(): DynamoNTS_AppParams {
|
|
59
65
|
return new DynamoNTS_AppParams({
|
|
60
66
|
name: 'test-extended-full',
|
|
@@ -62,8 +68,7 @@ export class DynamoNTS_AppExtendedFull_Mock extends DynamoNTS_AppExtended {
|
|
|
62
68
|
dbName: 'test-full',
|
|
63
69
|
});
|
|
64
70
|
}
|
|
65
|
-
|
|
66
|
-
|
|
71
|
+
|
|
67
72
|
overrideDynamoNTSGlobalSettings(): void {
|
|
68
73
|
/* dynamoNTS_globalSettings.logSetup = true; */
|
|
69
74
|
/* dynamoNTS_globalSettings.defaultRouteSecurity = DynamoNTS_RouteSecurity.open; */
|
|
@@ -74,6 +79,8 @@ export class DynamoNTS_AppExtendedFull_Mock extends DynamoNTS_AppExtended {
|
|
|
74
79
|
authService: AuthService_Mock.getInstance(),
|
|
75
80
|
/* emailServiceCollection: EmailServiceCollectionService.getInstance(), */
|
|
76
81
|
dbModels: [
|
|
82
|
+
dependency_mock_DataParams,
|
|
83
|
+
dependent_mock_DataParams,
|
|
77
84
|
|
|
78
85
|
usageSessionModelParams,
|
|
79
86
|
customDataModelParams,
|
|
@@ -108,6 +115,77 @@ export class DynamoNTS_AppExtendedFull_Mock extends DynamoNTS_AppExtended {
|
|
|
108
115
|
}
|
|
109
116
|
|
|
110
117
|
async getRootServices(): Promise<DynamoNTS_SingletonService[]> {
|
|
111
|
-
return [
|
|
118
|
+
return [
|
|
119
|
+
SocketClient_Mock.getInstance(),
|
|
120
|
+
];
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
////////////////////////////////////////////////////////////////////
|
|
125
|
+
////////////////////////////////////////////////////////////////////
|
|
126
|
+
////////////////////////////////////////////////////////////////////
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
*
|
|
130
|
+
*/
|
|
131
|
+
export class DynamoNTS_AppWbMock_Mock extends DynamoNTS_AppExtended {
|
|
132
|
+
|
|
133
|
+
getAppParams(): DynamoNTS_AppParams {
|
|
134
|
+
return new DynamoNTS_AppParams({
|
|
135
|
+
name: 'test-wb-mock',
|
|
136
|
+
version: 'x.0.101',
|
|
137
|
+
dbName: 'test-full',
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
overrideDynamoNTSGlobalSettings(): void {
|
|
142
|
+
dynamoNTS_globalSettings.logRequestsContent = true;
|
|
143
|
+
dynamo_error_default.issuerSystem = '-test-wb-mock-';
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
getGlobalServiceCollection(): DynamoNTS_GlobalServiceSettings {
|
|
147
|
+
return {
|
|
148
|
+
authService: AuthService_Mock.getInstance(),
|
|
149
|
+
emailServiceCollection: EmailServiceCollection_Mock.getInstance(),
|
|
150
|
+
dbModels: [
|
|
151
|
+
dependency_mock_DataParams,
|
|
152
|
+
dependent_mock_DataParams,
|
|
153
|
+
|
|
154
|
+
usageSessionModelParams,
|
|
155
|
+
customDataModelParams,
|
|
156
|
+
],
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
getPortSettings(): DynamoNTS_PortSettings {
|
|
161
|
+
return {
|
|
162
|
+
httpPort: 53535,
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
getRoutingModules(): DynamoNTS_RoutingModule[] {
|
|
167
|
+
return [
|
|
168
|
+
new DynamoNTS_RoutingModule({
|
|
169
|
+
route: '/test-0',
|
|
170
|
+
controllers: [
|
|
171
|
+
DynamoNTS_Controller_Mock.getInstance(),
|
|
172
|
+
],
|
|
173
|
+
}),
|
|
174
|
+
|
|
175
|
+
getTestRoutingModule(),
|
|
176
|
+
getUsageRoutingModule()
|
|
177
|
+
];
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
getSocketServices(): DynamoNTS_SocketServerService[] {
|
|
181
|
+
return [
|
|
182
|
+
DynamoNTS_SocketServer_Mock.getInstance(),
|
|
183
|
+
];
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
async getRootServices(): Promise<DynamoNTS_SingletonService[]> {
|
|
187
|
+
return [
|
|
188
|
+
SocketClient_Mock.getInstance(),
|
|
189
|
+
];
|
|
112
190
|
}
|
|
113
191
|
}
|
|
@@ -14,6 +14,7 @@ import { DynamoNTS_App } from '../../_services/server/app.server';
|
|
|
14
14
|
import { DynamoNTS_Controller_Mock } from './controller.mock';
|
|
15
15
|
import { AuthService_Mock } from './auth-service.mock';
|
|
16
16
|
import { dynamoNTS_globalSettings } from '../global-settings.const';
|
|
17
|
+
import { dependency_mock_DataParams, dependent_mock_DataParams } from './data-model.mock';
|
|
17
18
|
|
|
18
19
|
/**
|
|
19
20
|
*
|
|
@@ -69,6 +70,8 @@ export class DynamoNTS_AppFull_Mock extends DynamoNTS_App {
|
|
|
69
70
|
authService: AuthService_Mock.getInstance(),
|
|
70
71
|
/* emailServiceCollection: EmailServiceCollectionService.getInstance(), */
|
|
71
72
|
dbModels: [
|
|
73
|
+
dependency_mock_DataParams,
|
|
74
|
+
dependent_mock_DataParams,
|
|
72
75
|
|
|
73
76
|
usageSessionModelParams,
|
|
74
77
|
customDataModelParams,
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { Dynamo_DataParams, Dynamo_Metadata } from '@futdevpro/fsm-dynamo';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
export class Depemndency_Mock extends Dynamo_Metadata {
|
|
5
|
+
string?: string;
|
|
6
|
+
number?: number;
|
|
7
|
+
date?: Date;
|
|
8
|
+
boolean?: boolean;
|
|
9
|
+
array?: string[];
|
|
10
|
+
object?: any;
|
|
11
|
+
objectArray?: any[];
|
|
12
|
+
objectArrayArray?: any[][];
|
|
13
|
+
|
|
14
|
+
constructor(
|
|
15
|
+
set?: Depemndent_Mock
|
|
16
|
+
) {
|
|
17
|
+
super(set);
|
|
18
|
+
|
|
19
|
+
if (set) {
|
|
20
|
+
Object.assign(this, set);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export const dependency_mock_DataParams = new Dynamo_DataParams({
|
|
26
|
+
dataName: 'dependencyMock',
|
|
27
|
+
modelParams: [
|
|
28
|
+
{ key: 'string', type: 'string', },
|
|
29
|
+
{ key: 'number', type: 'number', },
|
|
30
|
+
{ key: 'date', type: 'Date', },
|
|
31
|
+
{ key: 'boolean', type: 'boolean', },
|
|
32
|
+
{ key: 'array', type: 'string[]', },
|
|
33
|
+
{ key: 'object', type: 'any', },
|
|
34
|
+
{ key: 'objectArray', type: 'any[]', },
|
|
35
|
+
{ key: 'objectArrayArray', type: 'any[][]', },
|
|
36
|
+
]
|
|
37
|
+
})
|
|
38
|
+
|
|
39
|
+
////////////////////////////////////////////////////////////////////
|
|
40
|
+
////////////////////////////////////////////////////////////////////
|
|
41
|
+
////////////////////////////////////////////////////////////////////
|
|
42
|
+
|
|
43
|
+
export class Depemndent_Mock extends Dynamo_Metadata {
|
|
44
|
+
dependencyId?: string;
|
|
45
|
+
|
|
46
|
+
string?: string;
|
|
47
|
+
number?: number;
|
|
48
|
+
date?: Date;
|
|
49
|
+
boolean?: boolean;
|
|
50
|
+
array?: string[];
|
|
51
|
+
object?: any;
|
|
52
|
+
objectArray?: any[];
|
|
53
|
+
objectArrayArray?: any[][];
|
|
54
|
+
|
|
55
|
+
constructor(
|
|
56
|
+
set?: Depemndent_Mock
|
|
57
|
+
) {
|
|
58
|
+
super(set);
|
|
59
|
+
|
|
60
|
+
if (set) {
|
|
61
|
+
Object.assign(this, set);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export const dependent_mock_DataParams = new Dynamo_DataParams({
|
|
67
|
+
dataName: 'dependentMock',
|
|
68
|
+
modelParams: [
|
|
69
|
+
{ key: 'dependencyId', type: 'string',
|
|
70
|
+
unique: true, required: true,
|
|
71
|
+
isDependencyHook: true,
|
|
72
|
+
dependencyDataName: dependency_mock_DataParams.dataName,
|
|
73
|
+
},
|
|
74
|
+
{ key: 'string', type: 'string', },
|
|
75
|
+
{ key: 'number', type: 'number', },
|
|
76
|
+
{ key: 'date', type: 'Date', },
|
|
77
|
+
{ key: 'boolean', type: 'boolean', },
|
|
78
|
+
{ key: 'array', type: 'string[]', },
|
|
79
|
+
{ key: 'object', type: 'any', },
|
|
80
|
+
{ key: 'objectArray', type: 'any[]', },
|
|
81
|
+
{ key: 'objectArrayArray', type: 'any[][]', },
|
|
82
|
+
]
|
|
83
|
+
})
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DynamoNTS_EmailService, DynamoNTS_ServiceCollection } from '../../_services';
|
|
2
|
+
import { EmailService_Mock } from './email-service.mock';
|
|
3
|
+
|
|
4
|
+
export class EmailServiceCollection_Mock extends DynamoNTS_ServiceCollection<DynamoNTS_EmailService> {
|
|
5
|
+
|
|
6
|
+
static getInstance(): EmailServiceCollection_Mock {
|
|
7
|
+
return EmailServiceCollection_Mock.getSingletonInstance();
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
test: EmailService_Mock = new EmailService_Mock();
|
|
11
|
+
|
|
12
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { DynamoNTS_EmailService } from '../../_services';
|
|
2
|
+
|
|
3
|
+
export class EmailService_Mock extends DynamoNTS_EmailService {
|
|
4
|
+
|
|
5
|
+
constructor() {
|
|
6
|
+
super({
|
|
7
|
+
host: 'smtp.forpsi.com',
|
|
8
|
+
port: 465,
|
|
9
|
+
senderName: 'FutDevPro - Auto',
|
|
10
|
+
email: 'auto@futdevpro.hu',
|
|
11
|
+
pass: 'a9wY992H4CpxYAG#',
|
|
12
|
+
rootPath: __dirname,
|
|
13
|
+
templatePaths: {
|
|
14
|
+
// test: './email-template.mock.html',
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { DynamoNTS_SocketEventType } from '../../_enums';
|
|
2
|
+
import { DynamoNTS_SocketClientServiceParams, DynamoNTS_SocketEvent } from '../../_models';
|
|
3
|
+
import { DynamoNTS_SocketClientService } from '../../_modules/app-extended.index';
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
export class SocketClient_Mock extends DynamoNTS_SocketClientService {
|
|
8
|
+
|
|
9
|
+
private constructor() {
|
|
10
|
+
super();
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
static getInstance(): SocketClient_Mock {
|
|
14
|
+
return SocketClient_Mock.getSingletonInstance();
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
getIncomingEvents(): DynamoNTS_SocketEvent<any>[] {
|
|
18
|
+
return [
|
|
19
|
+
new DynamoNTS_SocketEvent({
|
|
20
|
+
eventType: DynamoNTS_SocketEventType.connect,
|
|
21
|
+
tasks: [
|
|
22
|
+
async (content: any, issuer: string) => {
|
|
23
|
+
console.log('SocketClient_Mock: connect event received');
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
}),
|
|
27
|
+
];
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
getParams(): DynamoNTS_SocketClientServiceParams {
|
|
31
|
+
return new DynamoNTS_SocketClientServiceParams({
|
|
32
|
+
service: '-test-socket-target-',
|
|
33
|
+
name: 'socket-client-mock',
|
|
34
|
+
port: 30303,
|
|
35
|
+
socketOptions: {
|
|
36
|
+
reconnection: true,
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
}
|
|
42
|
+
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DynamoNTS_AppExtendedBase_Mock, DynamoNTS_AppExtendedFull_Mock } from '../../_constants/mocks/app-extended-server.mock';
|
|
1
|
+
import { DynamoNTS_AppExtendedBase_Mock, DynamoNTS_AppExtendedFull_Mock, DynamoNTS_AppWbMock_Mock } from '../../_constants/mocks/app-extended-server.mock';
|
|
2
2
|
|
|
3
3
|
describe('DynamoNTS_AppExtended;', () => {
|
|
4
4
|
describe('a extended-base instance;', () => {
|
|
@@ -42,4 +42,25 @@ describe('DynamoNTS_AppExtended;', () => {
|
|
|
42
42
|
expect(app.started).toBeTrue();
|
|
43
43
|
});
|
|
44
44
|
});
|
|
45
|
+
|
|
46
|
+
describe('a wb-mock instance;', () => {
|
|
47
|
+
let app: DynamoNTS_AppWbMock_Mock;
|
|
48
|
+
|
|
49
|
+
beforeEach(async () => {
|
|
50
|
+
app = new DynamoNTS_AppWbMock_Mock();
|
|
51
|
+
await app.ready();
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
afterEach(async () => {
|
|
55
|
+
await app.stop();
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
it('should be created', () => {
|
|
59
|
+
expect(app).toBeDefined();
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
it('should be started', () => {
|
|
63
|
+
expect(app.started).toBeTrue();
|
|
64
|
+
});
|
|
65
|
+
});
|
|
45
66
|
});
|
|
@@ -168,14 +168,13 @@ export abstract class DynamoNTS_AppExtended extends DynamoNTS_App {
|
|
|
168
168
|
|
|
169
169
|
override async ready(timeout: number = 4 * second): Promise<void> {
|
|
170
170
|
if (this.logFn) console.log('\nfn:. ready-extended');
|
|
171
|
-
/* return new Promise(async (resolve, reject) => { */
|
|
172
|
-
/* try { */
|
|
173
171
|
await super.ready(timeout);
|
|
174
172
|
|
|
175
173
|
let ready: boolean = false;
|
|
176
174
|
const start: number = +new Date();
|
|
177
175
|
|
|
178
176
|
if (this.constructErrors.length) {
|
|
177
|
+
Dynamo_Log.error(`Extended Application: ${this.params?.name} start failed. ERRORS`, this.constructErrors, '\n');
|
|
179
178
|
throw new Dynamo_Error({
|
|
180
179
|
message: `${this.params?.name} start failed. ERRORS`,
|
|
181
180
|
additionalContent: this.constructErrors,
|
|
@@ -183,7 +182,6 @@ export abstract class DynamoNTS_AppExtended extends DynamoNTS_App {
|
|
|
183
182
|
});
|
|
184
183
|
}
|
|
185
184
|
|
|
186
|
-
if (this.logFn && this.deepLog) console.log('\nfn:. ready-extended: bef while', this.systemControls, this.systemControlsExt);
|
|
187
185
|
while (!ready && +new Date() - start < timeout) {
|
|
188
186
|
if (this.systemControlsExt.appExtended.init) {
|
|
189
187
|
ready = (
|
|
@@ -197,6 +195,7 @@ export abstract class DynamoNTS_AppExtended extends DynamoNTS_App {
|
|
|
197
195
|
}
|
|
198
196
|
|
|
199
197
|
if (this.constructErrors.length) {
|
|
198
|
+
Dynamo_Log.error(`Extended Application: ${this.params?.name} start failed. TIMEOUT`, this.constructErrors, '\n');
|
|
200
199
|
throw new Dynamo_Error({
|
|
201
200
|
message: `${this.params?.name} start failed. TIMEOUT`,
|
|
202
201
|
additionalContent: this.constructErrors,
|
|
@@ -204,12 +203,6 @@ export abstract class DynamoNTS_AppExtended extends DynamoNTS_App {
|
|
|
204
203
|
});
|
|
205
204
|
}
|
|
206
205
|
|
|
207
|
-
/* ready = (
|
|
208
|
-
this.superStarted &&
|
|
209
|
-
this.systemControlsExt.httpSocketServer.getReady() &&
|
|
210
|
-
this.systemControlsExt.httpsSocketServer.getReady()
|
|
211
|
-
); */
|
|
212
|
-
/* console.log('T1000', ready, this.started, this.systemControlsExt.httpSocketServer.getReady(), this.systemControlsExt.httpsSocketServer.getReady(), this.systemControls, this.systemControlsExt); */
|
|
213
206
|
if (ready) {
|
|
214
207
|
this.systemControlsExt.appExtended.started = true;
|
|
215
208
|
|
|
@@ -226,6 +219,7 @@ export abstract class DynamoNTS_AppExtended extends DynamoNTS_App {
|
|
|
226
219
|
msg += '\nhttpsSocketServer start failed.';
|
|
227
220
|
}
|
|
228
221
|
|
|
222
|
+
Dynamo_Log.error(msg, this.constructErrors, '\n');
|
|
229
223
|
throw new Dynamo_Error({
|
|
230
224
|
errorCode: 'NTS-AES-110',
|
|
231
225
|
message: msg,
|
|
@@ -246,10 +240,6 @@ export abstract class DynamoNTS_AppExtended extends DynamoNTS_App {
|
|
|
246
240
|
error: this.constructErrors?.[0] ?? new Error()
|
|
247
241
|
});
|
|
248
242
|
}
|
|
249
|
-
/* } catch (error) {
|
|
250
|
-
reject(error);
|
|
251
|
-
} */
|
|
252
|
-
/* }); */
|
|
253
243
|
}
|
|
254
244
|
|
|
255
245
|
override async stop(): Promise<void> {
|
|
@@ -264,7 +254,14 @@ export abstract class DynamoNTS_AppExtended extends DynamoNTS_App {
|
|
|
264
254
|
socketServer.disconnectSockets(true);
|
|
265
255
|
socketServer.close((err) => {
|
|
266
256
|
if (err) {
|
|
267
|
-
|
|
257
|
+
Dynamo_Log.error(`\nHTTP socket server close error`, err);
|
|
258
|
+
reject(
|
|
259
|
+
new Dynamo_Error({
|
|
260
|
+
errorCode: 'NTS-AES-120',
|
|
261
|
+
message: `SocketServer close failed.`,
|
|
262
|
+
error: err
|
|
263
|
+
})
|
|
264
|
+
);
|
|
268
265
|
} else {
|
|
269
266
|
resolve();
|
|
270
267
|
}
|