@servicelabsco/nestjs-utility-services 1.0.149 → 1.0.153
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/cli.js +2 -2
- package/dist/cli.js.map +1 -1
- package/dist/config/entity.constants.d.ts +2 -0
- package/dist/config/entity.constants.js +2 -0
- package/dist/config/entity.constants.js.map +1 -1
- package/dist/migrations/1643899218270-CreateSmsMessageTable.d.ts +5 -0
- package/dist/migrations/1643899218270-CreateSmsMessageTable.js +24 -0
- package/dist/migrations/1643899218270-CreateSmsMessageTable.js.map +1 -0
- package/dist/platformUtility/commands/entity.generator.command.d.ts +3 -4
- package/dist/platformUtility/commands/entity.generator.command.js +24 -20
- package/dist/platformUtility/commands/entity.generator.command.js.map +1 -1
- package/dist/platformUtility/commands/maintenance.command.d.ts +2 -1
- package/dist/platformUtility/commands/maintenance.command.js +17 -4
- package/dist/platformUtility/commands/maintenance.command.js.map +1 -1
- package/dist/platformUtility/commands/sqs.worker.command.d.ts +6 -2
- package/dist/platformUtility/commands/sqs.worker.command.js +17 -14
- package/dist/platformUtility/commands/sqs.worker.command.js.map +1 -1
- package/dist/platformUtility/commands/sync.class.command.d.ts +2 -4
- package/dist/platformUtility/commands/sync.class.command.js +17 -12
- package/dist/platformUtility/commands/sync.class.command.js.map +1 -1
- package/dist/platformUtility/es6.classes.d.ts +3 -3
- package/dist/platformUtility/platform.utility.module.js +1 -2
- package/dist/platformUtility/platform.utility.module.js.map +1 -1
- package/dist/platformUtility/services/maintenance.service.d.ts +5 -2
- package/dist/platformUtility/services/maintenance.service.js +17 -6
- package/dist/platformUtility/services/maintenance.service.js.map +1 -1
- package/dist/platformUtility/services/queue.service.js +1 -1
- package/dist/platformUtility/services/queue.service.js.map +1 -1
- package/dist/platformUtility/services/sqs.service.d.ts +1 -0
- package/dist/platformUtility/services/sqs.service.js +4 -0
- package/dist/platformUtility/services/sqs.service.js.map +1 -1
- package/dist/system/commands/db.scanner.command.d.ts +3 -4
- package/dist/system/commands/db.scanner.command.js +16 -12
- package/dist/system/commands/db.scanner.command.js.map +1 -1
- package/dist/system/commands/event.queue.command.d.ts +4 -4
- package/dist/system/commands/event.queue.command.js +20 -16
- package/dist/system/commands/event.queue.command.js.map +1 -1
- package/dist/system/commands/index.d.ts +0 -1
- package/dist/system/commands/index.js +0 -1
- package/dist/system/commands/index.js.map +1 -1
- package/dist/system/commands/jobs.scanner.command.d.ts +3 -5
- package/dist/system/commands/jobs.scanner.command.js +16 -13
- package/dist/system/commands/jobs.scanner.command.js.map +1 -1
- package/dist/system/commands/model.scanner.command.d.ts +2 -4
- package/dist/system/commands/model.scanner.command.js +15 -12
- package/dist/system/commands/model.scanner.command.js.map +1 -1
- package/dist/system/commands/report.scanner.command.d.ts +2 -4
- package/dist/system/commands/report.scanner.command.js +15 -12
- package/dist/system/commands/report.scanner.command.js.map +1 -1
- package/dist/system/commands/service.scanner.command.d.ts +3 -4
- package/dist/system/commands/service.scanner.command.js +17 -13
- package/dist/system/commands/service.scanner.command.js.map +1 -1
- package/dist/system/entities/index.d.ts +1 -0
- package/dist/system/entities/index.js +1 -0
- package/dist/system/entities/index.js.map +1 -1
- package/dist/system/entities/sms.message.entity.d.ts +16 -0
- package/dist/system/entities/sms.message.entity.js +69 -0
- package/dist/system/entities/sms.message.entity.js.map +1 -0
- package/dist/system/es6.classes.d.ts +3 -3
- package/dist/system/es6.classes.js +3 -10
- package/dist/system/es6.classes.js.map +1 -1
- package/dist/system/system.module.js +1 -2
- package/dist/system/system.module.js.map +1 -1
- package/package.json +3 -3
package/dist/cli.js
CHANGED
@@ -9,13 +9,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
9
9
|
});
|
10
10
|
};
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
-
const app_module_1 = require("./app.module");
|
13
12
|
const core_1 = require("@nestjs/core");
|
14
13
|
const nestjs_command_1 = require("nestjs-command");
|
14
|
+
const app_module_1 = require("./app.module");
|
15
15
|
function bootstrap() {
|
16
16
|
return __awaiter(this, void 0, void 0, function* () {
|
17
17
|
const app = yield core_1.NestFactory.createApplicationContext(app_module_1.AppModule, {
|
18
|
-
logger: ['error'],
|
18
|
+
logger: ['log', 'warn', 'error'],
|
19
19
|
});
|
20
20
|
try {
|
21
21
|
yield app.select(nestjs_command_1.CommandModule).get(nestjs_command_1.CommandService).exec();
|
package/dist/cli.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,uCAA2C;AAC3C,mDAA+D;AAC/D,6CAAyC;AAEzC,SAAe,SAAS;;QACpB,MAAM,GAAG,GAAG,MAAM,kBAAW,CAAC,wBAAwB,CAAC,sBAAS,EAAE;YAC9D,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC;SACnC,CAAC,CAAC;QAEH,IAAI;YACA,MAAM,GAAG,CAAC,MAAM,CAAC,8BAAa,CAAC,CAAC,GAAG,CAAC,+BAAc,CAAC,CAAC,IAAI,EAAE,CAAC;YAC3D,MAAM,GAAG,CAAC,KAAK,EAAE,CAAC;SACrB;QAAC,OAAO,KAAK,EAAE;YACZ,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YAC5B,MAAM,GAAG,CAAC,KAAK,EAAE,CAAC;YAClB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;SACnB;IACL,CAAC;CAAA;AACD,SAAS,EAAE,CAAC"}
|
@@ -48,6 +48,7 @@ import { ScheduledEventEntity } from '../system/entities/scheduled.event.entity'
|
|
48
48
|
import { SecondaryAxisEntity } from '../system/entities/secondary.axis.entity';
|
49
49
|
import { SecurityRuleEntity } from '../system/entities/security.rule.entity';
|
50
50
|
import { ServiceEntity } from '../system/entities/service.entity';
|
51
|
+
import { SmsMessageEntity } from '../system/entities/sms.message.entity';
|
51
52
|
import { SmsTemplateEntity } from '../system/entities/sms.template.entity';
|
52
53
|
import { SystemScriptEntity } from '../system/entities/system.script.entity';
|
53
54
|
import { UiActionEntity } from '../system/entities/ui.action.entity';
|
@@ -109,6 +110,7 @@ declare const entityConstants: {
|
|
109
110
|
'5a9e26a3e98768593496d8198341948c': typeof SecondaryAxisEntity;
|
110
111
|
b8c2814298e294ec2d41bbd40bbcc330: typeof SecurityRuleEntity;
|
111
112
|
'25633ebb606c540e4eb3116e0e678124': typeof ServiceEntity;
|
113
|
+
b650e96c02597c6f27cfd609d8c45e4b: typeof SmsMessageEntity;
|
112
114
|
'9704922deb943eddfebea392a8812ec0': typeof SmsTemplateEntity;
|
113
115
|
'56a812ad91ffc7e72614b42054443d62': typeof SystemScriptEntity;
|
114
116
|
'3bd405d419269ee68da40bea43bde43d': typeof UiActionEntity;
|
@@ -49,6 +49,7 @@ const scheduled_event_entity_1 = require("../system/entities/scheduled.event.ent
|
|
49
49
|
const secondary_axis_entity_1 = require("../system/entities/secondary.axis.entity");
|
50
50
|
const security_rule_entity_1 = require("../system/entities/security.rule.entity");
|
51
51
|
const service_entity_1 = require("../system/entities/service.entity");
|
52
|
+
const sms_message_entity_1 = require("../system/entities/sms.message.entity");
|
52
53
|
const sms_template_entity_1 = require("../system/entities/sms.template.entity");
|
53
54
|
const system_script_entity_1 = require("../system/entities/system.script.entity");
|
54
55
|
const ui_action_entity_1 = require("../system/entities/ui.action.entity");
|
@@ -110,6 +111,7 @@ const entityConstants = {
|
|
110
111
|
'5a9e26a3e98768593496d8198341948c': secondary_axis_entity_1.SecondaryAxisEntity,
|
111
112
|
b8c2814298e294ec2d41bbd40bbcc330: security_rule_entity_1.SecurityRuleEntity,
|
112
113
|
'25633ebb606c540e4eb3116e0e678124': service_entity_1.ServiceEntity,
|
114
|
+
b650e96c02597c6f27cfd609d8c45e4b: sms_message_entity_1.SmsMessageEntity,
|
113
115
|
'9704922deb943eddfebea392a8812ec0': sms_template_entity_1.SmsTemplateEntity,
|
114
116
|
'56a812ad91ffc7e72614b42054443d62': system_script_entity_1.SystemScriptEntity,
|
115
117
|
'3bd405d419269ee68da40bea43bde43d': ui_action_entity_1.UiActionEntity,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"entity.constants.js","sourceRoot":"","sources":["../../src/config/entity.constants.ts"],"names":[],"mappings":";AAAA,oEAAgE;AAChE,oEAAgE;AAChE,8EAAyE;AACzE,gFAA2E;AAC3E,8DAA0D;AAC1D,gFAA2E;AAC3E,8EAA0E;AAC1E,kEAA8D;AAC9D,wFAAmF;AACnF,4EAAuE;AACvE,kFAA6E;AAC7E,4FAAsF;AACtF,kEAA8D;AAC9D,kFAA6E;AAC7E,0FAAqF;AACrF,oEAAgE;AAChE,sEAAkE;AAClE,wEAAoE;AACpE,gFAA2E;AAC3E,8EAAyE;AACzE,8EAAyE;AACzE,gEAA4D;AAC5D,sFAAiF;AACjF,sFAAiF;AACjF,8EAAyE;AACzE,gFAA2E;AAC3E,wEAAmE;AACnE,gEAA4D;AAC5D,0EAAqE;AACrE,gFAA2E;AAC3E,kEAA8D;AAC9D,4FAAuF;AACvF,4EAAuE;AACvE,oEAAgE;AAChE,8EAAyE;AACzE,kFAA6E;AAC7E,sFAAiF;AACjF,8EAAyE;AACzE,gFAA2E;AAC3E,wEAAoE;AACpE,gFAA4E;AAC5E,kFAA6E;AAC7E,oEAAgE;AAChE,gFAA2E;AAC3E,8FAAyF;AACzF,8EAAyE;AACzE,sFAAiF;AACjF,oFAA+E;AAC/E,kFAA6E;AAC7E,sEAAkE;AAClE,gFAA2E;AAC3E,kFAA6E;AAC7E,0EAAqE;AACrE,gGAA0F;AAC1F,oFAA8E;AAC9E,4EAAuE;AACvE,0FAAoF;AACpF,kGAA4F;AAC5F,sFAAgF;AAChF,sFAAiF;AAEjF,MAAM,eAAe,GAAG;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AC9C,kCAAkC,EAAE,uCAAiB;IACrD,kCAAkC,EAAE,qDAAwB;IAC5D,gCAAgC,EAAE,qCAAgB;IAClD,gCAAgC,EAAE,6CAAoB;IACtD,kCAAkC,EAAE,2CAAmB;IACvD,gCAAgC,EAAE,yCAAkB;IACpD,kCAAkC,EAAE,8BAAa;IACjD,kCAAkC,EAAE,uCAAiB;IACrD,kCAAkC,EAAE,yCAAkB;IACtD,kCAAkC,EAAE,iCAAc;IAClD,kCAAkC,EAAE,sDAAwB;IAC5D,kCAAkC,EAAE,0CAAkB;IACtD,kCAAkC,EAAE,mCAAe;IACnD,kCAAkC,EAAE,gDAAqB;IACzD,kCAAkC,EAAE,wDAAyB;IAC7D,kCAAkC,EAAE,4CAAmB;IACvD,gCAAgC,EAAE,6CAAoB;CACzD,CAAC;AAEF,iBAAS,eAAe,CAAC"}
|
1
|
+
{"version":3,"file":"entity.constants.js","sourceRoot":"","sources":["../../src/config/entity.constants.ts"],"names":[],"mappings":";AAAA,oEAAgE;AAChE,oEAAgE;AAChE,8EAAyE;AACzE,gFAA2E;AAC3E,8DAA0D;AAC1D,gFAA2E;AAC3E,8EAA0E;AAC1E,kEAA8D;AAC9D,wFAAmF;AACnF,4EAAuE;AACvE,kFAA6E;AAC7E,4FAAsF;AACtF,kEAA8D;AAC9D,kFAA6E;AAC7E,0FAAqF;AACrF,oEAAgE;AAChE,sEAAkE;AAClE,wEAAoE;AACpE,gFAA2E;AAC3E,8EAAyE;AACzE,8EAAyE;AACzE,gEAA4D;AAC5D,sFAAiF;AACjF,sFAAiF;AACjF,8EAAyE;AACzE,gFAA2E;AAC3E,wEAAmE;AACnE,gEAA4D;AAC5D,0EAAqE;AACrE,gFAA2E;AAC3E,kEAA8D;AAC9D,4FAAuF;AACvF,4EAAuE;AACvE,oEAAgE;AAChE,8EAAyE;AACzE,kFAA6E;AAC7E,sFAAiF;AACjF,8EAAyE;AACzE,gFAA2E;AAC3E,wEAAoE;AACpE,gFAA4E;AAC5E,kFA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;IACzD,kCAAkC,EAAE,mCAAe;IACnD,kCAAkC,EAAE,4BAAY;IAChD,kCAAkC,EAAE,qCAAgB;IACpD,gCAAgC,EAAE,yCAAkB;IACpD,kCAAkC,EAAE,6CAAoB;IACxD,gCAAgC,EAAE,qCAAgB;IAClD,kCAAkC,EAAE,uCAAiB;IACrD,kCAAkC,EAAE,gCAAc;IAClD,gCAAgC,EAAE,wCAAkB;IACpD,kCAAkC,EAAE,yCAAkB;IACtD,gCAAgC,EAAE,4BAAY;IAC9C,kCAAkC,EAAE,uCAAiB;IACrD,kCAAkC,EAAE,qDAAwB;IAC5D,gCAAgC,EAAE,qCAAgB;IAClD,gCAAgC,EAAE,6CAAoB;IACtD,kCAAkC,EAAE,2CAAmB;IACvD,gCAAgC,EAAE,yCAAkB;IACpD,kCAAkC,EAAE,8BAAa;IACjD,gCAAgC,EAAE,qCAAgB;IAClD,kCAAkC,EAAE,uCAAiB;IACrD,kCAAkC,EAAE,yCAAkB;IACtD,kCAAkC,EAAE,iCAAc;IAClD,kCAAkC,EAAE,sDAAwB;IAC5D,kCAAkC,EAAE,0CAAkB;IACtD,kCAAkC,EAAE,mCAAe;IACnD,kCAAkC,EAAE,gDAAqB;IACzD,kCAAkC,EAAE,wDAAyB;IAC7D,kCAAkC,EAAE,4CAAmB;IACvD,gCAAgC,EAAE,6CAAoB;CACzD,CAAC;AAEF,iBAAS,eAAe,CAAC"}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.CreateSmsMessageTable1643899218270 = void 0;
|
4
|
+
const migration_utility_1 = require("./../common/libraries/migration.utility");
|
5
|
+
class CreateSmsMessageTable1643899218270 extends migration_utility_1.MigrationUtility {
|
6
|
+
constructor() {
|
7
|
+
super('sys_sms_messages');
|
8
|
+
this.process();
|
9
|
+
}
|
10
|
+
process() {
|
11
|
+
this.primary();
|
12
|
+
this.source();
|
13
|
+
this.number('dialing_code');
|
14
|
+
this.number('mobile', { width: 20 });
|
15
|
+
this.string('content', { length: '1024' });
|
16
|
+
this.foreign({ name: 'template_id', foreignTable: 'sys_sms_templates' });
|
17
|
+
this.foreign({ name: 'gateway_id', foreignTable: 'sys_lookup_values' });
|
18
|
+
this.dateTime('delivered_on');
|
19
|
+
this.json('attributes');
|
20
|
+
this.whoColumns();
|
21
|
+
}
|
22
|
+
}
|
23
|
+
exports.CreateSmsMessageTable1643899218270 = CreateSmsMessageTable1643899218270;
|
24
|
+
//# sourceMappingURL=1643899218270-CreateSmsMessageTable.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"1643899218270-CreateSmsMessageTable.js","sourceRoot":"","sources":["../../src/migrations/1643899218270-CreateSmsMessageTable.ts"],"names":[],"mappings":";;;AAAA,+EAA2E;AAE3E,MAAa,kCAAmC,SAAQ,oCAAgB;IACpE;QACI,KAAK,CAAC,kBAAkB,CAAC,CAAC;QAC1B,IAAI,CAAC,OAAO,EAAE,CAAC;IACnB,CAAC;IAED,OAAO;QACH,IAAI,CAAC,OAAO,EAAE,CAAC;QAEf,IAAI,CAAC,MAAM,EAAE,CAAC;QACd,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;QAC5B,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;QAErC,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;QAE3C,IAAI,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,YAAY,EAAE,mBAAmB,EAAE,CAAC,CAAC;QACzE,IAAI,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,YAAY,EAAE,mBAAmB,EAAE,CAAC,CAAC;QAExE,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;QAC9B,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAExB,IAAI,CAAC,UAAU,EAAE,CAAC;IACtB,CAAC;CACJ;AAvBD,gFAuBC"}
|
@@ -1,15 +1,14 @@
|
|
1
|
-
import { ConsoleService } from 'nestjs-console';
|
2
1
|
import { QueueService } from '../../platformUtility/services/queue.service';
|
3
2
|
import { SqlService } from './../services/sql.service';
|
4
3
|
export declare class EntityGeneratorCommand {
|
5
4
|
private readonly queueService;
|
6
|
-
private readonly consoleService;
|
7
5
|
private readonly sqlService;
|
6
|
+
private logger;
|
8
7
|
private modules;
|
9
8
|
private lastInput;
|
10
9
|
private columnMapping;
|
11
|
-
constructor(queueService: QueueService,
|
12
|
-
|
10
|
+
constructor(queueService: QueueService, sqlService: SqlService);
|
11
|
+
process(): Promise<void>;
|
13
12
|
createFile(tableName: string): Promise<number>;
|
14
13
|
createEntityFile(moduleName: string, fileName: string, className: string, tableName: string): Promise<void>;
|
15
14
|
getModuleOfTable(tableName: string): any;
|
@@ -21,7 +21,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
21
|
exports.EntityGeneratorCommand = void 0;
|
22
22
|
const common_1 = require("@nestjs/common");
|
23
23
|
const fs = require("fs");
|
24
|
-
const
|
24
|
+
const nestjs_command_1 = require("nestjs-command");
|
25
25
|
const platform_constants_1 = require("../../config/platform.constants");
|
26
26
|
const queue_service_1 = require("../../platformUtility/services/queue.service");
|
27
27
|
const file_system_utility_1 = require("../libraries/file.system.utility");
|
@@ -32,10 +32,10 @@ const model_entity_1 = require("./../../system/entities/model.entity");
|
|
32
32
|
const sql_service_1 = require("./../services/sql.service");
|
33
33
|
const prompt = require('prompt-sync')();
|
34
34
|
let EntityGeneratorCommand = class EntityGeneratorCommand {
|
35
|
-
constructor(queueService,
|
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('EventQueue');
|
39
39
|
this.modules = [];
|
40
40
|
this.columnMapping = {
|
41
41
|
1: 'string',
|
@@ -44,22 +44,19 @@ let EntityGeneratorCommand = class EntityGeneratorCommand {
|
|
44
44
|
4: 'date',
|
45
45
|
5: 'boolean',
|
46
46
|
};
|
47
|
-
|
47
|
+
}
|
48
|
+
process() {
|
49
|
+
return __awaiter(this, void 0, void 0, function* () {
|
48
50
|
yield this.queueService.pause();
|
49
|
-
|
50
|
-
yield new db_scanner_command_1.DbScannerCommand(this.queueService, this.
|
51
|
+
this.logger.log(`Checking for all db columns and files that is to be synced for entity`);
|
52
|
+
yield new db_scanner_command_1.DbScannerCommand(this.queueService, this.sqlService).process();
|
51
53
|
const tables = yield this.getEligibleTables();
|
52
|
-
|
54
|
+
this.logger.log(`Total no of tables to sync up for entity : ${tables.length}`);
|
53
55
|
yield this.getAllModules();
|
54
56
|
for (const tableName of tables) {
|
55
57
|
yield this.createFile(tableName);
|
56
58
|
}
|
57
59
|
});
|
58
|
-
const cli = this.consoleService.getCli();
|
59
|
-
this.consoleService.createCommand({
|
60
|
-
command: 'sync:entity',
|
61
|
-
description: 'sync all entities and their definitions defined within the system',
|
62
|
-
}, this.syncEntity, cli);
|
63
60
|
}
|
64
61
|
createFile(tableName) {
|
65
62
|
return __awaiter(this, void 0, void 0, function* () {
|
@@ -70,14 +67,14 @@ let EntityGeneratorCommand = class EntityGeneratorCommand {
|
|
70
67
|
return;
|
71
68
|
const fileName = this.getEntityNameConfirmation(tableName);
|
72
69
|
const className = this.getEntityClassName(fileName);
|
73
|
-
|
70
|
+
this.logger.warn(`TableName : ${tableName} | Module : ${this.modules[moduleIndex]} | file: ${fileName}.entity.ts | EntityName: ${className}Entity`);
|
74
71
|
const input = prompt('To confirm the above, press y or any other to redo : ', 'n');
|
75
72
|
if (input === 'e')
|
76
73
|
this.terminate();
|
77
74
|
if (input === 'y') {
|
78
75
|
this.lastInput = moduleIndex;
|
79
76
|
yield this.createEntityFile(this.modules[moduleIndex], fileName, className, tableName);
|
80
|
-
|
77
|
+
this.logger.log('-----------------------------------------------------------------');
|
81
78
|
return moduleIndex;
|
82
79
|
}
|
83
80
|
}
|
@@ -108,7 +105,7 @@ let EntityGeneratorCommand = class EntityGeneratorCommand {
|
|
108
105
|
fs.mkdirSync(entityDirectory);
|
109
106
|
const file = `${entityDirectory}/${fileName}.entity.ts`;
|
110
107
|
fs.writeFileSync(file, data);
|
111
|
-
|
108
|
+
this.logger.log(`created file : ${file}`);
|
112
109
|
});
|
113
110
|
}
|
114
111
|
getModuleOfTable(tableName) {
|
@@ -183,8 +180,8 @@ let EntityGeneratorCommand = class EntityGeneratorCommand {
|
|
183
180
|
for (const [key, value] of Object.entries(this.modules)) {
|
184
181
|
text = `${text} ${key}:${value} `;
|
185
182
|
}
|
186
|
-
|
187
|
-
|
183
|
+
this.logger.log('Type e to exit, n to skip this table or type the number to match the module');
|
184
|
+
this.logger.log('modules: ', text);
|
188
185
|
});
|
189
186
|
}
|
190
187
|
getEntityClassName(fileName) {
|
@@ -214,11 +211,18 @@ let EntityGeneratorCommand = class EntityGeneratorCommand {
|
|
214
211
|
process.exit(1);
|
215
212
|
}
|
216
213
|
};
|
214
|
+
__decorate([
|
215
|
+
(0, nestjs_command_1.Command)({
|
216
|
+
command: 'sync:entity',
|
217
|
+
describe: 'sync all entities and their definitions defined within the system',
|
218
|
+
}),
|
219
|
+
__metadata("design:type", Function),
|
220
|
+
__metadata("design:paramtypes", []),
|
221
|
+
__metadata("design:returntype", Promise)
|
222
|
+
], EntityGeneratorCommand.prototype, "process", null);
|
217
223
|
EntityGeneratorCommand = __decorate([
|
218
224
|
(0, common_1.Injectable)(),
|
219
|
-
__metadata("design:paramtypes", [queue_service_1.QueueService,
|
220
|
-
nestjs_console_1.ConsoleService,
|
221
|
-
sql_service_1.SqlService])
|
225
|
+
__metadata("design:paramtypes", [queue_service_1.QueueService, sql_service_1.SqlService])
|
222
226
|
], EntityGeneratorCommand);
|
223
227
|
exports.EntityGeneratorCommand = EntityGeneratorCommand;
|
224
228
|
//# sourceMappingURL=entity.generator.command.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"entity.generator.command.js","sourceRoot":"","sources":["../../../src/platformUtility/commands/entity.generator.command.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,
|
1
|
+
{"version":3,"file":"entity.generator.command.js","sourceRoot":"","sources":["../../../src/platformUtility/commands/entity.generator.command.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,2CAAoD;AACpD,yBAAyB;AACzB,mDAAyC;AACzC,wEAAgE;AAChE,gFAA4E;AAC5E,0EAAqE;AACrE,uFAAmF;AACnF,gFAA4E;AAC5E,mFAA8E;AAC9E,uEAAmE;AACnE,2DAAuD;AAGvD,MAAM,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,EAAE,CAAC;AASxC,IAAa,sBAAsB,GAAnC,MAAa,sBAAsB;IA0C/B,YAA6B,YAA0B,EAAmB,UAAsB;QAAnE,iBAAY,GAAZ,YAAY,CAAc;QAAmB,eAAU,GAAV,UAAU,CAAY;QAnCxF,WAAM,GAAW,IAAI,eAAM,CAAC,YAAY,CAAC,CAAC;QAO1C,YAAO,GAAG,EAAE,CAAC;QAeb,kBAAa,GAAG;YACpB,CAAC,EAAE,QAAQ;YACX,CAAC,EAAE,QAAQ;YACX,CAAC,EAAE,MAAM;YACT,CAAC,EAAE,MAAM;YACT,CAAC,EAAE,SAAS;SACf,CAAC;IAOiG,CAAC;IAU9F,OAAO;;YACT,MAAM,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,CAAC;YAEhC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,uEAAuE,CAAC,CAAC;YACzF,MAAM,IAAI,qCAAgB,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,OAAO,EAAE,CAAC;YAGzE,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,iBAAiB,EAAE,CAAC;YAC9C,IAAI,CAAC,MAAM,CAAC,GA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gBAAE,MAAM,IAAI,wCAAkB,CAAC,4CAA4C,SAAS,EAAE,CAAC,CAAC;YAElG,IAAI,IAAI,GAAG,EAAE,CAAC;YAGd,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;gBAC7B,IAAI,4BAAiB,CAAC,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;oBAAE,OAAO;gBAErE,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,KAAK,CAAC;gBAEzD,IAAI,GAAG,GAAG,IAAI,cAAc,MAAM,CAAC,IAAI,MAAM,IAAI,GAAG,CAAC;YACzD,CAAC,CAAC,CAAC;YAEH,OAAO,IAAI,CAAC;QAChB,CAAC;KAAA;IAMD,SAAS;QACL,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC;CACJ,CAAA;AA5RG;IARC,IAAA,wBAAO,EAAC;QACL,OAAO,EAAE,aAAa;QACtB,QAAQ,EAAE,mEAAmE;KAChF,CAAC;;;;qDAsBD;AArEQ,sBAAsB;IADlC,IAAA,mBAAU,GAAE;qCA2CkC,4BAAY,EAA+B,wBAAU;GA1CvF,sBAAsB,CAgVlC;AAhVY,wDAAsB"}
|
@@ -45,16 +45,20 @@ let MaintenanceCommand = class MaintenanceCommand {
|
|
45
45
|
status() {
|
46
46
|
return __awaiter(this, void 0, void 0, function* () {
|
47
47
|
const status = this.maintenanceService.isInMaintenance();
|
48
|
-
if (status)
|
48
|
+
if (!status)
|
49
49
|
global.console.log('system is live and running');
|
50
50
|
else
|
51
51
|
global.console.log('system is down');
|
52
52
|
});
|
53
53
|
}
|
54
|
-
|
54
|
+
restartQueue() {
|
55
55
|
return __awaiter(this, void 0, void 0, function* () {
|
56
56
|
yield this.queueService.restartQueueProcessing();
|
57
|
-
|
57
|
+
});
|
58
|
+
}
|
59
|
+
restartNode() {
|
60
|
+
return __awaiter(this, void 0, void 0, function* () {
|
61
|
+
this.maintenanceService.putOnRestart();
|
58
62
|
});
|
59
63
|
}
|
60
64
|
};
|
@@ -93,7 +97,16 @@ __decorate([
|
|
93
97
|
__metadata("design:type", Function),
|
94
98
|
__metadata("design:paramtypes", []),
|
95
99
|
__metadata("design:returntype", Promise)
|
96
|
-
], MaintenanceCommand.prototype, "
|
100
|
+
], MaintenanceCommand.prototype, "restartQueue", null);
|
101
|
+
__decorate([
|
102
|
+
(0, nestjs_console_1.Command)({
|
103
|
+
command: 'node:restart',
|
104
|
+
description: 'restart the node',
|
105
|
+
}),
|
106
|
+
__metadata("design:type", Function),
|
107
|
+
__metadata("design:paramtypes", []),
|
108
|
+
__metadata("design:returntype", Promise)
|
109
|
+
], MaintenanceCommand.prototype, "restartNode", null);
|
97
110
|
MaintenanceCommand = __decorate([
|
98
111
|
(0, common_1.Injectable)(),
|
99
112
|
(0, nestjs_console_1.Console)(),
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"maintenance.command.js","sourceRoot":"","sources":["../../../src/platformUtility/commands/maintenance.command.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,mDAAkD;AAClD,yEAAqE;AACrE,mEAA+D;AAC/D,6DAAyD;AASzD,IAAa,kBAAkB,GAA/B,MAAa,kBAAkB;IAM3B,YACqB,kBAAsC,EACtC,eAAgC,EAChC,YAA0B;QAF1B,uBAAkB,GAAlB,kBAAkB,CAAoB;QACtC,oBAAe,GAAf,eAAe,CAAiB;QAChC,iBAAY,GAAZ,YAAY,CAAc;IAC5C,CAAC;IAWE,EAAE;;YACJ,IAAI,CAAC,kBAAkB,CAAC,qBAAqB,EAAE,CAAC;YAChD,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;QAC3C,CAAC;KAAA;IAWK,IAAI;;YACN,IAAI,CAAC,kBAAkB,CAAC,gBAAgB,EAAE,CAAC;YAC3C,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,mCAAmC,CAAC,CAAC;QAC5D,CAAC;KAAA;IAWK,MAAM;;YACR,MAAM,MAAM,GAAG,IAAI,CAAC,kBAAkB,CAAC,eAAe,EAAE,CAAC;YACzD,IAAI,MAAM;gBAAE,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;;
|
1
|
+
{"version":3,"file":"maintenance.command.js","sourceRoot":"","sources":["../../../src/platformUtility/commands/maintenance.command.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,mDAAkD;AAClD,yEAAqE;AACrE,mEAA+D;AAC/D,6DAAyD;AASzD,IAAa,kBAAkB,GAA/B,MAAa,kBAAkB;IAM3B,YACqB,kBAAsC,EACtC,eAAgC,EAChC,YAA0B;QAF1B,uBAAkB,GAAlB,kBAAkB,CAAoB;QACtC,oBAAe,GAAf,eAAe,CAAiB;QAChC,iBAAY,GAAZ,YAAY,CAAc;IAC5C,CAAC;IAWE,EAAE;;YACJ,IAAI,CAAC,kBAAkB,CAAC,qBAAqB,EAAE,CAAC;YAChD,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;QAC3C,CAAC;KAAA;IAWK,IAAI;;YACN,IAAI,CAAC,kBAAkB,CAAC,gBAAgB,EAAE,CAAC;YAC3C,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,mCAAmC,CAAC,CAAC;QAC5D,CAAC;KAAA;IAWK,MAAM;;YACR,MAAM,MAAM,GAAG,IAAI,CAAC,kBAAkB,CAAC,eAAe,EAAE,CAAC;YACzD,IAAI,CAAC,MAAM;gBAAE,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;;gBACzD,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;QAC9C,CAAC;KAAA;IAWK,YAAY;;YACd,MAAM,IAAI,CAAC,YAAY,CAAC,sBAAsB,EAAE,CAAC;QACrD,CAAC;KAAA;IAWK,WAAW;;YACb,IAAI,CAAC,kBAAkB,CAAC,YAAY,EAAE,CAAC;QAC3C,CAAC;KAAA;CACJ,CAAA;AA3DG;IAJC,IAAA,wBAAO,EAAC;QACL,OAAO,EAAE,IAAI;QACb,WAAW,EAAE,qBAAqB;KACrC,CAAC;;;;4CAID;AAWD;IAJC,IAAA,wBAAO,EAAC;QACL,OAAO,EAAE,MAAM;QACf,WAAW,EAAE,uBAAuB;KACvC,CAAC;;;;8CAID;AAWD;IAJC,IAAA,wBAAO,EAAC;QACL,OAAO,EAAE,QAAQ;QACjB,WAAW,EAAE,sBAAsB;KACtC,CAAC;;;;gDAKD;AAWD;IAJC,IAAA,wBAAO,EAAC;QACL,OAAO,EAAE,eAAe;QACxB,WAAW,EAAE,oBAAoB;KACpC,CAAC;;;;sDAGD;AAWD;IAJC,IAAA,wBAAO,EAAC;QACL,OAAO,EAAE,cAAc;QACvB,WAAW,EAAE,kBAAkB;KAClC,CAAC;;;;qDAGD;AA/EQ,kBAAkB;IAF9B,IAAA,mBAAU,GAAE;IACZ,IAAA,wBAAO,GAAE;qCAQmC,wCAAkB;QACrB,kCAAe;QAClB,4BAAY;GATtC,kBAAkB,CAgF9B;AAhFY,gDAAkB"}
|
@@ -1,10 +1,14 @@
|
|
1
|
+
import { MaintenanceService } from './../services/maintenance.service';
|
1
2
|
import { QueueService } from '../../platformUtility/services/queue.service';
|
2
3
|
export declare class SqsWorkerCommand {
|
3
4
|
private readonly queueService;
|
5
|
+
private readonly maintenanceService;
|
4
6
|
private counter;
|
5
7
|
private start_time;
|
6
|
-
|
7
|
-
|
8
|
+
private sTime;
|
9
|
+
private logger;
|
10
|
+
constructor(queueService: QueueService, maintenanceService: MaintenanceService);
|
11
|
+
process(): Promise<void>;
|
8
12
|
private processMessage;
|
9
13
|
private dropMessage;
|
10
14
|
private fetchMessages;
|
@@ -19,6 +19,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
19
19
|
};
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
21
21
|
exports.SqsWorkerCommand = void 0;
|
22
|
+
const maintenance_service_1 = require("./../services/maintenance.service");
|
22
23
|
const common_1 = require("@nestjs/common");
|
23
24
|
const config = require("config");
|
24
25
|
const nestjs_command_1 = require("nestjs-command");
|
@@ -27,16 +28,18 @@ const queue_service_1 = require("../../platformUtility/services/queue.service");
|
|
27
28
|
const date_util_1 = require("./../../common/libraries/date.util");
|
28
29
|
const sqsQueue = config.get('sqs.fifo');
|
29
30
|
let SqsWorkerCommand = class SqsWorkerCommand {
|
30
|
-
constructor(queueService) {
|
31
|
+
constructor(queueService, maintenanceService) {
|
31
32
|
this.queueService = queueService;
|
33
|
+
this.maintenanceService = maintenanceService;
|
32
34
|
this.counter = 0;
|
33
35
|
this.start_time = date_util_1.DateUtil.getDateTimeInFormat();
|
36
|
+
this.sTime = date_util_1.DateUtil.now();
|
37
|
+
this.logger = new common_1.Logger('SqsWorker');
|
34
38
|
}
|
35
|
-
|
39
|
+
process() {
|
36
40
|
return __awaiter(this, void 0, void 0, function* () {
|
37
|
-
|
41
|
+
yield this.queueService.pause();
|
38
42
|
while (true) {
|
39
|
-
yield this.queueService.pause();
|
40
43
|
yield this.checkForSystem();
|
41
44
|
let record;
|
42
45
|
try {
|
@@ -50,7 +53,7 @@ let SqsWorkerCommand = class SqsWorkerCommand {
|
|
50
53
|
if ((record === null || record === void 0 ? void 0 : record.Messages) && Array.isArray(record.Messages)) {
|
51
54
|
yield this.processMessages(record.Messages);
|
52
55
|
}
|
53
|
-
|
56
|
+
this.logger.log(`[sqs.fifo] [events] [${this.start_time}] events-processed : ${this.counter} ${((Date.now() - this.sTime) / 1000).toFixed(0)}s`);
|
54
57
|
}
|
55
58
|
});
|
56
59
|
}
|
@@ -58,17 +61,17 @@ let SqsWorkerCommand = class SqsWorkerCommand {
|
|
58
61
|
return __awaiter(this, void 0, void 0, function* () {
|
59
62
|
++this.counter;
|
60
63
|
const data = JSON.parse(message.Body);
|
61
|
-
|
64
|
+
this.logger.log(`[sqs.fifo][ Processing] ${message.MessageId} : ${data.name} `);
|
62
65
|
const startTime = date_util_1.DateUtil.now();
|
63
66
|
try {
|
64
67
|
yield platform_constants_1.default.jobs[data.job].handle(data.payload);
|
65
68
|
const timeTaken = date_util_1.DateUtil.now() - startTime;
|
66
|
-
|
69
|
+
this.logger.log(`[sqs.fifo][ Processed] ${message.MessageId} : ${data.name} ${timeTaken} ms`);
|
67
70
|
}
|
68
71
|
catch (error) {
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
+
this.logger.log(`[sqs.fifo][ failure] ${message.MessageId} : ${data.name} `);
|
73
|
+
this.logger.log('failed-job', data);
|
74
|
+
this.logger.log('error', error);
|
72
75
|
}
|
73
76
|
finally {
|
74
77
|
this.dropMessage(message.ReceiptHandle);
|
@@ -94,7 +97,7 @@ let SqsWorkerCommand = class SqsWorkerCommand {
|
|
94
97
|
checkForSystem() {
|
95
98
|
return __awaiter(this, void 0, void 0, function* () {
|
96
99
|
yield this.queueService.checkForMaintenance();
|
97
|
-
if (
|
100
|
+
if (this.maintenanceService.nodeNeedsRestart()) {
|
98
101
|
process.exit(0);
|
99
102
|
}
|
100
103
|
});
|
@@ -103,15 +106,15 @@ let SqsWorkerCommand = class SqsWorkerCommand {
|
|
103
106
|
__decorate([
|
104
107
|
(0, nestjs_command_1.Command)({
|
105
108
|
command: 'queue:sqs',
|
106
|
-
describe: '
|
109
|
+
describe: 'run worker through sqs',
|
107
110
|
}),
|
108
111
|
__metadata("design:type", Function),
|
109
112
|
__metadata("design:paramtypes", []),
|
110
113
|
__metadata("design:returntype", Promise)
|
111
|
-
], SqsWorkerCommand.prototype, "
|
114
|
+
], SqsWorkerCommand.prototype, "process", null);
|
112
115
|
SqsWorkerCommand = __decorate([
|
113
116
|
(0, common_1.Injectable)(),
|
114
|
-
__metadata("design:paramtypes", [queue_service_1.QueueService])
|
117
|
+
__metadata("design:paramtypes", [queue_service_1.QueueService, maintenance_service_1.MaintenanceService])
|
115
118
|
], SqsWorkerCommand);
|
116
119
|
exports.SqsWorkerCommand = SqsWorkerCommand;
|
117
120
|
//# sourceMappingURL=sqs.worker.command.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"sqs.worker.command.js","sourceRoot":"","sources":["../../../src/platformUtility/commands/sqs.worker.command.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,
|
1
|
+
{"version":3,"file":"sqs.worker.command.js","sourceRoot":"","sources":["../../../src/platformUtility/commands/sqs.worker.command.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,2EAAuE;AACvE,2CAAoD;AACpD,iCAAiC;AACjC,mDAAyC;AACzC,wEAAgE;AAChE,gFAA4E;AAC5E,kEAA8D;AAE9D,MAAM,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;AAQxC,IAAa,gBAAgB,GAA7B,MAAa,gBAAgB;IAkBzB,YAA6B,YAA0B,EAAmB,kBAAsC;QAAnF,iBAAY,GAAZ,YAAY,CAAc;QAAmB,uBAAkB,GAAlB,kBAAkB,CAAoB;QAjBxG,YAAO,GAAG,CAAC,CAAC;QACZ,eAAU,GAAG,oBAAQ,CAAC,mBAAmB,EAAE,CAAC;QAC5C,UAAK,GAAG,oBAAQ,CAAC,GAAG,EAAE,CAAC;QAQvB,WAAM,GAAW,IAAI,eAAM,CAAC,WAAW,CAAC,CAAC;IAOkE,CAAC;IAM9G,OAAO;;YACT,MAAM,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,CAAC;YAChC,OAAO,IAAI,EAAE;gBACT,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;gBAE5B,IAAI,MAAM,CAAC;gBAEX,IAAI;oBACA,MAAM,GAAG,MAAM,IAAI,CAAC,aAAa,EAAE,CAAC;iBACvC;gBAAC,OAAO,KAAK,EAAE;oBACZ,MAAM,CAAC,OA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B;GAlBvG,gBAAgB,CAqH5B;AArHY,4CAAgB"}
|
@@ -1,8 +1,6 @@
|
|
1
|
-
import { ConsoleService } from 'nestjs-console';
|
2
1
|
import { QueueService } from '../../platformUtility/services/queue.service';
|
3
2
|
export declare class SyncClassCommand {
|
4
3
|
private readonly queueService;
|
5
|
-
|
6
|
-
|
7
|
-
syncClass: () => Promise<void>;
|
4
|
+
constructor(queueService: QueueService);
|
5
|
+
process(): Promise<void>;
|
8
6
|
}
|
@@ -19,20 +19,21 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
19
19
|
};
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
21
21
|
exports.SyncClassCommand = void 0;
|
22
|
-
const file_system_utility_1 = require("./../libraries/file.system.utility");
|
23
|
-
const create_index_file_1 = require("./../libraries/create.index.file");
|
24
22
|
const common_1 = require("@nestjs/common");
|
25
|
-
const
|
23
|
+
const nestjs_command_1 = require("nestjs-command");
|
26
24
|
const queue_service_1 = require("../../platformUtility/services/queue.service");
|
27
25
|
const libraries_1 = require("../libraries");
|
28
26
|
const create_es6_jobs_file_1 = require("../libraries/create.es6.jobs.file");
|
29
27
|
const create_entity_constants_file_1 = require("./../libraries/create.entity.constants.file");
|
30
28
|
const create_es6_service_file_1 = require("./../libraries/create.es6.service.file");
|
29
|
+
const create_index_file_1 = require("./../libraries/create.index.file");
|
30
|
+
const file_system_utility_1 = require("./../libraries/file.system.utility");
|
31
31
|
let SyncClassCommand = class SyncClassCommand {
|
32
|
-
constructor(queueService
|
32
|
+
constructor(queueService) {
|
33
33
|
this.queueService = queueService;
|
34
|
-
|
35
|
-
|
34
|
+
}
|
35
|
+
process() {
|
36
|
+
return __awaiter(this, void 0, void 0, function* () {
|
36
37
|
yield this.queueService.pause();
|
37
38
|
global.console.log('processing all jobs file');
|
38
39
|
new create_es6_jobs_file_1.CreateEs6JobsFile().process();
|
@@ -47,16 +48,20 @@ let SyncClassCommand = class SyncClassCommand {
|
|
47
48
|
new create_index_file_1.CreateIndexFile().process();
|
48
49
|
}
|
49
50
|
});
|
50
|
-
const cli = this.consoleService.getCli();
|
51
|
-
this.consoleService.createCommand({
|
52
|
-
command: 'sync:class',
|
53
|
-
description: 'sync all entities and their definitions defined within the system',
|
54
|
-
}, this.syncClass, cli);
|
55
51
|
}
|
56
52
|
};
|
53
|
+
__decorate([
|
54
|
+
(0, nestjs_command_1.Command)({
|
55
|
+
command: 'sync:class',
|
56
|
+
describe: 'sync all class from code to db',
|
57
|
+
}),
|
58
|
+
__metadata("design:type", Function),
|
59
|
+
__metadata("design:paramtypes", []),
|
60
|
+
__metadata("design:returntype", Promise)
|
61
|
+
], SyncClassCommand.prototype, "process", null);
|
57
62
|
SyncClassCommand = __decorate([
|
58
63
|
(0, common_1.Injectable)(),
|
59
|
-
__metadata("design:paramtypes", [queue_service_1.QueueService
|
64
|
+
__metadata("design:paramtypes", [queue_service_1.QueueService])
|
60
65
|
], SyncClassCommand);
|
61
66
|
exports.SyncClassCommand = SyncClassCommand;
|
62
67
|
//# sourceMappingURL=sync.class.command.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"sync.class.command.js","sourceRoot":"","sources":["../../../src/platformUtility/commands/sync.class.command.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,
|
1
|
+
{"version":3,"file":"sync.class.command.js","sourceRoot":"","sources":["../../../src/platformUtility/commands/sync.class.command.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,mDAAyC;AACzC,gFAA4E;AAC5E,4CAAoD;AACpD,4EAAsE;AACtE,8FAAwF;AACxF,oFAA8E;AAC9E,wEAAmE;AACnE,4EAAuE;AAQvE,IAAa,gBAAgB,GAA7B,MAAa,gBAAgB;IAMzB,YAA6B,YAA0B;QAA1B,iBAAY,GAAZ,YAAY,CAAc;IAAG,CAAC;IAMrD,OAAO;;YACT,MAAM,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,CAAC;YAEhC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC;YAC/C,IAAI,wCAAiB,EAAE,CAAC,OAAO,EAAE,CAAC;YAElC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC,CAAC;YACnD,IAAI,8CAAoB,EAAE,CAAC,OAAO,EAAE,CAAC;YAErC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;YACjD,IAAI,wDAAyB,EAAE,CAAC,OAAO,EAAE,CAAC;YAE1C,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAC;YAChD,IAAI,gCAAoB,EAAE,CAAC,OAAO,EAAE,CAAC;YAErC,IAAI,uCAAiB,CAAC,SAAS,EAAE,EAAE;gBAC/B,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;gBACjD,IAAI,mCAAe,EAAE,CAAC,OAAO,EAAE,CAAC;aACnC;QACL,CAAC;KAAA;CACJ,CAAA;AApBG;IAJC,IAAA,wBAAO,EAAC;QACL,OAAO,EAAE,YAAY;QACrB,QAAQ,EAAE,gCAAgC;KAC7C,CAAC;;;;+CAoBD;AA/BQ,gBAAgB;IAD5B,IAAA,mBAAU,GAAE;qCAOkC,4BAAY;GAN9C,gBAAgB,CAgC5B;AAhCY,4CAAgB"}
|
@@ -37,11 +37,11 @@ import { BaseSubscriber } from './subscribers/base.subscriber';
|
|
37
37
|
declare const es6Classes: {
|
38
38
|
commands: (typeof EntityGeneratorCommand | typeof MaintenanceCommand | typeof SqsWorkerCommand | typeof SyncClassCommand)[];
|
39
39
|
consumers: (typeof EventConsumer | typeof JobConsumer)[];
|
40
|
-
dtos: (typeof QueueOptionsDto | typeof
|
40
|
+
dtos: (typeof QueueOptionsDto | typeof FcmResponseDto | typeof PushNotificationResponseDto | typeof PushNotificationTemplateDto | typeof MailOptionsDto)[];
|
41
41
|
jobs: (typeof TestJob | typeof RecordWatcherJob)[];
|
42
|
-
libraries: (typeof FileSystemUtility | typeof
|
42
|
+
libraries: (typeof FileSystemUtility | typeof CreateEntityConstantsFile | typeof CreateEs6ClassesFile | typeof CreateEs6JobsFile | typeof CreateEs6ServiceFile | typeof CreateIndexFile)[];
|
43
43
|
middlewares: (typeof MaintenanceMiddleware)[];
|
44
|
-
services: (typeof CacheService | typeof LocalPropertyService | typeof MaintenanceService | typeof ShutdownService | typeof SqsService | typeof QueueService | typeof RemoteRequestService | typeof SqlService | typeof DynamoService | typeof
|
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)[];
|
45
45
|
subscribers: (typeof BaseSubscriber)[];
|
46
46
|
};
|
47
47
|
export default es6Classes;
|
@@ -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 }),
|
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,uCAA0C;AAC1C,2CAAqD;AACrD,iCAAiC;AACjC
|
1
|
+
{"version":3,"file":"platform.utility.module.js","sourceRoot":"","sources":["../../src/platformUtility/platform.utility.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,uCAA0C;AAC1C,2CAAqD;AACrD,iCAAiC;AACjC,+CAAuC;AACvC,sDAAuD;AAEvD,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,UAAU,IAAI,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;AAOhE,IAAa,qBAAqB,GAAlC,MAAa,qBAAqB;CAAG,CAAA;AAAxB,qBAAqB;IALjC,IAAA,eAAM,EAAC;QACJ,OAAO,EAAE,CAAC,iBAAU,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,oBAAW,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;QAChF,SAAS,EAAE,CAAC,GAAG,qBAAU,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"}
|
@@ -1,7 +1,10 @@
|
|
1
1
|
export declare class MaintenanceService {
|
2
|
-
private
|
2
|
+
private maintenancePath;
|
3
|
+
private restartPath;
|
3
4
|
isInMaintenance(): boolean;
|
4
5
|
putOnMaintenance(): void;
|
5
6
|
removeFromMaintenance(): void;
|
6
|
-
|
7
|
+
putOnRestart(): void;
|
8
|
+
nodeNeedsRestart(): boolean;
|
9
|
+
getMaintenancePath(): string;
|
7
10
|
}
|