@gus-eip/loggers 3.9.6 → 3.9.8

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/README.md CHANGED
@@ -1,82 +1,82 @@
1
- # @gus-eip/loggers
2
-
3
- ## Overview
4
-
5
- `@gus-eip/loggers` is a package designed to provide logging functionality for your Node.js applications. It offers integration with various logging services, including CloudWatchLogger.
6
-
7
- ## Installation
8
-
9
- You can install the package via npm:
10
-
11
- ```bash
12
- npm install @gus-eip/loggers
13
- ```
14
-
15
- ## Usage
16
-
17
- To use the logger module in your application, follow these steps:
18
-
19
- 1. Import `LoggerModule` from `@gus-eip/loggers` inside your module.
20
-
21
- ```javascript
22
- import { LoggerModule } from '@gus-eip/loggers';
23
- ```
24
-
25
- 2. Configure `LoggerModule` in your module by calling the `forRoot` method.
26
-
27
- ```javascript
28
- LoggerModule.forRoot({
29
- region: process.env.REGION,
30
- logGroupName: process.env.LOGGER_LOG_GROUP_NAME,
31
- options: 'CloudWatchLogger',
32
- }),
33
- ```
34
-
35
- Ensure you provide the necessary environment variables (`REGION` and `LOGGER_LOG_GROUP_NAME`) for configuration.
36
-
37
- ## Configuration Options
38
-
39
- - `region`: The AWS region where your CloudWatch logs are located.
40
- - `logGroupName`: The name of the log group where logs will be sent.
41
- - `options`: The options for the logger. Currently, only `'CloudWatchLogger'` is supported.
42
-
43
- ## Example
44
-
45
- ```javascript
46
- import { Module } from '@nestjs/common';
47
- import { LoggerModule } from '@gus-eip/loggers';
48
-
49
- @Module({
50
- imports: [
51
- LoggerModule.forRoot({
52
- region: process.env.REGION,
53
- logGroupName: process.env.LOGGER_LOG_GROUP_NAME,
54
- options: 'CloudWatchLogger',
55
- }),
56
- ],
57
- })
58
- export class AppModule {}
59
- ```
60
-
61
- ```
62
- This repository requires AWS SSM Parameter Store access to retrieve the SQS URL dynamically. Ensure that the application has permission to read LOGGER_SQS_URL.
63
-
64
- ```
65
-
66
- ## License
67
-
68
- This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
69
-
70
- ---
71
-
72
- ## OAP-EIP LOGGER
73
-
74
- Whenever a new use case is added in the enum.ts file, make sure to also:
75
-
76
- 1. Add a user-friendly label for it in usecase-mapping.ts.
77
-
78
- 2. Add a new entry in source-destination-mapping.ts with the correct usecase, brand, source, and destination.
79
-
80
- 3. After publishing the updated package, update the dependency in the gus-eip-analytics repository to reflect the latest version.
81
-
1
+ # @gus-eip/loggers
2
+
3
+ ## Overview
4
+
5
+ `@gus-eip/loggers` is a package designed to provide logging functionality for your Node.js applications. It offers integration with various logging services, including CloudWatchLogger.
6
+
7
+ ## Installation
8
+
9
+ You can install the package via npm:
10
+
11
+ ```bash
12
+ npm install @gus-eip/loggers
13
+ ```
14
+
15
+ ## Usage
16
+
17
+ To use the logger module in your application, follow these steps:
18
+
19
+ 1. Import `LoggerModule` from `@gus-eip/loggers` inside your module.
20
+
21
+ ```javascript
22
+ import { LoggerModule } from '@gus-eip/loggers';
23
+ ```
24
+
25
+ 2. Configure `LoggerModule` in your module by calling the `forRoot` method.
26
+
27
+ ```javascript
28
+ LoggerModule.forRoot({
29
+ region: process.env.REGION,
30
+ logGroupName: process.env.LOGGER_LOG_GROUP_NAME,
31
+ options: 'CloudWatchLogger',
32
+ }),
33
+ ```
34
+
35
+ Ensure you provide the necessary environment variables (`REGION` and `LOGGER_LOG_GROUP_NAME`) for configuration.
36
+
37
+ ## Configuration Options
38
+
39
+ - `region`: The AWS region where your CloudWatch logs are located.
40
+ - `logGroupName`: The name of the log group where logs will be sent.
41
+ - `options`: The options for the logger. Currently, only `'CloudWatchLogger'` is supported.
42
+
43
+ ## Example
44
+
45
+ ```javascript
46
+ import { Module } from '@nestjs/common';
47
+ import { LoggerModule } from '@gus-eip/loggers';
48
+
49
+ @Module({
50
+ imports: [
51
+ LoggerModule.forRoot({
52
+ region: process.env.REGION,
53
+ logGroupName: process.env.LOGGER_LOG_GROUP_NAME,
54
+ options: 'CloudWatchLogger',
55
+ }),
56
+ ],
57
+ })
58
+ export class AppModule {}
59
+ ```
60
+
61
+ ```
62
+ This repository requires AWS SSM Parameter Store access to retrieve the SQS URL dynamically. Ensure that the application has permission to read LOGGER_SQS_URL.
63
+
64
+ ```
65
+
66
+ ## License
67
+
68
+ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
69
+
70
+ ---
71
+
72
+ ## OAP-EIP LOGGER
73
+
74
+ Whenever a new use case is added in the enum.ts file, make sure to also:
75
+
76
+ 1. Add a user-friendly label for it in usecase-mapping.ts.
77
+
78
+ 2. Add a new entry in source-destination-mapping.ts with the correct usecase, brand, source, and destination.
79
+
80
+ 3. After publishing the updated package, update the dependency in the gus-eip-analytics repository to reflect the latest version.
81
+
82
82
  Feel free to customize this README according to your specific package features, usage guidelines, and licensing terms.
@@ -153,6 +153,7 @@ let CloudWatchLoggerService = class CloudWatchLoggerService {
153
153
  event: fullLogObject.event || '',
154
154
  status,
155
155
  message: type === 'error' ? fullLogObject.errorMessage : fullLogObject.logMessage,
156
+ logGroupName: this.logGroupName,
156
157
  };
157
158
  const sqsUrl = await ssm_utils_1.ssmUtils.getSqsUrl();
158
159
  if (status === 'IN_PROGRESS' || !sqsUrl) {
package/dist/enum.d.ts CHANGED
@@ -360,6 +360,9 @@ export declare class LoggerEnum {
360
360
  SYNC_IN_UE_CAMPUSNET_COMPLETED: string;
361
361
  SYNC_IN_UE_CAMPUSNET_FAILED: string;
362
362
  GET_OCR_RESULTS: string;
363
+ OCR_PROCESS_STARTED: string;
364
+ OCR_PROCESS_COMPLETED: string;
365
+ OCR_PROCESS_ERROR: string;
363
366
  };
364
367
  UseCase: {
365
368
  PROGRAM_INFO: string;
@@ -447,6 +450,7 @@ export declare class LoggerEnum {
447
450
  GUS_DOCUMENT_UPLOAD: string;
448
451
  GUS_NEW_APPLICATION: string;
449
452
  GUS_WITHDRAW_APPLICATION: string;
453
+ STUDENT_OAP_LEAD_OWNER_ASSIGNMENT: string;
450
454
  };
451
455
  Component: {
452
456
  OAP_FRONTEND: string;
@@ -499,5 +503,6 @@ export declare class LoggerEnum {
499
503
  UE_CAMPUSNET: string;
500
504
  GUS_SALESFORCE_UE_CAMPUSNET_INTEGRATION_HANDLER: string;
501
505
  GUS_SALESFORCE_UE_CAMPUSNET_INTEGRATION_QUEUE: string;
506
+ OCR: string;
502
507
  };
503
508
  }
package/dist/enum.js CHANGED
@@ -371,6 +371,9 @@ let LoggerEnum = class LoggerEnum {
371
371
  SYNC_IN_UE_CAMPUSNET_COMPLETED: 'SYNC_IN_UE_CAMPUSNET_COMPLETED',
372
372
  SYNC_IN_UE_CAMPUSNET_FAILED: 'SYNC_IN_UE_CAMPUSNET_FAILED',
373
373
  GET_OCR_RESULTS: 'GET_OCR_RESULTS',
374
+ OCR_PROCESS_STARTED: 'OCR_PROCESS_STARTED',
375
+ OCR_PROCESS_COMPLETED: 'OCR_PROCESS_COMPLETED',
376
+ OCR_PROCESS_ERROR: 'OCR_PROCESS_ERROR'
374
377
  };
375
378
  this.UseCase = {
376
379
  PROGRAM_INFO: 'SAVE_PROGRAMME_DETAILS',
@@ -458,6 +461,7 @@ let LoggerEnum = class LoggerEnum {
458
461
  GUS_DOCUMENT_UPLOAD: 'GUS_DOCUMENT_UPLOAD',
459
462
  GUS_NEW_APPLICATION: 'GUS_NEW_APPLICATION',
460
463
  GUS_WITHDRAW_APPLICATION: 'GUS_WITHDRAW_APPLICATION',
464
+ STUDENT_OAP_LEAD_OWNER_ASSIGNMENT: 'STUDENT_OAP_LEAD_OWNER_ASSIGNMENT',
461
465
  };
462
466
  this.Component = {
463
467
  OAP_FRONTEND: 'OAP-FRONTEND',
@@ -510,6 +514,7 @@ let LoggerEnum = class LoggerEnum {
510
514
  UE_CAMPUSNET: 'UE_CAMPUSNET',
511
515
  GUS_SALESFORCE_UE_CAMPUSNET_INTEGRATION_HANDLER: 'GUS_SALESFORCE_UE_CAMPUSNET_INTEGRATION_HANDLER',
512
516
  GUS_SALESFORCE_UE_CAMPUSNET_INTEGRATION_QUEUE: 'GUS_SALESFORCE_UE_CAMPUSNET_INTEGRATION_QUEUE',
517
+ OCR: 'OCR'
513
518
  };
514
519
  }
515
520
  };
@@ -9,4 +9,5 @@ export interface LogEvent {
9
9
  event: any;
10
10
  status: string;
11
11
  message: string;
12
+ logGroupName: string;
12
13
  }
@@ -67,5 +67,6 @@ export declare enum UsecaseMapping {
67
67
  UEG_REJECT_DOCUMENT = "Document rejection",
68
68
  UEG_DOCUMENT_ISSUED = "Admission document issued",
69
69
  GUS_DOCUMENT_UPLOAD = "Gus document upload",
70
- GUS_WITHDRAW_APPLICATION = "Withdraw application"
70
+ GUS_WITHDRAW_APPLICATION = "Withdraw application",
71
+ STUDENT_OAP_LEAD_OWNER_ASSIGNMENT = "Student OAP lead owner assignment"
71
72
  }
@@ -72,4 +72,5 @@ var UsecaseMapping;
72
72
  UsecaseMapping["UEG_DOCUMENT_ISSUED"] = "Admission document issued";
73
73
  UsecaseMapping["GUS_DOCUMENT_UPLOAD"] = "Gus document upload";
74
74
  UsecaseMapping["GUS_WITHDRAW_APPLICATION"] = "Withdraw application";
75
+ UsecaseMapping["STUDENT_OAP_LEAD_OWNER_ASSIGNMENT"] = "Student OAP lead owner assignment";
75
76
  })(UsecaseMapping || (exports.UsecaseMapping = UsecaseMapping = {}));
package/package.json CHANGED
@@ -1,79 +1,79 @@
1
- {
2
- "name": "@gus-eip/loggers",
3
- "version": "3.9.6",
4
- "description": "@gus-eip/loggers is a package designed to provide logging functionality for your Node.js applications.",
5
- "author": "gus",
6
- "readmeFilename": "README.md",
7
- "main": "dist/index.js",
8
- "files": [
9
- "dist/**/*",
10
- "*.md"
11
- ],
12
- "scripts": {
13
- "start:dev": "tsc -w",
14
- "build": "tsc",
15
- "prepare": "npm run build",
16
- "format": "prettier --write \"src/**/*.ts\"",
17
- "lint": "tslint -p tsconfig.json -c tslint.json",
18
- "test": "node --experimental-vm-modules ./node_modules/.bin/jest",
19
- "test:watch": "jest --watch",
20
- "test:cov": "jest --coverage",
21
- "test:e2e": "jest --config ./test/jest-e2e.json"
22
- },
23
- "keywords": [
24
- "nestjs",
25
- "nodejs",
26
- "javascript",
27
- "typescript",
28
- "eip-loggers"
29
- ],
30
- "publishConfig": {
31
- "access": "public"
32
- },
33
- "dependencies": {
34
- "@aws-sdk/client-ssm": "^3.759.0",
35
- "aws-sdk": "^2.1590.0",
36
- "axios": "^1.7.4"
37
- },
38
- "devDependencies": {
39
- "@nestjs/common": "^10.0.2",
40
- "@nestjs/core": "^10.0.2",
41
- "@nestjs/platform-express": "^10.0.2",
42
- "@nestjs/testing": "10.0.2",
43
- "@types/express": "4.17.17",
44
- "@types/jest": "29.5.2",
45
- "@types/lodash": "^4.17.7",
46
- "@types/node": "20.3.1",
47
- "@types/supertest": "2.0.12",
48
- "@typescript-eslint/eslint-plugin": "^5.60.0",
49
- "@typescript-eslint/parser": "^5.60.0",
50
- "eslint": "^8.43.0",
51
- "eslint-config-prettier": "^8.8.0",
52
- "eslint-plugin-prettier": "^4.2.1",
53
- "jest": "29.5.0",
54
- "prettier": "2.8.8",
55
- "reflect-metadata": "^0.1.13",
56
- "rxjs": "^7.8.1",
57
- "supertest": "6.3.3",
58
- "ts-jest": "29.1.0",
59
- "ts-node": "10.9.1",
60
- "tsc-watch": "6.0.4",
61
- "tsconfig-paths": "4.2.0",
62
- "tslint": "5.20.1",
63
- "typescript": "^5.5.4"
64
- },
65
- "jest": {
66
- "moduleFileExtensions": [
67
- "js",
68
- "json",
69
- "ts"
70
- ],
71
- "rootDir": "src",
72
- "testRegex": ".spec.ts$",
73
- "transform": {
74
- "^.+\\.(t|j)s$": "ts-jest"
75
- },
76
- "coverageDirectory": "../coverage",
77
- "testEnvironment": "node"
78
- }
79
- }
1
+ {
2
+ "name": "@gus-eip/loggers",
3
+ "version": "3.9.8",
4
+ "description": "@gus-eip/loggers is a package designed to provide logging functionality for your Node.js applications.",
5
+ "author": "gus",
6
+ "readmeFilename": "README.md",
7
+ "main": "dist/index.js",
8
+ "files": [
9
+ "dist/**/*",
10
+ "*.md"
11
+ ],
12
+ "scripts": {
13
+ "start:dev": "tsc -w",
14
+ "build": "tsc",
15
+ "prepare": "npm run build",
16
+ "format": "prettier --write \"src/**/*.ts\"",
17
+ "lint": "tslint -p tsconfig.json -c tslint.json",
18
+ "test": "node --experimental-vm-modules ./node_modules/.bin/jest",
19
+ "test:watch": "jest --watch",
20
+ "test:cov": "jest --coverage",
21
+ "test:e2e": "jest --config ./test/jest-e2e.json"
22
+ },
23
+ "keywords": [
24
+ "nestjs",
25
+ "nodejs",
26
+ "javascript",
27
+ "typescript",
28
+ "eip-loggers"
29
+ ],
30
+ "publishConfig": {
31
+ "access": "public"
32
+ },
33
+ "dependencies": {
34
+ "@aws-sdk/client-ssm": "^3.759.0",
35
+ "aws-sdk": "^2.1590.0",
36
+ "axios": "^1.7.4"
37
+ },
38
+ "devDependencies": {
39
+ "@nestjs/common": "^10.0.2",
40
+ "@nestjs/core": "^10.0.2",
41
+ "@nestjs/platform-express": "^10.0.2",
42
+ "@nestjs/testing": "10.0.2",
43
+ "@types/express": "4.17.17",
44
+ "@types/jest": "29.5.2",
45
+ "@types/lodash": "^4.17.7",
46
+ "@types/node": "20.3.1",
47
+ "@types/supertest": "2.0.12",
48
+ "@typescript-eslint/eslint-plugin": "^5.60.0",
49
+ "@typescript-eslint/parser": "^5.60.0",
50
+ "eslint": "^8.43.0",
51
+ "eslint-config-prettier": "^8.8.0",
52
+ "eslint-plugin-prettier": "^4.2.1",
53
+ "jest": "29.5.0",
54
+ "prettier": "2.8.8",
55
+ "reflect-metadata": "^0.1.13",
56
+ "rxjs": "^7.8.1",
57
+ "supertest": "6.3.3",
58
+ "ts-jest": "29.1.0",
59
+ "ts-node": "10.9.1",
60
+ "tsc-watch": "6.0.4",
61
+ "tsconfig-paths": "4.2.0",
62
+ "tslint": "5.20.1",
63
+ "typescript": "^5.5.4"
64
+ },
65
+ "jest": {
66
+ "moduleFileExtensions": [
67
+ "js",
68
+ "json",
69
+ "ts"
70
+ ],
71
+ "rootDir": "src",
72
+ "testRegex": ".spec.ts$",
73
+ "transform": {
74
+ "^.+\\.(t|j)s$": "ts-jest"
75
+ },
76
+ "coverageDirectory": "../coverage",
77
+ "testEnvironment": "node"
78
+ }
79
+ }