FEAT: inputs and transformation using protospack-v2

This commit is contained in:
Gabriel Rosa
2022-08-16 10:18:54 -03:00
parent 5f17a7106f
commit 6807b3e1a9
9 changed files with 343 additions and 331 deletions
@@ -1,13 +1,10 @@
import {
ClientsProviderAsyncOptions,
ClientProviderOptions,
GrpcOptions,
Transport,
} from '@nestjs/microservices';
import {
TransformationPackages,
TransformationProtoFilePath,
} from 'protospack';
import { credentials } from '@grpc/grpc-js';
import { Transformation } from '@dadosfera/protospack-v2';
export class TransformationsClientConfiguration {
public name = 'TransformationsClientConfiguration';
@@ -15,9 +12,9 @@ export class TransformationsClientConfiguration {
transport: Transport.GRPC,
options: {
url: process.env.INFACTORY_URL,
package: TransformationPackages,
credentials: credentials.createSsl(),
protoPath: TransformationProtoFilePath,
package: [Transformation.ProtoPackages.WritePackage],
credentials: process.env.LOCAL_ENV ? undefined : credentials.createSsl(),
protoPath: [Transformation.ProtoPaths.WriteFilePath],
loader: {
enums: String,
objects: true,
@@ -26,7 +23,7 @@ export class TransformationsClientConfiguration {
},
};
providerOptions: ClientsProviderAsyncOptions = {
providerOptions: ClientProviderOptions = {
name: this.name,
...this.config,
};