Compare commits

...
Author SHA1 Message Date
rodrigo.zamboni 36de53dfd3 FIX: lib version 2022-05-19 14:48:22 -03:00
rodrigo.zamboni cd8fe2fbf6 CI: Deploy 2022-05-19 14:46:17 -03:00
rodrigo.zamboni c4a2bee69c CI: DEploy 2022-05-19 14:18:08 -03:00
rodrigo.zamboni e48d11153d FIX: Added S3 or JDBC input selection for pipelines 2022-05-19 14:13:06 -03:00
4 changed files with 31 additions and 13 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
<p align="center">
<image src="./assets/maestro.svg" style="width:10rem">
<h1 align="center">Maestro</h1>
<h1 align="center">Maestro</h1>
</p>
+7 -7
View File
@@ -19,7 +19,7 @@
"@nestjs/platform-express": "^8.4.3",
"@nestjs/schedule": "^1.1.0",
"@nestjs/swagger": "^5.2.1",
"@victorradael/protospack": "^1.8.0",
"@victorradael/protospack": "2.3.0",
"axios": "^0.25.0",
"dotenv": "^14.2.0",
"helmet": "^5.0.2",
@@ -2359,9 +2359,9 @@
}
},
"node_modules/@victorradael/protospack": {
"version": "1.8.0",
"resolved": "https://registry.npmjs.org/@victorradael/protospack/-/protospack-1.8.0.tgz",
"integrity": "sha512-vixXFliu7hPtJshGyxyekXBMsY1VCDo6WKu+aDKGHxAvd1cSG46UjAOYvYX5yPL4/J6fD//C4mdEYNW9l5TLvQ==",
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/@victorradael/protospack/-/protospack-2.3.0.tgz",
"integrity": "sha512-D2iy5Ff8G2FhH6Grs4MHM0qyqc6EU7iGuD3Bit6Tm6GbHmhDbLER9uBowClPjbPSAQ6jP7WTYxwn/TgDK4lNaA==",
"dependencies": {
"rxjs": "^7.5.5"
}
@@ -10955,9 +10955,9 @@
}
},
"@victorradael/protospack": {
"version": "1.8.0",
"resolved": "https://registry.npmjs.org/@victorradael/protospack/-/protospack-1.8.0.tgz",
"integrity": "sha512-vixXFliu7hPtJshGyxyekXBMsY1VCDo6WKu+aDKGHxAvd1cSG46UjAOYvYX5yPL4/J6fD//C4mdEYNW9l5TLvQ==",
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/@victorradael/protospack/-/protospack-2.3.0.tgz",
"integrity": "sha512-D2iy5Ff8G2FhH6Grs4MHM0qyqc6EU7iGuD3Bit6Tm6GbHmhDbLER9uBowClPjbPSAQ6jP7WTYxwn/TgDK4lNaA==",
"requires": {
"rxjs": "^7.5.5"
}
+1 -1
View File
@@ -31,7 +31,7 @@
"@nestjs/platform-express": "^8.4.3",
"@nestjs/schedule": "^1.1.0",
"@nestjs/swagger": "^5.2.1",
"@victorradael/protospack": "2.2.0",
"@victorradael/protospack": "^2.3.0",
"axios": "^0.25.0",
"dotenv": "^14.2.0",
"helmet": "^5.0.2",
+22 -4
View File
@@ -7,13 +7,20 @@ import { objectCamelToSnake } from 'src/utils/CaseConverter';
export class PipelinesService {
constructor(private pipelineClient: PipelinesClientService) {}
adjustPayload(payload) {
payload.input = payload.input.input_s3 || payload.input.input_jdbc;
}
async create(createPipelineDto) {
try {
const createPipelineResponse = await this.pipelineClient.create(
createPipelineDto,
);
return objectCamelToSnake(createPipelineResponse);
const pipeline = objectCamelToSnake(createPipelineResponse);
this.adjustPayload(pipeline);
return pipeline;
} catch (err) {
console.log(err);
throw new HttpException(err.message, HttpStatus.NOT_FOUND);
@@ -23,7 +30,11 @@ export class PipelinesService {
async findOne(data: IIdRequest) {
try {
const findOnePipelineResponse = await this.pipelineClient.findOne(data);
return objectCamelToSnake(findOnePipelineResponse);
const pipeline = objectCamelToSnake(findOnePipelineResponse);
this.adjustPayload(pipeline);
return pipeline;
} catch (err) {
throw new HttpException(err.message, HttpStatus.NOT_FOUND);
}
@@ -33,7 +44,11 @@ export class PipelinesService {
try {
const findAllPipelineResponse = await this.pipelineClient.findAll(data);
return objectCamelToSnake(findAllPipelineResponse);
const pipelines = objectCamelToSnake(findAllPipelineResponse);
pipelines.forEach((pipeline) => {
this.adjustPayload(pipeline);
});
return pipelines;
} catch (err) {
throw new HttpException(err.message, HttpStatus.NOT_FOUND);
}
@@ -47,7 +62,10 @@ export class PipelinesService {
...data,
});
return objectCamelToSnake(updatePipelineResponse);
const pipeline = objectCamelToSnake(updatePipelineResponse);
this.adjustPayload(pipeline);
return pipeline;
} catch (err) {
throw new HttpException(err.message, HttpStatus.NOT_FOUND);
}