Skip to content

Commit 34bae19

Browse files
stephenhKaarel Allemann
authored and
Kaarel Allemann
committed
Allow setting addGrpcMetadata=true w/o using NestJS. Fixes stephenh#188.
1 parent 9a9d054 commit 34bae19

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/options.ts

+4-5
Original file line numberDiff line numberDiff line change
@@ -113,22 +113,21 @@ export function optionsFromParameter(parameter: string): Options {
113113
options.returnObservable = true;
114114
}
115115
}
116+
// Even if not using grpc-web/nestJs output
117+
if (parameter.includes('addGrpcMetadata=true')) {
118+
options.addGrpcMetadata = true;
119+
}
116120
if (parameter.includes('exportCommonSymbols=false')) {
117121
options.exportCommonSymbols = false;
118122
}
119123

120124
if (parameter.includes('nestJs=true')) {
121125
options.nestJs = true;
122-
123126
options.lowerCaseServiceMethods = true;
124127
options.outputEncodeMethods = false;
125128
options.outputJsonMethods = false;
126129
options.outputClientImpl = false;
127130
options.useDate = false;
128-
129-
if (parameter.includes('addGrpcMetadata=true')) {
130-
options.addGrpcMetadata = true;
131-
}
132131
if (parameter.includes('addNestjsRestParameter=true')) {
133132
options.addNestjsRestParameter = true;
134133
}

0 commit comments

Comments
 (0)