@solidxai/core 0.1.9 → 0.1.10-alpha.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/commands/run-tests.command.d.ts +2 -0
- package/dist/commands/run-tests.command.d.ts.map +1 -1
- package/dist/commands/run-tests.command.js +49 -17
- package/dist/commands/run-tests.command.js.map +1 -1
- package/dist/controllers/action-metadata.controller.js +1 -1
- package/dist/controllers/action-metadata.controller.js.map +1 -1
- package/dist/controllers/facebook-authentication.controller.js +1 -1
- package/dist/controllers/facebook-authentication.controller.js.map +1 -1
- package/dist/controllers/google-authentication.controller.js +1 -1
- package/dist/controllers/google-authentication.controller.js.map +1 -1
- package/dist/controllers/menu-item-metadata.controller.js +1 -1
- package/dist/controllers/menu-item-metadata.controller.js.map +1 -1
- package/dist/controllers/microsoft-authentication.controller.js +1 -1
- package/dist/controllers/microsoft-authentication.controller.js.map +1 -1
- package/dist/controllers/mq-message-queue.controller.js +1 -1
- package/dist/controllers/mq-message-queue.controller.js.map +1 -1
- package/dist/controllers/mq-message.controller.js +1 -1
- package/dist/controllers/mq-message.controller.js.map +1 -1
- package/dist/controllers/user.controller.d.ts.map +1 -1
- package/dist/controllers/user.controller.js.map +1 -1
- package/dist/controllers/view-metadata.controller.js +1 -1
- package/dist/controllers/view-metadata.controller.js.map +1 -1
- package/dist/helpers/bootstrap.helper.d.ts.map +1 -1
- package/dist/helpers/bootstrap.helper.js +2 -0
- package/dist/helpers/bootstrap.helper.js.map +1 -1
- package/dist/helpers/field-crud-managers/BigIntFieldCrudManager.js.map +1 -1
- package/dist/helpers/field-crud-managers/SelectionDynamicFieldCrudManager.js.map +1 -1
- package/dist/helpers/module-metadata-helper.service.js.map +1 -1
- package/dist/jobs/database/trigger-mcp-client-subscriber-database.service.js.map +1 -1
- package/dist/repository/security-rule.repository.js.map +1 -1
- package/dist/seeders/module-metadata-seeder.service.js.map +1 -1
- package/dist/seeders/permission-metadata-seeder.service.js.map +1 -1
- package/dist/seeders/seed-data/solid-core-metadata.json +13 -2
- package/dist/services/authentication.service.d.ts.map +1 -1
- package/dist/services/authentication.service.js +5 -5
- package/dist/services/authentication.service.js.map +1 -1
- package/dist/services/chatter-message.service.js.map +1 -1
- package/dist/services/crud.service.js.map +1 -1
- package/dist/services/csv.service.js.map +1 -1
- package/dist/services/dashboard.service.js.map +1 -1
- package/dist/services/database/database-bootstrap.service.js.map +1 -1
- package/dist/services/excel.service.js.map +1 -1
- package/dist/services/export-transaction.service.js.map +1 -1
- package/dist/services/field-metadata.service.js +2 -2
- package/dist/services/field-metadata.service.js.map +1 -1
- package/dist/services/fixtures.service.js.map +1 -1
- package/dist/services/import-transaction.service.js.map +1 -1
- package/dist/services/list-of-values.service.js.map +1 -1
- package/dist/services/model-metadata.service.d.ts.map +1 -1
- package/dist/services/model-metadata.service.js +3 -13
- package/dist/services/model-metadata.service.js.map +1 -1
- package/dist/services/module-metadata.service.js.map +1 -1
- package/dist/services/queues/database-publisher.service.js +3 -3
- package/dist/services/queues/database-publisher.service.js.map +1 -1
- package/dist/services/queues/database-subscriber.service.js +3 -3
- package/dist/services/queues/database-subscriber.service.js.map +1 -1
- package/dist/services/queues/rabbitmq-publisher.service.js +3 -3
- package/dist/services/queues/rabbitmq-publisher.service.js.map +1 -1
- package/dist/services/queues/rabbitmq-subscriber.service.js +4 -4
- package/dist/services/queues/rabbitmq-subscriber.service.js.map +1 -1
- package/dist/services/queues/redis-publisher.service.d.ts.map +1 -1
- package/dist/services/queues/redis-publisher.service.js +4 -1
- package/dist/services/queues/redis-publisher.service.js.map +1 -1
- package/dist/services/queues/redis-subscriber.service.d.ts.map +1 -1
- package/dist/services/queues/redis-subscriber.service.js +4 -1
- package/dist/services/queues/redis-subscriber.service.js.map +1 -1
- package/dist/services/role-metadata.service.js.map +1 -1
- package/dist/services/scheduled-jobs/scheduler.service.js.map +1 -1
- package/dist/services/settings/default-settings-provider.service.d.ts +58 -8
- package/dist/services/settings/default-settings-provider.service.d.ts.map +1 -1
- package/dist/services/settings/default-settings-provider.service.js +21 -4
- package/dist/services/settings/default-settings-provider.service.js.map +1 -1
- package/dist/services/sms/TwilioSMSService.js.map +1 -1
- package/dist/services/solid-introspect.service.js.map +1 -1
- package/dist/services/user-activity-history.service.js.map +1 -1
- package/dist/services/view-metadata.service.d.ts.map +1 -1
- package/dist/services/view-metadata.service.js +17 -2
- package/dist/services/view-metadata.service.js.map +1 -1
- package/dist/solid-core.module.d.ts +1 -0
- package/dist/solid-core.module.d.ts.map +1 -1
- package/dist/solid-core.module.js +1 -0
- package/dist/solid-core.module.js.map +1 -1
- package/dist/subscribers/computed-entity-field.subscriber.js.map +1 -1
- package/dist/subscribers/security-rule.subscriber.d.ts.map +1 -1
- package/dist/subscribers/security-rule.subscriber.js.map +1 -1
- package/dist/subscribers/view-metadata.subscriber.js.map +1 -1
- package/dist/testing/core/testing-engine.js.map +1 -1
- package/dist/testing/reporter/webhook-reporter.d.ts +54 -0
- package/dist/testing/reporter/webhook-reporter.d.ts.map +1 -0
- package/dist/testing/reporter/webhook-reporter.js +74 -0
- package/dist/testing/reporter/webhook-reporter.js.map +1 -0
- package/dist-tests/api/authenticate.spec.js +119 -0
- package/dist-tests/api/authenticate.spec.js.map +1 -0
- package/dist-tests/api/crud-service.findOne.cityMaster.spec.js +97 -0
- package/dist-tests/api/crud-service.findOne.cityMaster.spec.js.map +1 -0
- package/dist-tests/api/ping.spec.js +21 -0
- package/dist-tests/api/ping.spec.js.map +1 -0
- package/dist-tests/helpers/auth.js +41 -0
- package/dist-tests/helpers/auth.js.map +1 -0
- package/dist-tests/helpers/env.js +11 -0
- package/dist-tests/helpers/env.js.map +1 -0
- package/docs/grouping-enhancements.md +89 -0
- package/docs/java-spring/README.md +3 -0
- package/docs/java-spring/solid-core-module-deep-dive-report.md +1317 -0
- package/docs/seed-changes.md +65 -0
- package/docs/test-data-workflow.md +200 -0
- package/docs/type-declaration-import-issue.md +24 -0
- package/package.json +5 -1
- package/src/commands/run-tests.command.ts +45 -17
- package/src/controllers/action-metadata.controller.ts +1 -1
- package/src/controllers/facebook-authentication.controller.ts +1 -1
- package/src/controllers/google-authentication.controller.ts +1 -1
- package/src/controllers/menu-item-metadata.controller.ts +1 -1
- package/src/controllers/microsoft-authentication.controller.ts +1 -1
- package/src/controllers/mq-message-queue.controller.ts +1 -1
- package/src/controllers/mq-message.controller.ts +1 -1
- package/src/controllers/user.controller.ts +16 -16
- package/src/controllers/view-metadata.controller.ts +1 -1
- package/src/helpers/bootstrap.helper.ts +3 -0
- package/src/helpers/field-crud-managers/BigIntFieldCrudManager.ts +1 -1
- package/src/helpers/field-crud-managers/SelectionDynamicFieldCrudManager.ts +1 -1
- package/src/helpers/module-metadata-helper.service.ts +1 -1
- package/src/jobs/database/trigger-mcp-client-subscriber-database.service.ts +1 -1
- package/src/repository/security-rule.repository.ts +1 -1
- package/src/seeders/module-metadata-seeder.service.ts +4 -4
- package/src/seeders/permission-metadata-seeder.service.ts +1 -1
- package/src/seeders/seed-data/solid-core-metadata.json +13 -2
- package/src/services/authentication.service.ts +19 -31
- package/src/services/chatter-message.service.ts +1 -1
- package/src/services/crud.service.ts +3 -3
- package/src/services/csv.service.ts +1 -1
- package/src/services/dashboard.service.ts +1 -1
- package/src/services/database/database-bootstrap.service.ts +1 -1
- package/src/services/excel.service.ts +1 -1
- package/src/services/export-transaction.service.ts +2 -2
- package/src/services/field-metadata.service.ts +3 -3
- package/src/services/fixtures.service.ts +2 -2
- package/src/services/import-transaction.service.ts +2 -2
- package/src/services/list-of-values.service.ts +1 -1
- package/src/services/model-metadata.service.ts +22 -21
- package/src/services/module-metadata.service.ts +7 -7
- package/src/services/queues/database-publisher.service.ts +4 -4
- package/src/services/queues/database-subscriber.service.ts +7 -7
- package/src/services/queues/rabbitmq-publisher.service.ts +7 -7
- package/src/services/queues/rabbitmq-subscriber.service.ts +13 -13
- package/src/services/queues/redis-publisher.service.ts +7 -4
- package/src/services/queues/redis-subscriber.service.ts +9 -6
- package/src/services/role-metadata.service.ts +1 -1
- package/src/services/scheduled-jobs/scheduler.service.ts +5 -5
- package/src/services/settings/default-settings-provider.service.ts +21 -4
- package/src/services/sms/TwilioSMSService.ts +2 -2
- package/src/services/solid-introspect.service.ts +2 -2
- package/src/services/user-activity-history.service.ts +1 -1
- package/src/services/view-metadata.service.ts +25 -8
- package/src/solid-core.module.ts +1 -0
- package/src/subscribers/computed-entity-field.subscriber.ts +1 -1
- package/src/subscribers/security-rule.subscriber.ts +8 -8
- package/src/subscribers/view-metadata.subscriber.ts +1 -1
- package/src/testing/core/testing-engine.ts +2 -2
- package/src/testing/reporter/webhook-reporter.ts +116 -0
- package/.claude/settings.local.json +0 -15
- package/src/services/1.js +0 -6
|
@@ -238,7 +238,7 @@ export class ModuleMetadataSeederService {
|
|
|
238
238
|
|
|
239
239
|
//FIXME: Handle displaying the created users credentials in a better way.
|
|
240
240
|
// this.logger.log(`Newly created username is: ${usersDetail?.length > 0 ? usersDetail[0]?.username : ''} and password is ${usersDetail?.length > 0 ? usersDetail[0]?.password : ''}`);
|
|
241
|
-
} catch (error) {
|
|
241
|
+
} catch (error: any) {
|
|
242
242
|
this.logSeedFailureForCli(error, {
|
|
243
243
|
moduleName: currentModule,
|
|
244
244
|
step: currentStep,
|
|
@@ -463,7 +463,7 @@ export class ModuleMetadataSeederService {
|
|
|
463
463
|
await this.createPermissionIfNotExists(permissionName);
|
|
464
464
|
}
|
|
465
465
|
|
|
466
|
-
} catch (error) {
|
|
466
|
+
} catch (error: any) {
|
|
467
467
|
this.logger.error(error);
|
|
468
468
|
}
|
|
469
469
|
}
|
|
@@ -544,7 +544,7 @@ export class ModuleMetadataSeederService {
|
|
|
544
544
|
moduleRoot = path.dirname(
|
|
545
545
|
require.resolve('@solidxai/core/package.json'),
|
|
546
546
|
);
|
|
547
|
-
} catch (err) {
|
|
547
|
+
} catch (err: any) {
|
|
548
548
|
this.logger.debug(
|
|
549
549
|
'Could not resolve @solidxai/core from node_modules, assuming local execution',
|
|
550
550
|
);
|
|
@@ -610,7 +610,7 @@ export class ModuleMetadataSeederService {
|
|
|
610
610
|
moduleRoot = path.dirname(
|
|
611
611
|
require.resolve('@solidxai/core/package.json'),
|
|
612
612
|
);
|
|
613
|
-
} catch (err) {
|
|
613
|
+
} catch (err: any) {
|
|
614
614
|
this.logger.debug(
|
|
615
615
|
'Could not resolve @solidxai/core from node_modules, assuming local execution',
|
|
616
616
|
);
|
|
@@ -11552,7 +11552,7 @@
|
|
|
11552
11552
|
"enableGlobalSearch": true,
|
|
11553
11553
|
"create": true,
|
|
11554
11554
|
"edit": true,
|
|
11555
|
-
"delete":
|
|
11555
|
+
"delete": true
|
|
11556
11556
|
},
|
|
11557
11557
|
"children": [
|
|
11558
11558
|
{
|
|
@@ -11570,7 +11570,18 @@
|
|
|
11570
11570
|
"name": "name",
|
|
11571
11571
|
"label": "Name",
|
|
11572
11572
|
"sortable": true,
|
|
11573
|
-
"filterable": true
|
|
11573
|
+
"filterable": true,
|
|
11574
|
+
"isSearchable": true
|
|
11575
|
+
}
|
|
11576
|
+
},
|
|
11577
|
+
{
|
|
11578
|
+
"type": "field",
|
|
11579
|
+
"attrs": {
|
|
11580
|
+
"name": "description",
|
|
11581
|
+
"label": "Description",
|
|
11582
|
+
"sortable": true,
|
|
11583
|
+
"filterable": true,
|
|
11584
|
+
"isSearchable": true
|
|
11574
11585
|
}
|
|
11575
11586
|
}
|
|
11576
11587
|
]
|
|
@@ -164,6 +164,8 @@ export class AuthenticationService {
|
|
|
164
164
|
"mobile",
|
|
165
165
|
"roles",
|
|
166
166
|
"forcePasswordChange",
|
|
167
|
+
"isAllowedToGenerateApiKeys",
|
|
168
|
+
"failedLoginAttempts",
|
|
167
169
|
]);
|
|
168
170
|
|
|
169
171
|
async signUp(
|
|
@@ -191,22 +193,11 @@ export class AuthenticationService {
|
|
|
191
193
|
return this.performSignUp(signUpDto, new User(), this.userRepository);
|
|
192
194
|
}
|
|
193
195
|
|
|
194
|
-
private async performSignUp<T extends User>(
|
|
195
|
-
signUpDto: SignUpDto,
|
|
196
|
-
entity: T,
|
|
197
|
-
repo: Repository<T>,
|
|
198
|
-
): Promise<T> {
|
|
196
|
+
private async performSignUp<T extends User>(signUpDto: SignUpDto, entity: T, repo: Repository<T>): Promise<T> {
|
|
199
197
|
try {
|
|
200
|
-
const onForcePasswordChange =
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
);
|
|
204
|
-
const activateUserOnRegistration =
|
|
205
|
-
this.settingService.getConfigValue<SolidCoreSetting>(
|
|
206
|
-
"activateUserOnRegistration",
|
|
207
|
-
);
|
|
208
|
-
const defaultRole =
|
|
209
|
-
this.settingService.getConfigValue<SolidCoreSetting>("defaultRole");
|
|
198
|
+
const onForcePasswordChange = this.settingService.getConfigValue<SolidCoreSetting>("forceChangePasswordOnFirstLogin");
|
|
199
|
+
const activateUserOnRegistration = this.settingService.getConfigValue<SolidCoreSetting>("activateUserOnRegistration");
|
|
200
|
+
const defaultRole = this.settingService.getConfigValue<SolidCoreSetting>("defaultRole");
|
|
210
201
|
|
|
211
202
|
var { user, pwd, autoGeneratedPwd } = await this.populateForSignup<T>(
|
|
212
203
|
entity,
|
|
@@ -220,17 +211,14 @@ export class AuthenticationService {
|
|
|
220
211
|
}
|
|
221
212
|
const savedUser = await repo.save(user);
|
|
222
213
|
const userRoles = signUpDto.roles ?? [];
|
|
223
|
-
if (
|
|
224
|
-
(signUpDto.roles?.length ?? 0) === 0 &&
|
|
225
|
-
signUpDto.username !== "sa" &&
|
|
226
|
-
defaultRole
|
|
227
|
-
) {
|
|
214
|
+
if ((signUpDto.roles?.length ?? 0) === 0 && signUpDto.username !== "sa" && defaultRole) {
|
|
228
215
|
userRoles.push(defaultRole);
|
|
229
216
|
}
|
|
230
217
|
await this.handlePostSignup(savedUser, userRoles, pwd, autoGeneratedPwd);
|
|
231
218
|
|
|
232
219
|
return savedUser;
|
|
233
|
-
}
|
|
220
|
+
}
|
|
221
|
+
catch (err: any) {
|
|
234
222
|
const pgUniqueViolationErrorCode = "23505";
|
|
235
223
|
if (err.code === pgUniqueViolationErrorCode) {
|
|
236
224
|
throw new ConflictException(
|
|
@@ -485,7 +473,7 @@ export class AuthenticationService {
|
|
|
485
473
|
validationSource,
|
|
486
474
|
);
|
|
487
475
|
await this.notifyUserOnOtpInitiateRegistration(user, validationSource);
|
|
488
|
-
} catch (err) {
|
|
476
|
+
} catch (err: any) {
|
|
489
477
|
if (err.code === "23505") {
|
|
490
478
|
throw new ConflictException(ERROR_MESSAGES.USER_ALREADY_EXISTS);
|
|
491
479
|
}
|
|
@@ -1306,7 +1294,7 @@ export class AuthenticationService {
|
|
|
1306
1294
|
// Assuming all users do not have mobile as mandatory.
|
|
1307
1295
|
if (
|
|
1308
1296
|
forgotPasswordSendVerificationTokenOn ==
|
|
1309
|
-
|
|
1297
|
+
ForgotPasswordSendVerificationTokenOn.MOBILE &&
|
|
1310
1298
|
user.mobile
|
|
1311
1299
|
) {
|
|
1312
1300
|
const smsService = this.smsFactory.getSmsService();
|
|
@@ -1336,11 +1324,11 @@ export class AuthenticationService {
|
|
|
1336
1324
|
confirmForgotPasswordDto.verificationToken,
|
|
1337
1325
|
);
|
|
1338
1326
|
if (!user)
|
|
1339
|
-
throw new UnauthorizedException(
|
|
1327
|
+
throw new UnauthorizedException("Invalid verification token");
|
|
1340
1328
|
if (user.lastLoginProvider !== "local")
|
|
1341
1329
|
throw new UnauthorizedException(ERROR_MESSAGES.INVALID_CREDENTIALS);
|
|
1342
1330
|
if (!user.active)
|
|
1343
|
-
throw new UnauthorizedException(
|
|
1331
|
+
throw new UnauthorizedException("User is inactive");
|
|
1344
1332
|
|
|
1345
1333
|
// 1) Atomically consume the token (only one request can succeed)
|
|
1346
1334
|
const { affected } = await m
|
|
@@ -1432,7 +1420,7 @@ export class AuthenticationService {
|
|
|
1432
1420
|
// Assuming all users do not have mobile as mandatory.
|
|
1433
1421
|
if (
|
|
1434
1422
|
forgotPasswordSendVerificationTokenOn ==
|
|
1435
|
-
|
|
1423
|
+
ForgotPasswordSendVerificationTokenOn.MOBILE &&
|
|
1436
1424
|
user.mobile
|
|
1437
1425
|
) {
|
|
1438
1426
|
const smsService = this.smsFactory.getSmsService();
|
|
@@ -1548,7 +1536,7 @@ export class AuthenticationService {
|
|
|
1548
1536
|
accessToken: await this.generateAccessToken(user),
|
|
1549
1537
|
refreshToken: currentRefreshToken,
|
|
1550
1538
|
};
|
|
1551
|
-
} catch (err) {
|
|
1539
|
+
} catch (err: any) {
|
|
1552
1540
|
if (err instanceof InvalidatedRefreshTokenError) {
|
|
1553
1541
|
// Take action: notify user that his refresh token might have been stolen?
|
|
1554
1542
|
throw new UnauthorizedException(ERROR_MESSAGES.ACCESS_DENIED);
|
|
@@ -1599,7 +1587,7 @@ export class AuthenticationService {
|
|
|
1599
1587
|
} else {
|
|
1600
1588
|
throw new UnauthorizedException(ERROR_MESSAGES.INVALID_USER_PROFILE);
|
|
1601
1589
|
}
|
|
1602
|
-
} catch (error) {
|
|
1590
|
+
} catch (error: any) {
|
|
1603
1591
|
throw new UnauthorizedException(
|
|
1604
1592
|
ERROR_MESSAGES.GOOGLE_OAUTH_PROFILE_FETCH_FAILED,
|
|
1605
1593
|
);
|
|
@@ -1668,7 +1656,7 @@ export class AuthenticationService {
|
|
|
1668
1656
|
} else {
|
|
1669
1657
|
throw new UnauthorizedException(ERROR_MESSAGES.INVALID_USER_PROFILE);
|
|
1670
1658
|
}
|
|
1671
|
-
} catch (error) {
|
|
1659
|
+
} catch (error: any) {
|
|
1672
1660
|
if (error instanceof UnauthorizedException) {
|
|
1673
1661
|
throw error;
|
|
1674
1662
|
}
|
|
@@ -1733,7 +1721,7 @@ export class AuthenticationService {
|
|
|
1733
1721
|
} else {
|
|
1734
1722
|
throw new UnauthorizedException(ERROR_MESSAGES.INVALID_USER_PROFILE);
|
|
1735
1723
|
}
|
|
1736
|
-
} catch (error) {
|
|
1724
|
+
} catch (error: any) {
|
|
1737
1725
|
throw new UnauthorizedException("Microsoft OAuth profile fetch failed");
|
|
1738
1726
|
}
|
|
1739
1727
|
}
|
|
@@ -1880,7 +1868,7 @@ export class AuthenticationService {
|
|
|
1880
1868
|
await this.userActivityHistoryService.logEvent("logout", user);
|
|
1881
1869
|
|
|
1882
1870
|
return { message: SUCCESS_MESSAGES.LOGOUT_SUCCESS };
|
|
1883
|
-
} catch (err) {
|
|
1871
|
+
} catch (err: any) {
|
|
1884
1872
|
throw err instanceof UnauthorizedException ||
|
|
1885
1873
|
err instanceof InternalServerErrorException
|
|
1886
1874
|
? err
|
|
@@ -421,7 +421,7 @@ export class ChatterMessageService extends CRUDService<ChatterMessage> {
|
|
|
421
421
|
if (value.id) {
|
|
422
422
|
return value.id.toString();
|
|
423
423
|
}
|
|
424
|
-
} catch (error) {
|
|
424
|
+
} catch (error: any) {
|
|
425
425
|
console.error('Error fetching related model metadata:', error);
|
|
426
426
|
return value.id ? value.id.toString() : '';
|
|
427
427
|
}
|
|
@@ -129,7 +129,7 @@ export class CRUDService<T extends CommonEntity> { // Add two generic value i.e
|
|
|
129
129
|
await this.saveMedia(model, files, savedEntity);
|
|
130
130
|
}
|
|
131
131
|
return savedEntity;
|
|
132
|
-
} catch (error) {
|
|
132
|
+
} catch (error: any) {
|
|
133
133
|
if (error instanceof QueryFailedError && error.message.includes('duplicate key value violates unique constraint')) {
|
|
134
134
|
throw new BadRequestException(ERROR_MESSAGES.DUPLICATE_ENTRY);
|
|
135
135
|
}
|
|
@@ -920,7 +920,7 @@ export class CRUDService<T extends CommonEntity> { // Add two generic value i.e
|
|
|
920
920
|
);
|
|
921
921
|
|
|
922
922
|
return { message: SUCCESS_MESSAGES.RECORD_RECOVERED, data: softDeletedRows };
|
|
923
|
-
} catch (error) {
|
|
923
|
+
} catch (error: any) {
|
|
924
924
|
if (error instanceof QueryFailedError) {
|
|
925
925
|
if ((error as any).code === '23505') {
|
|
926
926
|
throw new Error(ERROR_MESSAGES.CONFLICTING_RECORD_ON_UNARCHIVE);
|
|
@@ -966,7 +966,7 @@ export class CRUDService<T extends CommonEntity> { // Add two generic value i.e
|
|
|
966
966
|
);
|
|
967
967
|
|
|
968
968
|
return { message: SUCCESS_MESSAGES.SELECTED_RECORDS_RECOVERED, recoveredIds: ids };
|
|
969
|
-
} catch (error) {
|
|
969
|
+
} catch (error: any) {
|
|
970
970
|
if (error instanceof QueryFailedError) {
|
|
971
971
|
if ((error as any).code === "23505") {
|
|
972
972
|
throw new Error(ERROR_MESSAGES.CONFLICTING_RECORD_ON_UNARCHIVE);
|
|
@@ -68,7 +68,7 @@ export class CsvService {
|
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
csvStream.end(); // ✅ Ensure CSV stream is finalized
|
|
71
|
-
} catch (error) {
|
|
71
|
+
} catch (error: any) {
|
|
72
72
|
this.logger.error(`❌ Error writing CSV: ${error.message}`);
|
|
73
73
|
passThrough.destroy(error); // ✅ Properly destroy stream on error
|
|
74
74
|
throw error;
|
|
@@ -117,7 +117,7 @@ export class DashboardService extends CRUDService<Dashboard> {
|
|
|
117
117
|
const filePath = await this.moduleMetadataHelperService.getModuleMetadataFilePath(moduleName);
|
|
118
118
|
try {
|
|
119
119
|
await fs.access(filePath);
|
|
120
|
-
} catch (error) {
|
|
120
|
+
} catch (error: any) {
|
|
121
121
|
throw new Error(`Configuration file not found for module: ${moduleName}`);
|
|
122
122
|
}
|
|
123
123
|
const metaData = await this.moduleMetadataHelperService.getModuleMetadataConfiguration(filePath);
|
|
@@ -80,7 +80,7 @@ export class DatabaseBootstrapService implements OnModuleInit {
|
|
|
80
80
|
await this.dataSource.query(sql);
|
|
81
81
|
|
|
82
82
|
this.logger.debug(`[${this.dataSource.name}] Applied ${fileName}`);
|
|
83
|
-
} catch (error) {
|
|
83
|
+
} catch (error: any) {
|
|
84
84
|
// DO NOT THROW — continue with next file
|
|
85
85
|
this.logger.error(
|
|
86
86
|
`[${this.dataSource.name}] Failed ${fileName}`,
|
|
@@ -93,7 +93,7 @@ export class ExcelService {
|
|
|
93
93
|
|
|
94
94
|
workbook.commit();
|
|
95
95
|
// passThrough.end(); // ✅ Properly close the stream
|
|
96
|
-
} catch (error) {
|
|
96
|
+
} catch (error: any) {
|
|
97
97
|
this.logger.error(`❌ Error writing Excel: ${error.message}`);
|
|
98
98
|
passThrough.destroy(error); // Destroy stream
|
|
99
99
|
throw error;
|
|
@@ -90,7 +90,7 @@ export class ExportTransactionService extends CRUDService<ExportTransaction> {
|
|
|
90
90
|
const fileName = this.getFileName(templateName, uuid, templateFormat);
|
|
91
91
|
const mimeType = this.getMimeType(templateFormat);
|
|
92
92
|
return { exportStream, fileName, mimeType, exportTransaction };
|
|
93
|
-
} catch (error) {
|
|
93
|
+
} catch (error: any) {
|
|
94
94
|
this.updateExportTransaction(id, ExportStatus.FAILED, error.message);
|
|
95
95
|
throw error;
|
|
96
96
|
}
|
|
@@ -114,7 +114,7 @@ export class ExportTransactionService extends CRUDService<ExportTransaction> {
|
|
|
114
114
|
// Store the file using the appropriate storage provider
|
|
115
115
|
await this.storeExportStream(exportStream, exportTransaction, this.getFileName(templateName, uuid, templateFormat));
|
|
116
116
|
this.updateExportTransaction(id, ExportStatus.COMPLETED);
|
|
117
|
-
} catch (error) {
|
|
117
|
+
} catch (error: any) {
|
|
118
118
|
this.updateExportTransaction(id, ExportStatus.FAILED, error.message);
|
|
119
119
|
throw error;
|
|
120
120
|
|
|
@@ -745,6 +745,8 @@ export class FieldMetadataService implements OnApplicationBootstrap {
|
|
|
745
745
|
"type",
|
|
746
746
|
"ormType",
|
|
747
747
|
"isSystem",
|
|
748
|
+
"regexPattern",
|
|
749
|
+
"regexPatternNotMatchingErrorMsg",
|
|
748
750
|
"defaultValue",
|
|
749
751
|
"min",
|
|
750
752
|
"max",
|
|
@@ -772,8 +774,6 @@ export class FieldMetadataService implements OnApplicationBootstrap {
|
|
|
772
774
|
"regexPattern",
|
|
773
775
|
"regexPatternNotMatchingErrorMsg",
|
|
774
776
|
"defaultValue",
|
|
775
|
-
"min",
|
|
776
|
-
"max",
|
|
777
777
|
"required",
|
|
778
778
|
"unique",
|
|
779
779
|
"index",
|
|
@@ -1256,7 +1256,7 @@ export class FieldMetadataService implements OnApplicationBootstrap {
|
|
|
1256
1256
|
// Write the updated object back to the file
|
|
1257
1257
|
const updatedContent = JSON.stringify(metaData, null, 2);
|
|
1258
1258
|
await fs.writeFile(filePath, updatedContent);
|
|
1259
|
-
} catch (error) {
|
|
1259
|
+
} catch (error: any) {
|
|
1260
1260
|
this.logger.error('File creation failed:', error);
|
|
1261
1261
|
throw new Error(ERROR_MESSAGES.FILE_WRITE_FAILED); // Trigger rollback
|
|
1262
1262
|
}
|
|
@@ -35,7 +35,7 @@ export class FixturesService {
|
|
|
35
35
|
// Create the model instance in the database
|
|
36
36
|
const createdInstance = await modelServiceInstance.create(modelFixture.data);
|
|
37
37
|
this.logger.log(`Successfully created fixture for model: ${modelFixture.singularName} with ID: ${createdInstance.id}`);
|
|
38
|
-
} catch (error) {
|
|
38
|
+
} catch (error: any) {
|
|
39
39
|
this.logger.error(`Error creating fixture for model: ${modelFixture.singularName} - ${error.message}`);
|
|
40
40
|
}
|
|
41
41
|
}
|
|
@@ -59,7 +59,7 @@ export class FixturesService {
|
|
|
59
59
|
const deleteCriteria = modelFixture.data; // This should be adjusted based on actual criteria
|
|
60
60
|
await modelServiceInstance.delete(deleteCriteria);
|
|
61
61
|
this.logger.log(`Successfully deleted fixture for model: ${modelFixture.singularName}`);
|
|
62
|
-
} catch (error) {
|
|
62
|
+
} catch (error: any) {
|
|
63
63
|
this.logger.error(`Error deleting fixture for model: ${modelFixture.singularName} - ${error.message}`);
|
|
64
64
|
}
|
|
65
65
|
}
|
|
@@ -25,7 +25,7 @@ import { SolidIntrospectService } from './solid-introspect.service';
|
|
|
25
25
|
import { ModelMetadataHelperService } from 'src/helpers/model-metadata-helper.service';
|
|
26
26
|
import { getUserExcludedFields } from 'src/helpers/user-helper';
|
|
27
27
|
import { ActiveUserData } from 'src/interfaces/active-user-data.interface';
|
|
28
|
-
import {upperFirst, camelCase} from 'lodash';
|
|
28
|
+
import { upperFirst, camelCase } from 'lodash';
|
|
29
29
|
import { classify } from '../helpers/string.helper';
|
|
30
30
|
|
|
31
31
|
interface ImportTemplateFileInfo {
|
|
@@ -557,7 +557,7 @@ export class ImportTransactionService extends CRUDService<ImportTransaction> {
|
|
|
557
557
|
const createdRecord = await this.insertRecord(record, JSON.parse(importTransaction.mapping) as ImportMapping[], importTransaction.modelMetadata, modelService);
|
|
558
558
|
ids.push(createdRecord.id); // Add the ID of the created record to the ids array
|
|
559
559
|
}
|
|
560
|
-
catch (error) {
|
|
560
|
+
catch (error: any) {
|
|
561
561
|
this.logger.debug(`Error inserting record: ${JSON.stringify(record)}. Error: ${error.message}`);
|
|
562
562
|
// Get the Import transaction error log repo
|
|
563
563
|
const errorLog = await this.createErrorLogEntry(importTransaction, record, error);
|
|
@@ -140,7 +140,7 @@ export class ListOfValuesService extends CRUDService<ListOfValues> {
|
|
|
140
140
|
const filePath = await this.moduleMetadataHelperService.getModuleMetadataFilePath(moduleName);
|
|
141
141
|
try {
|
|
142
142
|
await fs.access(filePath);
|
|
143
|
-
} catch (error) {
|
|
143
|
+
} catch (error: any) {
|
|
144
144
|
throw new Error(`Configuration file not found for module: ${moduleName}`);
|
|
145
145
|
}
|
|
146
146
|
const metaData = await this.moduleMetadataHelperService.getModuleMetadataConfiguration(filePath);
|
|
@@ -154,7 +154,7 @@ export class ModelMetadataService {
|
|
|
154
154
|
|
|
155
155
|
return model
|
|
156
156
|
});
|
|
157
|
-
} catch (error) {
|
|
157
|
+
} catch (error: any) {
|
|
158
158
|
// console.error('Transaction failed:', error);
|
|
159
159
|
this.logger.error('Transaction failed:', error);
|
|
160
160
|
throw error;
|
|
@@ -189,7 +189,7 @@ export class ModelMetadataService {
|
|
|
189
189
|
|
|
190
190
|
// return model
|
|
191
191
|
});
|
|
192
|
-
} catch (error) {
|
|
192
|
+
} catch (error: any) {
|
|
193
193
|
// console.error('Transaction failed:', error);
|
|
194
194
|
this.logger.error('Transaction failed:', error);
|
|
195
195
|
throw error;
|
|
@@ -309,7 +309,7 @@ export class ModelMetadataService {
|
|
|
309
309
|
const updatedContent = JSON.stringify(metaData, null, 2);
|
|
310
310
|
await fs.writeFile(filePath, updatedContent);
|
|
311
311
|
|
|
312
|
-
} catch (error) {
|
|
312
|
+
} catch (error: any) {
|
|
313
313
|
// console.error('File creation failed:', error);
|
|
314
314
|
this.logger.error('File creation failed:', error);
|
|
315
315
|
throw new Error(ERROR_MESSAGES.FILE_WRITE_FAILED); // Trigger rollback
|
|
@@ -490,7 +490,7 @@ export class ModelMetadataService {
|
|
|
490
490
|
const updatedContent = JSON.stringify(metaData, null, 2);
|
|
491
491
|
await fs.writeFile(filePath, updatedContent);
|
|
492
492
|
|
|
493
|
-
} catch (error) {
|
|
493
|
+
} catch (error: any) {
|
|
494
494
|
// console.error('File creation failed:', error);
|
|
495
495
|
this.logger.error('File creation failed:', error);
|
|
496
496
|
throw new Error(ERROR_MESSAGES.FILE_WRITE_FAILED); // Trigger rollback
|
|
@@ -524,7 +524,7 @@ export class ModelMetadataService {
|
|
|
524
524
|
await this.cleanupOnDelete(entity.id);
|
|
525
525
|
const r = await this.modelMetadataRepo.remove(entity);
|
|
526
526
|
return r;
|
|
527
|
-
} catch (error) {
|
|
527
|
+
} catch (error: any) {
|
|
528
528
|
}
|
|
529
529
|
}
|
|
530
530
|
|
|
@@ -621,7 +621,7 @@ export class ModelMetadataService {
|
|
|
621
621
|
try {
|
|
622
622
|
await fs.unlink(fileToDelete);
|
|
623
623
|
this.logger.log(`Deleted file: ${fileToDelete}`);
|
|
624
|
-
} catch (error) {
|
|
624
|
+
} catch (error: any) {
|
|
625
625
|
this.logger.error(`Error deleting file: ${fileToDelete}`, error);
|
|
626
626
|
}
|
|
627
627
|
}
|
|
@@ -725,7 +725,7 @@ export class ModelMetadataService {
|
|
|
725
725
|
);
|
|
726
726
|
this.solidTsMorphService.removeModuleMembers(moduleFilePath, removedIdentifiers);
|
|
727
727
|
await this.solidTsMorphService.commit();
|
|
728
|
-
} catch (error) {
|
|
728
|
+
} catch (error: any) {
|
|
729
729
|
this.solidTsMorphService.rollback();
|
|
730
730
|
this.logger.error(`Failed to clean up module file for model '${modelEntity.singularName}':`, error);
|
|
731
731
|
}
|
|
@@ -789,7 +789,7 @@ export class ModelMetadataService {
|
|
|
789
789
|
await this.populateVAMConfigInDb(model);
|
|
790
790
|
await this.populateVAMConfigInFile(model);
|
|
791
791
|
});
|
|
792
|
-
} catch (error) {
|
|
792
|
+
} catch (error: any) {
|
|
793
793
|
this.logger.error('generateVAMConfig Transaction failed:', error);
|
|
794
794
|
throw error;
|
|
795
795
|
}
|
|
@@ -816,7 +816,7 @@ export class ModelMetadataService {
|
|
|
816
816
|
const updatedContent = JSON.stringify(metaData, null, 2);
|
|
817
817
|
await fs.writeFile(filePath, updatedContent);
|
|
818
818
|
|
|
819
|
-
} catch (error) {
|
|
819
|
+
} catch (error: any) {
|
|
820
820
|
// console.error('File creation failed:', error);
|
|
821
821
|
this.logger.error('File updation failed for View, action, menus config:', error);
|
|
822
822
|
throw new Error('File updation failed for View, action, menus config'); // Trigger rollback
|
|
@@ -826,15 +826,15 @@ export class ModelMetadataService {
|
|
|
826
826
|
// Populate the View, Actions and Menus in the config file
|
|
827
827
|
private populateVAMConfigInFileInternal(formViewLayoutFields: any[], model: ModelMetadata, listViewLayoutFields: { type: string; attrs: { name: string; }; }[], treeViewLayoutFields: { type: string; attrs: { name: string; }; }[], metaData: any) {
|
|
828
828
|
const column1Fields = [];
|
|
829
|
-
const column2Fields = [];
|
|
829
|
+
// const column2Fields = [];
|
|
830
830
|
|
|
831
831
|
// Distribute fields between two columns
|
|
832
832
|
for (let i = 0; i < formViewLayoutFields.length; i++) {
|
|
833
|
-
if (i % 2 === 0) {
|
|
834
|
-
|
|
835
|
-
} else {
|
|
836
|
-
|
|
837
|
-
}
|
|
833
|
+
// if (i % 2 === 0) {
|
|
834
|
+
column1Fields.push(formViewLayoutFields[i]);
|
|
835
|
+
// } else {
|
|
836
|
+
// column2Fields.push(formViewLayoutFields[i]);
|
|
837
|
+
// }
|
|
838
838
|
}
|
|
839
839
|
const actionName = `${model.singularName}-list-action`;
|
|
840
840
|
const treeViewActionName = `${model.singularName}-tree-action`;
|
|
@@ -842,6 +842,7 @@ export class ModelMetadataService {
|
|
|
842
842
|
const treeViewName = `${model.singularName}-tree-view`;
|
|
843
843
|
const formViewName = `${model.singularName}-form-view`;
|
|
844
844
|
const menuName = `${model.singularName}-menu-item`;
|
|
845
|
+
const nextMenuSequenceNumber = (metaData.menus?.length ?? 0) + 1;
|
|
845
846
|
|
|
846
847
|
const action = {
|
|
847
848
|
displayName: `${model.displayName} List Action`,
|
|
@@ -874,7 +875,7 @@ export class ModelMetadataService {
|
|
|
874
875
|
const menu = {
|
|
875
876
|
displayName: `${model.displayName}`,
|
|
876
877
|
name: menuName,
|
|
877
|
-
sequenceNumber:
|
|
878
|
+
sequenceNumber: nextMenuSequenceNumber,
|
|
878
879
|
actionUserKey: actionName,
|
|
879
880
|
moduleUserKey: `${model.module.name}`,
|
|
880
881
|
parentMenuItemUserKey: "",
|
|
@@ -955,11 +956,11 @@ export class ModelMetadataService {
|
|
|
955
956
|
attrs: { name: "group-1", label: "", className: "col-12 sm:col-12 md:col-6 lg:col-6" },
|
|
956
957
|
children: column1Fields
|
|
957
958
|
},
|
|
958
|
-
{
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
}
|
|
959
|
+
// {
|
|
960
|
+
// type: "column",
|
|
961
|
+
// attrs: { name: "group-2", label: "", className: "col-12 sm:col-12 md:col-6 lg:col-6" },
|
|
962
|
+
// children: column2Fields
|
|
963
|
+
// }
|
|
963
964
|
]
|
|
964
965
|
},
|
|
965
966
|
]
|
|
@@ -123,7 +123,7 @@ export class ModuleMetadataService {
|
|
|
123
123
|
await this.createInFile(module);
|
|
124
124
|
return module
|
|
125
125
|
});
|
|
126
|
-
} catch (error) {
|
|
126
|
+
} catch (error: any) {
|
|
127
127
|
// console.error('Transaction failed:', error);
|
|
128
128
|
this.logger.error('Transaction failed:', error);
|
|
129
129
|
throw error;
|
|
@@ -181,7 +181,7 @@ export class ModuleMetadataService {
|
|
|
181
181
|
actionUserKey: `${module?.name}-home-action`,
|
|
182
182
|
moduleUserKey: module?.name,
|
|
183
183
|
parentMenuItemUserKey: "",
|
|
184
|
-
iconName
|
|
184
|
+
iconName: "home"
|
|
185
185
|
}
|
|
186
186
|
],
|
|
187
187
|
views: [],
|
|
@@ -204,7 +204,7 @@ export class ModuleMetadataService {
|
|
|
204
204
|
// Write the JSON to the file
|
|
205
205
|
await fs.writeFile(filePath, metadataJson);
|
|
206
206
|
|
|
207
|
-
} catch (error) {
|
|
207
|
+
} catch (error: any) {
|
|
208
208
|
// console.error('File creation failed:', error);
|
|
209
209
|
this.logger.error('File creation failed:', error);
|
|
210
210
|
throw new Error(ERROR_MESSAGES.FILE_WRITE_FAILED); // Trigger rollback
|
|
@@ -219,7 +219,7 @@ export class ModuleMetadataService {
|
|
|
219
219
|
await this.updateInFile(module);
|
|
220
220
|
return module
|
|
221
221
|
});
|
|
222
|
-
} catch (error) {
|
|
222
|
+
} catch (error: any) {
|
|
223
223
|
// console.error('Transaction failed:', error);
|
|
224
224
|
this.logger.error('Transaction failed:', error);
|
|
225
225
|
throw error;
|
|
@@ -255,7 +255,7 @@ export class ModuleMetadataService {
|
|
|
255
255
|
try {
|
|
256
256
|
metaData = await this.moduleMetadataHelperService.getModuleMetadataConfiguration(filePath);
|
|
257
257
|
|
|
258
|
-
} catch (error) {
|
|
258
|
+
} catch (error: any) {
|
|
259
259
|
metaData = {
|
|
260
260
|
moduleMetadata: {
|
|
261
261
|
name: null,
|
|
@@ -290,7 +290,7 @@ export class ModuleMetadataService {
|
|
|
290
290
|
const updatedContent = JSON.stringify(metaData, null, 2);
|
|
291
291
|
await fs.writeFile(filePath, updatedContent);
|
|
292
292
|
|
|
293
|
-
} catch (error) {
|
|
293
|
+
} catch (error: any) {
|
|
294
294
|
// console.error('File creation failed:', error);
|
|
295
295
|
this.logger.error('File creation failed:', error);
|
|
296
296
|
throw new Error(ERROR_MESSAGES.FILE_WRITE_FAILED); // Trigger rollback
|
|
@@ -365,7 +365,7 @@ export class ModuleMetadataService {
|
|
|
365
365
|
await fs.rm(modulePath, { recursive: true, force: true });
|
|
366
366
|
await fs.rm(moduleMetadataPAth, { recursive: true, force: true });
|
|
367
367
|
this.logger.log(`Deleted file: ${moduleMetadataPAth}`);
|
|
368
|
-
} catch (error) {
|
|
368
|
+
} catch (error: any) {
|
|
369
369
|
this.logger.error(`Error deleting file: ${moduleMetadataPAth}`, error);
|
|
370
370
|
throw new Error(ERROR_MESSAGES.FILE_DELETE_FAILED); // Trigger rollback
|
|
371
371
|
}
|
|
@@ -15,9 +15,9 @@ export abstract class DatabasePublisher<T> implements QueuePublisher<T> {
|
|
|
15
15
|
protected readonly mqMessageService: MqMessageService,
|
|
16
16
|
protected readonly mqMessageQueueService: MqMessageQueueService,
|
|
17
17
|
) {
|
|
18
|
-
this.serviceRole = process.env.QUEUES_SERVICE_ROLE;
|
|
19
|
-
if (!
|
|
20
|
-
this.logger.debug('
|
|
18
|
+
this.serviceRole = process.env.QUEUES_SERVICE_ROLE || 'both';
|
|
19
|
+
if (!process.env.QUEUES_SERVICE_ROLE) {
|
|
20
|
+
this.logger.debug('QUEUES_SERVICE_ROLE is not defined. Defaulting DatabasePublisher service role to "both".');
|
|
21
21
|
}
|
|
22
22
|
// this.logger.debug(`DatabasePublisher instance created with options: ${JSON.stringify(this.options())}`);
|
|
23
23
|
}
|
|
@@ -74,7 +74,7 @@ export abstract class DatabasePublisher<T> implements QueuePublisher<T> {
|
|
|
74
74
|
mqMessageQueueId: mqMessageQueue.id,
|
|
75
75
|
});
|
|
76
76
|
}
|
|
77
|
-
catch (error) {
|
|
77
|
+
catch (error: any) {
|
|
78
78
|
this.logger.error(error.message, error.stack);
|
|
79
79
|
}
|
|
80
80
|
|
|
@@ -16,9 +16,9 @@ export abstract class DatabaseSubscriber<T> implements OnModuleInit, QueueSubscr
|
|
|
16
16
|
protected readonly mqMessageQueueService: MqMessageQueueService,
|
|
17
17
|
protected readonly poller: PollerService,
|
|
18
18
|
) {
|
|
19
|
-
this.serviceRole = process.env.QUEUES_SERVICE_ROLE;
|
|
20
|
-
if (!
|
|
21
|
-
this.logger.debug('
|
|
19
|
+
this.serviceRole = process.env.QUEUES_SERVICE_ROLE || 'both';
|
|
20
|
+
if (!process.env.QUEUES_SERVICE_ROLE) {
|
|
21
|
+
this.logger.debug('QUEUES_SERVICE_ROLE is not defined. Defaulting DatabaseSubscriber service role to "both".');
|
|
22
22
|
}
|
|
23
23
|
// this.logger.debug(`DatabaseSubscriber instance created with options: ${JSON.stringify(this.options())}`);
|
|
24
24
|
}
|
|
@@ -60,7 +60,7 @@ export abstract class DatabaseSubscriber<T> implements OnModuleInit, QueueSubscr
|
|
|
60
60
|
|
|
61
61
|
await this.processMessage(message);
|
|
62
62
|
}
|
|
63
|
-
catch (error) {
|
|
63
|
+
catch (error: any) {
|
|
64
64
|
this.logger.error(`Error processing message: ${error.message}`);
|
|
65
65
|
|
|
66
66
|
// if an error occurs then if retryCount is set we start retrying.
|
|
@@ -108,7 +108,7 @@ export abstract class DatabaseSubscriber<T> implements OnModuleInit, QueueSubscr
|
|
|
108
108
|
this.logger.log(`DatabaseSubscriber for queue ${queueName} is disabled because it does not match QUEUES_QUEUE_NAME_REGEX_TO_ENABLE=${queueNameRegex}`);
|
|
109
109
|
return;
|
|
110
110
|
}
|
|
111
|
-
} catch (error) {
|
|
111
|
+
} catch (error: any) {
|
|
112
112
|
this.logger.error(`Invalid QUEUES_QUEUE_NAME_REGEX_TO_ENABLE regex "${queueNameRegex}". Subscriber for queue ${queueName} will not start.`);
|
|
113
113
|
return;
|
|
114
114
|
}
|
|
@@ -152,7 +152,7 @@ export abstract class DatabaseSubscriber<T> implements OnModuleInit, QueueSubscr
|
|
|
152
152
|
private async retryMessage(message: QueueMessage<T>) {
|
|
153
153
|
try {
|
|
154
154
|
await this.processMessage(message);
|
|
155
|
-
} catch (error) {
|
|
155
|
+
} catch (error: any) {
|
|
156
156
|
if (message.currentRetry < message.retryCount) {
|
|
157
157
|
await this.updateStatusInDatabase('retrying', message);
|
|
158
158
|
|
|
@@ -203,7 +203,7 @@ export abstract class DatabaseSubscriber<T> implements OnModuleInit, QueueSubscr
|
|
|
203
203
|
this.logger.debug(`Message status updated to ${stage} for messageId: ${mqMessage.id}`);
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
|
-
catch (error) {
|
|
206
|
+
catch (error: any) {
|
|
207
207
|
this.logger.error(error.message, error.stack);
|
|
208
208
|
}
|
|
209
209
|
}
|