File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed
packages/nestjs-grpc-reflection Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @atls/nestjs-grpc-reflection" ,
3
- "version" : " 1.0.4 " ,
3
+ "version" : " 1.0.5 " ,
4
4
"license" : " BSD-3-Clause" ,
5
5
"type" : " module" ,
6
6
"exports" : {
7
7
"." : " ./src/index.ts" ,
8
8
"./proto" : {
9
- "import" : " ./proto/index.js " ,
10
- "require" : " ./proto/index.js " ,
9
+ "import" : " ./proto/index.cjs " ,
10
+ "require" : " ./proto/index.cjs " ,
11
11
"types" : " ./proto/index.d.ts"
12
12
}
13
13
},
62
62
"default" : " ./dist/index.js"
63
63
},
64
64
"./proto" : {
65
- "import" : " ./proto/index.js " ,
66
- "require" : " ./proto/index.js " ,
65
+ "import" : " ./proto/index.cjs " ,
66
+ "require" : " ./proto/index.cjs " ,
67
67
"types" : " ./proto/index.d.ts"
68
68
}
69
69
},
File renamed without changes.
Original file line number Diff line number Diff line change 1
1
import type { ServiceDefinition } from '@grpc/proto-loader'
2
2
3
3
import { Injectable } from '@nestjs/common'
4
- import { FileDescriptorProto } from 'google-protobuf/google/protobuf/descriptor_pb.js'
4
+ import google from 'google-protobuf/google/protobuf/descriptor_pb.js'
5
5
6
6
@Injectable ( )
7
7
export class GrpcServicesRegistry {
@@ -27,7 +27,7 @@ export class GrpcServicesRegistry {
27
27
28
28
getFileDescriptorProtoByFileContainingSymbol (
29
29
fileContainingSymbol : string
30
- ) : FileDescriptorProto | undefined {
30
+ ) : google . FileDescriptorProto | undefined {
31
31
// @ts -expect-error correct return type
32
32
return this . services . reduce < FileDescriptorProto | undefined > ( ( fileDescriptorProto , service ) => {
33
33
if ( fileDescriptorProto ) {
@@ -44,7 +44,7 @@ export class GrpcServicesRegistry {
44
44
45
45
if ( method . path . includes ( fileContainingSymbol ) ) {
46
46
return method . requestType . fileDescriptorProtos . find ( ( fdp ) => {
47
- const fileDescriptor = FileDescriptorProto . deserializeBinary ( fdp )
47
+ const fileDescriptor = google . FileDescriptorProto . deserializeBinary ( fdp )
48
48
49
49
const filePackage = fileDescriptor . getPackage ( )
50
50
You can’t perform that action at this time.
0 commit comments