Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions buf-ts.gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@ version: v2
inputs:
- directory: .
paths:
- api/proto/teleport/accesslist/
- api/proto/teleport/devicetrust/
- api/proto/teleport/header/
- api/proto/teleport/trait/
- api/proto/teleport/legacy/types/trusted_device_requirement.proto
- api/proto/teleport/userpreferences/
- proto/prehog/
- proto/teleport/lib/teleterm/
Expand All @@ -33,10 +28,12 @@ plugins:
- protoc-gen-ts
out: gen/proto/ts
opt:
# the next time we tweak the ts codegen we should put the options in
# alphabetical order
- eslint_disable
- add_pb_suffix
- eslint_disable
# By default, only the proto files passed as input to protoc are generated, not the files they
# import (with the exception of well-known types which are always generated when imported).
# generate_dependencies generates code for dependencies too.
Comment on lines +33 to +35
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe that the wording here is wrong; we are still passing the whole directory of compiled protos to the plugin like before, this option lets the plugin figure out what to generate based on the list of files we are asking it to generate (in the paths list) instead of having to trim down the list ourselves.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is copied from protobuf-ts docs, minus the last paragraph. 😏 We no longer have to manually include dependencies in the list so I think the comment is correct.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can see where their interpretation and my misunderstanding comes from; by "the proto files passed as input" they mean the list of proto files - all dependencies are always compiled and passed to the plugin. I doublechecked the implementation because the wording makes it seem like protobuf-ts goes and reads extra files independently, which thankfully is not what's happening.

- generate_dependencies
- server_grpc1
- ts_nocheck
strategy: all
2 changes: 1 addition & 1 deletion gen/proto/ts/google/protobuf/descriptor_pb.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion gen/proto/ts/google/protobuf/duration_pb.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion gen/proto/ts/google/protobuf/empty_pb.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

338 changes: 0 additions & 338 deletions gen/proto/ts/google/protobuf/field_mask_pb.ts

This file was deleted.

2 changes: 1 addition & 1 deletion gen/proto/ts/google/protobuf/timestamp_pb.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading