import { OutputPackages, OutputProtoFilePath } from '@victorradael/protospack'; import { ClientOptions, Transport } from '@nestjs/microservices'; import { credentials } from '@grpc/grpc-js'; export class OutputsClientConfiguration { config(): ClientOptions { return { transport: Transport.GRPC, options: { url: process.env.OTFACTORY_URL, package: OutputPackages, credentials: process.env.LOCAL_ENV ? undefined : credentials.createSsl(), protoPath: OutputProtoFilePath, loader: { enums: String, objects: true, arrays: true, }, }, }; } }