Compare commits

..
Author SHA1 Message Date
Gabriel Rosa c44e557b11 merge beta 2022-05-20 10:08:20 -03:00
7 changed files with 6 additions and 16211 deletions
-16171
View File
File diff suppressed because it is too large Load Diff
+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.3.0",
"@victorradael/protospack": "^2.3.0",
"axios": "^0.25.0",
"dotenv": "^14.2.0",
"helmet": "^5.0.2",
+1 -3
View File
@@ -10,9 +10,7 @@ export class AuthClient {
options: {
url: process.env.DUC_URL,
package: DucPackages,
credentials: process.env.LOCAL_ENV
? undefined
: credentials.createSsl(),
credentials: credentials.createSsl(),
protoPath: DucProtoFilePath,
loader: {
enums: String,
+1 -3
View File
@@ -10,9 +10,7 @@ export class InputsClientConfiguration {
options: {
url: process.env.INFACTORY_URL,
package: InputPackages,
credentials: process.env.LOCAL_ENV
? undefined
: credentials.createSsl(),
credentials: credentials.createSsl(),
protoPath: InputProtoFilePath,
loader: {
enums: String,
+1 -3
View File
@@ -9,9 +9,7 @@ export class OutputsClientConfiguration {
options: {
url: process.env.OTFACTORY_URL,
package: OutputPackages,
credentials: process.env.LOCAL_ENV
? undefined
: credentials.createSsl(),
credentials: credentials.createSsl(),
protoPath: OutputProtoFilePath,
loader: {
enums: String,
+1 -3
View File
@@ -12,9 +12,7 @@ export class PipelinesClientConfiguration {
options: {
url: process.env.PIFACTORY_URL,
package: PipelinePackages,
credentials: process.env.LOCAL_ENV
? undefined
: credentials.createSsl(),
credentials: credentials.createSsl(),
protoPath: PipelineProtoFilePath,
loader: {
enums: String,
+1 -27
View File
@@ -15,9 +15,8 @@ export class InputsService {
data.plugin == 'parquet'
) {
const { info, ...input } = data;
const inputPayload = this.generateInputS3Payload(input);
const createInputResponse = await this.inputClient.createS3Inputs({
input: inputPayload,
input,
info,
});
return createInputResponse;
@@ -96,29 +95,4 @@ export class InputsService {
throw new HttpException(err.message, HttpStatus.NOT_FOUND);
}
}
generateInputS3Payload(payload) {
const { credentials, plugin } = payload;
if (!credentials) return payload;
const {
client_aws_access_key_id,
client_aws_secret_access_key,
file_format_params,
format_file_params,
client_bucket,
file_to_extract,
} = credentials;
const formatedPayload = {
plugin,
source_bucket: client_bucket,
source_prefix: file_to_extract,
auth_parameters: {
aws_access_key_id: client_aws_access_key_id,
aws_secret_access_key: client_aws_secret_access_key,
},
file_format_params: file_format_params || format_file_params,
};
return formatedPayload;
}
}