Skip to content

Commit

Permalink
Follow-up on #268: Fix typo, reformat option description, add option …
Browse files Browse the repository at this point in the history
…to the manual.
  • Loading branch information
timostamm committed Jun 16, 2022
1 parent b3f912c commit 6d76c37
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
5 changes: 5 additions & 0 deletions MANUAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,11 @@ Available plugin options:
- "force_server_none"
Do not generate rpc servers, ignore options in proto files.
- "force_disable_services"
Do not generate anything for service definitions, and ignore options in proto
files. This is the same as setting both options `force_server_none` and
`force_client_none`, but also stops generating service metadata.
- "optimize_speed"
Sets optimize_for = SPEED for proto files that have no file option
'option optimize_for'. Since SPEED is the default, this option has no effect.
Expand Down
16 changes: 8 additions & 8 deletions packages/plugin/src/protobufts-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,6 @@ export class ProtobuftsPlugin extends PluginBase {
"the default behaviour, this option has no effect.",
excludes: ['eslint_disable'],
},
force_disable_services: {
description: "Do not generate anything for service definitions, and \n" +
"ignore options in proto files. This is the same as setting both \n" +
"`force_server_none` and `force_client_none`, but also stops \n" +
"generating service metadata."
excludes: ['client_generic', 'client_grpc1', 'server_generic', 'server_grpc1']
},
add_pb_suffix: {
description: "Adds the suffix `_pb` to the names of all generated files. This will become the \n" +
"default behaviour in the next major release.",
Expand Down Expand Up @@ -203,6 +196,13 @@ export class ProtobuftsPlugin extends PluginBase {
description: "Do not generate rpc servers, ignore options in proto files.",
},

force_disable_services: {
description: "Do not generate anything for service definitions, and ignore options in proto \n" +
"files. This is the same as setting both options `force_server_none` and \n" +
"`force_client_none`, but also stops generating service metadata.",
excludes: ['client_generic', 'client_grpc1', 'server_generic', 'server_grpc1']
},

// optimization
optimize_speed: {
description: "Sets optimize_for = SPEED for proto files that have no file option \n" +
Expand Down Expand Up @@ -324,7 +324,7 @@ export class ProtobuftsPlugin extends PluginBase {
if (ServiceDescriptorProto.is(descriptor)) {
// service type
genServiceType.generateServiceType(outMain, descriptor);

// clients
const clientStyles = optionResolver.getClientStyles(descriptor);
if (clientStyles.includes(ClientStyle.GENERIC_CLIENT)) {
Expand Down

0 comments on commit 6d76c37

Please sign in to comment.