@servicelabsco/nestjs-utility-services 1.0.146 → 1.0.150

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.
Files changed (76) hide show
  1. package/dist/app.controller.d.ts +1 -1
  2. package/dist/app.controller.js +3 -1
  3. package/dist/app.controller.js.map +1 -1
  4. package/dist/app.module.js +2 -2
  5. package/dist/cli.d.ts +1 -0
  6. package/dist/cli.js +32 -0
  7. package/dist/cli.js.map +1 -0
  8. package/dist/common/libraries/common.job.d.ts +1 -0
  9. package/dist/common/libraries/common.job.js +17 -2
  10. package/dist/common/libraries/common.job.js.map +1 -1
  11. package/dist/platformUtility/commands/entity.generator.command.d.ts +3 -4
  12. package/dist/platformUtility/commands/entity.generator.command.js +24 -20
  13. package/dist/platformUtility/commands/entity.generator.command.js.map +1 -1
  14. package/dist/platformUtility/commands/index.d.ts +1 -0
  15. package/dist/platformUtility/commands/index.js +1 -0
  16. package/dist/platformUtility/commands/index.js.map +1 -1
  17. package/dist/platformUtility/commands/maintenance.command.js +9 -10
  18. package/dist/platformUtility/commands/maintenance.command.js.map +1 -1
  19. package/dist/platformUtility/commands/sqs.worker.command.d.ts +15 -0
  20. package/dist/platformUtility/commands/sqs.worker.command.js +118 -0
  21. package/dist/platformUtility/commands/sqs.worker.command.js.map +1 -0
  22. package/dist/platformUtility/commands/sync.class.command.d.ts +2 -4
  23. package/dist/platformUtility/commands/sync.class.command.js +17 -12
  24. package/dist/platformUtility/commands/sync.class.command.js.map +1 -1
  25. package/dist/platformUtility/es6.classes.d.ts +8 -5
  26. package/dist/platformUtility/es6.classes.js +6 -2
  27. package/dist/platformUtility/es6.classes.js.map +1 -1
  28. package/dist/platformUtility/jobs/index.d.ts +1 -0
  29. package/dist/platformUtility/jobs/index.js +1 -0
  30. package/dist/platformUtility/jobs/index.js.map +1 -1
  31. package/dist/platformUtility/jobs/test.job.d.ts +8 -0
  32. package/dist/platformUtility/jobs/test.job.js +42 -0
  33. package/dist/platformUtility/jobs/test.job.js.map +1 -0
  34. package/dist/platformUtility/platform.utility.module.js +1 -2
  35. package/dist/platformUtility/platform.utility.module.js.map +1 -1
  36. package/dist/platformUtility/services/dynamo.service.js +4 -4
  37. package/dist/platformUtility/services/dynamo.service.js.map +1 -1
  38. package/dist/platformUtility/services/es6.jobs.service.d.ts +3 -1
  39. package/dist/platformUtility/services/es6.jobs.service.js +7 -2
  40. package/dist/platformUtility/services/es6.jobs.service.js.map +1 -1
  41. package/dist/platformUtility/services/index.d.ts +1 -0
  42. package/dist/platformUtility/services/index.js +1 -0
  43. package/dist/platformUtility/services/index.js.map +1 -1
  44. package/dist/platformUtility/services/queue.service.d.ts +7 -4
  45. package/dist/platformUtility/services/queue.service.js +23 -10
  46. package/dist/platformUtility/services/queue.service.js.map +1 -1
  47. package/dist/platformUtility/services/sqs.service.d.ts +8 -0
  48. package/dist/platformUtility/services/sqs.service.js +86 -0
  49. package/dist/platformUtility/services/sqs.service.js.map +1 -0
  50. package/dist/system/commands/db.scanner.command.d.ts +3 -4
  51. package/dist/system/commands/db.scanner.command.js +16 -12
  52. package/dist/system/commands/db.scanner.command.js.map +1 -1
  53. package/dist/system/commands/event.queue.command.d.ts +4 -4
  54. package/dist/system/commands/event.queue.command.js +20 -16
  55. package/dist/system/commands/event.queue.command.js.map +1 -1
  56. package/dist/system/commands/index.d.ts +0 -1
  57. package/dist/system/commands/index.js +0 -1
  58. package/dist/system/commands/index.js.map +1 -1
  59. package/dist/system/commands/jobs.scanner.command.d.ts +3 -5
  60. package/dist/system/commands/jobs.scanner.command.js +16 -13
  61. package/dist/system/commands/jobs.scanner.command.js.map +1 -1
  62. package/dist/system/commands/model.scanner.command.d.ts +2 -4
  63. package/dist/system/commands/model.scanner.command.js +15 -12
  64. package/dist/system/commands/model.scanner.command.js.map +1 -1
  65. package/dist/system/commands/report.scanner.command.d.ts +2 -4
  66. package/dist/system/commands/report.scanner.command.js +15 -12
  67. package/dist/system/commands/report.scanner.command.js.map +1 -1
  68. package/dist/system/commands/service.scanner.command.d.ts +3 -4
  69. package/dist/system/commands/service.scanner.command.js +17 -13
  70. package/dist/system/commands/service.scanner.command.js.map +1 -1
  71. package/dist/system/es6.classes.d.ts +1 -2
  72. package/dist/system/es6.classes.js +1 -10
  73. package/dist/system/es6.classes.js.map +1 -1
  74. package/dist/system/system.module.js +1 -2
  75. package/dist/system/system.module.js.map +1 -1
  76. package/package.json +5 -5
@@ -1,5 +1,6 @@
1
1
  import { EntityGeneratorCommand } from './commands/entity.generator.command';
2
2
  import { MaintenanceCommand } from './commands/maintenance.command';
3
+ import { SqsWorkerCommand } from './commands/sqs.worker.command';
3
4
  import { SyncClassCommand } from './commands/sync.class.command';
4
5
  import { EventConsumer } from './consumers/event.consumer';
5
6
  import { JobConsumer } from './consumers/job.consumer';
@@ -9,6 +10,7 @@ import { PushNotificationResponseDto } from './dtos/push.notification.response.d
9
10
  import { PushNotificationTemplateDto } from './dtos/push.notification.template.dto';
10
11
  import { QueueOptionsDto } from './dtos/queue.options.dto';
11
12
  import { RecordWatcherJob } from './jobs/record.watcher.job';
13
+ import { TestJob } from './jobs/test.job';
12
14
  import { CreateEntityConstantsFile } from './libraries/create.entity.constants.file';
13
15
  import { CreateEs6ClassesFile } from './libraries/create.es6.classes.file';
14
16
  import { CreateEs6JobsFile } from './libraries/create.es6.jobs.file';
@@ -29,16 +31,17 @@ import { QueueService } from './services/queue.service';
29
31
  import { RemoteRequestService } from './services/remote.request.service';
30
32
  import { ShutdownService } from './services/shutdown.service';
31
33
  import { SqlService } from './services/sql.service';
34
+ import { SqsService } from './services/sqs.service';
32
35
  import { StartupService } from './services/startup.service';
33
36
  import { BaseSubscriber } from './subscribers/base.subscriber';
34
37
  declare const es6Classes: {
35
- commands: (typeof EntityGeneratorCommand | typeof MaintenanceCommand | typeof SyncClassCommand)[];
38
+ commands: (typeof EntityGeneratorCommand | typeof MaintenanceCommand | typeof SqsWorkerCommand | typeof SyncClassCommand)[];
36
39
  consumers: (typeof EventConsumer | typeof JobConsumer)[];
37
- dtos: (typeof QueueOptionsDto | typeof MailOptionsDto | typeof FcmResponseDto | typeof PushNotificationResponseDto | typeof PushNotificationTemplateDto)[];
38
- jobs: (typeof RecordWatcherJob)[];
39
- libraries: (typeof FileSystemUtility | typeof CreateIndexFile | typeof CreateEntityConstantsFile | typeof CreateEs6ClassesFile | typeof CreateEs6JobsFile | typeof CreateEs6ServiceFile)[];
40
+ dtos: (typeof QueueOptionsDto | typeof FcmResponseDto | typeof PushNotificationResponseDto | typeof PushNotificationTemplateDto | typeof MailOptionsDto)[];
41
+ jobs: (typeof TestJob | typeof RecordWatcherJob)[];
42
+ libraries: (typeof FileSystemUtility | typeof CreateEntityConstantsFile | typeof CreateEs6ClassesFile | typeof CreateEs6JobsFile | typeof CreateEs6ServiceFile | typeof CreateIndexFile)[];
40
43
  middlewares: (typeof MaintenanceMiddleware)[];
41
- services: (typeof LocalPropertyService | typeof MaintenanceService | typeof ShutdownService | typeof CacheService | typeof QueueService | typeof DynamoService | typeof MailService | typeof RemoteRequestService | typeof SqlService | typeof AuditService | typeof FcmNotificationService | typeof StartupService | typeof Es6JobsService | typeof Es6Service)[];
44
+ services: (typeof CacheService | typeof LocalPropertyService | typeof MaintenanceService | typeof ShutdownService | typeof SqsService | typeof QueueService | typeof RemoteRequestService | typeof SqlService | typeof DynamoService | typeof AuditService | typeof FcmNotificationService | typeof MailService | typeof StartupService | typeof Es6JobsService | typeof Es6Service)[];
42
45
  subscribers: (typeof BaseSubscriber)[];
43
46
  };
44
47
  export default es6Classes;
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const entity_generator_command_1 = require("./commands/entity.generator.command");
4
4
  const maintenance_command_1 = require("./commands/maintenance.command");
5
+ const sqs_worker_command_1 = require("./commands/sqs.worker.command");
5
6
  const sync_class_command_1 = require("./commands/sync.class.command");
6
7
  const event_consumer_1 = require("./consumers/event.consumer");
7
8
  const job_consumer_1 = require("./consumers/job.consumer");
@@ -11,6 +12,7 @@ const push_notification_response_dto_1 = require("./dtos/push.notification.respo
11
12
  const push_notification_template_dto_1 = require("./dtos/push.notification.template.dto");
12
13
  const queue_options_dto_1 = require("./dtos/queue.options.dto");
13
14
  const record_watcher_job_1 = require("./jobs/record.watcher.job");
15
+ const test_job_1 = require("./jobs/test.job");
14
16
  const create_entity_constants_file_1 = require("./libraries/create.entity.constants.file");
15
17
  const create_es6_classes_file_1 = require("./libraries/create.es6.classes.file");
16
18
  const create_es6_jobs_file_1 = require("./libraries/create.es6.jobs.file");
@@ -31,13 +33,14 @@ const queue_service_1 = require("./services/queue.service");
31
33
  const remote_request_service_1 = require("./services/remote.request.service");
32
34
  const shutdown_service_1 = require("./services/shutdown.service");
33
35
  const sql_service_1 = require("./services/sql.service");
36
+ const sqs_service_1 = require("./services/sqs.service");
34
37
  const startup_service_1 = require("./services/startup.service");
35
38
  const base_subscriber_1 = require("./subscribers/base.subscriber");
36
39
  const es6Classes = {
37
- commands: [entity_generator_command_1.EntityGeneratorCommand, maintenance_command_1.MaintenanceCommand, sync_class_command_1.SyncClassCommand],
40
+ commands: [entity_generator_command_1.EntityGeneratorCommand, maintenance_command_1.MaintenanceCommand, sqs_worker_command_1.SqsWorkerCommand, sync_class_command_1.SyncClassCommand],
38
41
  consumers: [event_consumer_1.EventConsumer, job_consumer_1.JobConsumer],
39
42
  dtos: [fcm_response_dto_1.FcmResponseDto, mail_options_dto_1.MailOptionsDto, push_notification_response_dto_1.PushNotificationResponseDto, push_notification_template_dto_1.PushNotificationTemplateDto, queue_options_dto_1.QueueOptionsDto],
40
- jobs: [record_watcher_job_1.RecordWatcherJob],
43
+ jobs: [record_watcher_job_1.RecordWatcherJob, test_job_1.TestJob],
41
44
  libraries: [create_entity_constants_file_1.CreateEntityConstantsFile, create_es6_classes_file_1.CreateEs6ClassesFile, create_es6_jobs_file_1.CreateEs6JobsFile, create_es6_service_file_1.CreateEs6ServiceFile, create_index_file_1.CreateIndexFile, file_system_utility_1.FileSystemUtility],
42
45
  middlewares: [maintenance_middleware_1.MaintenanceMiddleware],
43
46
  services: [
@@ -54,6 +57,7 @@ const es6Classes = {
54
57
  remote_request_service_1.RemoteRequestService,
55
58
  shutdown_service_1.ShutdownService,
56
59
  sql_service_1.SqlService,
60
+ sqs_service_1.SqsService,
57
61
  startup_service_1.StartupService,
58
62
  ],
59
63
  subscribers: [base_subscriber_1.BaseSubscriber],
@@ -1 +1 @@
1
- {"version":3,"file":"es6.classes.js","sourceRoot":"","sources":["../../src/platformUtility/es6.classes.ts"],"names":[],"mappings":";;AAAA,kFAA6E;AAC7E,wEAAoE;AACpE,sEAAiE;AACjE,+DAA2D;AAC3D,2DAAuD;AACvD,8DAAyD;AACzD,8DAAyD;AACzD,0FAAoF;AACpF,0FAAoF;AACpF,gEAA2D;AAC3D,kEAA6D;AAC7D,2FAAqF;AACrF,iFAA2E;AAC3E,2EAAqE;AACrE,iFAA2E;AAC3E,qEAAgE;AAChE,yEAAoE;AACpE,iFAA6E;AAC7E,4DAAwD;AACxD,4DAAwD;AACxD,8DAA0D;AAC1D,kEAA6D;AAC7D,wDAAoD;AACpD,kFAA6E;AAC7E,8EAAyE;AACzE,0DAAsD;AACtD,wEAAoE;AACpE,4DAAwD;AACxD,8EAAyE;AACzE,kEAA8D;AAC9D,wDAAoD;AACpD,gEAA4D;AAC5D,mEAA+D;AAE/D,MAAM,UAAU,GAAG;IACf,QAAQ,EAAE,CAAC,iDAAsB,EAAE,wCAAkB,EAAE,qCAAgB,CAAC;IACxE,SAAS,EAAE,CAAC,8BAAa,EAAE,0BAAW,CAAC;IACvC,IAAI,EAAE,CAAC,iCAAc,EAAE,iCAAc,EAAE,4DAA2B,EAAE,4DAA2B,EAAE,mCAAe,CAAC;IACjH,IAAI,EAAE,CAAC,qCAAgB,CAAC;IACxB,SAAS,EAAE,CAAC,wDAAyB,EAAE,8CAAoB,EAAE,wCAAiB,EAAE,8CAAoB,EAAE,mCAAe,EAAE,uCAAiB,CAAC;IACzI,WAAW,EAAE,CAAC,8CAAqB,CAAC;IACpC,QAAQ,EAAE;QACN,4BAAY;QACZ,4BAAY;QACZ,8BAAa;QACb,iCAAc;QACd,wBAAU;QACV,iDAAsB;QACtB,6CAAoB;QACpB,0BAAW;QACX,wCAAkB;QAClB,4BAAY;QACZ,6CAAoB;QACpB,kCAAe;QACf,wBAAU;QACV,gCAAc;KACjB;IACD,WAAW,EAAE,CAAC,gCAAc,CAAC;CAChC,CAAC;AAEF,kBAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"es6.classes.js","sourceRoot":"","sources":["../../src/platformUtility/es6.classes.ts"],"names":[],"mappings":";;AAAA,kFAA6E;AAC7E,wEAAoE;AACpE,sEAAiE;AACjE,sEAAiE;AACjE,+DAA2D;AAC3D,2DAAuD;AACvD,8DAAyD;AACzD,8DAAyD;AACzD,0FAAoF;AACpF,0FAAoF;AACpF,gEAA2D;AAC3D,kEAA6D;AAC7D,8CAA0C;AAC1C,2FAAqF;AACrF,iFAA2E;AAC3E,2EAAqE;AACrE,iFAA2E;AAC3E,qEAAgE;AAChE,yEAAoE;AACpE,iFAA6E;AAC7E,4DAAwD;AACxD,4DAAwD;AACxD,8DAA0D;AAC1D,kEAA6D;AAC7D,wDAAoD;AACpD,kFAA6E;AAC7E,8EAAyE;AACzE,0DAAsD;AACtD,wEAAoE;AACpE,4DAAwD;AACxD,8EAAyE;AACzE,kEAA8D;AAC9D,wDAAoD;AACpD,wDAAoD;AACpD,gEAA4D;AAC5D,mEAA+D;AAE/D,MAAM,UAAU,GAAG;IACf,QAAQ,EAAE,CAAC,iDAAsB,EAAE,wCAAkB,EAAE,qCAAgB,EAAE,qCAAgB,CAAC;IAC1F,SAAS,EAAE,CAAC,8BAAa,EAAE,0BAAW,CAAC;IACvC,IAAI,EAAE,CAAC,iCAAc,EAAE,iCAAc,EAAE,4DAA2B,EAAE,4DAA2B,EAAE,mCAAe,CAAC;IACjH,IAAI,EAAE,CAAC,qCAAgB,EAAE,kBAAO,CAAC;IACjC,SAAS,EAAE,CAAC,wDAAyB,EAAE,8CAAoB,EAAE,wCAAiB,EAAE,8CAAoB,EAAE,mCAAe,EAAE,uCAAiB,CAAC;IACzI,WAAW,EAAE,CAAC,8CAAqB,CAAC;IACpC,QAAQ,EAAE;QACN,4BAAY;QACZ,4BAAY;QACZ,8BAAa;QACb,iCAAc;QACd,wBAAU;QACV,iDAAsB;QACtB,6CAAoB;QACpB,0BAAW;QACX,wCAAkB;QAClB,4BAAY;QACZ,6CAAoB;QACpB,kCAAe;QACf,wBAAU;QACV,wBAAU;QACV,gCAAc;KACjB;IACD,WAAW,EAAE,CAAC,gCAAc,CAAC;CAChC,CAAC;AAEF,kBAAe,UAAU,CAAC"}
@@ -1 +1,2 @@
1
1
  export * from './record.watcher.job';
2
+ export * from './test.job';
@@ -11,4 +11,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
11
11
  };
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
13
  __exportStar(require("./record.watcher.job"), exports);
14
+ __exportStar(require("./test.job"), exports);
14
15
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/platformUtility/jobs/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uDAAqC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/platformUtility/jobs/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uDAAqC;AACrC,6CAA2B"}
@@ -0,0 +1,8 @@
1
+ import { CommonJob } from './../../common/libraries/common.job';
2
+ import { QueueService } from './../services/queue.service';
3
+ export declare class TestJob extends CommonJob {
4
+ protected readonly queueService: QueueService;
5
+ protected mode: string;
6
+ constructor(queueService: QueueService);
7
+ handle(data: any): Promise<void>;
8
+ }
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
12
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
13
+ return new (P || (P = Promise))(function (resolve, reject) {
14
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
15
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
16
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
17
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
18
+ });
19
+ };
20
+ Object.defineProperty(exports, "__esModule", { value: true });
21
+ exports.TestJob = void 0;
22
+ const common_1 = require("@nestjs/common");
23
+ const common_job_1 = require("./../../common/libraries/common.job");
24
+ const queue_service_1 = require("./../services/queue.service");
25
+ let TestJob = class TestJob extends common_job_1.CommonJob {
26
+ constructor(queueService) {
27
+ super();
28
+ this.queueService = queueService;
29
+ this.mode = 'fifo';
30
+ }
31
+ handle(data) {
32
+ return __awaiter(this, void 0, void 0, function* () {
33
+ global.console.log('data', data);
34
+ });
35
+ }
36
+ };
37
+ TestJob = __decorate([
38
+ (0, common_1.Injectable)(),
39
+ __metadata("design:paramtypes", [queue_service_1.QueueService])
40
+ ], TestJob);
41
+ exports.TestJob = TestJob;
42
+ //# sourceMappingURL=test.job.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test.job.js","sourceRoot":"","sources":["../../../src/platformUtility/jobs/test.job.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,oEAAgE;AAChE,+DAA2D;AAG3D,IAAa,OAAO,GAApB,MAAa,OAAQ,SAAQ,sBAAS;IAGlC,YAA+B,YAA0B;QACrD,KAAK,EAAE,CAAC;QADmB,iBAAY,GAAZ,YAAY,CAAc;QAF/C,SAAI,GAAG,MAAM,CAAC;IAIxB,CAAC;IAEK,MAAM,CAAC,IAAS;;YAClB,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QACrC,CAAC;KAAA;CACJ,CAAA;AAVY,OAAO;IADnB,IAAA,mBAAU,GAAE;qCAIoC,4BAAY;GAHhD,OAAO,CAUnB;AAVY,0BAAO"}
@@ -10,7 +10,6 @@ exports.PlatformUtilityModule = void 0;
10
10
  const bull_1 = require("@nestjs/bull");
11
11
  const common_1 = require("@nestjs/common");
12
12
  const config = require("config");
13
- const nestjs_console_1 = require("nestjs-console");
14
13
  const es6_classes_1 = require("./es6.classes");
15
14
  const cacheConfig = require("../config/cache.config");
16
15
  const name = process.env.QUEUE_NAME || config.get('queue.name');
@@ -18,7 +17,7 @@ let PlatformUtilityModule = class PlatformUtilityModule {
18
17
  };
19
18
  PlatformUtilityModule = __decorate([
20
19
  (0, common_1.Module)({
21
- imports: [bull_1.BullModule.registerQueue({ name }), nestjs_console_1.ConsoleModule, common_1.CacheModule.register(cacheConfig)],
20
+ imports: [bull_1.BullModule.registerQueue({ name }), common_1.CacheModule.register(cacheConfig)],
22
21
  providers: [...es6_classes_1.default.services, ...es6_classes_1.default.consumers, ...es6_classes_1.default.subscribers, ...es6_classes_1.default.commands, ...es6_classes_1.default.jobs],
23
22
  exports: [...es6_classes_1.default.services],
24
23
  })
@@ -1 +1 @@
1
- {"version":3,"file":"platform.utility.module.js","sourceRoot":"","sources":["../../src/platformUtility/platform.utility.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,uCA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CAAC,QAAQ,EAAE,GAAG,qBAAU,CAAC,SAAS,EAAE,GAAG,qBAAU,CAAC,WAAW,EAAE,GAAG,qBAAU,CAAC,QAAQ,EAAE,GAAG,qBAAU,CAAC,IAAI,CAAC;QACnI,OAAO,EAAE,CAAC,GAAG,qBAAU,CAAC,QAAQ,CAAC;KACpC,CAAC;GACW,qBAAqB,CAAG;AAAxB,sDAAqB"}
@@ -18,16 +18,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.DynamoService = void 0;
19
19
  const common_1 = require("@nestjs/common");
20
20
  const aws_sdk_1 = require("aws-sdk");
21
- const s3Config = require("../../config/aws.config");
21
+ const awsConfig = require("../../config/aws.config");
22
22
  let DynamoService = class DynamoService {
23
23
  constructor() {
24
24
  this.client = null;
25
25
  }
26
26
  init() {
27
27
  this.client = new aws_sdk_1.DynamoDB.DocumentClient({
28
- accessKeyId: s3Config.key,
29
- secretAccessKey: s3Config.secret,
30
- region: s3Config.region,
28
+ accessKeyId: awsConfig.key,
29
+ secretAccessKey: awsConfig.secret,
30
+ region: awsConfig.region,
31
31
  });
32
32
  }
33
33
  getClient() {
@@ -1 +1 @@
1
- {"version":3,"file":"dynamo.service.js","sourceRoot":"","sources":["../../../src/platformUtility/services/dynamo.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,qCAAmC;AACnC,oDAAoD;AAQpD,IAAa,aAAa,GAA1B,MAAa,aAAa;IAA1B;QAMY,WAAM,GAAG,IAAI,CAAC;IAkE1B,CAAC;IA3DW,IAAI;QACR,IAAI,CAAC,MAAM,GAAG,IAAI,kBAAQ,CAAC,cAAc,CAAC;YACtC,WAAW,EAAE,QAAQ,CAAC,GAAG;YACzB,eAAe,EAAE,QAAQ,CAAC,MAAM;YAChC,MAAM,EAAE,QAAQ,CAAC,MAAM;SAC1B,CAAC,CAAC;IACP,CAAC;IAQO,SAAS;QACb,IAAI,CAAC,IAAI,CAAC,MAAM;YAAE,IAA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mBAAU,GAAE;GACA,aAAa,CAwEzB;AAxEY,sCAAa"}
@@ -1,10 +1,12 @@
1
1
  import { RecordWatcherJob } from '../jobs/record.watcher.job';
2
+ import { TestJob } from '../jobs/test.job';
2
3
  import { LocalPropertyService } from '../../platformUtility/services/local.property.service';
3
4
  export declare class Es6JobsService {
4
5
  private readonly recordWatcherJob;
6
+ private readonly testJob;
5
7
  private readonly localPropertyService;
6
8
  private jobs;
7
- constructor(recordWatcherJob: RecordWatcherJob, localPropertyService: LocalPropertyService);
9
+ constructor(recordWatcherJob: RecordWatcherJob, testJob: TestJob, localPropertyService: LocalPropertyService);
8
10
  alignJobs(): void;
9
11
  setJobs(): void;
10
12
  }
@@ -12,10 +12,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.Es6JobsService = void 0;
13
13
  const common_1 = require("@nestjs/common");
14
14
  const record_watcher_job_1 = require("../jobs/record.watcher.job");
15
+ const test_job_1 = require("../jobs/test.job");
15
16
  const local_property_service_1 = require("../../platformUtility/services/local.property.service");
16
17
  let Es6JobsService = class Es6JobsService {
17
- constructor(recordWatcherJob, localPropertyService) {
18
+ constructor(recordWatcherJob, testJob, localPropertyService) {
18
19
  this.recordWatcherJob = recordWatcherJob;
20
+ this.testJob = testJob;
19
21
  this.localPropertyService = localPropertyService;
20
22
  this.jobs = {};
21
23
  this.alignJobs();
@@ -24,6 +26,7 @@ let Es6JobsService = class Es6JobsService {
24
26
  alignJobs() {
25
27
  this.jobs = {
26
28
  '3873104b5fa6f9569331cfc3103bda43': this.recordWatcherJob,
29
+ b20ed62e97fbef22a56c84c4908996a6: this.testJob,
27
30
  };
28
31
  }
29
32
  setJobs() {
@@ -33,7 +36,9 @@ let Es6JobsService = class Es6JobsService {
33
36
  };
34
37
  Es6JobsService = __decorate([
35
38
  (0, common_1.Injectable)(),
36
- __metadata("design:paramtypes", [record_watcher_job_1.RecordWatcherJob, local_property_service_1.LocalPropertyService])
39
+ __metadata("design:paramtypes", [record_watcher_job_1.RecordWatcherJob,
40
+ test_job_1.TestJob,
41
+ local_property_service_1.LocalPropertyService])
37
42
  ], Es6JobsService);
38
43
  exports.Es6JobsService = Es6JobsService;
39
44
  //# sourceMappingURL=es6.jobs.service.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"es6.jobs.service.js","sourceRoot":"","sources":["../../../src/platformUtility/services/es6.jobs.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,mEAA8D;AAC9D,kGAA6F;AAQ7F,IAAa,cAAc,GAA3B,MAAa,cAAc;IAGvB,YAA6B,gBAAkC,EAAmB,oBAA0C;QAA/F,qBAAgB,GAAhB,gBAAgB,CAAkB;QAAmB,yBAAoB,GAApB,oBAAoB,CAAsB;QAFpH,SAAI,GAAG,EAAE,CAAC;QAGd,IAAI,CAAC,SAAS,EAAE,CAAC;QACjB,IAAI,CAAC,OAAO,EAAE,CAAC;IACnB,CAAC;IAMD,SAAS;QACL,IAAI,CAAC,IAAI,GAAG;YACR,kCAAkC,EAAE,IAAI,CAAC,gBAAgB;SAC5D,CAAC;IACN,CAAC;IAMD,OAAO;QACH,MAAM,YAAY,GAAG,IAAI,CAAC,oBAAoB,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QAC3D,IAAI,CAAC,oBAAoB,CAAC,GAAG,CAAC,MAAM,kCAC7B,YAAY,GACZ,IAAI,CAAC,IAAI,EACd,CAAC;IACP,CAAC;CACJ,CAAA;AA7BY,cAAc;IAD1B,IAAA,mBAAU,GAAE;qCAIsC,qCAAgB,EAAyC,6CAAoB;GAHnH,cAAc,CA6B1B;AA7BY,wCAAc"}
1
+ {"version":3,"file":"es6.jobs.service.js","sourceRoot":"","sources":["../../../src/platformUtility/services/es6.jobs.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,mEAA8D;AAC9D,+CAA2C;AAC3C,kGAA6F;AAQ7F,IAAa,cAAc,GAA3B,MAAa,cAAc;IAGvB,YACqB,gBAAkC,EAClC,OAAgB,EAChB,oBAA0C;QAF1C,qBAAgB,GAAhB,gBAAgB,CAAkB;QAClC,YAAO,GAAP,OAAO,CAAS;QAChB,yBAAoB,GAApB,oBAAoB,CAAsB;QALvD,SAAI,GAAG,EAAE,CAAC;QAOd,IAAI,CAAC,SAAS,EAAE,CAAC;QACjB,IAAI,CAAC,OAAO,EAAE,CAAC;IACnB,CAAC;IAMD,SAAS;QACL,IAAI,CAAC,IAAI,GAAG;YACR,kCAAkC,EAAE,IAAI,CAAC,gBAAgB;YACzD,gCAAgC,EAAE,IAAI,CAAC,OAAO;SACjD,CAAC;IACN,CAAC;IAMD,OAAO;QACH,MAAM,YAAY,GAAG,IAAI,CAAC,oBAAoB,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QAC3D,IAAI,CAAC,oBAAoB,CAAC,GAAG,CAAC,MAAM,kCAC7B,YAAY,GACZ,IAAI,CAAC,IAAI,EACd,CAAC;IACP,CAAC;CACJ,CAAA;AAlCY,cAAc;IAD1B,IAAA,mBAAU,GAAE;qCAK8B,qCAAgB;QACzB,kBAAO;QACM,6CAAoB;GANtD,cAAc,CAkC1B;AAlCY,wCAAc"}
@@ -11,3 +11,4 @@ export * from './shutdown.service';
11
11
  export * from './sql.service';
12
12
  export * from './startup.service';
13
13
  export * from './mail.service';
14
+ export * from './sql.service';
@@ -23,4 +23,5 @@ __exportStar(require("./shutdown.service"), exports);
23
23
  __exportStar(require("./sql.service"), exports);
24
24
  __exportStar(require("./startup.service"), exports);
25
25
  __exportStar(require("./mail.service"), exports);
26
+ __exportStar(require("./sql.service"), exports);
26
27
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/platformUtility/services/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAAgC;AAChC,kDAAgC;AAChC,mDAAiC;AACjC,6DAA2C;AAC3C,2DAAyC;AACzC,iDAA+B;AAC/B,wDAAsC;AACtC,kDAAgC;AAChC,2DAAyC;AACzC,qDAAmC;AACnC,gDAA8B;AAC9B,oDAAkC;AAClC,iDAA+B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/platformUtility/services/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAAgC;AAChC,kDAAgC;AAChC,mDAAiC;AACjC,6DAA2C;AAC3C,2DAAyC;AACzC,iDAA+B;AAC/B,wDAAsC;AACtC,kDAAgC;AAChC,2DAAyC;AACzC,qDAAmC;AACnC,gDAA8B;AAC9B,oDAAkC;AAClC,iDAA+B;AAC/B,gDAA8B"}
@@ -1,22 +1,25 @@
1
- import { LocalPropertyService } from './local.property.service';
2
1
  import { Job, Queue } from 'bull';
3
2
  import { QueueOptionsDto } from '../dtos/queue.options.dto';
3
+ import { CacheService } from './cache.service';
4
+ import { LocalPropertyService } from './local.property.service';
4
5
  import { MaintenanceService } from './maintenance.service';
5
6
  import { ShutdownService } from './shutdown.service';
6
- import { CacheService } from './cache.service';
7
+ import { SqsService } from './sqs.service';
7
8
  export declare class QueueService {
8
9
  private readonly businessQueue;
9
10
  private readonly maintenanceService;
10
11
  private readonly shutdownService;
11
12
  private readonly cacheService;
12
13
  private readonly localPropertyService;
14
+ readonly sqsService: SqsService;
13
15
  data: any;
14
16
  private restartIdentifier;
15
17
  private logger;
16
- constructor(businessQueue: Queue, maintenanceService: MaintenanceService, shutdownService: ShutdownService, cacheService: CacheService, localPropertyService: LocalPropertyService);
18
+ constructor(businessQueue: Queue, maintenanceService: MaintenanceService, shutdownService: ShutdownService, cacheService: CacheService, localPropertyService: LocalPropertyService, sqsService: SqsService);
17
19
  add(type: string, data: any, options?: QueueOptionsDto): Promise<Job>;
20
+ addJob(type: string, data: any, options?: QueueOptionsDto): Promise<Job | any>;
21
+ addSqsJob(mode: any, payload: any): Promise<unknown>;
18
22
  getStats(): Promise<any>;
19
- addJob(type: string, data: any, options?: QueueOptionsDto): Promise<Job>;
20
23
  pause(): Promise<void>;
21
24
  resume(): Promise<void>;
22
25
  getQueueInstance(): Queue;
@@ -22,23 +22,26 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
22
22
  };
23
23
  Object.defineProperty(exports, "__esModule", { value: true });
24
24
  exports.QueueService = void 0;
25
- const operation_exception_1 = require("./../../common/exceptions/operation.exception");
26
- const local_property_service_1 = require("./local.property.service");
27
25
  const bull_1 = require("@nestjs/bull");
28
26
  const common_1 = require("@nestjs/common");
29
27
  const date_util_1 = require("../../common/libraries/date.util");
30
28
  const platform_constants_1 = require("../../config/platform.constants");
29
+ const operation_exception_1 = require("./../../common/exceptions/operation.exception");
30
+ const cache_service_1 = require("./cache.service");
31
+ const local_property_service_1 = require("./local.property.service");
31
32
  const maintenance_service_1 = require("./maintenance.service");
32
33
  const shutdown_service_1 = require("./shutdown.service");
33
- const cache_service_1 = require("./cache.service");
34
+ const sqs_service_1 = require("./sqs.service");
35
+ const config = require("config");
34
36
  const queueName = platform_constants_1.default.queue;
35
37
  let QueueService = class QueueService {
36
- constructor(businessQueue, maintenanceService, shutdownService, cacheService, localPropertyService) {
38
+ constructor(businessQueue, maintenanceService, shutdownService, cacheService, localPropertyService, sqsService) {
37
39
  this.businessQueue = businessQueue;
38
40
  this.maintenanceService = maintenanceService;
39
41
  this.shutdownService = shutdownService;
40
42
  this.cacheService = cacheService;
41
43
  this.localPropertyService = localPropertyService;
44
+ this.sqsService = sqsService;
42
45
  this.data = {};
43
46
  this.restartIdentifier = 'queue_restart_time';
44
47
  this.logger = new common_1.Logger('EventQueueManager');
@@ -56,11 +59,6 @@ let QueueService = class QueueService {
56
59
  return this.businessQueue.add(type, data, options);
57
60
  });
58
61
  }
59
- getStats() {
60
- return __awaiter(this, void 0, void 0, function* () {
61
- return this.data;
62
- });
63
- }
64
62
  addJob(type, data, options) {
65
63
  return __awaiter(this, void 0, void 0, function* () {
66
64
  const jobInstance = this.localPropertyService.getJob(type);
@@ -70,11 +68,25 @@ let QueueService = class QueueService {
70
68
  job: type,
71
69
  payload: data,
72
70
  name: jobInstance.constructor.name,
71
+ time: Date.now(),
73
72
  };
73
+ if (jobInstance.mode !== 'redis')
74
+ return this.addSqsJob(jobInstance.mode, payload);
74
75
  options = options !== null && options !== void 0 ? options : {};
75
76
  return this.businessQueue.add('generic.job.trigger', payload, options);
76
77
  });
77
78
  }
79
+ addSqsJob(mode, payload) {
80
+ return __awaiter(this, void 0, void 0, function* () {
81
+ const queue = config.get(`sqs.${mode}`);
82
+ return this.sqsService.add(queue, payload);
83
+ });
84
+ }
85
+ getStats() {
86
+ return __awaiter(this, void 0, void 0, function* () {
87
+ return this.data;
88
+ });
89
+ }
78
90
  pause() {
79
91
  return __awaiter(this, void 0, void 0, function* () {
80
92
  return this.businessQueue.pause(true);
@@ -258,7 +270,8 @@ QueueService = __decorate([
258
270
  __metadata("design:paramtypes", [Object, maintenance_service_1.MaintenanceService,
259
271
  shutdown_service_1.ShutdownService,
260
272
  cache_service_1.CacheService,
261
- local_property_service_1.LocalPropertyService])
273
+ local_property_service_1.LocalPropertyService,
274
+ sqs_service_1.SqsService])
262
275
  ], QueueService);
263
276
  exports.QueueService = QueueService;
264
277
  //# sourceMappingURL=queue.service.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"queue.service.js","sourceRoot":"","sources":["../../../src/platformUtility/services/queue.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,uFAAmF;AACnF,qEAAgE;AAChE,uCAAoD;AACpD,2CAAoD;AAEpD,gEAA4D;AAC5D,wEAAgE;AAEhE,+DAA2D;AAC3D,yDAAqD;AACrD,mDAA+C;AAE/C,MAAM,SAAS,GAAG,4BAAiB,CAAC,KAAK,CAAC;AAQ1C,IAAa,YAAY,GAAzB,MAAa,YAAY;IAgBrB,YAC6C,aAAoB,EAC5C,kBAAsC,EACtC,eAAgC,EAChC,YAA0B,EAC1B,oBAA0C;QAJlB,kBAAa,GAAb,aAAa,CAAO;QAC5C,uBAAkB,GAAlB,kBAAkB,C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AI,KAAI,GAAG,CAAC,IAAI;gBAChC,UAAU,EAAE,GAAG,CAAC,SAAS;gBACzB,YAAY,EAAE,GAAG,CAAC,WAAW;gBAC7B,WAAW,EAAE,GAAG,CAAC,UAAU;gBAC3B,MAAM,EAAE,GAAG,CAAC,WAAW,GAAG,GAAG,CAAC,SAAS;gBACvC,GAAG,EAAE,GAAG,CAAC,UAAU,GAAG,GAAG,CAAC,WAAW;gBACrC,QAAQ,EAAE,GAAG,CAAC,IAAI,CAAC,QAAQ;aAC9B,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;QAEH,OAAO,QAAQ,CAAC;IACpB,CAAC;CACJ,CAAA;AA3ZY,YAAY;IADxB,IAAA,mBAAU,GAAE;IAiBJ,WAAA,IAAA,kBAAW,EAAC,SAAS,CAAC,CAAA;6CACc,wCAAkB;QACrB,kCAAe;QAClB,4BAAY;QACJ,6CAAoB;QAC/B,wBAAU;GArBjC,YAAY,CA2ZxB;AA3ZY,oCAAY"}
@@ -0,0 +1,8 @@
1
+ export declare class SqsService {
2
+ private client;
3
+ constructor();
4
+ add(queue: string, message: any): Promise<unknown>;
5
+ delete(queue: string, receiptHandle: string): Promise<void>;
6
+ get(queue: string, count?: number): Promise<any>;
7
+ private sendMessage;
8
+ }
@@ -0,0 +1,86 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
12
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
13
+ return new (P || (P = Promise))(function (resolve, reject) {
14
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
15
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
16
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
17
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
18
+ });
19
+ };
20
+ Object.defineProperty(exports, "__esModule", { value: true });
21
+ exports.SqsService = void 0;
22
+ const common_1 = require("@nestjs/common");
23
+ const aws_sdk_1 = require("aws-sdk");
24
+ const s3Config = require("../../config/aws.config");
25
+ let SqsService = class SqsService {
26
+ constructor() {
27
+ this.client = new aws_sdk_1.SQS({ accessKeyId: s3Config.key, secretAccessKey: s3Config.secret, region: s3Config.region });
28
+ }
29
+ add(queue, message) {
30
+ return __awaiter(this, void 0, void 0, function* () {
31
+ const params = {
32
+ MessageGroupId: 'group-1',
33
+ MessageBody: JSON.stringify(message),
34
+ QueueUrl: queue,
35
+ };
36
+ return this.sendMessage(params);
37
+ });
38
+ }
39
+ delete(queue, receiptHandle) {
40
+ return __awaiter(this, void 0, void 0, function* () {
41
+ const deleteParams = {
42
+ QueueUrl: queue,
43
+ ReceiptHandle: receiptHandle,
44
+ };
45
+ this.client.deleteMessage(deleteParams, () => { });
46
+ });
47
+ }
48
+ get(queue, count = 10) {
49
+ return __awaiter(this, void 0, void 0, function* () {
50
+ const params = {
51
+ QueueUrl: queue,
52
+ MaxNumberOfMessages: count,
53
+ VisibilityTimeout: 10,
54
+ WaitTimeSeconds: 20,
55
+ };
56
+ return new Promise((resolve, reject) => {
57
+ this.client.receiveMessage(params, (err, data) => {
58
+ if (err)
59
+ reject(err);
60
+ else
61
+ resolve(data);
62
+ });
63
+ });
64
+ });
65
+ }
66
+ sendMessage(params) {
67
+ return __awaiter(this, void 0, void 0, function* () {
68
+ return new Promise((resolve, reject) => {
69
+ this.client.sendMessage(params, (err, data) => {
70
+ if (err) {
71
+ reject(err);
72
+ }
73
+ else {
74
+ resolve(data.MessageId);
75
+ }
76
+ });
77
+ });
78
+ });
79
+ }
80
+ };
81
+ SqsService = __decorate([
82
+ (0, common_1.Injectable)(),
83
+ __metadata("design:paramtypes", [])
84
+ ], SqsService);
85
+ exports.SqsService = SqsService;
86
+ //# sourceMappingURL=sqs.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sqs.service.js","sourceRoot":"","sources":["../../../src/platformUtility/services/sqs.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,qCAA8B;AAC9B,oDAAoD;AAGpD,IAAa,UAAU,GAAvB,MAAa,UAAU;IAGnB;QACI,IAAI,CAAC,MAAM,GAAG,IAAI,aAAG,CAAC,EAAE,WAAW,EAAE,QAAQ,CAAC,GAAG,EAAE,eAAe,EAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;IACpH,CAAC;IAEK,GAAG,CAAC,KAAa,EAAE,OAAY;;YACjC,MAAM,MAAM,GAAG;gBACX,cAAc,EAAE,SAAS;gBACzB,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC;gBACpC,QAAQ,EAAE,KAAK;aAClB,CAAC;YAEF,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;QACpC,CAAC;KAAA;IAEK,MAAM,CAAC,KAAa,EAAE,aAAqB;;YAC7C,MAAM,YAAY,GAAG;gBACjB,QAAQ,EAAE,KAAK;gBACf,aAAa,EAAE,aAAa;aAC/B,CAAC;YAEF,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,YAAY,EAAE,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;QACtD,CAAC;KAAA;IAEK,GAAG,CAAC,KAAa,EAAE,QAAgB,EAAE;;YACvC,MAAM,MAAM,GAAG;gBACX,QAAQ,EAAE,KAAK;gBACf,mBAAmB,EAAE,KAAK;gBAC1B,iBAAiB,EAAE,EAAE;gBACrB,eAAe,EAAE,EAAE;aACtB,CAAC;YAEF,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;gBACnC,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;oBAC7C,IAAI,GAAG;wBAAE,MAAM,CAAC,GAAG,CAAC,CAAC;;wBAChB,OAAO,CAAC,IAAI,CAAC,CAAC;gBACvB,CAAC,CAAC,CAAC;YACP,CAAC,CAAC,CAAC;QACP,CAAC;KAAA;IAEa,WAAW,CAAC,MAA8B;;YACpD,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;gBACnC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;oBAC1C,IAAI,GAAG,EAAE;wBACL,MAAM,CAAC,GAAG,CAAC,CAAC;qBACf;yBAAM;wBACH,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;qBAC3B;gBACL,CAAC,CAAC,CAAC;YACP,CAAC,CAAC,CAAC;QACP,CAAC;KAAA;CACJ,CAAA;AArDY,UAAU;IADtB,IAAA,mBAAU,GAAE;;GACA,UAAU,CAqDtB;AArDY,gCAAU"}
@@ -1,4 +1,3 @@
1
- import { ConsoleService } from 'nestjs-console';
2
1
  import { QueueService } from '../../platformUtility/services/queue.service';
3
2
  import { SqlService } from './../../platformUtility/services/sql.service';
4
3
  import { ColumnEntity } from './../entities/column.entity';
@@ -6,11 +5,11 @@ import { ModelEntity } from './../entities/model.entity';
6
5
  import { RelationshipEntity } from './../entities/relationship.entity';
7
6
  export declare class DbScannerCommand {
8
7
  private readonly queueService;
9
- private readonly consoleService;
10
8
  private readonly sqlService;
9
+ private logger;
11
10
  private columnDefinitionMapping;
12
- constructor(queueService: QueueService, consoleService: ConsoleService, sqlService: SqlService);
13
- syncDB: () => Promise<void>;
11
+ constructor(queueService: QueueService, sqlService: SqlService);
12
+ process(): Promise<void>;
14
13
  setAllTables(): Promise<ModelEntity[]>;
15
14
  setModel(table: any): Promise<ModelEntity>;
16
15
  setModelsColumn(models: ModelEntity[]): Promise<ColumnEntity[]>;
@@ -21,7 +21,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
21
21
  exports.DbScannerCommand = void 0;
22
22
  const common_1 = require("@nestjs/common");
23
23
  const class_transformer_1 = require("class-transformer");
24
- const nestjs_console_1 = require("nestjs-console");
24
+ const nestjs_command_1 = require("nestjs-command");
25
25
  const common_2 = require("../../common");
26
26
  const queue_service_1 = require("../../platformUtility/services/queue.service");
27
27
  const platform_utility_1 = require("./../../common/libraries/platform.utility");
@@ -32,12 +32,14 @@ const model_entity_1 = require("./../entities/model.entity");
32
32
  const relationship_entity_1 = require("./../entities/relationship.entity");
33
33
  const SOURCEHASH = require("../../config/source.hash");
34
34
  let DbScannerCommand = class DbScannerCommand {
35
- constructor(queueService, consoleService, sqlService) {
35
+ constructor(queueService, sqlService) {
36
36
  this.queueService = queueService;
37
- this.consoleService = consoleService;
38
37
  this.sqlService = sqlService;
38
+ this.logger = new common_1.Logger('SqsWorker');
39
39
  this.columnDefinitionMapping = {};
40
- this.syncDB = () => __awaiter(this, void 0, void 0, function* () {
40
+ }
41
+ process() {
42
+ return __awaiter(this, void 0, void 0, function* () {
41
43
  yield this.queueService.pause();
42
44
  yield this.loadDBColumnMapping();
43
45
  yield this.setUserTable();
@@ -45,11 +47,6 @@ let DbScannerCommand = class DbScannerCommand {
45
47
  yield this.setModelsColumn(models);
46
48
  yield this.setModelsRelationship(models);
47
49
  });
48
- const cli = this.consoleService.getCli();
49
- this.consoleService.createCommand({
50
- command: 'sync:db',
51
- description: 'sync all elements of db to the system',
52
- }, this.syncDB, cli);
53
50
  }
54
51
  setAllTables() {
55
52
  return __awaiter(this, void 0, void 0, function* () {
@@ -290,11 +287,18 @@ let DbScannerCommand = class DbScannerCommand {
290
287
  return str;
291
288
  }
292
289
  };
290
+ __decorate([
291
+ (0, nestjs_command_1.Command)({
292
+ command: 'sync:db',
293
+ describe: 'sync all elements of db to the system',
294
+ }),
295
+ __metadata("design:type", Function),
296
+ __metadata("design:paramtypes", []),
297
+ __metadata("design:returntype", Promise)
298
+ ], DbScannerCommand.prototype, "process", null);
293
299
  DbScannerCommand = __decorate([
294
300
  (0, common_1.Injectable)(),
295
- __metadata("design:paramtypes", [queue_service_1.QueueService,
296
- nestjs_console_1.ConsoleService,
297
- sql_service_1.SqlService])
301
+ __metadata("design:paramtypes", [queue_service_1.QueueService, sql_service_1.SqlService])
298
302
  ], DbScannerCommand);
299
303
  exports.DbScannerCommand = DbScannerCommand;
300
304
  //# sourceMappingURL=db.scanner.command.js.map