grpc-code-gen
Advanced tools
Comparing version 6.1.2 to 6.1.3
@@ -48,7 +48,5 @@ "use strict"; | ||
export default function getGrpcClient<S>(service: IService<S>): S { | ||
const exec = /\\/([^/]+)-proto\\//.exec(service.$FILE_NAME); | ||
const serverName = service.serverName | ||
if (exec) { | ||
const serverName = exec[1]; | ||
if (serverName) { | ||
const serviceConfig = getServiceConfig(serverName, grpcServiceConfigLocal); | ||
@@ -55,0 +53,0 @@ |
@@ -126,2 +126,3 @@ "use strict"; | ||
`const Service: ${typeName} = get<any, string>(grpcObject, '${space}_${service_}.${service.fullName}');`, | ||
`Service.serverName = ${service_};`, | ||
`Service.$FILE_NAME = '${service.filename && service.filename.replace(/\\/g, '/')}';`, | ||
@@ -128,0 +129,0 @@ `export const ${service.name}: ${typeName} = serviceWrapper<${typeName}>(Service);`, |
{ | ||
"name": "grpc-code-gen", | ||
"version": "6.1.2", | ||
"version": "6.1.3", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/yunkeCN/grpc-code-gen.git", |
@@ -47,7 +47,5 @@ import * as path from "path"; | ||
export default function getGrpcClient<S>(service: IService<S>): S { | ||
const exec = /\\/([^/]+)-proto\\//.exec(service.$FILE_NAME); | ||
const serverName = service.serverName | ||
if (exec) { | ||
const serverName = exec[1]; | ||
if (serverName) { | ||
const serviceConfig = getServiceConfig(serverName, grpcServiceConfigLocal); | ||
@@ -54,0 +52,0 @@ |
@@ -178,2 +178,3 @@ import * as fs from "fs-extra"; | ||
`const Service: ${typeName} = get<any, string>(grpcObject, '${space}_${service_}.${service.fullName}');`, | ||
`Service.serverName = ${service_};`, | ||
`Service.$FILE_NAME = '${service.filename && service.filename.replace(/\\/g, '/')}';`, | ||
@@ -180,0 +181,0 @@ `export const ${service.name}: ${typeName} = serviceWrapper<${typeName}>(Service);`, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
100186