@uniorganization/uni-lib 1.0.3 → 1.0.7
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/config/index.d.ts +1 -0
- package/dist/config/index.js +1 -0
- package/dist/config/swagger.config.d.ts +1 -0
- package/dist/config/swagger.config.js +14 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/modules/auth.module.d.ts +0 -0
- package/dist/modules/auth.module.js +0 -0
- package/dist/modules/common/common.module.d.ts +2 -0
- package/dist/modules/common/common.module.js +28 -0
- package/dist/modules/common/index.d.ts +3 -0
- package/dist/modules/common/index.js +15 -0
- package/dist/modules/common/jwt-auth.guard.d.ts +5 -0
- package/dist/modules/common/jwt-auth.guard.js +26 -0
- package/dist/modules/common/jwt.strategy.d.ts +9 -0
- package/dist/modules/common/jwt.strategy.js +43 -0
- package/dist/modules/config/config.module.d.ts +2 -0
- package/dist/modules/config/config.module.js +32 -0
- package/dist/modules/config/config.service.d.ts +18 -0
- package/dist/modules/config/config.service.js +173 -0
- package/dist/modules/config/index.d.ts +2 -0
- package/dist/modules/config/index.js +14 -0
- package/dist/modules/index.d.ts +2 -0
- package/dist/modules/index.js +14 -0
- package/package.json +10 -1
package/dist/config/index.d.ts
CHANGED
package/dist/config/index.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function setUpSwagger(app: any): void;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setUpSwagger = void 0;
|
|
4
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
5
|
+
function setUpSwagger(app) {
|
|
6
|
+
const options = new swagger_1.DocumentBuilder()
|
|
7
|
+
.setTitle('UNI')
|
|
8
|
+
.setDescription('UNI API')
|
|
9
|
+
.setVersion('1.0.0')
|
|
10
|
+
.build();
|
|
11
|
+
const document = swagger_1.SwaggerModule.createDocument(app, options);
|
|
12
|
+
swagger_1.SwaggerModule.setup('api', app, document);
|
|
13
|
+
}
|
|
14
|
+
exports.setUpSwagger = setUpSwagger;
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.CommonModule = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
const passport_1 = require("@nestjs/passport");
|
|
12
|
+
const jwt_1 = require("@nestjs/jwt");
|
|
13
|
+
const jwt_strategy_1 = require("./jwt.strategy");
|
|
14
|
+
let CommonModule = class CommonModule {
|
|
15
|
+
};
|
|
16
|
+
CommonModule = __decorate([
|
|
17
|
+
(0, common_1.Module)({
|
|
18
|
+
imports: [
|
|
19
|
+
passport_1.PassportModule,
|
|
20
|
+
jwt_1.JwtModule.register({
|
|
21
|
+
secret: process.env.JWT_SECRET,
|
|
22
|
+
signOptions: { expiresIn: '12h' },
|
|
23
|
+
}),
|
|
24
|
+
],
|
|
25
|
+
providers: [jwt_strategy_1.JwtStrategy],
|
|
26
|
+
})
|
|
27
|
+
], CommonModule);
|
|
28
|
+
exports.CommonModule = CommonModule;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./common.module"), exports);
|
|
14
|
+
__exportStar(require("./jwt-auth.guard"), exports);
|
|
15
|
+
__exportStar(require("./jwt.strategy"), exports);
|
|
@@ -0,0 +1,26 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.JwtAuthGuard = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
const passport_1 = require("@nestjs/passport");
|
|
12
|
+
let JwtAuthGuard = class JwtAuthGuard extends (0, passport_1.AuthGuard)('jwt') {
|
|
13
|
+
handleRequest(err, user, info) {
|
|
14
|
+
const enableJWT = JSON.parse(process.env.JWT_ENABLE);
|
|
15
|
+
if (enableJWT) {
|
|
16
|
+
if (err || !user) {
|
|
17
|
+
throw err || new common_1.UnauthorizedException();
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return user;
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
JwtAuthGuard = __decorate([
|
|
24
|
+
(0, common_1.Injectable)()
|
|
25
|
+
], JwtAuthGuard);
|
|
26
|
+
exports.JwtAuthGuard = JwtAuthGuard;
|
|
@@ -0,0 +1,43 @@
|
|
|
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.JwtStrategy = void 0;
|
|
22
|
+
const common_1 = require("@nestjs/common");
|
|
23
|
+
const passport_1 = require("@nestjs/passport");
|
|
24
|
+
const passport_jwt_1 = require("passport-jwt");
|
|
25
|
+
let JwtStrategy = class JwtStrategy extends (0, passport_1.PassportStrategy)(passport_jwt_1.Strategy) {
|
|
26
|
+
constructor() {
|
|
27
|
+
super({
|
|
28
|
+
jwtFromRequest: passport_jwt_1.ExtractJwt.fromAuthHeaderAsBearerToken(),
|
|
29
|
+
ignoreExpiration: JSON.parse(process.env.JWT_IGNORE_EXPIRATION) || false,
|
|
30
|
+
secretOrKey: process.env.JWT_SECRET,
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
validate(payload) {
|
|
34
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
+
return { payload };
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
JwtStrategy = __decorate([
|
|
40
|
+
(0, common_1.Injectable)(),
|
|
41
|
+
__metadata("design:paramtypes", [])
|
|
42
|
+
], JwtStrategy);
|
|
43
|
+
exports.JwtStrategy = JwtStrategy;
|
|
@@ -0,0 +1,32 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.ConfigurationModule = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
const typeorm_1 = require("@nestjs/typeorm");
|
|
12
|
+
const config_service_1 = require("./config.service");
|
|
13
|
+
const axios_1 = require("@nestjs/axios");
|
|
14
|
+
const aes_gcm_1 = require("@nestrx/aes-gcm");
|
|
15
|
+
const src_1 = require("src");
|
|
16
|
+
let ConfigurationModule = class ConfigurationModule {
|
|
17
|
+
};
|
|
18
|
+
ConfigurationModule = __decorate([
|
|
19
|
+
(0, common_1.Module)({
|
|
20
|
+
imports: [
|
|
21
|
+
aes_gcm_1.AesGcmModule.forRoot(process.env.JWT_KEY),
|
|
22
|
+
typeorm_1.TypeOrmModule.forFeature([src_1.Config]),
|
|
23
|
+
axios_1.HttpModule.register({
|
|
24
|
+
timeout: Number(process.env.REQUEST_TIMEOUT) || 5000,
|
|
25
|
+
maxRedirects: Number(process.env.MAX_REDIRECTS) || 5,
|
|
26
|
+
}),
|
|
27
|
+
],
|
|
28
|
+
providers: [config_service_1.ConfigService],
|
|
29
|
+
exports: [typeorm_1.TypeOrmModule, config_service_1.ConfigService],
|
|
30
|
+
})
|
|
31
|
+
], ConfigurationModule);
|
|
32
|
+
exports.ConfigurationModule = ConfigurationModule;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Repository } from 'typeorm';
|
|
2
|
+
import { AesGcmService } from '@nestrx/aes-gcm';
|
|
3
|
+
import { HttpService } from '@nestjs/axios';
|
|
4
|
+
import { Config } from 'src';
|
|
5
|
+
export declare class ConfigService {
|
|
6
|
+
private readonly configRepository;
|
|
7
|
+
private readonly httpService;
|
|
8
|
+
private readonly aes;
|
|
9
|
+
constructor(configRepository: Repository<Config>, httpService: HttpService, aes: AesGcmService);
|
|
10
|
+
findAll(options?: Config): Promise<Config[]>;
|
|
11
|
+
findOne(param: any): Promise<Config>;
|
|
12
|
+
findByKey(key: string): Promise<Config>;
|
|
13
|
+
save(config: Config): Promise<any>;
|
|
14
|
+
getP1Details(): Promise<any>;
|
|
15
|
+
private findProperty;
|
|
16
|
+
p1Login(): Promise<void>;
|
|
17
|
+
getTicketDetailsFromP1(transaction_id: string): Promise<any>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,173 @@
|
|
|
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 __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
+
exports.ConfigService = void 0;
|
|
25
|
+
const common_1 = require("@nestjs/common");
|
|
26
|
+
const typeorm_1 = require("@nestjs/typeorm");
|
|
27
|
+
const typeorm_2 = require("typeorm");
|
|
28
|
+
const aes_gcm_1 = require("@nestrx/aes-gcm");
|
|
29
|
+
const axios_1 = require("@nestjs/axios");
|
|
30
|
+
const src_1 = require("src");
|
|
31
|
+
let ConfigService = class ConfigService {
|
|
32
|
+
constructor(configRepository, httpService, aes) {
|
|
33
|
+
this.configRepository = configRepository;
|
|
34
|
+
this.httpService = httpService;
|
|
35
|
+
this.aes = aes;
|
|
36
|
+
}
|
|
37
|
+
findAll(options) {
|
|
38
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
39
|
+
try {
|
|
40
|
+
return yield this.configRepository.find({ where: options });
|
|
41
|
+
}
|
|
42
|
+
catch (error) {
|
|
43
|
+
throw new common_1.BadRequestException(error.message);
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
findOne(param) {
|
|
48
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
49
|
+
try {
|
|
50
|
+
return yield this.configRepository.findOne(param);
|
|
51
|
+
}
|
|
52
|
+
catch (error) {
|
|
53
|
+
throw new common_1.BadRequestException(error.message);
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
findByKey(key) {
|
|
58
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
59
|
+
try {
|
|
60
|
+
return yield this.configRepository.findOne({ where: { key: key } });
|
|
61
|
+
}
|
|
62
|
+
catch (error) {
|
|
63
|
+
throw new common_1.BadRequestException(error.message);
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
save(config) {
|
|
68
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
69
|
+
try {
|
|
70
|
+
return yield this.configRepository.save(config);
|
|
71
|
+
}
|
|
72
|
+
catch (error) {
|
|
73
|
+
throw new common_1.BadRequestException(error.message);
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
getP1Details() {
|
|
78
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
79
|
+
try {
|
|
80
|
+
let p1TokenExpirationDate = new Date((yield this.findByKey('p1.token.expiration')).value);
|
|
81
|
+
let currentDate = new Date();
|
|
82
|
+
if (currentDate > p1TokenExpirationDate) {
|
|
83
|
+
yield this.p1Login();
|
|
84
|
+
}
|
|
85
|
+
return yield this.configRepository.find({
|
|
86
|
+
where: {
|
|
87
|
+
key: (0, typeorm_2.In)([
|
|
88
|
+
'p1.token',
|
|
89
|
+
'p1.ticket.detail.url',
|
|
90
|
+
'p1.company',
|
|
91
|
+
'p1.company.370',
|
|
92
|
+
]),
|
|
93
|
+
},
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
catch (error) {
|
|
97
|
+
throw new common_1.BadRequestException(error.message);
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
findProperty(list, key) {
|
|
102
|
+
try {
|
|
103
|
+
let { value } = list.filter((o) => o.key === key)[0];
|
|
104
|
+
return value;
|
|
105
|
+
}
|
|
106
|
+
catch (error) {
|
|
107
|
+
throw new common_1.BadRequestException(error.message);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
p1Login() {
|
|
111
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
112
|
+
let p1LoginUrl = yield this.findByKey('p1.login.url');
|
|
113
|
+
let userConfig = yield this.findByKey('p1.login.username');
|
|
114
|
+
let pwdConfig = yield this.findByKey('p1.login.password');
|
|
115
|
+
let p1Token = yield this.findByKey('p1.token');
|
|
116
|
+
let p1TokenExpiration = yield this.findByKey('p1.token.expiration');
|
|
117
|
+
let response = (yield this.httpService
|
|
118
|
+
.post(p1LoginUrl.value, {
|
|
119
|
+
username: userConfig.value,
|
|
120
|
+
password: this.aes.decrypt(pwdConfig.value),
|
|
121
|
+
})
|
|
122
|
+
.toPromise()).data;
|
|
123
|
+
p1Token.value = response.accessToken;
|
|
124
|
+
p1TokenExpiration.value = response.accessTokenExpiresAt;
|
|
125
|
+
yield this.configRepository.save([p1Token, p1TokenExpiration]);
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
getTicketDetailsFromP1(transaction_id) {
|
|
129
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
130
|
+
let connDetails = yield this.getP1Details();
|
|
131
|
+
try {
|
|
132
|
+
let response = (yield this.httpService
|
|
133
|
+
.get(this.findProperty(connDetails, 'p1.ticket.detail.url') +
|
|
134
|
+
transaction_id, {
|
|
135
|
+
headers: {
|
|
136
|
+
Authorization: 'Bearer ' + this.findProperty(connDetails, 'p1.token'),
|
|
137
|
+
company: this.findProperty(connDetails, 'p1.company'),
|
|
138
|
+
},
|
|
139
|
+
})
|
|
140
|
+
.toPromise()).data;
|
|
141
|
+
return response;
|
|
142
|
+
}
|
|
143
|
+
catch (error) {
|
|
144
|
+
try {
|
|
145
|
+
let response = (yield this.httpService
|
|
146
|
+
.get(this.findProperty(connDetails, 'p1.ticket.detail.url') +
|
|
147
|
+
transaction_id, {
|
|
148
|
+
headers: {
|
|
149
|
+
Authorization: 'Bearer ' + this.findProperty(connDetails, 'p1.token'),
|
|
150
|
+
company: this.findProperty(connDetails, 'p1.company.370'),
|
|
151
|
+
},
|
|
152
|
+
})
|
|
153
|
+
.toPromise()).data;
|
|
154
|
+
return response;
|
|
155
|
+
}
|
|
156
|
+
catch (error) {
|
|
157
|
+
throw new common_1.HttpException({
|
|
158
|
+
status: common_1.HttpStatus.BAD_REQUEST,
|
|
159
|
+
error: error.message,
|
|
160
|
+
}, 400);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
};
|
|
166
|
+
ConfigService = __decorate([
|
|
167
|
+
(0, common_1.Injectable)(),
|
|
168
|
+
__param(0, (0, typeorm_1.InjectRepository)(src_1.Config)),
|
|
169
|
+
__metadata("design:paramtypes", [typeorm_2.Repository,
|
|
170
|
+
axios_1.HttpService,
|
|
171
|
+
aes_gcm_1.AesGcmService])
|
|
172
|
+
], ConfigService);
|
|
173
|
+
exports.ConfigService = ConfigService;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./config.module"), exports);
|
|
14
|
+
__exportStar(require("./config.service"), exports);
|
package/dist/modules/index.d.ts
CHANGED
package/dist/modules/index.js
CHANGED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./common"), exports);
|
|
14
|
+
__exportStar(require("./config"), exports);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniorganization/uni-lib",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"description": "UNI Library",
|
|
5
5
|
"author": "Jhomiguel",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -24,6 +24,14 @@
|
|
|
24
24
|
"@nestjs/common": "^8.2.3"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
+
"@nestjs/axios": "0.0.3",
|
|
28
|
+
"@nestjs/jwt": "^8.0.0",
|
|
29
|
+
"@nestjs/passport": "^8.0.1",
|
|
30
|
+
"@nestjs/swagger": "^5.1.5",
|
|
31
|
+
"@nestrx/aes-gcm": "0.0.4",
|
|
32
|
+
"passport": "^0.5.0",
|
|
33
|
+
"passport-jwt": "^4.0.0",
|
|
34
|
+
"swagger-ui-express": "^4.1.6",
|
|
27
35
|
"typeorm": "^0.2.41"
|
|
28
36
|
},
|
|
29
37
|
"devDependencies": {
|
|
@@ -36,6 +44,7 @@
|
|
|
36
44
|
"@types/express": "4.16.1",
|
|
37
45
|
"@types/jest": "^26.0.22",
|
|
38
46
|
"@types/node": "^14.14.36",
|
|
47
|
+
"@types/passport-jwt": "^3.0.6",
|
|
39
48
|
"@types/supertest": "^2.0.10",
|
|
40
49
|
"jest": "^26.6.3",
|
|
41
50
|
"prettier": "^2.2.1",
|