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.
- package/dist/module/auth/strategies/google.strategy.d.ts +0 -1
- package/dist/module/auth/strategies/google.strategy.js +11 -4
- package/dist/module/auth/strategies/google.strategy.js.map +1 -1
- package/dist/module/meta/controller/entity.controller.js +3 -3
- package/dist/module/meta/controller/entity.controller.js.map +1 -1
- package/dist/module/meta/entity/entity-master.entity.d.ts +3 -3
- package/dist/module/meta/entity/entity-master.entity.js +3 -4
- package/dist/module/meta/entity/entity-master.entity.js.map +1 -1
- package/dist/module/meta/service/entity-master.service.js +1 -1
- package/dist/module/meta/service/entity-master.service.js.map +1 -1
- package/dist/module/meta/service/entity-service-impl.service.js +6 -6
- package/dist/module/meta/service/entity-service-impl.service.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/nest-cli.json +1 -1
- package/package.json +1 -1
- package/src/module/auth/strategies/google.strategy.ts +14 -9
- package/src/module/meta/controller/entity.controller.ts +3 -3
- package/src/module/meta/entity/entity-master.entity.ts +3 -4
- package/src/module/meta/service/entity-master.service.ts +1 -1
- package/src/module/meta/service/entity-service-impl.service.ts +6 -6
- package/src/resources/dev.properties.yaml +2 -2
- package/dist/constant/status.constant.d.ts +0 -4
- package/dist/constant/status.constant.js +0 -9
- package/dist/constant/status.constant.js.map +0 -1
- package/dist/resources/dev.properties.yaml +0 -15
- package/dist/resources/uat.properties.yaml +0 -15
package/nest-cli.json
CHANGED
package/package.json
CHANGED
|
@@ -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
|
-
|
|
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
|
|
13
|
-
clientSecret
|
|
14
|
-
callbackURL
|
|
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.
|
|
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.
|
|
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.
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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.
|
|
44
|
-
: this.reflectionHelper.getRepoService(entityMaster.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
137
|
+
entityMaster.entity_data_class,
|
|
138
138
|
);
|
|
139
139
|
if (!repoService) {
|
|
140
140
|
throw new Error(
|
|
@@ -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"
|