mirror of
https://github.com/zhufuyi/sponge.git
synced 2025-09-26 20:51:14 +08:00
fix: issues #120
This commit is contained in:
@@ -369,7 +369,11 @@ func (g *httpAndGRPCPbGenerator) addFields(r replacer.Replacer) []replacer.Field
|
|||||||
fields = append(fields, getGRPCServiceFields()...)
|
fields = append(fields, getGRPCServiceFields()...)
|
||||||
|
|
||||||
if g.suitedMonoRepo {
|
if g.suitedMonoRepo {
|
||||||
fs := serverCodeFields(codeNameGRPCHTTPPb, g.moduleName, g.serverName)
|
serverType := codeNameGRPCHTTPPb
|
||||||
|
if g.isAddDBInitCode {
|
||||||
|
serverType = codeNameGRPC // force to use grpc type when using mono-repo
|
||||||
|
}
|
||||||
|
fs := serverCodeFields(serverType, g.moduleName, g.serverName)
|
||||||
fields = append(fields, fs...)
|
fields = append(fields, fs...)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -105,7 +105,6 @@ function autoDetectTypesProto() {
|
|||||||
if grep -q "$target" "$file"; then
|
if grep -q "$target" "$file"; then
|
||||||
allProtoFiles=$allProtoFiles" $target"
|
allProtoFiles=$allProtoFiles" $target"
|
||||||
sponge patch gen-types-pb --out=. > /dev/null 2>&1
|
sponge patch gen-types-pb --out=. > /dev/null 2>&1
|
||||||
# Note: If the project uses mono-repo type, please manually move "api/types" directory to "../api/types"
|
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
Reference in New Issue
Block a user