slash-e/proto/buf.gen.yaml
2023-11-25 10:40:16 +08:00

45 lines
1.4 KiB
YAML

version: v1
managed:
enabled: true
go_package_prefix:
default: github.com/yourselfhosted/slash/proto/gen
except:
- buf.build/googleapis/googleapis
plugins:
- plugin: buf.build/protocolbuffers/go:v1.31.0
out: gen
opt:
- paths=source_relative
- plugin: buf.build/grpc/go:v1.3.0
out: gen
opt:
- paths=source_relative
- plugin: buf.build/grpc-ecosystem/gateway:v2.16.1
out: gen
opt:
- paths=source_relative
# Generate types for the web client.
- plugin: buf.build/community/stephenh-ts-proto:v1.152.1
out: ../frontend/web/src/types/proto
# reference: https://github.com/deeplay-io/nice-grpc/blob/master/packages/nice-grpc-web/README.md#using-ts-proto
opt:
- env=browser
- outputServices=generic-definitions
- outputJsonMethods=false
- useExactTypes=false
- esModuleInterop=true
# Generate types for the extension client.
- plugin: buf.build/community/stephenh-ts-proto:v1.152.1
out: ../frontend/extension/src/types/proto
# reference: https://github.com/deeplay-io/nice-grpc/blob/master/packages/nice-grpc-web/README.md#using-ts-proto
opt:
- env=browser
- outputServices=generic-definitions
- outputJsonMethods=false
- useExactTypes=false
- esModuleInterop=true
- plugin: buf.build/community/pseudomuto-doc:v1.5.1
out: gen
opt:
- markdown,README.md,source_relative