version: v2
clean: true
inputs:
  - directory: proto

managed:
  enabled: true
  override:
    - file_option: go_package_prefix
      value: github.com/spotdemo4/trevstack/server/internal/connect
  disable:
    - file_option: go_package
      module: buf.build/bufbuild/protovalidate

plugins:
  - local: protoc-gen-go
    out: server/internal/connect
    opt: paths=source_relative

  - local: protoc-gen-connect-go
    out: server/internal/connect
    opt: paths=source_relative

  - local: protoc-gen-es
    out: client/src/lib/connect
    opt: target=ts
    include_imports: true

  - local: protoc-gen-connect-openapi
    out: client/static/openapi
    strategy: all
    opt:
      - base=openapi.yaml
      - path=openapi.yaml
