2023-07-29 19:44:09 +08:00
|
|
|
version: v1
|
2023-07-29 20:52:45 +08:00
|
|
|
managed:
|
|
|
|
enabled: true
|
|
|
|
go_package_prefix:
|
|
|
|
default: github.com/usememos/memos/proto/gen
|
2023-07-30 00:00:49 +08:00
|
|
|
except:
|
|
|
|
- buf.build/googleapis/googleapis
|
2023-07-29 19:44:09 +08:00
|
|
|
plugins:
|
2024-04-27 00:37:45 +08:00
|
|
|
- plugin: buf.build/protocolbuffers/go
|
2023-07-29 20:52:45 +08:00
|
|
|
out: gen
|
|
|
|
opt:
|
|
|
|
- paths=source_relative
|
2024-04-27 00:37:45 +08:00
|
|
|
- plugin: buf.build/grpc/go
|
2023-07-29 20:52:45 +08:00
|
|
|
out: gen
|
|
|
|
opt:
|
|
|
|
- paths=source_relative
|
2024-04-27 00:37:45 +08:00
|
|
|
- plugin: buf.build/grpc-ecosystem/gateway
|
2023-07-29 20:52:45 +08:00
|
|
|
out: gen
|
|
|
|
opt:
|
|
|
|
- paths=source_relative
|
2024-04-27 00:37:45 +08:00
|
|
|
- plugin: buf.build/grpc-ecosystem/openapiv2
|
2024-04-16 22:33:25 +08:00
|
|
|
out: ../docs
|
2024-01-29 22:05:33 +08:00
|
|
|
opt: output_format=yaml,allow_merge=true
|
2023-08-21 02:09:41 +08:00
|
|
|
# Build the TypeScript definitions for the web.
|
2024-09-21 17:25:57 +08:00
|
|
|
- plugin: buf.build/community/stephenh-ts-proto
|
2023-09-17 20:55:05 +08:00
|
|
|
out: ../web/src/types/proto
|
2023-09-17 19:20:03 +08:00
|
|
|
# reference: https://github.com/deeplay-io/nice-grpc/blob/master/packages/nice-grpc-web/README.md#using-ts-proto
|
|
|
|
opt:
|
|
|
|
- env=browser
|
|
|
|
- useOptionals=messages
|
|
|
|
- outputServices=generic-definitions
|
|
|
|
- outputJsonMethods=false
|
|
|
|
- useExactTypes=false
|
|
|
|
- esModuleInterop=true
|
2024-02-13 09:30:28 +08:00
|
|
|
- stringEnums=true
|