UNPKG

@protobuf-ts/plugin

Version:

The protocol buffer compiler plugin "protobuf-ts" generates TypeScript, gRPC-web, Twirp, and more.

115 lines (114 loc) 4.65 kB
"use strict"; // This proto file is part of protobuf-ts. It defines custom options // that are interpreted by @protobuf-ts/plugin. // // To use the options, add an import to this file: // // import "protobuf-ts.proto"; // // If you use @protobuf-ts/plugin, it should not be necessary to add a proto // path to the file. @protobuf-ts/protoc automatically adds // `--proto_path ./node_modules/@protobuf-ts/plugin` to your commands. Object.defineProperty(exports, "__esModule", { value: true }); exports.server = exports.client = exports.exclude_options = exports.ServerStyleSchema = exports.ServerStyle = exports.ClientStyleSchema = exports.ClientStyle = exports.file_protobuf_ts = void 0; const codegenv1_1 = require("@bufbuild/protobuf/codegenv1"); const wkt_1 = require("@bufbuild/protobuf/wkt"); /** * Describes the file protobuf-ts.proto. */ exports.file_protobuf_ts = codegenv1_1.fileDesc("ChFwcm90b2J1Zi10cy5wcm90bxICdHMqQgoLQ2xpZW50U3R5bGUSDQoJTk9fQ0xJRU5UEAASEgoOR0VORVJJQ19DTElFTlQQARIQCgxHUlBDMV9DTElFTlQQBCpCCgtTZXJ2ZXJTdHlsZRINCglOT19TRVJWRVIQABISCg5HRU5FUklDX1NFUlZFUhABEhAKDEdSUEMxX1NFUlZFUhACOkcKD2V4Y2x1ZGVfb3B0aW9ucxIcLmdvb2dsZS5wcm90b2J1Zi5GaWxlT3B0aW9ucxjluy8gAygJUg5leGNsdWRlT3B0aW9uczpKCgZjbGllbnQSHy5nb29nbGUucHJvdG9idWYuU2VydmljZU9wdGlvbnMY5bsvIAMoDjIPLnRzLkNsaWVudFN0eWxlUgZjbGllbnQ6SgoGc2VydmVyEh8uZ29vZ2xlLnByb3RvYnVmLlNlcnZpY2VPcHRpb25zGOa7LyADKA4yDy50cy5TZXJ2ZXJTdHlsZVIGc2VydmVyYgZwcm90bzM", [wkt_1.file_google_protobuf_descriptor]); /** * The available client styles that can be generated by @protobuf-ts/plugin * * @generated from enum ts.ClientStyle */ var ClientStyle; (function (ClientStyle) { /** * Do not emit a client for this service. * * @generated from enum value: NO_CLIENT = 0; */ ClientStyle[ClientStyle["NO_CLIENT"] = 0] = "NO_CLIENT"; /** * Use the generic implementations of @protobuf-ts/runtime-rpc. * This is the default behaviour. * * @generated from enum value: GENERIC_CLIENT = 1; */ ClientStyle[ClientStyle["GENERIC_CLIENT"] = 1] = "GENERIC_CLIENT"; /** * Generate a client using @grpc/grpc-js (major version 1). * * @generated from enum value: GRPC1_CLIENT = 4; */ ClientStyle[ClientStyle["GRPC1_CLIENT"] = 4] = "GRPC1_CLIENT"; })(ClientStyle = exports.ClientStyle || (exports.ClientStyle = {})); /** * Describes the enum ts.ClientStyle. */ exports.ClientStyleSchema = codegenv1_1.enumDesc(exports.file_protobuf_ts, 0); /** * The available server styles that can be generated by @protobuf-ts/plugin * * @generated from enum ts.ServerStyle */ var ServerStyle; (function (ServerStyle) { /** * Do not emit a server for this service. * This is the default behaviour. * * @generated from enum value: NO_SERVER = 0; */ ServerStyle[ServerStyle["NO_SERVER"] = 0] = "NO_SERVER"; /** * Generate a generic server interface. * Adapters be used to serve the service, for example @protobuf-ts/grpc-backend * for gRPC. * * @generated from enum value: GENERIC_SERVER = 1; */ ServerStyle[ServerStyle["GENERIC_SERVER"] = 1] = "GENERIC_SERVER"; /** * Generate a server for @grpc/grpc-js (major version 1). * * @generated from enum value: GRPC1_SERVER = 2; */ ServerStyle[ServerStyle["GRPC1_SERVER"] = 2] = "GRPC1_SERVER"; })(ServerStyle = exports.ServerStyle || (exports.ServerStyle = {})); /** * Describes the enum ts.ServerStyle. */ exports.ServerStyleSchema = codegenv1_1.enumDesc(exports.file_protobuf_ts, 1); /** * Exclude field or method options from being emitted in reflection data. * * For example, to stop the data of the "google.api.http" method option * from being exported in the reflection information, set the following * file option: * * ```proto * option (ts.exclude_options) = "google.api.http"; * ``` * * The option can be set multiple times. * `*` serves as a wildcard and will greedily match anything. * * @generated from extension: repeated string exclude_options = 777701; */ exports.exclude_options = codegenv1_1.extDesc(exports.file_protobuf_ts, 0); /** * Generate a client for this service with this style. * Can be set multiple times to generate several styles. * * @generated from extension: repeated ts.ClientStyle client = 777701; */ exports.client = codegenv1_1.extDesc(exports.file_protobuf_ts, 1); /** * Generate a server for this service with this style. * Can be set multiple times to generate several styles. * * @generated from extension: repeated ts.ServerStyle server = 777702; */ exports.server = codegenv1_1.extDesc(exports.file_protobuf_ts, 2);