rez_core 1.0.31 → 1.0.32

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 (26) hide show
  1. package/dist/module/auth/strategies/google.strategy.d.ts +0 -1
  2. package/dist/module/auth/strategies/google.strategy.js +11 -4
  3. package/dist/module/auth/strategies/google.strategy.js.map +1 -1
  4. package/dist/module/meta/controller/entity.controller.js +3 -3
  5. package/dist/module/meta/controller/entity.controller.js.map +1 -1
  6. package/dist/module/meta/entity/entity-master.entity.d.ts +3 -3
  7. package/dist/module/meta/entity/entity-master.entity.js +3 -4
  8. package/dist/module/meta/entity/entity-master.entity.js.map +1 -1
  9. package/dist/module/meta/service/entity-master.service.js +1 -1
  10. package/dist/module/meta/service/entity-master.service.js.map +1 -1
  11. package/dist/module/meta/service/entity-service-impl.service.js +6 -6
  12. package/dist/module/meta/service/entity-service-impl.service.js.map +1 -1
  13. package/dist/tsconfig.build.tsbuildinfo +1 -1
  14. package/nest-cli.json +1 -1
  15. package/package.json +1 -1
  16. package/src/module/auth/strategies/google.strategy.ts +14 -9
  17. package/src/module/meta/controller/entity.controller.ts +3 -3
  18. package/src/module/meta/entity/entity-master.entity.ts +3 -4
  19. package/src/module/meta/service/entity-master.service.ts +1 -1
  20. package/src/module/meta/service/entity-service-impl.service.ts +6 -6
  21. package/src/resources/dev.properties.yaml +2 -2
  22. package/dist/constant/status.constant.d.ts +0 -4
  23. package/dist/constant/status.constant.js +0 -9
  24. package/dist/constant/status.constant.js.map +0 -1
  25. package/dist/resources/dev.properties.yaml +0 -15
  26. package/dist/resources/uat.properties.yaml +0 -15
package/nest-cli.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "compilerOptions": {
6
6
  "assets": [
7
7
  {
8
- "include": "../src/resources/*.yaml",
8
+ "include": "../src/*.yaml",
9
9
  "outDir": "./dist/"
10
10
  }
11
11
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rez_core",
3
- "version": "1.0.31",
3
+ "version": "1.0.32",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "private": false,
@@ -5,13 +5,21 @@ import { Strategy, VerifyCallback } from 'passport-google-oauth20';
5
5
 
6
6
  @Injectable()
7
7
  export class GoogleStrategy extends PassportStrategy(Strategy, 'google') {
8
- constructor(
9
- private configService: ConfigService,
10
- ) {
8
+ constructor(configService: ConfigService) {
9
+ const clientID = configService.get<string>('CLIENT_ID');
10
+ const clientSecret = configService.get<string>('CLIENT_SECRET');
11
+ const callbackURL = configService.get<string>('CALLBACK_URL');
12
+
13
+ console.log('Google OAuth config', {
14
+ clientID,
15
+ clientSecret,
16
+ callbackURL,
17
+ });
18
+
11
19
  super({
12
- clientID: configService.get('CLIENT_ID'),
13
- clientSecret: configService.get('CLIENT_SECRET'),
14
- callbackURL:configService.get('CALLBACK_URL'),
20
+ clientID,
21
+ clientSecret,
22
+ callbackURL,
15
23
  scope: ['email', 'profile'],
16
24
  });
17
25
  }
@@ -22,11 +30,8 @@ export class GoogleStrategy extends PassportStrategy(Strategy, 'google') {
22
30
  profile: any,
23
31
  done: VerifyCallback,
24
32
  ) {
25
- // console.log(profile)
26
33
  const { emails, name } = profile;
27
34
  const email = emails?.[0]?.value;
28
-
29
- // Pass extracted user data to the controller (No dependencies here)
30
35
  return done(null, { email, name });
31
36
  }
32
37
  }
@@ -44,7 +44,7 @@ export class EntityController {
44
44
 
45
45
  const entityService =
46
46
  await this.reflectionHelper.getBean<EntityServiceImpl>(
47
- entityMaster.entityService,
47
+ entityMaster.entity_service,
48
48
  );
49
49
 
50
50
  if (entityService) {
@@ -69,7 +69,7 @@ export class EntityController {
69
69
 
70
70
  const entityService =
71
71
  await this.reflectionHelper.getBean<EntityServiceImpl>(
72
- entityMaster.entityService,
72
+ entityMaster.entity_service,
73
73
  );
74
74
 
75
75
  if (entityService) {
@@ -97,7 +97,7 @@ export class EntityController {
97
97
 
98
98
  const entityService =
99
99
  await this.reflectionHelper.getBean<EntityServiceImpl>(
100
- entityMaster.entityService,
100
+ entityMaster.entity_service,
101
101
  );
102
102
 
103
103
  if (entityService) {
@@ -15,8 +15,7 @@ export class EntityMaster extends BaseEntity {
15
15
  length: 50,
16
16
  nullable: false,
17
17
  })
18
- @Column({ name: 'mapped_entity_type', nullable: true })
19
- mappedEntityType: string;
18
+ mapped_entity_type: string;
20
19
 
21
20
  @Column({ name: 'appcode', type: 'varchar', length: 50, nullable: true })
22
21
  appCode: string;
@@ -33,7 +32,7 @@ export class EntityMaster extends BaseEntity {
33
32
  length: 200,
34
33
  nullable: true,
35
34
  })
36
- entityDataClass: string;
35
+ entity_data_class: string;
37
36
 
38
37
  @Column({
39
38
  name: 'entity_service',
@@ -41,7 +40,7 @@ export class EntityMaster extends BaseEntity {
41
40
  length: 200,
42
41
  nullable: true,
43
42
  })
44
- entityService: string;
43
+ entity_service: string;
45
44
 
46
45
  @Column({
47
46
  name: 'db_table_name',
@@ -12,7 +12,7 @@ export class EntityMasterService {
12
12
 
13
13
  async getEntityData(mappedEntityType: string): Promise<EntityMaster> {
14
14
  const entityMaster = await this.entityMasterRepository.findOne({
15
- where: { mappedEntityType },
15
+ where: { mapped_entity_type: mappedEntityType },
16
16
  });
17
17
 
18
18
  if (!entityMaster) {
@@ -40,8 +40,8 @@ export class EntityServiceImpl implements EntityService<BaseEntity> {
40
40
  );
41
41
 
42
42
  const repo = manager
43
- ? manager.getRepository(entityMaster.entityDataClass) // <-- Use transaction-safe repo
44
- : this.reflectionHelper.getRepoService(entityMaster.entityDataClass);
43
+ ? manager.getRepository(entityMaster.entity_data_class) // <-- Use transaction-safe repo
44
+ : this.reflectionHelper.getRepoService(entityMaster.entity_data_class);
45
45
 
46
46
  if (!repo) {
47
47
  throw new Error(
@@ -78,7 +78,7 @@ export class EntityServiceImpl implements EntityService<BaseEntity> {
78
78
  const entityData = await this.entityMasterService.getEntityData(entityType);
79
79
 
80
80
  const repoService = this.reflectionHelper.getRepoService(
81
- entityData.entityDataClass,
81
+ entityData.entity_data_class,
82
82
  );
83
83
  if (!repoService) {
84
84
  throw new Error(
@@ -100,7 +100,7 @@ export class EntityServiceImpl implements EntityService<BaseEntity> {
100
100
  const entityData = await this.entityMasterService.getEntityData(entityType);
101
101
 
102
102
  const repoService = this.reflectionHelper.getRepoService(
103
- entityData.entityDataClass,
103
+ entityData.entity_data_class,
104
104
  );
105
105
  if (!repoService) {
106
106
  throw new Error(
@@ -113,7 +113,7 @@ export class EntityServiceImpl implements EntityService<BaseEntity> {
113
113
  async getEntityList(entityType: string): Promise<BaseEntity[]> {
114
114
  const entityData = await this.entityMasterService.getEntityData(entityType);
115
115
  const repoService = this.reflectionHelper.getRepoService(
116
- entityData.entityDataClass,
116
+ entityData.entity_data_class,
117
117
  );
118
118
  if (!repoService) {
119
119
  throw new Error(
@@ -134,7 +134,7 @@ export class EntityServiceImpl implements EntityService<BaseEntity> {
134
134
  );
135
135
 
136
136
  const repoService = this.reflectionHelper.getRepoService(
137
- entityMaster.entityDataClass,
137
+ entityMaster.entity_data_class,
138
138
  );
139
139
  if (!repoService) {
140
140
  throw new Error(
@@ -1,7 +1,7 @@
1
- DB_HOST: "13.234.25.234"
1
+ DB_HOST: "localhost"
2
2
  DB_PORT: "3306"
3
3
  DB_USER: "root"
4
- DB_PASS: "Rezolut@123"
4
+ DB_PASS: "root"
5
5
  DB_NAME: "core"
6
6
  MASTER_KEY: "0QZ2eRJv5oVILYnyBlC+FbSGVQiWKReh"
7
7
  MASTER_IV: "heuUQf5uPVtkotrFAOKUVw=="
@@ -1,4 +0,0 @@
1
- export declare enum StatusType {
2
- ACTIVE = 0,
3
- INACTIVE = 1
4
- }
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.StatusType = void 0;
4
- var StatusType;
5
- (function (StatusType) {
6
- StatusType[StatusType["ACTIVE"] = 0] = "ACTIVE";
7
- StatusType[StatusType["INACTIVE"] = 1] = "INACTIVE";
8
- })(StatusType || (exports.StatusType = StatusType = {}));
9
- //# sourceMappingURL=status.constant.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"status.constant.js","sourceRoot":"","sources":["../../src/constant/status.constant.ts"],"names":[],"mappings":";;;AAAA,IAAY,UAEX;AAFD,WAAY,UAAU;IAClB,+CAAM,CAAA;IAAE,mDAAQ,CAAA;AACpB,CAAC,EAFW,UAAU,0BAAV,UAAU,QAErB"}
@@ -1,15 +0,0 @@
1
- DB_HOST: "13.234.25.234"
2
- DB_PORT: "3306"
3
- DB_USER: "root"
4
- DB_PASS: "Rezolut@123"
5
- DB_NAME: "ether_core"
6
- MASTER_KEY: "0QZ2eRJv5oVILYnyBlC+FbSGVQiWKReh"
7
- MASTER_IV: "heuUQf5uPVtkotrFAOKUVw=="
8
- SECRET_KEY: "1hard_to_guess_secret7890a"
9
- CLIENT_ID: "324529881356-596sc8ksrb9lg01i7sktofqqqf0fv2ug.apps.googleusercontent.com"
10
- CLIENT_SECRET: "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"
11
- CALLBACK_URL: "http://localhost:3000/auth/google/callback"
12
- OTP_EXPIRY: "10"
13
- OTP_LENGTH: "6"
14
- VERIFY_OTP: "false"
15
- DEFAULT_OTP: "123456"
@@ -1,15 +0,0 @@
1
- DB_HOST: "13.234.25.234"
2
- DB_PORT: "3306"
3
- DB_USER: "root"
4
- DB_PASS: "Rezolut@123"
5
- DB_NAME: "ether_core"
6
- MASTER_KEY: "0QZ2eRJv5oVILYnyBlC+FbSGVQiWKReh"
7
- MASTER_IV: "heuUQf5uPVtkotrFAOKUVw=="
8
- SECRET_KEY: "1hard_to_guess_secret7890a"
9
- CLIENT_ID: "324529881356-596sc8ksrb9lg01i7sktofqqqf0fv2ug.apps.googleusercontent.com"
10
- CLIENT_SECRET: "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"
11
- CALLBACK_URL: "http://localhost:3000/auth/google/callback"
12
- OTP_EXPIRY: "10"
13
- OTP_LENGTH: "6"
14
- VERIFY_OTP: "false"
15
- DEFAULT_OTP: "123456"