From 26d18cd1d6ebef4aae575622a8949860918c6037 Mon Sep 17 00:00:00 2001 From: Darun Seethammagari Date: Wed, 13 Dec 2023 11:59:18 -0800 Subject: [PATCH 01/18] Basic gRPC endpoint --- runner/package.json | 6 + runner/protos/runner.proto | 60 + .../generated/google/protobuf/descriptor.ts | 4510 +++++++++++++++++ runner/src/generated/runner.client.ts | 76 + runner/src/generated/runner.grpc-client.ts | 83 + runner/src/generated/runner.grpc-server.ts | 77 + runner/src/generated/runner.ts | 514 ++ runner/src/generated/tsconfig.json | 9 + runner/src/index.ts | 7 +- runner/src/service/index.ts | 1 + runner/src/service/runner-server.ts | 22 + runner/src/service/runner-service.ts | 32 + runner/tsconfig.json | 2 +- 13 files changed, 5396 insertions(+), 3 deletions(-) create mode 100644 runner/protos/runner.proto create mode 100644 runner/src/generated/google/protobuf/descriptor.ts create mode 100644 runner/src/generated/runner.client.ts create mode 100644 runner/src/generated/runner.grpc-client.ts create mode 100644 runner/src/generated/runner.grpc-server.ts create mode 100644 runner/src/generated/runner.ts create mode 100644 runner/src/generated/tsconfig.json create mode 100644 runner/src/service/index.ts create mode 100644 runner/src/service/runner-server.ts create mode 100644 runner/src/service/runner-service.ts diff --git a/runner/package.json b/runner/package.json index 213cc4e53..ffd680896 100644 --- a/runner/package.json +++ b/runner/package.json @@ -43,8 +43,14 @@ }, "dependencies": { "@aws-sdk/client-s3": "^3.414.0", + "@grpc/grpc-js": "^1.9.12", + "@grpc/proto-loader": "^0.7.10", "@near-lake/primitives": "^0.1.0", + "@protobuf-ts/plugin": "^2.9.3", + "@protobuf-ts/runtime": "^2.9.3", "express": "^4.18.2", + "grpc": "^1.24.11", + "long": "^5.2.3", "node-fetch": "^2.6.11", "node-sql-parser": "^4.10.0", "pg": "^8.11.1", diff --git a/runner/protos/runner.proto b/runner/protos/runner.proto new file mode 100644 index 000000000..4ea85fb06 --- /dev/null +++ b/runner/protos/runner.proto @@ -0,0 +1,60 @@ +syntax = "proto3"; +package spec; + +import "protobuf-ts.proto"; + +service Runner { + option (ts.server) = GRPC1_SERVER; + option (ts.client) = GRPC1_CLIENT; + // Starts a new Runner stream worker + rpc StartStream (StartStreamRequest) returns (StartStreamResponse); + + // Stops an existing Runner stream worker + rpc StopStream (StopStreamRequest) returns (StopStreamResponse); + + // Lists all Runner stream workers + rpc ListStreams (ListStreamsRequest) returns (ListStreamsResponse); +} + +// Start Stream Request +message StartStreamRequest { + int64 start_block_height = 1; + string indexer_config = 2; // JSON containing code, schema, etc. + string stream_id = 3; +} + +// Start Stream Response +message StartStreamResponse { + string stream_id = 1; +} + +// Stop Stream Request +message StopStreamRequest { + string stream_id = 1; +} + +// Stop Stream Response +message StopStreamResponse { + string stream_id = 1; + string status = 2; +} + +// List Stream Request +message ListStreamsRequest { + string placeholder = 1; +} + +// List Stream Response +message ListStreamsResponse { + // List of all streams, including stopped or crashed ones + repeated StreamInfo streams = 1; +} + +// Information about a single BlockStream instance. +message StreamInfo { + string stream_id = 1; + int64 start_block_height = 2; + string indexer_name = 3; + string chain_id = 4; + string status = 5; +} \ No newline at end of file diff --git a/runner/src/generated/google/protobuf/descriptor.ts b/runner/src/generated/google/protobuf/descriptor.ts new file mode 100644 index 000000000..153eea9a2 --- /dev/null +++ b/runner/src/generated/google/protobuf/descriptor.ts @@ -0,0 +1,4510 @@ +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter long_type_string,eslint_disable +// @generated from protobuf file "google/protobuf/descriptor.proto" (package "google.protobuf", syntax proto2) +// tslint:disable +// +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// +// Author: kenton@google.com (Kenton Varda) +// Based on original Protocol Buffers design by +// Sanjay Ghemawat, Jeff Dean, and others. +// +// The messages in this file describe the definitions found in .proto files. +// A valid .proto file can be translated directly to a FileDescriptorProto +// without any other information (e.g. without reading its imports). +// +import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; +import type { IBinaryWriter } from "@protobuf-ts/runtime"; +import { WireType } from "@protobuf-ts/runtime"; +import type { BinaryReadOptions } from "@protobuf-ts/runtime"; +import type { IBinaryReader } from "@protobuf-ts/runtime"; +import { UnknownFieldHandler } from "@protobuf-ts/runtime"; +import type { PartialMessage } from "@protobuf-ts/runtime"; +import { reflectionMergePartial } from "@protobuf-ts/runtime"; +import { MessageType } from "@protobuf-ts/runtime"; +/** + * The protocol compiler can output a FileDescriptorSet containing the .proto + * files it parses. + * + * @generated from protobuf message google.protobuf.FileDescriptorSet + */ +export interface FileDescriptorSet { + /** + * @generated from protobuf field: repeated google.protobuf.FileDescriptorProto file = 1; + */ + file: FileDescriptorProto[]; +} +/** + * Describes a complete .proto file. + * + * @generated from protobuf message google.protobuf.FileDescriptorProto + */ +export interface FileDescriptorProto { + /** + * @generated from protobuf field: optional string name = 1; + */ + name?: string; // file name, relative to root of source tree + /** + * @generated from protobuf field: optional string package = 2; + */ + package?: string; // e.g. "foo", "foo.bar", etc. + /** + * Names of files imported by this file. + * + * @generated from protobuf field: repeated string dependency = 3; + */ + dependency: string[]; + /** + * Indexes of the public imported files in the dependency list above. + * + * @generated from protobuf field: repeated int32 public_dependency = 10; + */ + publicDependency: number[]; + /** + * Indexes of the weak imported files in the dependency list. + * For Google-internal migration only. Do not use. + * + * @generated from protobuf field: repeated int32 weak_dependency = 11; + */ + weakDependency: number[]; + /** + * All top-level definitions in this file. + * + * @generated from protobuf field: repeated google.protobuf.DescriptorProto message_type = 4; + */ + messageType: DescriptorProto[]; + /** + * @generated from protobuf field: repeated google.protobuf.EnumDescriptorProto enum_type = 5; + */ + enumType: EnumDescriptorProto[]; + /** + * @generated from protobuf field: repeated google.protobuf.ServiceDescriptorProto service = 6; + */ + service: ServiceDescriptorProto[]; + /** + * @generated from protobuf field: repeated google.protobuf.FieldDescriptorProto extension = 7; + */ + extension: FieldDescriptorProto[]; + /** + * @generated from protobuf field: optional google.protobuf.FileOptions options = 8; + */ + options?: FileOptions; + /** + * This field contains optional information about the original source code. + * You may safely remove this entire field without harming runtime + * functionality of the descriptors -- the information is needed only by + * development tools. + * + * @generated from protobuf field: optional google.protobuf.SourceCodeInfo source_code_info = 9; + */ + sourceCodeInfo?: SourceCodeInfo; + /** + * The syntax of the proto file. + * The supported values are "proto2", "proto3", and "editions". + * + * If `edition` is present, this value must be "editions". + * + * @generated from protobuf field: optional string syntax = 12; + */ + syntax?: string; + /** + * The edition of the proto file. + * + * @generated from protobuf field: optional google.protobuf.Edition edition = 14; + */ + edition?: Edition; +} +/** + * Describes a message type. + * + * @generated from protobuf message google.protobuf.DescriptorProto + */ +export interface DescriptorProto { + /** + * @generated from protobuf field: optional string name = 1; + */ + name?: string; + /** + * @generated from protobuf field: repeated google.protobuf.FieldDescriptorProto field = 2; + */ + field: FieldDescriptorProto[]; + /** + * @generated from protobuf field: repeated google.protobuf.FieldDescriptorProto extension = 6; + */ + extension: FieldDescriptorProto[]; + /** + * @generated from protobuf field: repeated google.protobuf.DescriptorProto nested_type = 3; + */ + nestedType: DescriptorProto[]; + /** + * @generated from protobuf field: repeated google.protobuf.EnumDescriptorProto enum_type = 4; + */ + enumType: EnumDescriptorProto[]; + /** + * @generated from protobuf field: repeated google.protobuf.DescriptorProto.ExtensionRange extension_range = 5; + */ + extensionRange: DescriptorProto_ExtensionRange[]; + /** + * @generated from protobuf field: repeated google.protobuf.OneofDescriptorProto oneof_decl = 8; + */ + oneofDecl: OneofDescriptorProto[]; + /** + * @generated from protobuf field: optional google.protobuf.MessageOptions options = 7; + */ + options?: MessageOptions; + /** + * @generated from protobuf field: repeated google.protobuf.DescriptorProto.ReservedRange reserved_range = 9; + */ + reservedRange: DescriptorProto_ReservedRange[]; + /** + * Reserved field names, which may not be used by fields in the same message. + * A given name may only be reserved once. + * + * @generated from protobuf field: repeated string reserved_name = 10; + */ + reservedName: string[]; +} +/** + * @generated from protobuf message google.protobuf.DescriptorProto.ExtensionRange + */ +export interface DescriptorProto_ExtensionRange { + /** + * @generated from protobuf field: optional int32 start = 1; + */ + start?: number; // Inclusive. + /** + * @generated from protobuf field: optional int32 end = 2; + */ + end?: number; // Exclusive. + /** + * @generated from protobuf field: optional google.protobuf.ExtensionRangeOptions options = 3; + */ + options?: ExtensionRangeOptions; +} +/** + * Range of reserved tag numbers. Reserved tag numbers may not be used by + * fields or extension ranges in the same message. Reserved ranges may + * not overlap. + * + * @generated from protobuf message google.protobuf.DescriptorProto.ReservedRange + */ +export interface DescriptorProto_ReservedRange { + /** + * @generated from protobuf field: optional int32 start = 1; + */ + start?: number; // Inclusive. + /** + * @generated from protobuf field: optional int32 end = 2; + */ + end?: number; // Exclusive. +} +/** + * @generated from protobuf message google.protobuf.ExtensionRangeOptions + */ +export interface ExtensionRangeOptions { + /** + * The parser stores options it doesn't recognize here. See above. + * + * @generated from protobuf field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; + */ + uninterpretedOption: UninterpretedOption[]; + /** + * For external users: DO NOT USE. We are in the process of open sourcing + * extension declaration and executing internal cleanups before it can be + * used externally. + * + * @generated from protobuf field: repeated google.protobuf.ExtensionRangeOptions.Declaration declaration = 2; + */ + declaration: ExtensionRangeOptions_Declaration[]; + /** + * Any features defined in the specific edition. + * + * @generated from protobuf field: optional google.protobuf.FeatureSet features = 50; + */ + features?: FeatureSet; + /** + * The verification state of the range. + * TODO: flip the default to DECLARATION once all empty ranges + * are marked as UNVERIFIED. + * + * @generated from protobuf field: optional google.protobuf.ExtensionRangeOptions.VerificationState verification = 3; + */ + verification?: ExtensionRangeOptions_VerificationState; +} +/** + * @generated from protobuf message google.protobuf.ExtensionRangeOptions.Declaration + */ +export interface ExtensionRangeOptions_Declaration { + /** + * The extension number declared within the extension range. + * + * @generated from protobuf field: optional int32 number = 1; + */ + number?: number; + /** + * The fully-qualified name of the extension field. There must be a leading + * dot in front of the full name. + * + * @generated from protobuf field: optional string full_name = 2; + */ + fullName?: string; + /** + * The fully-qualified type name of the extension field. Unlike + * Metadata.type, Declaration.type must have a leading dot for messages + * and enums. + * + * @generated from protobuf field: optional string type = 3; + */ + type?: string; + /** + * If true, indicates that the number is reserved in the extension range, + * and any extension field with the number will fail to compile. Set this + * when a declared extension field is deleted. + * + * @generated from protobuf field: optional bool reserved = 5; + */ + reserved?: boolean; + /** + * If true, indicates that the extension must be defined as repeated. + * Otherwise the extension must be defined as optional. + * + * @generated from protobuf field: optional bool repeated = 6; + */ + repeated?: boolean; +} +/** + * The verification state of the extension range. + * + * @generated from protobuf enum google.protobuf.ExtensionRangeOptions.VerificationState + */ +export enum ExtensionRangeOptions_VerificationState { + /** + * All the extensions of the range must be declared. + * + * @generated from protobuf enum value: DECLARATION = 0; + */ + DECLARATION = 0, + /** + * @generated from protobuf enum value: UNVERIFIED = 1; + */ + UNVERIFIED = 1 +} +/** + * Describes a field within a message. + * + * @generated from protobuf message google.protobuf.FieldDescriptorProto + */ +export interface FieldDescriptorProto { + /** + * @generated from protobuf field: optional string name = 1; + */ + name?: string; + /** + * @generated from protobuf field: optional int32 number = 3; + */ + number?: number; + /** + * @generated from protobuf field: optional google.protobuf.FieldDescriptorProto.Label label = 4; + */ + label?: FieldDescriptorProto_Label; + /** + * If type_name is set, this need not be set. If both this and type_name + * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. + * + * @generated from protobuf field: optional google.protobuf.FieldDescriptorProto.Type type = 5; + */ + type?: FieldDescriptorProto_Type; + /** + * For message and enum types, this is the name of the type. If the name + * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping + * rules are used to find the type (i.e. first the nested types within this + * message are searched, then within the parent, on up to the root + * namespace). + * + * @generated from protobuf field: optional string type_name = 6; + */ + typeName?: string; + /** + * For extensions, this is the name of the type being extended. It is + * resolved in the same manner as type_name. + * + * @generated from protobuf field: optional string extendee = 2; + */ + extendee?: string; + /** + * For numeric types, contains the original text representation of the value. + * For booleans, "true" or "false". + * For strings, contains the default text contents (not escaped in any way). + * For bytes, contains the C escaped value. All bytes >= 128 are escaped. + * + * @generated from protobuf field: optional string default_value = 7; + */ + defaultValue?: string; + /** + * If set, gives the index of a oneof in the containing type's oneof_decl + * list. This field is a member of that oneof. + * + * @generated from protobuf field: optional int32 oneof_index = 9; + */ + oneofIndex?: number; + /** + * JSON name of this field. The value is set by protocol compiler. If the + * user has set a "json_name" option on this field, that option's value + * will be used. Otherwise, it's deduced from the field's name by converting + * it to camelCase. + * + * @generated from protobuf field: optional string json_name = 10; + */ + jsonName?: string; + /** + * @generated from protobuf field: optional google.protobuf.FieldOptions options = 8; + */ + options?: FieldOptions; + /** + * If true, this is a proto3 "optional". When a proto3 field is optional, it + * tracks presence regardless of field type. + * + * When proto3_optional is true, this field must be belong to a oneof to + * signal to old proto3 clients that presence is tracked for this field. This + * oneof is known as a "synthetic" oneof, and this field must be its sole + * member (each proto3 optional field gets its own synthetic oneof). Synthetic + * oneofs exist in the descriptor only, and do not generate any API. Synthetic + * oneofs must be ordered after all "real" oneofs. + * + * For message fields, proto3_optional doesn't create any semantic change, + * since non-repeated message fields always track presence. However it still + * indicates the semantic detail of whether the user wrote "optional" or not. + * This can be useful for round-tripping the .proto file. For consistency we + * give message fields a synthetic oneof also, even though it is not required + * to track presence. This is especially important because the parser can't + * tell if a field is a message or an enum, so it must always create a + * synthetic oneof. + * + * Proto2 optional fields do not set this flag, because they already indicate + * optional with `LABEL_OPTIONAL`. + * + * @generated from protobuf field: optional bool proto3_optional = 17; + */ + proto3Optional?: boolean; +} +/** + * @generated from protobuf enum google.protobuf.FieldDescriptorProto.Type + */ +export enum FieldDescriptorProto_Type { + /** + * @generated synthetic value - protobuf-ts requires all enums to have a 0 value + */ + UNSPECIFIED$ = 0, + /** + * 0 is reserved for errors. + * Order is weird for historical reasons. + * + * @generated from protobuf enum value: TYPE_DOUBLE = 1; + */ + DOUBLE = 1, + /** + * @generated from protobuf enum value: TYPE_FLOAT = 2; + */ + FLOAT = 2, + /** + * Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if + * negative values are likely. + * + * @generated from protobuf enum value: TYPE_INT64 = 3; + */ + INT64 = 3, + /** + * @generated from protobuf enum value: TYPE_UINT64 = 4; + */ + UINT64 = 4, + /** + * Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if + * negative values are likely. + * + * @generated from protobuf enum value: TYPE_INT32 = 5; + */ + INT32 = 5, + /** + * @generated from protobuf enum value: TYPE_FIXED64 = 6; + */ + FIXED64 = 6, + /** + * @generated from protobuf enum value: TYPE_FIXED32 = 7; + */ + FIXED32 = 7, + /** + * @generated from protobuf enum value: TYPE_BOOL = 8; + */ + BOOL = 8, + /** + * @generated from protobuf enum value: TYPE_STRING = 9; + */ + STRING = 9, + /** + * Tag-delimited aggregate. + * Group type is deprecated and not supported after google.protobuf. However, Proto3 + * implementations should still be able to parse the group wire format and + * treat group fields as unknown fields. In Editions, the group wire format + * can be enabled via the `message_encoding` feature. + * + * @generated from protobuf enum value: TYPE_GROUP = 10; + */ + GROUP = 10, + /** + * Length-delimited aggregate. + * + * @generated from protobuf enum value: TYPE_MESSAGE = 11; + */ + MESSAGE = 11, + /** + * New in version 2. + * + * @generated from protobuf enum value: TYPE_BYTES = 12; + */ + BYTES = 12, + /** + * @generated from protobuf enum value: TYPE_UINT32 = 13; + */ + UINT32 = 13, + /** + * @generated from protobuf enum value: TYPE_ENUM = 14; + */ + ENUM = 14, + /** + * @generated from protobuf enum value: TYPE_SFIXED32 = 15; + */ + SFIXED32 = 15, + /** + * @generated from protobuf enum value: TYPE_SFIXED64 = 16; + */ + SFIXED64 = 16, + /** + * Uses ZigZag encoding. + * + * @generated from protobuf enum value: TYPE_SINT32 = 17; + */ + SINT32 = 17, + /** + * Uses ZigZag encoding. + * + * @generated from protobuf enum value: TYPE_SINT64 = 18; + */ + SINT64 = 18 +} +/** + * @generated from protobuf enum google.protobuf.FieldDescriptorProto.Label + */ +export enum FieldDescriptorProto_Label { + /** + * @generated synthetic value - protobuf-ts requires all enums to have a 0 value + */ + UNSPECIFIED$ = 0, + /** + * 0 is reserved for errors + * + * @generated from protobuf enum value: LABEL_OPTIONAL = 1; + */ + OPTIONAL = 1, + /** + * @generated from protobuf enum value: LABEL_REPEATED = 3; + */ + REPEATED = 3, + /** + * The required label is only allowed in google.protobuf. In proto3 and Editions + * it's explicitly prohibited. In Editions, the `field_presence` feature + * can be used to get this behavior. + * + * @generated from protobuf enum value: LABEL_REQUIRED = 2; + */ + REQUIRED = 2 +} +/** + * Describes a oneof. + * + * @generated from protobuf message google.protobuf.OneofDescriptorProto + */ +export interface OneofDescriptorProto { + /** + * @generated from protobuf field: optional string name = 1; + */ + name?: string; + /** + * @generated from protobuf field: optional google.protobuf.OneofOptions options = 2; + */ + options?: OneofOptions; +} +/** + * Describes an enum type. + * + * @generated from protobuf message google.protobuf.EnumDescriptorProto + */ +export interface EnumDescriptorProto { + /** + * @generated from protobuf field: optional string name = 1; + */ + name?: string; + /** + * @generated from protobuf field: repeated google.protobuf.EnumValueDescriptorProto value = 2; + */ + value: EnumValueDescriptorProto[]; + /** + * @generated from protobuf field: optional google.protobuf.EnumOptions options = 3; + */ + options?: EnumOptions; + /** + * Range of reserved numeric values. Reserved numeric values may not be used + * by enum values in the same enum declaration. Reserved ranges may not + * overlap. + * + * @generated from protobuf field: repeated google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4; + */ + reservedRange: EnumDescriptorProto_EnumReservedRange[]; + /** + * Reserved enum value names, which may not be reused. A given name may only + * be reserved once. + * + * @generated from protobuf field: repeated string reserved_name = 5; + */ + reservedName: string[]; +} +/** + * Range of reserved numeric values. Reserved values may not be used by + * entries in the same enum. Reserved ranges may not overlap. + * + * Note that this is distinct from DescriptorProto.ReservedRange in that it + * is inclusive such that it can appropriately represent the entire int32 + * domain. + * + * @generated from protobuf message google.protobuf.EnumDescriptorProto.EnumReservedRange + */ +export interface EnumDescriptorProto_EnumReservedRange { + /** + * @generated from protobuf field: optional int32 start = 1; + */ + start?: number; // Inclusive. + /** + * @generated from protobuf field: optional int32 end = 2; + */ + end?: number; // Inclusive. +} +/** + * Describes a value within an enum. + * + * @generated from protobuf message google.protobuf.EnumValueDescriptorProto + */ +export interface EnumValueDescriptorProto { + /** + * @generated from protobuf field: optional string name = 1; + */ + name?: string; + /** + * @generated from protobuf field: optional int32 number = 2; + */ + number?: number; + /** + * @generated from protobuf field: optional google.protobuf.EnumValueOptions options = 3; + */ + options?: EnumValueOptions; +} +/** + * Describes a service. + * + * @generated from protobuf message google.protobuf.ServiceDescriptorProto + */ +export interface ServiceDescriptorProto { + /** + * @generated from protobuf field: optional string name = 1; + */ + name?: string; + /** + * @generated from protobuf field: repeated google.protobuf.MethodDescriptorProto method = 2; + */ + method: MethodDescriptorProto[]; + /** + * @generated from protobuf field: optional google.protobuf.ServiceOptions options = 3; + */ + options?: ServiceOptions; +} +/** + * Describes a method of a service. + * + * @generated from protobuf message google.protobuf.MethodDescriptorProto + */ +export interface MethodDescriptorProto { + /** + * @generated from protobuf field: optional string name = 1; + */ + name?: string; + /** + * Input and output type names. These are resolved in the same way as + * FieldDescriptorProto.type_name, but must refer to a message type. + * + * @generated from protobuf field: optional string input_type = 2; + */ + inputType?: string; + /** + * @generated from protobuf field: optional string output_type = 3; + */ + outputType?: string; + /** + * @generated from protobuf field: optional google.protobuf.MethodOptions options = 4; + */ + options?: MethodOptions; + /** + * Identifies if client streams multiple client messages + * + * @generated from protobuf field: optional bool client_streaming = 5; + */ + clientStreaming?: boolean; + /** + * Identifies if server streams multiple server messages + * + * @generated from protobuf field: optional bool server_streaming = 6; + */ + serverStreaming?: boolean; +} +// =================================================================== +// Options + +// Each of the definitions above may have "options" attached. These are +// just annotations which may cause code to be generated slightly differently +// or may contain hints for code that manipulates protocol messages. +// +// Clients may define custom options as extensions of the *Options messages. +// These extensions may not yet be known at parsing time, so the parser cannot +// store the values in them. Instead it stores them in a field in the *Options +// message called uninterpreted_option. This field must have the same name +// across all *Options messages. We then use this field to populate the +// extensions when we build a descriptor, at which point all protos have been +// parsed and so all extensions are known. +// +// Extension numbers for custom options may be chosen as follows: +// * For options which will only be used within a single application or +// organization, or for experimental options, use field numbers 50000 +// through 99999. It is up to you to ensure that you do not use the +// same number for multiple options. +// * For options which will be published and used publicly by multiple +// independent entities, e-mail protobuf-global-extension-registry@google.com +// to reserve extension numbers. Simply provide your project name (e.g. +// Objective-C plugin) and your project website (if available) -- there's no +// need to explain how you intend to use them. Usually you only need one +// extension number. You can declare multiple options with only one extension +// number by putting them in a sub-message. See the Custom Options section of +// the docs for examples: +// https://developers.google.com/protocol-buffers/docs/proto#options +// If this turns out to be popular, a web service will be set up +// to automatically assign option numbers. + +/** + * @generated from protobuf message google.protobuf.FileOptions + */ +export interface FileOptions { + /** + * Sets the Java package where classes generated from this .proto will be + * placed. By default, the proto package is used, but this is often + * inappropriate because proto packages do not normally start with backwards + * domain names. + * + * @generated from protobuf field: optional string java_package = 1; + */ + javaPackage?: string; + /** + * Controls the name of the wrapper Java class generated for the .proto file. + * That class will always contain the .proto file's getDescriptor() method as + * well as any top-level extensions defined in the .proto file. + * If java_multiple_files is disabled, then all the other classes from the + * .proto file will be nested inside the single wrapper outer class. + * + * @generated from protobuf field: optional string java_outer_classname = 8; + */ + javaOuterClassname?: string; + /** + * If enabled, then the Java code generator will generate a separate .java + * file for each top-level message, enum, and service defined in the .proto + * file. Thus, these types will *not* be nested inside the wrapper class + * named by java_outer_classname. However, the wrapper class will still be + * generated to contain the file's getDescriptor() method as well as any + * top-level extensions defined in the file. + * + * @generated from protobuf field: optional bool java_multiple_files = 10; + */ + javaMultipleFiles?: boolean; + /** + * This option does nothing. + * + * @deprecated + * @generated from protobuf field: optional bool java_generate_equals_and_hash = 20 [deprecated = true]; + */ + javaGenerateEqualsAndHash?: boolean; + /** + * If set true, then the Java2 code generator will generate code that + * throws an exception whenever an attempt is made to assign a non-UTF-8 + * byte sequence to a string field. + * Message reflection will do the same. + * However, an extension field still accepts non-UTF-8 byte sequences. + * This option has no effect on when used with the lite runtime. + * + * @generated from protobuf field: optional bool java_string_check_utf8 = 27; + */ + javaStringCheckUtf8?: boolean; + /** + * @generated from protobuf field: optional google.protobuf.FileOptions.OptimizeMode optimize_for = 9; + */ + optimizeFor?: FileOptions_OptimizeMode; + /** + * Sets the Go package where structs generated from this .proto will be + * placed. If omitted, the Go package will be derived from the following: + * - The basename of the package import path, if provided. + * - Otherwise, the package statement in the .proto file, if present. + * - Otherwise, the basename of the .proto file, without extension. + * + * @generated from protobuf field: optional string go_package = 11; + */ + goPackage?: string; + /** + * Should generic services be generated in each language? "Generic" services + * are not specific to any particular RPC system. They are generated by the + * main code generators in each language (without additional plugins). + * Generic services were the only kind of service generation supported by + * early versions of google.protobuf. + * + * Generic services are now considered deprecated in favor of using plugins + * that generate code specific to your particular RPC system. Therefore, + * these default to false. Old code which depends on generic services should + * explicitly set them to true. + * + * @generated from protobuf field: optional bool cc_generic_services = 16; + */ + ccGenericServices?: boolean; + /** + * @generated from protobuf field: optional bool java_generic_services = 17; + */ + javaGenericServices?: boolean; + /** + * @generated from protobuf field: optional bool py_generic_services = 18; + */ + pyGenericServices?: boolean; + /** + * @generated from protobuf field: optional bool php_generic_services = 42; + */ + phpGenericServices?: boolean; + /** + * Is this file deprecated? + * Depending on the target platform, this can emit Deprecated annotations + * for everything in the file, or it will be completely ignored; in the very + * least, this is a formalization for deprecating files. + * + * @generated from protobuf field: optional bool deprecated = 23; + */ + deprecated?: boolean; + /** + * Enables the use of arenas for the proto messages in this file. This applies + * only to generated classes for C++. + * + * @generated from protobuf field: optional bool cc_enable_arenas = 31; + */ + ccEnableArenas?: boolean; + /** + * Sets the objective c class prefix which is prepended to all objective c + * generated classes from this .proto. There is no default. + * + * @generated from protobuf field: optional string objc_class_prefix = 36; + */ + objcClassPrefix?: string; + /** + * Namespace for generated classes; defaults to the package. + * + * @generated from protobuf field: optional string csharp_namespace = 37; + */ + csharpNamespace?: string; + /** + * By default Swift generators will take the proto package and CamelCase it + * replacing '.' with underscore and use that to prefix the types/symbols + * defined. When this options is provided, they will use this value instead + * to prefix the types/symbols defined. + * + * @generated from protobuf field: optional string swift_prefix = 39; + */ + swiftPrefix?: string; + /** + * Sets the php class prefix which is prepended to all php generated classes + * from this .proto. Default is empty. + * + * @generated from protobuf field: optional string php_class_prefix = 40; + */ + phpClassPrefix?: string; + /** + * Use this option to change the namespace of php generated classes. Default + * is empty. When this option is empty, the package name will be used for + * determining the namespace. + * + * @generated from protobuf field: optional string php_namespace = 41; + */ + phpNamespace?: string; + /** + * Use this option to change the namespace of php generated metadata classes. + * Default is empty. When this option is empty, the proto file name will be + * used for determining the namespace. + * + * @generated from protobuf field: optional string php_metadata_namespace = 44; + */ + phpMetadataNamespace?: string; + /** + * Use this option to change the package of ruby generated classes. Default + * is empty. When this option is not set, the package name will be used for + * determining the ruby package. + * + * @generated from protobuf field: optional string ruby_package = 45; + */ + rubyPackage?: string; + /** + * Any features defined in the specific edition. + * + * @generated from protobuf field: optional google.protobuf.FeatureSet features = 50; + */ + features?: FeatureSet; + /** + * The parser stores options it doesn't recognize here. + * See the documentation for the "Options" section above. + * + * @generated from protobuf field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; + */ + uninterpretedOption: UninterpretedOption[]; +} +/** + * Generated classes can be optimized for speed or code size. + * + * @generated from protobuf enum google.protobuf.FileOptions.OptimizeMode + */ +export enum FileOptions_OptimizeMode { + /** + * @generated synthetic value - protobuf-ts requires all enums to have a 0 value + */ + UNSPECIFIED$ = 0, + /** + * Generate complete code for parsing, serialization, + * + * @generated from protobuf enum value: SPEED = 1; + */ + SPEED = 1, + /** + * etc. + * + * Use ReflectionOps to implement these methods. + * + * @generated from protobuf enum value: CODE_SIZE = 2; + */ + CODE_SIZE = 2, + /** + * Generate code using MessageLite and the lite runtime. + * + * @generated from protobuf enum value: LITE_RUNTIME = 3; + */ + LITE_RUNTIME = 3 +} +/** + * @generated from protobuf message google.protobuf.MessageOptions + */ +export interface MessageOptions { + /** + * Set true to use the old proto1 MessageSet wire format for extensions. + * This is provided for backwards-compatibility with the MessageSet wire + * format. You should not use this for any other reason: It's less + * efficient, has fewer features, and is more complicated. + * + * The message must be defined exactly as follows: + * message Foo { + * option message_set_wire_format = true; + * extensions 4 to max; + * } + * Note that the message cannot have any defined fields; MessageSets only + * have extensions. + * + * All extensions of your type must be singular messages; e.g. they cannot + * be int32s, enums, or repeated messages. + * + * Because this is an option, the above two restrictions are not enforced by + * the protocol compiler. + * + * @generated from protobuf field: optional bool message_set_wire_format = 1; + */ + messageSetWireFormat?: boolean; + /** + * Disables the generation of the standard "descriptor()" accessor, which can + * conflict with a field of the same name. This is meant to make migration + * from proto1 easier; new code should avoid fields named "descriptor". + * + * @generated from protobuf field: optional bool no_standard_descriptor_accessor = 2; + */ + noStandardDescriptorAccessor?: boolean; + /** + * Is this message deprecated? + * Depending on the target platform, this can emit Deprecated annotations + * for the message, or it will be completely ignored; in the very least, + * this is a formalization for deprecating messages. + * + * @generated from protobuf field: optional bool deprecated = 3; + */ + deprecated?: boolean; + /** + * NOTE: Do not set the option in .proto files. Always use the maps syntax + * instead. The option should only be implicitly set by the proto compiler + * parser. + * + * Whether the message is an automatically generated map entry type for the + * maps field. + * + * For maps fields: + * map map_field = 1; + * The parsed descriptor looks like: + * message MapFieldEntry { + * option map_entry = true; + * optional KeyType key = 1; + * optional ValueType value = 2; + * } + * repeated MapFieldEntry map_field = 1; + * + * Implementations may choose not to generate the map_entry=true message, but + * use a native map in the target language to hold the keys and values. + * The reflection APIs in such implementations still need to work as + * if the field is a repeated message field. + * + * @generated from protobuf field: optional bool map_entry = 7; + */ + mapEntry?: boolean; + /** + * Enable the legacy handling of JSON field name conflicts. This lowercases + * and strips underscored from the fields before comparison in proto3 only. + * The new behavior takes `json_name` into account and applies to proto2 as + * well. + * + * This should only be used as a temporary measure against broken builds due + * to the change in behavior for JSON field name conflicts. + * + * TODO This is legacy behavior we plan to remove once downstream + * teams have had time to migrate. + * + * @deprecated + * @generated from protobuf field: optional bool deprecated_legacy_json_field_conflicts = 11 [deprecated = true]; + */ + deprecatedLegacyJsonFieldConflicts?: boolean; + /** + * Any features defined in the specific edition. + * + * @generated from protobuf field: optional google.protobuf.FeatureSet features = 12; + */ + features?: FeatureSet; + /** + * The parser stores options it doesn't recognize here. See above. + * + * @generated from protobuf field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; + */ + uninterpretedOption: UninterpretedOption[]; +} +/** + * @generated from protobuf message google.protobuf.FieldOptions + */ +export interface FieldOptions { + /** + * The ctype option instructs the C++ code generator to use a different + * representation of the field than it normally would. See the specific + * options below. This option is only implemented to support use of + * [ctype=CORD] and [ctype=STRING] (the default) on non-repeated fields of + * type "bytes" in the open source release -- sorry, we'll try to include + * other types in a future version! + * + * @generated from protobuf field: optional google.protobuf.FieldOptions.CType ctype = 1; + */ + ctype?: FieldOptions_CType; + /** + * The packed option can be enabled for repeated primitive fields to enable + * a more efficient representation on the wire. Rather than repeatedly + * writing the tag and type for each element, the entire array is encoded as + * a single length-delimited blob. In proto3, only explicit setting it to + * false will avoid using packed encoding. This option is prohibited in + * Editions, but the `repeated_field_encoding` feature can be used to control + * the behavior. + * + * @generated from protobuf field: optional bool packed = 2; + */ + packed?: boolean; + /** + * The jstype option determines the JavaScript type used for values of the + * field. The option is permitted only for 64 bit integral and fixed types + * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING + * is represented as JavaScript string, which avoids loss of precision that + * can happen when a large value is converted to a floating point JavaScript. + * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to + * use the JavaScript "number" type. The behavior of the default option + * JS_NORMAL is implementation dependent. + * + * This option is an enum to permit additional types to be added, e.g. + * goog.math.Integer. + * + * @generated from protobuf field: optional google.protobuf.FieldOptions.JSType jstype = 6; + */ + jstype?: FieldOptions_JSType; + /** + * Should this field be parsed lazily? Lazy applies only to message-type + * fields. It means that when the outer message is initially parsed, the + * inner message's contents will not be parsed but instead stored in encoded + * form. The inner message will actually be parsed when it is first accessed. + * + * This is only a hint. Implementations are free to choose whether to use + * eager or lazy parsing regardless of the value of this option. However, + * setting this option true suggests that the protocol author believes that + * using lazy parsing on this field is worth the additional bookkeeping + * overhead typically needed to implement it. + * + * This option does not affect the public interface of any generated code; + * all method signatures remain the same. Furthermore, thread-safety of the + * interface is not affected by this option; const methods remain safe to + * call from multiple threads concurrently, while non-const methods continue + * to require exclusive access. + * + * Note that implementations may choose not to check required fields within + * a lazy sub-message. That is, calling IsInitialized() on the outer message + * may return true even if the inner message has missing required fields. + * This is necessary because otherwise the inner message would have to be + * parsed in order to perform the check, defeating the purpose of lazy + * parsing. An implementation which chooses not to check required fields + * must be consistent about it. That is, for any particular sub-message, the + * implementation must either *always* check its required fields, or *never* + * check its required fields, regardless of whether or not the message has + * been parsed. + * + * As of May 2022, lazy verifies the contents of the byte stream during + * parsing. An invalid byte stream will cause the overall parsing to fail. + * + * @generated from protobuf field: optional bool lazy = 5; + */ + lazy?: boolean; + /** + * unverified_lazy does no correctness checks on the byte stream. This should + * only be used where lazy with verification is prohibitive for performance + * reasons. + * + * @generated from protobuf field: optional bool unverified_lazy = 15; + */ + unverifiedLazy?: boolean; + /** + * Is this field deprecated? + * Depending on the target platform, this can emit Deprecated annotations + * for accessors, or it will be completely ignored; in the very least, this + * is a formalization for deprecating fields. + * + * @generated from protobuf field: optional bool deprecated = 3; + */ + deprecated?: boolean; + /** + * For Google-internal migration only. Do not use. + * + * @generated from protobuf field: optional bool weak = 10; + */ + weak?: boolean; + /** + * Indicate that the field value should not be printed out when using debug + * formats, e.g. when the field contains sensitive credentials. + * + * @generated from protobuf field: optional bool debug_redact = 16; + */ + debugRedact?: boolean; + /** + * @generated from protobuf field: optional google.protobuf.FieldOptions.OptionRetention retention = 17; + */ + retention?: FieldOptions_OptionRetention; + /** + * @generated from protobuf field: repeated google.protobuf.FieldOptions.OptionTargetType targets = 19; + */ + targets: FieldOptions_OptionTargetType[]; + /** + * @generated from protobuf field: repeated google.protobuf.FieldOptions.EditionDefault edition_defaults = 20; + */ + editionDefaults: FieldOptions_EditionDefault[]; + /** + * Any features defined in the specific edition. + * + * @generated from protobuf field: optional google.protobuf.FeatureSet features = 21; + */ + features?: FeatureSet; + /** + * The parser stores options it doesn't recognize here. See above. + * + * @generated from protobuf field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; + */ + uninterpretedOption: UninterpretedOption[]; +} +/** + * @generated from protobuf message google.protobuf.FieldOptions.EditionDefault + */ +export interface FieldOptions_EditionDefault { + /** + * @generated from protobuf field: optional google.protobuf.Edition edition = 3; + */ + edition?: Edition; + /** + * @generated from protobuf field: optional string value = 2; + */ + value?: string; // Textproto value. +} +/** + * @generated from protobuf enum google.protobuf.FieldOptions.CType + */ +export enum FieldOptions_CType { + /** + * Default mode. + * + * @generated from protobuf enum value: STRING = 0; + */ + STRING = 0, + /** + * The option [ctype=CORD] may be applied to a non-repeated field of type + * "bytes". It indicates that in C++, the data should be stored in a Cord + * instead of a string. For very large strings, this may reduce memory + * fragmentation. It may also allow better performance when parsing from a + * Cord, or when parsing with aliasing enabled, as the parsed Cord may then + * alias the original buffer. + * + * @generated from protobuf enum value: CORD = 1; + */ + CORD = 1, + /** + * @generated from protobuf enum value: STRING_PIECE = 2; + */ + STRING_PIECE = 2 +} +/** + * @generated from protobuf enum google.protobuf.FieldOptions.JSType + */ +export enum FieldOptions_JSType { + /** + * Use the default type. + * + * @generated from protobuf enum value: JS_NORMAL = 0; + */ + JS_NORMAL = 0, + /** + * Use JavaScript strings. + * + * @generated from protobuf enum value: JS_STRING = 1; + */ + JS_STRING = 1, + /** + * Use JavaScript numbers. + * + * @generated from protobuf enum value: JS_NUMBER = 2; + */ + JS_NUMBER = 2 +} +/** + * If set to RETENTION_SOURCE, the option will be omitted from the binary. + * Note: as of January 2023, support for this is in progress and does not yet + * have an effect (b/264593489). + * + * @generated from protobuf enum google.protobuf.FieldOptions.OptionRetention + */ +export enum FieldOptions_OptionRetention { + /** + * @generated from protobuf enum value: RETENTION_UNKNOWN = 0; + */ + RETENTION_UNKNOWN = 0, + /** + * @generated from protobuf enum value: RETENTION_RUNTIME = 1; + */ + RETENTION_RUNTIME = 1, + /** + * @generated from protobuf enum value: RETENTION_SOURCE = 2; + */ + RETENTION_SOURCE = 2 +} +/** + * This indicates the types of entities that the field may apply to when used + * as an option. If it is unset, then the field may be freely used as an + * option on any kind of entity. Note: as of January 2023, support for this is + * in progress and does not yet have an effect (b/264593489). + * + * @generated from protobuf enum google.protobuf.FieldOptions.OptionTargetType + */ +export enum FieldOptions_OptionTargetType { + /** + * @generated from protobuf enum value: TARGET_TYPE_UNKNOWN = 0; + */ + TARGET_TYPE_UNKNOWN = 0, + /** + * @generated from protobuf enum value: TARGET_TYPE_FILE = 1; + */ + TARGET_TYPE_FILE = 1, + /** + * @generated from protobuf enum value: TARGET_TYPE_EXTENSION_RANGE = 2; + */ + TARGET_TYPE_EXTENSION_RANGE = 2, + /** + * @generated from protobuf enum value: TARGET_TYPE_MESSAGE = 3; + */ + TARGET_TYPE_MESSAGE = 3, + /** + * @generated from protobuf enum value: TARGET_TYPE_FIELD = 4; + */ + TARGET_TYPE_FIELD = 4, + /** + * @generated from protobuf enum value: TARGET_TYPE_ONEOF = 5; + */ + TARGET_TYPE_ONEOF = 5, + /** + * @generated from protobuf enum value: TARGET_TYPE_ENUM = 6; + */ + TARGET_TYPE_ENUM = 6, + /** + * @generated from protobuf enum value: TARGET_TYPE_ENUM_ENTRY = 7; + */ + TARGET_TYPE_ENUM_ENTRY = 7, + /** + * @generated from protobuf enum value: TARGET_TYPE_SERVICE = 8; + */ + TARGET_TYPE_SERVICE = 8, + /** + * @generated from protobuf enum value: TARGET_TYPE_METHOD = 9; + */ + TARGET_TYPE_METHOD = 9 +} +/** + * @generated from protobuf message google.protobuf.OneofOptions + */ +export interface OneofOptions { + /** + * Any features defined in the specific edition. + * + * @generated from protobuf field: optional google.protobuf.FeatureSet features = 1; + */ + features?: FeatureSet; + /** + * The parser stores options it doesn't recognize here. See above. + * + * @generated from protobuf field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; + */ + uninterpretedOption: UninterpretedOption[]; +} +/** + * @generated from protobuf message google.protobuf.EnumOptions + */ +export interface EnumOptions { + /** + * Set this option to true to allow mapping different tag names to the same + * value. + * + * @generated from protobuf field: optional bool allow_alias = 2; + */ + allowAlias?: boolean; + /** + * Is this enum deprecated? + * Depending on the target platform, this can emit Deprecated annotations + * for the enum, or it will be completely ignored; in the very least, this + * is a formalization for deprecating enums. + * + * @generated from protobuf field: optional bool deprecated = 3; + */ + deprecated?: boolean; + /** + * Enable the legacy handling of JSON field name conflicts. This lowercases + * and strips underscored from the fields before comparison in proto3 only. + * The new behavior takes `json_name` into account and applies to proto2 as + * well. + * TODO Remove this legacy behavior once downstream teams have + * had time to migrate. + * + * @deprecated + * @generated from protobuf field: optional bool deprecated_legacy_json_field_conflicts = 6 [deprecated = true]; + */ + deprecatedLegacyJsonFieldConflicts?: boolean; + /** + * Any features defined in the specific edition. + * + * @generated from protobuf field: optional google.protobuf.FeatureSet features = 7; + */ + features?: FeatureSet; + /** + * The parser stores options it doesn't recognize here. See above. + * + * @generated from protobuf field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; + */ + uninterpretedOption: UninterpretedOption[]; +} +/** + * @generated from protobuf message google.protobuf.EnumValueOptions + */ +export interface EnumValueOptions { + /** + * Is this enum value deprecated? + * Depending on the target platform, this can emit Deprecated annotations + * for the enum value, or it will be completely ignored; in the very least, + * this is a formalization for deprecating enum values. + * + * @generated from protobuf field: optional bool deprecated = 1; + */ + deprecated?: boolean; + /** + * Any features defined in the specific edition. + * + * @generated from protobuf field: optional google.protobuf.FeatureSet features = 2; + */ + features?: FeatureSet; + /** + * Indicate that fields annotated with this enum value should not be printed + * out when using debug formats, e.g. when the field contains sensitive + * credentials. + * + * @generated from protobuf field: optional bool debug_redact = 3; + */ + debugRedact?: boolean; + /** + * The parser stores options it doesn't recognize here. See above. + * + * @generated from protobuf field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; + */ + uninterpretedOption: UninterpretedOption[]; +} +/** + * @generated from protobuf message google.protobuf.ServiceOptions + */ +export interface ServiceOptions { + /** + * Any features defined in the specific edition. + * + * @generated from protobuf field: optional google.protobuf.FeatureSet features = 34; + */ + features?: FeatureSet; + // Note: Field numbers 1 through 32 are reserved for Google's internal RPC + // framework. We apologize for hoarding these numbers to ourselves, but + // we were already using them long before we decided to release Protocol + // Buffers. + + /** + * Is this service deprecated? + * Depending on the target platform, this can emit Deprecated annotations + * for the service, or it will be completely ignored; in the very least, + * this is a formalization for deprecating services. + * + * @generated from protobuf field: optional bool deprecated = 33; + */ + deprecated?: boolean; + /** + * The parser stores options it doesn't recognize here. See above. + * + * @generated from protobuf field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; + */ + uninterpretedOption: UninterpretedOption[]; +} +/** + * @generated from protobuf message google.protobuf.MethodOptions + */ +export interface MethodOptions { + // Note: Field numbers 1 through 32 are reserved for Google's internal RPC + // framework. We apologize for hoarding these numbers to ourselves, but + // we were already using them long before we decided to release Protocol + // Buffers. + + /** + * Is this method deprecated? + * Depending on the target platform, this can emit Deprecated annotations + * for the method, or it will be completely ignored; in the very least, + * this is a formalization for deprecating methods. + * + * @generated from protobuf field: optional bool deprecated = 33; + */ + deprecated?: boolean; + /** + * @generated from protobuf field: optional google.protobuf.MethodOptions.IdempotencyLevel idempotency_level = 34; + */ + idempotencyLevel?: MethodOptions_IdempotencyLevel; + /** + * Any features defined in the specific edition. + * + * @generated from protobuf field: optional google.protobuf.FeatureSet features = 35; + */ + features?: FeatureSet; + /** + * The parser stores options it doesn't recognize here. See above. + * + * @generated from protobuf field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; + */ + uninterpretedOption: UninterpretedOption[]; +} +/** + * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, + * or neither? HTTP based RPC implementation may choose GET verb for safe + * methods, and PUT verb for idempotent methods instead of the default POST. + * + * @generated from protobuf enum google.protobuf.MethodOptions.IdempotencyLevel + */ +export enum MethodOptions_IdempotencyLevel { + /** + * @generated from protobuf enum value: IDEMPOTENCY_UNKNOWN = 0; + */ + IDEMPOTENCY_UNKNOWN = 0, + /** + * implies idempotent + * + * @generated from protobuf enum value: NO_SIDE_EFFECTS = 1; + */ + NO_SIDE_EFFECTS = 1, + /** + * idempotent, but may have side effects + * + * @generated from protobuf enum value: IDEMPOTENT = 2; + */ + IDEMPOTENT = 2 +} +/** + * A message representing a option the parser does not recognize. This only + * appears in options protos created by the compiler::Parser class. + * DescriptorPool resolves these when building Descriptor objects. Therefore, + * options protos in descriptor objects (e.g. returned by Descriptor::options(), + * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions + * in them. + * + * @generated from protobuf message google.protobuf.UninterpretedOption + */ +export interface UninterpretedOption { + /** + * @generated from protobuf field: repeated google.protobuf.UninterpretedOption.NamePart name = 2; + */ + name: UninterpretedOption_NamePart[]; + /** + * The value of the uninterpreted option, in whatever type the tokenizer + * identified it as during parsing. Exactly one of these should be set. + * + * @generated from protobuf field: optional string identifier_value = 3; + */ + identifierValue?: string; + /** + * @generated from protobuf field: optional uint64 positive_int_value = 4; + */ + positiveIntValue?: string; + /** + * @generated from protobuf field: optional int64 negative_int_value = 5; + */ + negativeIntValue?: string; + /** + * @generated from protobuf field: optional double double_value = 6; + */ + doubleValue?: number; + /** + * @generated from protobuf field: optional bytes string_value = 7; + */ + stringValue?: Uint8Array; + /** + * @generated from protobuf field: optional string aggregate_value = 8; + */ + aggregateValue?: string; +} +/** + * The name of the uninterpreted option. Each string represents a segment in + * a dot-separated name. is_extension is true iff a segment represents an + * extension (denoted with parentheses in options specs in .proto files). + * E.g.,{ ["foo", false], ["bar.baz", true], ["moo", false] } represents + * "foo.(bar.baz).moo". + * + * @generated from protobuf message google.protobuf.UninterpretedOption.NamePart + */ +export interface UninterpretedOption_NamePart { + /** + * @generated from protobuf field: string name_part = 1; + */ + namePart: string; + /** + * @generated from protobuf field: bool is_extension = 2; + */ + isExtension: boolean; +} +// =================================================================== +// Features + +/** + * TODO Enums in C++ gencode (and potentially other languages) are + * not well scoped. This means that each of the feature enums below can clash + * with each other. The short names we've chosen maximize call-site + * readability, but leave us very open to this scenario. A future feature will + * be designed and implemented to handle this, hopefully before we ever hit a + * conflict here. + * + * @generated from protobuf message google.protobuf.FeatureSet + */ +export interface FeatureSet { + /** + * @generated from protobuf field: optional google.protobuf.FeatureSet.FieldPresence field_presence = 1; + */ + fieldPresence?: FeatureSet_FieldPresence; + /** + * @generated from protobuf field: optional google.protobuf.FeatureSet.EnumType enum_type = 2; + */ + enumType?: FeatureSet_EnumType; + /** + * @generated from protobuf field: optional google.protobuf.FeatureSet.RepeatedFieldEncoding repeated_field_encoding = 3; + */ + repeatedFieldEncoding?: FeatureSet_RepeatedFieldEncoding; + /** + * @generated from protobuf field: optional google.protobuf.FeatureSet.Utf8Validation utf8_validation = 4; + */ + utf8Validation?: FeatureSet_Utf8Validation; + /** + * @generated from protobuf field: optional google.protobuf.FeatureSet.MessageEncoding message_encoding = 5; + */ + messageEncoding?: FeatureSet_MessageEncoding; + /** + * @generated from protobuf field: optional google.protobuf.FeatureSet.JsonFormat json_format = 6; + */ + jsonFormat?: FeatureSet_JsonFormat; +} +/** + * @generated from protobuf enum google.protobuf.FeatureSet.FieldPresence + */ +export enum FeatureSet_FieldPresence { + /** + * @generated from protobuf enum value: FIELD_PRESENCE_UNKNOWN = 0; + */ + FIELD_PRESENCE_UNKNOWN = 0, + /** + * @generated from protobuf enum value: EXPLICIT = 1; + */ + EXPLICIT = 1, + /** + * @generated from protobuf enum value: IMPLICIT = 2; + */ + IMPLICIT = 2, + /** + * @generated from protobuf enum value: LEGACY_REQUIRED = 3; + */ + LEGACY_REQUIRED = 3 +} +/** + * @generated from protobuf enum google.protobuf.FeatureSet.EnumType + */ +export enum FeatureSet_EnumType { + /** + * @generated from protobuf enum value: ENUM_TYPE_UNKNOWN = 0; + */ + ENUM_TYPE_UNKNOWN = 0, + /** + * @generated from protobuf enum value: OPEN = 1; + */ + OPEN = 1, + /** + * @generated from protobuf enum value: CLOSED = 2; + */ + CLOSED = 2 +} +/** + * @generated from protobuf enum google.protobuf.FeatureSet.RepeatedFieldEncoding + */ +export enum FeatureSet_RepeatedFieldEncoding { + /** + * @generated from protobuf enum value: REPEATED_FIELD_ENCODING_UNKNOWN = 0; + */ + REPEATED_FIELD_ENCODING_UNKNOWN = 0, + /** + * @generated from protobuf enum value: PACKED = 1; + */ + PACKED = 1, + /** + * @generated from protobuf enum value: EXPANDED = 2; + */ + EXPANDED = 2 +} +/** + * @generated from protobuf enum google.protobuf.FeatureSet.Utf8Validation + */ +export enum FeatureSet_Utf8Validation { + /** + * @generated from protobuf enum value: UTF8_VALIDATION_UNKNOWN = 0; + */ + UTF8_VALIDATION_UNKNOWN = 0, + /** + * @generated from protobuf enum value: NONE = 1; + */ + NONE = 1, + /** + * @generated from protobuf enum value: VERIFY = 2; + */ + VERIFY = 2 +} +/** + * @generated from protobuf enum google.protobuf.FeatureSet.MessageEncoding + */ +export enum FeatureSet_MessageEncoding { + /** + * @generated from protobuf enum value: MESSAGE_ENCODING_UNKNOWN = 0; + */ + MESSAGE_ENCODING_UNKNOWN = 0, + /** + * @generated from protobuf enum value: LENGTH_PREFIXED = 1; + */ + LENGTH_PREFIXED = 1, + /** + * @generated from protobuf enum value: DELIMITED = 2; + */ + DELIMITED = 2 +} +/** + * @generated from protobuf enum google.protobuf.FeatureSet.JsonFormat + */ +export enum FeatureSet_JsonFormat { + /** + * @generated from protobuf enum value: JSON_FORMAT_UNKNOWN = 0; + */ + JSON_FORMAT_UNKNOWN = 0, + /** + * @generated from protobuf enum value: ALLOW = 1; + */ + ALLOW = 1, + /** + * @generated from protobuf enum value: LEGACY_BEST_EFFORT = 2; + */ + LEGACY_BEST_EFFORT = 2 +} +/** + * A compiled specification for the defaults of a set of features. These + * messages are generated from FeatureSet extensions and can be used to seed + * feature resolution. The resolution with this object becomes a simple search + * for the closest matching edition, followed by proto merges. + * + * @generated from protobuf message google.protobuf.FeatureSetDefaults + */ +export interface FeatureSetDefaults { + /** + * @generated from protobuf field: repeated google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault defaults = 1; + */ + defaults: FeatureSetDefaults_FeatureSetEditionDefault[]; + /** + * The minimum supported edition (inclusive) when this was constructed. + * Editions before this will not have defaults. + * + * @generated from protobuf field: optional google.protobuf.Edition minimum_edition = 4; + */ + minimumEdition?: Edition; + /** + * The maximum known edition (inclusive) when this was constructed. Editions + * after this will not have reliable defaults. + * + * @generated from protobuf field: optional google.protobuf.Edition maximum_edition = 5; + */ + maximumEdition?: Edition; +} +/** + * A map from every known edition with a unique set of defaults to its + * defaults. Not all editions may be contained here. For a given edition, + * the defaults at the closest matching edition ordered at or before it should + * be used. This field must be in strict ascending order by edition. + * + * @generated from protobuf message google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + */ +export interface FeatureSetDefaults_FeatureSetEditionDefault { + /** + * @generated from protobuf field: optional google.protobuf.Edition edition = 3; + */ + edition?: Edition; + /** + * @generated from protobuf field: optional google.protobuf.FeatureSet features = 2; + */ + features?: FeatureSet; +} +// =================================================================== +// Optional source code info + +/** + * Encapsulates information about the original source file from which a + * FileDescriptorProto was generated. + * + * @generated from protobuf message google.protobuf.SourceCodeInfo + */ +export interface SourceCodeInfo { + /** + * A Location identifies a piece of source code in a .proto file which + * corresponds to a particular definition. This information is intended + * to be useful to IDEs, code indexers, documentation generators, and similar + * tools. + * + * For example, say we have a file like: + * message Foo { + * optional string foo = 1; + * } + * Let's look at just the field definition: + * optional string foo = 1; + * ^ ^^ ^^ ^ ^^^ + * a bc de f ghi + * We have the following locations: + * span path represents + * [a,i) [ 4, 0, 2, 0 ] The whole field definition. + * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). + * [c,d) [ 4, 0, 2, 0, 5 ] The type (string). + * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). + * [g,h) [ 4, 0, 2, 0, 3 ] The number (1). + * + * Notes: + * - A location may refer to a repeated field itself (i.e. not to any + * particular index within it). This is used whenever a set of elements are + * logically enclosed in a single code segment. For example, an entire + * extend block (possibly containing multiple extension definitions) will + * have an outer location whose path refers to the "extensions" repeated + * field without an index. + * - Multiple locations may have the same path. This happens when a single + * logical declaration is spread out across multiple places. The most + * obvious example is the "extend" block again -- there may be multiple + * extend blocks in the same scope, each of which will have the same path. + * - A location's span is not always a subset of its parent's span. For + * example, the "extendee" of an extension declaration appears at the + * beginning of the "extend" block and is shared by all extensions within + * the block. + * - Just because a location's span is a subset of some other location's span + * does not mean that it is a descendant. For example, a "group" defines + * both a type and a field in a single declaration. Thus, the locations + * corresponding to the type and field and their components will overlap. + * - Code which tries to interpret locations should probably be designed to + * ignore those that it doesn't understand, as more types of locations could + * be recorded in the future. + * + * @generated from protobuf field: repeated google.protobuf.SourceCodeInfo.Location location = 1; + */ + location: SourceCodeInfo_Location[]; +} +/** + * @generated from protobuf message google.protobuf.SourceCodeInfo.Location + */ +export interface SourceCodeInfo_Location { + /** + * Identifies which part of the FileDescriptorProto was defined at this + * location. + * + * Each element is a field number or an index. They form a path from + * the root FileDescriptorProto to the place where the definition occurs. + * For example, this path: + * [ 4, 3, 2, 7, 1 ] + * refers to: + * file.message_type(3) // 4, 3 + * .field(7) // 2, 7 + * .name() // 1 + * This is because FileDescriptorProto.message_type has field number 4: + * repeated DescriptorProto message_type = 4; + * and DescriptorProto.field has field number 2: + * repeated FieldDescriptorProto field = 2; + * and FieldDescriptorProto.name has field number 1: + * optional string name = 1; + * + * Thus, the above path gives the location of a field name. If we removed + * the last element: + * [ 4, 3, 2, 7 ] + * this path refers to the whole field declaration (from the beginning + * of the label to the terminating semicolon). + * + * @generated from protobuf field: repeated int32 path = 1 [packed = true]; + */ + path: number[]; + /** + * Always has exactly three or four elements: start line, start column, + * end line (optional, otherwise assumed same as start line), end column. + * These are packed into a single field for efficiency. Note that line + * and column numbers are zero-based -- typically you will want to add + * 1 to each before displaying to a user. + * + * @generated from protobuf field: repeated int32 span = 2 [packed = true]; + */ + span: number[]; + /** + * If this SourceCodeInfo represents a complete declaration, these are any + * comments appearing before and after the declaration which appear to be + * attached to the declaration. + * + * A series of line comments appearing on consecutive lines, with no other + * tokens appearing on those lines, will be treated as a single comment. + * + * leading_detached_comments will keep paragraphs of comments that appear + * before (but not connected to) the current element. Each paragraph, + * separated by empty lines, will be one comment element in the repeated + * field. + * + * Only the comment content is provided; comment markers (e.g. //) are + * stripped out. For block comments, leading whitespace and an asterisk + * will be stripped from the beginning of each line other than the first. + * Newlines are included in the output. + * + * Examples: + * + * optional int32 foo = 1; // Comment attached to foo. + * // Comment attached to bar. + * optional int32 bar = 2; + * + * optional string baz = 3; + * // Comment attached to baz. + * // Another line attached to baz. + * + * // Comment attached to moo. + * // + * // Another line attached to moo. + * optional double moo = 4; + * + * // Detached comment for corge. This is not leading or trailing comments + * // to moo or corge because there are blank lines separating it from + * // both. + * + * // Detached comment for corge paragraph 2. + * + * optional string corge = 5; + * /* Block comment attached + * * to corge. Leading asterisks + * * will be removed. *\/ + * /* Block comment attached to + * * grault. *\/ + * optional int32 grault = 6; + * + * // ignored detached comments. + * + * @generated from protobuf field: optional string leading_comments = 3; + */ + leadingComments?: string; + /** + * @generated from protobuf field: optional string trailing_comments = 4; + */ + trailingComments?: string; + /** + * @generated from protobuf field: repeated string leading_detached_comments = 6; + */ + leadingDetachedComments: string[]; +} +/** + * Describes the relationship between generated code and its original source + * file. A GeneratedCodeInfo message is associated with only one generated + * source file, but may contain references to different source .proto files. + * + * @generated from protobuf message google.protobuf.GeneratedCodeInfo + */ +export interface GeneratedCodeInfo { + /** + * An Annotation connects some span of text in generated code to an element + * of its generating .proto file. + * + * @generated from protobuf field: repeated google.protobuf.GeneratedCodeInfo.Annotation annotation = 1; + */ + annotation: GeneratedCodeInfo_Annotation[]; +} +/** + * @generated from protobuf message google.protobuf.GeneratedCodeInfo.Annotation + */ +export interface GeneratedCodeInfo_Annotation { + /** + * Identifies the element in the original source .proto file. This field + * is formatted the same as SourceCodeInfo.Location.path. + * + * @generated from protobuf field: repeated int32 path = 1 [packed = true]; + */ + path: number[]; + /** + * Identifies the filesystem path to the original source .proto. + * + * @generated from protobuf field: optional string source_file = 2; + */ + sourceFile?: string; + /** + * Identifies the starting offset in bytes in the generated code + * that relates to the identified object. + * + * @generated from protobuf field: optional int32 begin = 3; + */ + begin?: number; + /** + * Identifies the ending offset in bytes in the generated code that + * relates to the identified object. The end offset should be one past + * the last relevant byte (so the length of the text = end - begin). + * + * @generated from protobuf field: optional int32 end = 4; + */ + end?: number; + /** + * @generated from protobuf field: optional google.protobuf.GeneratedCodeInfo.Annotation.Semantic semantic = 5; + */ + semantic?: GeneratedCodeInfo_Annotation_Semantic; +} +/** + * Represents the identified object's effect on the element in the original + * .proto file. + * + * @generated from protobuf enum google.protobuf.GeneratedCodeInfo.Annotation.Semantic + */ +export enum GeneratedCodeInfo_Annotation_Semantic { + /** + * There is no effect or the effect is indescribable. + * + * @generated from protobuf enum value: NONE = 0; + */ + NONE = 0, + /** + * The element is set or otherwise mutated. + * + * @generated from protobuf enum value: SET = 1; + */ + SET = 1, + /** + * An alias to the element is returned. + * + * @generated from protobuf enum value: ALIAS = 2; + */ + ALIAS = 2 +} +/** + * The full set of known editions. + * + * @generated from protobuf enum google.protobuf.Edition + */ +export enum Edition { + /** + * A placeholder for an unknown edition value. + * + * @generated from protobuf enum value: EDITION_UNKNOWN = 0; + */ + EDITION_UNKNOWN = 0, + /** + * Legacy syntax "editions". These pre-date editions, but behave much like + * distinct editions. These can't be used to specify the edition of proto + * files, but feature definitions must supply proto2/proto3 defaults for + * backwards compatibility. + * + * @generated from protobuf enum value: EDITION_PROTO2 = 998; + */ + EDITION_PROTO2 = 998, + /** + * @generated from protobuf enum value: EDITION_PROTO3 = 999; + */ + EDITION_PROTO3 = 999, + /** + * Editions that have been released. The specific values are arbitrary and + * should not be depended on, but they will always be time-ordered for easy + * comparison. + * + * @generated from protobuf enum value: EDITION_2023 = 1000; + */ + EDITION_2023 = 1000, + /** + * Placeholder editions for testing feature resolution. These should not be + * used or relyed on outside of tests. + * + * @generated from protobuf enum value: EDITION_1_TEST_ONLY = 1; + */ + EDITION_1_TEST_ONLY = 1, + /** + * @generated from protobuf enum value: EDITION_2_TEST_ONLY = 2; + */ + EDITION_2_TEST_ONLY = 2, + /** + * @generated from protobuf enum value: EDITION_99997_TEST_ONLY = 99997; + */ + EDITION_99997_TEST_ONLY = 99997, + /** + * @generated from protobuf enum value: EDITION_99998_TEST_ONLY = 99998; + */ + EDITION_99998_TEST_ONLY = 99998, + /** + * @generated from protobuf enum value: EDITION_99999_TEST_ONLY = 99999; + */ + EDITION_99999_TEST_ONLY = 99999 +} +// @generated message type with reflection information, may provide speed optimized methods +class FileDescriptorSet$Type extends MessageType { + constructor() { + super("google.protobuf.FileDescriptorSet", [ + { no: 1, name: "file", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => FileDescriptorProto } + ]); + } + create(value?: PartialMessage): FileDescriptorSet { + const message = globalThis.Object.create((this.messagePrototype!)); + message.file = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FileDescriptorSet): FileDescriptorSet { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* repeated google.protobuf.FileDescriptorProto file */ 1: + message.file.push(FileDescriptorProto.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: FileDescriptorSet, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* repeated google.protobuf.FileDescriptorProto file = 1; */ + for (let i = 0; i < message.file.length; i++) + FileDescriptorProto.internalBinaryWrite(message.file[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.FileDescriptorSet + */ +export const FileDescriptorSet = new FileDescriptorSet$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class FileDescriptorProto$Type extends MessageType { + constructor() { + super("google.protobuf.FileDescriptorProto", [ + { no: 1, name: "name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "package", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "dependency", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }, + { no: 10, name: "public_dependency", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 5 /*ScalarType.INT32*/ }, + { no: 11, name: "weak_dependency", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 5 /*ScalarType.INT32*/ }, + { no: 4, name: "message_type", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => DescriptorProto }, + { no: 5, name: "enum_type", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => EnumDescriptorProto }, + { no: 6, name: "service", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => ServiceDescriptorProto }, + { no: 7, name: "extension", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => FieldDescriptorProto }, + { no: 8, name: "options", kind: "message", T: () => FileOptions }, + { no: 9, name: "source_code_info", kind: "message", T: () => SourceCodeInfo }, + { no: 12, name: "syntax", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 14, name: "edition", kind: "enum", opt: true, T: () => ["google.protobuf.Edition", Edition] } + ]); + } + create(value?: PartialMessage): FileDescriptorProto { + const message = globalThis.Object.create((this.messagePrototype!)); + message.dependency = []; + message.publicDependency = []; + message.weakDependency = []; + message.messageType = []; + message.enumType = []; + message.service = []; + message.extension = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FileDescriptorProto): FileDescriptorProto { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional string name */ 1: + message.name = reader.string(); + break; + case /* optional string package */ 2: + message.package = reader.string(); + break; + case /* repeated string dependency */ 3: + message.dependency.push(reader.string()); + break; + case /* repeated int32 public_dependency */ 10: + if (wireType === WireType.LengthDelimited) + for (let e = reader.int32() + reader.pos; reader.pos < e;) + message.publicDependency.push(reader.int32()); + else + message.publicDependency.push(reader.int32()); + break; + case /* repeated int32 weak_dependency */ 11: + if (wireType === WireType.LengthDelimited) + for (let e = reader.int32() + reader.pos; reader.pos < e;) + message.weakDependency.push(reader.int32()); + else + message.weakDependency.push(reader.int32()); + break; + case /* repeated google.protobuf.DescriptorProto message_type */ 4: + message.messageType.push(DescriptorProto.internalBinaryRead(reader, reader.uint32(), options)); + break; + case /* repeated google.protobuf.EnumDescriptorProto enum_type */ 5: + message.enumType.push(EnumDescriptorProto.internalBinaryRead(reader, reader.uint32(), options)); + break; + case /* repeated google.protobuf.ServiceDescriptorProto service */ 6: + message.service.push(ServiceDescriptorProto.internalBinaryRead(reader, reader.uint32(), options)); + break; + case /* repeated google.protobuf.FieldDescriptorProto extension */ 7: + message.extension.push(FieldDescriptorProto.internalBinaryRead(reader, reader.uint32(), options)); + break; + case /* optional google.protobuf.FileOptions options */ 8: + message.options = FileOptions.internalBinaryRead(reader, reader.uint32(), options, message.options); + break; + case /* optional google.protobuf.SourceCodeInfo source_code_info */ 9: + message.sourceCodeInfo = SourceCodeInfo.internalBinaryRead(reader, reader.uint32(), options, message.sourceCodeInfo); + break; + case /* optional string syntax */ 12: + message.syntax = reader.string(); + break; + case /* optional google.protobuf.Edition edition */ 14: + message.edition = reader.int32(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: FileDescriptorProto, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* optional string name = 1; */ + if (message.name !== undefined) + writer.tag(1, WireType.LengthDelimited).string(message.name); + /* optional string package = 2; */ + if (message.package !== undefined) + writer.tag(2, WireType.LengthDelimited).string(message.package); + /* repeated string dependency = 3; */ + for (let i = 0; i < message.dependency.length; i++) + writer.tag(3, WireType.LengthDelimited).string(message.dependency[i]); + /* repeated int32 public_dependency = 10; */ + for (let i = 0; i < message.publicDependency.length; i++) + writer.tag(10, WireType.Varint).int32(message.publicDependency[i]); + /* repeated int32 weak_dependency = 11; */ + for (let i = 0; i < message.weakDependency.length; i++) + writer.tag(11, WireType.Varint).int32(message.weakDependency[i]); + /* repeated google.protobuf.DescriptorProto message_type = 4; */ + for (let i = 0; i < message.messageType.length; i++) + DescriptorProto.internalBinaryWrite(message.messageType[i], writer.tag(4, WireType.LengthDelimited).fork(), options).join(); + /* repeated google.protobuf.EnumDescriptorProto enum_type = 5; */ + for (let i = 0; i < message.enumType.length; i++) + EnumDescriptorProto.internalBinaryWrite(message.enumType[i], writer.tag(5, WireType.LengthDelimited).fork(), options).join(); + /* repeated google.protobuf.ServiceDescriptorProto service = 6; */ + for (let i = 0; i < message.service.length; i++) + ServiceDescriptorProto.internalBinaryWrite(message.service[i], writer.tag(6, WireType.LengthDelimited).fork(), options).join(); + /* repeated google.protobuf.FieldDescriptorProto extension = 7; */ + for (let i = 0; i < message.extension.length; i++) + FieldDescriptorProto.internalBinaryWrite(message.extension[i], writer.tag(7, WireType.LengthDelimited).fork(), options).join(); + /* optional google.protobuf.FileOptions options = 8; */ + if (message.options) + FileOptions.internalBinaryWrite(message.options, writer.tag(8, WireType.LengthDelimited).fork(), options).join(); + /* optional google.protobuf.SourceCodeInfo source_code_info = 9; */ + if (message.sourceCodeInfo) + SourceCodeInfo.internalBinaryWrite(message.sourceCodeInfo, writer.tag(9, WireType.LengthDelimited).fork(), options).join(); + /* optional string syntax = 12; */ + if (message.syntax !== undefined) + writer.tag(12, WireType.LengthDelimited).string(message.syntax); + /* optional google.protobuf.Edition edition = 14; */ + if (message.edition !== undefined) + writer.tag(14, WireType.Varint).int32(message.edition); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.FileDescriptorProto + */ +export const FileDescriptorProto = new FileDescriptorProto$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class DescriptorProto$Type extends MessageType { + constructor() { + super("google.protobuf.DescriptorProto", [ + { no: 1, name: "name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "field", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => FieldDescriptorProto }, + { no: 6, name: "extension", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => FieldDescriptorProto }, + { no: 3, name: "nested_type", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => DescriptorProto }, + { no: 4, name: "enum_type", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => EnumDescriptorProto }, + { no: 5, name: "extension_range", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => DescriptorProto_ExtensionRange }, + { no: 8, name: "oneof_decl", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => OneofDescriptorProto }, + { no: 7, name: "options", kind: "message", T: () => MessageOptions }, + { no: 9, name: "reserved_range", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => DescriptorProto_ReservedRange }, + { no: 10, name: "reserved_name", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): DescriptorProto { + const message = globalThis.Object.create((this.messagePrototype!)); + message.field = []; + message.extension = []; + message.nestedType = []; + message.enumType = []; + message.extensionRange = []; + message.oneofDecl = []; + message.reservedRange = []; + message.reservedName = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DescriptorProto): DescriptorProto { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional string name */ 1: + message.name = reader.string(); + break; + case /* repeated google.protobuf.FieldDescriptorProto field */ 2: + message.field.push(FieldDescriptorProto.internalBinaryRead(reader, reader.uint32(), options)); + break; + case /* repeated google.protobuf.FieldDescriptorProto extension */ 6: + message.extension.push(FieldDescriptorProto.internalBinaryRead(reader, reader.uint32(), options)); + break; + case /* repeated google.protobuf.DescriptorProto nested_type */ 3: + message.nestedType.push(DescriptorProto.internalBinaryRead(reader, reader.uint32(), options)); + break; + case /* repeated google.protobuf.EnumDescriptorProto enum_type */ 4: + message.enumType.push(EnumDescriptorProto.internalBinaryRead(reader, reader.uint32(), options)); + break; + case /* repeated google.protobuf.DescriptorProto.ExtensionRange extension_range */ 5: + message.extensionRange.push(DescriptorProto_ExtensionRange.internalBinaryRead(reader, reader.uint32(), options)); + break; + case /* repeated google.protobuf.OneofDescriptorProto oneof_decl */ 8: + message.oneofDecl.push(OneofDescriptorProto.internalBinaryRead(reader, reader.uint32(), options)); + break; + case /* optional google.protobuf.MessageOptions options */ 7: + message.options = MessageOptions.internalBinaryRead(reader, reader.uint32(), options, message.options); + break; + case /* repeated google.protobuf.DescriptorProto.ReservedRange reserved_range */ 9: + message.reservedRange.push(DescriptorProto_ReservedRange.internalBinaryRead(reader, reader.uint32(), options)); + break; + case /* repeated string reserved_name */ 10: + message.reservedName.push(reader.string()); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: DescriptorProto, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* optional string name = 1; */ + if (message.name !== undefined) + writer.tag(1, WireType.LengthDelimited).string(message.name); + /* repeated google.protobuf.FieldDescriptorProto field = 2; */ + for (let i = 0; i < message.field.length; i++) + FieldDescriptorProto.internalBinaryWrite(message.field[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + /* repeated google.protobuf.FieldDescriptorProto extension = 6; */ + for (let i = 0; i < message.extension.length; i++) + FieldDescriptorProto.internalBinaryWrite(message.extension[i], writer.tag(6, WireType.LengthDelimited).fork(), options).join(); + /* repeated google.protobuf.DescriptorProto nested_type = 3; */ + for (let i = 0; i < message.nestedType.length; i++) + DescriptorProto.internalBinaryWrite(message.nestedType[i], writer.tag(3, WireType.LengthDelimited).fork(), options).join(); + /* repeated google.protobuf.EnumDescriptorProto enum_type = 4; */ + for (let i = 0; i < message.enumType.length; i++) + EnumDescriptorProto.internalBinaryWrite(message.enumType[i], writer.tag(4, WireType.LengthDelimited).fork(), options).join(); + /* repeated google.protobuf.DescriptorProto.ExtensionRange extension_range = 5; */ + for (let i = 0; i < message.extensionRange.length; i++) + DescriptorProto_ExtensionRange.internalBinaryWrite(message.extensionRange[i], writer.tag(5, WireType.LengthDelimited).fork(), options).join(); + /* repeated google.protobuf.OneofDescriptorProto oneof_decl = 8; */ + for (let i = 0; i < message.oneofDecl.length; i++) + OneofDescriptorProto.internalBinaryWrite(message.oneofDecl[i], writer.tag(8, WireType.LengthDelimited).fork(), options).join(); + /* optional google.protobuf.MessageOptions options = 7; */ + if (message.options) + MessageOptions.internalBinaryWrite(message.options, writer.tag(7, WireType.LengthDelimited).fork(), options).join(); + /* repeated google.protobuf.DescriptorProto.ReservedRange reserved_range = 9; */ + for (let i = 0; i < message.reservedRange.length; i++) + DescriptorProto_ReservedRange.internalBinaryWrite(message.reservedRange[i], writer.tag(9, WireType.LengthDelimited).fork(), options).join(); + /* repeated string reserved_name = 10; */ + for (let i = 0; i < message.reservedName.length; i++) + writer.tag(10, WireType.LengthDelimited).string(message.reservedName[i]); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.DescriptorProto + */ +export const DescriptorProto = new DescriptorProto$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class DescriptorProto_ExtensionRange$Type extends MessageType { + constructor() { + super("google.protobuf.DescriptorProto.ExtensionRange", [ + { no: 1, name: "start", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ }, + { no: 2, name: "end", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ }, + { no: 3, name: "options", kind: "message", T: () => ExtensionRangeOptions } + ]); + } + create(value?: PartialMessage): DescriptorProto_ExtensionRange { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DescriptorProto_ExtensionRange): DescriptorProto_ExtensionRange { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional int32 start */ 1: + message.start = reader.int32(); + break; + case /* optional int32 end */ 2: + message.end = reader.int32(); + break; + case /* optional google.protobuf.ExtensionRangeOptions options */ 3: + message.options = ExtensionRangeOptions.internalBinaryRead(reader, reader.uint32(), options, message.options); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: DescriptorProto_ExtensionRange, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* optional int32 start = 1; */ + if (message.start !== undefined) + writer.tag(1, WireType.Varint).int32(message.start); + /* optional int32 end = 2; */ + if (message.end !== undefined) + writer.tag(2, WireType.Varint).int32(message.end); + /* optional google.protobuf.ExtensionRangeOptions options = 3; */ + if (message.options) + ExtensionRangeOptions.internalBinaryWrite(message.options, writer.tag(3, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.DescriptorProto.ExtensionRange + */ +export const DescriptorProto_ExtensionRange = new DescriptorProto_ExtensionRange$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class DescriptorProto_ReservedRange$Type extends MessageType { + constructor() { + super("google.protobuf.DescriptorProto.ReservedRange", [ + { no: 1, name: "start", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ }, + { no: 2, name: "end", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ } + ]); + } + create(value?: PartialMessage): DescriptorProto_ReservedRange { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DescriptorProto_ReservedRange): DescriptorProto_ReservedRange { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional int32 start */ 1: + message.start = reader.int32(); + break; + case /* optional int32 end */ 2: + message.end = reader.int32(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: DescriptorProto_ReservedRange, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* optional int32 start = 1; */ + if (message.start !== undefined) + writer.tag(1, WireType.Varint).int32(message.start); + /* optional int32 end = 2; */ + if (message.end !== undefined) + writer.tag(2, WireType.Varint).int32(message.end); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.DescriptorProto.ReservedRange + */ +export const DescriptorProto_ReservedRange = new DescriptorProto_ReservedRange$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class ExtensionRangeOptions$Type extends MessageType { + constructor() { + super("google.protobuf.ExtensionRangeOptions", [ + { no: 999, name: "uninterpreted_option", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UninterpretedOption }, + { no: 2, name: "declaration", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => ExtensionRangeOptions_Declaration }, + { no: 50, name: "features", kind: "message", T: () => FeatureSet }, + { no: 3, name: "verification", kind: "enum", opt: true, T: () => ["google.protobuf.ExtensionRangeOptions.VerificationState", ExtensionRangeOptions_VerificationState] } + ]); + } + create(value?: PartialMessage): ExtensionRangeOptions { + const message = globalThis.Object.create((this.messagePrototype!)); + message.uninterpretedOption = []; + message.declaration = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExtensionRangeOptions): ExtensionRangeOptions { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* repeated google.protobuf.UninterpretedOption uninterpreted_option */ 999: + message.uninterpretedOption.push(UninterpretedOption.internalBinaryRead(reader, reader.uint32(), options)); + break; + case /* repeated google.protobuf.ExtensionRangeOptions.Declaration declaration */ 2: + message.declaration.push(ExtensionRangeOptions_Declaration.internalBinaryRead(reader, reader.uint32(), options)); + break; + case /* optional google.protobuf.FeatureSet features */ 50: + message.features = FeatureSet.internalBinaryRead(reader, reader.uint32(), options, message.features); + break; + case /* optional google.protobuf.ExtensionRangeOptions.VerificationState verification */ 3: + message.verification = reader.int32(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: ExtensionRangeOptions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; */ + for (let i = 0; i < message.uninterpretedOption.length; i++) + UninterpretedOption.internalBinaryWrite(message.uninterpretedOption[i], writer.tag(999, WireType.LengthDelimited).fork(), options).join(); + /* repeated google.protobuf.ExtensionRangeOptions.Declaration declaration = 2; */ + for (let i = 0; i < message.declaration.length; i++) + ExtensionRangeOptions_Declaration.internalBinaryWrite(message.declaration[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + /* optional google.protobuf.FeatureSet features = 50; */ + if (message.features) + FeatureSet.internalBinaryWrite(message.features, writer.tag(50, WireType.LengthDelimited).fork(), options).join(); + /* optional google.protobuf.ExtensionRangeOptions.VerificationState verification = 3; */ + if (message.verification !== undefined) + writer.tag(3, WireType.Varint).int32(message.verification); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.ExtensionRangeOptions + */ +export const ExtensionRangeOptions = new ExtensionRangeOptions$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class ExtensionRangeOptions_Declaration$Type extends MessageType { + constructor() { + super("google.protobuf.ExtensionRangeOptions.Declaration", [ + { no: 1, name: "number", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ }, + { no: 2, name: "full_name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "type", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 5, name: "reserved", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, + { no: 6, name: "repeated", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ } + ]); + } + create(value?: PartialMessage): ExtensionRangeOptions_Declaration { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExtensionRangeOptions_Declaration): ExtensionRangeOptions_Declaration { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional int32 number */ 1: + message.number = reader.int32(); + break; + case /* optional string full_name */ 2: + message.fullName = reader.string(); + break; + case /* optional string type */ 3: + message.type = reader.string(); + break; + case /* optional bool reserved */ 5: + message.reserved = reader.bool(); + break; + case /* optional bool repeated */ 6: + message.repeated = reader.bool(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: ExtensionRangeOptions_Declaration, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* optional int32 number = 1; */ + if (message.number !== undefined) + writer.tag(1, WireType.Varint).int32(message.number); + /* optional string full_name = 2; */ + if (message.fullName !== undefined) + writer.tag(2, WireType.LengthDelimited).string(message.fullName); + /* optional string type = 3; */ + if (message.type !== undefined) + writer.tag(3, WireType.LengthDelimited).string(message.type); + /* optional bool reserved = 5; */ + if (message.reserved !== undefined) + writer.tag(5, WireType.Varint).bool(message.reserved); + /* optional bool repeated = 6; */ + if (message.repeated !== undefined) + writer.tag(6, WireType.Varint).bool(message.repeated); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.ExtensionRangeOptions.Declaration + */ +export const ExtensionRangeOptions_Declaration = new ExtensionRangeOptions_Declaration$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class FieldDescriptorProto$Type extends MessageType { + constructor() { + super("google.protobuf.FieldDescriptorProto", [ + { no: 1, name: "name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "number", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ }, + { no: 4, name: "label", kind: "enum", opt: true, T: () => ["google.protobuf.FieldDescriptorProto.Label", FieldDescriptorProto_Label, "LABEL_"] }, + { no: 5, name: "type", kind: "enum", opt: true, T: () => ["google.protobuf.FieldDescriptorProto.Type", FieldDescriptorProto_Type, "TYPE_"] }, + { no: 6, name: "type_name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "extendee", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 7, name: "default_value", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 9, name: "oneof_index", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ }, + { no: 10, name: "json_name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 8, name: "options", kind: "message", T: () => FieldOptions }, + { no: 17, name: "proto3_optional", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ } + ]); + } + create(value?: PartialMessage): FieldDescriptorProto { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FieldDescriptorProto): FieldDescriptorProto { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional string name */ 1: + message.name = reader.string(); + break; + case /* optional int32 number */ 3: + message.number = reader.int32(); + break; + case /* optional google.protobuf.FieldDescriptorProto.Label label */ 4: + message.label = reader.int32(); + break; + case /* optional google.protobuf.FieldDescriptorProto.Type type */ 5: + message.type = reader.int32(); + break; + case /* optional string type_name */ 6: + message.typeName = reader.string(); + break; + case /* optional string extendee */ 2: + message.extendee = reader.string(); + break; + case /* optional string default_value */ 7: + message.defaultValue = reader.string(); + break; + case /* optional int32 oneof_index */ 9: + message.oneofIndex = reader.int32(); + break; + case /* optional string json_name */ 10: + message.jsonName = reader.string(); + break; + case /* optional google.protobuf.FieldOptions options */ 8: + message.options = FieldOptions.internalBinaryRead(reader, reader.uint32(), options, message.options); + break; + case /* optional bool proto3_optional */ 17: + message.proto3Optional = reader.bool(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: FieldDescriptorProto, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* optional string name = 1; */ + if (message.name !== undefined) + writer.tag(1, WireType.LengthDelimited).string(message.name); + /* optional int32 number = 3; */ + if (message.number !== undefined) + writer.tag(3, WireType.Varint).int32(message.number); + /* optional google.protobuf.FieldDescriptorProto.Label label = 4; */ + if (message.label !== undefined) + writer.tag(4, WireType.Varint).int32(message.label); + /* optional google.protobuf.FieldDescriptorProto.Type type = 5; */ + if (message.type !== undefined) + writer.tag(5, WireType.Varint).int32(message.type); + /* optional string type_name = 6; */ + if (message.typeName !== undefined) + writer.tag(6, WireType.LengthDelimited).string(message.typeName); + /* optional string extendee = 2; */ + if (message.extendee !== undefined) + writer.tag(2, WireType.LengthDelimited).string(message.extendee); + /* optional string default_value = 7; */ + if (message.defaultValue !== undefined) + writer.tag(7, WireType.LengthDelimited).string(message.defaultValue); + /* optional int32 oneof_index = 9; */ + if (message.oneofIndex !== undefined) + writer.tag(9, WireType.Varint).int32(message.oneofIndex); + /* optional string json_name = 10; */ + if (message.jsonName !== undefined) + writer.tag(10, WireType.LengthDelimited).string(message.jsonName); + /* optional google.protobuf.FieldOptions options = 8; */ + if (message.options) + FieldOptions.internalBinaryWrite(message.options, writer.tag(8, WireType.LengthDelimited).fork(), options).join(); + /* optional bool proto3_optional = 17; */ + if (message.proto3Optional !== undefined) + writer.tag(17, WireType.Varint).bool(message.proto3Optional); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.FieldDescriptorProto + */ +export const FieldDescriptorProto = new FieldDescriptorProto$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class OneofDescriptorProto$Type extends MessageType { + constructor() { + super("google.protobuf.OneofDescriptorProto", [ + { no: 1, name: "name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "options", kind: "message", T: () => OneofOptions } + ]); + } + create(value?: PartialMessage): OneofDescriptorProto { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OneofDescriptorProto): OneofDescriptorProto { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional string name */ 1: + message.name = reader.string(); + break; + case /* optional google.protobuf.OneofOptions options */ 2: + message.options = OneofOptions.internalBinaryRead(reader, reader.uint32(), options, message.options); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: OneofDescriptorProto, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* optional string name = 1; */ + if (message.name !== undefined) + writer.tag(1, WireType.LengthDelimited).string(message.name); + /* optional google.protobuf.OneofOptions options = 2; */ + if (message.options) + OneofOptions.internalBinaryWrite(message.options, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.OneofDescriptorProto + */ +export const OneofDescriptorProto = new OneofDescriptorProto$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class EnumDescriptorProto$Type extends MessageType { + constructor() { + super("google.protobuf.EnumDescriptorProto", [ + { no: 1, name: "name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "value", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => EnumValueDescriptorProto }, + { no: 3, name: "options", kind: "message", T: () => EnumOptions }, + { no: 4, name: "reserved_range", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => EnumDescriptorProto_EnumReservedRange }, + { no: 5, name: "reserved_name", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): EnumDescriptorProto { + const message = globalThis.Object.create((this.messagePrototype!)); + message.value = []; + message.reservedRange = []; + message.reservedName = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EnumDescriptorProto): EnumDescriptorProto { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional string name */ 1: + message.name = reader.string(); + break; + case /* repeated google.protobuf.EnumValueDescriptorProto value */ 2: + message.value.push(EnumValueDescriptorProto.internalBinaryRead(reader, reader.uint32(), options)); + break; + case /* optional google.protobuf.EnumOptions options */ 3: + message.options = EnumOptions.internalBinaryRead(reader, reader.uint32(), options, message.options); + break; + case /* repeated google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range */ 4: + message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.internalBinaryRead(reader, reader.uint32(), options)); + break; + case /* repeated string reserved_name */ 5: + message.reservedName.push(reader.string()); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: EnumDescriptorProto, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* optional string name = 1; */ + if (message.name !== undefined) + writer.tag(1, WireType.LengthDelimited).string(message.name); + /* repeated google.protobuf.EnumValueDescriptorProto value = 2; */ + for (let i = 0; i < message.value.length; i++) + EnumValueDescriptorProto.internalBinaryWrite(message.value[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + /* optional google.protobuf.EnumOptions options = 3; */ + if (message.options) + EnumOptions.internalBinaryWrite(message.options, writer.tag(3, WireType.LengthDelimited).fork(), options).join(); + /* repeated google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4; */ + for (let i = 0; i < message.reservedRange.length; i++) + EnumDescriptorProto_EnumReservedRange.internalBinaryWrite(message.reservedRange[i], writer.tag(4, WireType.LengthDelimited).fork(), options).join(); + /* repeated string reserved_name = 5; */ + for (let i = 0; i < message.reservedName.length; i++) + writer.tag(5, WireType.LengthDelimited).string(message.reservedName[i]); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.EnumDescriptorProto + */ +export const EnumDescriptorProto = new EnumDescriptorProto$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class EnumDescriptorProto_EnumReservedRange$Type extends MessageType { + constructor() { + super("google.protobuf.EnumDescriptorProto.EnumReservedRange", [ + { no: 1, name: "start", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ }, + { no: 2, name: "end", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ } + ]); + } + create(value?: PartialMessage): EnumDescriptorProto_EnumReservedRange { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EnumDescriptorProto_EnumReservedRange): EnumDescriptorProto_EnumReservedRange { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional int32 start */ 1: + message.start = reader.int32(); + break; + case /* optional int32 end */ 2: + message.end = reader.int32(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: EnumDescriptorProto_EnumReservedRange, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* optional int32 start = 1; */ + if (message.start !== undefined) + writer.tag(1, WireType.Varint).int32(message.start); + /* optional int32 end = 2; */ + if (message.end !== undefined) + writer.tag(2, WireType.Varint).int32(message.end); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.EnumDescriptorProto.EnumReservedRange + */ +export const EnumDescriptorProto_EnumReservedRange = new EnumDescriptorProto_EnumReservedRange$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class EnumValueDescriptorProto$Type extends MessageType { + constructor() { + super("google.protobuf.EnumValueDescriptorProto", [ + { no: 1, name: "name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "number", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ }, + { no: 3, name: "options", kind: "message", T: () => EnumValueOptions } + ]); + } + create(value?: PartialMessage): EnumValueDescriptorProto { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EnumValueDescriptorProto): EnumValueDescriptorProto { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional string name */ 1: + message.name = reader.string(); + break; + case /* optional int32 number */ 2: + message.number = reader.int32(); + break; + case /* optional google.protobuf.EnumValueOptions options */ 3: + message.options = EnumValueOptions.internalBinaryRead(reader, reader.uint32(), options, message.options); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: EnumValueDescriptorProto, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* optional string name = 1; */ + if (message.name !== undefined) + writer.tag(1, WireType.LengthDelimited).string(message.name); + /* optional int32 number = 2; */ + if (message.number !== undefined) + writer.tag(2, WireType.Varint).int32(message.number); + /* optional google.protobuf.EnumValueOptions options = 3; */ + if (message.options) + EnumValueOptions.internalBinaryWrite(message.options, writer.tag(3, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.EnumValueDescriptorProto + */ +export const EnumValueDescriptorProto = new EnumValueDescriptorProto$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class ServiceDescriptorProto$Type extends MessageType { + constructor() { + super("google.protobuf.ServiceDescriptorProto", [ + { no: 1, name: "name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "method", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => MethodDescriptorProto }, + { no: 3, name: "options", kind: "message", T: () => ServiceOptions } + ]); + } + create(value?: PartialMessage): ServiceDescriptorProto { + const message = globalThis.Object.create((this.messagePrototype!)); + message.method = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ServiceDescriptorProto): ServiceDescriptorProto { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional string name */ 1: + message.name = reader.string(); + break; + case /* repeated google.protobuf.MethodDescriptorProto method */ 2: + message.method.push(MethodDescriptorProto.internalBinaryRead(reader, reader.uint32(), options)); + break; + case /* optional google.protobuf.ServiceOptions options */ 3: + message.options = ServiceOptions.internalBinaryRead(reader, reader.uint32(), options, message.options); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: ServiceDescriptorProto, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* optional string name = 1; */ + if (message.name !== undefined) + writer.tag(1, WireType.LengthDelimited).string(message.name); + /* repeated google.protobuf.MethodDescriptorProto method = 2; */ + for (let i = 0; i < message.method.length; i++) + MethodDescriptorProto.internalBinaryWrite(message.method[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + /* optional google.protobuf.ServiceOptions options = 3; */ + if (message.options) + ServiceOptions.internalBinaryWrite(message.options, writer.tag(3, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.ServiceDescriptorProto + */ +export const ServiceDescriptorProto = new ServiceDescriptorProto$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class MethodDescriptorProto$Type extends MessageType { + constructor() { + super("google.protobuf.MethodDescriptorProto", [ + { no: 1, name: "name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "input_type", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "output_type", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 4, name: "options", kind: "message", T: () => MethodOptions }, + { no: 5, name: "client_streaming", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, + { no: 6, name: "server_streaming", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ } + ]); + } + create(value?: PartialMessage): MethodDescriptorProto { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MethodDescriptorProto): MethodDescriptorProto { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional string name */ 1: + message.name = reader.string(); + break; + case /* optional string input_type */ 2: + message.inputType = reader.string(); + break; + case /* optional string output_type */ 3: + message.outputType = reader.string(); + break; + case /* optional google.protobuf.MethodOptions options */ 4: + message.options = MethodOptions.internalBinaryRead(reader, reader.uint32(), options, message.options); + break; + case /* optional bool client_streaming */ 5: + message.clientStreaming = reader.bool(); + break; + case /* optional bool server_streaming */ 6: + message.serverStreaming = reader.bool(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: MethodDescriptorProto, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* optional string name = 1; */ + if (message.name !== undefined) + writer.tag(1, WireType.LengthDelimited).string(message.name); + /* optional string input_type = 2; */ + if (message.inputType !== undefined) + writer.tag(2, WireType.LengthDelimited).string(message.inputType); + /* optional string output_type = 3; */ + if (message.outputType !== undefined) + writer.tag(3, WireType.LengthDelimited).string(message.outputType); + /* optional google.protobuf.MethodOptions options = 4; */ + if (message.options) + MethodOptions.internalBinaryWrite(message.options, writer.tag(4, WireType.LengthDelimited).fork(), options).join(); + /* optional bool client_streaming = 5; */ + if (message.clientStreaming !== undefined) + writer.tag(5, WireType.Varint).bool(message.clientStreaming); + /* optional bool server_streaming = 6; */ + if (message.serverStreaming !== undefined) + writer.tag(6, WireType.Varint).bool(message.serverStreaming); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.MethodDescriptorProto + */ +export const MethodDescriptorProto = new MethodDescriptorProto$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class FileOptions$Type extends MessageType { + constructor() { + super("google.protobuf.FileOptions", [ + { no: 1, name: "java_package", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 8, name: "java_outer_classname", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 10, name: "java_multiple_files", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, + { no: 20, name: "java_generate_equals_and_hash", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, + { no: 27, name: "java_string_check_utf8", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, + { no: 9, name: "optimize_for", kind: "enum", opt: true, T: () => ["google.protobuf.FileOptions.OptimizeMode", FileOptions_OptimizeMode] }, + { no: 11, name: "go_package", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 16, name: "cc_generic_services", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, + { no: 17, name: "java_generic_services", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, + { no: 18, name: "py_generic_services", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, + { no: 42, name: "php_generic_services", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, + { no: 23, name: "deprecated", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, + { no: 31, name: "cc_enable_arenas", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, + { no: 36, name: "objc_class_prefix", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 37, name: "csharp_namespace", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 39, name: "swift_prefix", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 40, name: "php_class_prefix", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 41, name: "php_namespace", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 44, name: "php_metadata_namespace", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 45, name: "ruby_package", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 50, name: "features", kind: "message", T: () => FeatureSet }, + { no: 999, name: "uninterpreted_option", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UninterpretedOption } + ]); + } + create(value?: PartialMessage): FileOptions { + const message = globalThis.Object.create((this.messagePrototype!)); + message.uninterpretedOption = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FileOptions): FileOptions { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional string java_package */ 1: + message.javaPackage = reader.string(); + break; + case /* optional string java_outer_classname */ 8: + message.javaOuterClassname = reader.string(); + break; + case /* optional bool java_multiple_files */ 10: + message.javaMultipleFiles = reader.bool(); + break; + case /* optional bool java_generate_equals_and_hash = 20 [deprecated = true];*/ 20: + message.javaGenerateEqualsAndHash = reader.bool(); + break; + case /* optional bool java_string_check_utf8 */ 27: + message.javaStringCheckUtf8 = reader.bool(); + break; + case /* optional google.protobuf.FileOptions.OptimizeMode optimize_for */ 9: + message.optimizeFor = reader.int32(); + break; + case /* optional string go_package */ 11: + message.goPackage = reader.string(); + break; + case /* optional bool cc_generic_services */ 16: + message.ccGenericServices = reader.bool(); + break; + case /* optional bool java_generic_services */ 17: + message.javaGenericServices = reader.bool(); + break; + case /* optional bool py_generic_services */ 18: + message.pyGenericServices = reader.bool(); + break; + case /* optional bool php_generic_services */ 42: + message.phpGenericServices = reader.bool(); + break; + case /* optional bool deprecated */ 23: + message.deprecated = reader.bool(); + break; + case /* optional bool cc_enable_arenas */ 31: + message.ccEnableArenas = reader.bool(); + break; + case /* optional string objc_class_prefix */ 36: + message.objcClassPrefix = reader.string(); + break; + case /* optional string csharp_namespace */ 37: + message.csharpNamespace = reader.string(); + break; + case /* optional string swift_prefix */ 39: + message.swiftPrefix = reader.string(); + break; + case /* optional string php_class_prefix */ 40: + message.phpClassPrefix = reader.string(); + break; + case /* optional string php_namespace */ 41: + message.phpNamespace = reader.string(); + break; + case /* optional string php_metadata_namespace */ 44: + message.phpMetadataNamespace = reader.string(); + break; + case /* optional string ruby_package */ 45: + message.rubyPackage = reader.string(); + break; + case /* optional google.protobuf.FeatureSet features */ 50: + message.features = FeatureSet.internalBinaryRead(reader, reader.uint32(), options, message.features); + break; + case /* repeated google.protobuf.UninterpretedOption uninterpreted_option */ 999: + message.uninterpretedOption.push(UninterpretedOption.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: FileOptions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* optional string java_package = 1; */ + if (message.javaPackage !== undefined) + writer.tag(1, WireType.LengthDelimited).string(message.javaPackage); + /* optional string java_outer_classname = 8; */ + if (message.javaOuterClassname !== undefined) + writer.tag(8, WireType.LengthDelimited).string(message.javaOuterClassname); + /* optional bool java_multiple_files = 10; */ + if (message.javaMultipleFiles !== undefined) + writer.tag(10, WireType.Varint).bool(message.javaMultipleFiles); + /* optional bool java_generate_equals_and_hash = 20 [deprecated = true]; */ + if (message.javaGenerateEqualsAndHash !== undefined) + writer.tag(20, WireType.Varint).bool(message.javaGenerateEqualsAndHash); + /* optional bool java_string_check_utf8 = 27; */ + if (message.javaStringCheckUtf8 !== undefined) + writer.tag(27, WireType.Varint).bool(message.javaStringCheckUtf8); + /* optional google.protobuf.FileOptions.OptimizeMode optimize_for = 9; */ + if (message.optimizeFor !== undefined) + writer.tag(9, WireType.Varint).int32(message.optimizeFor); + /* optional string go_package = 11; */ + if (message.goPackage !== undefined) + writer.tag(11, WireType.LengthDelimited).string(message.goPackage); + /* optional bool cc_generic_services = 16; */ + if (message.ccGenericServices !== undefined) + writer.tag(16, WireType.Varint).bool(message.ccGenericServices); + /* optional bool java_generic_services = 17; */ + if (message.javaGenericServices !== undefined) + writer.tag(17, WireType.Varint).bool(message.javaGenericServices); + /* optional bool py_generic_services = 18; */ + if (message.pyGenericServices !== undefined) + writer.tag(18, WireType.Varint).bool(message.pyGenericServices); + /* optional bool php_generic_services = 42; */ + if (message.phpGenericServices !== undefined) + writer.tag(42, WireType.Varint).bool(message.phpGenericServices); + /* optional bool deprecated = 23; */ + if (message.deprecated !== undefined) + writer.tag(23, WireType.Varint).bool(message.deprecated); + /* optional bool cc_enable_arenas = 31; */ + if (message.ccEnableArenas !== undefined) + writer.tag(31, WireType.Varint).bool(message.ccEnableArenas); + /* optional string objc_class_prefix = 36; */ + if (message.objcClassPrefix !== undefined) + writer.tag(36, WireType.LengthDelimited).string(message.objcClassPrefix); + /* optional string csharp_namespace = 37; */ + if (message.csharpNamespace !== undefined) + writer.tag(37, WireType.LengthDelimited).string(message.csharpNamespace); + /* optional string swift_prefix = 39; */ + if (message.swiftPrefix !== undefined) + writer.tag(39, WireType.LengthDelimited).string(message.swiftPrefix); + /* optional string php_class_prefix = 40; */ + if (message.phpClassPrefix !== undefined) + writer.tag(40, WireType.LengthDelimited).string(message.phpClassPrefix); + /* optional string php_namespace = 41; */ + if (message.phpNamespace !== undefined) + writer.tag(41, WireType.LengthDelimited).string(message.phpNamespace); + /* optional string php_metadata_namespace = 44; */ + if (message.phpMetadataNamespace !== undefined) + writer.tag(44, WireType.LengthDelimited).string(message.phpMetadataNamespace); + /* optional string ruby_package = 45; */ + if (message.rubyPackage !== undefined) + writer.tag(45, WireType.LengthDelimited).string(message.rubyPackage); + /* optional google.protobuf.FeatureSet features = 50; */ + if (message.features) + FeatureSet.internalBinaryWrite(message.features, writer.tag(50, WireType.LengthDelimited).fork(), options).join(); + /* repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; */ + for (let i = 0; i < message.uninterpretedOption.length; i++) + UninterpretedOption.internalBinaryWrite(message.uninterpretedOption[i], writer.tag(999, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.FileOptions + */ +export const FileOptions = new FileOptions$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class MessageOptions$Type extends MessageType { + constructor() { + super("google.protobuf.MessageOptions", [ + { no: 1, name: "message_set_wire_format", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, + { no: 2, name: "no_standard_descriptor_accessor", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, + { no: 3, name: "deprecated", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, + { no: 7, name: "map_entry", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, + { no: 11, name: "deprecated_legacy_json_field_conflicts", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, + { no: 12, name: "features", kind: "message", T: () => FeatureSet }, + { no: 999, name: "uninterpreted_option", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UninterpretedOption } + ]); + } + create(value?: PartialMessage): MessageOptions { + const message = globalThis.Object.create((this.messagePrototype!)); + message.uninterpretedOption = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MessageOptions): MessageOptions { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional bool message_set_wire_format */ 1: + message.messageSetWireFormat = reader.bool(); + break; + case /* optional bool no_standard_descriptor_accessor */ 2: + message.noStandardDescriptorAccessor = reader.bool(); + break; + case /* optional bool deprecated */ 3: + message.deprecated = reader.bool(); + break; + case /* optional bool map_entry */ 7: + message.mapEntry = reader.bool(); + break; + case /* optional bool deprecated_legacy_json_field_conflicts = 11 [deprecated = true];*/ 11: + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); + break; + case /* optional google.protobuf.FeatureSet features */ 12: + message.features = FeatureSet.internalBinaryRead(reader, reader.uint32(), options, message.features); + break; + case /* repeated google.protobuf.UninterpretedOption uninterpreted_option */ 999: + message.uninterpretedOption.push(UninterpretedOption.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: MessageOptions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* optional bool message_set_wire_format = 1; */ + if (message.messageSetWireFormat !== undefined) + writer.tag(1, WireType.Varint).bool(message.messageSetWireFormat); + /* optional bool no_standard_descriptor_accessor = 2; */ + if (message.noStandardDescriptorAccessor !== undefined) + writer.tag(2, WireType.Varint).bool(message.noStandardDescriptorAccessor); + /* optional bool deprecated = 3; */ + if (message.deprecated !== undefined) + writer.tag(3, WireType.Varint).bool(message.deprecated); + /* optional bool map_entry = 7; */ + if (message.mapEntry !== undefined) + writer.tag(7, WireType.Varint).bool(message.mapEntry); + /* optional bool deprecated_legacy_json_field_conflicts = 11 [deprecated = true]; */ + if (message.deprecatedLegacyJsonFieldConflicts !== undefined) + writer.tag(11, WireType.Varint).bool(message.deprecatedLegacyJsonFieldConflicts); + /* optional google.protobuf.FeatureSet features = 12; */ + if (message.features) + FeatureSet.internalBinaryWrite(message.features, writer.tag(12, WireType.LengthDelimited).fork(), options).join(); + /* repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; */ + for (let i = 0; i < message.uninterpretedOption.length; i++) + UninterpretedOption.internalBinaryWrite(message.uninterpretedOption[i], writer.tag(999, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.MessageOptions + */ +export const MessageOptions = new MessageOptions$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class FieldOptions$Type extends MessageType { + constructor() { + super("google.protobuf.FieldOptions", [ + { no: 1, name: "ctype", kind: "enum", opt: true, T: () => ["google.protobuf.FieldOptions.CType", FieldOptions_CType] }, + { no: 2, name: "packed", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, + { no: 6, name: "jstype", kind: "enum", opt: true, T: () => ["google.protobuf.FieldOptions.JSType", FieldOptions_JSType] }, + { no: 5, name: "lazy", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, + { no: 15, name: "unverified_lazy", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, + { no: 3, name: "deprecated", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, + { no: 10, name: "weak", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, + { no: 16, name: "debug_redact", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, + { no: 17, name: "retention", kind: "enum", opt: true, T: () => ["google.protobuf.FieldOptions.OptionRetention", FieldOptions_OptionRetention] }, + { no: 19, name: "targets", kind: "enum", repeat: 2 /*RepeatType.UNPACKED*/, T: () => ["google.protobuf.FieldOptions.OptionTargetType", FieldOptions_OptionTargetType] }, + { no: 20, name: "edition_defaults", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => FieldOptions_EditionDefault }, + { no: 21, name: "features", kind: "message", T: () => FeatureSet }, + { no: 999, name: "uninterpreted_option", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UninterpretedOption } + ]); + } + create(value?: PartialMessage): FieldOptions { + const message = globalThis.Object.create((this.messagePrototype!)); + message.targets = []; + message.editionDefaults = []; + message.uninterpretedOption = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FieldOptions): FieldOptions { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional google.protobuf.FieldOptions.CType ctype */ 1: + message.ctype = reader.int32(); + break; + case /* optional bool packed */ 2: + message.packed = reader.bool(); + break; + case /* optional google.protobuf.FieldOptions.JSType jstype */ 6: + message.jstype = reader.int32(); + break; + case /* optional bool lazy */ 5: + message.lazy = reader.bool(); + break; + case /* optional bool unverified_lazy */ 15: + message.unverifiedLazy = reader.bool(); + break; + case /* optional bool deprecated */ 3: + message.deprecated = reader.bool(); + break; + case /* optional bool weak */ 10: + message.weak = reader.bool(); + break; + case /* optional bool debug_redact */ 16: + message.debugRedact = reader.bool(); + break; + case /* optional google.protobuf.FieldOptions.OptionRetention retention */ 17: + message.retention = reader.int32(); + break; + case /* repeated google.protobuf.FieldOptions.OptionTargetType targets */ 19: + if (wireType === WireType.LengthDelimited) + for (let e = reader.int32() + reader.pos; reader.pos < e;) + message.targets.push(reader.int32()); + else + message.targets.push(reader.int32()); + break; + case /* repeated google.protobuf.FieldOptions.EditionDefault edition_defaults */ 20: + message.editionDefaults.push(FieldOptions_EditionDefault.internalBinaryRead(reader, reader.uint32(), options)); + break; + case /* optional google.protobuf.FeatureSet features */ 21: + message.features = FeatureSet.internalBinaryRead(reader, reader.uint32(), options, message.features); + break; + case /* repeated google.protobuf.UninterpretedOption uninterpreted_option */ 999: + message.uninterpretedOption.push(UninterpretedOption.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: FieldOptions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* optional google.protobuf.FieldOptions.CType ctype = 1; */ + if (message.ctype !== undefined) + writer.tag(1, WireType.Varint).int32(message.ctype); + /* optional bool packed = 2; */ + if (message.packed !== undefined) + writer.tag(2, WireType.Varint).bool(message.packed); + /* optional google.protobuf.FieldOptions.JSType jstype = 6; */ + if (message.jstype !== undefined) + writer.tag(6, WireType.Varint).int32(message.jstype); + /* optional bool lazy = 5; */ + if (message.lazy !== undefined) + writer.tag(5, WireType.Varint).bool(message.lazy); + /* optional bool unverified_lazy = 15; */ + if (message.unverifiedLazy !== undefined) + writer.tag(15, WireType.Varint).bool(message.unverifiedLazy); + /* optional bool deprecated = 3; */ + if (message.deprecated !== undefined) + writer.tag(3, WireType.Varint).bool(message.deprecated); + /* optional bool weak = 10; */ + if (message.weak !== undefined) + writer.tag(10, WireType.Varint).bool(message.weak); + /* optional bool debug_redact = 16; */ + if (message.debugRedact !== undefined) + writer.tag(16, WireType.Varint).bool(message.debugRedact); + /* optional google.protobuf.FieldOptions.OptionRetention retention = 17; */ + if (message.retention !== undefined) + writer.tag(17, WireType.Varint).int32(message.retention); + /* repeated google.protobuf.FieldOptions.OptionTargetType targets = 19; */ + for (let i = 0; i < message.targets.length; i++) + writer.tag(19, WireType.Varint).int32(message.targets[i]); + /* repeated google.protobuf.FieldOptions.EditionDefault edition_defaults = 20; */ + for (let i = 0; i < message.editionDefaults.length; i++) + FieldOptions_EditionDefault.internalBinaryWrite(message.editionDefaults[i], writer.tag(20, WireType.LengthDelimited).fork(), options).join(); + /* optional google.protobuf.FeatureSet features = 21; */ + if (message.features) + FeatureSet.internalBinaryWrite(message.features, writer.tag(21, WireType.LengthDelimited).fork(), options).join(); + /* repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; */ + for (let i = 0; i < message.uninterpretedOption.length; i++) + UninterpretedOption.internalBinaryWrite(message.uninterpretedOption[i], writer.tag(999, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.FieldOptions + */ +export const FieldOptions = new FieldOptions$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class FieldOptions_EditionDefault$Type extends MessageType { + constructor() { + super("google.protobuf.FieldOptions.EditionDefault", [ + { no: 3, name: "edition", kind: "enum", opt: true, T: () => ["google.protobuf.Edition", Edition] }, + { no: 2, name: "value", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): FieldOptions_EditionDefault { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FieldOptions_EditionDefault): FieldOptions_EditionDefault { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional google.protobuf.Edition edition */ 3: + message.edition = reader.int32(); + break; + case /* optional string value */ 2: + message.value = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: FieldOptions_EditionDefault, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* optional google.protobuf.Edition edition = 3; */ + if (message.edition !== undefined) + writer.tag(3, WireType.Varint).int32(message.edition); + /* optional string value = 2; */ + if (message.value !== undefined) + writer.tag(2, WireType.LengthDelimited).string(message.value); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.FieldOptions.EditionDefault + */ +export const FieldOptions_EditionDefault = new FieldOptions_EditionDefault$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class OneofOptions$Type extends MessageType { + constructor() { + super("google.protobuf.OneofOptions", [ + { no: 1, name: "features", kind: "message", T: () => FeatureSet }, + { no: 999, name: "uninterpreted_option", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UninterpretedOption } + ]); + } + create(value?: PartialMessage): OneofOptions { + const message = globalThis.Object.create((this.messagePrototype!)); + message.uninterpretedOption = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OneofOptions): OneofOptions { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional google.protobuf.FeatureSet features */ 1: + message.features = FeatureSet.internalBinaryRead(reader, reader.uint32(), options, message.features); + break; + case /* repeated google.protobuf.UninterpretedOption uninterpreted_option */ 999: + message.uninterpretedOption.push(UninterpretedOption.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: OneofOptions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* optional google.protobuf.FeatureSet features = 1; */ + if (message.features) + FeatureSet.internalBinaryWrite(message.features, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + /* repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; */ + for (let i = 0; i < message.uninterpretedOption.length; i++) + UninterpretedOption.internalBinaryWrite(message.uninterpretedOption[i], writer.tag(999, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.OneofOptions + */ +export const OneofOptions = new OneofOptions$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class EnumOptions$Type extends MessageType { + constructor() { + super("google.protobuf.EnumOptions", [ + { no: 2, name: "allow_alias", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, + { no: 3, name: "deprecated", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, + { no: 6, name: "deprecated_legacy_json_field_conflicts", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, + { no: 7, name: "features", kind: "message", T: () => FeatureSet }, + { no: 999, name: "uninterpreted_option", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UninterpretedOption } + ]); + } + create(value?: PartialMessage): EnumOptions { + const message = globalThis.Object.create((this.messagePrototype!)); + message.uninterpretedOption = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EnumOptions): EnumOptions { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional bool allow_alias */ 2: + message.allowAlias = reader.bool(); + break; + case /* optional bool deprecated */ 3: + message.deprecated = reader.bool(); + break; + case /* optional bool deprecated_legacy_json_field_conflicts = 6 [deprecated = true];*/ 6: + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); + break; + case /* optional google.protobuf.FeatureSet features */ 7: + message.features = FeatureSet.internalBinaryRead(reader, reader.uint32(), options, message.features); + break; + case /* repeated google.protobuf.UninterpretedOption uninterpreted_option */ 999: + message.uninterpretedOption.push(UninterpretedOption.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: EnumOptions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* optional bool allow_alias = 2; */ + if (message.allowAlias !== undefined) + writer.tag(2, WireType.Varint).bool(message.allowAlias); + /* optional bool deprecated = 3; */ + if (message.deprecated !== undefined) + writer.tag(3, WireType.Varint).bool(message.deprecated); + /* optional bool deprecated_legacy_json_field_conflicts = 6 [deprecated = true]; */ + if (message.deprecatedLegacyJsonFieldConflicts !== undefined) + writer.tag(6, WireType.Varint).bool(message.deprecatedLegacyJsonFieldConflicts); + /* optional google.protobuf.FeatureSet features = 7; */ + if (message.features) + FeatureSet.internalBinaryWrite(message.features, writer.tag(7, WireType.LengthDelimited).fork(), options).join(); + /* repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; */ + for (let i = 0; i < message.uninterpretedOption.length; i++) + UninterpretedOption.internalBinaryWrite(message.uninterpretedOption[i], writer.tag(999, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.EnumOptions + */ +export const EnumOptions = new EnumOptions$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class EnumValueOptions$Type extends MessageType { + constructor() { + super("google.protobuf.EnumValueOptions", [ + { no: 1, name: "deprecated", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, + { no: 2, name: "features", kind: "message", T: () => FeatureSet }, + { no: 3, name: "debug_redact", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, + { no: 999, name: "uninterpreted_option", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UninterpretedOption } + ]); + } + create(value?: PartialMessage): EnumValueOptions { + const message = globalThis.Object.create((this.messagePrototype!)); + message.uninterpretedOption = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EnumValueOptions): EnumValueOptions { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional bool deprecated */ 1: + message.deprecated = reader.bool(); + break; + case /* optional google.protobuf.FeatureSet features */ 2: + message.features = FeatureSet.internalBinaryRead(reader, reader.uint32(), options, message.features); + break; + case /* optional bool debug_redact */ 3: + message.debugRedact = reader.bool(); + break; + case /* repeated google.protobuf.UninterpretedOption uninterpreted_option */ 999: + message.uninterpretedOption.push(UninterpretedOption.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: EnumValueOptions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* optional bool deprecated = 1; */ + if (message.deprecated !== undefined) + writer.tag(1, WireType.Varint).bool(message.deprecated); + /* optional google.protobuf.FeatureSet features = 2; */ + if (message.features) + FeatureSet.internalBinaryWrite(message.features, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + /* optional bool debug_redact = 3; */ + if (message.debugRedact !== undefined) + writer.tag(3, WireType.Varint).bool(message.debugRedact); + /* repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; */ + for (let i = 0; i < message.uninterpretedOption.length; i++) + UninterpretedOption.internalBinaryWrite(message.uninterpretedOption[i], writer.tag(999, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.EnumValueOptions + */ +export const EnumValueOptions = new EnumValueOptions$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class ServiceOptions$Type extends MessageType { + constructor() { + super("google.protobuf.ServiceOptions", [ + { no: 34, name: "features", kind: "message", T: () => FeatureSet }, + { no: 33, name: "deprecated", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, + { no: 999, name: "uninterpreted_option", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UninterpretedOption } + ]); + } + create(value?: PartialMessage): ServiceOptions { + const message = globalThis.Object.create((this.messagePrototype!)); + message.uninterpretedOption = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ServiceOptions): ServiceOptions { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional google.protobuf.FeatureSet features */ 34: + message.features = FeatureSet.internalBinaryRead(reader, reader.uint32(), options, message.features); + break; + case /* optional bool deprecated */ 33: + message.deprecated = reader.bool(); + break; + case /* repeated google.protobuf.UninterpretedOption uninterpreted_option */ 999: + message.uninterpretedOption.push(UninterpretedOption.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: ServiceOptions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* optional google.protobuf.FeatureSet features = 34; */ + if (message.features) + FeatureSet.internalBinaryWrite(message.features, writer.tag(34, WireType.LengthDelimited).fork(), options).join(); + /* optional bool deprecated = 33; */ + if (message.deprecated !== undefined) + writer.tag(33, WireType.Varint).bool(message.deprecated); + /* repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; */ + for (let i = 0; i < message.uninterpretedOption.length; i++) + UninterpretedOption.internalBinaryWrite(message.uninterpretedOption[i], writer.tag(999, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.ServiceOptions + */ +export const ServiceOptions = new ServiceOptions$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class MethodOptions$Type extends MessageType { + constructor() { + super("google.protobuf.MethodOptions", [ + { no: 33, name: "deprecated", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, + { no: 34, name: "idempotency_level", kind: "enum", opt: true, T: () => ["google.protobuf.MethodOptions.IdempotencyLevel", MethodOptions_IdempotencyLevel] }, + { no: 35, name: "features", kind: "message", T: () => FeatureSet }, + { no: 999, name: "uninterpreted_option", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UninterpretedOption } + ]); + } + create(value?: PartialMessage): MethodOptions { + const message = globalThis.Object.create((this.messagePrototype!)); + message.uninterpretedOption = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MethodOptions): MethodOptions { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional bool deprecated */ 33: + message.deprecated = reader.bool(); + break; + case /* optional google.protobuf.MethodOptions.IdempotencyLevel idempotency_level */ 34: + message.idempotencyLevel = reader.int32(); + break; + case /* optional google.protobuf.FeatureSet features */ 35: + message.features = FeatureSet.internalBinaryRead(reader, reader.uint32(), options, message.features); + break; + case /* repeated google.protobuf.UninterpretedOption uninterpreted_option */ 999: + message.uninterpretedOption.push(UninterpretedOption.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: MethodOptions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* optional bool deprecated = 33; */ + if (message.deprecated !== undefined) + writer.tag(33, WireType.Varint).bool(message.deprecated); + /* optional google.protobuf.MethodOptions.IdempotencyLevel idempotency_level = 34; */ + if (message.idempotencyLevel !== undefined) + writer.tag(34, WireType.Varint).int32(message.idempotencyLevel); + /* optional google.protobuf.FeatureSet features = 35; */ + if (message.features) + FeatureSet.internalBinaryWrite(message.features, writer.tag(35, WireType.LengthDelimited).fork(), options).join(); + /* repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; */ + for (let i = 0; i < message.uninterpretedOption.length; i++) + UninterpretedOption.internalBinaryWrite(message.uninterpretedOption[i], writer.tag(999, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.MethodOptions + */ +export const MethodOptions = new MethodOptions$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class UninterpretedOption$Type extends MessageType { + constructor() { + super("google.protobuf.UninterpretedOption", [ + { no: 2, name: "name", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UninterpretedOption_NamePart }, + { no: 3, name: "identifier_value", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 4, name: "positive_int_value", kind: "scalar", opt: true, T: 4 /*ScalarType.UINT64*/ }, + { no: 5, name: "negative_int_value", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/ }, + { no: 6, name: "double_value", kind: "scalar", opt: true, T: 1 /*ScalarType.DOUBLE*/ }, + { no: 7, name: "string_value", kind: "scalar", opt: true, T: 12 /*ScalarType.BYTES*/ }, + { no: 8, name: "aggregate_value", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): UninterpretedOption { + const message = globalThis.Object.create((this.messagePrototype!)); + message.name = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UninterpretedOption): UninterpretedOption { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* repeated google.protobuf.UninterpretedOption.NamePart name */ 2: + message.name.push(UninterpretedOption_NamePart.internalBinaryRead(reader, reader.uint32(), options)); + break; + case /* optional string identifier_value */ 3: + message.identifierValue = reader.string(); + break; + case /* optional uint64 positive_int_value */ 4: + message.positiveIntValue = reader.uint64().toString(); + break; + case /* optional int64 negative_int_value */ 5: + message.negativeIntValue = reader.int64().toString(); + break; + case /* optional double double_value */ 6: + message.doubleValue = reader.double(); + break; + case /* optional bytes string_value */ 7: + message.stringValue = reader.bytes(); + break; + case /* optional string aggregate_value */ 8: + message.aggregateValue = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: UninterpretedOption, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* repeated google.protobuf.UninterpretedOption.NamePart name = 2; */ + for (let i = 0; i < message.name.length; i++) + UninterpretedOption_NamePart.internalBinaryWrite(message.name[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + /* optional string identifier_value = 3; */ + if (message.identifierValue !== undefined) + writer.tag(3, WireType.LengthDelimited).string(message.identifierValue); + /* optional uint64 positive_int_value = 4; */ + if (message.positiveIntValue !== undefined) + writer.tag(4, WireType.Varint).uint64(message.positiveIntValue); + /* optional int64 negative_int_value = 5; */ + if (message.negativeIntValue !== undefined) + writer.tag(5, WireType.Varint).int64(message.negativeIntValue); + /* optional double double_value = 6; */ + if (message.doubleValue !== undefined) + writer.tag(6, WireType.Bit64).double(message.doubleValue); + /* optional bytes string_value = 7; */ + if (message.stringValue !== undefined) + writer.tag(7, WireType.LengthDelimited).bytes(message.stringValue); + /* optional string aggregate_value = 8; */ + if (message.aggregateValue !== undefined) + writer.tag(8, WireType.LengthDelimited).string(message.aggregateValue); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.UninterpretedOption + */ +export const UninterpretedOption = new UninterpretedOption$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class UninterpretedOption_NamePart$Type extends MessageType { + constructor() { + super("google.protobuf.UninterpretedOption.NamePart", [ + { no: 1, name: "name_part", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "is_extension", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } + create(value?: PartialMessage): UninterpretedOption_NamePart { + const message = globalThis.Object.create((this.messagePrototype!)); + message.namePart = ""; + message.isExtension = false; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UninterpretedOption_NamePart): UninterpretedOption_NamePart { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string name_part */ 1: + message.namePart = reader.string(); + break; + case /* bool is_extension */ 2: + message.isExtension = reader.bool(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: UninterpretedOption_NamePart, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string name_part = 1; */ + if (message.namePart !== "") + writer.tag(1, WireType.LengthDelimited).string(message.namePart); + /* bool is_extension = 2; */ + if (message.isExtension !== false) + writer.tag(2, WireType.Varint).bool(message.isExtension); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.UninterpretedOption.NamePart + */ +export const UninterpretedOption_NamePart = new UninterpretedOption_NamePart$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class FeatureSet$Type extends MessageType { + constructor() { + super("google.protobuf.FeatureSet", [ + { no: 1, name: "field_presence", kind: "enum", opt: true, T: () => ["google.protobuf.FeatureSet.FieldPresence", FeatureSet_FieldPresence] }, + { no: 2, name: "enum_type", kind: "enum", opt: true, T: () => ["google.protobuf.FeatureSet.EnumType", FeatureSet_EnumType] }, + { no: 3, name: "repeated_field_encoding", kind: "enum", opt: true, T: () => ["google.protobuf.FeatureSet.RepeatedFieldEncoding", FeatureSet_RepeatedFieldEncoding] }, + { no: 4, name: "utf8_validation", kind: "enum", opt: true, T: () => ["google.protobuf.FeatureSet.Utf8Validation", FeatureSet_Utf8Validation] }, + { no: 5, name: "message_encoding", kind: "enum", opt: true, T: () => ["google.protobuf.FeatureSet.MessageEncoding", FeatureSet_MessageEncoding] }, + { no: 6, name: "json_format", kind: "enum", opt: true, T: () => ["google.protobuf.FeatureSet.JsonFormat", FeatureSet_JsonFormat] } + ]); + } + create(value?: PartialMessage): FeatureSet { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FeatureSet): FeatureSet { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional google.protobuf.FeatureSet.FieldPresence field_presence */ 1: + message.fieldPresence = reader.int32(); + break; + case /* optional google.protobuf.FeatureSet.EnumType enum_type */ 2: + message.enumType = reader.int32(); + break; + case /* optional google.protobuf.FeatureSet.RepeatedFieldEncoding repeated_field_encoding */ 3: + message.repeatedFieldEncoding = reader.int32(); + break; + case /* optional google.protobuf.FeatureSet.Utf8Validation utf8_validation */ 4: + message.utf8Validation = reader.int32(); + break; + case /* optional google.protobuf.FeatureSet.MessageEncoding message_encoding */ 5: + message.messageEncoding = reader.int32(); + break; + case /* optional google.protobuf.FeatureSet.JsonFormat json_format */ 6: + message.jsonFormat = reader.int32(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: FeatureSet, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* optional google.protobuf.FeatureSet.FieldPresence field_presence = 1; */ + if (message.fieldPresence !== undefined) + writer.tag(1, WireType.Varint).int32(message.fieldPresence); + /* optional google.protobuf.FeatureSet.EnumType enum_type = 2; */ + if (message.enumType !== undefined) + writer.tag(2, WireType.Varint).int32(message.enumType); + /* optional google.protobuf.FeatureSet.RepeatedFieldEncoding repeated_field_encoding = 3; */ + if (message.repeatedFieldEncoding !== undefined) + writer.tag(3, WireType.Varint).int32(message.repeatedFieldEncoding); + /* optional google.protobuf.FeatureSet.Utf8Validation utf8_validation = 4; */ + if (message.utf8Validation !== undefined) + writer.tag(4, WireType.Varint).int32(message.utf8Validation); + /* optional google.protobuf.FeatureSet.MessageEncoding message_encoding = 5; */ + if (message.messageEncoding !== undefined) + writer.tag(5, WireType.Varint).int32(message.messageEncoding); + /* optional google.protobuf.FeatureSet.JsonFormat json_format = 6; */ + if (message.jsonFormat !== undefined) + writer.tag(6, WireType.Varint).int32(message.jsonFormat); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.FeatureSet + */ +export const FeatureSet = new FeatureSet$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class FeatureSetDefaults$Type extends MessageType { + constructor() { + super("google.protobuf.FeatureSetDefaults", [ + { no: 1, name: "defaults", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => FeatureSetDefaults_FeatureSetEditionDefault }, + { no: 4, name: "minimum_edition", kind: "enum", opt: true, T: () => ["google.protobuf.Edition", Edition] }, + { no: 5, name: "maximum_edition", kind: "enum", opt: true, T: () => ["google.protobuf.Edition", Edition] } + ]); + } + create(value?: PartialMessage): FeatureSetDefaults { + const message = globalThis.Object.create((this.messagePrototype!)); + message.defaults = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FeatureSetDefaults): FeatureSetDefaults { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* repeated google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault defaults */ 1: + message.defaults.push(FeatureSetDefaults_FeatureSetEditionDefault.internalBinaryRead(reader, reader.uint32(), options)); + break; + case /* optional google.protobuf.Edition minimum_edition */ 4: + message.minimumEdition = reader.int32(); + break; + case /* optional google.protobuf.Edition maximum_edition */ 5: + message.maximumEdition = reader.int32(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: FeatureSetDefaults, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* repeated google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault defaults = 1; */ + for (let i = 0; i < message.defaults.length; i++) + FeatureSetDefaults_FeatureSetEditionDefault.internalBinaryWrite(message.defaults[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + /* optional google.protobuf.Edition minimum_edition = 4; */ + if (message.minimumEdition !== undefined) + writer.tag(4, WireType.Varint).int32(message.minimumEdition); + /* optional google.protobuf.Edition maximum_edition = 5; */ + if (message.maximumEdition !== undefined) + writer.tag(5, WireType.Varint).int32(message.maximumEdition); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.FeatureSetDefaults + */ +export const FeatureSetDefaults = new FeatureSetDefaults$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class FeatureSetDefaults_FeatureSetEditionDefault$Type extends MessageType { + constructor() { + super("google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault", [ + { no: 3, name: "edition", kind: "enum", opt: true, T: () => ["google.protobuf.Edition", Edition] }, + { no: 2, name: "features", kind: "message", T: () => FeatureSet } + ]); + } + create(value?: PartialMessage): FeatureSetDefaults_FeatureSetEditionDefault { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FeatureSetDefaults_FeatureSetEditionDefault): FeatureSetDefaults_FeatureSetEditionDefault { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* optional google.protobuf.Edition edition */ 3: + message.edition = reader.int32(); + break; + case /* optional google.protobuf.FeatureSet features */ 2: + message.features = FeatureSet.internalBinaryRead(reader, reader.uint32(), options, message.features); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: FeatureSetDefaults_FeatureSetEditionDefault, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* optional google.protobuf.Edition edition = 3; */ + if (message.edition !== undefined) + writer.tag(3, WireType.Varint).int32(message.edition); + /* optional google.protobuf.FeatureSet features = 2; */ + if (message.features) + FeatureSet.internalBinaryWrite(message.features, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + */ +export const FeatureSetDefaults_FeatureSetEditionDefault = new FeatureSetDefaults_FeatureSetEditionDefault$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class SourceCodeInfo$Type extends MessageType { + constructor() { + super("google.protobuf.SourceCodeInfo", [ + { no: 1, name: "location", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => SourceCodeInfo_Location } + ]); + } + create(value?: PartialMessage): SourceCodeInfo { + const message = globalThis.Object.create((this.messagePrototype!)); + message.location = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SourceCodeInfo): SourceCodeInfo { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* repeated google.protobuf.SourceCodeInfo.Location location */ 1: + message.location.push(SourceCodeInfo_Location.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: SourceCodeInfo, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* repeated google.protobuf.SourceCodeInfo.Location location = 1; */ + for (let i = 0; i < message.location.length; i++) + SourceCodeInfo_Location.internalBinaryWrite(message.location[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.SourceCodeInfo + */ +export const SourceCodeInfo = new SourceCodeInfo$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class SourceCodeInfo_Location$Type extends MessageType { + constructor() { + super("google.protobuf.SourceCodeInfo.Location", [ + { no: 1, name: "path", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 5 /*ScalarType.INT32*/ }, + { no: 2, name: "span", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 5 /*ScalarType.INT32*/ }, + { no: 3, name: "leading_comments", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 4, name: "trailing_comments", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 6, name: "leading_detached_comments", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): SourceCodeInfo_Location { + const message = globalThis.Object.create((this.messagePrototype!)); + message.path = []; + message.span = []; + message.leadingDetachedComments = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SourceCodeInfo_Location): SourceCodeInfo_Location { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* repeated int32 path = 1 [packed = true];*/ 1: + if (wireType === WireType.LengthDelimited) + for (let e = reader.int32() + reader.pos; reader.pos < e;) + message.path.push(reader.int32()); + else + message.path.push(reader.int32()); + break; + case /* repeated int32 span = 2 [packed = true];*/ 2: + if (wireType === WireType.LengthDelimited) + for (let e = reader.int32() + reader.pos; reader.pos < e;) + message.span.push(reader.int32()); + else + message.span.push(reader.int32()); + break; + case /* optional string leading_comments */ 3: + message.leadingComments = reader.string(); + break; + case /* optional string trailing_comments */ 4: + message.trailingComments = reader.string(); + break; + case /* repeated string leading_detached_comments */ 6: + message.leadingDetachedComments.push(reader.string()); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: SourceCodeInfo_Location, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* repeated int32 path = 1 [packed = true]; */ + if (message.path.length) { + writer.tag(1, WireType.LengthDelimited).fork(); + for (let i = 0; i < message.path.length; i++) + writer.int32(message.path[i]); + writer.join(); + } + /* repeated int32 span = 2 [packed = true]; */ + if (message.span.length) { + writer.tag(2, WireType.LengthDelimited).fork(); + for (let i = 0; i < message.span.length; i++) + writer.int32(message.span[i]); + writer.join(); + } + /* optional string leading_comments = 3; */ + if (message.leadingComments !== undefined) + writer.tag(3, WireType.LengthDelimited).string(message.leadingComments); + /* optional string trailing_comments = 4; */ + if (message.trailingComments !== undefined) + writer.tag(4, WireType.LengthDelimited).string(message.trailingComments); + /* repeated string leading_detached_comments = 6; */ + for (let i = 0; i < message.leadingDetachedComments.length; i++) + writer.tag(6, WireType.LengthDelimited).string(message.leadingDetachedComments[i]); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.SourceCodeInfo.Location + */ +export const SourceCodeInfo_Location = new SourceCodeInfo_Location$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GeneratedCodeInfo$Type extends MessageType { + constructor() { + super("google.protobuf.GeneratedCodeInfo", [ + { no: 1, name: "annotation", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => GeneratedCodeInfo_Annotation } + ]); + } + create(value?: PartialMessage): GeneratedCodeInfo { + const message = globalThis.Object.create((this.messagePrototype!)); + message.annotation = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GeneratedCodeInfo): GeneratedCodeInfo { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* repeated google.protobuf.GeneratedCodeInfo.Annotation annotation */ 1: + message.annotation.push(GeneratedCodeInfo_Annotation.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: GeneratedCodeInfo, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* repeated google.protobuf.GeneratedCodeInfo.Annotation annotation = 1; */ + for (let i = 0; i < message.annotation.length; i++) + GeneratedCodeInfo_Annotation.internalBinaryWrite(message.annotation[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.GeneratedCodeInfo + */ +export const GeneratedCodeInfo = new GeneratedCodeInfo$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GeneratedCodeInfo_Annotation$Type extends MessageType { + constructor() { + super("google.protobuf.GeneratedCodeInfo.Annotation", [ + { no: 1, name: "path", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 5 /*ScalarType.INT32*/ }, + { no: 2, name: "source_file", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "begin", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ }, + { no: 4, name: "end", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ }, + { no: 5, name: "semantic", kind: "enum", opt: true, T: () => ["google.protobuf.GeneratedCodeInfo.Annotation.Semantic", GeneratedCodeInfo_Annotation_Semantic] } + ]); + } + create(value?: PartialMessage): GeneratedCodeInfo_Annotation { + const message = globalThis.Object.create((this.messagePrototype!)); + message.path = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GeneratedCodeInfo_Annotation): GeneratedCodeInfo_Annotation { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* repeated int32 path = 1 [packed = true];*/ 1: + if (wireType === WireType.LengthDelimited) + for (let e = reader.int32() + reader.pos; reader.pos < e;) + message.path.push(reader.int32()); + else + message.path.push(reader.int32()); + break; + case /* optional string source_file */ 2: + message.sourceFile = reader.string(); + break; + case /* optional int32 begin */ 3: + message.begin = reader.int32(); + break; + case /* optional int32 end */ 4: + message.end = reader.int32(); + break; + case /* optional google.protobuf.GeneratedCodeInfo.Annotation.Semantic semantic */ 5: + message.semantic = reader.int32(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: GeneratedCodeInfo_Annotation, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* repeated int32 path = 1 [packed = true]; */ + if (message.path.length) { + writer.tag(1, WireType.LengthDelimited).fork(); + for (let i = 0; i < message.path.length; i++) + writer.int32(message.path[i]); + writer.join(); + } + /* optional string source_file = 2; */ + if (message.sourceFile !== undefined) + writer.tag(2, WireType.LengthDelimited).string(message.sourceFile); + /* optional int32 begin = 3; */ + if (message.begin !== undefined) + writer.tag(3, WireType.Varint).int32(message.begin); + /* optional int32 end = 4; */ + if (message.end !== undefined) + writer.tag(4, WireType.Varint).int32(message.end); + /* optional google.protobuf.GeneratedCodeInfo.Annotation.Semantic semantic = 5; */ + if (message.semantic !== undefined) + writer.tag(5, WireType.Varint).int32(message.semantic); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.GeneratedCodeInfo.Annotation + */ +export const GeneratedCodeInfo_Annotation = new GeneratedCodeInfo_Annotation$Type(); diff --git a/runner/src/generated/runner.client.ts b/runner/src/generated/runner.client.ts new file mode 100644 index 000000000..5764359e2 --- /dev/null +++ b/runner/src/generated/runner.client.ts @@ -0,0 +1,76 @@ +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter long_type_string,eslint_disable +// @generated from protobuf file "runner.proto" (package "spec", syntax proto3) +// tslint:disable +import type { RpcTransport } from "@protobuf-ts/runtime-rpc"; +import type { ServiceInfo } from "@protobuf-ts/runtime-rpc"; +import { Runner } from "./runner"; +import type { ListStreamsResponse } from "./runner"; +import type { ListStreamsRequest } from "./runner"; +import type { StopStreamResponse } from "./runner"; +import type { StopStreamRequest } from "./runner"; +import { stackIntercept } from "@protobuf-ts/runtime-rpc"; +import type { StartStreamResponse } from "./runner"; +import type { StartStreamRequest } from "./runner"; +import type { UnaryCall } from "@protobuf-ts/runtime-rpc"; +import type { RpcOptions } from "@protobuf-ts/runtime-rpc"; +/** + * @generated from protobuf service spec.Runner + */ +export interface IRunnerClient { + /** + * Starts a new Runner stream worker + * + * @generated from protobuf rpc: StartStream(spec.StartStreamRequest) returns (spec.StartStreamResponse); + */ + startStream(input: StartStreamRequest, options?: RpcOptions): UnaryCall; + /** + * Stops an existing Runner stream worker + * + * @generated from protobuf rpc: StopStream(spec.StopStreamRequest) returns (spec.StopStreamResponse); + */ + stopStream(input: StopStreamRequest, options?: RpcOptions): UnaryCall; + /** + * Lists all Runner stream workers + * + * @generated from protobuf rpc: ListStreams(spec.ListStreamsRequest) returns (spec.ListStreamsResponse); + */ + listStreams(input: ListStreamsRequest, options?: RpcOptions): UnaryCall; +} +/** + * @generated from protobuf service spec.Runner + */ +export class RunnerClient implements IRunnerClient, ServiceInfo { + typeName = Runner.typeName; + methods = Runner.methods; + options = Runner.options; + constructor(private readonly _transport: RpcTransport) { + } + /** + * Starts a new Runner stream worker + * + * @generated from protobuf rpc: StartStream(spec.StartStreamRequest) returns (spec.StartStreamResponse); + */ + startStream(input: StartStreamRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[0], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * Stops an existing Runner stream worker + * + * @generated from protobuf rpc: StopStream(spec.StopStreamRequest) returns (spec.StopStreamResponse); + */ + stopStream(input: StopStreamRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[1], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * Lists all Runner stream workers + * + * @generated from protobuf rpc: ListStreams(spec.ListStreamsRequest) returns (spec.ListStreamsResponse); + */ + listStreams(input: ListStreamsRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[2], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } +} diff --git a/runner/src/generated/runner.grpc-client.ts b/runner/src/generated/runner.grpc-client.ts new file mode 100644 index 000000000..f3212d58c --- /dev/null +++ b/runner/src/generated/runner.grpc-client.ts @@ -0,0 +1,83 @@ +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter long_type_string,eslint_disable +// @generated from protobuf file "runner.proto" (package "spec", syntax proto3) +// tslint:disable +import { Runner } from "./runner"; +import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; +import type { BinaryReadOptions } from "@protobuf-ts/runtime"; +import type { ListStreamsResponse } from "./runner"; +import type { ListStreamsRequest } from "./runner"; +import type { StopStreamResponse } from "./runner"; +import type { StopStreamRequest } from "./runner"; +import type { StartStreamResponse } from "./runner"; +import type { StartStreamRequest } from "./runner"; +import * as grpc from "@grpc/grpc-js"; +/** + * @generated from protobuf service spec.Runner + */ +export interface IRunnerClient { + /** + * Starts a new Runner stream worker + * + * @generated from protobuf rpc: StartStream(spec.StartStreamRequest) returns (spec.StartStreamResponse); + */ + startStream(input: StartStreamRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: StartStreamResponse) => void): grpc.ClientUnaryCall; + startStream(input: StartStreamRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: StartStreamResponse) => void): grpc.ClientUnaryCall; + startStream(input: StartStreamRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: StartStreamResponse) => void): grpc.ClientUnaryCall; + startStream(input: StartStreamRequest, callback: (err: grpc.ServiceError | null, value?: StartStreamResponse) => void): grpc.ClientUnaryCall; + /** + * Stops an existing Runner stream worker + * + * @generated from protobuf rpc: StopStream(spec.StopStreamRequest) returns (spec.StopStreamResponse); + */ + stopStream(input: StopStreamRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: StopStreamResponse) => void): grpc.ClientUnaryCall; + stopStream(input: StopStreamRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: StopStreamResponse) => void): grpc.ClientUnaryCall; + stopStream(input: StopStreamRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: StopStreamResponse) => void): grpc.ClientUnaryCall; + stopStream(input: StopStreamRequest, callback: (err: grpc.ServiceError | null, value?: StopStreamResponse) => void): grpc.ClientUnaryCall; + /** + * Lists all Runner stream workers + * + * @generated from protobuf rpc: ListStreams(spec.ListStreamsRequest) returns (spec.ListStreamsResponse); + */ + listStreams(input: ListStreamsRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: ListStreamsResponse) => void): grpc.ClientUnaryCall; + listStreams(input: ListStreamsRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: ListStreamsResponse) => void): grpc.ClientUnaryCall; + listStreams(input: ListStreamsRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: ListStreamsResponse) => void): grpc.ClientUnaryCall; + listStreams(input: ListStreamsRequest, callback: (err: grpc.ServiceError | null, value?: ListStreamsResponse) => void): grpc.ClientUnaryCall; +} +/** + * @generated from protobuf service spec.Runner + */ +export class RunnerClient extends grpc.Client implements IRunnerClient { + private readonly _binaryOptions: Partial; + constructor(address: string, credentials: grpc.ChannelCredentials, options: grpc.ClientOptions = {}, binaryOptions: Partial = {}) { + super(address, credentials, options); + this._binaryOptions = binaryOptions; + } + /** + * Starts a new Runner stream worker + * + * @generated from protobuf rpc: StartStream(spec.StartStreamRequest) returns (spec.StartStreamResponse); + */ + startStream(input: StartStreamRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: StartStreamResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: StartStreamResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: StartStreamResponse) => void)): grpc.ClientUnaryCall { + const method = Runner.methods[0]; + return this.makeUnaryRequest(`/${Runner.typeName}/${method.name}`, (value: StartStreamRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): StartStreamResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any)); + } + /** + * Stops an existing Runner stream worker + * + * @generated from protobuf rpc: StopStream(spec.StopStreamRequest) returns (spec.StopStreamResponse); + */ + stopStream(input: StopStreamRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: StopStreamResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: StopStreamResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: StopStreamResponse) => void)): grpc.ClientUnaryCall { + const method = Runner.methods[1]; + return this.makeUnaryRequest(`/${Runner.typeName}/${method.name}`, (value: StopStreamRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): StopStreamResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any)); + } + /** + * Lists all Runner stream workers + * + * @generated from protobuf rpc: ListStreams(spec.ListStreamsRequest) returns (spec.ListStreamsResponse); + */ + listStreams(input: ListStreamsRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: ListStreamsResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: ListStreamsResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: ListStreamsResponse) => void)): grpc.ClientUnaryCall { + const method = Runner.methods[2]; + return this.makeUnaryRequest(`/${Runner.typeName}/${method.name}`, (value: ListStreamsRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): ListStreamsResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any)); + } +} diff --git a/runner/src/generated/runner.grpc-server.ts b/runner/src/generated/runner.grpc-server.ts new file mode 100644 index 000000000..3770b94e9 --- /dev/null +++ b/runner/src/generated/runner.grpc-server.ts @@ -0,0 +1,77 @@ +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter long_type_string,eslint_disable +// @generated from protobuf file "runner.proto" (package "spec", syntax proto3) +// tslint:disable +import { ListStreamsResponse } from "./runner"; +import { ListStreamsRequest } from "./runner"; +import { StopStreamResponse } from "./runner"; +import { StopStreamRequest } from "./runner"; +import { StartStreamResponse } from "./runner"; +import { StartStreamRequest } from "./runner"; +import type * as grpc from "@grpc/grpc-js"; +/** + * @generated from protobuf service spec.Runner + */ +export interface IRunner extends grpc.UntypedServiceImplementation { + /** + * Starts a new Runner stream worker + * + * @generated from protobuf rpc: StartStream(spec.StartStreamRequest) returns (spec.StartStreamResponse); + */ + startStream: grpc.handleUnaryCall; + /** + * Stops an existing Runner stream worker + * + * @generated from protobuf rpc: StopStream(spec.StopStreamRequest) returns (spec.StopStreamResponse); + */ + stopStream: grpc.handleUnaryCall; + /** + * Lists all Runner stream workers + * + * @generated from protobuf rpc: ListStreams(spec.ListStreamsRequest) returns (spec.ListStreamsResponse); + */ + listStreams: grpc.handleUnaryCall; +} +/** + * @grpc/grpc-js definition for the protobuf service spec.Runner. + * + * Usage: Implement the interface IRunner and add to a grpc server. + * + * ```typescript + * const server = new grpc.Server(); + * const service: IRunner = ... + * server.addService(runnerDefinition, service); + * ``` + */ +export const runnerDefinition: grpc.ServiceDefinition = { + startStream: { + path: "/spec.Runner/StartStream", + originalName: "StartStream", + requestStream: false, + responseStream: false, + responseDeserialize: bytes => StartStreamResponse.fromBinary(bytes), + requestDeserialize: bytes => StartStreamRequest.fromBinary(bytes), + responseSerialize: value => Buffer.from(StartStreamResponse.toBinary(value)), + requestSerialize: value => Buffer.from(StartStreamRequest.toBinary(value)) + }, + stopStream: { + path: "/spec.Runner/StopStream", + originalName: "StopStream", + requestStream: false, + responseStream: false, + responseDeserialize: bytes => StopStreamResponse.fromBinary(bytes), + requestDeserialize: bytes => StopStreamRequest.fromBinary(bytes), + responseSerialize: value => Buffer.from(StopStreamResponse.toBinary(value)), + requestSerialize: value => Buffer.from(StopStreamRequest.toBinary(value)) + }, + listStreams: { + path: "/spec.Runner/ListStreams", + originalName: "ListStreams", + requestStream: false, + responseStream: false, + responseDeserialize: bytes => ListStreamsResponse.fromBinary(bytes), + requestDeserialize: bytes => ListStreamsRequest.fromBinary(bytes), + responseSerialize: value => Buffer.from(ListStreamsResponse.toBinary(value)), + requestSerialize: value => Buffer.from(ListStreamsRequest.toBinary(value)) + } +}; diff --git a/runner/src/generated/runner.ts b/runner/src/generated/runner.ts new file mode 100644 index 000000000..41c4635c9 --- /dev/null +++ b/runner/src/generated/runner.ts @@ -0,0 +1,514 @@ +/* eslint-disable */ +// @generated by protobuf-ts 2.9.3 with parameter long_type_string,eslint_disable +// @generated from protobuf file "runner.proto" (package "spec", syntax proto3) +// tslint:disable +import { ServiceType } from "@protobuf-ts/runtime-rpc"; +import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; +import type { IBinaryWriter } from "@protobuf-ts/runtime"; +import { WireType } from "@protobuf-ts/runtime"; +import type { BinaryReadOptions } from "@protobuf-ts/runtime"; +import type { IBinaryReader } from "@protobuf-ts/runtime"; +import { UnknownFieldHandler } from "@protobuf-ts/runtime"; +import type { PartialMessage } from "@protobuf-ts/runtime"; +import { reflectionMergePartial } from "@protobuf-ts/runtime"; +import { MessageType } from "@protobuf-ts/runtime"; +/** + * Start Stream Request + * + * @generated from protobuf message spec.StartStreamRequest + */ +export interface StartStreamRequest { + /** + * @generated from protobuf field: int64 start_block_height = 1; + */ + startBlockHeight: string; + /** + * @generated from protobuf field: string indexer_config = 2; + */ + indexerConfig: string; // JSON containing code, schema, etc. + /** + * @generated from protobuf field: string stream_id = 3; + */ + streamId: string; +} +/** + * Start Stream Response + * + * @generated from protobuf message spec.StartStreamResponse + */ +export interface StartStreamResponse { + /** + * @generated from protobuf field: string stream_id = 1; + */ + streamId: string; +} +/** + * Stop Stream Request + * + * @generated from protobuf message spec.StopStreamRequest + */ +export interface StopStreamRequest { + /** + * @generated from protobuf field: string stream_id = 1; + */ + streamId: string; +} +/** + * Stop Stream Response + * + * @generated from protobuf message spec.StopStreamResponse + */ +export interface StopStreamResponse { + /** + * @generated from protobuf field: string stream_id = 1; + */ + streamId: string; + /** + * @generated from protobuf field: string status = 2; + */ + status: string; +} +/** + * List Stream Request + * + * @generated from protobuf message spec.ListStreamsRequest + */ +export interface ListStreamsRequest { + /** + * @generated from protobuf field: string placeholder = 1; + */ + placeholder: string; +} +/** + * List Stream Response + * + * @generated from protobuf message spec.ListStreamsResponse + */ +export interface ListStreamsResponse { + /** + * List of all streams, including stopped or crashed ones + * + * @generated from protobuf field: repeated spec.StreamInfo streams = 1; + */ + streams: StreamInfo[]; +} +/** + * Information about a single BlockStream instance. + * + * @generated from protobuf message spec.StreamInfo + */ +export interface StreamInfo { + /** + * @generated from protobuf field: string stream_id = 1; + */ + streamId: string; + /** + * @generated from protobuf field: int64 start_block_height = 2; + */ + startBlockHeight: string; + /** + * @generated from protobuf field: string indexer_name = 3; + */ + indexerName: string; + /** + * @generated from protobuf field: string chain_id = 4; + */ + chainId: string; + /** + * @generated from protobuf field: string status = 5; + */ + status: string; +} +// @generated message type with reflection information, may provide speed optimized methods +class StartStreamRequest$Type extends MessageType { + constructor() { + super("spec.StartStreamRequest", [ + { no: 1, name: "start_block_height", kind: "scalar", T: 3 /*ScalarType.INT64*/ }, + { no: 2, name: "indexer_config", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "stream_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): StartStreamRequest { + const message = globalThis.Object.create((this.messagePrototype!)); + message.startBlockHeight = "0"; + message.indexerConfig = ""; + message.streamId = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: StartStreamRequest): StartStreamRequest { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* int64 start_block_height */ 1: + message.startBlockHeight = reader.int64().toString(); + break; + case /* string indexer_config */ 2: + message.indexerConfig = reader.string(); + break; + case /* string stream_id */ 3: + message.streamId = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: StartStreamRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* int64 start_block_height = 1; */ + if (message.startBlockHeight !== "0") + writer.tag(1, WireType.Varint).int64(message.startBlockHeight); + /* string indexer_config = 2; */ + if (message.indexerConfig !== "") + writer.tag(2, WireType.LengthDelimited).string(message.indexerConfig); + /* string stream_id = 3; */ + if (message.streamId !== "") + writer.tag(3, WireType.LengthDelimited).string(message.streamId); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message spec.StartStreamRequest + */ +export const StartStreamRequest = new StartStreamRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class StartStreamResponse$Type extends MessageType { + constructor() { + super("spec.StartStreamResponse", [ + { no: 1, name: "stream_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): StartStreamResponse { + const message = globalThis.Object.create((this.messagePrototype!)); + message.streamId = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: StartStreamResponse): StartStreamResponse { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string stream_id */ 1: + message.streamId = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: StartStreamResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string stream_id = 1; */ + if (message.streamId !== "") + writer.tag(1, WireType.LengthDelimited).string(message.streamId); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message spec.StartStreamResponse + */ +export const StartStreamResponse = new StartStreamResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class StopStreamRequest$Type extends MessageType { + constructor() { + super("spec.StopStreamRequest", [ + { no: 1, name: "stream_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): StopStreamRequest { + const message = globalThis.Object.create((this.messagePrototype!)); + message.streamId = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: StopStreamRequest): StopStreamRequest { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string stream_id */ 1: + message.streamId = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: StopStreamRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string stream_id = 1; */ + if (message.streamId !== "") + writer.tag(1, WireType.LengthDelimited).string(message.streamId); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message spec.StopStreamRequest + */ +export const StopStreamRequest = new StopStreamRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class StopStreamResponse$Type extends MessageType { + constructor() { + super("spec.StopStreamResponse", [ + { no: 1, name: "stream_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "status", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): StopStreamResponse { + const message = globalThis.Object.create((this.messagePrototype!)); + message.streamId = ""; + message.status = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: StopStreamResponse): StopStreamResponse { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string stream_id */ 1: + message.streamId = reader.string(); + break; + case /* string status */ 2: + message.status = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: StopStreamResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string stream_id = 1; */ + if (message.streamId !== "") + writer.tag(1, WireType.LengthDelimited).string(message.streamId); + /* string status = 2; */ + if (message.status !== "") + writer.tag(2, WireType.LengthDelimited).string(message.status); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message spec.StopStreamResponse + */ +export const StopStreamResponse = new StopStreamResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class ListStreamsRequest$Type extends MessageType { + constructor() { + super("spec.ListStreamsRequest", [ + { no: 1, name: "placeholder", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): ListStreamsRequest { + const message = globalThis.Object.create((this.messagePrototype!)); + message.placeholder = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListStreamsRequest): ListStreamsRequest { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string placeholder */ 1: + message.placeholder = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: ListStreamsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string placeholder = 1; */ + if (message.placeholder !== "") + writer.tag(1, WireType.LengthDelimited).string(message.placeholder); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message spec.ListStreamsRequest + */ +export const ListStreamsRequest = new ListStreamsRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class ListStreamsResponse$Type extends MessageType { + constructor() { + super("spec.ListStreamsResponse", [ + { no: 1, name: "streams", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => StreamInfo } + ]); + } + create(value?: PartialMessage): ListStreamsResponse { + const message = globalThis.Object.create((this.messagePrototype!)); + message.streams = []; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListStreamsResponse): ListStreamsResponse { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* repeated spec.StreamInfo streams */ 1: + message.streams.push(StreamInfo.internalBinaryRead(reader, reader.uint32(), options)); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: ListStreamsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* repeated spec.StreamInfo streams = 1; */ + for (let i = 0; i < message.streams.length; i++) + StreamInfo.internalBinaryWrite(message.streams[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message spec.ListStreamsResponse + */ +export const ListStreamsResponse = new ListStreamsResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class StreamInfo$Type extends MessageType { + constructor() { + super("spec.StreamInfo", [ + { no: 1, name: "stream_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "start_block_height", kind: "scalar", T: 3 /*ScalarType.INT64*/ }, + { no: 3, name: "indexer_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 4, name: "chain_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 5, name: "status", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + create(value?: PartialMessage): StreamInfo { + const message = globalThis.Object.create((this.messagePrototype!)); + message.streamId = ""; + message.startBlockHeight = "0"; + message.indexerName = ""; + message.chainId = ""; + message.status = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: StreamInfo): StreamInfo { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* string stream_id */ 1: + message.streamId = reader.string(); + break; + case /* int64 start_block_height */ 2: + message.startBlockHeight = reader.int64().toString(); + break; + case /* string indexer_name */ 3: + message.indexerName = reader.string(); + break; + case /* string chain_id */ 4: + message.chainId = reader.string(); + break; + case /* string status */ 5: + message.status = reader.string(); + break; + default: + let u = options.readUnknownField; + if (u === "throw") + throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); + let d = reader.skip(wireType); + if (u !== false) + (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); + } + } + return message; + } + internalBinaryWrite(message: StreamInfo, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* string stream_id = 1; */ + if (message.streamId !== "") + writer.tag(1, WireType.LengthDelimited).string(message.streamId); + /* int64 start_block_height = 2; */ + if (message.startBlockHeight !== "0") + writer.tag(2, WireType.Varint).int64(message.startBlockHeight); + /* string indexer_name = 3; */ + if (message.indexerName !== "") + writer.tag(3, WireType.LengthDelimited).string(message.indexerName); + /* string chain_id = 4; */ + if (message.chainId !== "") + writer.tag(4, WireType.LengthDelimited).string(message.chainId); + /* string status = 5; */ + if (message.status !== "") + writer.tag(5, WireType.LengthDelimited).string(message.status); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message spec.StreamInfo + */ +export const StreamInfo = new StreamInfo$Type(); +/** + * @generated ServiceType for protobuf service spec.Runner + */ +export const Runner = new ServiceType("spec.Runner", [ + { name: "StartStream", options: {}, I: StartStreamRequest, O: StartStreamResponse }, + { name: "StopStream", options: {}, I: StopStreamRequest, O: StopStreamResponse }, + { name: "ListStreams", options: {}, I: ListStreamsRequest, O: ListStreamsResponse } +], { "ts.server": ["GRPC1_SERVER"] }); diff --git a/runner/src/generated/tsconfig.json b/runner/src/generated/tsconfig.json new file mode 100644 index 000000000..63ada6819 --- /dev/null +++ b/runner/src/generated/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "noUnusedParameters": false + }, + "include": [ + "**/*" + ] + } \ No newline at end of file diff --git a/runner/src/index.ts b/runner/src/index.ts index a483a9336..90ec2dc28 100644 --- a/runner/src/index.ts +++ b/runner/src/index.ts @@ -1,6 +1,9 @@ import { startServer as startMetricsServer } from './metrics'; import RedisClient from './redis-client'; import StreamHandler from './stream-handler'; +import startServer from './service/runner-server'; + +const STREAM_HANDLER_THROTTLE_MS = 500; const redisClient = new RedisClient(); @@ -8,11 +11,11 @@ startMetricsServer().catch((err) => { console.error('Failed to start metrics server', err); }); -const STREAM_HANDLER_THROTTLE_MS = 500; - type StreamHandlers = Record; void (async function main () { + startServer(); + try { const streamHandlers: StreamHandlers = {}; diff --git a/runner/src/service/index.ts b/runner/src/service/index.ts new file mode 100644 index 000000000..c543aa657 --- /dev/null +++ b/runner/src/service/index.ts @@ -0,0 +1 @@ +export { default } from './runner-server'; diff --git a/runner/src/service/runner-server.ts b/runner/src/service/runner-server.ts new file mode 100644 index 000000000..c709d9bfd --- /dev/null +++ b/runner/src/service/runner-server.ts @@ -0,0 +1,22 @@ +import * as grpc from '@grpc/grpc-js'; +import RunnerService from './runner-service'; +import { runnerDefinition } from '../generated/runner.grpc-server'; + +export default function startServer (): grpc.Server { + const server = new grpc.Server(); + server.addService(runnerDefinition, RunnerService); + const credentials = grpc.ServerCredentials; + server.bindAsync( + '0.0.0.0:50007', // TODO: Read port from ENV + credentials.createInsecure(), + (err: Error | null, port: number) => { + if (err) { + console.error(`Server error: ${err.message}`); + } else { + console.log(`Server bound on port: ${port}`); + server.start(); + } + } + ); + return server; +} diff --git a/runner/src/service/runner-service.ts b/runner/src/service/runner-service.ts new file mode 100644 index 000000000..95a493888 --- /dev/null +++ b/runner/src/service/runner-service.ts @@ -0,0 +1,32 @@ +import { type ServerUnaryCall, type sendUnaryData } from '@grpc/grpc-js'; +import { type IRunner } from '../generated/runner.grpc-server'; +import { type StartStreamRequest, StartStreamResponse, type StopStreamRequest, StopStreamResponse, type ListStreamsRequest, ListStreamsResponse } from '../generated/runner'; + +const streams = new Set(); + +const RunnerService: IRunner = { + startStream (call: ServerUnaryCall, callback: sendUnaryData): void { + const newStream = call.request.streamId; + streams.add(newStream); + callback(null, StartStreamResponse.create({ streamId: newStream })); + }, + + stopStream (call: ServerUnaryCall, callback: sendUnaryData): void { + // implementation + const streamToRemove = call.request.streamId; + streams.delete(streamToRemove); + callback(null, StopStreamResponse.create({ status: 'OK', streamId: streamToRemove })); + }, + + listStreams (call: ServerUnaryCall, callback: sendUnaryData): void { + // implementation + console.log(call); + callback(null, ListStreamsResponse.create({ + streams: Array.from(streams).map(stream => { + return { streamId: stream }; + }) + })); + } +}; + +export default RunnerService; diff --git a/runner/tsconfig.json b/runner/tsconfig.json index c3aead636..d4fd10457 100644 --- a/runner/tsconfig.json +++ b/runner/tsconfig.json @@ -18,7 +18,7 @@ "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ - "skipLibCheck": true /* Skip type checking all .d.ts files. */ + "skipLibCheck": true, /* Skip type checking all .d.ts files. */ }, "include": ["src"], "exclude": ["node_modules", "dist"] From 011f80776fdaa2c11de9b6b221970b8bcb4643dd Mon Sep 17 00:00:00 2001 From: Darun Seethammagari Date: Wed, 13 Dec 2023 13:10:36 -0800 Subject: [PATCH 02/18] Update basic gRPC to use Proto-Loader --- runner/protos/runner.proto | 5 - .../generated/google/protobuf/descriptor.ts | 4510 ----------------- runner/src/generated/runner.client.ts | 76 - runner/src/generated/runner.grpc-client.ts | 83 - runner/src/generated/runner.grpc-server.ts | 77 - runner/src/generated/runner.ts | 536 +- .../src/generated/spec/ListStreamsRequest.ts | 8 + .../src/generated/spec/ListStreamsResponse.ts | 11 + runner/src/generated/spec/Runner.ts | 55 + .../src/generated/spec/StartStreamRequest.ts | 15 + .../src/generated/spec/StartStreamResponse.ts | 10 + .../src/generated/spec/StopStreamRequest.ts | 10 + .../src/generated/spec/StopStreamResponse.ts | 12 + runner/src/generated/spec/StreamInfo.ts | 19 + runner/src/generated/tsconfig.json | 9 - runner/src/index.ts | 16 + runner/src/service/runner-client.ts | 14 + runner/src/service/runner-server.ts | 13 +- runner/src/service/runner-service.ts | 32 +- 19 files changed, 223 insertions(+), 5288 deletions(-) delete mode 100644 runner/src/generated/google/protobuf/descriptor.ts delete mode 100644 runner/src/generated/runner.client.ts delete mode 100644 runner/src/generated/runner.grpc-client.ts delete mode 100644 runner/src/generated/runner.grpc-server.ts create mode 100644 runner/src/generated/spec/ListStreamsRequest.ts create mode 100644 runner/src/generated/spec/ListStreamsResponse.ts create mode 100644 runner/src/generated/spec/Runner.ts create mode 100644 runner/src/generated/spec/StartStreamRequest.ts create mode 100644 runner/src/generated/spec/StartStreamResponse.ts create mode 100644 runner/src/generated/spec/StopStreamRequest.ts create mode 100644 runner/src/generated/spec/StopStreamResponse.ts create mode 100644 runner/src/generated/spec/StreamInfo.ts delete mode 100644 runner/src/generated/tsconfig.json create mode 100644 runner/src/service/runner-client.ts diff --git a/runner/protos/runner.proto b/runner/protos/runner.proto index 4ea85fb06..52b612f98 100644 --- a/runner/protos/runner.proto +++ b/runner/protos/runner.proto @@ -1,11 +1,7 @@ syntax = "proto3"; package spec; -import "protobuf-ts.proto"; - service Runner { - option (ts.server) = GRPC1_SERVER; - option (ts.client) = GRPC1_CLIENT; // Starts a new Runner stream worker rpc StartStream (StartStreamRequest) returns (StartStreamResponse); @@ -41,7 +37,6 @@ message StopStreamResponse { // List Stream Request message ListStreamsRequest { - string placeholder = 1; } // List Stream Response diff --git a/runner/src/generated/google/protobuf/descriptor.ts b/runner/src/generated/google/protobuf/descriptor.ts deleted file mode 100644 index 153eea9a2..000000000 --- a/runner/src/generated/google/protobuf/descriptor.ts +++ /dev/null @@ -1,4510 +0,0 @@ -/* eslint-disable */ -// @generated by protobuf-ts 2.9.3 with parameter long_type_string,eslint_disable -// @generated from protobuf file "google/protobuf/descriptor.proto" (package "google.protobuf", syntax proto2) -// tslint:disable -// -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// -// Author: kenton@google.com (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. -// -// The messages in this file describe the definitions found in .proto files. -// A valid .proto file can be translated directly to a FileDescriptorProto -// without any other information (e.g. without reading its imports). -// -import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; -import type { IBinaryWriter } from "@protobuf-ts/runtime"; -import { WireType } from "@protobuf-ts/runtime"; -import type { BinaryReadOptions } from "@protobuf-ts/runtime"; -import type { IBinaryReader } from "@protobuf-ts/runtime"; -import { UnknownFieldHandler } from "@protobuf-ts/runtime"; -import type { PartialMessage } from "@protobuf-ts/runtime"; -import { reflectionMergePartial } from "@protobuf-ts/runtime"; -import { MessageType } from "@protobuf-ts/runtime"; -/** - * The protocol compiler can output a FileDescriptorSet containing the .proto - * files it parses. - * - * @generated from protobuf message google.protobuf.FileDescriptorSet - */ -export interface FileDescriptorSet { - /** - * @generated from protobuf field: repeated google.protobuf.FileDescriptorProto file = 1; - */ - file: FileDescriptorProto[]; -} -/** - * Describes a complete .proto file. - * - * @generated from protobuf message google.protobuf.FileDescriptorProto - */ -export interface FileDescriptorProto { - /** - * @generated from protobuf field: optional string name = 1; - */ - name?: string; // file name, relative to root of source tree - /** - * @generated from protobuf field: optional string package = 2; - */ - package?: string; // e.g. "foo", "foo.bar", etc. - /** - * Names of files imported by this file. - * - * @generated from protobuf field: repeated string dependency = 3; - */ - dependency: string[]; - /** - * Indexes of the public imported files in the dependency list above. - * - * @generated from protobuf field: repeated int32 public_dependency = 10; - */ - publicDependency: number[]; - /** - * Indexes of the weak imported files in the dependency list. - * For Google-internal migration only. Do not use. - * - * @generated from protobuf field: repeated int32 weak_dependency = 11; - */ - weakDependency: number[]; - /** - * All top-level definitions in this file. - * - * @generated from protobuf field: repeated google.protobuf.DescriptorProto message_type = 4; - */ - messageType: DescriptorProto[]; - /** - * @generated from protobuf field: repeated google.protobuf.EnumDescriptorProto enum_type = 5; - */ - enumType: EnumDescriptorProto[]; - /** - * @generated from protobuf field: repeated google.protobuf.ServiceDescriptorProto service = 6; - */ - service: ServiceDescriptorProto[]; - /** - * @generated from protobuf field: repeated google.protobuf.FieldDescriptorProto extension = 7; - */ - extension: FieldDescriptorProto[]; - /** - * @generated from protobuf field: optional google.protobuf.FileOptions options = 8; - */ - options?: FileOptions; - /** - * This field contains optional information about the original source code. - * You may safely remove this entire field without harming runtime - * functionality of the descriptors -- the information is needed only by - * development tools. - * - * @generated from protobuf field: optional google.protobuf.SourceCodeInfo source_code_info = 9; - */ - sourceCodeInfo?: SourceCodeInfo; - /** - * The syntax of the proto file. - * The supported values are "proto2", "proto3", and "editions". - * - * If `edition` is present, this value must be "editions". - * - * @generated from protobuf field: optional string syntax = 12; - */ - syntax?: string; - /** - * The edition of the proto file. - * - * @generated from protobuf field: optional google.protobuf.Edition edition = 14; - */ - edition?: Edition; -} -/** - * Describes a message type. - * - * @generated from protobuf message google.protobuf.DescriptorProto - */ -export interface DescriptorProto { - /** - * @generated from protobuf field: optional string name = 1; - */ - name?: string; - /** - * @generated from protobuf field: repeated google.protobuf.FieldDescriptorProto field = 2; - */ - field: FieldDescriptorProto[]; - /** - * @generated from protobuf field: repeated google.protobuf.FieldDescriptorProto extension = 6; - */ - extension: FieldDescriptorProto[]; - /** - * @generated from protobuf field: repeated google.protobuf.DescriptorProto nested_type = 3; - */ - nestedType: DescriptorProto[]; - /** - * @generated from protobuf field: repeated google.protobuf.EnumDescriptorProto enum_type = 4; - */ - enumType: EnumDescriptorProto[]; - /** - * @generated from protobuf field: repeated google.protobuf.DescriptorProto.ExtensionRange extension_range = 5; - */ - extensionRange: DescriptorProto_ExtensionRange[]; - /** - * @generated from protobuf field: repeated google.protobuf.OneofDescriptorProto oneof_decl = 8; - */ - oneofDecl: OneofDescriptorProto[]; - /** - * @generated from protobuf field: optional google.protobuf.MessageOptions options = 7; - */ - options?: MessageOptions; - /** - * @generated from protobuf field: repeated google.protobuf.DescriptorProto.ReservedRange reserved_range = 9; - */ - reservedRange: DescriptorProto_ReservedRange[]; - /** - * Reserved field names, which may not be used by fields in the same message. - * A given name may only be reserved once. - * - * @generated from protobuf field: repeated string reserved_name = 10; - */ - reservedName: string[]; -} -/** - * @generated from protobuf message google.protobuf.DescriptorProto.ExtensionRange - */ -export interface DescriptorProto_ExtensionRange { - /** - * @generated from protobuf field: optional int32 start = 1; - */ - start?: number; // Inclusive. - /** - * @generated from protobuf field: optional int32 end = 2; - */ - end?: number; // Exclusive. - /** - * @generated from protobuf field: optional google.protobuf.ExtensionRangeOptions options = 3; - */ - options?: ExtensionRangeOptions; -} -/** - * Range of reserved tag numbers. Reserved tag numbers may not be used by - * fields or extension ranges in the same message. Reserved ranges may - * not overlap. - * - * @generated from protobuf message google.protobuf.DescriptorProto.ReservedRange - */ -export interface DescriptorProto_ReservedRange { - /** - * @generated from protobuf field: optional int32 start = 1; - */ - start?: number; // Inclusive. - /** - * @generated from protobuf field: optional int32 end = 2; - */ - end?: number; // Exclusive. -} -/** - * @generated from protobuf message google.protobuf.ExtensionRangeOptions - */ -export interface ExtensionRangeOptions { - /** - * The parser stores options it doesn't recognize here. See above. - * - * @generated from protobuf field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; - */ - uninterpretedOption: UninterpretedOption[]; - /** - * For external users: DO NOT USE. We are in the process of open sourcing - * extension declaration and executing internal cleanups before it can be - * used externally. - * - * @generated from protobuf field: repeated google.protobuf.ExtensionRangeOptions.Declaration declaration = 2; - */ - declaration: ExtensionRangeOptions_Declaration[]; - /** - * Any features defined in the specific edition. - * - * @generated from protobuf field: optional google.protobuf.FeatureSet features = 50; - */ - features?: FeatureSet; - /** - * The verification state of the range. - * TODO: flip the default to DECLARATION once all empty ranges - * are marked as UNVERIFIED. - * - * @generated from protobuf field: optional google.protobuf.ExtensionRangeOptions.VerificationState verification = 3; - */ - verification?: ExtensionRangeOptions_VerificationState; -} -/** - * @generated from protobuf message google.protobuf.ExtensionRangeOptions.Declaration - */ -export interface ExtensionRangeOptions_Declaration { - /** - * The extension number declared within the extension range. - * - * @generated from protobuf field: optional int32 number = 1; - */ - number?: number; - /** - * The fully-qualified name of the extension field. There must be a leading - * dot in front of the full name. - * - * @generated from protobuf field: optional string full_name = 2; - */ - fullName?: string; - /** - * The fully-qualified type name of the extension field. Unlike - * Metadata.type, Declaration.type must have a leading dot for messages - * and enums. - * - * @generated from protobuf field: optional string type = 3; - */ - type?: string; - /** - * If true, indicates that the number is reserved in the extension range, - * and any extension field with the number will fail to compile. Set this - * when a declared extension field is deleted. - * - * @generated from protobuf field: optional bool reserved = 5; - */ - reserved?: boolean; - /** - * If true, indicates that the extension must be defined as repeated. - * Otherwise the extension must be defined as optional. - * - * @generated from protobuf field: optional bool repeated = 6; - */ - repeated?: boolean; -} -/** - * The verification state of the extension range. - * - * @generated from protobuf enum google.protobuf.ExtensionRangeOptions.VerificationState - */ -export enum ExtensionRangeOptions_VerificationState { - /** - * All the extensions of the range must be declared. - * - * @generated from protobuf enum value: DECLARATION = 0; - */ - DECLARATION = 0, - /** - * @generated from protobuf enum value: UNVERIFIED = 1; - */ - UNVERIFIED = 1 -} -/** - * Describes a field within a message. - * - * @generated from protobuf message google.protobuf.FieldDescriptorProto - */ -export interface FieldDescriptorProto { - /** - * @generated from protobuf field: optional string name = 1; - */ - name?: string; - /** - * @generated from protobuf field: optional int32 number = 3; - */ - number?: number; - /** - * @generated from protobuf field: optional google.protobuf.FieldDescriptorProto.Label label = 4; - */ - label?: FieldDescriptorProto_Label; - /** - * If type_name is set, this need not be set. If both this and type_name - * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - * - * @generated from protobuf field: optional google.protobuf.FieldDescriptorProto.Type type = 5; - */ - type?: FieldDescriptorProto_Type; - /** - * For message and enum types, this is the name of the type. If the name - * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - * rules are used to find the type (i.e. first the nested types within this - * message are searched, then within the parent, on up to the root - * namespace). - * - * @generated from protobuf field: optional string type_name = 6; - */ - typeName?: string; - /** - * For extensions, this is the name of the type being extended. It is - * resolved in the same manner as type_name. - * - * @generated from protobuf field: optional string extendee = 2; - */ - extendee?: string; - /** - * For numeric types, contains the original text representation of the value. - * For booleans, "true" or "false". - * For strings, contains the default text contents (not escaped in any way). - * For bytes, contains the C escaped value. All bytes >= 128 are escaped. - * - * @generated from protobuf field: optional string default_value = 7; - */ - defaultValue?: string; - /** - * If set, gives the index of a oneof in the containing type's oneof_decl - * list. This field is a member of that oneof. - * - * @generated from protobuf field: optional int32 oneof_index = 9; - */ - oneofIndex?: number; - /** - * JSON name of this field. The value is set by protocol compiler. If the - * user has set a "json_name" option on this field, that option's value - * will be used. Otherwise, it's deduced from the field's name by converting - * it to camelCase. - * - * @generated from protobuf field: optional string json_name = 10; - */ - jsonName?: string; - /** - * @generated from protobuf field: optional google.protobuf.FieldOptions options = 8; - */ - options?: FieldOptions; - /** - * If true, this is a proto3 "optional". When a proto3 field is optional, it - * tracks presence regardless of field type. - * - * When proto3_optional is true, this field must be belong to a oneof to - * signal to old proto3 clients that presence is tracked for this field. This - * oneof is known as a "synthetic" oneof, and this field must be its sole - * member (each proto3 optional field gets its own synthetic oneof). Synthetic - * oneofs exist in the descriptor only, and do not generate any API. Synthetic - * oneofs must be ordered after all "real" oneofs. - * - * For message fields, proto3_optional doesn't create any semantic change, - * since non-repeated message fields always track presence. However it still - * indicates the semantic detail of whether the user wrote "optional" or not. - * This can be useful for round-tripping the .proto file. For consistency we - * give message fields a synthetic oneof also, even though it is not required - * to track presence. This is especially important because the parser can't - * tell if a field is a message or an enum, so it must always create a - * synthetic oneof. - * - * Proto2 optional fields do not set this flag, because they already indicate - * optional with `LABEL_OPTIONAL`. - * - * @generated from protobuf field: optional bool proto3_optional = 17; - */ - proto3Optional?: boolean; -} -/** - * @generated from protobuf enum google.protobuf.FieldDescriptorProto.Type - */ -export enum FieldDescriptorProto_Type { - /** - * @generated synthetic value - protobuf-ts requires all enums to have a 0 value - */ - UNSPECIFIED$ = 0, - /** - * 0 is reserved for errors. - * Order is weird for historical reasons. - * - * @generated from protobuf enum value: TYPE_DOUBLE = 1; - */ - DOUBLE = 1, - /** - * @generated from protobuf enum value: TYPE_FLOAT = 2; - */ - FLOAT = 2, - /** - * Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - * - * @generated from protobuf enum value: TYPE_INT64 = 3; - */ - INT64 = 3, - /** - * @generated from protobuf enum value: TYPE_UINT64 = 4; - */ - UINT64 = 4, - /** - * Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - * - * @generated from protobuf enum value: TYPE_INT32 = 5; - */ - INT32 = 5, - /** - * @generated from protobuf enum value: TYPE_FIXED64 = 6; - */ - FIXED64 = 6, - /** - * @generated from protobuf enum value: TYPE_FIXED32 = 7; - */ - FIXED32 = 7, - /** - * @generated from protobuf enum value: TYPE_BOOL = 8; - */ - BOOL = 8, - /** - * @generated from protobuf enum value: TYPE_STRING = 9; - */ - STRING = 9, - /** - * Tag-delimited aggregate. - * Group type is deprecated and not supported after google.protobuf. However, Proto3 - * implementations should still be able to parse the group wire format and - * treat group fields as unknown fields. In Editions, the group wire format - * can be enabled via the `message_encoding` feature. - * - * @generated from protobuf enum value: TYPE_GROUP = 10; - */ - GROUP = 10, - /** - * Length-delimited aggregate. - * - * @generated from protobuf enum value: TYPE_MESSAGE = 11; - */ - MESSAGE = 11, - /** - * New in version 2. - * - * @generated from protobuf enum value: TYPE_BYTES = 12; - */ - BYTES = 12, - /** - * @generated from protobuf enum value: TYPE_UINT32 = 13; - */ - UINT32 = 13, - /** - * @generated from protobuf enum value: TYPE_ENUM = 14; - */ - ENUM = 14, - /** - * @generated from protobuf enum value: TYPE_SFIXED32 = 15; - */ - SFIXED32 = 15, - /** - * @generated from protobuf enum value: TYPE_SFIXED64 = 16; - */ - SFIXED64 = 16, - /** - * Uses ZigZag encoding. - * - * @generated from protobuf enum value: TYPE_SINT32 = 17; - */ - SINT32 = 17, - /** - * Uses ZigZag encoding. - * - * @generated from protobuf enum value: TYPE_SINT64 = 18; - */ - SINT64 = 18 -} -/** - * @generated from protobuf enum google.protobuf.FieldDescriptorProto.Label - */ -export enum FieldDescriptorProto_Label { - /** - * @generated synthetic value - protobuf-ts requires all enums to have a 0 value - */ - UNSPECIFIED$ = 0, - /** - * 0 is reserved for errors - * - * @generated from protobuf enum value: LABEL_OPTIONAL = 1; - */ - OPTIONAL = 1, - /** - * @generated from protobuf enum value: LABEL_REPEATED = 3; - */ - REPEATED = 3, - /** - * The required label is only allowed in google.protobuf. In proto3 and Editions - * it's explicitly prohibited. In Editions, the `field_presence` feature - * can be used to get this behavior. - * - * @generated from protobuf enum value: LABEL_REQUIRED = 2; - */ - REQUIRED = 2 -} -/** - * Describes a oneof. - * - * @generated from protobuf message google.protobuf.OneofDescriptorProto - */ -export interface OneofDescriptorProto { - /** - * @generated from protobuf field: optional string name = 1; - */ - name?: string; - /** - * @generated from protobuf field: optional google.protobuf.OneofOptions options = 2; - */ - options?: OneofOptions; -} -/** - * Describes an enum type. - * - * @generated from protobuf message google.protobuf.EnumDescriptorProto - */ -export interface EnumDescriptorProto { - /** - * @generated from protobuf field: optional string name = 1; - */ - name?: string; - /** - * @generated from protobuf field: repeated google.protobuf.EnumValueDescriptorProto value = 2; - */ - value: EnumValueDescriptorProto[]; - /** - * @generated from protobuf field: optional google.protobuf.EnumOptions options = 3; - */ - options?: EnumOptions; - /** - * Range of reserved numeric values. Reserved numeric values may not be used - * by enum values in the same enum declaration. Reserved ranges may not - * overlap. - * - * @generated from protobuf field: repeated google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4; - */ - reservedRange: EnumDescriptorProto_EnumReservedRange[]; - /** - * Reserved enum value names, which may not be reused. A given name may only - * be reserved once. - * - * @generated from protobuf field: repeated string reserved_name = 5; - */ - reservedName: string[]; -} -/** - * Range of reserved numeric values. Reserved values may not be used by - * entries in the same enum. Reserved ranges may not overlap. - * - * Note that this is distinct from DescriptorProto.ReservedRange in that it - * is inclusive such that it can appropriately represent the entire int32 - * domain. - * - * @generated from protobuf message google.protobuf.EnumDescriptorProto.EnumReservedRange - */ -export interface EnumDescriptorProto_EnumReservedRange { - /** - * @generated from protobuf field: optional int32 start = 1; - */ - start?: number; // Inclusive. - /** - * @generated from protobuf field: optional int32 end = 2; - */ - end?: number; // Inclusive. -} -/** - * Describes a value within an enum. - * - * @generated from protobuf message google.protobuf.EnumValueDescriptorProto - */ -export interface EnumValueDescriptorProto { - /** - * @generated from protobuf field: optional string name = 1; - */ - name?: string; - /** - * @generated from protobuf field: optional int32 number = 2; - */ - number?: number; - /** - * @generated from protobuf field: optional google.protobuf.EnumValueOptions options = 3; - */ - options?: EnumValueOptions; -} -/** - * Describes a service. - * - * @generated from protobuf message google.protobuf.ServiceDescriptorProto - */ -export interface ServiceDescriptorProto { - /** - * @generated from protobuf field: optional string name = 1; - */ - name?: string; - /** - * @generated from protobuf field: repeated google.protobuf.MethodDescriptorProto method = 2; - */ - method: MethodDescriptorProto[]; - /** - * @generated from protobuf field: optional google.protobuf.ServiceOptions options = 3; - */ - options?: ServiceOptions; -} -/** - * Describes a method of a service. - * - * @generated from protobuf message google.protobuf.MethodDescriptorProto - */ -export interface MethodDescriptorProto { - /** - * @generated from protobuf field: optional string name = 1; - */ - name?: string; - /** - * Input and output type names. These are resolved in the same way as - * FieldDescriptorProto.type_name, but must refer to a message type. - * - * @generated from protobuf field: optional string input_type = 2; - */ - inputType?: string; - /** - * @generated from protobuf field: optional string output_type = 3; - */ - outputType?: string; - /** - * @generated from protobuf field: optional google.protobuf.MethodOptions options = 4; - */ - options?: MethodOptions; - /** - * Identifies if client streams multiple client messages - * - * @generated from protobuf field: optional bool client_streaming = 5; - */ - clientStreaming?: boolean; - /** - * Identifies if server streams multiple server messages - * - * @generated from protobuf field: optional bool server_streaming = 6; - */ - serverStreaming?: boolean; -} -// =================================================================== -// Options - -// Each of the definitions above may have "options" attached. These are -// just annotations which may cause code to be generated slightly differently -// or may contain hints for code that manipulates protocol messages. -// -// Clients may define custom options as extensions of the *Options messages. -// These extensions may not yet be known at parsing time, so the parser cannot -// store the values in them. Instead it stores them in a field in the *Options -// message called uninterpreted_option. This field must have the same name -// across all *Options messages. We then use this field to populate the -// extensions when we build a descriptor, at which point all protos have been -// parsed and so all extensions are known. -// -// Extension numbers for custom options may be chosen as follows: -// * For options which will only be used within a single application or -// organization, or for experimental options, use field numbers 50000 -// through 99999. It is up to you to ensure that you do not use the -// same number for multiple options. -// * For options which will be published and used publicly by multiple -// independent entities, e-mail protobuf-global-extension-registry@google.com -// to reserve extension numbers. Simply provide your project name (e.g. -// Objective-C plugin) and your project website (if available) -- there's no -// need to explain how you intend to use them. Usually you only need one -// extension number. You can declare multiple options with only one extension -// number by putting them in a sub-message. See the Custom Options section of -// the docs for examples: -// https://developers.google.com/protocol-buffers/docs/proto#options -// If this turns out to be popular, a web service will be set up -// to automatically assign option numbers. - -/** - * @generated from protobuf message google.protobuf.FileOptions - */ -export interface FileOptions { - /** - * Sets the Java package where classes generated from this .proto will be - * placed. By default, the proto package is used, but this is often - * inappropriate because proto packages do not normally start with backwards - * domain names. - * - * @generated from protobuf field: optional string java_package = 1; - */ - javaPackage?: string; - /** - * Controls the name of the wrapper Java class generated for the .proto file. - * That class will always contain the .proto file's getDescriptor() method as - * well as any top-level extensions defined in the .proto file. - * If java_multiple_files is disabled, then all the other classes from the - * .proto file will be nested inside the single wrapper outer class. - * - * @generated from protobuf field: optional string java_outer_classname = 8; - */ - javaOuterClassname?: string; - /** - * If enabled, then the Java code generator will generate a separate .java - * file for each top-level message, enum, and service defined in the .proto - * file. Thus, these types will *not* be nested inside the wrapper class - * named by java_outer_classname. However, the wrapper class will still be - * generated to contain the file's getDescriptor() method as well as any - * top-level extensions defined in the file. - * - * @generated from protobuf field: optional bool java_multiple_files = 10; - */ - javaMultipleFiles?: boolean; - /** - * This option does nothing. - * - * @deprecated - * @generated from protobuf field: optional bool java_generate_equals_and_hash = 20 [deprecated = true]; - */ - javaGenerateEqualsAndHash?: boolean; - /** - * If set true, then the Java2 code generator will generate code that - * throws an exception whenever an attempt is made to assign a non-UTF-8 - * byte sequence to a string field. - * Message reflection will do the same. - * However, an extension field still accepts non-UTF-8 byte sequences. - * This option has no effect on when used with the lite runtime. - * - * @generated from protobuf field: optional bool java_string_check_utf8 = 27; - */ - javaStringCheckUtf8?: boolean; - /** - * @generated from protobuf field: optional google.protobuf.FileOptions.OptimizeMode optimize_for = 9; - */ - optimizeFor?: FileOptions_OptimizeMode; - /** - * Sets the Go package where structs generated from this .proto will be - * placed. If omitted, the Go package will be derived from the following: - * - The basename of the package import path, if provided. - * - Otherwise, the package statement in the .proto file, if present. - * - Otherwise, the basename of the .proto file, without extension. - * - * @generated from protobuf field: optional string go_package = 11; - */ - goPackage?: string; - /** - * Should generic services be generated in each language? "Generic" services - * are not specific to any particular RPC system. They are generated by the - * main code generators in each language (without additional plugins). - * Generic services were the only kind of service generation supported by - * early versions of google.protobuf. - * - * Generic services are now considered deprecated in favor of using plugins - * that generate code specific to your particular RPC system. Therefore, - * these default to false. Old code which depends on generic services should - * explicitly set them to true. - * - * @generated from protobuf field: optional bool cc_generic_services = 16; - */ - ccGenericServices?: boolean; - /** - * @generated from protobuf field: optional bool java_generic_services = 17; - */ - javaGenericServices?: boolean; - /** - * @generated from protobuf field: optional bool py_generic_services = 18; - */ - pyGenericServices?: boolean; - /** - * @generated from protobuf field: optional bool php_generic_services = 42; - */ - phpGenericServices?: boolean; - /** - * Is this file deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for everything in the file, or it will be completely ignored; in the very - * least, this is a formalization for deprecating files. - * - * @generated from protobuf field: optional bool deprecated = 23; - */ - deprecated?: boolean; - /** - * Enables the use of arenas for the proto messages in this file. This applies - * only to generated classes for C++. - * - * @generated from protobuf field: optional bool cc_enable_arenas = 31; - */ - ccEnableArenas?: boolean; - /** - * Sets the objective c class prefix which is prepended to all objective c - * generated classes from this .proto. There is no default. - * - * @generated from protobuf field: optional string objc_class_prefix = 36; - */ - objcClassPrefix?: string; - /** - * Namespace for generated classes; defaults to the package. - * - * @generated from protobuf field: optional string csharp_namespace = 37; - */ - csharpNamespace?: string; - /** - * By default Swift generators will take the proto package and CamelCase it - * replacing '.' with underscore and use that to prefix the types/symbols - * defined. When this options is provided, they will use this value instead - * to prefix the types/symbols defined. - * - * @generated from protobuf field: optional string swift_prefix = 39; - */ - swiftPrefix?: string; - /** - * Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. - * - * @generated from protobuf field: optional string php_class_prefix = 40; - */ - phpClassPrefix?: string; - /** - * Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. - * - * @generated from protobuf field: optional string php_namespace = 41; - */ - phpNamespace?: string; - /** - * Use this option to change the namespace of php generated metadata classes. - * Default is empty. When this option is empty, the proto file name will be - * used for determining the namespace. - * - * @generated from protobuf field: optional string php_metadata_namespace = 44; - */ - phpMetadataNamespace?: string; - /** - * Use this option to change the package of ruby generated classes. Default - * is empty. When this option is not set, the package name will be used for - * determining the ruby package. - * - * @generated from protobuf field: optional string ruby_package = 45; - */ - rubyPackage?: string; - /** - * Any features defined in the specific edition. - * - * @generated from protobuf field: optional google.protobuf.FeatureSet features = 50; - */ - features?: FeatureSet; - /** - * The parser stores options it doesn't recognize here. - * See the documentation for the "Options" section above. - * - * @generated from protobuf field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; - */ - uninterpretedOption: UninterpretedOption[]; -} -/** - * Generated classes can be optimized for speed or code size. - * - * @generated from protobuf enum google.protobuf.FileOptions.OptimizeMode - */ -export enum FileOptions_OptimizeMode { - /** - * @generated synthetic value - protobuf-ts requires all enums to have a 0 value - */ - UNSPECIFIED$ = 0, - /** - * Generate complete code for parsing, serialization, - * - * @generated from protobuf enum value: SPEED = 1; - */ - SPEED = 1, - /** - * etc. - * - * Use ReflectionOps to implement these methods. - * - * @generated from protobuf enum value: CODE_SIZE = 2; - */ - CODE_SIZE = 2, - /** - * Generate code using MessageLite and the lite runtime. - * - * @generated from protobuf enum value: LITE_RUNTIME = 3; - */ - LITE_RUNTIME = 3 -} -/** - * @generated from protobuf message google.protobuf.MessageOptions - */ -export interface MessageOptions { - /** - * Set true to use the old proto1 MessageSet wire format for extensions. - * This is provided for backwards-compatibility with the MessageSet wire - * format. You should not use this for any other reason: It's less - * efficient, has fewer features, and is more complicated. - * - * The message must be defined exactly as follows: - * message Foo { - * option message_set_wire_format = true; - * extensions 4 to max; - * } - * Note that the message cannot have any defined fields; MessageSets only - * have extensions. - * - * All extensions of your type must be singular messages; e.g. they cannot - * be int32s, enums, or repeated messages. - * - * Because this is an option, the above two restrictions are not enforced by - * the protocol compiler. - * - * @generated from protobuf field: optional bool message_set_wire_format = 1; - */ - messageSetWireFormat?: boolean; - /** - * Disables the generation of the standard "descriptor()" accessor, which can - * conflict with a field of the same name. This is meant to make migration - * from proto1 easier; new code should avoid fields named "descriptor". - * - * @generated from protobuf field: optional bool no_standard_descriptor_accessor = 2; - */ - noStandardDescriptorAccessor?: boolean; - /** - * Is this message deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the message, or it will be completely ignored; in the very least, - * this is a formalization for deprecating messages. - * - * @generated from protobuf field: optional bool deprecated = 3; - */ - deprecated?: boolean; - /** - * NOTE: Do not set the option in .proto files. Always use the maps syntax - * instead. The option should only be implicitly set by the proto compiler - * parser. - * - * Whether the message is an automatically generated map entry type for the - * maps field. - * - * For maps fields: - * map map_field = 1; - * The parsed descriptor looks like: - * message MapFieldEntry { - * option map_entry = true; - * optional KeyType key = 1; - * optional ValueType value = 2; - * } - * repeated MapFieldEntry map_field = 1; - * - * Implementations may choose not to generate the map_entry=true message, but - * use a native map in the target language to hold the keys and values. - * The reflection APIs in such implementations still need to work as - * if the field is a repeated message field. - * - * @generated from protobuf field: optional bool map_entry = 7; - */ - mapEntry?: boolean; - /** - * Enable the legacy handling of JSON field name conflicts. This lowercases - * and strips underscored from the fields before comparison in proto3 only. - * The new behavior takes `json_name` into account and applies to proto2 as - * well. - * - * This should only be used as a temporary measure against broken builds due - * to the change in behavior for JSON field name conflicts. - * - * TODO This is legacy behavior we plan to remove once downstream - * teams have had time to migrate. - * - * @deprecated - * @generated from protobuf field: optional bool deprecated_legacy_json_field_conflicts = 11 [deprecated = true]; - */ - deprecatedLegacyJsonFieldConflicts?: boolean; - /** - * Any features defined in the specific edition. - * - * @generated from protobuf field: optional google.protobuf.FeatureSet features = 12; - */ - features?: FeatureSet; - /** - * The parser stores options it doesn't recognize here. See above. - * - * @generated from protobuf field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; - */ - uninterpretedOption: UninterpretedOption[]; -} -/** - * @generated from protobuf message google.protobuf.FieldOptions - */ -export interface FieldOptions { - /** - * The ctype option instructs the C++ code generator to use a different - * representation of the field than it normally would. See the specific - * options below. This option is only implemented to support use of - * [ctype=CORD] and [ctype=STRING] (the default) on non-repeated fields of - * type "bytes" in the open source release -- sorry, we'll try to include - * other types in a future version! - * - * @generated from protobuf field: optional google.protobuf.FieldOptions.CType ctype = 1; - */ - ctype?: FieldOptions_CType; - /** - * The packed option can be enabled for repeated primitive fields to enable - * a more efficient representation on the wire. Rather than repeatedly - * writing the tag and type for each element, the entire array is encoded as - * a single length-delimited blob. In proto3, only explicit setting it to - * false will avoid using packed encoding. This option is prohibited in - * Editions, but the `repeated_field_encoding` feature can be used to control - * the behavior. - * - * @generated from protobuf field: optional bool packed = 2; - */ - packed?: boolean; - /** - * The jstype option determines the JavaScript type used for values of the - * field. The option is permitted only for 64 bit integral and fixed types - * (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING - * is represented as JavaScript string, which avoids loss of precision that - * can happen when a large value is converted to a floating point JavaScript. - * Specifying JS_NUMBER for the jstype causes the generated JavaScript code to - * use the JavaScript "number" type. The behavior of the default option - * JS_NORMAL is implementation dependent. - * - * This option is an enum to permit additional types to be added, e.g. - * goog.math.Integer. - * - * @generated from protobuf field: optional google.protobuf.FieldOptions.JSType jstype = 6; - */ - jstype?: FieldOptions_JSType; - /** - * Should this field be parsed lazily? Lazy applies only to message-type - * fields. It means that when the outer message is initially parsed, the - * inner message's contents will not be parsed but instead stored in encoded - * form. The inner message will actually be parsed when it is first accessed. - * - * This is only a hint. Implementations are free to choose whether to use - * eager or lazy parsing regardless of the value of this option. However, - * setting this option true suggests that the protocol author believes that - * using lazy parsing on this field is worth the additional bookkeeping - * overhead typically needed to implement it. - * - * This option does not affect the public interface of any generated code; - * all method signatures remain the same. Furthermore, thread-safety of the - * interface is not affected by this option; const methods remain safe to - * call from multiple threads concurrently, while non-const methods continue - * to require exclusive access. - * - * Note that implementations may choose not to check required fields within - * a lazy sub-message. That is, calling IsInitialized() on the outer message - * may return true even if the inner message has missing required fields. - * This is necessary because otherwise the inner message would have to be - * parsed in order to perform the check, defeating the purpose of lazy - * parsing. An implementation which chooses not to check required fields - * must be consistent about it. That is, for any particular sub-message, the - * implementation must either *always* check its required fields, or *never* - * check its required fields, regardless of whether or not the message has - * been parsed. - * - * As of May 2022, lazy verifies the contents of the byte stream during - * parsing. An invalid byte stream will cause the overall parsing to fail. - * - * @generated from protobuf field: optional bool lazy = 5; - */ - lazy?: boolean; - /** - * unverified_lazy does no correctness checks on the byte stream. This should - * only be used where lazy with verification is prohibitive for performance - * reasons. - * - * @generated from protobuf field: optional bool unverified_lazy = 15; - */ - unverifiedLazy?: boolean; - /** - * Is this field deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for accessors, or it will be completely ignored; in the very least, this - * is a formalization for deprecating fields. - * - * @generated from protobuf field: optional bool deprecated = 3; - */ - deprecated?: boolean; - /** - * For Google-internal migration only. Do not use. - * - * @generated from protobuf field: optional bool weak = 10; - */ - weak?: boolean; - /** - * Indicate that the field value should not be printed out when using debug - * formats, e.g. when the field contains sensitive credentials. - * - * @generated from protobuf field: optional bool debug_redact = 16; - */ - debugRedact?: boolean; - /** - * @generated from protobuf field: optional google.protobuf.FieldOptions.OptionRetention retention = 17; - */ - retention?: FieldOptions_OptionRetention; - /** - * @generated from protobuf field: repeated google.protobuf.FieldOptions.OptionTargetType targets = 19; - */ - targets: FieldOptions_OptionTargetType[]; - /** - * @generated from protobuf field: repeated google.protobuf.FieldOptions.EditionDefault edition_defaults = 20; - */ - editionDefaults: FieldOptions_EditionDefault[]; - /** - * Any features defined in the specific edition. - * - * @generated from protobuf field: optional google.protobuf.FeatureSet features = 21; - */ - features?: FeatureSet; - /** - * The parser stores options it doesn't recognize here. See above. - * - * @generated from protobuf field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; - */ - uninterpretedOption: UninterpretedOption[]; -} -/** - * @generated from protobuf message google.protobuf.FieldOptions.EditionDefault - */ -export interface FieldOptions_EditionDefault { - /** - * @generated from protobuf field: optional google.protobuf.Edition edition = 3; - */ - edition?: Edition; - /** - * @generated from protobuf field: optional string value = 2; - */ - value?: string; // Textproto value. -} -/** - * @generated from protobuf enum google.protobuf.FieldOptions.CType - */ -export enum FieldOptions_CType { - /** - * Default mode. - * - * @generated from protobuf enum value: STRING = 0; - */ - STRING = 0, - /** - * The option [ctype=CORD] may be applied to a non-repeated field of type - * "bytes". It indicates that in C++, the data should be stored in a Cord - * instead of a string. For very large strings, this may reduce memory - * fragmentation. It may also allow better performance when parsing from a - * Cord, or when parsing with aliasing enabled, as the parsed Cord may then - * alias the original buffer. - * - * @generated from protobuf enum value: CORD = 1; - */ - CORD = 1, - /** - * @generated from protobuf enum value: STRING_PIECE = 2; - */ - STRING_PIECE = 2 -} -/** - * @generated from protobuf enum google.protobuf.FieldOptions.JSType - */ -export enum FieldOptions_JSType { - /** - * Use the default type. - * - * @generated from protobuf enum value: JS_NORMAL = 0; - */ - JS_NORMAL = 0, - /** - * Use JavaScript strings. - * - * @generated from protobuf enum value: JS_STRING = 1; - */ - JS_STRING = 1, - /** - * Use JavaScript numbers. - * - * @generated from protobuf enum value: JS_NUMBER = 2; - */ - JS_NUMBER = 2 -} -/** - * If set to RETENTION_SOURCE, the option will be omitted from the binary. - * Note: as of January 2023, support for this is in progress and does not yet - * have an effect (b/264593489). - * - * @generated from protobuf enum google.protobuf.FieldOptions.OptionRetention - */ -export enum FieldOptions_OptionRetention { - /** - * @generated from protobuf enum value: RETENTION_UNKNOWN = 0; - */ - RETENTION_UNKNOWN = 0, - /** - * @generated from protobuf enum value: RETENTION_RUNTIME = 1; - */ - RETENTION_RUNTIME = 1, - /** - * @generated from protobuf enum value: RETENTION_SOURCE = 2; - */ - RETENTION_SOURCE = 2 -} -/** - * This indicates the types of entities that the field may apply to when used - * as an option. If it is unset, then the field may be freely used as an - * option on any kind of entity. Note: as of January 2023, support for this is - * in progress and does not yet have an effect (b/264593489). - * - * @generated from protobuf enum google.protobuf.FieldOptions.OptionTargetType - */ -export enum FieldOptions_OptionTargetType { - /** - * @generated from protobuf enum value: TARGET_TYPE_UNKNOWN = 0; - */ - TARGET_TYPE_UNKNOWN = 0, - /** - * @generated from protobuf enum value: TARGET_TYPE_FILE = 1; - */ - TARGET_TYPE_FILE = 1, - /** - * @generated from protobuf enum value: TARGET_TYPE_EXTENSION_RANGE = 2; - */ - TARGET_TYPE_EXTENSION_RANGE = 2, - /** - * @generated from protobuf enum value: TARGET_TYPE_MESSAGE = 3; - */ - TARGET_TYPE_MESSAGE = 3, - /** - * @generated from protobuf enum value: TARGET_TYPE_FIELD = 4; - */ - TARGET_TYPE_FIELD = 4, - /** - * @generated from protobuf enum value: TARGET_TYPE_ONEOF = 5; - */ - TARGET_TYPE_ONEOF = 5, - /** - * @generated from protobuf enum value: TARGET_TYPE_ENUM = 6; - */ - TARGET_TYPE_ENUM = 6, - /** - * @generated from protobuf enum value: TARGET_TYPE_ENUM_ENTRY = 7; - */ - TARGET_TYPE_ENUM_ENTRY = 7, - /** - * @generated from protobuf enum value: TARGET_TYPE_SERVICE = 8; - */ - TARGET_TYPE_SERVICE = 8, - /** - * @generated from protobuf enum value: TARGET_TYPE_METHOD = 9; - */ - TARGET_TYPE_METHOD = 9 -} -/** - * @generated from protobuf message google.protobuf.OneofOptions - */ -export interface OneofOptions { - /** - * Any features defined in the specific edition. - * - * @generated from protobuf field: optional google.protobuf.FeatureSet features = 1; - */ - features?: FeatureSet; - /** - * The parser stores options it doesn't recognize here. See above. - * - * @generated from protobuf field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; - */ - uninterpretedOption: UninterpretedOption[]; -} -/** - * @generated from protobuf message google.protobuf.EnumOptions - */ -export interface EnumOptions { - /** - * Set this option to true to allow mapping different tag names to the same - * value. - * - * @generated from protobuf field: optional bool allow_alias = 2; - */ - allowAlias?: boolean; - /** - * Is this enum deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum, or it will be completely ignored; in the very least, this - * is a formalization for deprecating enums. - * - * @generated from protobuf field: optional bool deprecated = 3; - */ - deprecated?: boolean; - /** - * Enable the legacy handling of JSON field name conflicts. This lowercases - * and strips underscored from the fields before comparison in proto3 only. - * The new behavior takes `json_name` into account and applies to proto2 as - * well. - * TODO Remove this legacy behavior once downstream teams have - * had time to migrate. - * - * @deprecated - * @generated from protobuf field: optional bool deprecated_legacy_json_field_conflicts = 6 [deprecated = true]; - */ - deprecatedLegacyJsonFieldConflicts?: boolean; - /** - * Any features defined in the specific edition. - * - * @generated from protobuf field: optional google.protobuf.FeatureSet features = 7; - */ - features?: FeatureSet; - /** - * The parser stores options it doesn't recognize here. See above. - * - * @generated from protobuf field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; - */ - uninterpretedOption: UninterpretedOption[]; -} -/** - * @generated from protobuf message google.protobuf.EnumValueOptions - */ -export interface EnumValueOptions { - /** - * Is this enum value deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the enum value, or it will be completely ignored; in the very least, - * this is a formalization for deprecating enum values. - * - * @generated from protobuf field: optional bool deprecated = 1; - */ - deprecated?: boolean; - /** - * Any features defined in the specific edition. - * - * @generated from protobuf field: optional google.protobuf.FeatureSet features = 2; - */ - features?: FeatureSet; - /** - * Indicate that fields annotated with this enum value should not be printed - * out when using debug formats, e.g. when the field contains sensitive - * credentials. - * - * @generated from protobuf field: optional bool debug_redact = 3; - */ - debugRedact?: boolean; - /** - * The parser stores options it doesn't recognize here. See above. - * - * @generated from protobuf field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; - */ - uninterpretedOption: UninterpretedOption[]; -} -/** - * @generated from protobuf message google.protobuf.ServiceOptions - */ -export interface ServiceOptions { - /** - * Any features defined in the specific edition. - * - * @generated from protobuf field: optional google.protobuf.FeatureSet features = 34; - */ - features?: FeatureSet; - // Note: Field numbers 1 through 32 are reserved for Google's internal RPC - // framework. We apologize for hoarding these numbers to ourselves, but - // we were already using them long before we decided to release Protocol - // Buffers. - - /** - * Is this service deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the service, or it will be completely ignored; in the very least, - * this is a formalization for deprecating services. - * - * @generated from protobuf field: optional bool deprecated = 33; - */ - deprecated?: boolean; - /** - * The parser stores options it doesn't recognize here. See above. - * - * @generated from protobuf field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; - */ - uninterpretedOption: UninterpretedOption[]; -} -/** - * @generated from protobuf message google.protobuf.MethodOptions - */ -export interface MethodOptions { - // Note: Field numbers 1 through 32 are reserved for Google's internal RPC - // framework. We apologize for hoarding these numbers to ourselves, but - // we were already using them long before we decided to release Protocol - // Buffers. - - /** - * Is this method deprecated? - * Depending on the target platform, this can emit Deprecated annotations - * for the method, or it will be completely ignored; in the very least, - * this is a formalization for deprecating methods. - * - * @generated from protobuf field: optional bool deprecated = 33; - */ - deprecated?: boolean; - /** - * @generated from protobuf field: optional google.protobuf.MethodOptions.IdempotencyLevel idempotency_level = 34; - */ - idempotencyLevel?: MethodOptions_IdempotencyLevel; - /** - * Any features defined in the specific edition. - * - * @generated from protobuf field: optional google.protobuf.FeatureSet features = 35; - */ - features?: FeatureSet; - /** - * The parser stores options it doesn't recognize here. See above. - * - * @generated from protobuf field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; - */ - uninterpretedOption: UninterpretedOption[]; -} -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - * - * @generated from protobuf enum google.protobuf.MethodOptions.IdempotencyLevel - */ -export enum MethodOptions_IdempotencyLevel { - /** - * @generated from protobuf enum value: IDEMPOTENCY_UNKNOWN = 0; - */ - IDEMPOTENCY_UNKNOWN = 0, - /** - * implies idempotent - * - * @generated from protobuf enum value: NO_SIDE_EFFECTS = 1; - */ - NO_SIDE_EFFECTS = 1, - /** - * idempotent, but may have side effects - * - * @generated from protobuf enum value: IDEMPOTENT = 2; - */ - IDEMPOTENT = 2 -} -/** - * A message representing a option the parser does not recognize. This only - * appears in options protos created by the compiler::Parser class. - * DescriptorPool resolves these when building Descriptor objects. Therefore, - * options protos in descriptor objects (e.g. returned by Descriptor::options(), - * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions - * in them. - * - * @generated from protobuf message google.protobuf.UninterpretedOption - */ -export interface UninterpretedOption { - /** - * @generated from protobuf field: repeated google.protobuf.UninterpretedOption.NamePart name = 2; - */ - name: UninterpretedOption_NamePart[]; - /** - * The value of the uninterpreted option, in whatever type the tokenizer - * identified it as during parsing. Exactly one of these should be set. - * - * @generated from protobuf field: optional string identifier_value = 3; - */ - identifierValue?: string; - /** - * @generated from protobuf field: optional uint64 positive_int_value = 4; - */ - positiveIntValue?: string; - /** - * @generated from protobuf field: optional int64 negative_int_value = 5; - */ - negativeIntValue?: string; - /** - * @generated from protobuf field: optional double double_value = 6; - */ - doubleValue?: number; - /** - * @generated from protobuf field: optional bytes string_value = 7; - */ - stringValue?: Uint8Array; - /** - * @generated from protobuf field: optional string aggregate_value = 8; - */ - aggregateValue?: string; -} -/** - * The name of the uninterpreted option. Each string represents a segment in - * a dot-separated name. is_extension is true iff a segment represents an - * extension (denoted with parentheses in options specs in .proto files). - * E.g.,{ ["foo", false], ["bar.baz", true], ["moo", false] } represents - * "foo.(bar.baz).moo". - * - * @generated from protobuf message google.protobuf.UninterpretedOption.NamePart - */ -export interface UninterpretedOption_NamePart { - /** - * @generated from protobuf field: string name_part = 1; - */ - namePart: string; - /** - * @generated from protobuf field: bool is_extension = 2; - */ - isExtension: boolean; -} -// =================================================================== -// Features - -/** - * TODO Enums in C++ gencode (and potentially other languages) are - * not well scoped. This means that each of the feature enums below can clash - * with each other. The short names we've chosen maximize call-site - * readability, but leave us very open to this scenario. A future feature will - * be designed and implemented to handle this, hopefully before we ever hit a - * conflict here. - * - * @generated from protobuf message google.protobuf.FeatureSet - */ -export interface FeatureSet { - /** - * @generated from protobuf field: optional google.protobuf.FeatureSet.FieldPresence field_presence = 1; - */ - fieldPresence?: FeatureSet_FieldPresence; - /** - * @generated from protobuf field: optional google.protobuf.FeatureSet.EnumType enum_type = 2; - */ - enumType?: FeatureSet_EnumType; - /** - * @generated from protobuf field: optional google.protobuf.FeatureSet.RepeatedFieldEncoding repeated_field_encoding = 3; - */ - repeatedFieldEncoding?: FeatureSet_RepeatedFieldEncoding; - /** - * @generated from protobuf field: optional google.protobuf.FeatureSet.Utf8Validation utf8_validation = 4; - */ - utf8Validation?: FeatureSet_Utf8Validation; - /** - * @generated from protobuf field: optional google.protobuf.FeatureSet.MessageEncoding message_encoding = 5; - */ - messageEncoding?: FeatureSet_MessageEncoding; - /** - * @generated from protobuf field: optional google.protobuf.FeatureSet.JsonFormat json_format = 6; - */ - jsonFormat?: FeatureSet_JsonFormat; -} -/** - * @generated from protobuf enum google.protobuf.FeatureSet.FieldPresence - */ -export enum FeatureSet_FieldPresence { - /** - * @generated from protobuf enum value: FIELD_PRESENCE_UNKNOWN = 0; - */ - FIELD_PRESENCE_UNKNOWN = 0, - /** - * @generated from protobuf enum value: EXPLICIT = 1; - */ - EXPLICIT = 1, - /** - * @generated from protobuf enum value: IMPLICIT = 2; - */ - IMPLICIT = 2, - /** - * @generated from protobuf enum value: LEGACY_REQUIRED = 3; - */ - LEGACY_REQUIRED = 3 -} -/** - * @generated from protobuf enum google.protobuf.FeatureSet.EnumType - */ -export enum FeatureSet_EnumType { - /** - * @generated from protobuf enum value: ENUM_TYPE_UNKNOWN = 0; - */ - ENUM_TYPE_UNKNOWN = 0, - /** - * @generated from protobuf enum value: OPEN = 1; - */ - OPEN = 1, - /** - * @generated from protobuf enum value: CLOSED = 2; - */ - CLOSED = 2 -} -/** - * @generated from protobuf enum google.protobuf.FeatureSet.RepeatedFieldEncoding - */ -export enum FeatureSet_RepeatedFieldEncoding { - /** - * @generated from protobuf enum value: REPEATED_FIELD_ENCODING_UNKNOWN = 0; - */ - REPEATED_FIELD_ENCODING_UNKNOWN = 0, - /** - * @generated from protobuf enum value: PACKED = 1; - */ - PACKED = 1, - /** - * @generated from protobuf enum value: EXPANDED = 2; - */ - EXPANDED = 2 -} -/** - * @generated from protobuf enum google.protobuf.FeatureSet.Utf8Validation - */ -export enum FeatureSet_Utf8Validation { - /** - * @generated from protobuf enum value: UTF8_VALIDATION_UNKNOWN = 0; - */ - UTF8_VALIDATION_UNKNOWN = 0, - /** - * @generated from protobuf enum value: NONE = 1; - */ - NONE = 1, - /** - * @generated from protobuf enum value: VERIFY = 2; - */ - VERIFY = 2 -} -/** - * @generated from protobuf enum google.protobuf.FeatureSet.MessageEncoding - */ -export enum FeatureSet_MessageEncoding { - /** - * @generated from protobuf enum value: MESSAGE_ENCODING_UNKNOWN = 0; - */ - MESSAGE_ENCODING_UNKNOWN = 0, - /** - * @generated from protobuf enum value: LENGTH_PREFIXED = 1; - */ - LENGTH_PREFIXED = 1, - /** - * @generated from protobuf enum value: DELIMITED = 2; - */ - DELIMITED = 2 -} -/** - * @generated from protobuf enum google.protobuf.FeatureSet.JsonFormat - */ -export enum FeatureSet_JsonFormat { - /** - * @generated from protobuf enum value: JSON_FORMAT_UNKNOWN = 0; - */ - JSON_FORMAT_UNKNOWN = 0, - /** - * @generated from protobuf enum value: ALLOW = 1; - */ - ALLOW = 1, - /** - * @generated from protobuf enum value: LEGACY_BEST_EFFORT = 2; - */ - LEGACY_BEST_EFFORT = 2 -} -/** - * A compiled specification for the defaults of a set of features. These - * messages are generated from FeatureSet extensions and can be used to seed - * feature resolution. The resolution with this object becomes a simple search - * for the closest matching edition, followed by proto merges. - * - * @generated from protobuf message google.protobuf.FeatureSetDefaults - */ -export interface FeatureSetDefaults { - /** - * @generated from protobuf field: repeated google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault defaults = 1; - */ - defaults: FeatureSetDefaults_FeatureSetEditionDefault[]; - /** - * The minimum supported edition (inclusive) when this was constructed. - * Editions before this will not have defaults. - * - * @generated from protobuf field: optional google.protobuf.Edition minimum_edition = 4; - */ - minimumEdition?: Edition; - /** - * The maximum known edition (inclusive) when this was constructed. Editions - * after this will not have reliable defaults. - * - * @generated from protobuf field: optional google.protobuf.Edition maximum_edition = 5; - */ - maximumEdition?: Edition; -} -/** - * A map from every known edition with a unique set of defaults to its - * defaults. Not all editions may be contained here. For a given edition, - * the defaults at the closest matching edition ordered at or before it should - * be used. This field must be in strict ascending order by edition. - * - * @generated from protobuf message google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - */ -export interface FeatureSetDefaults_FeatureSetEditionDefault { - /** - * @generated from protobuf field: optional google.protobuf.Edition edition = 3; - */ - edition?: Edition; - /** - * @generated from protobuf field: optional google.protobuf.FeatureSet features = 2; - */ - features?: FeatureSet; -} -// =================================================================== -// Optional source code info - -/** - * Encapsulates information about the original source file from which a - * FileDescriptorProto was generated. - * - * @generated from protobuf message google.protobuf.SourceCodeInfo - */ -export interface SourceCodeInfo { - /** - * A Location identifies a piece of source code in a .proto file which - * corresponds to a particular definition. This information is intended - * to be useful to IDEs, code indexers, documentation generators, and similar - * tools. - * - * For example, say we have a file like: - * message Foo { - * optional string foo = 1; - * } - * Let's look at just the field definition: - * optional string foo = 1; - * ^ ^^ ^^ ^ ^^^ - * a bc de f ghi - * We have the following locations: - * span path represents - * [a,i) [ 4, 0, 2, 0 ] The whole field definition. - * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). - * [c,d) [ 4, 0, 2, 0, 5 ] The type (string). - * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). - * [g,h) [ 4, 0, 2, 0, 3 ] The number (1). - * - * Notes: - * - A location may refer to a repeated field itself (i.e. not to any - * particular index within it). This is used whenever a set of elements are - * logically enclosed in a single code segment. For example, an entire - * extend block (possibly containing multiple extension definitions) will - * have an outer location whose path refers to the "extensions" repeated - * field without an index. - * - Multiple locations may have the same path. This happens when a single - * logical declaration is spread out across multiple places. The most - * obvious example is the "extend" block again -- there may be multiple - * extend blocks in the same scope, each of which will have the same path. - * - A location's span is not always a subset of its parent's span. For - * example, the "extendee" of an extension declaration appears at the - * beginning of the "extend" block and is shared by all extensions within - * the block. - * - Just because a location's span is a subset of some other location's span - * does not mean that it is a descendant. For example, a "group" defines - * both a type and a field in a single declaration. Thus, the locations - * corresponding to the type and field and their components will overlap. - * - Code which tries to interpret locations should probably be designed to - * ignore those that it doesn't understand, as more types of locations could - * be recorded in the future. - * - * @generated from protobuf field: repeated google.protobuf.SourceCodeInfo.Location location = 1; - */ - location: SourceCodeInfo_Location[]; -} -/** - * @generated from protobuf message google.protobuf.SourceCodeInfo.Location - */ -export interface SourceCodeInfo_Location { - /** - * Identifies which part of the FileDescriptorProto was defined at this - * location. - * - * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition occurs. - * For example, this path: - * [ 4, 3, 2, 7, 1 ] - * refers to: - * file.message_type(3) // 4, 3 - * .field(7) // 2, 7 - * .name() // 1 - * This is because FileDescriptorProto.message_type has field number 4: - * repeated DescriptorProto message_type = 4; - * and DescriptorProto.field has field number 2: - * repeated FieldDescriptorProto field = 2; - * and FieldDescriptorProto.name has field number 1: - * optional string name = 1; - * - * Thus, the above path gives the location of a field name. If we removed - * the last element: - * [ 4, 3, 2, 7 ] - * this path refers to the whole field declaration (from the beginning - * of the label to the terminating semicolon). - * - * @generated from protobuf field: repeated int32 path = 1 [packed = true]; - */ - path: number[]; - /** - * Always has exactly three or four elements: start line, start column, - * end line (optional, otherwise assumed same as start line), end column. - * These are packed into a single field for efficiency. Note that line - * and column numbers are zero-based -- typically you will want to add - * 1 to each before displaying to a user. - * - * @generated from protobuf field: repeated int32 span = 2 [packed = true]; - */ - span: number[]; - /** - * If this SourceCodeInfo represents a complete declaration, these are any - * comments appearing before and after the declaration which appear to be - * attached to the declaration. - * - * A series of line comments appearing on consecutive lines, with no other - * tokens appearing on those lines, will be treated as a single comment. - * - * leading_detached_comments will keep paragraphs of comments that appear - * before (but not connected to) the current element. Each paragraph, - * separated by empty lines, will be one comment element in the repeated - * field. - * - * Only the comment content is provided; comment markers (e.g. //) are - * stripped out. For block comments, leading whitespace and an asterisk - * will be stripped from the beginning of each line other than the first. - * Newlines are included in the output. - * - * Examples: - * - * optional int32 foo = 1; // Comment attached to foo. - * // Comment attached to bar. - * optional int32 bar = 2; - * - * optional string baz = 3; - * // Comment attached to baz. - * // Another line attached to baz. - * - * // Comment attached to moo. - * // - * // Another line attached to moo. - * optional double moo = 4; - * - * // Detached comment for corge. This is not leading or trailing comments - * // to moo or corge because there are blank lines separating it from - * // both. - * - * // Detached comment for corge paragraph 2. - * - * optional string corge = 5; - * /* Block comment attached - * * to corge. Leading asterisks - * * will be removed. *\/ - * /* Block comment attached to - * * grault. *\/ - * optional int32 grault = 6; - * - * // ignored detached comments. - * - * @generated from protobuf field: optional string leading_comments = 3; - */ - leadingComments?: string; - /** - * @generated from protobuf field: optional string trailing_comments = 4; - */ - trailingComments?: string; - /** - * @generated from protobuf field: repeated string leading_detached_comments = 6; - */ - leadingDetachedComments: string[]; -} -/** - * Describes the relationship between generated code and its original source - * file. A GeneratedCodeInfo message is associated with only one generated - * source file, but may contain references to different source .proto files. - * - * @generated from protobuf message google.protobuf.GeneratedCodeInfo - */ -export interface GeneratedCodeInfo { - /** - * An Annotation connects some span of text in generated code to an element - * of its generating .proto file. - * - * @generated from protobuf field: repeated google.protobuf.GeneratedCodeInfo.Annotation annotation = 1; - */ - annotation: GeneratedCodeInfo_Annotation[]; -} -/** - * @generated from protobuf message google.protobuf.GeneratedCodeInfo.Annotation - */ -export interface GeneratedCodeInfo_Annotation { - /** - * Identifies the element in the original source .proto file. This field - * is formatted the same as SourceCodeInfo.Location.path. - * - * @generated from protobuf field: repeated int32 path = 1 [packed = true]; - */ - path: number[]; - /** - * Identifies the filesystem path to the original source .proto. - * - * @generated from protobuf field: optional string source_file = 2; - */ - sourceFile?: string; - /** - * Identifies the starting offset in bytes in the generated code - * that relates to the identified object. - * - * @generated from protobuf field: optional int32 begin = 3; - */ - begin?: number; - /** - * Identifies the ending offset in bytes in the generated code that - * relates to the identified object. The end offset should be one past - * the last relevant byte (so the length of the text = end - begin). - * - * @generated from protobuf field: optional int32 end = 4; - */ - end?: number; - /** - * @generated from protobuf field: optional google.protobuf.GeneratedCodeInfo.Annotation.Semantic semantic = 5; - */ - semantic?: GeneratedCodeInfo_Annotation_Semantic; -} -/** - * Represents the identified object's effect on the element in the original - * .proto file. - * - * @generated from protobuf enum google.protobuf.GeneratedCodeInfo.Annotation.Semantic - */ -export enum GeneratedCodeInfo_Annotation_Semantic { - /** - * There is no effect or the effect is indescribable. - * - * @generated from protobuf enum value: NONE = 0; - */ - NONE = 0, - /** - * The element is set or otherwise mutated. - * - * @generated from protobuf enum value: SET = 1; - */ - SET = 1, - /** - * An alias to the element is returned. - * - * @generated from protobuf enum value: ALIAS = 2; - */ - ALIAS = 2 -} -/** - * The full set of known editions. - * - * @generated from protobuf enum google.protobuf.Edition - */ -export enum Edition { - /** - * A placeholder for an unknown edition value. - * - * @generated from protobuf enum value: EDITION_UNKNOWN = 0; - */ - EDITION_UNKNOWN = 0, - /** - * Legacy syntax "editions". These pre-date editions, but behave much like - * distinct editions. These can't be used to specify the edition of proto - * files, but feature definitions must supply proto2/proto3 defaults for - * backwards compatibility. - * - * @generated from protobuf enum value: EDITION_PROTO2 = 998; - */ - EDITION_PROTO2 = 998, - /** - * @generated from protobuf enum value: EDITION_PROTO3 = 999; - */ - EDITION_PROTO3 = 999, - /** - * Editions that have been released. The specific values are arbitrary and - * should not be depended on, but they will always be time-ordered for easy - * comparison. - * - * @generated from protobuf enum value: EDITION_2023 = 1000; - */ - EDITION_2023 = 1000, - /** - * Placeholder editions for testing feature resolution. These should not be - * used or relyed on outside of tests. - * - * @generated from protobuf enum value: EDITION_1_TEST_ONLY = 1; - */ - EDITION_1_TEST_ONLY = 1, - /** - * @generated from protobuf enum value: EDITION_2_TEST_ONLY = 2; - */ - EDITION_2_TEST_ONLY = 2, - /** - * @generated from protobuf enum value: EDITION_99997_TEST_ONLY = 99997; - */ - EDITION_99997_TEST_ONLY = 99997, - /** - * @generated from protobuf enum value: EDITION_99998_TEST_ONLY = 99998; - */ - EDITION_99998_TEST_ONLY = 99998, - /** - * @generated from protobuf enum value: EDITION_99999_TEST_ONLY = 99999; - */ - EDITION_99999_TEST_ONLY = 99999 -} -// @generated message type with reflection information, may provide speed optimized methods -class FileDescriptorSet$Type extends MessageType { - constructor() { - super("google.protobuf.FileDescriptorSet", [ - { no: 1, name: "file", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => FileDescriptorProto } - ]); - } - create(value?: PartialMessage): FileDescriptorSet { - const message = globalThis.Object.create((this.messagePrototype!)); - message.file = []; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FileDescriptorSet): FileDescriptorSet { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* repeated google.protobuf.FileDescriptorProto file */ 1: - message.file.push(FileDescriptorProto.internalBinaryRead(reader, reader.uint32(), options)); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: FileDescriptorSet, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* repeated google.protobuf.FileDescriptorProto file = 1; */ - for (let i = 0; i < message.file.length; i++) - FileDescriptorProto.internalBinaryWrite(message.file[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message google.protobuf.FileDescriptorSet - */ -export const FileDescriptorSet = new FileDescriptorSet$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class FileDescriptorProto$Type extends MessageType { - constructor() { - super("google.protobuf.FileDescriptorProto", [ - { no: 1, name: "name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, - { no: 2, name: "package", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, - { no: 3, name: "dependency", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }, - { no: 10, name: "public_dependency", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 5 /*ScalarType.INT32*/ }, - { no: 11, name: "weak_dependency", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 5 /*ScalarType.INT32*/ }, - { no: 4, name: "message_type", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => DescriptorProto }, - { no: 5, name: "enum_type", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => EnumDescriptorProto }, - { no: 6, name: "service", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => ServiceDescriptorProto }, - { no: 7, name: "extension", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => FieldDescriptorProto }, - { no: 8, name: "options", kind: "message", T: () => FileOptions }, - { no: 9, name: "source_code_info", kind: "message", T: () => SourceCodeInfo }, - { no: 12, name: "syntax", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, - { no: 14, name: "edition", kind: "enum", opt: true, T: () => ["google.protobuf.Edition", Edition] } - ]); - } - create(value?: PartialMessage): FileDescriptorProto { - const message = globalThis.Object.create((this.messagePrototype!)); - message.dependency = []; - message.publicDependency = []; - message.weakDependency = []; - message.messageType = []; - message.enumType = []; - message.service = []; - message.extension = []; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FileDescriptorProto): FileDescriptorProto { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* optional string name */ 1: - message.name = reader.string(); - break; - case /* optional string package */ 2: - message.package = reader.string(); - break; - case /* repeated string dependency */ 3: - message.dependency.push(reader.string()); - break; - case /* repeated int32 public_dependency */ 10: - if (wireType === WireType.LengthDelimited) - for (let e = reader.int32() + reader.pos; reader.pos < e;) - message.publicDependency.push(reader.int32()); - else - message.publicDependency.push(reader.int32()); - break; - case /* repeated int32 weak_dependency */ 11: - if (wireType === WireType.LengthDelimited) - for (let e = reader.int32() + reader.pos; reader.pos < e;) - message.weakDependency.push(reader.int32()); - else - message.weakDependency.push(reader.int32()); - break; - case /* repeated google.protobuf.DescriptorProto message_type */ 4: - message.messageType.push(DescriptorProto.internalBinaryRead(reader, reader.uint32(), options)); - break; - case /* repeated google.protobuf.EnumDescriptorProto enum_type */ 5: - message.enumType.push(EnumDescriptorProto.internalBinaryRead(reader, reader.uint32(), options)); - break; - case /* repeated google.protobuf.ServiceDescriptorProto service */ 6: - message.service.push(ServiceDescriptorProto.internalBinaryRead(reader, reader.uint32(), options)); - break; - case /* repeated google.protobuf.FieldDescriptorProto extension */ 7: - message.extension.push(FieldDescriptorProto.internalBinaryRead(reader, reader.uint32(), options)); - break; - case /* optional google.protobuf.FileOptions options */ 8: - message.options = FileOptions.internalBinaryRead(reader, reader.uint32(), options, message.options); - break; - case /* optional google.protobuf.SourceCodeInfo source_code_info */ 9: - message.sourceCodeInfo = SourceCodeInfo.internalBinaryRead(reader, reader.uint32(), options, message.sourceCodeInfo); - break; - case /* optional string syntax */ 12: - message.syntax = reader.string(); - break; - case /* optional google.protobuf.Edition edition */ 14: - message.edition = reader.int32(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: FileDescriptorProto, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* optional string name = 1; */ - if (message.name !== undefined) - writer.tag(1, WireType.LengthDelimited).string(message.name); - /* optional string package = 2; */ - if (message.package !== undefined) - writer.tag(2, WireType.LengthDelimited).string(message.package); - /* repeated string dependency = 3; */ - for (let i = 0; i < message.dependency.length; i++) - writer.tag(3, WireType.LengthDelimited).string(message.dependency[i]); - /* repeated int32 public_dependency = 10; */ - for (let i = 0; i < message.publicDependency.length; i++) - writer.tag(10, WireType.Varint).int32(message.publicDependency[i]); - /* repeated int32 weak_dependency = 11; */ - for (let i = 0; i < message.weakDependency.length; i++) - writer.tag(11, WireType.Varint).int32(message.weakDependency[i]); - /* repeated google.protobuf.DescriptorProto message_type = 4; */ - for (let i = 0; i < message.messageType.length; i++) - DescriptorProto.internalBinaryWrite(message.messageType[i], writer.tag(4, WireType.LengthDelimited).fork(), options).join(); - /* repeated google.protobuf.EnumDescriptorProto enum_type = 5; */ - for (let i = 0; i < message.enumType.length; i++) - EnumDescriptorProto.internalBinaryWrite(message.enumType[i], writer.tag(5, WireType.LengthDelimited).fork(), options).join(); - /* repeated google.protobuf.ServiceDescriptorProto service = 6; */ - for (let i = 0; i < message.service.length; i++) - ServiceDescriptorProto.internalBinaryWrite(message.service[i], writer.tag(6, WireType.LengthDelimited).fork(), options).join(); - /* repeated google.protobuf.FieldDescriptorProto extension = 7; */ - for (let i = 0; i < message.extension.length; i++) - FieldDescriptorProto.internalBinaryWrite(message.extension[i], writer.tag(7, WireType.LengthDelimited).fork(), options).join(); - /* optional google.protobuf.FileOptions options = 8; */ - if (message.options) - FileOptions.internalBinaryWrite(message.options, writer.tag(8, WireType.LengthDelimited).fork(), options).join(); - /* optional google.protobuf.SourceCodeInfo source_code_info = 9; */ - if (message.sourceCodeInfo) - SourceCodeInfo.internalBinaryWrite(message.sourceCodeInfo, writer.tag(9, WireType.LengthDelimited).fork(), options).join(); - /* optional string syntax = 12; */ - if (message.syntax !== undefined) - writer.tag(12, WireType.LengthDelimited).string(message.syntax); - /* optional google.protobuf.Edition edition = 14; */ - if (message.edition !== undefined) - writer.tag(14, WireType.Varint).int32(message.edition); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message google.protobuf.FileDescriptorProto - */ -export const FileDescriptorProto = new FileDescriptorProto$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class DescriptorProto$Type extends MessageType { - constructor() { - super("google.protobuf.DescriptorProto", [ - { no: 1, name: "name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, - { no: 2, name: "field", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => FieldDescriptorProto }, - { no: 6, name: "extension", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => FieldDescriptorProto }, - { no: 3, name: "nested_type", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => DescriptorProto }, - { no: 4, name: "enum_type", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => EnumDescriptorProto }, - { no: 5, name: "extension_range", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => DescriptorProto_ExtensionRange }, - { no: 8, name: "oneof_decl", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => OneofDescriptorProto }, - { no: 7, name: "options", kind: "message", T: () => MessageOptions }, - { no: 9, name: "reserved_range", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => DescriptorProto_ReservedRange }, - { no: 10, name: "reserved_name", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ } - ]); - } - create(value?: PartialMessage): DescriptorProto { - const message = globalThis.Object.create((this.messagePrototype!)); - message.field = []; - message.extension = []; - message.nestedType = []; - message.enumType = []; - message.extensionRange = []; - message.oneofDecl = []; - message.reservedRange = []; - message.reservedName = []; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DescriptorProto): DescriptorProto { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* optional string name */ 1: - message.name = reader.string(); - break; - case /* repeated google.protobuf.FieldDescriptorProto field */ 2: - message.field.push(FieldDescriptorProto.internalBinaryRead(reader, reader.uint32(), options)); - break; - case /* repeated google.protobuf.FieldDescriptorProto extension */ 6: - message.extension.push(FieldDescriptorProto.internalBinaryRead(reader, reader.uint32(), options)); - break; - case /* repeated google.protobuf.DescriptorProto nested_type */ 3: - message.nestedType.push(DescriptorProto.internalBinaryRead(reader, reader.uint32(), options)); - break; - case /* repeated google.protobuf.EnumDescriptorProto enum_type */ 4: - message.enumType.push(EnumDescriptorProto.internalBinaryRead(reader, reader.uint32(), options)); - break; - case /* repeated google.protobuf.DescriptorProto.ExtensionRange extension_range */ 5: - message.extensionRange.push(DescriptorProto_ExtensionRange.internalBinaryRead(reader, reader.uint32(), options)); - break; - case /* repeated google.protobuf.OneofDescriptorProto oneof_decl */ 8: - message.oneofDecl.push(OneofDescriptorProto.internalBinaryRead(reader, reader.uint32(), options)); - break; - case /* optional google.protobuf.MessageOptions options */ 7: - message.options = MessageOptions.internalBinaryRead(reader, reader.uint32(), options, message.options); - break; - case /* repeated google.protobuf.DescriptorProto.ReservedRange reserved_range */ 9: - message.reservedRange.push(DescriptorProto_ReservedRange.internalBinaryRead(reader, reader.uint32(), options)); - break; - case /* repeated string reserved_name */ 10: - message.reservedName.push(reader.string()); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: DescriptorProto, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* optional string name = 1; */ - if (message.name !== undefined) - writer.tag(1, WireType.LengthDelimited).string(message.name); - /* repeated google.protobuf.FieldDescriptorProto field = 2; */ - for (let i = 0; i < message.field.length; i++) - FieldDescriptorProto.internalBinaryWrite(message.field[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join(); - /* repeated google.protobuf.FieldDescriptorProto extension = 6; */ - for (let i = 0; i < message.extension.length; i++) - FieldDescriptorProto.internalBinaryWrite(message.extension[i], writer.tag(6, WireType.LengthDelimited).fork(), options).join(); - /* repeated google.protobuf.DescriptorProto nested_type = 3; */ - for (let i = 0; i < message.nestedType.length; i++) - DescriptorProto.internalBinaryWrite(message.nestedType[i], writer.tag(3, WireType.LengthDelimited).fork(), options).join(); - /* repeated google.protobuf.EnumDescriptorProto enum_type = 4; */ - for (let i = 0; i < message.enumType.length; i++) - EnumDescriptorProto.internalBinaryWrite(message.enumType[i], writer.tag(4, WireType.LengthDelimited).fork(), options).join(); - /* repeated google.protobuf.DescriptorProto.ExtensionRange extension_range = 5; */ - for (let i = 0; i < message.extensionRange.length; i++) - DescriptorProto_ExtensionRange.internalBinaryWrite(message.extensionRange[i], writer.tag(5, WireType.LengthDelimited).fork(), options).join(); - /* repeated google.protobuf.OneofDescriptorProto oneof_decl = 8; */ - for (let i = 0; i < message.oneofDecl.length; i++) - OneofDescriptorProto.internalBinaryWrite(message.oneofDecl[i], writer.tag(8, WireType.LengthDelimited).fork(), options).join(); - /* optional google.protobuf.MessageOptions options = 7; */ - if (message.options) - MessageOptions.internalBinaryWrite(message.options, writer.tag(7, WireType.LengthDelimited).fork(), options).join(); - /* repeated google.protobuf.DescriptorProto.ReservedRange reserved_range = 9; */ - for (let i = 0; i < message.reservedRange.length; i++) - DescriptorProto_ReservedRange.internalBinaryWrite(message.reservedRange[i], writer.tag(9, WireType.LengthDelimited).fork(), options).join(); - /* repeated string reserved_name = 10; */ - for (let i = 0; i < message.reservedName.length; i++) - writer.tag(10, WireType.LengthDelimited).string(message.reservedName[i]); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message google.protobuf.DescriptorProto - */ -export const DescriptorProto = new DescriptorProto$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class DescriptorProto_ExtensionRange$Type extends MessageType { - constructor() { - super("google.protobuf.DescriptorProto.ExtensionRange", [ - { no: 1, name: "start", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ }, - { no: 2, name: "end", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ }, - { no: 3, name: "options", kind: "message", T: () => ExtensionRangeOptions } - ]); - } - create(value?: PartialMessage): DescriptorProto_ExtensionRange { - const message = globalThis.Object.create((this.messagePrototype!)); - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DescriptorProto_ExtensionRange): DescriptorProto_ExtensionRange { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* optional int32 start */ 1: - message.start = reader.int32(); - break; - case /* optional int32 end */ 2: - message.end = reader.int32(); - break; - case /* optional google.protobuf.ExtensionRangeOptions options */ 3: - message.options = ExtensionRangeOptions.internalBinaryRead(reader, reader.uint32(), options, message.options); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: DescriptorProto_ExtensionRange, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* optional int32 start = 1; */ - if (message.start !== undefined) - writer.tag(1, WireType.Varint).int32(message.start); - /* optional int32 end = 2; */ - if (message.end !== undefined) - writer.tag(2, WireType.Varint).int32(message.end); - /* optional google.protobuf.ExtensionRangeOptions options = 3; */ - if (message.options) - ExtensionRangeOptions.internalBinaryWrite(message.options, writer.tag(3, WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message google.protobuf.DescriptorProto.ExtensionRange - */ -export const DescriptorProto_ExtensionRange = new DescriptorProto_ExtensionRange$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class DescriptorProto_ReservedRange$Type extends MessageType { - constructor() { - super("google.protobuf.DescriptorProto.ReservedRange", [ - { no: 1, name: "start", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ }, - { no: 2, name: "end", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ } - ]); - } - create(value?: PartialMessage): DescriptorProto_ReservedRange { - const message = globalThis.Object.create((this.messagePrototype!)); - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DescriptorProto_ReservedRange): DescriptorProto_ReservedRange { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* optional int32 start */ 1: - message.start = reader.int32(); - break; - case /* optional int32 end */ 2: - message.end = reader.int32(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: DescriptorProto_ReservedRange, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* optional int32 start = 1; */ - if (message.start !== undefined) - writer.tag(1, WireType.Varint).int32(message.start); - /* optional int32 end = 2; */ - if (message.end !== undefined) - writer.tag(2, WireType.Varint).int32(message.end); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message google.protobuf.DescriptorProto.ReservedRange - */ -export const DescriptorProto_ReservedRange = new DescriptorProto_ReservedRange$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class ExtensionRangeOptions$Type extends MessageType { - constructor() { - super("google.protobuf.ExtensionRangeOptions", [ - { no: 999, name: "uninterpreted_option", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UninterpretedOption }, - { no: 2, name: "declaration", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => ExtensionRangeOptions_Declaration }, - { no: 50, name: "features", kind: "message", T: () => FeatureSet }, - { no: 3, name: "verification", kind: "enum", opt: true, T: () => ["google.protobuf.ExtensionRangeOptions.VerificationState", ExtensionRangeOptions_VerificationState] } - ]); - } - create(value?: PartialMessage): ExtensionRangeOptions { - const message = globalThis.Object.create((this.messagePrototype!)); - message.uninterpretedOption = []; - message.declaration = []; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExtensionRangeOptions): ExtensionRangeOptions { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* repeated google.protobuf.UninterpretedOption uninterpreted_option */ 999: - message.uninterpretedOption.push(UninterpretedOption.internalBinaryRead(reader, reader.uint32(), options)); - break; - case /* repeated google.protobuf.ExtensionRangeOptions.Declaration declaration */ 2: - message.declaration.push(ExtensionRangeOptions_Declaration.internalBinaryRead(reader, reader.uint32(), options)); - break; - case /* optional google.protobuf.FeatureSet features */ 50: - message.features = FeatureSet.internalBinaryRead(reader, reader.uint32(), options, message.features); - break; - case /* optional google.protobuf.ExtensionRangeOptions.VerificationState verification */ 3: - message.verification = reader.int32(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: ExtensionRangeOptions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; */ - for (let i = 0; i < message.uninterpretedOption.length; i++) - UninterpretedOption.internalBinaryWrite(message.uninterpretedOption[i], writer.tag(999, WireType.LengthDelimited).fork(), options).join(); - /* repeated google.protobuf.ExtensionRangeOptions.Declaration declaration = 2; */ - for (let i = 0; i < message.declaration.length; i++) - ExtensionRangeOptions_Declaration.internalBinaryWrite(message.declaration[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join(); - /* optional google.protobuf.FeatureSet features = 50; */ - if (message.features) - FeatureSet.internalBinaryWrite(message.features, writer.tag(50, WireType.LengthDelimited).fork(), options).join(); - /* optional google.protobuf.ExtensionRangeOptions.VerificationState verification = 3; */ - if (message.verification !== undefined) - writer.tag(3, WireType.Varint).int32(message.verification); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message google.protobuf.ExtensionRangeOptions - */ -export const ExtensionRangeOptions = new ExtensionRangeOptions$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class ExtensionRangeOptions_Declaration$Type extends MessageType { - constructor() { - super("google.protobuf.ExtensionRangeOptions.Declaration", [ - { no: 1, name: "number", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ }, - { no: 2, name: "full_name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, - { no: 3, name: "type", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, - { no: 5, name: "reserved", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, - { no: 6, name: "repeated", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ } - ]); - } - create(value?: PartialMessage): ExtensionRangeOptions_Declaration { - const message = globalThis.Object.create((this.messagePrototype!)); - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExtensionRangeOptions_Declaration): ExtensionRangeOptions_Declaration { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* optional int32 number */ 1: - message.number = reader.int32(); - break; - case /* optional string full_name */ 2: - message.fullName = reader.string(); - break; - case /* optional string type */ 3: - message.type = reader.string(); - break; - case /* optional bool reserved */ 5: - message.reserved = reader.bool(); - break; - case /* optional bool repeated */ 6: - message.repeated = reader.bool(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: ExtensionRangeOptions_Declaration, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* optional int32 number = 1; */ - if (message.number !== undefined) - writer.tag(1, WireType.Varint).int32(message.number); - /* optional string full_name = 2; */ - if (message.fullName !== undefined) - writer.tag(2, WireType.LengthDelimited).string(message.fullName); - /* optional string type = 3; */ - if (message.type !== undefined) - writer.tag(3, WireType.LengthDelimited).string(message.type); - /* optional bool reserved = 5; */ - if (message.reserved !== undefined) - writer.tag(5, WireType.Varint).bool(message.reserved); - /* optional bool repeated = 6; */ - if (message.repeated !== undefined) - writer.tag(6, WireType.Varint).bool(message.repeated); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message google.protobuf.ExtensionRangeOptions.Declaration - */ -export const ExtensionRangeOptions_Declaration = new ExtensionRangeOptions_Declaration$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class FieldDescriptorProto$Type extends MessageType { - constructor() { - super("google.protobuf.FieldDescriptorProto", [ - { no: 1, name: "name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, - { no: 3, name: "number", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ }, - { no: 4, name: "label", kind: "enum", opt: true, T: () => ["google.protobuf.FieldDescriptorProto.Label", FieldDescriptorProto_Label, "LABEL_"] }, - { no: 5, name: "type", kind: "enum", opt: true, T: () => ["google.protobuf.FieldDescriptorProto.Type", FieldDescriptorProto_Type, "TYPE_"] }, - { no: 6, name: "type_name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, - { no: 2, name: "extendee", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, - { no: 7, name: "default_value", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, - { no: 9, name: "oneof_index", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ }, - { no: 10, name: "json_name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, - { no: 8, name: "options", kind: "message", T: () => FieldOptions }, - { no: 17, name: "proto3_optional", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ } - ]); - } - create(value?: PartialMessage): FieldDescriptorProto { - const message = globalThis.Object.create((this.messagePrototype!)); - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FieldDescriptorProto): FieldDescriptorProto { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* optional string name */ 1: - message.name = reader.string(); - break; - case /* optional int32 number */ 3: - message.number = reader.int32(); - break; - case /* optional google.protobuf.FieldDescriptorProto.Label label */ 4: - message.label = reader.int32(); - break; - case /* optional google.protobuf.FieldDescriptorProto.Type type */ 5: - message.type = reader.int32(); - break; - case /* optional string type_name */ 6: - message.typeName = reader.string(); - break; - case /* optional string extendee */ 2: - message.extendee = reader.string(); - break; - case /* optional string default_value */ 7: - message.defaultValue = reader.string(); - break; - case /* optional int32 oneof_index */ 9: - message.oneofIndex = reader.int32(); - break; - case /* optional string json_name */ 10: - message.jsonName = reader.string(); - break; - case /* optional google.protobuf.FieldOptions options */ 8: - message.options = FieldOptions.internalBinaryRead(reader, reader.uint32(), options, message.options); - break; - case /* optional bool proto3_optional */ 17: - message.proto3Optional = reader.bool(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: FieldDescriptorProto, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* optional string name = 1; */ - if (message.name !== undefined) - writer.tag(1, WireType.LengthDelimited).string(message.name); - /* optional int32 number = 3; */ - if (message.number !== undefined) - writer.tag(3, WireType.Varint).int32(message.number); - /* optional google.protobuf.FieldDescriptorProto.Label label = 4; */ - if (message.label !== undefined) - writer.tag(4, WireType.Varint).int32(message.label); - /* optional google.protobuf.FieldDescriptorProto.Type type = 5; */ - if (message.type !== undefined) - writer.tag(5, WireType.Varint).int32(message.type); - /* optional string type_name = 6; */ - if (message.typeName !== undefined) - writer.tag(6, WireType.LengthDelimited).string(message.typeName); - /* optional string extendee = 2; */ - if (message.extendee !== undefined) - writer.tag(2, WireType.LengthDelimited).string(message.extendee); - /* optional string default_value = 7; */ - if (message.defaultValue !== undefined) - writer.tag(7, WireType.LengthDelimited).string(message.defaultValue); - /* optional int32 oneof_index = 9; */ - if (message.oneofIndex !== undefined) - writer.tag(9, WireType.Varint).int32(message.oneofIndex); - /* optional string json_name = 10; */ - if (message.jsonName !== undefined) - writer.tag(10, WireType.LengthDelimited).string(message.jsonName); - /* optional google.protobuf.FieldOptions options = 8; */ - if (message.options) - FieldOptions.internalBinaryWrite(message.options, writer.tag(8, WireType.LengthDelimited).fork(), options).join(); - /* optional bool proto3_optional = 17; */ - if (message.proto3Optional !== undefined) - writer.tag(17, WireType.Varint).bool(message.proto3Optional); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message google.protobuf.FieldDescriptorProto - */ -export const FieldDescriptorProto = new FieldDescriptorProto$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class OneofDescriptorProto$Type extends MessageType { - constructor() { - super("google.protobuf.OneofDescriptorProto", [ - { no: 1, name: "name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, - { no: 2, name: "options", kind: "message", T: () => OneofOptions } - ]); - } - create(value?: PartialMessage): OneofDescriptorProto { - const message = globalThis.Object.create((this.messagePrototype!)); - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OneofDescriptorProto): OneofDescriptorProto { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* optional string name */ 1: - message.name = reader.string(); - break; - case /* optional google.protobuf.OneofOptions options */ 2: - message.options = OneofOptions.internalBinaryRead(reader, reader.uint32(), options, message.options); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: OneofDescriptorProto, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* optional string name = 1; */ - if (message.name !== undefined) - writer.tag(1, WireType.LengthDelimited).string(message.name); - /* optional google.protobuf.OneofOptions options = 2; */ - if (message.options) - OneofOptions.internalBinaryWrite(message.options, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message google.protobuf.OneofDescriptorProto - */ -export const OneofDescriptorProto = new OneofDescriptorProto$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class EnumDescriptorProto$Type extends MessageType { - constructor() { - super("google.protobuf.EnumDescriptorProto", [ - { no: 1, name: "name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, - { no: 2, name: "value", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => EnumValueDescriptorProto }, - { no: 3, name: "options", kind: "message", T: () => EnumOptions }, - { no: 4, name: "reserved_range", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => EnumDescriptorProto_EnumReservedRange }, - { no: 5, name: "reserved_name", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ } - ]); - } - create(value?: PartialMessage): EnumDescriptorProto { - const message = globalThis.Object.create((this.messagePrototype!)); - message.value = []; - message.reservedRange = []; - message.reservedName = []; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EnumDescriptorProto): EnumDescriptorProto { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* optional string name */ 1: - message.name = reader.string(); - break; - case /* repeated google.protobuf.EnumValueDescriptorProto value */ 2: - message.value.push(EnumValueDescriptorProto.internalBinaryRead(reader, reader.uint32(), options)); - break; - case /* optional google.protobuf.EnumOptions options */ 3: - message.options = EnumOptions.internalBinaryRead(reader, reader.uint32(), options, message.options); - break; - case /* repeated google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range */ 4: - message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.internalBinaryRead(reader, reader.uint32(), options)); - break; - case /* repeated string reserved_name */ 5: - message.reservedName.push(reader.string()); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: EnumDescriptorProto, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* optional string name = 1; */ - if (message.name !== undefined) - writer.tag(1, WireType.LengthDelimited).string(message.name); - /* repeated google.protobuf.EnumValueDescriptorProto value = 2; */ - for (let i = 0; i < message.value.length; i++) - EnumValueDescriptorProto.internalBinaryWrite(message.value[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join(); - /* optional google.protobuf.EnumOptions options = 3; */ - if (message.options) - EnumOptions.internalBinaryWrite(message.options, writer.tag(3, WireType.LengthDelimited).fork(), options).join(); - /* repeated google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4; */ - for (let i = 0; i < message.reservedRange.length; i++) - EnumDescriptorProto_EnumReservedRange.internalBinaryWrite(message.reservedRange[i], writer.tag(4, WireType.LengthDelimited).fork(), options).join(); - /* repeated string reserved_name = 5; */ - for (let i = 0; i < message.reservedName.length; i++) - writer.tag(5, WireType.LengthDelimited).string(message.reservedName[i]); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message google.protobuf.EnumDescriptorProto - */ -export const EnumDescriptorProto = new EnumDescriptorProto$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class EnumDescriptorProto_EnumReservedRange$Type extends MessageType { - constructor() { - super("google.protobuf.EnumDescriptorProto.EnumReservedRange", [ - { no: 1, name: "start", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ }, - { no: 2, name: "end", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ } - ]); - } - create(value?: PartialMessage): EnumDescriptorProto_EnumReservedRange { - const message = globalThis.Object.create((this.messagePrototype!)); - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EnumDescriptorProto_EnumReservedRange): EnumDescriptorProto_EnumReservedRange { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* optional int32 start */ 1: - message.start = reader.int32(); - break; - case /* optional int32 end */ 2: - message.end = reader.int32(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: EnumDescriptorProto_EnumReservedRange, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* optional int32 start = 1; */ - if (message.start !== undefined) - writer.tag(1, WireType.Varint).int32(message.start); - /* optional int32 end = 2; */ - if (message.end !== undefined) - writer.tag(2, WireType.Varint).int32(message.end); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message google.protobuf.EnumDescriptorProto.EnumReservedRange - */ -export const EnumDescriptorProto_EnumReservedRange = new EnumDescriptorProto_EnumReservedRange$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class EnumValueDescriptorProto$Type extends MessageType { - constructor() { - super("google.protobuf.EnumValueDescriptorProto", [ - { no: 1, name: "name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, - { no: 2, name: "number", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ }, - { no: 3, name: "options", kind: "message", T: () => EnumValueOptions } - ]); - } - create(value?: PartialMessage): EnumValueDescriptorProto { - const message = globalThis.Object.create((this.messagePrototype!)); - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EnumValueDescriptorProto): EnumValueDescriptorProto { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* optional string name */ 1: - message.name = reader.string(); - break; - case /* optional int32 number */ 2: - message.number = reader.int32(); - break; - case /* optional google.protobuf.EnumValueOptions options */ 3: - message.options = EnumValueOptions.internalBinaryRead(reader, reader.uint32(), options, message.options); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: EnumValueDescriptorProto, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* optional string name = 1; */ - if (message.name !== undefined) - writer.tag(1, WireType.LengthDelimited).string(message.name); - /* optional int32 number = 2; */ - if (message.number !== undefined) - writer.tag(2, WireType.Varint).int32(message.number); - /* optional google.protobuf.EnumValueOptions options = 3; */ - if (message.options) - EnumValueOptions.internalBinaryWrite(message.options, writer.tag(3, WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message google.protobuf.EnumValueDescriptorProto - */ -export const EnumValueDescriptorProto = new EnumValueDescriptorProto$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class ServiceDescriptorProto$Type extends MessageType { - constructor() { - super("google.protobuf.ServiceDescriptorProto", [ - { no: 1, name: "name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, - { no: 2, name: "method", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => MethodDescriptorProto }, - { no: 3, name: "options", kind: "message", T: () => ServiceOptions } - ]); - } - create(value?: PartialMessage): ServiceDescriptorProto { - const message = globalThis.Object.create((this.messagePrototype!)); - message.method = []; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ServiceDescriptorProto): ServiceDescriptorProto { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* optional string name */ 1: - message.name = reader.string(); - break; - case /* repeated google.protobuf.MethodDescriptorProto method */ 2: - message.method.push(MethodDescriptorProto.internalBinaryRead(reader, reader.uint32(), options)); - break; - case /* optional google.protobuf.ServiceOptions options */ 3: - message.options = ServiceOptions.internalBinaryRead(reader, reader.uint32(), options, message.options); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: ServiceDescriptorProto, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* optional string name = 1; */ - if (message.name !== undefined) - writer.tag(1, WireType.LengthDelimited).string(message.name); - /* repeated google.protobuf.MethodDescriptorProto method = 2; */ - for (let i = 0; i < message.method.length; i++) - MethodDescriptorProto.internalBinaryWrite(message.method[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join(); - /* optional google.protobuf.ServiceOptions options = 3; */ - if (message.options) - ServiceOptions.internalBinaryWrite(message.options, writer.tag(3, WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message google.protobuf.ServiceDescriptorProto - */ -export const ServiceDescriptorProto = new ServiceDescriptorProto$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class MethodDescriptorProto$Type extends MessageType { - constructor() { - super("google.protobuf.MethodDescriptorProto", [ - { no: 1, name: "name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, - { no: 2, name: "input_type", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, - { no: 3, name: "output_type", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, - { no: 4, name: "options", kind: "message", T: () => MethodOptions }, - { no: 5, name: "client_streaming", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, - { no: 6, name: "server_streaming", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ } - ]); - } - create(value?: PartialMessage): MethodDescriptorProto { - const message = globalThis.Object.create((this.messagePrototype!)); - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MethodDescriptorProto): MethodDescriptorProto { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* optional string name */ 1: - message.name = reader.string(); - break; - case /* optional string input_type */ 2: - message.inputType = reader.string(); - break; - case /* optional string output_type */ 3: - message.outputType = reader.string(); - break; - case /* optional google.protobuf.MethodOptions options */ 4: - message.options = MethodOptions.internalBinaryRead(reader, reader.uint32(), options, message.options); - break; - case /* optional bool client_streaming */ 5: - message.clientStreaming = reader.bool(); - break; - case /* optional bool server_streaming */ 6: - message.serverStreaming = reader.bool(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: MethodDescriptorProto, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* optional string name = 1; */ - if (message.name !== undefined) - writer.tag(1, WireType.LengthDelimited).string(message.name); - /* optional string input_type = 2; */ - if (message.inputType !== undefined) - writer.tag(2, WireType.LengthDelimited).string(message.inputType); - /* optional string output_type = 3; */ - if (message.outputType !== undefined) - writer.tag(3, WireType.LengthDelimited).string(message.outputType); - /* optional google.protobuf.MethodOptions options = 4; */ - if (message.options) - MethodOptions.internalBinaryWrite(message.options, writer.tag(4, WireType.LengthDelimited).fork(), options).join(); - /* optional bool client_streaming = 5; */ - if (message.clientStreaming !== undefined) - writer.tag(5, WireType.Varint).bool(message.clientStreaming); - /* optional bool server_streaming = 6; */ - if (message.serverStreaming !== undefined) - writer.tag(6, WireType.Varint).bool(message.serverStreaming); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message google.protobuf.MethodDescriptorProto - */ -export const MethodDescriptorProto = new MethodDescriptorProto$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class FileOptions$Type extends MessageType { - constructor() { - super("google.protobuf.FileOptions", [ - { no: 1, name: "java_package", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, - { no: 8, name: "java_outer_classname", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, - { no: 10, name: "java_multiple_files", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, - { no: 20, name: "java_generate_equals_and_hash", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, - { no: 27, name: "java_string_check_utf8", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, - { no: 9, name: "optimize_for", kind: "enum", opt: true, T: () => ["google.protobuf.FileOptions.OptimizeMode", FileOptions_OptimizeMode] }, - { no: 11, name: "go_package", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, - { no: 16, name: "cc_generic_services", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, - { no: 17, name: "java_generic_services", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, - { no: 18, name: "py_generic_services", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, - { no: 42, name: "php_generic_services", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, - { no: 23, name: "deprecated", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, - { no: 31, name: "cc_enable_arenas", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, - { no: 36, name: "objc_class_prefix", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, - { no: 37, name: "csharp_namespace", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, - { no: 39, name: "swift_prefix", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, - { no: 40, name: "php_class_prefix", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, - { no: 41, name: "php_namespace", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, - { no: 44, name: "php_metadata_namespace", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, - { no: 45, name: "ruby_package", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, - { no: 50, name: "features", kind: "message", T: () => FeatureSet }, - { no: 999, name: "uninterpreted_option", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UninterpretedOption } - ]); - } - create(value?: PartialMessage): FileOptions { - const message = globalThis.Object.create((this.messagePrototype!)); - message.uninterpretedOption = []; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FileOptions): FileOptions { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* optional string java_package */ 1: - message.javaPackage = reader.string(); - break; - case /* optional string java_outer_classname */ 8: - message.javaOuterClassname = reader.string(); - break; - case /* optional bool java_multiple_files */ 10: - message.javaMultipleFiles = reader.bool(); - break; - case /* optional bool java_generate_equals_and_hash = 20 [deprecated = true];*/ 20: - message.javaGenerateEqualsAndHash = reader.bool(); - break; - case /* optional bool java_string_check_utf8 */ 27: - message.javaStringCheckUtf8 = reader.bool(); - break; - case /* optional google.protobuf.FileOptions.OptimizeMode optimize_for */ 9: - message.optimizeFor = reader.int32(); - break; - case /* optional string go_package */ 11: - message.goPackage = reader.string(); - break; - case /* optional bool cc_generic_services */ 16: - message.ccGenericServices = reader.bool(); - break; - case /* optional bool java_generic_services */ 17: - message.javaGenericServices = reader.bool(); - break; - case /* optional bool py_generic_services */ 18: - message.pyGenericServices = reader.bool(); - break; - case /* optional bool php_generic_services */ 42: - message.phpGenericServices = reader.bool(); - break; - case /* optional bool deprecated */ 23: - message.deprecated = reader.bool(); - break; - case /* optional bool cc_enable_arenas */ 31: - message.ccEnableArenas = reader.bool(); - break; - case /* optional string objc_class_prefix */ 36: - message.objcClassPrefix = reader.string(); - break; - case /* optional string csharp_namespace */ 37: - message.csharpNamespace = reader.string(); - break; - case /* optional string swift_prefix */ 39: - message.swiftPrefix = reader.string(); - break; - case /* optional string php_class_prefix */ 40: - message.phpClassPrefix = reader.string(); - break; - case /* optional string php_namespace */ 41: - message.phpNamespace = reader.string(); - break; - case /* optional string php_metadata_namespace */ 44: - message.phpMetadataNamespace = reader.string(); - break; - case /* optional string ruby_package */ 45: - message.rubyPackage = reader.string(); - break; - case /* optional google.protobuf.FeatureSet features */ 50: - message.features = FeatureSet.internalBinaryRead(reader, reader.uint32(), options, message.features); - break; - case /* repeated google.protobuf.UninterpretedOption uninterpreted_option */ 999: - message.uninterpretedOption.push(UninterpretedOption.internalBinaryRead(reader, reader.uint32(), options)); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: FileOptions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* optional string java_package = 1; */ - if (message.javaPackage !== undefined) - writer.tag(1, WireType.LengthDelimited).string(message.javaPackage); - /* optional string java_outer_classname = 8; */ - if (message.javaOuterClassname !== undefined) - writer.tag(8, WireType.LengthDelimited).string(message.javaOuterClassname); - /* optional bool java_multiple_files = 10; */ - if (message.javaMultipleFiles !== undefined) - writer.tag(10, WireType.Varint).bool(message.javaMultipleFiles); - /* optional bool java_generate_equals_and_hash = 20 [deprecated = true]; */ - if (message.javaGenerateEqualsAndHash !== undefined) - writer.tag(20, WireType.Varint).bool(message.javaGenerateEqualsAndHash); - /* optional bool java_string_check_utf8 = 27; */ - if (message.javaStringCheckUtf8 !== undefined) - writer.tag(27, WireType.Varint).bool(message.javaStringCheckUtf8); - /* optional google.protobuf.FileOptions.OptimizeMode optimize_for = 9; */ - if (message.optimizeFor !== undefined) - writer.tag(9, WireType.Varint).int32(message.optimizeFor); - /* optional string go_package = 11; */ - if (message.goPackage !== undefined) - writer.tag(11, WireType.LengthDelimited).string(message.goPackage); - /* optional bool cc_generic_services = 16; */ - if (message.ccGenericServices !== undefined) - writer.tag(16, WireType.Varint).bool(message.ccGenericServices); - /* optional bool java_generic_services = 17; */ - if (message.javaGenericServices !== undefined) - writer.tag(17, WireType.Varint).bool(message.javaGenericServices); - /* optional bool py_generic_services = 18; */ - if (message.pyGenericServices !== undefined) - writer.tag(18, WireType.Varint).bool(message.pyGenericServices); - /* optional bool php_generic_services = 42; */ - if (message.phpGenericServices !== undefined) - writer.tag(42, WireType.Varint).bool(message.phpGenericServices); - /* optional bool deprecated = 23; */ - if (message.deprecated !== undefined) - writer.tag(23, WireType.Varint).bool(message.deprecated); - /* optional bool cc_enable_arenas = 31; */ - if (message.ccEnableArenas !== undefined) - writer.tag(31, WireType.Varint).bool(message.ccEnableArenas); - /* optional string objc_class_prefix = 36; */ - if (message.objcClassPrefix !== undefined) - writer.tag(36, WireType.LengthDelimited).string(message.objcClassPrefix); - /* optional string csharp_namespace = 37; */ - if (message.csharpNamespace !== undefined) - writer.tag(37, WireType.LengthDelimited).string(message.csharpNamespace); - /* optional string swift_prefix = 39; */ - if (message.swiftPrefix !== undefined) - writer.tag(39, WireType.LengthDelimited).string(message.swiftPrefix); - /* optional string php_class_prefix = 40; */ - if (message.phpClassPrefix !== undefined) - writer.tag(40, WireType.LengthDelimited).string(message.phpClassPrefix); - /* optional string php_namespace = 41; */ - if (message.phpNamespace !== undefined) - writer.tag(41, WireType.LengthDelimited).string(message.phpNamespace); - /* optional string php_metadata_namespace = 44; */ - if (message.phpMetadataNamespace !== undefined) - writer.tag(44, WireType.LengthDelimited).string(message.phpMetadataNamespace); - /* optional string ruby_package = 45; */ - if (message.rubyPackage !== undefined) - writer.tag(45, WireType.LengthDelimited).string(message.rubyPackage); - /* optional google.protobuf.FeatureSet features = 50; */ - if (message.features) - FeatureSet.internalBinaryWrite(message.features, writer.tag(50, WireType.LengthDelimited).fork(), options).join(); - /* repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; */ - for (let i = 0; i < message.uninterpretedOption.length; i++) - UninterpretedOption.internalBinaryWrite(message.uninterpretedOption[i], writer.tag(999, WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message google.protobuf.FileOptions - */ -export const FileOptions = new FileOptions$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class MessageOptions$Type extends MessageType { - constructor() { - super("google.protobuf.MessageOptions", [ - { no: 1, name: "message_set_wire_format", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, - { no: 2, name: "no_standard_descriptor_accessor", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, - { no: 3, name: "deprecated", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, - { no: 7, name: "map_entry", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, - { no: 11, name: "deprecated_legacy_json_field_conflicts", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, - { no: 12, name: "features", kind: "message", T: () => FeatureSet }, - { no: 999, name: "uninterpreted_option", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UninterpretedOption } - ]); - } - create(value?: PartialMessage): MessageOptions { - const message = globalThis.Object.create((this.messagePrototype!)); - message.uninterpretedOption = []; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MessageOptions): MessageOptions { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* optional bool message_set_wire_format */ 1: - message.messageSetWireFormat = reader.bool(); - break; - case /* optional bool no_standard_descriptor_accessor */ 2: - message.noStandardDescriptorAccessor = reader.bool(); - break; - case /* optional bool deprecated */ 3: - message.deprecated = reader.bool(); - break; - case /* optional bool map_entry */ 7: - message.mapEntry = reader.bool(); - break; - case /* optional bool deprecated_legacy_json_field_conflicts = 11 [deprecated = true];*/ 11: - message.deprecatedLegacyJsonFieldConflicts = reader.bool(); - break; - case /* optional google.protobuf.FeatureSet features */ 12: - message.features = FeatureSet.internalBinaryRead(reader, reader.uint32(), options, message.features); - break; - case /* repeated google.protobuf.UninterpretedOption uninterpreted_option */ 999: - message.uninterpretedOption.push(UninterpretedOption.internalBinaryRead(reader, reader.uint32(), options)); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: MessageOptions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* optional bool message_set_wire_format = 1; */ - if (message.messageSetWireFormat !== undefined) - writer.tag(1, WireType.Varint).bool(message.messageSetWireFormat); - /* optional bool no_standard_descriptor_accessor = 2; */ - if (message.noStandardDescriptorAccessor !== undefined) - writer.tag(2, WireType.Varint).bool(message.noStandardDescriptorAccessor); - /* optional bool deprecated = 3; */ - if (message.deprecated !== undefined) - writer.tag(3, WireType.Varint).bool(message.deprecated); - /* optional bool map_entry = 7; */ - if (message.mapEntry !== undefined) - writer.tag(7, WireType.Varint).bool(message.mapEntry); - /* optional bool deprecated_legacy_json_field_conflicts = 11 [deprecated = true]; */ - if (message.deprecatedLegacyJsonFieldConflicts !== undefined) - writer.tag(11, WireType.Varint).bool(message.deprecatedLegacyJsonFieldConflicts); - /* optional google.protobuf.FeatureSet features = 12; */ - if (message.features) - FeatureSet.internalBinaryWrite(message.features, writer.tag(12, WireType.LengthDelimited).fork(), options).join(); - /* repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; */ - for (let i = 0; i < message.uninterpretedOption.length; i++) - UninterpretedOption.internalBinaryWrite(message.uninterpretedOption[i], writer.tag(999, WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message google.protobuf.MessageOptions - */ -export const MessageOptions = new MessageOptions$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class FieldOptions$Type extends MessageType { - constructor() { - super("google.protobuf.FieldOptions", [ - { no: 1, name: "ctype", kind: "enum", opt: true, T: () => ["google.protobuf.FieldOptions.CType", FieldOptions_CType] }, - { no: 2, name: "packed", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, - { no: 6, name: "jstype", kind: "enum", opt: true, T: () => ["google.protobuf.FieldOptions.JSType", FieldOptions_JSType] }, - { no: 5, name: "lazy", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, - { no: 15, name: "unverified_lazy", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, - { no: 3, name: "deprecated", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, - { no: 10, name: "weak", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, - { no: 16, name: "debug_redact", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, - { no: 17, name: "retention", kind: "enum", opt: true, T: () => ["google.protobuf.FieldOptions.OptionRetention", FieldOptions_OptionRetention] }, - { no: 19, name: "targets", kind: "enum", repeat: 2 /*RepeatType.UNPACKED*/, T: () => ["google.protobuf.FieldOptions.OptionTargetType", FieldOptions_OptionTargetType] }, - { no: 20, name: "edition_defaults", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => FieldOptions_EditionDefault }, - { no: 21, name: "features", kind: "message", T: () => FeatureSet }, - { no: 999, name: "uninterpreted_option", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UninterpretedOption } - ]); - } - create(value?: PartialMessage): FieldOptions { - const message = globalThis.Object.create((this.messagePrototype!)); - message.targets = []; - message.editionDefaults = []; - message.uninterpretedOption = []; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FieldOptions): FieldOptions { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* optional google.protobuf.FieldOptions.CType ctype */ 1: - message.ctype = reader.int32(); - break; - case /* optional bool packed */ 2: - message.packed = reader.bool(); - break; - case /* optional google.protobuf.FieldOptions.JSType jstype */ 6: - message.jstype = reader.int32(); - break; - case /* optional bool lazy */ 5: - message.lazy = reader.bool(); - break; - case /* optional bool unverified_lazy */ 15: - message.unverifiedLazy = reader.bool(); - break; - case /* optional bool deprecated */ 3: - message.deprecated = reader.bool(); - break; - case /* optional bool weak */ 10: - message.weak = reader.bool(); - break; - case /* optional bool debug_redact */ 16: - message.debugRedact = reader.bool(); - break; - case /* optional google.protobuf.FieldOptions.OptionRetention retention */ 17: - message.retention = reader.int32(); - break; - case /* repeated google.protobuf.FieldOptions.OptionTargetType targets */ 19: - if (wireType === WireType.LengthDelimited) - for (let e = reader.int32() + reader.pos; reader.pos < e;) - message.targets.push(reader.int32()); - else - message.targets.push(reader.int32()); - break; - case /* repeated google.protobuf.FieldOptions.EditionDefault edition_defaults */ 20: - message.editionDefaults.push(FieldOptions_EditionDefault.internalBinaryRead(reader, reader.uint32(), options)); - break; - case /* optional google.protobuf.FeatureSet features */ 21: - message.features = FeatureSet.internalBinaryRead(reader, reader.uint32(), options, message.features); - break; - case /* repeated google.protobuf.UninterpretedOption uninterpreted_option */ 999: - message.uninterpretedOption.push(UninterpretedOption.internalBinaryRead(reader, reader.uint32(), options)); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: FieldOptions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* optional google.protobuf.FieldOptions.CType ctype = 1; */ - if (message.ctype !== undefined) - writer.tag(1, WireType.Varint).int32(message.ctype); - /* optional bool packed = 2; */ - if (message.packed !== undefined) - writer.tag(2, WireType.Varint).bool(message.packed); - /* optional google.protobuf.FieldOptions.JSType jstype = 6; */ - if (message.jstype !== undefined) - writer.tag(6, WireType.Varint).int32(message.jstype); - /* optional bool lazy = 5; */ - if (message.lazy !== undefined) - writer.tag(5, WireType.Varint).bool(message.lazy); - /* optional bool unverified_lazy = 15; */ - if (message.unverifiedLazy !== undefined) - writer.tag(15, WireType.Varint).bool(message.unverifiedLazy); - /* optional bool deprecated = 3; */ - if (message.deprecated !== undefined) - writer.tag(3, WireType.Varint).bool(message.deprecated); - /* optional bool weak = 10; */ - if (message.weak !== undefined) - writer.tag(10, WireType.Varint).bool(message.weak); - /* optional bool debug_redact = 16; */ - if (message.debugRedact !== undefined) - writer.tag(16, WireType.Varint).bool(message.debugRedact); - /* optional google.protobuf.FieldOptions.OptionRetention retention = 17; */ - if (message.retention !== undefined) - writer.tag(17, WireType.Varint).int32(message.retention); - /* repeated google.protobuf.FieldOptions.OptionTargetType targets = 19; */ - for (let i = 0; i < message.targets.length; i++) - writer.tag(19, WireType.Varint).int32(message.targets[i]); - /* repeated google.protobuf.FieldOptions.EditionDefault edition_defaults = 20; */ - for (let i = 0; i < message.editionDefaults.length; i++) - FieldOptions_EditionDefault.internalBinaryWrite(message.editionDefaults[i], writer.tag(20, WireType.LengthDelimited).fork(), options).join(); - /* optional google.protobuf.FeatureSet features = 21; */ - if (message.features) - FeatureSet.internalBinaryWrite(message.features, writer.tag(21, WireType.LengthDelimited).fork(), options).join(); - /* repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; */ - for (let i = 0; i < message.uninterpretedOption.length; i++) - UninterpretedOption.internalBinaryWrite(message.uninterpretedOption[i], writer.tag(999, WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message google.protobuf.FieldOptions - */ -export const FieldOptions = new FieldOptions$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class FieldOptions_EditionDefault$Type extends MessageType { - constructor() { - super("google.protobuf.FieldOptions.EditionDefault", [ - { no: 3, name: "edition", kind: "enum", opt: true, T: () => ["google.protobuf.Edition", Edition] }, - { no: 2, name: "value", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ } - ]); - } - create(value?: PartialMessage): FieldOptions_EditionDefault { - const message = globalThis.Object.create((this.messagePrototype!)); - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FieldOptions_EditionDefault): FieldOptions_EditionDefault { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* optional google.protobuf.Edition edition */ 3: - message.edition = reader.int32(); - break; - case /* optional string value */ 2: - message.value = reader.string(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: FieldOptions_EditionDefault, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* optional google.protobuf.Edition edition = 3; */ - if (message.edition !== undefined) - writer.tag(3, WireType.Varint).int32(message.edition); - /* optional string value = 2; */ - if (message.value !== undefined) - writer.tag(2, WireType.LengthDelimited).string(message.value); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message google.protobuf.FieldOptions.EditionDefault - */ -export const FieldOptions_EditionDefault = new FieldOptions_EditionDefault$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class OneofOptions$Type extends MessageType { - constructor() { - super("google.protobuf.OneofOptions", [ - { no: 1, name: "features", kind: "message", T: () => FeatureSet }, - { no: 999, name: "uninterpreted_option", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UninterpretedOption } - ]); - } - create(value?: PartialMessage): OneofOptions { - const message = globalThis.Object.create((this.messagePrototype!)); - message.uninterpretedOption = []; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OneofOptions): OneofOptions { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* optional google.protobuf.FeatureSet features */ 1: - message.features = FeatureSet.internalBinaryRead(reader, reader.uint32(), options, message.features); - break; - case /* repeated google.protobuf.UninterpretedOption uninterpreted_option */ 999: - message.uninterpretedOption.push(UninterpretedOption.internalBinaryRead(reader, reader.uint32(), options)); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: OneofOptions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* optional google.protobuf.FeatureSet features = 1; */ - if (message.features) - FeatureSet.internalBinaryWrite(message.features, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); - /* repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; */ - for (let i = 0; i < message.uninterpretedOption.length; i++) - UninterpretedOption.internalBinaryWrite(message.uninterpretedOption[i], writer.tag(999, WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message google.protobuf.OneofOptions - */ -export const OneofOptions = new OneofOptions$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class EnumOptions$Type extends MessageType { - constructor() { - super("google.protobuf.EnumOptions", [ - { no: 2, name: "allow_alias", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, - { no: 3, name: "deprecated", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, - { no: 6, name: "deprecated_legacy_json_field_conflicts", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, - { no: 7, name: "features", kind: "message", T: () => FeatureSet }, - { no: 999, name: "uninterpreted_option", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UninterpretedOption } - ]); - } - create(value?: PartialMessage): EnumOptions { - const message = globalThis.Object.create((this.messagePrototype!)); - message.uninterpretedOption = []; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EnumOptions): EnumOptions { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* optional bool allow_alias */ 2: - message.allowAlias = reader.bool(); - break; - case /* optional bool deprecated */ 3: - message.deprecated = reader.bool(); - break; - case /* optional bool deprecated_legacy_json_field_conflicts = 6 [deprecated = true];*/ 6: - message.deprecatedLegacyJsonFieldConflicts = reader.bool(); - break; - case /* optional google.protobuf.FeatureSet features */ 7: - message.features = FeatureSet.internalBinaryRead(reader, reader.uint32(), options, message.features); - break; - case /* repeated google.protobuf.UninterpretedOption uninterpreted_option */ 999: - message.uninterpretedOption.push(UninterpretedOption.internalBinaryRead(reader, reader.uint32(), options)); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: EnumOptions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* optional bool allow_alias = 2; */ - if (message.allowAlias !== undefined) - writer.tag(2, WireType.Varint).bool(message.allowAlias); - /* optional bool deprecated = 3; */ - if (message.deprecated !== undefined) - writer.tag(3, WireType.Varint).bool(message.deprecated); - /* optional bool deprecated_legacy_json_field_conflicts = 6 [deprecated = true]; */ - if (message.deprecatedLegacyJsonFieldConflicts !== undefined) - writer.tag(6, WireType.Varint).bool(message.deprecatedLegacyJsonFieldConflicts); - /* optional google.protobuf.FeatureSet features = 7; */ - if (message.features) - FeatureSet.internalBinaryWrite(message.features, writer.tag(7, WireType.LengthDelimited).fork(), options).join(); - /* repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; */ - for (let i = 0; i < message.uninterpretedOption.length; i++) - UninterpretedOption.internalBinaryWrite(message.uninterpretedOption[i], writer.tag(999, WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message google.protobuf.EnumOptions - */ -export const EnumOptions = new EnumOptions$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class EnumValueOptions$Type extends MessageType { - constructor() { - super("google.protobuf.EnumValueOptions", [ - { no: 1, name: "deprecated", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, - { no: 2, name: "features", kind: "message", T: () => FeatureSet }, - { no: 3, name: "debug_redact", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, - { no: 999, name: "uninterpreted_option", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UninterpretedOption } - ]); - } - create(value?: PartialMessage): EnumValueOptions { - const message = globalThis.Object.create((this.messagePrototype!)); - message.uninterpretedOption = []; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EnumValueOptions): EnumValueOptions { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* optional bool deprecated */ 1: - message.deprecated = reader.bool(); - break; - case /* optional google.protobuf.FeatureSet features */ 2: - message.features = FeatureSet.internalBinaryRead(reader, reader.uint32(), options, message.features); - break; - case /* optional bool debug_redact */ 3: - message.debugRedact = reader.bool(); - break; - case /* repeated google.protobuf.UninterpretedOption uninterpreted_option */ 999: - message.uninterpretedOption.push(UninterpretedOption.internalBinaryRead(reader, reader.uint32(), options)); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: EnumValueOptions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* optional bool deprecated = 1; */ - if (message.deprecated !== undefined) - writer.tag(1, WireType.Varint).bool(message.deprecated); - /* optional google.protobuf.FeatureSet features = 2; */ - if (message.features) - FeatureSet.internalBinaryWrite(message.features, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); - /* optional bool debug_redact = 3; */ - if (message.debugRedact !== undefined) - writer.tag(3, WireType.Varint).bool(message.debugRedact); - /* repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; */ - for (let i = 0; i < message.uninterpretedOption.length; i++) - UninterpretedOption.internalBinaryWrite(message.uninterpretedOption[i], writer.tag(999, WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message google.protobuf.EnumValueOptions - */ -export const EnumValueOptions = new EnumValueOptions$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class ServiceOptions$Type extends MessageType { - constructor() { - super("google.protobuf.ServiceOptions", [ - { no: 34, name: "features", kind: "message", T: () => FeatureSet }, - { no: 33, name: "deprecated", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, - { no: 999, name: "uninterpreted_option", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UninterpretedOption } - ]); - } - create(value?: PartialMessage): ServiceOptions { - const message = globalThis.Object.create((this.messagePrototype!)); - message.uninterpretedOption = []; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ServiceOptions): ServiceOptions { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* optional google.protobuf.FeatureSet features */ 34: - message.features = FeatureSet.internalBinaryRead(reader, reader.uint32(), options, message.features); - break; - case /* optional bool deprecated */ 33: - message.deprecated = reader.bool(); - break; - case /* repeated google.protobuf.UninterpretedOption uninterpreted_option */ 999: - message.uninterpretedOption.push(UninterpretedOption.internalBinaryRead(reader, reader.uint32(), options)); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: ServiceOptions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* optional google.protobuf.FeatureSet features = 34; */ - if (message.features) - FeatureSet.internalBinaryWrite(message.features, writer.tag(34, WireType.LengthDelimited).fork(), options).join(); - /* optional bool deprecated = 33; */ - if (message.deprecated !== undefined) - writer.tag(33, WireType.Varint).bool(message.deprecated); - /* repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; */ - for (let i = 0; i < message.uninterpretedOption.length; i++) - UninterpretedOption.internalBinaryWrite(message.uninterpretedOption[i], writer.tag(999, WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message google.protobuf.ServiceOptions - */ -export const ServiceOptions = new ServiceOptions$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class MethodOptions$Type extends MessageType { - constructor() { - super("google.protobuf.MethodOptions", [ - { no: 33, name: "deprecated", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, - { no: 34, name: "idempotency_level", kind: "enum", opt: true, T: () => ["google.protobuf.MethodOptions.IdempotencyLevel", MethodOptions_IdempotencyLevel] }, - { no: 35, name: "features", kind: "message", T: () => FeatureSet }, - { no: 999, name: "uninterpreted_option", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UninterpretedOption } - ]); - } - create(value?: PartialMessage): MethodOptions { - const message = globalThis.Object.create((this.messagePrototype!)); - message.uninterpretedOption = []; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MethodOptions): MethodOptions { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* optional bool deprecated */ 33: - message.deprecated = reader.bool(); - break; - case /* optional google.protobuf.MethodOptions.IdempotencyLevel idempotency_level */ 34: - message.idempotencyLevel = reader.int32(); - break; - case /* optional google.protobuf.FeatureSet features */ 35: - message.features = FeatureSet.internalBinaryRead(reader, reader.uint32(), options, message.features); - break; - case /* repeated google.protobuf.UninterpretedOption uninterpreted_option */ 999: - message.uninterpretedOption.push(UninterpretedOption.internalBinaryRead(reader, reader.uint32(), options)); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: MethodOptions, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* optional bool deprecated = 33; */ - if (message.deprecated !== undefined) - writer.tag(33, WireType.Varint).bool(message.deprecated); - /* optional google.protobuf.MethodOptions.IdempotencyLevel idempotency_level = 34; */ - if (message.idempotencyLevel !== undefined) - writer.tag(34, WireType.Varint).int32(message.idempotencyLevel); - /* optional google.protobuf.FeatureSet features = 35; */ - if (message.features) - FeatureSet.internalBinaryWrite(message.features, writer.tag(35, WireType.LengthDelimited).fork(), options).join(); - /* repeated google.protobuf.UninterpretedOption uninterpreted_option = 999; */ - for (let i = 0; i < message.uninterpretedOption.length; i++) - UninterpretedOption.internalBinaryWrite(message.uninterpretedOption[i], writer.tag(999, WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message google.protobuf.MethodOptions - */ -export const MethodOptions = new MethodOptions$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class UninterpretedOption$Type extends MessageType { - constructor() { - super("google.protobuf.UninterpretedOption", [ - { no: 2, name: "name", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UninterpretedOption_NamePart }, - { no: 3, name: "identifier_value", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, - { no: 4, name: "positive_int_value", kind: "scalar", opt: true, T: 4 /*ScalarType.UINT64*/ }, - { no: 5, name: "negative_int_value", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/ }, - { no: 6, name: "double_value", kind: "scalar", opt: true, T: 1 /*ScalarType.DOUBLE*/ }, - { no: 7, name: "string_value", kind: "scalar", opt: true, T: 12 /*ScalarType.BYTES*/ }, - { no: 8, name: "aggregate_value", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ } - ]); - } - create(value?: PartialMessage): UninterpretedOption { - const message = globalThis.Object.create((this.messagePrototype!)); - message.name = []; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UninterpretedOption): UninterpretedOption { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* repeated google.protobuf.UninterpretedOption.NamePart name */ 2: - message.name.push(UninterpretedOption_NamePart.internalBinaryRead(reader, reader.uint32(), options)); - break; - case /* optional string identifier_value */ 3: - message.identifierValue = reader.string(); - break; - case /* optional uint64 positive_int_value */ 4: - message.positiveIntValue = reader.uint64().toString(); - break; - case /* optional int64 negative_int_value */ 5: - message.negativeIntValue = reader.int64().toString(); - break; - case /* optional double double_value */ 6: - message.doubleValue = reader.double(); - break; - case /* optional bytes string_value */ 7: - message.stringValue = reader.bytes(); - break; - case /* optional string aggregate_value */ 8: - message.aggregateValue = reader.string(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: UninterpretedOption, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* repeated google.protobuf.UninterpretedOption.NamePart name = 2; */ - for (let i = 0; i < message.name.length; i++) - UninterpretedOption_NamePart.internalBinaryWrite(message.name[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join(); - /* optional string identifier_value = 3; */ - if (message.identifierValue !== undefined) - writer.tag(3, WireType.LengthDelimited).string(message.identifierValue); - /* optional uint64 positive_int_value = 4; */ - if (message.positiveIntValue !== undefined) - writer.tag(4, WireType.Varint).uint64(message.positiveIntValue); - /* optional int64 negative_int_value = 5; */ - if (message.negativeIntValue !== undefined) - writer.tag(5, WireType.Varint).int64(message.negativeIntValue); - /* optional double double_value = 6; */ - if (message.doubleValue !== undefined) - writer.tag(6, WireType.Bit64).double(message.doubleValue); - /* optional bytes string_value = 7; */ - if (message.stringValue !== undefined) - writer.tag(7, WireType.LengthDelimited).bytes(message.stringValue); - /* optional string aggregate_value = 8; */ - if (message.aggregateValue !== undefined) - writer.tag(8, WireType.LengthDelimited).string(message.aggregateValue); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message google.protobuf.UninterpretedOption - */ -export const UninterpretedOption = new UninterpretedOption$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class UninterpretedOption_NamePart$Type extends MessageType { - constructor() { - super("google.protobuf.UninterpretedOption.NamePart", [ - { no: 1, name: "name_part", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 2, name: "is_extension", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } - ]); - } - create(value?: PartialMessage): UninterpretedOption_NamePart { - const message = globalThis.Object.create((this.messagePrototype!)); - message.namePart = ""; - message.isExtension = false; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UninterpretedOption_NamePart): UninterpretedOption_NamePart { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* string name_part */ 1: - message.namePart = reader.string(); - break; - case /* bool is_extension */ 2: - message.isExtension = reader.bool(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: UninterpretedOption_NamePart, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* string name_part = 1; */ - if (message.namePart !== "") - writer.tag(1, WireType.LengthDelimited).string(message.namePart); - /* bool is_extension = 2; */ - if (message.isExtension !== false) - writer.tag(2, WireType.Varint).bool(message.isExtension); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message google.protobuf.UninterpretedOption.NamePart - */ -export const UninterpretedOption_NamePart = new UninterpretedOption_NamePart$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class FeatureSet$Type extends MessageType { - constructor() { - super("google.protobuf.FeatureSet", [ - { no: 1, name: "field_presence", kind: "enum", opt: true, T: () => ["google.protobuf.FeatureSet.FieldPresence", FeatureSet_FieldPresence] }, - { no: 2, name: "enum_type", kind: "enum", opt: true, T: () => ["google.protobuf.FeatureSet.EnumType", FeatureSet_EnumType] }, - { no: 3, name: "repeated_field_encoding", kind: "enum", opt: true, T: () => ["google.protobuf.FeatureSet.RepeatedFieldEncoding", FeatureSet_RepeatedFieldEncoding] }, - { no: 4, name: "utf8_validation", kind: "enum", opt: true, T: () => ["google.protobuf.FeatureSet.Utf8Validation", FeatureSet_Utf8Validation] }, - { no: 5, name: "message_encoding", kind: "enum", opt: true, T: () => ["google.protobuf.FeatureSet.MessageEncoding", FeatureSet_MessageEncoding] }, - { no: 6, name: "json_format", kind: "enum", opt: true, T: () => ["google.protobuf.FeatureSet.JsonFormat", FeatureSet_JsonFormat] } - ]); - } - create(value?: PartialMessage): FeatureSet { - const message = globalThis.Object.create((this.messagePrototype!)); - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FeatureSet): FeatureSet { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* optional google.protobuf.FeatureSet.FieldPresence field_presence */ 1: - message.fieldPresence = reader.int32(); - break; - case /* optional google.protobuf.FeatureSet.EnumType enum_type */ 2: - message.enumType = reader.int32(); - break; - case /* optional google.protobuf.FeatureSet.RepeatedFieldEncoding repeated_field_encoding */ 3: - message.repeatedFieldEncoding = reader.int32(); - break; - case /* optional google.protobuf.FeatureSet.Utf8Validation utf8_validation */ 4: - message.utf8Validation = reader.int32(); - break; - case /* optional google.protobuf.FeatureSet.MessageEncoding message_encoding */ 5: - message.messageEncoding = reader.int32(); - break; - case /* optional google.protobuf.FeatureSet.JsonFormat json_format */ 6: - message.jsonFormat = reader.int32(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: FeatureSet, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* optional google.protobuf.FeatureSet.FieldPresence field_presence = 1; */ - if (message.fieldPresence !== undefined) - writer.tag(1, WireType.Varint).int32(message.fieldPresence); - /* optional google.protobuf.FeatureSet.EnumType enum_type = 2; */ - if (message.enumType !== undefined) - writer.tag(2, WireType.Varint).int32(message.enumType); - /* optional google.protobuf.FeatureSet.RepeatedFieldEncoding repeated_field_encoding = 3; */ - if (message.repeatedFieldEncoding !== undefined) - writer.tag(3, WireType.Varint).int32(message.repeatedFieldEncoding); - /* optional google.protobuf.FeatureSet.Utf8Validation utf8_validation = 4; */ - if (message.utf8Validation !== undefined) - writer.tag(4, WireType.Varint).int32(message.utf8Validation); - /* optional google.protobuf.FeatureSet.MessageEncoding message_encoding = 5; */ - if (message.messageEncoding !== undefined) - writer.tag(5, WireType.Varint).int32(message.messageEncoding); - /* optional google.protobuf.FeatureSet.JsonFormat json_format = 6; */ - if (message.jsonFormat !== undefined) - writer.tag(6, WireType.Varint).int32(message.jsonFormat); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message google.protobuf.FeatureSet - */ -export const FeatureSet = new FeatureSet$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class FeatureSetDefaults$Type extends MessageType { - constructor() { - super("google.protobuf.FeatureSetDefaults", [ - { no: 1, name: "defaults", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => FeatureSetDefaults_FeatureSetEditionDefault }, - { no: 4, name: "minimum_edition", kind: "enum", opt: true, T: () => ["google.protobuf.Edition", Edition] }, - { no: 5, name: "maximum_edition", kind: "enum", opt: true, T: () => ["google.protobuf.Edition", Edition] } - ]); - } - create(value?: PartialMessage): FeatureSetDefaults { - const message = globalThis.Object.create((this.messagePrototype!)); - message.defaults = []; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FeatureSetDefaults): FeatureSetDefaults { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* repeated google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault defaults */ 1: - message.defaults.push(FeatureSetDefaults_FeatureSetEditionDefault.internalBinaryRead(reader, reader.uint32(), options)); - break; - case /* optional google.protobuf.Edition minimum_edition */ 4: - message.minimumEdition = reader.int32(); - break; - case /* optional google.protobuf.Edition maximum_edition */ 5: - message.maximumEdition = reader.int32(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: FeatureSetDefaults, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* repeated google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault defaults = 1; */ - for (let i = 0; i < message.defaults.length; i++) - FeatureSetDefaults_FeatureSetEditionDefault.internalBinaryWrite(message.defaults[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join(); - /* optional google.protobuf.Edition minimum_edition = 4; */ - if (message.minimumEdition !== undefined) - writer.tag(4, WireType.Varint).int32(message.minimumEdition); - /* optional google.protobuf.Edition maximum_edition = 5; */ - if (message.maximumEdition !== undefined) - writer.tag(5, WireType.Varint).int32(message.maximumEdition); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message google.protobuf.FeatureSetDefaults - */ -export const FeatureSetDefaults = new FeatureSetDefaults$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class FeatureSetDefaults_FeatureSetEditionDefault$Type extends MessageType { - constructor() { - super("google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault", [ - { no: 3, name: "edition", kind: "enum", opt: true, T: () => ["google.protobuf.Edition", Edition] }, - { no: 2, name: "features", kind: "message", T: () => FeatureSet } - ]); - } - create(value?: PartialMessage): FeatureSetDefaults_FeatureSetEditionDefault { - const message = globalThis.Object.create((this.messagePrototype!)); - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FeatureSetDefaults_FeatureSetEditionDefault): FeatureSetDefaults_FeatureSetEditionDefault { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* optional google.protobuf.Edition edition */ 3: - message.edition = reader.int32(); - break; - case /* optional google.protobuf.FeatureSet features */ 2: - message.features = FeatureSet.internalBinaryRead(reader, reader.uint32(), options, message.features); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: FeatureSetDefaults_FeatureSetEditionDefault, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* optional google.protobuf.Edition edition = 3; */ - if (message.edition !== undefined) - writer.tag(3, WireType.Varint).int32(message.edition); - /* optional google.protobuf.FeatureSet features = 2; */ - if (message.features) - FeatureSet.internalBinaryWrite(message.features, writer.tag(2, WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - */ -export const FeatureSetDefaults_FeatureSetEditionDefault = new FeatureSetDefaults_FeatureSetEditionDefault$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class SourceCodeInfo$Type extends MessageType { - constructor() { - super("google.protobuf.SourceCodeInfo", [ - { no: 1, name: "location", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => SourceCodeInfo_Location } - ]); - } - create(value?: PartialMessage): SourceCodeInfo { - const message = globalThis.Object.create((this.messagePrototype!)); - message.location = []; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SourceCodeInfo): SourceCodeInfo { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* repeated google.protobuf.SourceCodeInfo.Location location */ 1: - message.location.push(SourceCodeInfo_Location.internalBinaryRead(reader, reader.uint32(), options)); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: SourceCodeInfo, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* repeated google.protobuf.SourceCodeInfo.Location location = 1; */ - for (let i = 0; i < message.location.length; i++) - SourceCodeInfo_Location.internalBinaryWrite(message.location[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message google.protobuf.SourceCodeInfo - */ -export const SourceCodeInfo = new SourceCodeInfo$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class SourceCodeInfo_Location$Type extends MessageType { - constructor() { - super("google.protobuf.SourceCodeInfo.Location", [ - { no: 1, name: "path", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 5 /*ScalarType.INT32*/ }, - { no: 2, name: "span", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 5 /*ScalarType.INT32*/ }, - { no: 3, name: "leading_comments", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, - { no: 4, name: "trailing_comments", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, - { no: 6, name: "leading_detached_comments", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ } - ]); - } - create(value?: PartialMessage): SourceCodeInfo_Location { - const message = globalThis.Object.create((this.messagePrototype!)); - message.path = []; - message.span = []; - message.leadingDetachedComments = []; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SourceCodeInfo_Location): SourceCodeInfo_Location { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* repeated int32 path = 1 [packed = true];*/ 1: - if (wireType === WireType.LengthDelimited) - for (let e = reader.int32() + reader.pos; reader.pos < e;) - message.path.push(reader.int32()); - else - message.path.push(reader.int32()); - break; - case /* repeated int32 span = 2 [packed = true];*/ 2: - if (wireType === WireType.LengthDelimited) - for (let e = reader.int32() + reader.pos; reader.pos < e;) - message.span.push(reader.int32()); - else - message.span.push(reader.int32()); - break; - case /* optional string leading_comments */ 3: - message.leadingComments = reader.string(); - break; - case /* optional string trailing_comments */ 4: - message.trailingComments = reader.string(); - break; - case /* repeated string leading_detached_comments */ 6: - message.leadingDetachedComments.push(reader.string()); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: SourceCodeInfo_Location, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* repeated int32 path = 1 [packed = true]; */ - if (message.path.length) { - writer.tag(1, WireType.LengthDelimited).fork(); - for (let i = 0; i < message.path.length; i++) - writer.int32(message.path[i]); - writer.join(); - } - /* repeated int32 span = 2 [packed = true]; */ - if (message.span.length) { - writer.tag(2, WireType.LengthDelimited).fork(); - for (let i = 0; i < message.span.length; i++) - writer.int32(message.span[i]); - writer.join(); - } - /* optional string leading_comments = 3; */ - if (message.leadingComments !== undefined) - writer.tag(3, WireType.LengthDelimited).string(message.leadingComments); - /* optional string trailing_comments = 4; */ - if (message.trailingComments !== undefined) - writer.tag(4, WireType.LengthDelimited).string(message.trailingComments); - /* repeated string leading_detached_comments = 6; */ - for (let i = 0; i < message.leadingDetachedComments.length; i++) - writer.tag(6, WireType.LengthDelimited).string(message.leadingDetachedComments[i]); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message google.protobuf.SourceCodeInfo.Location - */ -export const SourceCodeInfo_Location = new SourceCodeInfo_Location$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class GeneratedCodeInfo$Type extends MessageType { - constructor() { - super("google.protobuf.GeneratedCodeInfo", [ - { no: 1, name: "annotation", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => GeneratedCodeInfo_Annotation } - ]); - } - create(value?: PartialMessage): GeneratedCodeInfo { - const message = globalThis.Object.create((this.messagePrototype!)); - message.annotation = []; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GeneratedCodeInfo): GeneratedCodeInfo { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* repeated google.protobuf.GeneratedCodeInfo.Annotation annotation */ 1: - message.annotation.push(GeneratedCodeInfo_Annotation.internalBinaryRead(reader, reader.uint32(), options)); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: GeneratedCodeInfo, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* repeated google.protobuf.GeneratedCodeInfo.Annotation annotation = 1; */ - for (let i = 0; i < message.annotation.length; i++) - GeneratedCodeInfo_Annotation.internalBinaryWrite(message.annotation[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message google.protobuf.GeneratedCodeInfo - */ -export const GeneratedCodeInfo = new GeneratedCodeInfo$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class GeneratedCodeInfo_Annotation$Type extends MessageType { - constructor() { - super("google.protobuf.GeneratedCodeInfo.Annotation", [ - { no: 1, name: "path", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 5 /*ScalarType.INT32*/ }, - { no: 2, name: "source_file", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, - { no: 3, name: "begin", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ }, - { no: 4, name: "end", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ }, - { no: 5, name: "semantic", kind: "enum", opt: true, T: () => ["google.protobuf.GeneratedCodeInfo.Annotation.Semantic", GeneratedCodeInfo_Annotation_Semantic] } - ]); - } - create(value?: PartialMessage): GeneratedCodeInfo_Annotation { - const message = globalThis.Object.create((this.messagePrototype!)); - message.path = []; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GeneratedCodeInfo_Annotation): GeneratedCodeInfo_Annotation { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* repeated int32 path = 1 [packed = true];*/ 1: - if (wireType === WireType.LengthDelimited) - for (let e = reader.int32() + reader.pos; reader.pos < e;) - message.path.push(reader.int32()); - else - message.path.push(reader.int32()); - break; - case /* optional string source_file */ 2: - message.sourceFile = reader.string(); - break; - case /* optional int32 begin */ 3: - message.begin = reader.int32(); - break; - case /* optional int32 end */ 4: - message.end = reader.int32(); - break; - case /* optional google.protobuf.GeneratedCodeInfo.Annotation.Semantic semantic */ 5: - message.semantic = reader.int32(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: GeneratedCodeInfo_Annotation, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* repeated int32 path = 1 [packed = true]; */ - if (message.path.length) { - writer.tag(1, WireType.LengthDelimited).fork(); - for (let i = 0; i < message.path.length; i++) - writer.int32(message.path[i]); - writer.join(); - } - /* optional string source_file = 2; */ - if (message.sourceFile !== undefined) - writer.tag(2, WireType.LengthDelimited).string(message.sourceFile); - /* optional int32 begin = 3; */ - if (message.begin !== undefined) - writer.tag(3, WireType.Varint).int32(message.begin); - /* optional int32 end = 4; */ - if (message.end !== undefined) - writer.tag(4, WireType.Varint).int32(message.end); - /* optional google.protobuf.GeneratedCodeInfo.Annotation.Semantic semantic = 5; */ - if (message.semantic !== undefined) - writer.tag(5, WireType.Varint).int32(message.semantic); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message google.protobuf.GeneratedCodeInfo.Annotation - */ -export const GeneratedCodeInfo_Annotation = new GeneratedCodeInfo_Annotation$Type(); diff --git a/runner/src/generated/runner.client.ts b/runner/src/generated/runner.client.ts deleted file mode 100644 index 5764359e2..000000000 --- a/runner/src/generated/runner.client.ts +++ /dev/null @@ -1,76 +0,0 @@ -/* eslint-disable */ -// @generated by protobuf-ts 2.9.3 with parameter long_type_string,eslint_disable -// @generated from protobuf file "runner.proto" (package "spec", syntax proto3) -// tslint:disable -import type { RpcTransport } from "@protobuf-ts/runtime-rpc"; -import type { ServiceInfo } from "@protobuf-ts/runtime-rpc"; -import { Runner } from "./runner"; -import type { ListStreamsResponse } from "./runner"; -import type { ListStreamsRequest } from "./runner"; -import type { StopStreamResponse } from "./runner"; -import type { StopStreamRequest } from "./runner"; -import { stackIntercept } from "@protobuf-ts/runtime-rpc"; -import type { StartStreamResponse } from "./runner"; -import type { StartStreamRequest } from "./runner"; -import type { UnaryCall } from "@protobuf-ts/runtime-rpc"; -import type { RpcOptions } from "@protobuf-ts/runtime-rpc"; -/** - * @generated from protobuf service spec.Runner - */ -export interface IRunnerClient { - /** - * Starts a new Runner stream worker - * - * @generated from protobuf rpc: StartStream(spec.StartStreamRequest) returns (spec.StartStreamResponse); - */ - startStream(input: StartStreamRequest, options?: RpcOptions): UnaryCall; - /** - * Stops an existing Runner stream worker - * - * @generated from protobuf rpc: StopStream(spec.StopStreamRequest) returns (spec.StopStreamResponse); - */ - stopStream(input: StopStreamRequest, options?: RpcOptions): UnaryCall; - /** - * Lists all Runner stream workers - * - * @generated from protobuf rpc: ListStreams(spec.ListStreamsRequest) returns (spec.ListStreamsResponse); - */ - listStreams(input: ListStreamsRequest, options?: RpcOptions): UnaryCall; -} -/** - * @generated from protobuf service spec.Runner - */ -export class RunnerClient implements IRunnerClient, ServiceInfo { - typeName = Runner.typeName; - methods = Runner.methods; - options = Runner.options; - constructor(private readonly _transport: RpcTransport) { - } - /** - * Starts a new Runner stream worker - * - * @generated from protobuf rpc: StartStream(spec.StartStreamRequest) returns (spec.StartStreamResponse); - */ - startStream(input: StartStreamRequest, options?: RpcOptions): UnaryCall { - const method = this.methods[0], opt = this._transport.mergeOptions(options); - return stackIntercept("unary", this._transport, method, opt, input); - } - /** - * Stops an existing Runner stream worker - * - * @generated from protobuf rpc: StopStream(spec.StopStreamRequest) returns (spec.StopStreamResponse); - */ - stopStream(input: StopStreamRequest, options?: RpcOptions): UnaryCall { - const method = this.methods[1], opt = this._transport.mergeOptions(options); - return stackIntercept("unary", this._transport, method, opt, input); - } - /** - * Lists all Runner stream workers - * - * @generated from protobuf rpc: ListStreams(spec.ListStreamsRequest) returns (spec.ListStreamsResponse); - */ - listStreams(input: ListStreamsRequest, options?: RpcOptions): UnaryCall { - const method = this.methods[2], opt = this._transport.mergeOptions(options); - return stackIntercept("unary", this._transport, method, opt, input); - } -} diff --git a/runner/src/generated/runner.grpc-client.ts b/runner/src/generated/runner.grpc-client.ts deleted file mode 100644 index f3212d58c..000000000 --- a/runner/src/generated/runner.grpc-client.ts +++ /dev/null @@ -1,83 +0,0 @@ -/* eslint-disable */ -// @generated by protobuf-ts 2.9.3 with parameter long_type_string,eslint_disable -// @generated from protobuf file "runner.proto" (package "spec", syntax proto3) -// tslint:disable -import { Runner } from "./runner"; -import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; -import type { BinaryReadOptions } from "@protobuf-ts/runtime"; -import type { ListStreamsResponse } from "./runner"; -import type { ListStreamsRequest } from "./runner"; -import type { StopStreamResponse } from "./runner"; -import type { StopStreamRequest } from "./runner"; -import type { StartStreamResponse } from "./runner"; -import type { StartStreamRequest } from "./runner"; -import * as grpc from "@grpc/grpc-js"; -/** - * @generated from protobuf service spec.Runner - */ -export interface IRunnerClient { - /** - * Starts a new Runner stream worker - * - * @generated from protobuf rpc: StartStream(spec.StartStreamRequest) returns (spec.StartStreamResponse); - */ - startStream(input: StartStreamRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: StartStreamResponse) => void): grpc.ClientUnaryCall; - startStream(input: StartStreamRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: StartStreamResponse) => void): grpc.ClientUnaryCall; - startStream(input: StartStreamRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: StartStreamResponse) => void): grpc.ClientUnaryCall; - startStream(input: StartStreamRequest, callback: (err: grpc.ServiceError | null, value?: StartStreamResponse) => void): grpc.ClientUnaryCall; - /** - * Stops an existing Runner stream worker - * - * @generated from protobuf rpc: StopStream(spec.StopStreamRequest) returns (spec.StopStreamResponse); - */ - stopStream(input: StopStreamRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: StopStreamResponse) => void): grpc.ClientUnaryCall; - stopStream(input: StopStreamRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: StopStreamResponse) => void): grpc.ClientUnaryCall; - stopStream(input: StopStreamRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: StopStreamResponse) => void): grpc.ClientUnaryCall; - stopStream(input: StopStreamRequest, callback: (err: grpc.ServiceError | null, value?: StopStreamResponse) => void): grpc.ClientUnaryCall; - /** - * Lists all Runner stream workers - * - * @generated from protobuf rpc: ListStreams(spec.ListStreamsRequest) returns (spec.ListStreamsResponse); - */ - listStreams(input: ListStreamsRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: ListStreamsResponse) => void): grpc.ClientUnaryCall; - listStreams(input: ListStreamsRequest, metadata: grpc.Metadata, callback: (err: grpc.ServiceError | null, value?: ListStreamsResponse) => void): grpc.ClientUnaryCall; - listStreams(input: ListStreamsRequest, options: grpc.CallOptions, callback: (err: grpc.ServiceError | null, value?: ListStreamsResponse) => void): grpc.ClientUnaryCall; - listStreams(input: ListStreamsRequest, callback: (err: grpc.ServiceError | null, value?: ListStreamsResponse) => void): grpc.ClientUnaryCall; -} -/** - * @generated from protobuf service spec.Runner - */ -export class RunnerClient extends grpc.Client implements IRunnerClient { - private readonly _binaryOptions: Partial; - constructor(address: string, credentials: grpc.ChannelCredentials, options: grpc.ClientOptions = {}, binaryOptions: Partial = {}) { - super(address, credentials, options); - this._binaryOptions = binaryOptions; - } - /** - * Starts a new Runner stream worker - * - * @generated from protobuf rpc: StartStream(spec.StartStreamRequest) returns (spec.StartStreamResponse); - */ - startStream(input: StartStreamRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: StartStreamResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: StartStreamResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: StartStreamResponse) => void)): grpc.ClientUnaryCall { - const method = Runner.methods[0]; - return this.makeUnaryRequest(`/${Runner.typeName}/${method.name}`, (value: StartStreamRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): StartStreamResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any)); - } - /** - * Stops an existing Runner stream worker - * - * @generated from protobuf rpc: StopStream(spec.StopStreamRequest) returns (spec.StopStreamResponse); - */ - stopStream(input: StopStreamRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: StopStreamResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: StopStreamResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: StopStreamResponse) => void)): grpc.ClientUnaryCall { - const method = Runner.methods[1]; - return this.makeUnaryRequest(`/${Runner.typeName}/${method.name}`, (value: StopStreamRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): StopStreamResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any)); - } - /** - * Lists all Runner stream workers - * - * @generated from protobuf rpc: ListStreams(spec.ListStreamsRequest) returns (spec.ListStreamsResponse); - */ - listStreams(input: ListStreamsRequest, metadata: grpc.Metadata | grpc.CallOptions | ((err: grpc.ServiceError | null, value?: ListStreamsResponse) => void), options?: grpc.CallOptions | ((err: grpc.ServiceError | null, value?: ListStreamsResponse) => void), callback?: ((err: grpc.ServiceError | null, value?: ListStreamsResponse) => void)): grpc.ClientUnaryCall { - const method = Runner.methods[2]; - return this.makeUnaryRequest(`/${Runner.typeName}/${method.name}`, (value: ListStreamsRequest): Buffer => Buffer.from(method.I.toBinary(value, this._binaryOptions)), (value: Buffer): ListStreamsResponse => method.O.fromBinary(value, this._binaryOptions), input, (metadata as any), (options as any), (callback as any)); - } -} diff --git a/runner/src/generated/runner.grpc-server.ts b/runner/src/generated/runner.grpc-server.ts deleted file mode 100644 index 3770b94e9..000000000 --- a/runner/src/generated/runner.grpc-server.ts +++ /dev/null @@ -1,77 +0,0 @@ -/* eslint-disable */ -// @generated by protobuf-ts 2.9.3 with parameter long_type_string,eslint_disable -// @generated from protobuf file "runner.proto" (package "spec", syntax proto3) -// tslint:disable -import { ListStreamsResponse } from "./runner"; -import { ListStreamsRequest } from "./runner"; -import { StopStreamResponse } from "./runner"; -import { StopStreamRequest } from "./runner"; -import { StartStreamResponse } from "./runner"; -import { StartStreamRequest } from "./runner"; -import type * as grpc from "@grpc/grpc-js"; -/** - * @generated from protobuf service spec.Runner - */ -export interface IRunner extends grpc.UntypedServiceImplementation { - /** - * Starts a new Runner stream worker - * - * @generated from protobuf rpc: StartStream(spec.StartStreamRequest) returns (spec.StartStreamResponse); - */ - startStream: grpc.handleUnaryCall; - /** - * Stops an existing Runner stream worker - * - * @generated from protobuf rpc: StopStream(spec.StopStreamRequest) returns (spec.StopStreamResponse); - */ - stopStream: grpc.handleUnaryCall; - /** - * Lists all Runner stream workers - * - * @generated from protobuf rpc: ListStreams(spec.ListStreamsRequest) returns (spec.ListStreamsResponse); - */ - listStreams: grpc.handleUnaryCall; -} -/** - * @grpc/grpc-js definition for the protobuf service spec.Runner. - * - * Usage: Implement the interface IRunner and add to a grpc server. - * - * ```typescript - * const server = new grpc.Server(); - * const service: IRunner = ... - * server.addService(runnerDefinition, service); - * ``` - */ -export const runnerDefinition: grpc.ServiceDefinition = { - startStream: { - path: "/spec.Runner/StartStream", - originalName: "StartStream", - requestStream: false, - responseStream: false, - responseDeserialize: bytes => StartStreamResponse.fromBinary(bytes), - requestDeserialize: bytes => StartStreamRequest.fromBinary(bytes), - responseSerialize: value => Buffer.from(StartStreamResponse.toBinary(value)), - requestSerialize: value => Buffer.from(StartStreamRequest.toBinary(value)) - }, - stopStream: { - path: "/spec.Runner/StopStream", - originalName: "StopStream", - requestStream: false, - responseStream: false, - responseDeserialize: bytes => StopStreamResponse.fromBinary(bytes), - requestDeserialize: bytes => StopStreamRequest.fromBinary(bytes), - responseSerialize: value => Buffer.from(StopStreamResponse.toBinary(value)), - requestSerialize: value => Buffer.from(StopStreamRequest.toBinary(value)) - }, - listStreams: { - path: "/spec.Runner/ListStreams", - originalName: "ListStreams", - requestStream: false, - responseStream: false, - responseDeserialize: bytes => ListStreamsResponse.fromBinary(bytes), - requestDeserialize: bytes => ListStreamsRequest.fromBinary(bytes), - responseSerialize: value => Buffer.from(ListStreamsResponse.toBinary(value)), - requestSerialize: value => Buffer.from(ListStreamsRequest.toBinary(value)) - } -}; diff --git a/runner/src/generated/runner.ts b/runner/src/generated/runner.ts index 41c4635c9..38e3a613c 100644 --- a/runner/src/generated/runner.ts +++ b/runner/src/generated/runner.ts @@ -1,514 +1,22 @@ -/* eslint-disable */ -// @generated by protobuf-ts 2.9.3 with parameter long_type_string,eslint_disable -// @generated from protobuf file "runner.proto" (package "spec", syntax proto3) -// tslint:disable -import { ServiceType } from "@protobuf-ts/runtime-rpc"; -import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; -import type { IBinaryWriter } from "@protobuf-ts/runtime"; -import { WireType } from "@protobuf-ts/runtime"; -import type { BinaryReadOptions } from "@protobuf-ts/runtime"; -import type { IBinaryReader } from "@protobuf-ts/runtime"; -import { UnknownFieldHandler } from "@protobuf-ts/runtime"; -import type { PartialMessage } from "@protobuf-ts/runtime"; -import { reflectionMergePartial } from "@protobuf-ts/runtime"; -import { MessageType } from "@protobuf-ts/runtime"; -/** - * Start Stream Request - * - * @generated from protobuf message spec.StartStreamRequest - */ -export interface StartStreamRequest { - /** - * @generated from protobuf field: int64 start_block_height = 1; - */ - startBlockHeight: string; - /** - * @generated from protobuf field: string indexer_config = 2; - */ - indexerConfig: string; // JSON containing code, schema, etc. - /** - * @generated from protobuf field: string stream_id = 3; - */ - streamId: string; -} -/** - * Start Stream Response - * - * @generated from protobuf message spec.StartStreamResponse - */ -export interface StartStreamResponse { - /** - * @generated from protobuf field: string stream_id = 1; - */ - streamId: string; -} -/** - * Stop Stream Request - * - * @generated from protobuf message spec.StopStreamRequest - */ -export interface StopStreamRequest { - /** - * @generated from protobuf field: string stream_id = 1; - */ - streamId: string; -} -/** - * Stop Stream Response - * - * @generated from protobuf message spec.StopStreamResponse - */ -export interface StopStreamResponse { - /** - * @generated from protobuf field: string stream_id = 1; - */ - streamId: string; - /** - * @generated from protobuf field: string status = 2; - */ - status: string; -} -/** - * List Stream Request - * - * @generated from protobuf message spec.ListStreamsRequest - */ -export interface ListStreamsRequest { - /** - * @generated from protobuf field: string placeholder = 1; - */ - placeholder: string; -} -/** - * List Stream Response - * - * @generated from protobuf message spec.ListStreamsResponse - */ -export interface ListStreamsResponse { - /** - * List of all streams, including stopped or crashed ones - * - * @generated from protobuf field: repeated spec.StreamInfo streams = 1; - */ - streams: StreamInfo[]; -} -/** - * Information about a single BlockStream instance. - * - * @generated from protobuf message spec.StreamInfo - */ -export interface StreamInfo { - /** - * @generated from protobuf field: string stream_id = 1; - */ - streamId: string; - /** - * @generated from protobuf field: int64 start_block_height = 2; - */ - startBlockHeight: string; - /** - * @generated from protobuf field: string indexer_name = 3; - */ - indexerName: string; - /** - * @generated from protobuf field: string chain_id = 4; - */ - chainId: string; - /** - * @generated from protobuf field: string status = 5; - */ - status: string; -} -// @generated message type with reflection information, may provide speed optimized methods -class StartStreamRequest$Type extends MessageType { - constructor() { - super("spec.StartStreamRequest", [ - { no: 1, name: "start_block_height", kind: "scalar", T: 3 /*ScalarType.INT64*/ }, - { no: 2, name: "indexer_config", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 3, name: "stream_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ } - ]); - } - create(value?: PartialMessage): StartStreamRequest { - const message = globalThis.Object.create((this.messagePrototype!)); - message.startBlockHeight = "0"; - message.indexerConfig = ""; - message.streamId = ""; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: StartStreamRequest): StartStreamRequest { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* int64 start_block_height */ 1: - message.startBlockHeight = reader.int64().toString(); - break; - case /* string indexer_config */ 2: - message.indexerConfig = reader.string(); - break; - case /* string stream_id */ 3: - message.streamId = reader.string(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: StartStreamRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* int64 start_block_height = 1; */ - if (message.startBlockHeight !== "0") - writer.tag(1, WireType.Varint).int64(message.startBlockHeight); - /* string indexer_config = 2; */ - if (message.indexerConfig !== "") - writer.tag(2, WireType.LengthDelimited).string(message.indexerConfig); - /* string stream_id = 3; */ - if (message.streamId !== "") - writer.tag(3, WireType.LengthDelimited).string(message.streamId); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message spec.StartStreamRequest - */ -export const StartStreamRequest = new StartStreamRequest$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class StartStreamResponse$Type extends MessageType { - constructor() { - super("spec.StartStreamResponse", [ - { no: 1, name: "stream_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ } - ]); - } - create(value?: PartialMessage): StartStreamResponse { - const message = globalThis.Object.create((this.messagePrototype!)); - message.streamId = ""; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: StartStreamResponse): StartStreamResponse { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* string stream_id */ 1: - message.streamId = reader.string(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: StartStreamResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* string stream_id = 1; */ - if (message.streamId !== "") - writer.tag(1, WireType.LengthDelimited).string(message.streamId); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message spec.StartStreamResponse - */ -export const StartStreamResponse = new StartStreamResponse$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class StopStreamRequest$Type extends MessageType { - constructor() { - super("spec.StopStreamRequest", [ - { no: 1, name: "stream_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ } - ]); - } - create(value?: PartialMessage): StopStreamRequest { - const message = globalThis.Object.create((this.messagePrototype!)); - message.streamId = ""; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: StopStreamRequest): StopStreamRequest { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* string stream_id */ 1: - message.streamId = reader.string(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: StopStreamRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* string stream_id = 1; */ - if (message.streamId !== "") - writer.tag(1, WireType.LengthDelimited).string(message.streamId); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message spec.StopStreamRequest - */ -export const StopStreamRequest = new StopStreamRequest$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class StopStreamResponse$Type extends MessageType { - constructor() { - super("spec.StopStreamResponse", [ - { no: 1, name: "stream_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 2, name: "status", kind: "scalar", T: 9 /*ScalarType.STRING*/ } - ]); - } - create(value?: PartialMessage): StopStreamResponse { - const message = globalThis.Object.create((this.messagePrototype!)); - message.streamId = ""; - message.status = ""; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: StopStreamResponse): StopStreamResponse { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* string stream_id */ 1: - message.streamId = reader.string(); - break; - case /* string status */ 2: - message.status = reader.string(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: StopStreamResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* string stream_id = 1; */ - if (message.streamId !== "") - writer.tag(1, WireType.LengthDelimited).string(message.streamId); - /* string status = 2; */ - if (message.status !== "") - writer.tag(2, WireType.LengthDelimited).string(message.status); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message spec.StopStreamResponse - */ -export const StopStreamResponse = new StopStreamResponse$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class ListStreamsRequest$Type extends MessageType { - constructor() { - super("spec.ListStreamsRequest", [ - { no: 1, name: "placeholder", kind: "scalar", T: 9 /*ScalarType.STRING*/ } - ]); - } - create(value?: PartialMessage): ListStreamsRequest { - const message = globalThis.Object.create((this.messagePrototype!)); - message.placeholder = ""; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListStreamsRequest): ListStreamsRequest { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* string placeholder */ 1: - message.placeholder = reader.string(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: ListStreamsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* string placeholder = 1; */ - if (message.placeholder !== "") - writer.tag(1, WireType.LengthDelimited).string(message.placeholder); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message spec.ListStreamsRequest - */ -export const ListStreamsRequest = new ListStreamsRequest$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class ListStreamsResponse$Type extends MessageType { - constructor() { - super("spec.ListStreamsResponse", [ - { no: 1, name: "streams", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => StreamInfo } - ]); - } - create(value?: PartialMessage): ListStreamsResponse { - const message = globalThis.Object.create((this.messagePrototype!)); - message.streams = []; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListStreamsResponse): ListStreamsResponse { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* repeated spec.StreamInfo streams */ 1: - message.streams.push(StreamInfo.internalBinaryRead(reader, reader.uint32(), options)); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: ListStreamsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* repeated spec.StreamInfo streams = 1; */ - for (let i = 0; i < message.streams.length; i++) - StreamInfo.internalBinaryWrite(message.streams[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join(); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message spec.ListStreamsResponse - */ -export const ListStreamsResponse = new ListStreamsResponse$Type(); -// @generated message type with reflection information, may provide speed optimized methods -class StreamInfo$Type extends MessageType { - constructor() { - super("spec.StreamInfo", [ - { no: 1, name: "stream_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 2, name: "start_block_height", kind: "scalar", T: 3 /*ScalarType.INT64*/ }, - { no: 3, name: "indexer_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 4, name: "chain_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, - { no: 5, name: "status", kind: "scalar", T: 9 /*ScalarType.STRING*/ } - ]); - } - create(value?: PartialMessage): StreamInfo { - const message = globalThis.Object.create((this.messagePrototype!)); - message.streamId = ""; - message.startBlockHeight = "0"; - message.indexerName = ""; - message.chainId = ""; - message.status = ""; - if (value !== undefined) - reflectionMergePartial(this, message, value); - return message; - } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: StreamInfo): StreamInfo { - let message = target ?? this.create(), end = reader.pos + length; - while (reader.pos < end) { - let [fieldNo, wireType] = reader.tag(); - switch (fieldNo) { - case /* string stream_id */ 1: - message.streamId = reader.string(); - break; - case /* int64 start_block_height */ 2: - message.startBlockHeight = reader.int64().toString(); - break; - case /* string indexer_name */ 3: - message.indexerName = reader.string(); - break; - case /* string chain_id */ 4: - message.chainId = reader.string(); - break; - case /* string status */ 5: - message.status = reader.string(); - break; - default: - let u = options.readUnknownField; - if (u === "throw") - throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`); - let d = reader.skip(wireType); - if (u !== false) - (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d); - } - } - return message; - } - internalBinaryWrite(message: StreamInfo, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { - /* string stream_id = 1; */ - if (message.streamId !== "") - writer.tag(1, WireType.LengthDelimited).string(message.streamId); - /* int64 start_block_height = 2; */ - if (message.startBlockHeight !== "0") - writer.tag(2, WireType.Varint).int64(message.startBlockHeight); - /* string indexer_name = 3; */ - if (message.indexerName !== "") - writer.tag(3, WireType.LengthDelimited).string(message.indexerName); - /* string chain_id = 4; */ - if (message.chainId !== "") - writer.tag(4, WireType.LengthDelimited).string(message.chainId); - /* string status = 5; */ - if (message.status !== "") - writer.tag(5, WireType.LengthDelimited).string(message.status); - let u = options.writeUnknownFields; - if (u !== false) - (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); - return writer; - } -} -/** - * @generated MessageType for protobuf message spec.StreamInfo - */ -export const StreamInfo = new StreamInfo$Type(); -/** - * @generated ServiceType for protobuf service spec.Runner - */ -export const Runner = new ServiceType("spec.Runner", [ - { name: "StartStream", options: {}, I: StartStreamRequest, O: StartStreamResponse }, - { name: "StopStream", options: {}, I: StopStreamRequest, O: StopStreamResponse }, - { name: "ListStreams", options: {}, I: ListStreamsRequest, O: ListStreamsResponse } -], { "ts.server": ["GRPC1_SERVER"] }); +import type * as grpc from '@grpc/grpc-js'; +import type { MessageTypeDefinition } from '@grpc/proto-loader'; + +import type { RunnerClient as _spec_RunnerClient, RunnerDefinition as _spec_RunnerDefinition } from './spec/Runner'; + +type SubtypeConstructor any, Subtype> = { + new(...args: ConstructorParameters): Subtype; +}; + +export interface ProtoGrpcType { + spec: { + ListStreamsRequest: MessageTypeDefinition + ListStreamsResponse: MessageTypeDefinition + Runner: SubtypeConstructor & { service: _spec_RunnerDefinition } + StartStreamRequest: MessageTypeDefinition + StartStreamResponse: MessageTypeDefinition + StopStreamRequest: MessageTypeDefinition + StopStreamResponse: MessageTypeDefinition + StreamInfo: MessageTypeDefinition + } +} + diff --git a/runner/src/generated/spec/ListStreamsRequest.ts b/runner/src/generated/spec/ListStreamsRequest.ts new file mode 100644 index 000000000..94280735b --- /dev/null +++ b/runner/src/generated/spec/ListStreamsRequest.ts @@ -0,0 +1,8 @@ +// Original file: protos/runner.proto + + +export interface ListStreamsRequest { +} + +export interface ListStreamsRequest__Output { +} diff --git a/runner/src/generated/spec/ListStreamsResponse.ts b/runner/src/generated/spec/ListStreamsResponse.ts new file mode 100644 index 000000000..770aae25f --- /dev/null +++ b/runner/src/generated/spec/ListStreamsResponse.ts @@ -0,0 +1,11 @@ +// Original file: protos/runner.proto + +import type { StreamInfo as _spec_StreamInfo, StreamInfo__Output as _spec_StreamInfo__Output } from '../spec/StreamInfo'; + +export interface ListStreamsResponse { + 'streams'?: (_spec_StreamInfo)[]; +} + +export interface ListStreamsResponse__Output { + 'streams': (_spec_StreamInfo__Output)[]; +} diff --git a/runner/src/generated/spec/Runner.ts b/runner/src/generated/spec/Runner.ts new file mode 100644 index 000000000..ae87a7446 --- /dev/null +++ b/runner/src/generated/spec/Runner.ts @@ -0,0 +1,55 @@ +// Original file: protos/runner.proto + +import type * as grpc from '@grpc/grpc-js' +import type { MethodDefinition } from '@grpc/proto-loader' +import type { ListStreamsRequest as _spec_ListStreamsRequest, ListStreamsRequest__Output as _spec_ListStreamsRequest__Output } from '../spec/ListStreamsRequest'; +import type { ListStreamsResponse as _spec_ListStreamsResponse, ListStreamsResponse__Output as _spec_ListStreamsResponse__Output } from '../spec/ListStreamsResponse'; +import type { StartStreamRequest as _spec_StartStreamRequest, StartStreamRequest__Output as _spec_StartStreamRequest__Output } from '../spec/StartStreamRequest'; +import type { StartStreamResponse as _spec_StartStreamResponse, StartStreamResponse__Output as _spec_StartStreamResponse__Output } from '../spec/StartStreamResponse'; +import type { StopStreamRequest as _spec_StopStreamRequest, StopStreamRequest__Output as _spec_StopStreamRequest__Output } from '../spec/StopStreamRequest'; +import type { StopStreamResponse as _spec_StopStreamResponse, StopStreamResponse__Output as _spec_StopStreamResponse__Output } from '../spec/StopStreamResponse'; + +export interface RunnerClient extends grpc.Client { + ListStreams(argument: _spec_ListStreamsRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_spec_ListStreamsResponse__Output>): grpc.ClientUnaryCall; + ListStreams(argument: _spec_ListStreamsRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_spec_ListStreamsResponse__Output>): grpc.ClientUnaryCall; + ListStreams(argument: _spec_ListStreamsRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_spec_ListStreamsResponse__Output>): grpc.ClientUnaryCall; + ListStreams(argument: _spec_ListStreamsRequest, callback: grpc.requestCallback<_spec_ListStreamsResponse__Output>): grpc.ClientUnaryCall; + listStreams(argument: _spec_ListStreamsRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_spec_ListStreamsResponse__Output>): grpc.ClientUnaryCall; + listStreams(argument: _spec_ListStreamsRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_spec_ListStreamsResponse__Output>): grpc.ClientUnaryCall; + listStreams(argument: _spec_ListStreamsRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_spec_ListStreamsResponse__Output>): grpc.ClientUnaryCall; + listStreams(argument: _spec_ListStreamsRequest, callback: grpc.requestCallback<_spec_ListStreamsResponse__Output>): grpc.ClientUnaryCall; + + StartStream(argument: _spec_StartStreamRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_spec_StartStreamResponse__Output>): grpc.ClientUnaryCall; + StartStream(argument: _spec_StartStreamRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_spec_StartStreamResponse__Output>): grpc.ClientUnaryCall; + StartStream(argument: _spec_StartStreamRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_spec_StartStreamResponse__Output>): grpc.ClientUnaryCall; + StartStream(argument: _spec_StartStreamRequest, callback: grpc.requestCallback<_spec_StartStreamResponse__Output>): grpc.ClientUnaryCall; + startStream(argument: _spec_StartStreamRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_spec_StartStreamResponse__Output>): grpc.ClientUnaryCall; + startStream(argument: _spec_StartStreamRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_spec_StartStreamResponse__Output>): grpc.ClientUnaryCall; + startStream(argument: _spec_StartStreamRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_spec_StartStreamResponse__Output>): grpc.ClientUnaryCall; + startStream(argument: _spec_StartStreamRequest, callback: grpc.requestCallback<_spec_StartStreamResponse__Output>): grpc.ClientUnaryCall; + + StopStream(argument: _spec_StopStreamRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_spec_StopStreamResponse__Output>): grpc.ClientUnaryCall; + StopStream(argument: _spec_StopStreamRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_spec_StopStreamResponse__Output>): grpc.ClientUnaryCall; + StopStream(argument: _spec_StopStreamRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_spec_StopStreamResponse__Output>): grpc.ClientUnaryCall; + StopStream(argument: _spec_StopStreamRequest, callback: grpc.requestCallback<_spec_StopStreamResponse__Output>): grpc.ClientUnaryCall; + stopStream(argument: _spec_StopStreamRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_spec_StopStreamResponse__Output>): grpc.ClientUnaryCall; + stopStream(argument: _spec_StopStreamRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_spec_StopStreamResponse__Output>): grpc.ClientUnaryCall; + stopStream(argument: _spec_StopStreamRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_spec_StopStreamResponse__Output>): grpc.ClientUnaryCall; + stopStream(argument: _spec_StopStreamRequest, callback: grpc.requestCallback<_spec_StopStreamResponse__Output>): grpc.ClientUnaryCall; + +} + +export interface RunnerHandlers extends grpc.UntypedServiceImplementation { + ListStreams: grpc.handleUnaryCall<_spec_ListStreamsRequest__Output, _spec_ListStreamsResponse>; + + StartStream: grpc.handleUnaryCall<_spec_StartStreamRequest__Output, _spec_StartStreamResponse>; + + StopStream: grpc.handleUnaryCall<_spec_StopStreamRequest__Output, _spec_StopStreamResponse>; + +} + +export interface RunnerDefinition extends grpc.ServiceDefinition { + ListStreams: MethodDefinition<_spec_ListStreamsRequest, _spec_ListStreamsResponse, _spec_ListStreamsRequest__Output, _spec_ListStreamsResponse__Output> + StartStream: MethodDefinition<_spec_StartStreamRequest, _spec_StartStreamResponse, _spec_StartStreamRequest__Output, _spec_StartStreamResponse__Output> + StopStream: MethodDefinition<_spec_StopStreamRequest, _spec_StopStreamResponse, _spec_StopStreamRequest__Output, _spec_StopStreamResponse__Output> +} diff --git a/runner/src/generated/spec/StartStreamRequest.ts b/runner/src/generated/spec/StartStreamRequest.ts new file mode 100644 index 000000000..eb9b874f5 --- /dev/null +++ b/runner/src/generated/spec/StartStreamRequest.ts @@ -0,0 +1,15 @@ +// Original file: protos/runner.proto + +import type { Long } from '@grpc/proto-loader'; + +export interface StartStreamRequest { + 'startBlockHeight'?: (number | string | Long); + 'indexerConfig'?: (string); + 'streamId'?: (string); +} + +export interface StartStreamRequest__Output { + 'startBlockHeight': (string); + 'indexerConfig': (string); + 'streamId': (string); +} diff --git a/runner/src/generated/spec/StartStreamResponse.ts b/runner/src/generated/spec/StartStreamResponse.ts new file mode 100644 index 000000000..21f78c715 --- /dev/null +++ b/runner/src/generated/spec/StartStreamResponse.ts @@ -0,0 +1,10 @@ +// Original file: protos/runner.proto + + +export interface StartStreamResponse { + 'streamId'?: (string); +} + +export interface StartStreamResponse__Output { + 'streamId': (string); +} diff --git a/runner/src/generated/spec/StopStreamRequest.ts b/runner/src/generated/spec/StopStreamRequest.ts new file mode 100644 index 000000000..96e978d6a --- /dev/null +++ b/runner/src/generated/spec/StopStreamRequest.ts @@ -0,0 +1,10 @@ +// Original file: protos/runner.proto + + +export interface StopStreamRequest { + 'streamId'?: (string); +} + +export interface StopStreamRequest__Output { + 'streamId': (string); +} diff --git a/runner/src/generated/spec/StopStreamResponse.ts b/runner/src/generated/spec/StopStreamResponse.ts new file mode 100644 index 000000000..eb88ded70 --- /dev/null +++ b/runner/src/generated/spec/StopStreamResponse.ts @@ -0,0 +1,12 @@ +// Original file: protos/runner.proto + + +export interface StopStreamResponse { + 'streamId'?: (string); + 'status'?: (string); +} + +export interface StopStreamResponse__Output { + 'streamId': (string); + 'status': (string); +} diff --git a/runner/src/generated/spec/StreamInfo.ts b/runner/src/generated/spec/StreamInfo.ts new file mode 100644 index 000000000..ae99db48b --- /dev/null +++ b/runner/src/generated/spec/StreamInfo.ts @@ -0,0 +1,19 @@ +// Original file: protos/runner.proto + +import type { Long } from '@grpc/proto-loader'; + +export interface StreamInfo { + 'streamId'?: (string); + 'startBlockHeight'?: (number | string | Long); + 'indexerName'?: (string); + 'chainId'?: (string); + 'status'?: (string); +} + +export interface StreamInfo__Output { + 'streamId': (string); + 'startBlockHeight': (string); + 'indexerName': (string); + 'chainId': (string); + 'status': (string); +} diff --git a/runner/src/generated/tsconfig.json b/runner/src/generated/tsconfig.json deleted file mode 100644 index 63ada6819..000000000 --- a/runner/src/generated/tsconfig.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "noUnusedParameters": false - }, - "include": [ - "**/*" - ] - } \ No newline at end of file diff --git a/runner/src/index.ts b/runner/src/index.ts index 90ec2dc28..1c1c12b09 100644 --- a/runner/src/index.ts +++ b/runner/src/index.ts @@ -2,6 +2,8 @@ import { startServer as startMetricsServer } from './metrics'; import RedisClient from './redis-client'; import StreamHandler from './stream-handler'; import startServer from './service/runner-server'; +import RunnerClient from './service/runner-client'; + const STREAM_HANDLER_THROTTLE_MS = 500; @@ -20,6 +22,20 @@ void (async function main () { const streamHandlers: StreamHandlers = {}; while (true) { + RunnerClient.startStream({ streamId: 'test' }, (err, res) => { + if (err) { + console.error(`Error: ${err.message}`); + } else { + console.log('Response:', res); + } + }); + RunnerClient.listStreams({}, (err, res) => { + if (err) { + console.error(`Error: ${err.message}`); + } else { + console.log('Response:', res); + } + }); const streamKeys = await redisClient.getStreams(); streamKeys.forEach((streamKey) => { diff --git a/runner/src/service/runner-client.ts b/runner/src/service/runner-client.ts new file mode 100644 index 000000000..6deb61904 --- /dev/null +++ b/runner/src/service/runner-client.ts @@ -0,0 +1,14 @@ +import * as grpc from '@grpc/grpc-js'; +import * as protoLoader from '@grpc/proto-loader'; +import { ProtoGrpcType } from '../generated/runner'; +import { RunnerClient } from '../generated/spec/Runner'; + +const PROTO_PATH = 'protos/runner.proto'; + +const packageDefinition = protoLoader.loadSync(PROTO_PATH); +const runner = (grpc.loadPackageDefinition( + packageDefinition + ) as unknown) as ProtoGrpcType; +const RunnerClient: RunnerClient = new runner.spec.Runner('localhost:50007', grpc.credentials.createInsecure()); + +export default RunnerClient; diff --git a/runner/src/service/runner-server.ts b/runner/src/service/runner-server.ts index c709d9bfd..39a201c1d 100644 --- a/runner/src/service/runner-server.ts +++ b/runner/src/service/runner-server.ts @@ -1,11 +1,20 @@ import * as grpc from '@grpc/grpc-js'; +import * as protoLoader from '@grpc/proto-loader'; import RunnerService from './runner-service'; -import { runnerDefinition } from '../generated/runner.grpc-server'; +import { type ProtoGrpcType } from '../generated/runner'; + +const PROTO_PATH = 'protos/runner.proto'; export default function startServer (): grpc.Server { + const packageDefinition = protoLoader.loadSync(PROTO_PATH); + const runnerProto = (grpc.loadPackageDefinition( + packageDefinition + ) as unknown) as ProtoGrpcType; + const server = new grpc.Server(); - server.addService(runnerDefinition, RunnerService); + server.addService(runnerProto.spec.Runner.service, RunnerService); const credentials = grpc.ServerCredentials; + server.bindAsync( '0.0.0.0:50007', // TODO: Read port from ENV credentials.createInsecure(), diff --git a/runner/src/service/runner-service.ts b/runner/src/service/runner-service.ts index 95a493888..dfc54d01a 100644 --- a/runner/src/service/runner-service.ts +++ b/runner/src/service/runner-service.ts @@ -1,31 +1,39 @@ import { type ServerUnaryCall, type sendUnaryData } from '@grpc/grpc-js'; -import { type IRunner } from '../generated/runner.grpc-server'; -import { type StartStreamRequest, StartStreamResponse, type StopStreamRequest, StopStreamResponse, type ListStreamsRequest, ListStreamsResponse } from '../generated/runner'; +import { type RunnerHandlers } from '../generated/spec/Runner'; +import { type StartStreamResponse } from '../generated/spec/StartStreamResponse'; +import { type StartStreamRequest } from '../generated/spec/StartStreamRequest'; +import { type StopStreamRequest } from '../generated/spec/StopStreamRequest'; +import { type StopStreamResponse } from '../generated/spec/StopStreamResponse'; +import { type ListStreamsRequest } from '../generated/spec/ListStreamsRequest'; +import { type ListStreamsResponse } from '../generated/spec/ListStreamsResponse'; + +// import { type IRunner } from '../generated/runner.grpc-server'; +// import { type StartStreamRequest, StartStreamResponse, type StopStreamRequest, StopStreamResponse, type ListStreamsRequest, ListStreamsResponse } from '../generated/runner'; const streams = new Set(); -const RunnerService: IRunner = { - startStream (call: ServerUnaryCall, callback: sendUnaryData): void { +const RunnerService: RunnerHandlers = { + StartStream (call: ServerUnaryCall, callback: sendUnaryData): void { const newStream = call.request.streamId; - streams.add(newStream); - callback(null, StartStreamResponse.create({ streamId: newStream })); + streams.add((newStream ?? 'default') + Math.random().toString()); + callback(null, { streamId: newStream }); }, - stopStream (call: ServerUnaryCall, callback: sendUnaryData): void { + StopStream (call: ServerUnaryCall, callback: sendUnaryData): void { // implementation const streamToRemove = call.request.streamId; - streams.delete(streamToRemove); - callback(null, StopStreamResponse.create({ status: 'OK', streamId: streamToRemove })); + streams.delete(streamToRemove ?? 'default'); + callback(null, { status: 'OK', streamId: streamToRemove }); }, - listStreams (call: ServerUnaryCall, callback: sendUnaryData): void { + ListStreams (call: ServerUnaryCall, callback: sendUnaryData): void { // implementation console.log(call); - callback(null, ListStreamsResponse.create({ + callback(null, { streams: Array.from(streams).map(stream => { return { streamId: stream }; }) - })); + }); } }; From d0b1db280d50f0bacf4d6b9c2413fc8b3d077574 Mon Sep 17 00:00:00 2001 From: Darun Seethammagari Date: Thu, 14 Dec 2023 12:36:34 -0800 Subject: [PATCH 03/18] Working server with actual stream handlers --- runner/protos/runner.proto | 6 +- .../src/generated/spec/StartStreamRequest.ts | 9 +- runner/src/index.ts | 19 +-- runner/src/service/runner-client.ts | 12 +- runner/src/service/runner-service.ts | 114 +++++++++++++++--- runner/src/stream-handler/stream-handler.ts | 4 + runner/src/test-client.ts | 32 +++++ 7 files changed, 148 insertions(+), 48 deletions(-) create mode 100644 runner/src/test-client.ts diff --git a/runner/protos/runner.proto b/runner/protos/runner.proto index 52b612f98..433d1e08f 100644 --- a/runner/protos/runner.proto +++ b/runner/protos/runner.proto @@ -14,9 +14,9 @@ service Runner { // Start Stream Request message StartStreamRequest { - int64 start_block_height = 1; - string indexer_config = 2; // JSON containing code, schema, etc. - string stream_id = 3; + string stream_id = 1; + string redis_stream = 2; + string indexer_config = 3; // JSON containing code, schema, etc. } // Start Stream Response diff --git a/runner/src/generated/spec/StartStreamRequest.ts b/runner/src/generated/spec/StartStreamRequest.ts index eb9b874f5..6f56d8864 100644 --- a/runner/src/generated/spec/StartStreamRequest.ts +++ b/runner/src/generated/spec/StartStreamRequest.ts @@ -1,15 +1,14 @@ // Original file: protos/runner.proto -import type { Long } from '@grpc/proto-loader'; export interface StartStreamRequest { - 'startBlockHeight'?: (number | string | Long); - 'indexerConfig'?: (string); 'streamId'?: (string); + 'redisStream'?: (string); + 'indexerConfig'?: (string); } export interface StartStreamRequest__Output { - 'startBlockHeight': (string); - 'indexerConfig': (string); 'streamId': (string); + 'redisStream': (string); + 'indexerConfig': (string); } diff --git a/runner/src/index.ts b/runner/src/index.ts index 1c1c12b09..dabc2b004 100644 --- a/runner/src/index.ts +++ b/runner/src/index.ts @@ -2,8 +2,6 @@ import { startServer as startMetricsServer } from './metrics'; import RedisClient from './redis-client'; import StreamHandler from './stream-handler'; import startServer from './service/runner-server'; -import RunnerClient from './service/runner-client'; - const STREAM_HANDLER_THROTTLE_MS = 500; @@ -22,21 +20,8 @@ void (async function main () { const streamHandlers: StreamHandlers = {}; while (true) { - RunnerClient.startStream({ streamId: 'test' }, (err, res) => { - if (err) { - console.error(`Error: ${err.message}`); - } else { - console.log('Response:', res); - } - }); - RunnerClient.listStreams({}, (err, res) => { - if (err) { - console.error(`Error: ${err.message}`); - } else { - console.log('Response:', res); - } - }); - const streamKeys = await redisClient.getStreams(); + // const streamKeys = await redisClient.getStreams(); + const streamKeys = ['darunrs.near/test_social_feed:real_time:stream']; streamKeys.forEach((streamKey) => { if (streamHandlers[streamKey] !== undefined) { diff --git a/runner/src/service/runner-client.ts b/runner/src/service/runner-client.ts index 6deb61904..ace98ba67 100644 --- a/runner/src/service/runner-client.ts +++ b/runner/src/service/runner-client.ts @@ -1,14 +1,12 @@ import * as grpc from '@grpc/grpc-js'; import * as protoLoader from '@grpc/proto-loader'; -import { ProtoGrpcType } from '../generated/runner'; -import { RunnerClient } from '../generated/spec/Runner'; +import { type ProtoGrpcType } from '../generated/runner'; +import { type RunnerClient } from '../generated/spec/Runner'; const PROTO_PATH = 'protos/runner.proto'; const packageDefinition = protoLoader.loadSync(PROTO_PATH); -const runner = (grpc.loadPackageDefinition( - packageDefinition - ) as unknown) as ProtoGrpcType; -const RunnerClient: RunnerClient = new runner.spec.Runner('localhost:50007', grpc.credentials.createInsecure()); +const runner = (grpc.loadPackageDefinition(packageDefinition) as unknown) as ProtoGrpcType; +const runnerClient: RunnerClient = new runner.spec.Runner('localhost:50007', grpc.credentials.createInsecure()); -export default RunnerClient; +export default runnerClient; diff --git a/runner/src/service/runner-service.ts b/runner/src/service/runner-service.ts index dfc54d01a..da25b6ad4 100644 --- a/runner/src/service/runner-service.ts +++ b/runner/src/service/runner-service.ts @@ -4,37 +4,119 @@ import { type StartStreamResponse } from '../generated/spec/StartStreamResponse' import { type StartStreamRequest } from '../generated/spec/StartStreamRequest'; import { type StopStreamRequest } from '../generated/spec/StopStreamRequest'; import { type StopStreamResponse } from '../generated/spec/StopStreamResponse'; -import { type ListStreamsRequest } from '../generated/spec/ListStreamsRequest'; +// import { type ListStreamsRequest } from '../generated/spec/ListStreamsRequest'; import { type ListStreamsResponse } from '../generated/spec/ListStreamsResponse'; +import StreamHandler from '../stream-handler'; +import * as grpc from '@grpc/grpc-js'; -// import { type IRunner } from '../generated/runner.grpc-server'; -// import { type StartStreamRequest, StartStreamResponse, type StopStreamRequest, StopStreamResponse, type ListStreamsRequest, ListStreamsResponse } from '../generated/runner'; - -const streams = new Set(); +type StreamHandlers = Record; +const streamHandlers: StreamHandlers = {}; const RunnerService: RunnerHandlers = { StartStream (call: ServerUnaryCall, callback: sendUnaryData): void { - const newStream = call.request.streamId; - streams.add((newStream ?? 'default') + Math.random().toString()); - callback(null, { streamId: newStream }); + console.log('StartStream called', call.request); + console.log(call.request); + // Validate request + const validationResult = validateStartStreamRequest(call.request); + if (validationResult !== null) { + callback(validationResult, null); + return; + } + + // Handle request + try { + if (call.request.streamId === undefined || call.request.redisStream === undefined) { + throw new Error('Validation failed to catch invalid request'); + } + const streamHandler = new StreamHandler(call.request.redisStream ?? ''); + streamHandlers[call.request.streamId ?? ''] = streamHandler; + callback(null, { streamId: call.request.streamId }); + } catch (error) { + callback(handleInternalError(error), null); + } }, StopStream (call: ServerUnaryCall, callback: sendUnaryData): void { - // implementation - const streamToRemove = call.request.streamId; - streams.delete(streamToRemove ?? 'default'); - callback(null, { status: 'OK', streamId: streamToRemove }); + console.log('StopStream called'); + // Validate request + const validationResult = validateStopStreamRequest(call.request); + if (validationResult !== null) { + callback(validationResult, null); + return; + } + + streamHandlers[call.request.streamId ?? '']?.stop().catch(error => { + const grpcError = handleInternalError(error); + callback(grpcError, null); + }); + callback(null, { status: 'OK', streamId: call.request.streamId }); }, - ListStreams (call: ServerUnaryCall, callback: sendUnaryData): void { - // implementation - console.log(call); + ListStreams (_, callback: sendUnaryData): void { + console.log('ListStreams called'); callback(null, { - streams: Array.from(streams).map(stream => { + streams: Object.keys(streamHandlers).map(stream => { return { streamId: stream }; }) }); } }; +function handleInternalError (error: unknown): any { + let errorMessage = 'An unknown error occurred'; + + // Check if error is an instance of Error + if (error instanceof Error) { + errorMessage = error.message; + } + return { + code: grpc.status.INTERNAL, + message: errorMessage + }; +} + +function validateStartStreamRequest (request: StartStreamRequest): any | null { + const grpcError = { + code: grpc.status.INVALID_ARGUMENT, + message: '' + }; + // Validate streamId + if (request.streamId === undefined || request.streamId.trim() === '') { + grpcError.message = 'Invalid streamId. It must be a non-empty string.'; + return grpcError; + } + if (streamHandlers[request.streamId] !== undefined) { + grpcError.message = `Stream ${request.streamId} can't be started as it already exists`; + return grpcError; + } + + // Validate redisStream + if (request.redisStream === undefined || request.redisStream.trim() === '') { + grpcError.message = 'Invalid redisStream. It must be a non-empty string.'; + return grpcError; + } + + // Validate indexerConfig + + return null; +} + +function validateStopStreamRequest (request: StartStreamRequest): any | null { + const grpcError = { + code: grpc.status.INVALID_ARGUMENT, + message: '' + }; + // Validate streamId + if (request.streamId === undefined || request.streamId.trim() === '') { + grpcError.message = 'Invalid streamId. It must be a non-empty string.'; + return grpcError; + } + if (streamHandlers[request.streamId] === undefined) { + grpcError.message = `Stream ${request.streamId} cannot be stopped as it doesn't exist`; + return grpcError; + } + + return null; +} + export default RunnerService; diff --git a/runner/src/stream-handler/stream-handler.ts b/runner/src/stream-handler/stream-handler.ts index 13ffd600e..59e3d0178 100644 --- a/runner/src/stream-handler/stream-handler.ts +++ b/runner/src/stream-handler/stream-handler.ts @@ -23,6 +23,10 @@ export default class StreamHandler { } } + async stop (): Promise { + await this.worker.terminate(); + } + private handleError (error: Error): void { console.log(`Encountered error processing stream: ${this.streamKey}, terminating thread`, error); this.worker.terminate().catch(() => { diff --git a/runner/src/test-client.ts b/runner/src/test-client.ts new file mode 100644 index 000000000..d436b3d05 --- /dev/null +++ b/runner/src/test-client.ts @@ -0,0 +1,32 @@ +import runnerClient from './service/runner-client'; + +void (async function main () { + let count = 0; + while (count < 6) { + console.log('count: ', count); + if (count === 3) { + runnerClient.StartStream({ + streamId: 'flatirons.near/demo_blockheight:real_time:stream', + redisStream: 'flatirons.near/demo_blockheight:real_time:stream', + }, (err, response) => { + if (err) { + console.error('error: ', err); + } else { + console.log('response: ', response); + } + }); + } + + runnerClient.ListStreams({}, (err, response) => { + if (err) { + console.error('error: ', err); + } else { + console.log('response: ', response); + } + }); + await new Promise((resolve) => + setTimeout(resolve, 1000), + ); + count++; + } +})(); From 048301b4cdbb4b77f667f1992f2dc19e1abbac8e Mon Sep 17 00:00:00 2001 From: Darun Seethammagari Date: Thu, 14 Dec 2023 17:28:53 -0800 Subject: [PATCH 04/18] Mostly implement APIs --- runner/package-lock.json | 2867 +++++++++++++++-- runner/protos/runner.proto | 15 +- runner/src/generated/runner.ts | 2 + runner/src/generated/spec/Runner.ts | 14 + .../src/generated/spec/StopStreamResponse.ts | 2 - .../src/generated/spec/UpdateStreamRequest.ts | 12 + .../generated/spec/UpdateStreamResponse.ts | 10 + runner/src/service/runner-service.ts | 80 +- runner/src/stream-handler/stream-handler.ts | 17 +- runner/src/stream-handler/worker.ts | 16 +- runner/test.sh | 29 + 11 files changed, 2784 insertions(+), 280 deletions(-) create mode 100644 runner/src/generated/spec/UpdateStreamRequest.ts create mode 100644 runner/src/generated/spec/UpdateStreamResponse.ts create mode 100755 runner/test.sh diff --git a/runner/package-lock.json b/runner/package-lock.json index bb7ece948..005017abd 100644 --- a/runner/package-lock.json +++ b/runner/package-lock.json @@ -9,10 +9,17 @@ "version": "1.0.0", "license": "ISC", "dependencies": { + "@aws-sdk/client-s3": "^3.414.0", + "@grpc/grpc-js": "^1.9.12", + "@grpc/proto-loader": "^0.7.10", "@near-lake/primitives": "^0.1.0", - "aws-sdk": "^2.1402.0", + "@protobuf-ts/plugin": "^2.9.3", + "@protobuf-ts/runtime": "^2.9.3", "express": "^4.18.2", + "grpc": "^1.24.11", + "long": "^5.2.3", "node-fetch": "^2.6.11", + "node-sql-parser": "^4.10.0", "pg": "^8.11.1", "pg-format": "^1.0.4", "pluralize": "^8.0.0", @@ -71,6 +78,876 @@ "node": ">=6.0.0" } }, + "node_modules/@aws-crypto/crc32": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/crc32/-/crc32-3.0.0.tgz", + "integrity": "sha512-IzSgsrxUcsrejQbPVilIKy16kAT52EwB6zSaI+M3xxIhKh5+aldEyvI+z6erM7TCLB2BJsFrtHjp6/4/sr+3dA==", + "dependencies": { + "@aws-crypto/util": "^3.0.0", + "@aws-sdk/types": "^3.222.0", + "tslib": "^1.11.1" + } + }, + "node_modules/@aws-crypto/crc32c": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/crc32c/-/crc32c-3.0.0.tgz", + "integrity": "sha512-ENNPPManmnVJ4BTXlOjAgD7URidbAznURqD0KvfREyc4o20DPYdEldU1f5cQ7Jbj0CJJSPaMIk/9ZshdB3210w==", + "dependencies": { + "@aws-crypto/util": "^3.0.0", + "@aws-sdk/types": "^3.222.0", + "tslib": "^1.11.1" + } + }, + "node_modules/@aws-crypto/ie11-detection": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/ie11-detection/-/ie11-detection-3.0.0.tgz", + "integrity": "sha512-341lBBkiY1DfDNKai/wXM3aujNBkXR7tq1URPQDL9wi3AUbI80NR74uF1TXHMm7po1AcnFk8iu2S2IeU/+/A+Q==", + "dependencies": { + "tslib": "^1.11.1" + } + }, + "node_modules/@aws-crypto/sha1-browser": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/sha1-browser/-/sha1-browser-3.0.0.tgz", + "integrity": "sha512-NJth5c997GLHs6nOYTzFKTbYdMNA6/1XlKVgnZoaZcQ7z7UJlOgj2JdbHE8tiYLS3fzXNCguct77SPGat2raSw==", + "dependencies": { + "@aws-crypto/ie11-detection": "^3.0.0", + "@aws-crypto/supports-web-crypto": "^3.0.0", + "@aws-crypto/util": "^3.0.0", + "@aws-sdk/types": "^3.222.0", + "@aws-sdk/util-locate-window": "^3.0.0", + "@aws-sdk/util-utf8-browser": "^3.0.0", + "tslib": "^1.11.1" + } + }, + "node_modules/@aws-crypto/sha256-browser": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-browser/-/sha256-browser-3.0.0.tgz", + "integrity": "sha512-8VLmW2B+gjFbU5uMeqtQM6Nj0/F1bro80xQXCW6CQBWgosFWXTx77aeOF5CAIAmbOK64SdMBJdNr6J41yP5mvQ==", + "dependencies": { + "@aws-crypto/ie11-detection": "^3.0.0", + "@aws-crypto/sha256-js": "^3.0.0", + "@aws-crypto/supports-web-crypto": "^3.0.0", + "@aws-crypto/util": "^3.0.0", + "@aws-sdk/types": "^3.222.0", + "@aws-sdk/util-locate-window": "^3.0.0", + "@aws-sdk/util-utf8-browser": "^3.0.0", + "tslib": "^1.11.1" + } + }, + "node_modules/@aws-crypto/sha256-js": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-js/-/sha256-js-3.0.0.tgz", + "integrity": "sha512-PnNN7os0+yd1XvXAy23CFOmTbMaDxgxXtTKHybrJ39Y8kGzBATgBFibWJKH6BhytLI/Zyszs87xCOBNyBig6vQ==", + "dependencies": { + "@aws-crypto/util": "^3.0.0", + "@aws-sdk/types": "^3.222.0", + "tslib": "^1.11.1" + } + }, + "node_modules/@aws-crypto/supports-web-crypto": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/supports-web-crypto/-/supports-web-crypto-3.0.0.tgz", + "integrity": "sha512-06hBdMwUAb2WFTuGG73LSC0wfPu93xWwo5vL2et9eymgmu3Id5vFAHBbajVWiGhPO37qcsdCap/FqXvJGJWPIg==", + "dependencies": { + "tslib": "^1.11.1" + } + }, + "node_modules/@aws-crypto/util": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/util/-/util-3.0.0.tgz", + "integrity": "sha512-2OJlpeJpCR48CC8r+uKVChzs9Iungj9wkZrl8Z041DWEWvyIHILYKCPNzJghKsivj+S3mLo6BVc7mBNzdxA46w==", + "dependencies": { + "@aws-sdk/types": "^3.222.0", + "@aws-sdk/util-utf8-browser": "^3.0.0", + "tslib": "^1.11.1" + } + }, + "node_modules/@aws-sdk/client-s3": { + "version": "3.474.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-s3/-/client-s3-3.474.0.tgz", + "integrity": "sha512-uqji9u2yIhFMx6E18+iIlKqimZE1SUEewS78iYYzOKRoQQ+XqFnQXtHTvBGfTExEvdwZUXYg8FqSP2UpQiEf/g==", + "dependencies": { + "@aws-crypto/sha1-browser": "3.0.0", + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/client-sts": "3.474.0", + "@aws-sdk/core": "3.474.0", + "@aws-sdk/credential-provider-node": "3.474.0", + "@aws-sdk/middleware-bucket-endpoint": "3.470.0", + "@aws-sdk/middleware-expect-continue": "3.468.0", + "@aws-sdk/middleware-flexible-checksums": "3.468.0", + "@aws-sdk/middleware-host-header": "3.468.0", + "@aws-sdk/middleware-location-constraint": "3.468.0", + "@aws-sdk/middleware-logger": "3.468.0", + "@aws-sdk/middleware-recursion-detection": "3.468.0", + "@aws-sdk/middleware-sdk-s3": "3.474.0", + "@aws-sdk/middleware-signing": "3.468.0", + "@aws-sdk/middleware-ssec": "3.468.0", + "@aws-sdk/middleware-user-agent": "3.470.0", + "@aws-sdk/region-config-resolver": "3.470.0", + "@aws-sdk/signature-v4-multi-region": "3.474.0", + "@aws-sdk/types": "3.468.0", + "@aws-sdk/util-endpoints": "3.470.0", + "@aws-sdk/util-user-agent-browser": "3.468.0", + "@aws-sdk/util-user-agent-node": "3.470.0", + "@aws-sdk/xml-builder": "3.472.0", + "@smithy/config-resolver": "^2.0.21", + "@smithy/eventstream-serde-browser": "^2.0.15", + "@smithy/eventstream-serde-config-resolver": "^2.0.15", + "@smithy/eventstream-serde-node": "^2.0.15", + "@smithy/fetch-http-handler": "^2.3.1", + "@smithy/hash-blob-browser": "^2.0.16", + "@smithy/hash-node": "^2.0.17", + "@smithy/hash-stream-node": "^2.0.17", + "@smithy/invalid-dependency": "^2.0.15", + "@smithy/md5-js": "^2.0.17", + "@smithy/middleware-content-length": "^2.0.17", + "@smithy/middleware-endpoint": "^2.2.3", + "@smithy/middleware-retry": "^2.0.24", + "@smithy/middleware-serde": "^2.0.15", + "@smithy/middleware-stack": "^2.0.9", + "@smithy/node-config-provider": "^2.1.8", + "@smithy/node-http-handler": "^2.2.1", + "@smithy/protocol-http": "^3.0.11", + "@smithy/smithy-client": "^2.1.18", + "@smithy/types": "^2.7.0", + "@smithy/url-parser": "^2.0.15", + "@smithy/util-base64": "^2.0.1", + "@smithy/util-body-length-browser": "^2.0.1", + "@smithy/util-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.22", + "@smithy/util-defaults-mode-node": "^2.0.29", + "@smithy/util-endpoints": "^1.0.7", + "@smithy/util-retry": "^2.0.8", + "@smithy/util-stream": "^2.0.23", + "@smithy/util-utf8": "^2.0.2", + "@smithy/util-waiter": "^2.0.15", + "fast-xml-parser": "4.2.5", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-s3/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@aws-sdk/client-sso": { + "version": "3.474.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.474.0.tgz", + "integrity": "sha512-6toUmQUIHkDM/P2/nyLEO/mcWOIPByTlegqX9VCHhYh9Fs5MDT2nit7I6fZzBjZjB5oVTwKjbzgxae9cE3bhqw==", + "dependencies": { + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/core": "3.474.0", + "@aws-sdk/middleware-host-header": "3.468.0", + "@aws-sdk/middleware-logger": "3.468.0", + "@aws-sdk/middleware-recursion-detection": "3.468.0", + "@aws-sdk/middleware-user-agent": "3.470.0", + "@aws-sdk/region-config-resolver": "3.470.0", + "@aws-sdk/types": "3.468.0", + "@aws-sdk/util-endpoints": "3.470.0", + "@aws-sdk/util-user-agent-browser": "3.468.0", + "@aws-sdk/util-user-agent-node": "3.470.0", + "@smithy/config-resolver": "^2.0.21", + "@smithy/fetch-http-handler": "^2.3.1", + "@smithy/hash-node": "^2.0.17", + "@smithy/invalid-dependency": "^2.0.15", + "@smithy/middleware-content-length": "^2.0.17", + "@smithy/middleware-endpoint": "^2.2.3", + "@smithy/middleware-retry": "^2.0.24", + "@smithy/middleware-serde": "^2.0.15", + "@smithy/middleware-stack": "^2.0.9", + "@smithy/node-config-provider": "^2.1.8", + "@smithy/node-http-handler": "^2.2.1", + "@smithy/protocol-http": "^3.0.11", + "@smithy/smithy-client": "^2.1.18", + "@smithy/types": "^2.7.0", + "@smithy/url-parser": "^2.0.15", + "@smithy/util-base64": "^2.0.1", + "@smithy/util-body-length-browser": "^2.0.1", + "@smithy/util-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.22", + "@smithy/util-defaults-mode-node": "^2.0.29", + "@smithy/util-endpoints": "^1.0.7", + "@smithy/util-retry": "^2.0.8", + "@smithy/util-utf8": "^2.0.2", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-sso/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@aws-sdk/client-sts": { + "version": "3.474.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.474.0.tgz", + "integrity": "sha512-qPPMbrDVAUJgYiFWVewFG7dg0VyMfuGNNK4IC1nZr0eXejUTbdm8cio6IZ8OkWtK+A+L+wx1vX5686WYVgQ0dQ==", + "dependencies": { + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/core": "3.474.0", + "@aws-sdk/credential-provider-node": "3.474.0", + "@aws-sdk/middleware-host-header": "3.468.0", + "@aws-sdk/middleware-logger": "3.468.0", + "@aws-sdk/middleware-recursion-detection": "3.468.0", + "@aws-sdk/middleware-user-agent": "3.470.0", + "@aws-sdk/region-config-resolver": "3.470.0", + "@aws-sdk/types": "3.468.0", + "@aws-sdk/util-endpoints": "3.470.0", + "@aws-sdk/util-user-agent-browser": "3.468.0", + "@aws-sdk/util-user-agent-node": "3.470.0", + "@smithy/config-resolver": "^2.0.21", + "@smithy/core": "^1.1.0", + "@smithy/fetch-http-handler": "^2.3.1", + "@smithy/hash-node": "^2.0.17", + "@smithy/invalid-dependency": "^2.0.15", + "@smithy/middleware-content-length": "^2.0.17", + "@smithy/middleware-endpoint": "^2.2.3", + "@smithy/middleware-retry": "^2.0.24", + "@smithy/middleware-serde": "^2.0.15", + "@smithy/middleware-stack": "^2.0.9", + "@smithy/node-config-provider": "^2.1.8", + "@smithy/node-http-handler": "^2.2.1", + "@smithy/protocol-http": "^3.0.11", + "@smithy/smithy-client": "^2.1.18", + "@smithy/types": "^2.7.0", + "@smithy/url-parser": "^2.0.15", + "@smithy/util-base64": "^2.0.1", + "@smithy/util-body-length-browser": "^2.0.1", + "@smithy/util-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.22", + "@smithy/util-defaults-mode-node": "^2.0.29", + "@smithy/util-endpoints": "^1.0.7", + "@smithy/util-middleware": "^2.0.8", + "@smithy/util-retry": "^2.0.8", + "@smithy/util-utf8": "^2.0.2", + "fast-xml-parser": "4.2.5", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-sts/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@aws-sdk/core": { + "version": "3.474.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.474.0.tgz", + "integrity": "sha512-eVRdeB+AoTNSzfc4viHfr0jfkHujSlf4ToExJtTuxS1wlgmIyyxRNrVKxbf0K78YK/TXRsRlJPoS5QCD5h1S2w==", + "dependencies": { + "@smithy/core": "^1.1.0", + "@smithy/protocol-http": "^3.0.11", + "@smithy/signature-v4": "^2.0.0", + "@smithy/smithy-client": "^2.1.18", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/core/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@aws-sdk/credential-provider-env": { + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.468.0.tgz", + "integrity": "sha512-k/1WHd3KZn0EQYjadooj53FC0z24/e4dUZhbSKTULgmxyO62pwh9v3Brvw4WRa/8o2wTffU/jo54tf4vGuP/ZA==", + "dependencies": { + "@aws-sdk/types": "3.468.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-env/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@aws-sdk/credential-provider-ini": { + "version": "3.474.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.474.0.tgz", + "integrity": "sha512-3Y2fHI4ZCNjdOO47Vh/xBgLXOrKm3KwBkYkBKKT2g02FUGNT8NLjJg8WBo3D4RQX2h34qx4mtW5nTY6YcGP80Q==", + "dependencies": { + "@aws-sdk/credential-provider-env": "3.468.0", + "@aws-sdk/credential-provider-process": "3.468.0", + "@aws-sdk/credential-provider-sso": "3.474.0", + "@aws-sdk/credential-provider-web-identity": "3.468.0", + "@aws-sdk/types": "3.468.0", + "@smithy/credential-provider-imds": "^2.0.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-ini/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@aws-sdk/credential-provider-node": { + "version": "3.474.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.474.0.tgz", + "integrity": "sha512-3OVVVGnb8Ru5hWeeHkg76YZT5mrufweIiWr6ge5zn7FYxc7WkyqIJ0XehqUqG5VQfaYhqh7uq/zmk8OE2B04lQ==", + "dependencies": { + "@aws-sdk/credential-provider-env": "3.468.0", + "@aws-sdk/credential-provider-ini": "3.474.0", + "@aws-sdk/credential-provider-process": "3.468.0", + "@aws-sdk/credential-provider-sso": "3.474.0", + "@aws-sdk/credential-provider-web-identity": "3.468.0", + "@aws-sdk/types": "3.468.0", + "@smithy/credential-provider-imds": "^2.0.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-node/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@aws-sdk/credential-provider-process": { + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.468.0.tgz", + "integrity": "sha512-OYSn1A/UsyPJ7Z8Q2cNhTf55O36shPmSsvOfND04nSfu1nPaR+VUvvsP7v+brhGpwC/GAKTIdGAo4blH31BS6A==", + "dependencies": { + "@aws-sdk/types": "3.468.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-process/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@aws-sdk/credential-provider-sso": { + "version": "3.474.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.474.0.tgz", + "integrity": "sha512-ik4rzhQtcRLSHB/MLQfi/dSpILxPd3zITb79DIEnqT3gpZRNjoARkZ3Hi68pujkU2530NYf8NcFwLCWoV1hS7Q==", + "dependencies": { + "@aws-sdk/client-sso": "3.474.0", + "@aws-sdk/token-providers": "3.470.0", + "@aws-sdk/types": "3.468.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-sso/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@aws-sdk/credential-provider-web-identity": { + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.468.0.tgz", + "integrity": "sha512-rexymPmXjtkwCPfhnUq3EjO1rSkf39R4Jz9CqiM7OsqK2qlT5Y/V3gnMKn0ZMXsYaQOMfM3cT5xly5R+OKDHlw==", + "dependencies": { + "@aws-sdk/types": "3.468.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-web-identity/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@aws-sdk/middleware-bucket-endpoint": { + "version": "3.470.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-bucket-endpoint/-/middleware-bucket-endpoint-3.470.0.tgz", + "integrity": "sha512-vLXXNWtsRmEIwzJ9HUQfIuTNAsEzvCv0Icsnkvt2BiBZXnmHdp2vIC3e3+kfy1D7dVQloXqMmnfcLu/BUMu2Jw==", + "dependencies": { + "@aws-sdk/types": "3.468.0", + "@aws-sdk/util-arn-parser": "3.465.0", + "@smithy/node-config-provider": "^2.1.8", + "@smithy/protocol-http": "^3.0.11", + "@smithy/types": "^2.7.0", + "@smithy/util-config-provider": "^2.0.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/middleware-bucket-endpoint/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@aws-sdk/middleware-expect-continue": { + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-expect-continue/-/middleware-expect-continue-3.468.0.tgz", + "integrity": "sha512-/wmLjmfgeulxhhmnxX3X3N933TvGsYckVIFjAtDSpLjqkbwzEcNiLq7AdmNJ4BfxG0MCMgcht561DCCD19x8Bg==", + "dependencies": { + "@aws-sdk/types": "3.468.0", + "@smithy/protocol-http": "^3.0.11", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/middleware-expect-continue/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@aws-sdk/middleware-flexible-checksums": { + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-flexible-checksums/-/middleware-flexible-checksums-3.468.0.tgz", + "integrity": "sha512-LQwL/N5MCj3Y5keLLewHTqeAXUIMsHFZyxDXRm/uxrOon9ufLKDvGvzAmfwn1/CuSUo66ZfT8VPSA4BsC90RtA==", + "dependencies": { + "@aws-crypto/crc32": "3.0.0", + "@aws-crypto/crc32c": "3.0.0", + "@aws-sdk/types": "3.468.0", + "@smithy/is-array-buffer": "^2.0.0", + "@smithy/protocol-http": "^3.0.11", + "@smithy/types": "^2.7.0", + "@smithy/util-utf8": "^2.0.2", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/middleware-flexible-checksums/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@aws-sdk/middleware-host-header": { + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.468.0.tgz", + "integrity": "sha512-gwQ+/QhX+lhof304r6zbZ/V5l5cjhGRxLL3CjH1uJPMcOAbw9wUlMdl+ibr8UwBZ5elfKFGiB1cdW/0uMchw0w==", + "dependencies": { + "@aws-sdk/types": "3.468.0", + "@smithy/protocol-http": "^3.0.11", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/middleware-host-header/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@aws-sdk/middleware-location-constraint": { + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-location-constraint/-/middleware-location-constraint-3.468.0.tgz", + "integrity": "sha512-0gBX/lDynQr4YIhM9h1dVnkVWqrg+34iOCVIUq8jHxzUzgZWglGkG9lHGGg0r1xkLTmegeoo1OKH8wrQ6n33Cg==", + "dependencies": { + "@aws-sdk/types": "3.468.0", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/middleware-location-constraint/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@aws-sdk/middleware-logger": { + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.468.0.tgz", + "integrity": "sha512-X5XHKV7DHRXI3f29SAhJPe/OxWRFgDWDMMCALfzhmJfCi6Jfh0M14cJKoC+nl+dk9lB+36+jKjhjETZaL2bPlA==", + "dependencies": { + "@aws-sdk/types": "3.468.0", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/middleware-logger/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@aws-sdk/middleware-recursion-detection": { + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.468.0.tgz", + "integrity": "sha512-vch9IQib2Ng9ucSyRW2eKNQXHUPb5jUPCLA5otTW/8nGjcOU37LxQG4WrxO7uaJ9Oe8hjHO+hViE3P0KISUhtA==", + "dependencies": { + "@aws-sdk/types": "3.468.0", + "@smithy/protocol-http": "^3.0.11", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/middleware-recursion-detection/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@aws-sdk/middleware-sdk-s3": { + "version": "3.474.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-sdk-s3/-/middleware-sdk-s3-3.474.0.tgz", + "integrity": "sha512-62aAo/8u5daIabeJ+gseYeHeShe9eYH6mH+kfWmLsHybXCCv1EaD/ZkdXWNhL0HZ3bUI1z1SF1p8jjTAWALnwA==", + "dependencies": { + "@aws-sdk/types": "3.468.0", + "@aws-sdk/util-arn-parser": "3.465.0", + "@smithy/node-config-provider": "^2.1.8", + "@smithy/protocol-http": "^3.0.11", + "@smithy/signature-v4": "^2.0.0", + "@smithy/smithy-client": "^2.1.18", + "@smithy/types": "^2.7.0", + "@smithy/util-config-provider": "^2.0.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/middleware-sdk-s3/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@aws-sdk/middleware-signing": { + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-signing/-/middleware-signing-3.468.0.tgz", + "integrity": "sha512-s+7fSB1gdnnTj5O0aCCarX3z5Vppop8kazbNSZADdkfHIDWCN80IH4ZNjY3OWqaAz0HmR4LNNrovdR304ojb4Q==", + "dependencies": { + "@aws-sdk/types": "3.468.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/protocol-http": "^3.0.11", + "@smithy/signature-v4": "^2.0.0", + "@smithy/types": "^2.7.0", + "@smithy/util-middleware": "^2.0.8", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/middleware-signing/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@aws-sdk/middleware-ssec": { + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-ssec/-/middleware-ssec-3.468.0.tgz", + "integrity": "sha512-y1qLW24wRkOGBTK5d6eJXf6d8HYo4rzT4a1mNDN1rd18NSffwQ6Yke5qeUiIaxa0y/l+FvvNYErbhYtij2rJoQ==", + "dependencies": { + "@aws-sdk/types": "3.468.0", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/middleware-ssec/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@aws-sdk/middleware-user-agent": { + "version": "3.470.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.470.0.tgz", + "integrity": "sha512-s0YRGgf4fT5KwwTefpoNUQfB5JghzXyvmPfY1QuFEMeVQNxv0OPuydzo3rY2oXPkZjkulKDtpm5jzIHwut75hA==", + "dependencies": { + "@aws-sdk/types": "3.468.0", + "@aws-sdk/util-endpoints": "3.470.0", + "@smithy/protocol-http": "^3.0.11", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/middleware-user-agent/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@aws-sdk/region-config-resolver": { + "version": "3.470.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.470.0.tgz", + "integrity": "sha512-C1o1J06iIw8cyAAOvHqT4Bbqf+PgQ/RDlSyjt2gFfP2OovDpc2o2S90dE8f8iZdSGpg70N5MikT1DBhW9NbhtQ==", + "dependencies": { + "@smithy/node-config-provider": "^2.1.8", + "@smithy/types": "^2.7.0", + "@smithy/util-config-provider": "^2.0.0", + "@smithy/util-middleware": "^2.0.8", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/region-config-resolver/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@aws-sdk/signature-v4-multi-region": { + "version": "3.474.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/signature-v4-multi-region/-/signature-v4-multi-region-3.474.0.tgz", + "integrity": "sha512-93OWRQgTJZASXLrlUNX7mmXknNkYxFYldRLARmYQccONmnIqgYQW0lQj8BFwqkHJTzSMik3/UsU0SHKwZ9ynYA==", + "dependencies": { + "@aws-sdk/middleware-sdk-s3": "3.474.0", + "@aws-sdk/types": "3.468.0", + "@smithy/protocol-http": "^3.0.11", + "@smithy/signature-v4": "^2.0.0", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/signature-v4-multi-region/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@aws-sdk/token-providers": { + "version": "3.470.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.470.0.tgz", + "integrity": "sha512-rzxnJxEUJiV69Cxsf0AHXTqJqTACITwcSH/PL4lWP4uvtzdrzSi3KA3u2aWHWpOcdE6+JFvdICscsbBSo3/TOg==", + "dependencies": { + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/middleware-host-header": "3.468.0", + "@aws-sdk/middleware-logger": "3.468.0", + "@aws-sdk/middleware-recursion-detection": "3.468.0", + "@aws-sdk/middleware-user-agent": "3.470.0", + "@aws-sdk/region-config-resolver": "3.470.0", + "@aws-sdk/types": "3.468.0", + "@aws-sdk/util-endpoints": "3.470.0", + "@aws-sdk/util-user-agent-browser": "3.468.0", + "@aws-sdk/util-user-agent-node": "3.470.0", + "@smithy/config-resolver": "^2.0.21", + "@smithy/fetch-http-handler": "^2.3.1", + "@smithy/hash-node": "^2.0.17", + "@smithy/invalid-dependency": "^2.0.15", + "@smithy/middleware-content-length": "^2.0.17", + "@smithy/middleware-endpoint": "^2.2.3", + "@smithy/middleware-retry": "^2.0.24", + "@smithy/middleware-serde": "^2.0.15", + "@smithy/middleware-stack": "^2.0.9", + "@smithy/node-config-provider": "^2.1.8", + "@smithy/node-http-handler": "^2.2.1", + "@smithy/property-provider": "^2.0.0", + "@smithy/protocol-http": "^3.0.11", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/smithy-client": "^2.1.18", + "@smithy/types": "^2.7.0", + "@smithy/url-parser": "^2.0.15", + "@smithy/util-base64": "^2.0.1", + "@smithy/util-body-length-browser": "^2.0.1", + "@smithy/util-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.22", + "@smithy/util-defaults-mode-node": "^2.0.29", + "@smithy/util-endpoints": "^1.0.7", + "@smithy/util-retry": "^2.0.8", + "@smithy/util-utf8": "^2.0.2", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/token-providers/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@aws-sdk/types": { + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.468.0.tgz", + "integrity": "sha512-rx/9uHI4inRbp2tw3Y4Ih4PNZkVj32h7WneSg3MVgVjAoVD5Zti9KhS5hkvsBxfgmQmg0AQbE+b1sy5WGAgntA==", + "dependencies": { + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/types/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@aws-sdk/util-arn-parser": { + "version": "3.465.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-arn-parser/-/util-arn-parser-3.465.0.tgz", + "integrity": "sha512-zOJ82vzDJFqBX9yZBlNeHHrul/kpx/DCoxzW5UBbZeb26kfV53QhMSoEmY8/lEbBqlqargJ/sgRC845GFhHNQw==", + "dependencies": { + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/util-arn-parser/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@aws-sdk/util-endpoints": { + "version": "3.470.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.470.0.tgz", + "integrity": "sha512-6N6VvPCmu+89p5Ez/+gLf+X620iQ9JpIs8p8ECZiCodirzFOe8NC1O2S7eov7YiG9IHSuodqn/0qNq+v+oLe0A==", + "dependencies": { + "@aws-sdk/types": "3.468.0", + "@smithy/util-endpoints": "^1.0.7", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/util-endpoints/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@aws-sdk/util-locate-window": { + "version": "3.465.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-locate-window/-/util-locate-window-3.465.0.tgz", + "integrity": "sha512-f+QNcWGswredzC1ExNAB/QzODlxwaTdXkNT5cvke2RLX8SFU5pYk6h4uCtWC0vWPELzOfMfloBrJefBzlarhsw==", + "dependencies": { + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/util-locate-window/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@aws-sdk/util-user-agent-browser": { + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.468.0.tgz", + "integrity": "sha512-OJyhWWsDEizR3L+dCgMXSUmaCywkiZ7HSbnQytbeKGwokIhD69HTiJcibF/sgcM5gk4k3Mq3puUhGnEZ46GIig==", + "dependencies": { + "@aws-sdk/types": "3.468.0", + "@smithy/types": "^2.7.0", + "bowser": "^2.11.0", + "tslib": "^2.5.0" + } + }, + "node_modules/@aws-sdk/util-user-agent-browser/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@aws-sdk/util-user-agent-node": { + "version": "3.470.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.470.0.tgz", + "integrity": "sha512-QxsZ9iVHcBB/XRdYvwfM5AMvNp58HfqkIrH88mY0cmxuvtlIGDfWjczdDrZMJk9y0vIq+cuoCHsGXHu7PyiEAQ==", + "dependencies": { + "@aws-sdk/types": "3.468.0", + "@smithy/node-config-provider": "^2.1.8", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "aws-crt": ">=1.0.0" + }, + "peerDependenciesMeta": { + "aws-crt": { + "optional": true + } + } + }, + "node_modules/@aws-sdk/util-user-agent-node/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@aws-sdk/util-utf8-browser": { + "version": "3.259.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-utf8-browser/-/util-utf8-browser-3.259.0.tgz", + "integrity": "sha512-UvFa/vR+e19XookZF8RzFZBrw2EUkQWxiBW0yYQAhvk3C+QVGl0H3ouca8LDBlBfQKXwmW3huo/59H8rwb1wJw==", + "dependencies": { + "tslib": "^2.3.1" + } + }, + "node_modules/@aws-sdk/util-utf8-browser/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@aws-sdk/xml-builder": { + "version": "3.472.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/xml-builder/-/xml-builder-3.472.0.tgz", + "integrity": "sha512-PwjVxz1hr9up8QkddabuScPZ/d5aDHgvHYgK4acHYzltXL4wngfvimi5ZqXTzVWF2QANxHmWnHUr45QJX71oJQ==", + "dependencies": { + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/xml-builder/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, "node_modules/@babel/code-frame": { "version": "7.22.5", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.5.tgz", @@ -777,6 +1654,35 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, + "node_modules/@grpc/grpc-js": { + "version": "1.9.13", + "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.9.13.tgz", + "integrity": "sha512-OEZZu9v9AA+7/tghMDE8o5DAMD5THVnwSqDWuh7PPYO5287rTyqy0xEHT6/e4pbqSrhyLPdQFsam4TwFQVVIIw==", + "dependencies": { + "@grpc/proto-loader": "^0.7.8", + "@types/node": ">=12.12.47" + }, + "engines": { + "node": "^8.13.0 || >=10.10.0" + } + }, + "node_modules/@grpc/proto-loader": { + "version": "0.7.10", + "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.7.10.tgz", + "integrity": "sha512-CAqDfoaQ8ykFd9zqBDn4k6iWT9loLAlc2ETmDFS9JCD70gDcnA4L3AFEo2iV7KyAtAAHFW9ftq1Fz+Vsgq80RQ==", + "dependencies": { + "lodash.camelcase": "^4.3.0", + "long": "^5.0.0", + "protobufjs": "^7.2.4", + "yargs": "^17.7.2" + }, + "bin": { + "proto-loader-gen-types": "build/bin/proto-loader-gen-types.js" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/@humanwhocodes/config-array": { "version": "0.11.10", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.10.tgz", @@ -1319,8 +2225,49 @@ "@jridgewell/sourcemap-codec": "^1.4.10" } }, - "node_modules/@near-lake/primitives": { - "version": "0.1.0", + "node_modules/@mapbox/node-pre-gyp": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.11.tgz", + "integrity": "sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ==", + "dependencies": { + "detect-libc": "^2.0.0", + "https-proxy-agent": "^5.0.0", + "make-dir": "^3.1.0", + "node-fetch": "^2.6.7", + "nopt": "^5.0.0", + "npmlog": "^5.0.1", + "rimraf": "^3.0.2", + "semver": "^7.3.5", + "tar": "^6.1.11" + }, + "bin": { + "node-pre-gyp": "bin/node-pre-gyp" + } + }, + "node_modules/@mapbox/node-pre-gyp/node_modules/make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dependencies": { + "semver": "^6.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@mapbox/node-pre-gyp/node_modules/make-dir/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@near-lake/primitives": { + "version": "0.1.0", "resolved": "https://registry.npmjs.org/@near-lake/primitives/-/primitives-0.1.0.tgz", "integrity": "sha512-SvL6mA0SsqAz5AC2811I+cI9Mpayax8VsoRbY0Bizk5eYiGCT1u1iBBa8f1nikquDfJCEK+sBCt751Nz/xoZjw==" }, @@ -1385,6 +2332,130 @@ "integrity": "sha512-t0hLfiEKfMUoqhG+U1oid7Pva4bbDPHYfJNiB7BiIjRkj1pyC++4N3huJfqY6aRH6VTB0rvtzQwjM4K6qpfOig==", "dev": true }, + "node_modules/@protobuf-ts/plugin": { + "version": "2.9.3", + "resolved": "https://registry.npmjs.org/@protobuf-ts/plugin/-/plugin-2.9.3.tgz", + "integrity": "sha512-tHYACv+nnIV2eoiMxeZhrgMqGiUktzUzrhfgnROg/rr8TecPLp9v5/yqNibN+bad5k7d57aqlTuQKhFl+J4W/g==", + "dependencies": { + "@protobuf-ts/plugin-framework": "^2.9.3", + "@protobuf-ts/protoc": "^2.9.3", + "@protobuf-ts/runtime": "^2.9.3", + "@protobuf-ts/runtime-rpc": "^2.9.3", + "typescript": "^3.9" + }, + "bin": { + "protoc-gen-dump": "bin/protoc-gen-dump", + "protoc-gen-ts": "bin/protoc-gen-ts" + } + }, + "node_modules/@protobuf-ts/plugin-framework": { + "version": "2.9.3", + "resolved": "https://registry.npmjs.org/@protobuf-ts/plugin-framework/-/plugin-framework-2.9.3.tgz", + "integrity": "sha512-iqdkhAu7fGPvBCVOoAEEFJ1/oaGIBoNIMgSv2WonTNJVHxv5FvvAfWFn6nG/eta34fHRZT38ZXTaYcMUkv8AiQ==", + "dependencies": { + "@protobuf-ts/runtime": "^2.9.3", + "typescript": "^3.9" + } + }, + "node_modules/@protobuf-ts/plugin-framework/node_modules/typescript": { + "version": "3.9.10", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz", + "integrity": "sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/@protobuf-ts/plugin/node_modules/typescript": { + "version": "3.9.10", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz", + "integrity": "sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/@protobuf-ts/protoc": { + "version": "2.9.3", + "resolved": "https://registry.npmjs.org/@protobuf-ts/protoc/-/protoc-2.9.3.tgz", + "integrity": "sha512-TJ0Ycx/CIBqpB4wpKt6K05kjXj6zv36s/qpdCT/wdJBhpayOVBqLF5NpLp3WIiw1PmIxvqalB6QHKjvnLzGKLA==", + "bin": { + "protoc": "protoc.js" + } + }, + "node_modules/@protobuf-ts/runtime": { + "version": "2.9.3", + "resolved": "https://registry.npmjs.org/@protobuf-ts/runtime/-/runtime-2.9.3.tgz", + "integrity": "sha512-nivzCpg/qYD0RX2OmHOahJALb8ndjGmUhNBcTJ0BbXoqKwCSM6vYA+vegzS3rhuaPgbyC7Ec8idlnizzUfIRuw==" + }, + "node_modules/@protobuf-ts/runtime-rpc": { + "version": "2.9.3", + "resolved": "https://registry.npmjs.org/@protobuf-ts/runtime-rpc/-/runtime-rpc-2.9.3.tgz", + "integrity": "sha512-WelHpctvZeG8yhbb7tnsrLzotq9xjMCXuGuhJ8qMyEdNoBBEodbXseofAYFTebo2/PN2LzyEq3X6vwr5f8jqTA==", + "dependencies": { + "@protobuf-ts/runtime": "^2.9.3" + } + }, + "node_modules/@protobufjs/aspromise": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", + "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==" + }, + "node_modules/@protobufjs/base64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", + "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==" + }, + "node_modules/@protobufjs/codegen": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", + "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==" + }, + "node_modules/@protobufjs/eventemitter": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", + "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==" + }, + "node_modules/@protobufjs/fetch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", + "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", + "dependencies": { + "@protobufjs/aspromise": "^1.1.1", + "@protobufjs/inquire": "^1.1.0" + } + }, + "node_modules/@protobufjs/float": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", + "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==" + }, + "node_modules/@protobufjs/inquire": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", + "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==" + }, + "node_modules/@protobufjs/path": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", + "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==" + }, + "node_modules/@protobufjs/pool": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", + "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==" + }, + "node_modules/@protobufjs/utf8": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", + "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" + }, "node_modules/@redis/bloom": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@redis/bloom/-/bloom-1.2.0.tgz", @@ -1453,15 +2524,902 @@ "type-detect": "4.0.8" } }, - "node_modules/@sinonjs/fake-timers": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", - "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", - "dev": true, + "node_modules/@sinonjs/fake-timers": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", + "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", + "dev": true, + "dependencies": { + "@sinonjs/commons": "^3.0.0" + } + }, + "node_modules/@smithy/abort-controller": { + "version": "2.0.15", + "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-2.0.15.tgz", + "integrity": "sha512-JkS36PIS3/UCbq/MaozzV7jECeL+BTt4R75bwY8i+4RASys4xOyUS1HsRyUNSqUXFP4QyCz5aNnh3ltuaxv+pw==", + "dependencies": { + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/abort-controller/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/chunked-blob-reader": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@smithy/chunked-blob-reader/-/chunked-blob-reader-2.0.0.tgz", + "integrity": "sha512-k+J4GHJsMSAIQPChGBrjEmGS+WbPonCXesoqP9fynIqjn7rdOThdH8FAeCmokP9mxTYKQAKoHCLPzNlm6gh7Wg==", + "dependencies": { + "tslib": "^2.5.0" + } + }, + "node_modules/@smithy/chunked-blob-reader-native": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@smithy/chunked-blob-reader-native/-/chunked-blob-reader-native-2.0.1.tgz", + "integrity": "sha512-N2oCZRglhWKm7iMBu7S6wDzXirjAofi7tAd26cxmgibRYOBS4D3hGfmkwCpHdASZzwZDD8rluh0Rcqw1JeZDRw==", + "dependencies": { + "@smithy/util-base64": "^2.0.1", + "tslib": "^2.5.0" + } + }, + "node_modules/@smithy/chunked-blob-reader-native/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/chunked-blob-reader/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/config-resolver": { + "version": "2.0.21", + "resolved": "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-2.0.21.tgz", + "integrity": "sha512-rlLIGT+BeqjnA6C2FWumPRJS1UW07iU5ZxDHtFuyam4W65gIaOFMjkB90ofKCIh+0mLVQrQFrl/VLtQT/6FWTA==", + "dependencies": { + "@smithy/node-config-provider": "^2.1.8", + "@smithy/types": "^2.7.0", + "@smithy/util-config-provider": "^2.0.0", + "@smithy/util-middleware": "^2.0.8", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/config-resolver/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/core": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@smithy/core/-/core-1.1.0.tgz", + "integrity": "sha512-k1zaT5S4K0bG67Q5TmPZ6PdWNQBTMQErChuDvTi+NTx21kKDt+/4YRidsK6nDbHizN6fn1bafUxrougZdKrpxA==", + "dependencies": { + "@smithy/middleware-endpoint": "^2.2.3", + "@smithy/middleware-retry": "^2.0.24", + "@smithy/middleware-serde": "^2.0.15", + "@smithy/protocol-http": "^3.0.11", + "@smithy/smithy-client": "^2.1.18", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/core/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/credential-provider-imds": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-2.1.4.tgz", + "integrity": "sha512-cwPJN1fa1YOQzhBlTXRavABEYRRchci1X79QRwzaNLySnIMJfztyv1Zkst0iZPLMnpn8+CnHu3wOHS11J5Dr3A==", + "dependencies": { + "@smithy/node-config-provider": "^2.1.8", + "@smithy/property-provider": "^2.0.16", + "@smithy/types": "^2.7.0", + "@smithy/url-parser": "^2.0.15", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/credential-provider-imds/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/eventstream-codec": { + "version": "2.0.15", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-codec/-/eventstream-codec-2.0.15.tgz", + "integrity": "sha512-crjvz3j1gGPwA0us6cwS7+5gAn35CTmqu/oIxVbYJo2Qm/sGAye6zGJnMDk3BKhWZw5kcU1G4MxciTkuBpOZPg==", + "dependencies": { + "@aws-crypto/crc32": "3.0.0", + "@smithy/types": "^2.7.0", + "@smithy/util-hex-encoding": "^2.0.0", + "tslib": "^2.5.0" + } + }, + "node_modules/@smithy/eventstream-codec/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/eventstream-serde-browser": { + "version": "2.0.15", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-browser/-/eventstream-serde-browser-2.0.15.tgz", + "integrity": "sha512-WiFG5N9j3jmS5P0z5Xev6dO0c3lf7EJYC2Ncb0xDnWFvShwXNn741AF71ABr5EcZw8F4rQma0362MMjAwJeZog==", + "dependencies": { + "@smithy/eventstream-serde-universal": "^2.0.15", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/eventstream-serde-browser/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/eventstream-serde-config-resolver": { + "version": "2.0.15", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-config-resolver/-/eventstream-serde-config-resolver-2.0.15.tgz", + "integrity": "sha512-o65d2LRjgCbWYH+VVNlWXtmsI231SO99ZTOL4UuIPa6WTjbSHWtlXvUcJG9libhEKWmEV9DIUiH2IqyPWi7ubA==", + "dependencies": { + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/eventstream-serde-config-resolver/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/eventstream-serde-node": { + "version": "2.0.15", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-node/-/eventstream-serde-node-2.0.15.tgz", + "integrity": "sha512-9OOXiIhHq1VeOG6xdHkn2ZayfMYM3vzdUTV3zhcCnt+tMqA3BJK3XXTJFRR2BV28rtRM778DzqbBTf+hqwQPTg==", + "dependencies": { + "@smithy/eventstream-serde-universal": "^2.0.15", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/eventstream-serde-node/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/eventstream-serde-universal": { + "version": "2.0.15", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-universal/-/eventstream-serde-universal-2.0.15.tgz", + "integrity": "sha512-dP8AQp/pXlWBjvL0TaPBJC3rM0GoYv7O0Uim8d/7UKZ2Wo13bFI3/BhQfY/1DeiP1m23iCHFNFtOQxfQNBB8rQ==", + "dependencies": { + "@smithy/eventstream-codec": "^2.0.15", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/eventstream-serde-universal/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/fetch-http-handler": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-2.3.1.tgz", + "integrity": "sha512-6MNk16fqb8EwcYY8O8WxB3ArFkLZ2XppsSNo1h7SQcFdDDwIumiJeO6wRzm7iB68xvsOQzsdQKbdtTieS3hfSQ==", + "dependencies": { + "@smithy/protocol-http": "^3.0.11", + "@smithy/querystring-builder": "^2.0.15", + "@smithy/types": "^2.7.0", + "@smithy/util-base64": "^2.0.1", + "tslib": "^2.5.0" + } + }, + "node_modules/@smithy/fetch-http-handler/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/hash-blob-browser": { + "version": "2.0.16", + "resolved": "https://registry.npmjs.org/@smithy/hash-blob-browser/-/hash-blob-browser-2.0.16.tgz", + "integrity": "sha512-cSYRi05LA7DZDwjB1HL0BP8B56eUNNeLglVH147QTXFyuXJq/7erAIiLRfsyXB8+GfFHkSS5BHbc76a7k/AYPA==", + "dependencies": { + "@smithy/chunked-blob-reader": "^2.0.0", + "@smithy/chunked-blob-reader-native": "^2.0.1", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + } + }, + "node_modules/@smithy/hash-blob-browser/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/hash-node": { + "version": "2.0.17", + "resolved": "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-2.0.17.tgz", + "integrity": "sha512-Il6WuBcI1nD+e2DM7tTADMf01wEPGK8PAhz4D+YmDUVaoBqlA+CaH2uDJhiySifmuKBZj748IfygXty81znKhw==", + "dependencies": { + "@smithy/types": "^2.7.0", + "@smithy/util-buffer-from": "^2.0.0", + "@smithy/util-utf8": "^2.0.2", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/hash-node/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/hash-stream-node": { + "version": "2.0.17", + "resolved": "https://registry.npmjs.org/@smithy/hash-stream-node/-/hash-stream-node-2.0.17.tgz", + "integrity": "sha512-ey8DtnATzp1mOXgS7rqMwSmAki6iJA+jgNucKcxRkhMB1rrICfHg+rhmIF50iLPDHUhTcS5pBMOrLzzpZftvNQ==", + "dependencies": { + "@smithy/types": "^2.7.0", + "@smithy/util-utf8": "^2.0.2", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/hash-stream-node/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/invalid-dependency": { + "version": "2.0.15", + "resolved": "https://registry.npmjs.org/@smithy/invalid-dependency/-/invalid-dependency-2.0.15.tgz", + "integrity": "sha512-dlEKBFFwVfzA5QroHlBS94NpgYjXhwN/bFfun+7w3rgxNvVy79SK0w05iGc7UAeC5t+D7gBxrzdnD6hreZnDVQ==", + "dependencies": { + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + } + }, + "node_modules/@smithy/invalid-dependency/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/is-array-buffer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.0.0.tgz", + "integrity": "sha512-z3PjFjMyZNI98JFRJi/U0nGoLWMSJlDjAW4QUX2WNZLas5C0CmVV6LJ01JI0k90l7FvpmixjWxPFmENSClQ7ug==", + "dependencies": { + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/is-array-buffer/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/md5-js": { + "version": "2.0.17", + "resolved": "https://registry.npmjs.org/@smithy/md5-js/-/md5-js-2.0.17.tgz", + "integrity": "sha512-jmISTCnEkOnm2oCNx/rMkvBT/eQh3aA6nktevkzbmn/VYqYEuc5Z2n5sTTqsciMSO01Lvf56wG1A4twDqovYeQ==", + "dependencies": { + "@smithy/types": "^2.7.0", + "@smithy/util-utf8": "^2.0.2", + "tslib": "^2.5.0" + } + }, + "node_modules/@smithy/md5-js/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/middleware-content-length": { + "version": "2.0.17", + "resolved": "https://registry.npmjs.org/@smithy/middleware-content-length/-/middleware-content-length-2.0.17.tgz", + "integrity": "sha512-OyadvMcKC7lFXTNBa8/foEv7jOaqshQZkjWS9coEXPRZnNnihU/Ls+8ZuJwGNCOrN2WxXZFmDWhegbnM4vak8w==", + "dependencies": { + "@smithy/protocol-http": "^3.0.11", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/middleware-content-length/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/middleware-endpoint": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-2.2.3.tgz", + "integrity": "sha512-nYfxuq0S/xoAjdLbyn1ixeVB6cyH9wYCMtbbOCpcCRYR5u2mMtqUtVjjPAZ/DIdlK3qe0tpB0Q76szFGNuz+kQ==", + "dependencies": { + "@smithy/middleware-serde": "^2.0.15", + "@smithy/node-config-provider": "^2.1.8", + "@smithy/shared-ini-file-loader": "^2.2.7", + "@smithy/types": "^2.7.0", + "@smithy/url-parser": "^2.0.15", + "@smithy/util-middleware": "^2.0.8", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/middleware-endpoint/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/middleware-retry": { + "version": "2.0.24", + "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-2.0.24.tgz", + "integrity": "sha512-q2SvHTYu96N7lYrn3VSuX3vRpxXHR/Cig6MJpGWxd0BWodUQUWlKvXpWQZA+lTaFJU7tUvpKhRd4p4MU3PbeJg==", + "dependencies": { + "@smithy/node-config-provider": "^2.1.8", + "@smithy/protocol-http": "^3.0.11", + "@smithy/service-error-classification": "^2.0.8", + "@smithy/smithy-client": "^2.1.18", + "@smithy/types": "^2.7.0", + "@smithy/util-middleware": "^2.0.8", + "@smithy/util-retry": "^2.0.8", + "tslib": "^2.5.0", + "uuid": "^8.3.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/middleware-retry/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/middleware-retry/node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/@smithy/middleware-serde": { + "version": "2.0.15", + "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-2.0.15.tgz", + "integrity": "sha512-FOZRFk/zN4AT4wzGuBY+39XWe+ZnCFd0gZtyw3f9Okn2CJPixl9GyWe98TIaljeZdqWkgrzGyPre20AcW2UMHQ==", + "dependencies": { + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/middleware-serde/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/middleware-stack": { + "version": "2.0.9", + "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-2.0.9.tgz", + "integrity": "sha512-bCB5dUtGQ5wh7QNL2ELxmDc6g7ih7jWU3Kx6MYH1h4mZbv9xL3WyhKHojRltThCB1arLPyTUFDi+x6fB/oabtA==", + "dependencies": { + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/middleware-stack/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/node-config-provider": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-2.1.8.tgz", + "integrity": "sha512-+w26OKakaBUGp+UG+dxYZtFb5fs3tgHg3/QrRrmUZj+rl3cIuw840vFUXX35cVPTUCQIiTqmz7CpVF7+hdINdQ==", + "dependencies": { + "@smithy/property-provider": "^2.0.16", + "@smithy/shared-ini-file-loader": "^2.2.7", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/node-config-provider/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/node-http-handler": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-2.2.1.tgz", + "integrity": "sha512-8iAKQrC8+VFHPAT8pg4/j6hlsTQh+NKOWlctJBrYtQa4ExcxX7aSg3vdQ2XLoYwJotFUurg/NLqFCmZaPRrogw==", + "dependencies": { + "@smithy/abort-controller": "^2.0.15", + "@smithy/protocol-http": "^3.0.11", + "@smithy/querystring-builder": "^2.0.15", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/node-http-handler/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/property-provider": { + "version": "2.0.16", + "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-2.0.16.tgz", + "integrity": "sha512-28Ky0LlOqtEjwg5CdHmwwaDRHcTWfPRzkT6HrhwOSRS2RryAvuDfJrZpM+BMcrdeCyEg1mbcgIMoqTla+rdL8Q==", + "dependencies": { + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/property-provider/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/protocol-http": { + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-3.0.11.tgz", + "integrity": "sha512-3ziB8fHuXIRamV/akp/sqiWmNPR6X+9SB8Xxnozzj+Nq7hSpyKdFHd1FLpBkgfGFUTzzcBJQlDZPSyxzmdcx5A==", + "dependencies": { + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/protocol-http/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/querystring-builder": { + "version": "2.0.15", + "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-2.0.15.tgz", + "integrity": "sha512-e1q85aT6HutvouOdN+dMsN0jcdshp50PSCvxDvo6aIM57LqeXimjfONUEgfqQ4IFpYWAtVixptyIRE5frMp/2A==", + "dependencies": { + "@smithy/types": "^2.7.0", + "@smithy/util-uri-escape": "^2.0.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/querystring-builder/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/querystring-parser": { + "version": "2.0.15", + "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-2.0.15.tgz", + "integrity": "sha512-jbBvoK3cc81Cj1c1TH1qMYxNQKHrYQ2DoTntN9FBbtUWcGhc+T4FP6kCKYwRLXyU4AajwGIZstvNAmIEgUUNTQ==", + "dependencies": { + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/querystring-parser/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/service-error-classification": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-2.0.8.tgz", + "integrity": "sha512-jCw9+005im8tsfYvwwSc4TTvd29kXRFkH9peQBg5R/4DD03ieGm6v6Hpv9nIAh98GwgYg1KrztcINC1s4o7/hg==", + "dependencies": { + "@smithy/types": "^2.7.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/shared-ini-file-loader": { + "version": "2.2.7", + "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-2.2.7.tgz", + "integrity": "sha512-0Qt5CuiogIuvQIfK+be7oVHcPsayLgfLJGkPlbgdbl0lD28nUKu4p11L+UG3SAEsqc9UsazO+nErPXw7+IgDpQ==", + "dependencies": { + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/shared-ini-file-loader/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/signature-v4": { + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-2.0.18.tgz", + "integrity": "sha512-SJRAj9jT/l9ocm8D0GojMbnA1sp7I4JeStOQ4lEXI8A5eHE73vbjlzlqIFB7cLvIgau0oUl4cGVpF9IGCrvjlw==", + "dependencies": { + "@smithy/eventstream-codec": "^2.0.15", + "@smithy/is-array-buffer": "^2.0.0", + "@smithy/types": "^2.7.0", + "@smithy/util-hex-encoding": "^2.0.0", + "@smithy/util-middleware": "^2.0.8", + "@smithy/util-uri-escape": "^2.0.0", + "@smithy/util-utf8": "^2.0.2", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/signature-v4/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/smithy-client": { + "version": "2.1.18", + "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-2.1.18.tgz", + "integrity": "sha512-7FqdbaJiVaHJDD9IfDhmzhSDbpjyx+ZsfdYuOpDJF09rl8qlIAIlZNoSaflKrQ3cEXZN2YxGPaNWGhbYimyIRQ==", + "dependencies": { + "@smithy/middleware-stack": "^2.0.9", + "@smithy/types": "^2.7.0", + "@smithy/util-stream": "^2.0.23", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/smithy-client/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/types": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.7.0.tgz", + "integrity": "sha512-1OIFyhK+vOkMbu4aN2HZz/MomREkrAC/HqY5mlJMUJfGrPRwijJDTeiN8Rnj9zUaB8ogXAfIOtZrrgqZ4w7Wnw==", + "dependencies": { + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/types/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/url-parser": { + "version": "2.0.15", + "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-2.0.15.tgz", + "integrity": "sha512-sADUncUj9rNbOTrdDGm4EXlUs0eQ9dyEo+V74PJoULY4jSQxS+9gwEgsPYyiu8PUOv16JC/MpHonOgqP/IEDZA==", + "dependencies": { + "@smithy/querystring-parser": "^2.0.15", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + } + }, + "node_modules/@smithy/url-parser/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/util-base64": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-2.0.1.tgz", + "integrity": "sha512-DlI6XFYDMsIVN+GH9JtcRp3j02JEVuWIn/QOZisVzpIAprdsxGveFed0bjbMRCqmIFe8uetn5rxzNrBtIGrPIQ==", + "dependencies": { + "@smithy/util-buffer-from": "^2.0.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/util-base64/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/util-body-length-browser": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@smithy/util-body-length-browser/-/util-body-length-browser-2.0.1.tgz", + "integrity": "sha512-NXYp3ttgUlwkaug4bjBzJ5+yIbUbUx8VsSLuHZROQpoik+gRkIBeEG9MPVYfvPNpuXb/puqodeeUXcKFe7BLOQ==", + "dependencies": { + "tslib": "^2.5.0" + } + }, + "node_modules/@smithy/util-body-length-browser/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/util-body-length-node": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@smithy/util-body-length-node/-/util-body-length-node-2.1.0.tgz", + "integrity": "sha512-/li0/kj/y3fQ3vyzn36NTLGmUwAICb7Jbe/CsWCktW363gh1MOcpEcSO3mJ344Gv2dqz8YJCLQpb6hju/0qOWw==", + "dependencies": { + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/util-body-length-node/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/util-buffer-from": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.0.0.tgz", + "integrity": "sha512-/YNnLoHsR+4W4Vf2wL5lGv0ksg8Bmk3GEGxn2vEQt52AQaPSCuaO5PM5VM7lP1K9qHRKHwrPGktqVoAHKWHxzw==", + "dependencies": { + "@smithy/is-array-buffer": "^2.0.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/util-buffer-from/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/util-config-provider": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-config-provider/-/util-config-provider-2.0.0.tgz", + "integrity": "sha512-xCQ6UapcIWKxXHEU4Mcs2s7LcFQRiU3XEluM2WcCjjBtQkUN71Tb+ydGmJFPxMUrW/GWMgQEEGipLym4XG0jZg==", + "dependencies": { + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/util-config-provider/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/util-defaults-mode-browser": { + "version": "2.0.22", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-2.0.22.tgz", + "integrity": "sha512-qcF20IHHH96FlktvBRICDXDhLPtpVmtksHmqNGtotb9B0DYWXsC6jWXrkhrrwF7tH26nj+npVTqh9isiFV1gdA==", + "dependencies": { + "@smithy/property-provider": "^2.0.16", + "@smithy/smithy-client": "^2.1.18", + "@smithy/types": "^2.7.0", + "bowser": "^2.11.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/@smithy/util-defaults-mode-browser/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/util-defaults-mode-node": { + "version": "2.0.29", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-2.0.29.tgz", + "integrity": "sha512-+uG/15VoUh6JV2fdY9CM++vnSuMQ1VKZ6BdnkUM7R++C/vLjnlg+ToiSR1FqKZbMmKBXmsr8c/TsDWMAYvxbxQ==", + "dependencies": { + "@smithy/config-resolver": "^2.0.21", + "@smithy/credential-provider-imds": "^2.1.4", + "@smithy/node-config-provider": "^2.1.8", + "@smithy/property-provider": "^2.0.16", + "@smithy/smithy-client": "^2.1.18", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/@smithy/util-defaults-mode-node/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/util-endpoints": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@smithy/util-endpoints/-/util-endpoints-1.0.7.tgz", + "integrity": "sha512-Q2gEind3jxoLk6hdKWyESMU7LnXz8aamVwM+VeVjOYzYT1PalGlY/ETa48hv2YpV4+YV604y93YngyzzzQ4IIA==", + "dependencies": { + "@smithy/node-config-provider": "^2.1.8", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">= 14.0.0" + } + }, + "node_modules/@smithy/util-endpoints/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/util-hex-encoding": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-hex-encoding/-/util-hex-encoding-2.0.0.tgz", + "integrity": "sha512-c5xY+NUnFqG6d7HFh1IFfrm3mGl29lC+vF+geHv4ToiuJCBmIfzx6IeHLg+OgRdPFKDXIw6pvi+p3CsscaMcMA==", + "dependencies": { + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/util-hex-encoding/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/util-middleware": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-2.0.8.tgz", + "integrity": "sha512-qkvqQjM8fRGGA8P2ydWylMhenCDP8VlkPn8kiNuFEaFz9xnUKC2irfqsBSJrfrOB9Qt6pQsI58r3zvvumhFMkw==", + "dependencies": { + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/util-middleware/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/util-retry": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-2.0.8.tgz", + "integrity": "sha512-cQTPnVaVFMjjS6cb44WV2yXtHVyXDC5icKyIbejMarJEApYeJWpBU3LINTxHqp/tyLI+MZOUdosr2mZ3sdziNg==", + "dependencies": { + "@smithy/service-error-classification": "^2.0.8", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">= 14.0.0" + } + }, + "node_modules/@smithy/util-retry/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/util-stream": { + "version": "2.0.23", + "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-2.0.23.tgz", + "integrity": "sha512-OJMWq99LAZJUzUwTk+00plyxX3ESktBaGPhqNIEVab+53gLULiWN9B/8bRABLg0K6R6Xg4t80uRdhk3B/LZqMQ==", + "dependencies": { + "@smithy/fetch-http-handler": "^2.3.1", + "@smithy/node-http-handler": "^2.2.1", + "@smithy/types": "^2.7.0", + "@smithy/util-base64": "^2.0.1", + "@smithy/util-buffer-from": "^2.0.0", + "@smithy/util-hex-encoding": "^2.0.0", + "@smithy/util-utf8": "^2.0.2", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/util-stream/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/util-uri-escape": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-uri-escape/-/util-uri-escape-2.0.0.tgz", + "integrity": "sha512-ebkxsqinSdEooQduuk9CbKcI+wheijxEb3utGXkCoYQkJnwTnLbH1JXGimJtUkQwNQbsbuYwG2+aFVyZf5TLaw==", + "dependencies": { + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/util-uri-escape/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/util-utf8": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.0.2.tgz", + "integrity": "sha512-qOiVORSPm6Ce4/Yu6hbSgNHABLP2VMv8QOC3tTDNHHlWY19pPyc++fBTbZPtx6egPXi4HQxKDnMxVxpbtX2GoA==", + "dependencies": { + "@smithy/util-buffer-from": "^2.0.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/util-utf8/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@smithy/util-waiter": { + "version": "2.0.15", + "resolved": "https://registry.npmjs.org/@smithy/util-waiter/-/util-waiter-2.0.15.tgz", + "integrity": "sha512-9Y+btzzB7MhLADW7xgD6SjvmoYaRkrb/9SCbNGmNdfO47v38rxb90IGXyDtAK0Shl9bMthTmLgjlfYc+vtz2Qw==", "dependencies": { - "@sinonjs/commons": "^3.0.0" + "@smithy/abort-controller": "^2.0.15", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" } }, + "node_modules/@smithy/util-waiter/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, "node_modules/@tsconfig/node10": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", @@ -1537,6 +3495,15 @@ "@types/node": "*" } }, + "node_modules/@types/bytebuffer": { + "version": "5.0.48", + "resolved": "https://registry.npmjs.org/@types/bytebuffer/-/bytebuffer-5.0.48.tgz", + "integrity": "sha512-ormKm68NtTOtR8C/4jyRJEYbwKABXRkHHR/1fmkiuFbCQkltgtXSUGfldCSmJzvuyJvmBzWjBbOi79Ry/oJQug==", + "dependencies": { + "@types/long": "^3.0.0", + "@types/node": "*" + } + }, "node_modules/@types/connect": { "version": "3.4.35", "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz", @@ -1631,6 +3598,11 @@ "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", "dev": true }, + "node_modules/@types/long": { + "version": "3.0.32", + "resolved": "https://registry.npmjs.org/@types/long/-/long-3.0.32.tgz", + "integrity": "sha512-ZXyOOm83p7X8p3s0IYM3VeueNmHpkk/yMlP8CLeOnEcu6hIwPH7YjZBvhQkR0ZFS2DqZAxKtJ/M5fcuv3OU5BA==" + }, "node_modules/@types/mime": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.2.tgz", @@ -1640,8 +3612,7 @@ "node_modules/@types/node": { "version": "20.3.1", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.3.1.tgz", - "integrity": "sha512-EhcH/wvidPy1WeML3TtYFGR83UzjxeWRen9V402T8aUGYsCHOmfoisV3ZSg03gAFIbLq8TnWOJ0f4cALtnSEUg==", - "dev": true + "integrity": "sha512-EhcH/wvidPy1WeML3TtYFGR83UzjxeWRen9V402T8aUGYsCHOmfoisV3ZSg03gAFIbLq8TnWOJ0f4cALtnSEUg==" }, "node_modules/@types/node-fetch": { "version": "2.6.4", @@ -1987,6 +3958,11 @@ "url": "https://opencollective.com/typescript-eslint" } }, + "node_modules/abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" + }, "node_modules/accepts": { "version": "1.3.8", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", @@ -2027,6 +4003,17 @@ "node": ">=0.4.0" } }, + "node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, "node_modules/ajv": { "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", @@ -2074,7 +4061,6 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, "engines": { "node": ">=8" } @@ -2083,7 +4069,6 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, "dependencies": { "color-convert": "^2.0.1" }, @@ -2107,6 +4092,23 @@ "node": ">= 8" } }, + "node_modules/aproba": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", + "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==" + }, + "node_modules/are-we-there-yet": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz", + "integrity": "sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==", + "dependencies": { + "delegates": "^1.0.0", + "readable-stream": "^3.6.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/arg": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", @@ -2240,6 +4242,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/ascli": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ascli/-/ascli-1.0.1.tgz", + "integrity": "sha512-JGQaNxpaCJz9Bd1JvVaFIHuWn9S+l3xhN17R0V/vmUDiGE0QngNMXhjlqpwqV+91plWz9Fg+Lt28Lj7p5vjs8A==", + "dependencies": { + "colour": "~0.7.1", + "optjs": "~3.2.2" + } + }, "node_modules/assert-plus": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", @@ -2258,6 +4269,7 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", + "dev": true, "engines": { "node": ">= 0.4" }, @@ -2265,26 +4277,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/aws-sdk": { - "version": "2.1402.0", - "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1402.0.tgz", - "integrity": "sha512-ndyx3H+crHPIXJF+SO1dqzzBmQwMdoB9uCND/Ip4Ozfv5jse7X58LWpWucM9KBctQ8o37c8KvXjfTr14lE3ykA==", - "dependencies": { - "buffer": "4.9.2", - "events": "1.1.1", - "ieee754": "1.1.13", - "jmespath": "0.16.0", - "querystring": "0.2.0", - "sax": "1.2.1", - "url": "0.10.3", - "util": "^0.12.4", - "uuid": "8.0.0", - "xml2js": "0.5.0" - }, - "engines": { - "node": ">= 10.0.0" - } - }, "node_modules/babel-jest": { "version": "29.6.2", "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.6.2.tgz", @@ -2379,33 +4371,12 @@ "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "node_modules/base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, "node_modules/big-integer": { "version": "1.6.51", "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.51.tgz", "integrity": "sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg==", - "dev": true, "engines": { "node": ">=0.6" } @@ -2451,6 +4422,11 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, + "node_modules/bowser": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/bowser/-/bowser-2.11.0.tgz", + "integrity": "sha512-AlcaJBi/pqqJBIQ8U9Mcpc9i8Aqxn88Skv5d+xBX006BY5u8N3mGLHa5Lgppa7L/HfwgwLgZ6NYs+Ag6uUmJRA==" + }, "node_modules/bplist-parser": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.2.0.tgz", @@ -2467,7 +4443,6 @@ "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -2538,16 +4513,6 @@ "node-int64": "^0.4.0" } }, - "node_modules/buffer": { - "version": "4.9.2", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", - "integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==", - "dependencies": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4", - "isarray": "^1.0.0" - } - }, "node_modules/buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", @@ -2586,6 +4551,25 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/bytebuffer": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/bytebuffer/-/bytebuffer-5.0.1.tgz", + "integrity": "sha512-IuzSdmADppkZ6DlpycMkm8l9zeEq16fWtLvunEwFiYciR/BHo4E8/xs5piFquG+Za8OWmMqHF8zuRviz2LHvRQ==", + "dependencies": { + "long": "~3" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/bytebuffer/node_modules/long": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/long/-/long-3.2.0.tgz", + "integrity": "sha512-ZYvPPOMqUwPoDsbJaR10iQJYnMuZhRTvHYl62ErLIEX7RgFlziSBUUvrt3OVfc47QlHHpzPZYP17g3Fv7oeJkg==", + "engines": { + "node": ">=0.6" + } + }, "node_modules/bytes": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", @@ -2669,6 +4653,14 @@ "node": ">=10" } }, + "node_modules/chownr": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", + "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", + "engines": { + "node": ">=10" + } + }, "node_modules/ci-info": { "version": "3.8.0", "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz", @@ -2694,7 +4686,6 @@ "version": "8.0.1", "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "dev": true, "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.1", @@ -2722,6 +4713,14 @@ "node": ">= 0.12.0" } }, + "node_modules/code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/collect-v8-coverage": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz", @@ -2732,7 +4731,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, "dependencies": { "color-name": "~1.1.4" }, @@ -2743,8 +4741,23 @@ "node_modules/color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "node_modules/color-support": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", + "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", + "bin": { + "color-support": "bin.js" + } + }, + "node_modules/colour": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/colour/-/colour-0.7.1.tgz", + "integrity": "sha512-Rel466v0EnmKPcsxHo91L4kgPs/6XF7Pu2LJNszq9lXYwi5CFWEeIiRaTX5ym7PPMdj4udDHkLSVC1//JVkZQg==", + "engines": { + "node": ">=0.8" + } }, "node_modules/combined-stream": { "version": "1.0.8", @@ -2761,8 +4774,12 @@ "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" + }, + "node_modules/console-control-strings": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==" }, "node_modules/content-disposition": { "version": "0.5.4", @@ -2831,7 +4848,6 @@ "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, "dependencies": { "ms": "2.1.2" }, @@ -2844,6 +4860,14 @@ } } }, + "node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/dedent": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.1.tgz", @@ -2944,6 +4968,11 @@ "node": ">=0.4.0" } }, + "node_modules/delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==" + }, "node_modules/depd": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", @@ -2961,6 +4990,14 @@ "npm": "1.2.8000 || >= 1.4.16" } }, + "node_modules/detect-libc": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.2.tgz", + "integrity": "sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw==", + "engines": { + "node": ">=8" + } + }, "node_modules/detect-newline": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", @@ -3038,8 +5075,7 @@ "node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" }, "node_modules/encodeurl": { "version": "1.0.2", @@ -3155,7 +5191,6 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true, "engines": { "node": ">=6" } @@ -3631,14 +5666,6 @@ "node": ">= 0.6" } }, - "node_modules/events": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", - "integrity": "sha512-kEcvvCBByWXGnZy6JUlgAp2gBIUjfCAV6P6TgT1/aaQKcmuAEC4OZTV1I4EWQLz2gxZw76atuVyvHhTxvi0Flw==", - "engines": { - "node": ">=0.4.x" - } - }, "node_modules/execa": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/execa/-/execa-7.2.0.tgz", @@ -3802,6 +5829,27 @@ "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", "dev": true }, + "node_modules/fast-xml-parser": { + "version": "4.2.5", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.2.5.tgz", + "integrity": "sha512-B9/wizE4WngqQftFPmdaMYlXoJlJOYxGQOanC77fq9k8+Z0v5dDSVh+3glErdIROP//s/jgb7ZuxKfB8nVyo0g==", + "funding": [ + { + "type": "paypal", + "url": "https://paypal.me/naturalintelligence" + }, + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ], + "dependencies": { + "strnum": "^1.0.5" + }, + "bin": { + "fxparser": "src/cli/cli.js" + } + }, "node_modules/fastq": { "version": "1.15.0", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", @@ -3913,6 +5961,7 @@ "version": "0.3.3", "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dev": true, "dependencies": { "is-callable": "^1.1.3" } @@ -3947,11 +5996,32 @@ "node": ">= 0.6" } }, + "node_modules/fs-minipass": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/fs-minipass/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" }, "node_modules/fsevents": { "version": "2.3.2", @@ -3999,6 +6069,25 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/gauge": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-3.0.2.tgz", + "integrity": "sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==", + "dependencies": { + "aproba": "^1.0.3 || ^2.0.0", + "color-support": "^1.1.2", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.1", + "object-assign": "^4.1.1", + "signal-exit": "^3.0.0", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wide-align": "^1.1.2" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/generic-pool": { "version": "3.9.0", "resolved": "https://registry.npmjs.org/generic-pool/-/generic-pool-3.9.0.tgz", @@ -4020,7 +6109,6 @@ "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true, "engines": { "node": "6.* || 8.* || >= 10.*" } @@ -4080,7 +6168,6 @@ "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -4132,54 +6219,182 @@ "define-properties": "^1.1.3" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true + }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true + }, + "node_modules/grpc": { + "version": "1.24.11", + "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.24.11.tgz", + "integrity": "sha512-8/AQdFCzCeCDWW3SoaMNp6ccbRvTQEH1O1u1uFtt29eWsg5gSZCJ3m6fbkduEIh3smY7WAPP+LgVJ5n3nZRxcA==", + "deprecated": "This library will not receive further updates other than security fixes. We recommend using @grpc/grpc-js instead.", + "hasInstallScript": true, + "dependencies": { + "@mapbox/node-pre-gyp": "^1.0.4", + "@types/bytebuffer": "^5.0.40", + "lodash.camelcase": "^4.3.0", + "lodash.clone": "^4.5.0", + "nan": "^2.13.2", + "protobufjs": "^5.0.3" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/grpc/node_modules/ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/grpc/node_modules/camelcase": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", + "integrity": "sha512-DLIsRzJVBQu72meAKPkWQOLcujdXT32hwdfnkI1frSiSRMK1MofjKHf+MEx0SB6fjEFXL8fBDv1dKymBlOp4Qw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/grpc/node_modules/cliui": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha512-0yayqDxWQbqk3ojkYqUKqaAQ6AfNKeKWRNA8kR0WXzAsdHpP4BIaOmMAG87JGuO6qcobyW4GjxHd9PmhEd+T9w==", + "dependencies": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wrap-ansi": "^2.0.0" + } + }, + "node_modules/grpc/node_modules/is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw==", + "dependencies": { + "number-is-nan": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/grpc/node_modules/protobufjs": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-5.0.3.tgz", + "integrity": "sha512-55Kcx1MhPZX0zTbVosMQEO5R6/rikNXd9b6RQK4KSPcrSIIwoXTtebIczUrXlwaSrbz4x8XUVThGPob1n8I4QA==", + "dependencies": { + "ascli": "~1", + "bytebuffer": "~5", + "glob": "^7.0.5", + "yargs": "^3.10.0" + }, + "bin": { + "pbjs": "bin/pbjs" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/grpc/node_modules/string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha512-0XsVpQLnVCXHJfyEs8tC0zpTVIr5PKKsQtkT29IwupnPTjtPmQ3xT/4yCREF9hYkV/3M3kzcUTSAZT6a6h81tw==", + "dependencies": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" } }, - "node_modules/globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "dev": true, + "node_modules/grpc/node_modules/strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" + "ansi-regex": "^2.0.0" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=0.10.0" } }, - "node_modules/gopd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", - "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "node_modules/grpc/node_modules/wrap-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha512-vAaEaDM946gbNpH5pLVNR+vX2ht6n0Bt3GXwVB1AuAqZosOvHNF3P7wDnh8KLkSqgUh0uh77le7Owgoz+Z9XBw==", "dependencies": { - "get-intrinsic": "^1.1.3" + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">=0.10.0" } }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true + "node_modules/grpc/node_modules/y18n": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.2.tgz", + "integrity": "sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ==" }, - "node_modules/graphemer": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", - "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", - "dev": true + "node_modules/grpc/node_modules/yargs": { + "version": "3.32.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.32.0.tgz", + "integrity": "sha512-ONJZiimStfZzhKamYvR/xvmgW3uEkAUFSP91y2caTEPhzF6uP2JfPiVZcq66b/YR0C3uitxSV7+T1x8p5bkmMg==", + "dependencies": { + "camelcase": "^2.0.1", + "cliui": "^3.0.3", + "decamelize": "^1.1.1", + "os-locale": "^1.4.0", + "string-width": "^1.0.1", + "window-size": "^0.1.4", + "y18n": "^3.2.0" + } }, "node_modules/has": { "version": "1.0.3", @@ -4248,6 +6463,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "dev": true, "dependencies": { "has-symbols": "^1.0.2" }, @@ -4258,6 +6474,11 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==" + }, "node_modules/html-escaper": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", @@ -4279,6 +6500,18 @@ "node": ">= 0.8" } }, + "node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/human-signals": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-4.3.1.tgz", @@ -4299,11 +6532,6 @@ "node": ">=0.10.0" } }, - "node_modules/ieee754": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", - "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==" - }, "node_modules/ignore": { "version": "5.2.4", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", @@ -4361,7 +6589,6 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "dev": true, "dependencies": { "once": "^1.3.0", "wrappy": "1" @@ -4386,6 +6613,14 @@ "node": ">= 0.4" } }, + "node_modules/invert-kv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha512-xgs2NH9AE66ucSq4cNG1nhSFghr5l6tdL15Pk+jl46bmmBapgoaY/AacXyaDznAqmGL99TiLSQgO/XazFSKYeQ==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/ipaddr.js": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", @@ -4394,21 +6629,6 @@ "node": ">= 0.10" } }, - "node_modules/is-arguments": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", - "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", - "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-array-buffer": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", @@ -4461,6 +6681,7 @@ "version": "1.2.7", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "dev": true, "engines": { "node": ">= 0.4" }, @@ -4523,7 +6744,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, "engines": { "node": ">=8" } @@ -4537,20 +6757,6 @@ "node": ">=6" } }, - "node_modules/is-generator-function": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", - "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", @@ -4700,6 +6906,7 @@ "version": "1.1.10", "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.10.tgz", "integrity": "sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==", + "dev": true, "dependencies": { "available-typed-arrays": "^1.0.5", "call-bind": "^1.0.2", @@ -4753,11 +6960,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" - }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -5492,14 +7694,6 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, - "node_modules/jmespath": { - "version": "0.16.0", - "resolved": "https://registry.npmjs.org/jmespath/-/jmespath-0.16.0.tgz", - "integrity": "sha512-9FzQjJ7MATs1tSpnco1K6ayiYE3figslrXA72G2HQ/n76RzvYlofyi5QM+iX4YRs/pu3yzxlVQSST23+dMDknw==", - "engines": { - "node": ">= 0.6.0" - } - }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -5569,6 +7763,17 @@ "node": ">=6" } }, + "node_modules/lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha512-YiGkH6EnGrDGqLMITnGjXtGmNtjoXw9SVUzcaos8RBi7Ps0VBylkq+vOcY9QE5poLasPCR849ucFUkl0UzUyOw==", + "dependencies": { + "invert-kv": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/leven": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", @@ -5612,6 +7817,16 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==" + }, + "node_modules/lodash.clone": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.clone/-/lodash.clone-4.5.0.tgz", + "integrity": "sha512-GhrVeweiTD6uTmmn5hV/lzgCQhccwReIVRLHp7LT4SopOjqEZ5BbX8b5WWEtAKasjmy8hR7ZPwsYlxRCku5odg==" + }, "node_modules/lodash.memoize": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", @@ -5624,11 +7839,15 @@ "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, + "node_modules/long": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", + "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==" + }, "node_modules/lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, "dependencies": { "yallist": "^4.0.0" }, @@ -5761,7 +7980,6 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, "dependencies": { "brace-expansion": "^1.1.7" }, @@ -5778,11 +7996,57 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/minipass": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", + "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/minizlib": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", + "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", + "dependencies": { + "minipass": "^3.0.0", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/minizlib/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "node_modules/nan": { + "version": "2.18.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.18.0.tgz", + "integrity": "sha512-W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w==" }, "node_modules/natural-compare": { "version": "1.4.0", @@ -5835,6 +8099,31 @@ "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==", "dev": true }, + "node_modules/node-sql-parser": { + "version": "4.15.0", + "resolved": "https://registry.npmjs.org/node-sql-parser/-/node-sql-parser-4.15.0.tgz", + "integrity": "sha512-zckPbcES2qfR5WqlL+p1s6TualZCUxYO4xtvMUpoYvTJA8BmG0W55Hd8sJJYTKN/8OmxqgwOK68rUId+qWl6UA==", + "dependencies": { + "big-integer": "^1.6.48" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/nopt": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", + "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==", + "dependencies": { + "abbrev": "1" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", @@ -5871,6 +8160,33 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/npmlog": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-5.0.1.tgz", + "integrity": "sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==", + "dependencies": { + "are-we-there-yet": "^2.0.0", + "console-control-strings": "^1.1.0", + "gauge": "^3.0.0", + "set-blocking": "^2.0.0" + } + }, + "node_modules/number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/object-inspect": { "version": "1.12.3", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", @@ -5973,7 +8289,6 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, "dependencies": { "wrappy": "1" } @@ -6028,6 +8343,22 @@ "node": ">= 0.8.0" } }, + "node_modules/optjs": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/optjs/-/optjs-3.2.2.tgz", + "integrity": "sha512-f8lTJm4LKirX+45xsFhuRNjA4f46QVLQKfGoNH7e2AEWS+24eM4XNH4pQ8Tw2LISCIvbST/wNcLdtgvgcqVaxA==" + }, + "node_modules/os-locale": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "integrity": "sha512-PRT7ZORmwu2MEFt4/fv3Q+mEfN4zetKxufQrkShY2oGvUms9r8otu5HfdyIFHkYXjO7laNsoVGmM2MANfuTA8g==", + "dependencies": { + "lcid": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", @@ -6123,7 +8454,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -6483,6 +8813,29 @@ "node": ">= 6" } }, + "node_modules/protobufjs": { + "version": "7.2.5", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.5.tgz", + "integrity": "sha512-gGXRSXvxQ7UiPgfw8gevrfRWcTlSbOFg+p/N+JVJEK5VhueL2miT6qTymqAmjr1Q5WbOCyJbyrk6JfWKwlFn6A==", + "hasInstallScript": true, + "dependencies": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/node": ">=13.7.0", + "long": "^5.0.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/proxy-addr": { "version": "2.0.7", "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", @@ -6495,11 +8848,6 @@ "node": ">= 0.10" } }, - "node_modules/punycode": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha512-RofWgt/7fL5wP1Y7fxE7/EmTLzQVnB0ycyibJ0OOHIlJqTNzglYFxVwETOcIoJqJmpDXJ9xImDv+Fq34F/d4Dw==" - }, "node_modules/pure-rand": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.0.2.tgz", @@ -6530,15 +8878,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/querystring": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha512-X/xY82scca2tau62i9mDyU9K+I+djTMUsvwf7xnUX5GLvVzgJybOJf4Y6o9Zx3oJK/LSXg5tTZBjwzqVPaPO2g==", - "deprecated": "The querystring API is considered Legacy. new code should use the URLSearchParams API instead.", - "engines": { - "node": ">=0.4.x" - } - }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -6587,6 +8926,19 @@ "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", "dev": true }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/redis": { "version": "4.6.7", "resolved": "https://registry.npmjs.org/redis/-/redis-4.6.7.tgz", @@ -6621,7 +8973,6 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -6696,7 +9047,6 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, "dependencies": { "glob": "^7.1.3" }, @@ -6896,16 +9246,10 @@ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, - "node_modules/sax": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.1.tgz", - "integrity": "sha512-8I2a3LovHTOpm7NV5yOyO8IHqgVsfK4+UuySrXU8YXkSRX7k6hCV9b3HrkKCr3nMpgj+0bmocaJJWpvp1oc7ZA==" - }, "node_modules/semver": { "version": "7.5.4", "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dev": true, "dependencies": { "lru-cache": "^6.0.0" }, @@ -6971,6 +9315,11 @@ "node": ">= 0.8.0" } }, + "node_modules/set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==" + }, "node_modules/setprototypeof": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", @@ -7013,8 +9362,7 @@ "node_modules/signal-exit": { "version": "3.0.7", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" }, "node_modules/sisteransi": { "version": "1.0.5", @@ -7093,6 +9441,14 @@ "node": ">= 0.8" } }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, "node_modules/string-length": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", @@ -7110,7 +9466,6 @@ "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -7169,7 +9524,6 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, "dependencies": { "ansi-regex": "^5.0.1" }, @@ -7210,6 +9564,11 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/strnum": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/strnum/-/strnum-1.0.5.tgz", + "integrity": "sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==" + }, "node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -7256,6 +9615,22 @@ "integrity": "sha512-t0hLfiEKfMUoqhG+U1oid7Pva4bbDPHYfJNiB7BiIjRkj1pyC++4N3huJfqY6aRH6VTB0rvtzQwjM4K6qpfOig==", "dev": true }, + "node_modules/tar": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.0.tgz", + "integrity": "sha512-/Wo7DcT0u5HUV486xg675HtjNd3BXZ6xDbzsCUZPt5iw8bTQ63bP0Raut3mvro9u+CUyq7YQd8Cx55fsZXxqLQ==", + "dependencies": { + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "minipass": "^5.0.0", + "minizlib": "^2.1.1", + "mkdirp": "^1.0.3", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/tdigest": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/tdigest/-/tdigest-0.1.2.tgz", @@ -7449,8 +9824,7 @@ "node_modules/tslib": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, "node_modules/tsutils": { "version": "3.21.0", @@ -7670,26 +10044,10 @@ "node": ">=6" } }, - "node_modules/url": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/url/-/url-0.10.3.tgz", - "integrity": "sha512-hzSUW2q06EqL1gKM/a+obYHLIO6ct2hwPuviqTTOcfFVc61UbfJ2Q32+uGL/HCPxKqrdGB5QUwIe7UqlDgwsOQ==", - "dependencies": { - "punycode": "1.3.2", - "querystring": "0.2.0" - } - }, - "node_modules/util": { - "version": "0.12.5", - "resolved": "https://registry.npmjs.org/util/-/util-0.12.5.tgz", - "integrity": "sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==", - "dependencies": { - "inherits": "^2.0.3", - "is-arguments": "^1.0.4", - "is-generator-function": "^1.0.7", - "is-typed-array": "^1.1.3", - "which-typed-array": "^1.1.2" - } + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" }, "node_modules/utils-merge": { "version": "1.0.1", @@ -7699,14 +10057,6 @@ "node": ">= 0.4.0" } }, - "node_modules/uuid": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.0.0.tgz", - "integrity": "sha512-jOXGuXZAWdsTH7eZLtyXMqUb9EcWMGZNbL9YcGBJl4MH4nrxHmZJhEHvyLFrkxo+28uLb/NYRcStH48fnD0Vzw==", - "bin": { - "uuid": "dist/bin/uuid" - } - }, "node_modules/v8-compile-cache-lib": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", @@ -7852,6 +10202,7 @@ "version": "1.1.11", "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.11.tgz", "integrity": "sha512-qe9UWWpkeG5yzZ0tNYxDmd7vo58HDBc39mZ0xWWpolAGADdFOzkfamWLDxkOWcvHQKVmdTyQdLD4NOfjLWTKew==", + "dev": true, "dependencies": { "available-typed-arrays": "^1.0.5", "call-bind": "^1.0.2", @@ -7866,11 +10217,29 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/wide-align": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", + "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", + "dependencies": { + "string-width": "^1.0.2 || 2 || 3 || 4" + } + }, + "node_modules/window-size": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.4.tgz", + "integrity": "sha512-2thx4pB0cV3h+Bw7QmMXcEbdmOzv9t0HFplJH/Lz6yu60hXYy5RT8rUu+wlIreVxWsGN20mo+MHeCSfUpQBwPw==", + "bin": { + "window-size": "cli.js" + }, + "engines": { + "node": ">= 0.10.0" + } + }, "node_modules/wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -7886,8 +10255,7 @@ "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" }, "node_modules/write-file-atomic": { "version": "4.0.2", @@ -7902,26 +10270,6 @@ "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, - "node_modules/xml2js": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.5.0.tgz", - "integrity": "sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA==", - "dependencies": { - "sax": ">=0.6.0", - "xmlbuilder": "~11.0.0" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/xmlbuilder": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", - "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==", - "engines": { - "node": ">=4.0" - } - }, "node_modules/xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", @@ -7934,7 +10282,6 @@ "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true, "engines": { "node": ">=10" } @@ -7948,7 +10295,6 @@ "version": "17.7.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "dev": true, "dependencies": { "cliui": "^8.0.1", "escalade": "^3.1.1", @@ -7966,7 +10312,6 @@ "version": "21.1.1", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "dev": true, "engines": { "node": ">=12" } diff --git a/runner/protos/runner.proto b/runner/protos/runner.proto index 433d1e08f..59e7eae8b 100644 --- a/runner/protos/runner.proto +++ b/runner/protos/runner.proto @@ -5,6 +5,9 @@ service Runner { // Starts a new Runner stream worker rpc StartStream (StartStreamRequest) returns (StartStreamResponse); + // Updates an existing Runner stream worker + rpc UpdateStream (UpdateStreamRequest) returns (UpdateStreamResponse); + // Stops an existing Runner stream worker rpc StopStream (StopStreamRequest) returns (StopStreamResponse); @@ -24,6 +27,17 @@ message StartStreamResponse { string stream_id = 1; } +// Update Stream Request +message UpdateStreamRequest { + string stream_id = 1; + string indexer_config = 2; // JSON containing code, schema, etc. +} + +// Update Stream Response +message UpdateStreamResponse { + string stream_id = 1; +} + // Stop Stream Request message StopStreamRequest { string stream_id = 1; @@ -32,7 +46,6 @@ message StopStreamRequest { // Stop Stream Response message StopStreamResponse { string stream_id = 1; - string status = 2; } // List Stream Request diff --git a/runner/src/generated/runner.ts b/runner/src/generated/runner.ts index 38e3a613c..fbd94035f 100644 --- a/runner/src/generated/runner.ts +++ b/runner/src/generated/runner.ts @@ -17,6 +17,8 @@ export interface ProtoGrpcType { StopStreamRequest: MessageTypeDefinition StopStreamResponse: MessageTypeDefinition StreamInfo: MessageTypeDefinition + UpdateStreamRequest: MessageTypeDefinition + UpdateStreamResponse: MessageTypeDefinition } } diff --git a/runner/src/generated/spec/Runner.ts b/runner/src/generated/spec/Runner.ts index ae87a7446..fd4dc29ad 100644 --- a/runner/src/generated/spec/Runner.ts +++ b/runner/src/generated/spec/Runner.ts @@ -8,6 +8,8 @@ import type { StartStreamRequest as _spec_StartStreamRequest, StartStreamRequest import type { StartStreamResponse as _spec_StartStreamResponse, StartStreamResponse__Output as _spec_StartStreamResponse__Output } from '../spec/StartStreamResponse'; import type { StopStreamRequest as _spec_StopStreamRequest, StopStreamRequest__Output as _spec_StopStreamRequest__Output } from '../spec/StopStreamRequest'; import type { StopStreamResponse as _spec_StopStreamResponse, StopStreamResponse__Output as _spec_StopStreamResponse__Output } from '../spec/StopStreamResponse'; +import type { UpdateStreamRequest as _spec_UpdateStreamRequest, UpdateStreamRequest__Output as _spec_UpdateStreamRequest__Output } from '../spec/UpdateStreamRequest'; +import type { UpdateStreamResponse as _spec_UpdateStreamResponse, UpdateStreamResponse__Output as _spec_UpdateStreamResponse__Output } from '../spec/UpdateStreamResponse'; export interface RunnerClient extends grpc.Client { ListStreams(argument: _spec_ListStreamsRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_spec_ListStreamsResponse__Output>): grpc.ClientUnaryCall; @@ -37,6 +39,15 @@ export interface RunnerClient extends grpc.Client { stopStream(argument: _spec_StopStreamRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_spec_StopStreamResponse__Output>): grpc.ClientUnaryCall; stopStream(argument: _spec_StopStreamRequest, callback: grpc.requestCallback<_spec_StopStreamResponse__Output>): grpc.ClientUnaryCall; + UpdateStream(argument: _spec_UpdateStreamRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_spec_UpdateStreamResponse__Output>): grpc.ClientUnaryCall; + UpdateStream(argument: _spec_UpdateStreamRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_spec_UpdateStreamResponse__Output>): grpc.ClientUnaryCall; + UpdateStream(argument: _spec_UpdateStreamRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_spec_UpdateStreamResponse__Output>): grpc.ClientUnaryCall; + UpdateStream(argument: _spec_UpdateStreamRequest, callback: grpc.requestCallback<_spec_UpdateStreamResponse__Output>): grpc.ClientUnaryCall; + updateStream(argument: _spec_UpdateStreamRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_spec_UpdateStreamResponse__Output>): grpc.ClientUnaryCall; + updateStream(argument: _spec_UpdateStreamRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_spec_UpdateStreamResponse__Output>): grpc.ClientUnaryCall; + updateStream(argument: _spec_UpdateStreamRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_spec_UpdateStreamResponse__Output>): grpc.ClientUnaryCall; + updateStream(argument: _spec_UpdateStreamRequest, callback: grpc.requestCallback<_spec_UpdateStreamResponse__Output>): grpc.ClientUnaryCall; + } export interface RunnerHandlers extends grpc.UntypedServiceImplementation { @@ -46,10 +57,13 @@ export interface RunnerHandlers extends grpc.UntypedServiceImplementation { StopStream: grpc.handleUnaryCall<_spec_StopStreamRequest__Output, _spec_StopStreamResponse>; + UpdateStream: grpc.handleUnaryCall<_spec_UpdateStreamRequest__Output, _spec_UpdateStreamResponse>; + } export interface RunnerDefinition extends grpc.ServiceDefinition { ListStreams: MethodDefinition<_spec_ListStreamsRequest, _spec_ListStreamsResponse, _spec_ListStreamsRequest__Output, _spec_ListStreamsResponse__Output> StartStream: MethodDefinition<_spec_StartStreamRequest, _spec_StartStreamResponse, _spec_StartStreamRequest__Output, _spec_StartStreamResponse__Output> StopStream: MethodDefinition<_spec_StopStreamRequest, _spec_StopStreamResponse, _spec_StopStreamRequest__Output, _spec_StopStreamResponse__Output> + UpdateStream: MethodDefinition<_spec_UpdateStreamRequest, _spec_UpdateStreamResponse, _spec_UpdateStreamRequest__Output, _spec_UpdateStreamResponse__Output> } diff --git a/runner/src/generated/spec/StopStreamResponse.ts b/runner/src/generated/spec/StopStreamResponse.ts index eb88ded70..6296f4180 100644 --- a/runner/src/generated/spec/StopStreamResponse.ts +++ b/runner/src/generated/spec/StopStreamResponse.ts @@ -3,10 +3,8 @@ export interface StopStreamResponse { 'streamId'?: (string); - 'status'?: (string); } export interface StopStreamResponse__Output { 'streamId': (string); - 'status': (string); } diff --git a/runner/src/generated/spec/UpdateStreamRequest.ts b/runner/src/generated/spec/UpdateStreamRequest.ts new file mode 100644 index 000000000..8b731eb78 --- /dev/null +++ b/runner/src/generated/spec/UpdateStreamRequest.ts @@ -0,0 +1,12 @@ +// Original file: protos/runner.proto + + +export interface UpdateStreamRequest { + 'streamId'?: (string); + 'indexerConfig'?: (string); +} + +export interface UpdateStreamRequest__Output { + 'streamId': (string); + 'indexerConfig': (string); +} diff --git a/runner/src/generated/spec/UpdateStreamResponse.ts b/runner/src/generated/spec/UpdateStreamResponse.ts new file mode 100644 index 000000000..e9b0cc8e6 --- /dev/null +++ b/runner/src/generated/spec/UpdateStreamResponse.ts @@ -0,0 +1,10 @@ +// Original file: protos/runner.proto + + +export interface UpdateStreamResponse { + 'streamId'?: (string); +} + +export interface UpdateStreamResponse__Output { + 'streamId': (string); +} diff --git a/runner/src/service/runner-service.ts b/runner/src/service/runner-service.ts index da25b6ad4..159640a5f 100644 --- a/runner/src/service/runner-service.ts +++ b/runner/src/service/runner-service.ts @@ -2,9 +2,10 @@ import { type ServerUnaryCall, type sendUnaryData } from '@grpc/grpc-js'; import { type RunnerHandlers } from '../generated/spec/Runner'; import { type StartStreamResponse } from '../generated/spec/StartStreamResponse'; import { type StartStreamRequest } from '../generated/spec/StartStreamRequest'; +import { type UpdateStreamRequest } from '../generated/spec/UpdateStreamRequest'; +import { type UpdateStreamResponse } from '../generated/spec/UpdateStreamResponse'; import { type StopStreamRequest } from '../generated/spec/StopStreamRequest'; import { type StopStreamResponse } from '../generated/spec/StopStreamResponse'; -// import { type ListStreamsRequest } from '../generated/spec/ListStreamsRequest'; import { type ListStreamsResponse } from '../generated/spec/ListStreamsResponse'; import StreamHandler from '../stream-handler'; import * as grpc from '@grpc/grpc-js'; @@ -14,8 +15,7 @@ const streamHandlers: StreamHandlers = {}; const RunnerService: RunnerHandlers = { StartStream (call: ServerUnaryCall, callback: sendUnaryData): void { - console.log('StartStream called', call.request); - console.log(call.request); + console.log('StartStream called'); // Validate request const validationResult = validateStartStreamRequest(call.request); if (validationResult !== null) { @@ -26,10 +26,37 @@ const RunnerService: RunnerHandlers = { // Handle request try { if (call.request.streamId === undefined || call.request.redisStream === undefined) { - throw new Error('Validation failed to catch invalid request'); + throw new Error('Validation failed to catch invalid start request'); } - const streamHandler = new StreamHandler(call.request.redisStream ?? ''); - streamHandlers[call.request.streamId ?? ''] = streamHandler; + const streamHandler = new StreamHandler(call.request.redisStream); // TODO: Supply validated IndexerConfig + streamHandlers[call.request.streamId] = streamHandler; + callback(null, { streamId: call.request.streamId }); + } catch (error) { + callback(handleInternalError(error), null); + } + }, + + UpdateStream (call: ServerUnaryCall, callback: sendUnaryData): void { + console.log('UpdateStream called'); + // Validate request + const validationResult = validateUpdateStreamRequest(call.request); + if (validationResult !== null) { + callback(validationResult, null); + return; + } + + // Handle request + try { + if (call.request.streamId === undefined || call.request.indexerConfig === undefined) { + throw new Error('Validation failed to catch invalid update request'); + } + const config = JSON.parse(call.request.indexerConfig); + streamHandlers[call.request.streamId].updateIndexerConfig({ + account_id: config.account_id, + function_name: config.function_name, + code: config.code, + schema: config.schema + }); callback(null, { streamId: call.request.streamId }); } catch (error) { callback(handleInternalError(error), null); @@ -45,15 +72,22 @@ const RunnerService: RunnerHandlers = { return; } - streamHandlers[call.request.streamId ?? '']?.stop().catch(error => { - const grpcError = handleInternalError(error); - callback(grpcError, null); - }); - callback(null, { status: 'OK', streamId: call.request.streamId }); + // Handle request + if (call.request.streamId === undefined) { + throw new Error('Validation failed to catch invalid stop request'); + } + streamHandlers[call.request.streamId]?.stop() + .then(() => { + callback(null, { streamId: call.request.streamId }); + }).catch(error => { + const grpcError = handleInternalError(error); + callback(grpcError, null); + }); }, ListStreams (_, callback: sendUnaryData): void { console.log('ListStreams called'); + // TODO: Return more information than just streamId callback(null, { streams: Object.keys(streamHandlers).map(stream => { return { streamId: stream }; @@ -86,7 +120,7 @@ function validateStartStreamRequest (request: StartStreamRequest): any | null { return grpcError; } if (streamHandlers[request.streamId] !== undefined) { - grpcError.message = `Stream ${request.streamId} can't be started as it already exists`; + grpcError.message = `Stream ${request.streamId as string} can't be started as it already exists`; return grpcError; } @@ -101,6 +135,26 @@ function validateStartStreamRequest (request: StartStreamRequest): any | null { return null; } +function validateUpdateStreamRequest (request: StartStreamRequest): any | null { + const grpcError = { + code: grpc.status.INVALID_ARGUMENT, + message: '' + }; + // Validate streamId + if (request.streamId === undefined || request.streamId.trim() === '') { + grpcError.message = 'Invalid streamId. It must be a non-empty string.'; + return grpcError; + } + if (streamHandlers[request.streamId] === undefined) { + grpcError.message = `Stream ${request.streamId as string} cannot be updated as it does not exist`; + return grpcError; + } + + // Validate indexerConfig + + return null; +} + function validateStopStreamRequest (request: StartStreamRequest): any | null { const grpcError = { code: grpc.status.INVALID_ARGUMENT, @@ -112,7 +166,7 @@ function validateStopStreamRequest (request: StartStreamRequest): any | null { return grpcError; } if (streamHandlers[request.streamId] === undefined) { - grpcError.message = `Stream ${request.streamId} cannot be stopped as it doesn't exist`; + grpcError.message = `Stream ${request.streamId as string} cannot be stopped as it does not exist`; return grpcError; } diff --git a/runner/src/stream-handler/stream-handler.ts b/runner/src/stream-handler/stream-handler.ts index 59e3d0178..6cd05b02a 100644 --- a/runner/src/stream-handler/stream-handler.ts +++ b/runner/src/stream-handler/stream-handler.ts @@ -3,16 +3,25 @@ import { Worker, isMainThread } from 'worker_threads'; import { registerWorkerMetrics } from '../metrics'; +export interface IndexerConfig { + account_id: string + function_name: string + code: string + schema: string +} + export default class StreamHandler { private readonly worker: Worker; constructor ( - public readonly streamKey: string + public readonly streamKey: string, + public readonly indexerConfig: IndexerConfig | undefined = undefined ) { if (isMainThread) { this.worker = new Worker(path.join(__dirname, 'worker.js'), { workerData: { streamKey, + indexerConfig, }, }); @@ -27,6 +36,12 @@ export default class StreamHandler { await this.worker.terminate(); } + updateIndexerConfig (indexerConfig: IndexerConfig): void { + this.worker.postMessage({ + indexerConfig, + }); + } + private handleError (error: Error): void { console.log(`Encountered error processing stream: ${this.streamKey}, terminating thread`, error); this.worker.terminate().catch(() => { diff --git a/runner/src/stream-handler/worker.ts b/runner/src/stream-handler/worker.ts index 13947d0ad..8240bab31 100644 --- a/runner/src/stream-handler/worker.ts +++ b/runner/src/stream-handler/worker.ts @@ -6,6 +6,7 @@ import RedisClient, { type StreamType } from '../redis-client'; import { METRICS } from '../metrics'; import type { Block } from '@near-lake/primitives'; import LakeClient from '../lake-client'; +import { type IndexerConfig } from './stream-handler'; if (isMainThread) { throw new Error('Worker should not be run on main thread'); @@ -26,8 +27,18 @@ interface WorkerContext { const sleep = async (ms: number): Promise => { await new Promise((resolve) => setTimeout(resolve, ms)); }; +let config: IndexerConfig | undefined; + +parentPort?.on('message', (message) => { + if (message.indexerConfig) { + // Update the streamKey inside the Worker + config = message.indexerConfig; + } +}); + void (async function main () { - const { streamKey } = workerData; + const { streamKey, indexerConfig } = workerData; + config = indexerConfig; const redisClient = new RedisClient(); const workerContext: WorkerContext = { redisClient, @@ -92,7 +103,8 @@ async function blockQueueConsumer (workerContext: WorkerContext, streamKey: stri continue; } const startTime = performance.now(); - const indexerConfig = await workerContext.redisClient.getStreamStorage(streamKey); + // TODO: Verify no case where stream storage is more up to date than config variable + const indexerConfig = config ?? await workerContext.redisClient.getStreamStorage(streamKey); indexerName = `${indexerConfig.account_id}/${indexerConfig.function_name}`; const functions = { [indexerName]: { diff --git a/runner/test.sh b/runner/test.sh new file mode 100755 index 000000000..fa8755b94 --- /dev/null +++ b/runner/test.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +# PostgreSQL superuser credentials +PG_SUPERUSER="postgres" +PG_SUPERUSER_PASSWORD="postgres" + +# Exclude these databases and users +EXCLUDED_DATABASES="'postgres', 'template0', 'template1'" +EXCLUDED_USERS="'postgres'" + +# Get a list of databases, excluding the defaults +DATABASES=$(psql -U $PG_SUPERUSER -t -c "SELECT datname FROM pg_database WHERE datname NOT IN ($EXCLUDED_DATABASES);") + +# Get a list of users, excluding 'postgres' +USERS=$(psql -U $PG_SUPERUSER -t -c "SELECT usename FROM pg_user WHERE usename NOT IN ($EXCLUDED_USERS);") + +# Drop each database +for db in $DATABASES; do + echo "Dropping database: $db" + psql -U $PG_SUPERUSER -c "DROP DATABASE IF EXISTS $db;" +done + +# Drop each user +for user in $USERS; do + echo "Dropping user: $user" + psql -U $PG_SUPERUSER -c "DROP USER IF EXISTS $user;" +done + +echo "All non-default databases and users have been dropped." From 51b8e3c506a92c2b099d9e8597612cb8252c4e08 Mon Sep 17 00:00:00 2001 From: Darun Seethammagari Date: Fri, 15 Dec 2023 15:49:17 -0800 Subject: [PATCH 05/18] Fully working APIs and test client --- runner/src/index.ts | 2 +- runner/src/service/runner-service.ts | 125 ++++++++++++++++++--------- runner/src/stream-handler/worker.ts | 6 +- runner/src/test-client.ts | 79 +++++++++++++---- 4 files changed, 151 insertions(+), 61 deletions(-) diff --git a/runner/src/index.ts b/runner/src/index.ts index dabc2b004..185e9455d 100644 --- a/runner/src/index.ts +++ b/runner/src/index.ts @@ -21,7 +21,7 @@ void (async function main () { while (true) { // const streamKeys = await redisClient.getStreams(); - const streamKeys = ['darunrs.near/test_social_feed:real_time:stream']; + const streamKeys: string[] = []; streamKeys.forEach((streamKey) => { if (streamHandlers[streamKey] !== undefined) { diff --git a/runner/src/service/runner-service.ts b/runner/src/service/runner-service.ts index 159640a5f..b3becfa83 100644 --- a/runner/src/service/runner-service.ts +++ b/runner/src/service/runner-service.ts @@ -6,16 +6,18 @@ import { type UpdateStreamRequest } from '../generated/spec/UpdateStreamRequest' import { type UpdateStreamResponse } from '../generated/spec/UpdateStreamResponse'; import { type StopStreamRequest } from '../generated/spec/StopStreamRequest'; import { type StopStreamResponse } from '../generated/spec/StopStreamResponse'; +import { type ListStreamsRequest } from '../generated/spec/ListStreamsRequest'; import { type ListStreamsResponse } from '../generated/spec/ListStreamsResponse'; import StreamHandler from '../stream-handler'; import * as grpc from '@grpc/grpc-js'; +import assert from 'assert'; -type StreamHandlers = Record; -const streamHandlers: StreamHandlers = {}; +type StreamHandlers = Map; +const streamHandlers: StreamHandlers = new Map(); const RunnerService: RunnerHandlers = { StartStream (call: ServerUnaryCall, callback: sendUnaryData): void { - console.log('StartStream called'); + console.log('StartStream called', call.request); // Validate request const validationResult = validateStartStreamRequest(call.request); if (validationResult !== null) { @@ -25,11 +27,9 @@ const RunnerService: RunnerHandlers = { // Handle request try { - if (call.request.streamId === undefined || call.request.redisStream === undefined) { - throw new Error('Validation failed to catch invalid start request'); - } + assert(call.request.streamId !== undefined && call.request.redisStream !== undefined, 'Validation failed to catch invalid start request'); const streamHandler = new StreamHandler(call.request.redisStream); // TODO: Supply validated IndexerConfig - streamHandlers[call.request.streamId] = streamHandler; + streamHandlers.set(call.request.streamId, streamHandler); callback(null, { streamId: call.request.streamId }); } catch (error) { callback(handleInternalError(error), null); @@ -37,7 +37,7 @@ const RunnerService: RunnerHandlers = { }, UpdateStream (call: ServerUnaryCall, callback: sendUnaryData): void { - console.log('UpdateStream called'); + console.log('UpdateStream called', call.request); // Validate request const validationResult = validateUpdateStreamRequest(call.request); if (validationResult !== null) { @@ -47,11 +47,9 @@ const RunnerService: RunnerHandlers = { // Handle request try { - if (call.request.streamId === undefined || call.request.indexerConfig === undefined) { - throw new Error('Validation failed to catch invalid update request'); - } + assert(call.request.streamId !== undefined && call.request.indexerConfig !== undefined, 'Validation failed to catch invalid update request'); const config = JSON.parse(call.request.indexerConfig); - streamHandlers[call.request.streamId].updateIndexerConfig({ + streamHandlers.get(call.request.streamId)?.updateIndexerConfig({ account_id: config.account_id, function_name: config.function_name, code: config.code, @@ -64,7 +62,7 @@ const RunnerService: RunnerHandlers = { }, StopStream (call: ServerUnaryCall, callback: sendUnaryData): void { - console.log('StopStream called'); + console.log('StopStream called', call.request); // Validate request const validationResult = validateStopStreamRequest(call.request); if (validationResult !== null) { @@ -73,20 +71,20 @@ const RunnerService: RunnerHandlers = { } // Handle request - if (call.request.streamId === undefined) { - throw new Error('Validation failed to catch invalid stop request'); - } - streamHandlers[call.request.streamId]?.stop() + assert(call.request.streamId !== undefined, 'Validation failed to catch invalid stop request'); + const streamId: string = call.request.streamId; + streamHandlers.get(streamId)?.stop() .then(() => { - callback(null, { streamId: call.request.streamId }); + callback(null, { streamId }); + streamHandlers.delete(streamId); }).catch(error => { const grpcError = handleInternalError(error); callback(grpcError, null); }); }, - ListStreams (_, callback: sendUnaryData): void { - console.log('ListStreams called'); + ListStreams (call: ServerUnaryCall, callback: sendUnaryData): void { + console.log('ListStreams called', call.request); // TODO: Return more information than just streamId callback(null, { streams: Object.keys(streamHandlers).map(stream => { @@ -109,29 +107,69 @@ function handleInternalError (error: unknown): any { }; } +function validateStringParameter (parameter: string | undefined, parameterName: string): any | null { + const grpcError = { + code: grpc.status.INVALID_ARGUMENT, + message: '' + }; + if (parameter === undefined || parameter.trim() === '') { + grpcError.message = `Invalid ${parameterName}. It must be a non-empty string.`; + return grpcError; + } + return null; +} + +function validateIndexerConfig (indexerConfig: string | undefined): any | null { + const grpcError = { + code: grpc.status.INVALID_ARGUMENT, + message: '' + }; + const validation = validateStringParameter(indexerConfig, 'indexerConfig'); + if (validation !== null) { + return validation; + } + assert(indexerConfig !== undefined); + try { + const config = JSON.parse(indexerConfig); + if (config.account_id === undefined || config.function_name === undefined || config.code === undefined || config.schema === undefined) { + grpcError.message = 'Invalid indexer config. It must contain account id, function name, code, and schema.'; + return grpcError; + } + } catch (error) { + grpcError.message = 'Invalid indexer config. It must be a valid JSON string.'; + return grpcError; + } + return null; +} + function validateStartStreamRequest (request: StartStreamRequest): any | null { const grpcError = { code: grpc.status.INVALID_ARGUMENT, message: '' }; + // Validate streamId - if (request.streamId === undefined || request.streamId.trim() === '') { - grpcError.message = 'Invalid streamId. It must be a non-empty string.'; - return grpcError; + let validationResult = validateStringParameter(request.streamId, 'streamId'); + if (validationResult !== null) { + return validationResult; } - if (streamHandlers[request.streamId] !== undefined) { - grpcError.message = `Stream ${request.streamId as string} can't be started as it already exists`; + assert(request.streamId !== undefined); + if (streamHandlers.get(request.streamId) !== undefined) { + grpcError.message = `Stream ${request.streamId} can't be started as it already exists`; return grpcError; } // Validate redisStream - if (request.redisStream === undefined || request.redisStream.trim() === '') { - grpcError.message = 'Invalid redisStream. It must be a non-empty string.'; - return grpcError; + validationResult = validateStringParameter(request.redisStream, 'redisStream'); + if (validationResult !== null) { + return validationResult; } // Validate indexerConfig - + validationResult = validateIndexerConfig(request.indexerConfig); + if (validationResult !== null) { + return validationResult; + } return null; } @@ -140,18 +178,23 @@ function validateUpdateStreamRequest (request: StartStreamRequest): any | null { code: grpc.status.INVALID_ARGUMENT, message: '' }; + // Validate streamId - if (request.streamId === undefined || request.streamId.trim() === '') { - grpcError.message = 'Invalid streamId. It must be a non-empty string.'; - return grpcError; + let validationResult = validateStringParameter(request.streamId, 'streamId'); + if (validationResult !== null) { + return validationResult; } - if (streamHandlers[request.streamId] === undefined) { - grpcError.message = `Stream ${request.streamId as string} cannot be updated as it does not exist`; + assert(request.streamId !== undefined); + if (streamHandlers.get(request.streamId) === undefined) { + grpcError.message = `Stream ${request.streamId} cannot be updated as it does not exist`; return grpcError; } // Validate indexerConfig - + validationResult = validateIndexerConfig(request.indexerConfig); + if (validationResult !== null) { + return validationResult; + } return null; } @@ -160,13 +203,15 @@ function validateStopStreamRequest (request: StartStreamRequest): any | null { code: grpc.status.INVALID_ARGUMENT, message: '' }; + // Validate streamId - if (request.streamId === undefined || request.streamId.trim() === '') { - grpcError.message = 'Invalid streamId. It must be a non-empty string.'; - return grpcError; + const validationResult = validateStringParameter(request.streamId, 'streamId'); + if (validationResult !== null) { + return validationResult; } - if (streamHandlers[request.streamId] === undefined) { - grpcError.message = `Stream ${request.streamId as string} cannot be stopped as it does not exist`; + assert(request.streamId !== undefined); + if (streamHandlers.get(request.streamId) === undefined) { + grpcError.message = `Stream ${request.streamId} cannot be stopped as it does not exist`; return grpcError; } diff --git a/runner/src/stream-handler/worker.ts b/runner/src/stream-handler/worker.ts index 8240bab31..1fa72fdb1 100644 --- a/runner/src/stream-handler/worker.ts +++ b/runner/src/stream-handler/worker.ts @@ -92,7 +92,7 @@ async function blockQueueProducer (workerContext: WorkerContext, streamKey: stri async function blockQueueConsumer (workerContext: WorkerContext, streamKey: string): Promise { const indexer = new Indexer(); const isHistorical = workerContext.streamType === 'historical'; - let streamMessageId = ''; + // let streamMessageId = ''; let indexerName = ''; let currBlockHeight = 0; @@ -122,7 +122,7 @@ async function blockQueueConsumer (workerContext: WorkerContext, streamKey: stri } const block = queueMessage.block; currBlockHeight = block.blockHeight; - streamMessageId = queueMessage.streamMessageId; + // streamMessageId = queueMessage.streamMessageId; if (block === undefined || block.blockHeight == null) { console.error('Block failed to process or does not have block height', block); @@ -131,7 +131,7 @@ async function blockQueueConsumer (workerContext: WorkerContext, streamKey: stri METRICS.BLOCK_WAIT_DURATION.labels({ indexer: indexerName, type: workerContext.streamType }).observe(performance.now() - blockStartTime); await indexer.runFunctions(block, functions, isHistorical, { provision: true }); - await workerContext.redisClient.deleteStreamMessage(streamKey, streamMessageId); + // await workerContext.redisClient.deleteStreamMessage(streamKey, streamMessageId); await workerContext.queue.shift(); METRICS.EXECUTION_DURATION.labels({ indexer: indexerName, type: workerContext.streamType }).observe(performance.now() - startTime); diff --git a/runner/src/test-client.ts b/runner/src/test-client.ts index d436b3d05..6da528129 100644 --- a/runner/src/test-client.ts +++ b/runner/src/test-client.ts @@ -1,32 +1,77 @@ import runnerClient from './service/runner-client'; +const indexer = { + account_id: 'darunrs.near', + redis_stream: 'darunrs.near/test_sweat_blockheight:real_time:stream', + function_name: 'test_sweat_blockheight', + code: "\n const h = block.header().height;\n await context.set('height', h);\n", + start_block_height: 106881495, + schema: 'CREATE TABLE\n' + + ' "indexer_storage" (\n' + + ' "function_name" TEXT NOT NULL,\n' + + ' "key_name" TEXT NOT NULL,\n' + + ' "value" TEXT NOT NULL,\n' + + ' PRIMARY KEY ("function_name", "key_name")\n' + + ' )\n', + provisioned: true, + indexer_rule: { + indexer_rule_kind: 'Action', + matching_rule: { + rule: 'ACTION_ANY', + affected_account_id: 'token.sweat', + status: 'SUCCESS' + }, + id: null, + name: null + } +}; + +const updateCode = '\n const h = block.header().height;\n'; + +const sleep = async (ms: number): Promise => { await new Promise((resolve) => setTimeout(resolve, ms)); }; + void (async function main () { let count = 0; - while (count < 6) { - console.log('count: ', count); - if (count === 3) { + while (count < 20) { + if (count === 4) { runnerClient.StartStream({ - streamId: 'flatirons.near/demo_blockheight:real_time:stream', - redisStream: 'flatirons.near/demo_blockheight:real_time:stream', + streamId: 'darunrs sweat blockheight', + redisStream: indexer.redis_stream, + indexerConfig: JSON.stringify(indexer) }, (err, response) => { if (err) { console.error('error: ', err); } else { - console.log('response: ', response); + console.log('start: ', response); + } + }); + } + if (count === 9) { + indexer.code = updateCode; + runnerClient.UpdateStream({ + streamId: 'darunrs sweat blockheight', + indexerConfig: JSON.stringify(indexer) + }, (err, response) => { + if (err) { + console.error('error: ', err); + } else { + console.log('update: ', response); + } + }); + } + if (count === 14) { + indexer.code = updateCode; + runnerClient.StopStream({ + streamId: 'darunrs sweat blockheight', + }, (err, response) => { + if (err) { + console.error('error: ', err); + } else { + console.log('stop: ', response); } }); } - - runnerClient.ListStreams({}, (err, response) => { - if (err) { - console.error('error: ', err); - } else { - console.log('response: ', response); - } - }); - await new Promise((resolve) => - setTimeout(resolve, 1000), - ); count++; + await sleep(1000); } })(); From 4307765f75593808b152c940e5076d3685ed3717 Mon Sep 17 00:00:00 2001 From: Darun Seethammagari Date: Fri, 15 Dec 2023 17:48:39 -0800 Subject: [PATCH 06/18] Update service code for mocking --- runner/src/service/runner-server.ts | 5 +- runner/src/service/runner-service.test.ts | 24 ++++ runner/src/service/runner-service.ts | 166 ++++++++++++---------- 3 files changed, 115 insertions(+), 80 deletions(-) create mode 100644 runner/src/service/runner-service.test.ts diff --git a/runner/src/service/runner-server.ts b/runner/src/service/runner-server.ts index 39a201c1d..402f808d3 100644 --- a/runner/src/service/runner-server.ts +++ b/runner/src/service/runner-server.ts @@ -1,7 +1,8 @@ import * as grpc from '@grpc/grpc-js'; import * as protoLoader from '@grpc/proto-loader'; -import RunnerService from './runner-service'; +import getRunnerService from './runner-service'; import { type ProtoGrpcType } from '../generated/runner'; +import StreamHandler from '../stream-handler/stream-handler'; const PROTO_PATH = 'protos/runner.proto'; @@ -12,7 +13,7 @@ export default function startServer (): grpc.Server { ) as unknown) as ProtoGrpcType; const server = new grpc.Server(); - server.addService(runnerProto.spec.Runner.service, RunnerService); + server.addService(runnerProto.spec.Runner.service, getRunnerService(StreamHandler)); const credentials = grpc.ServerCredentials; server.bindAsync( diff --git a/runner/src/service/runner-service.test.ts b/runner/src/service/runner-service.test.ts new file mode 100644 index 000000000..375fede79 --- /dev/null +++ b/runner/src/service/runner-service.test.ts @@ -0,0 +1,24 @@ +import type StreamHandler from '../stream-handler/stream-handler'; +import getRunnerService from './runner-service'; + +describe('Runner gRPC Service', () => { + let genericStreamHandlerType: typeof StreamHandler; + beforeEach(() => { + genericStreamHandlerType = jest.fn().mockImplementation(() => { + return { updateIndexerConfig: jest.fn() }; + }); + }); + + it('starts a stream', () => { + const service = getRunnerService(genericStreamHandlerType); + const mockCallback = jest.fn() as unknown as any; + const request = { + request: { + streamId: 'test-stream-id', + } + } as unknown as any; + service.StartStream(request, mockCallback); + // expect(genericStreamHandlerType).toHaveBeenCalledWith(undefined, undefined); + expect(mockCallback).toHaveBeenCalledWith({}, { streamId: 'test-stream-id' }); + }); +}); diff --git a/runner/src/service/runner-service.ts b/runner/src/service/runner-service.ts index b3becfa83..56746ba6c 100644 --- a/runner/src/service/runner-service.ts +++ b/runner/src/service/runner-service.ts @@ -8,91 +8,101 @@ import { type StopStreamRequest } from '../generated/spec/StopStreamRequest'; import { type StopStreamResponse } from '../generated/spec/StopStreamResponse'; import { type ListStreamsRequest } from '../generated/spec/ListStreamsRequest'; import { type ListStreamsResponse } from '../generated/spec/ListStreamsResponse'; -import StreamHandler from '../stream-handler'; +import type StreamHandler from '../stream-handler'; import * as grpc from '@grpc/grpc-js'; import assert from 'assert'; type StreamHandlers = Map; const streamHandlers: StreamHandlers = new Map(); -const RunnerService: RunnerHandlers = { - StartStream (call: ServerUnaryCall, callback: sendUnaryData): void { - console.log('StartStream called', call.request); - // Validate request - const validationResult = validateStartStreamRequest(call.request); - if (validationResult !== null) { - callback(validationResult, null); - return; - } - - // Handle request - try { - assert(call.request.streamId !== undefined && call.request.redisStream !== undefined, 'Validation failed to catch invalid start request'); - const streamHandler = new StreamHandler(call.request.redisStream); // TODO: Supply validated IndexerConfig - streamHandlers.set(call.request.streamId, streamHandler); - callback(null, { streamId: call.request.streamId }); - } catch (error) { - callback(handleInternalError(error), null); - } - }, - - UpdateStream (call: ServerUnaryCall, callback: sendUnaryData): void { - console.log('UpdateStream called', call.request); - // Validate request - const validationResult = validateUpdateStreamRequest(call.request); - if (validationResult !== null) { - callback(validationResult, null); - return; - } - - // Handle request - try { - assert(call.request.streamId !== undefined && call.request.indexerConfig !== undefined, 'Validation failed to catch invalid update request'); - const config = JSON.parse(call.request.indexerConfig); - streamHandlers.get(call.request.streamId)?.updateIndexerConfig({ - account_id: config.account_id, - function_name: config.function_name, - code: config.code, - schema: config.schema +function getRunnerService (StreamHandlerType: typeof StreamHandler): RunnerHandlers { + const RunnerService: RunnerHandlers = { + StartStream (call: ServerUnaryCall, callback: sendUnaryData): void { + console.log('StartStream called', call.request); + // Validate request + const validationResult = validateStartStreamRequest(call.request); + if (validationResult !== null) { + callback(validationResult, null); + return; + } + + // Handle request + try { + assert(call.request.streamId !== undefined && call.request.redisStream !== undefined && call.request.indexerConfig !== undefined, + 'Validation failed to catch invalid start request'); + const config = JSON.parse(call.request.indexerConfig); + const streamHandler = new StreamHandlerType(call.request.redisStream, { + account_id: config.account_id, + function_name: config.function_name, + code: config.code, + schema: config.schema + }); + streamHandlers.set(call.request.streamId, streamHandler); + callback(null, { streamId: call.request.streamId }); + } catch (error) { + callback(handleInternalError(error), null); + } + }, + + UpdateStream (call: ServerUnaryCall, callback: sendUnaryData): void { + console.log('UpdateStream called', call.request); + // Validate request + const validationResult = validateUpdateStreamRequest(call.request); + if (validationResult !== null) { + callback(validationResult, null); + return; + } + + // Handle request + try { + assert(call.request.streamId !== undefined && call.request.indexerConfig !== undefined, 'Validation failed to catch invalid update request'); + const config = JSON.parse(call.request.indexerConfig); + streamHandlers.get(call.request.streamId)?.updateIndexerConfig({ + account_id: config.account_id, + function_name: config.function_name, + code: config.code, + schema: config.schema + }); + callback(null, { streamId: call.request.streamId }); + } catch (error) { + callback(handleInternalError(error), null); + } + }, + + StopStream (call: ServerUnaryCall, callback: sendUnaryData): void { + console.log('StopStream called', call.request); + // Validate request + const validationResult = validateStopStreamRequest(call.request); + if (validationResult !== null) { + callback(validationResult, null); + return; + } + + // Handle request + assert(call.request.streamId !== undefined, 'Validation failed to catch invalid stop request'); + const streamId: string = call.request.streamId; + streamHandlers.get(streamId)?.stop() + .then(() => { + callback(null, { streamId }); + streamHandlers.delete(streamId); + }).catch(error => { + const grpcError = handleInternalError(error); + callback(grpcError, null); + }); + }, + + ListStreams (call: ServerUnaryCall, callback: sendUnaryData): void { + console.log('ListStreams called', call.request); + // TODO: Return more information than just streamId + callback(null, { + streams: Object.keys(streamHandlers).map(stream => { + return { streamId: stream }; + }) }); - callback(null, { streamId: call.request.streamId }); - } catch (error) { - callback(handleInternalError(error), null); - } - }, - - StopStream (call: ServerUnaryCall, callback: sendUnaryData): void { - console.log('StopStream called', call.request); - // Validate request - const validationResult = validateStopStreamRequest(call.request); - if (validationResult !== null) { - callback(validationResult, null); - return; } - - // Handle request - assert(call.request.streamId !== undefined, 'Validation failed to catch invalid stop request'); - const streamId: string = call.request.streamId; - streamHandlers.get(streamId)?.stop() - .then(() => { - callback(null, { streamId }); - streamHandlers.delete(streamId); - }).catch(error => { - const grpcError = handleInternalError(error); - callback(grpcError, null); - }); - }, - - ListStreams (call: ServerUnaryCall, callback: sendUnaryData): void { - console.log('ListStreams called', call.request); - // TODO: Return more information than just streamId - callback(null, { - streams: Object.keys(streamHandlers).map(stream => { - return { streamId: stream }; - }) - }); - } -}; + }; + return RunnerService; +} function handleInternalError (error: unknown): any { let errorMessage = 'An unknown error occurred'; @@ -218,4 +228,4 @@ function validateStopStreamRequest (request: StartStreamRequest): any | null { return null; } -export default RunnerService; +export default getRunnerService; From a5c109b504c10a54a9be6f3d27e1d53d7fdaeffe Mon Sep 17 00:00:00 2001 From: Darun Seethammagari Date: Mon, 18 Dec 2023 09:37:52 -0800 Subject: [PATCH 07/18] Passing test --- runner/src/service/runner-service.test.ts | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/runner/src/service/runner-service.test.ts b/runner/src/service/runner-service.test.ts index 375fede79..87786292d 100644 --- a/runner/src/service/runner-service.test.ts +++ b/runner/src/service/runner-service.test.ts @@ -9,16 +9,25 @@ describe('Runner gRPC Service', () => { }); }); - it('starts a stream', () => { + it('starts a stream with correct settings', () => { const service = getRunnerService(genericStreamHandlerType); const mockCallback = jest.fn() as unknown as any; + const redisStream = 'test-redis-stream'; + const indexerConfig = { + account_id: 'test-account-id', + function_name: 'test-function-name', + code: 'test-code', + schema: 'test-schema', + }; const request = { request: { streamId: 'test-stream-id', + redisStream, + indexerConfig: JSON.stringify(indexerConfig), } } as unknown as any; service.StartStream(request, mockCallback); - // expect(genericStreamHandlerType).toHaveBeenCalledWith(undefined, undefined); - expect(mockCallback).toHaveBeenCalledWith({}, { streamId: 'test-stream-id' }); + expect(genericStreamHandlerType).toHaveBeenCalledWith(redisStream, indexerConfig); + expect(mockCallback).toHaveBeenCalledWith(null, { streamId: 'test-stream-id' }); }); }); From 81ae3f19030c7af0b9d0a2dce2ca70ccefa9bf2f Mon Sep 17 00:00:00 2001 From: Darun Seethammagari Date: Mon, 18 Dec 2023 11:48:26 -0800 Subject: [PATCH 08/18] Complete Start Stream tests --- runner/Dockerfile | 1 + runner/package.json | 1 + runner/protos/runner.proto | 6 +- runner/src/generated/spec/StreamInfo.ts | 5 - runner/src/service/runner-service.test.ts | 154 +++++++++++++++++++- runner/src/service/runner-service.ts | 54 +++---- runner/src/stream-handler/stream-handler.ts | 2 + 7 files changed, 186 insertions(+), 37 deletions(-) diff --git a/runner/Dockerfile b/runner/Dockerfile index 779b3adde..e016a3ce4 100644 --- a/runner/Dockerfile +++ b/runner/Dockerfile @@ -2,6 +2,7 @@ FROM node:18.18.2 AS builder WORKDIR /usr/src/app COPY . . RUN npm install +RUN npm run codegen RUN npm run build FROM node:18.18.2 diff --git a/runner/package.json b/runner/package.json index ffd680896..49589f885 100644 --- a/runner/package.json +++ b/runner/package.json @@ -8,6 +8,7 @@ }, "scripts": { "build": "rm -rf ./dist && tsc", + "codegen": "npx proto-loader-gen-types --longs=String --enums=String --defaults --oneofs --grpcLib=@grpc/grpc-js --outDir=src/generated/ protos/runner.proto", "start": "npm run build && node dist/index.js", "start:dev": "ts-node ./src/index.ts", "start:docker": "node dist/index.js", diff --git a/runner/protos/runner.proto b/runner/protos/runner.proto index 59e7eae8b..13bdcb5da 100644 --- a/runner/protos/runner.proto +++ b/runner/protos/runner.proto @@ -61,8 +61,6 @@ message ListStreamsResponse { // Information about a single BlockStream instance. message StreamInfo { string stream_id = 1; - int64 start_block_height = 2; - string indexer_name = 3; - string chain_id = 4; - string status = 5; + string indexer_name = 2; + string status = 3; } \ No newline at end of file diff --git a/runner/src/generated/spec/StreamInfo.ts b/runner/src/generated/spec/StreamInfo.ts index ae99db48b..4a2884226 100644 --- a/runner/src/generated/spec/StreamInfo.ts +++ b/runner/src/generated/spec/StreamInfo.ts @@ -1,19 +1,14 @@ // Original file: protos/runner.proto -import type { Long } from '@grpc/proto-loader'; export interface StreamInfo { 'streamId'?: (string); - 'startBlockHeight'?: (number | string | Long); 'indexerName'?: (string); - 'chainId'?: (string); 'status'?: (string); } export interface StreamInfo__Output { 'streamId': (string); - 'startBlockHeight': (string); 'indexerName': (string); - 'chainId': (string); 'status': (string); } diff --git a/runner/src/service/runner-service.test.ts b/runner/src/service/runner-service.test.ts index 87786292d..fc6d63235 100644 --- a/runner/src/service/runner-service.test.ts +++ b/runner/src/service/runner-service.test.ts @@ -1,5 +1,6 @@ import type StreamHandler from '../stream-handler/stream-handler'; import getRunnerService from './runner-service'; +import * as grpc from '@grpc/grpc-js'; describe('Runner gRPC Service', () => { let genericStreamHandlerType: typeof StreamHandler; @@ -19,15 +20,164 @@ describe('Runner gRPC Service', () => { code: 'test-code', schema: 'test-schema', }; - const request = { + const startRequest = { request: { streamId: 'test-stream-id', redisStream, indexerConfig: JSON.stringify(indexerConfig), } } as unknown as any; - service.StartStream(request, mockCallback); + + service.StartStream(startRequest, mockCallback); + expect(genericStreamHandlerType).toHaveBeenCalledWith(redisStream, indexerConfig); expect(mockCallback).toHaveBeenCalledWith(null, { streamId: 'test-stream-id' }); }); + + it('Invalid start stream request with empty stream Id', () => { + const service = getRunnerService(genericStreamHandlerType); + const mockCallback = jest.fn() as unknown as any; + const indexerConfig = { + account_id: 'test-account-id', + function_name: 'test-function-name', + code: 'test-code', + schema: 'test-schema', + }; + const request = { + request: { + streamId: '', + redisStream: 'test-redis-stream', + indexerConfig: JSON.stringify(indexerConfig), + } + } as unknown as any; + + service.StartStream(request, mockCallback); + + expect(genericStreamHandlerType).toHaveBeenCalledTimes(0); + expect(mockCallback).toHaveBeenCalledWith({ + code: grpc.status.INVALID_ARGUMENT, + message: 'Invalid streamId. It must be a non-empty string.' + }, null); + }); + + it('Invalid start stream request with missing redis stream Id parameter', () => { + const service = getRunnerService(genericStreamHandlerType); + const mockCallback = jest.fn() as unknown as any; + const indexerConfig = { + account_id: 'test-account-id', + function_name: 'test-function-name', + code: 'test-code', + schema: 'test-schema', + }; + const request = { + request: { + streamId: 'test-stream-id', + indexerConfig: JSON.stringify(indexerConfig), + } + } as unknown as any; + + service.StartStream(request, mockCallback); + + expect(genericStreamHandlerType).toHaveBeenCalledTimes(0); + expect(mockCallback).toHaveBeenCalledWith({ + code: grpc.status.INVALID_ARGUMENT, + message: 'Invalid redisStream. It must be a non-empty string.' + }, null); + }); + + it('Invalid start stream request with missing indexer config parameter', () => { + const service = getRunnerService(genericStreamHandlerType); + const mockCallback = jest.fn() as unknown as any; + const request = { + request: { + streamId: 'test-stream-id', + redisStream: 'test-redis-stream', + } + } as unknown as any; + + service.StartStream(request, mockCallback); + + expect(genericStreamHandlerType).toHaveBeenCalledTimes(0); + expect(mockCallback).toHaveBeenCalledWith({ + code: grpc.status.INVALID_ARGUMENT, + message: 'Invalid indexerConfig. It must be a non-empty string.' + }, null); + }); + + it('Invalid start stream request with missing code parameter in indexerConfig', () => { + const service = getRunnerService(genericStreamHandlerType); + const mockCallback = jest.fn() as unknown as any; + const indexerConfig = { + account_id: 'test-account-id', + function_name: 'test-function-name', + schema: 'test-schema', + }; + const request = { + request: { + streamId: 'test-stream-id', + redisStream: 'test-redis-stream', + indexerConfig: JSON.stringify(indexerConfig), + } + } as unknown as any; + + service.StartStream(request, mockCallback); + + expect(genericStreamHandlerType).toHaveBeenCalledTimes(0); + expect(mockCallback).toHaveBeenCalledWith({ + code: grpc.status.INVALID_ARGUMENT, + message: 'Invalid indexer config. It must contain account id, function name, code, and schema.' + }, null); + }); + + it('Invalid start stream request with invalid JSON for indexerConfig', () => { + const service = getRunnerService(genericStreamHandlerType); + const mockCallback = jest.fn() as unknown as any; + const request = { + request: { + streamId: 'test-stream-id', + redisStream: 'test-redis-stream', + indexerConfig: '{', + } + } as unknown as any; + + service.StartStream(request, mockCallback); + + expect(genericStreamHandlerType).toHaveBeenCalledTimes(0); + expect(mockCallback).toHaveBeenCalledWith({ + code: grpc.status.INVALID_ARGUMENT, + message: 'Invalid indexer config. It must be a valid JSON string.' + }, null); + }); + + it('starts a stream twice with correct settings, gets error second time', () => { + const service = getRunnerService(genericStreamHandlerType); + const mockCallback = jest.fn() as unknown as any; + const redisStream = 'test-redis-stream'; + const indexerConfig = { + account_id: 'test-account-id', + function_name: 'test-function-name', + code: 'test-code', + schema: 'test-schema', + }; + const startRequest = { + request: { + streamId: 'test-stream-id', + redisStream, + indexerConfig: JSON.stringify(indexerConfig), + } + } as unknown as any; + + service.StartStream(startRequest, mockCallback); + service.StartStream(startRequest, mockCallback); + + expect(genericStreamHandlerType).toHaveBeenCalledTimes(1); + expect(genericStreamHandlerType).toHaveBeenCalledWith(redisStream, indexerConfig); + expect(mockCallback.mock.calls).toEqual([ + [null, { streamId: 'test-stream-id' }], + [{ + code: grpc.status.ALREADY_EXISTS, + message: 'Stream test-stream-id can\'t be started as it already exists' + }, null] + ]); + }); }); diff --git a/runner/src/service/runner-service.ts b/runner/src/service/runner-service.ts index 56746ba6c..98355e01b 100644 --- a/runner/src/service/runner-service.ts +++ b/runner/src/service/runner-service.ts @@ -1,26 +1,27 @@ import { type ServerUnaryCall, type sendUnaryData } from '@grpc/grpc-js'; import { type RunnerHandlers } from '../generated/spec/Runner'; -import { type StartStreamResponse } from '../generated/spec/StartStreamResponse'; -import { type StartStreamRequest } from '../generated/spec/StartStreamRequest'; -import { type UpdateStreamRequest } from '../generated/spec/UpdateStreamRequest'; -import { type UpdateStreamResponse } from '../generated/spec/UpdateStreamResponse'; -import { type StopStreamRequest } from '../generated/spec/StopStreamRequest'; -import { type StopStreamResponse } from '../generated/spec/StopStreamResponse'; -import { type ListStreamsRequest } from '../generated/spec/ListStreamsRequest'; -import { type ListStreamsResponse } from '../generated/spec/ListStreamsResponse'; +import { type StartStreamResponse__Output, type StartStreamResponse } from '../generated/spec/StartStreamResponse'; +import { type StartStreamRequest__Output } from '../generated/spec/StartStreamRequest'; +import { type UpdateStreamRequest__Output } from '../generated/spec/UpdateStreamRequest'; +import { type UpdateStreamResponse__Output, type UpdateStreamResponse } from '../generated/spec/UpdateStreamResponse'; +import { type StopStreamRequest__Output } from '../generated/spec/StopStreamRequest'; +import { type StopStreamResponse__Output, type StopStreamResponse } from '../generated/spec/StopStreamResponse'; +import { type ListStreamsRequest__Output } from '../generated/spec/ListStreamsRequest'; +import { type ListStreamsResponse__Output, type ListStreamsResponse } from '../generated/spec/ListStreamsResponse'; import type StreamHandler from '../stream-handler'; import * as grpc from '@grpc/grpc-js'; import assert from 'assert'; type StreamHandlers = Map; -const streamHandlers: StreamHandlers = new Map(); function getRunnerService (StreamHandlerType: typeof StreamHandler): RunnerHandlers { + const streamHandlers: StreamHandlers = new Map(); + const RunnerService: RunnerHandlers = { - StartStream (call: ServerUnaryCall, callback: sendUnaryData): void { + StartStream (call: ServerUnaryCall, callback: sendUnaryData): void { console.log('StartStream called', call.request); // Validate request - const validationResult = validateStartStreamRequest(call.request); + const validationResult = validateStartStreamRequest(call.request, streamHandlers); if (validationResult !== null) { callback(validationResult, null); return; @@ -28,8 +29,6 @@ function getRunnerService (StreamHandlerType: typeof StreamHandler): RunnerHandl // Handle request try { - assert(call.request.streamId !== undefined && call.request.redisStream !== undefined && call.request.indexerConfig !== undefined, - 'Validation failed to catch invalid start request'); const config = JSON.parse(call.request.indexerConfig); const streamHandler = new StreamHandlerType(call.request.redisStream, { account_id: config.account_id, @@ -44,10 +43,10 @@ function getRunnerService (StreamHandlerType: typeof StreamHandler): RunnerHandl } }, - UpdateStream (call: ServerUnaryCall, callback: sendUnaryData): void { + UpdateStream (call: ServerUnaryCall, callback: sendUnaryData): void { console.log('UpdateStream called', call.request); // Validate request - const validationResult = validateUpdateStreamRequest(call.request); + const validationResult = validateUpdateStreamRequest(call.request, streamHandlers); if (validationResult !== null) { callback(validationResult, null); return; @@ -55,7 +54,6 @@ function getRunnerService (StreamHandlerType: typeof StreamHandler): RunnerHandl // Handle request try { - assert(call.request.streamId !== undefined && call.request.indexerConfig !== undefined, 'Validation failed to catch invalid update request'); const config = JSON.parse(call.request.indexerConfig); streamHandlers.get(call.request.streamId)?.updateIndexerConfig({ account_id: config.account_id, @@ -69,17 +67,16 @@ function getRunnerService (StreamHandlerType: typeof StreamHandler): RunnerHandl } }, - StopStream (call: ServerUnaryCall, callback: sendUnaryData): void { + StopStream (call: ServerUnaryCall, callback: sendUnaryData): void { console.log('StopStream called', call.request); // Validate request - const validationResult = validateStopStreamRequest(call.request); + const validationResult = validateStopStreamRequest(call.request, streamHandlers); if (validationResult !== null) { callback(validationResult, null); return; } // Handle request - assert(call.request.streamId !== undefined, 'Validation failed to catch invalid stop request'); const streamId: string = call.request.streamId; streamHandlers.get(streamId)?.stop() .then(() => { @@ -91,12 +88,16 @@ function getRunnerService (StreamHandlerType: typeof StreamHandler): RunnerHandl }); }, - ListStreams (call: ServerUnaryCall, callback: sendUnaryData): void { + ListStreams (call: ServerUnaryCall, callback: sendUnaryData): void { console.log('ListStreams called', call.request); // TODO: Return more information than just streamId callback(null, { streams: Object.keys(streamHandlers).map(stream => { - return { streamId: stream }; + return { + streamId: stream, + indexerName: streamHandlers.get(stream)?.indexerName ?? 'undefined_indexer_name', + status: 'RUNNING' // TODO: Keep updated status in stream handler + }; }) }); } @@ -117,7 +118,7 @@ function handleInternalError (error: unknown): any { }; } -function validateStringParameter (parameter: string | undefined, parameterName: string): any | null { +function validateStringParameter (parameter: string, parameterName: string): any | null { const grpcError = { code: grpc.status.INVALID_ARGUMENT, message: '' @@ -129,7 +130,7 @@ function validateStringParameter (parameter: string | undefined, parameterName: return null; } -function validateIndexerConfig (indexerConfig: string | undefined): any | null { +function validateIndexerConfig (indexerConfig: string): any | null { const grpcError = { code: grpc.status.INVALID_ARGUMENT, message: '' @@ -152,7 +153,7 @@ function validateIndexerConfig (indexerConfig: string | undefined): any | null { return null; } -function validateStartStreamRequest (request: StartStreamRequest): any | null { +function validateStartStreamRequest (request: StartStreamRequest__Output, streamHandlers: StreamHandlers): any | null { const grpcError = { code: grpc.status.INVALID_ARGUMENT, message: '' @@ -166,6 +167,7 @@ function validateStartStreamRequest (request: StartStreamRequest): any | null { assert(request.streamId !== undefined); if (streamHandlers.get(request.streamId) !== undefined) { grpcError.message = `Stream ${request.streamId} can't be started as it already exists`; + grpcError.code = grpc.status.ALREADY_EXISTS; return grpcError; } @@ -183,7 +185,7 @@ function validateStartStreamRequest (request: StartStreamRequest): any | null { return null; } -function validateUpdateStreamRequest (request: StartStreamRequest): any | null { +function validateUpdateStreamRequest (request: UpdateStreamRequest__Output, streamHandlers: StreamHandlers): any | null { const grpcError = { code: grpc.status.INVALID_ARGUMENT, message: '' @@ -208,7 +210,7 @@ function validateUpdateStreamRequest (request: StartStreamRequest): any | null { return null; } -function validateStopStreamRequest (request: StartStreamRequest): any | null { +function validateStopStreamRequest (request: StopStreamRequest__Output, streamHandlers: StreamHandlers): any | null { const grpcError = { code: grpc.status.INVALID_ARGUMENT, message: '' diff --git a/runner/src/stream-handler/stream-handler.ts b/runner/src/stream-handler/stream-handler.ts index 6cd05b02a..b6877f5aa 100644 --- a/runner/src/stream-handler/stream-handler.ts +++ b/runner/src/stream-handler/stream-handler.ts @@ -12,11 +12,13 @@ export interface IndexerConfig { export default class StreamHandler { private readonly worker: Worker; + readonly indexerName: string; constructor ( public readonly streamKey: string, public readonly indexerConfig: IndexerConfig | undefined = undefined ) { + this.indexerName = (indexerConfig?.account_id ?? 'undefined_account') + '/' + (indexerConfig?.function_name ?? 'undefined_function'); if (isMainThread) { this.worker = new Worker(path.join(__dirname, 'worker.js'), { workerData: { From 2d4c128d7c1edf3ce5069f027fc89251563fa4ce Mon Sep 17 00:00:00 2001 From: Darun Seethammagari Date: Mon, 18 Dec 2023 19:08:30 -0800 Subject: [PATCH 09/18] Complete unit tests --- runner/src/service/runner-service.test.ts | 429 ++++++++++++++++++---- runner/src/service/runner-service.ts | 30 +- 2 files changed, 371 insertions(+), 88 deletions(-) diff --git a/runner/src/service/runner-service.test.ts b/runner/src/service/runner-service.test.ts index fc6d63235..3956699d6 100644 --- a/runner/src/service/runner-service.test.ts +++ b/runner/src/service/runner-service.test.ts @@ -1,7 +1,28 @@ +import { type RunnerHandlers } from '../generated/spec/Runner'; import type StreamHandler from '../stream-handler/stream-handler'; import getRunnerService from './runner-service'; import * as grpc from '@grpc/grpc-js'; +let BASIC_STREAM_ID = 'test-stream-id'; +let BASIC_REDIS_STREAM = 'test-redis-stream'; +let BASIC_INDEXER_CONFIG = { + account_id: 'test-account-id', + function_name: 'test-function-name', + code: 'test-code', + schema: 'test-schema', +}; + +beforeEach(() => { + BASIC_STREAM_ID = 'test-stream-id'; + BASIC_REDIS_STREAM = 'test-redis-stream'; + BASIC_INDEXER_CONFIG = { + account_id: 'test-account-id', + function_name: 'test-function-name', + code: 'test-code', + schema: 'test-schema', + }; +}); + describe('Runner gRPC Service', () => { let genericStreamHandlerType: typeof StreamHandler; beforeEach(() => { @@ -13,43 +34,18 @@ describe('Runner gRPC Service', () => { it('starts a stream with correct settings', () => { const service = getRunnerService(genericStreamHandlerType); const mockCallback = jest.fn() as unknown as any; - const redisStream = 'test-redis-stream'; - const indexerConfig = { - account_id: 'test-account-id', - function_name: 'test-function-name', - code: 'test-code', - schema: 'test-schema', - }; - const startRequest = { - request: { - streamId: 'test-stream-id', - redisStream, - indexerConfig: JSON.stringify(indexerConfig), - } - } as unknown as any; + const request = generateRequest(BASIC_STREAM_ID, BASIC_REDIS_STREAM, JSON.stringify(BASIC_INDEXER_CONFIG)); - service.StartStream(startRequest, mockCallback); + service.StartStream(request, mockCallback); - expect(genericStreamHandlerType).toHaveBeenCalledWith(redisStream, indexerConfig); - expect(mockCallback).toHaveBeenCalledWith(null, { streamId: 'test-stream-id' }); + expect(genericStreamHandlerType).toHaveBeenCalledWith(BASIC_REDIS_STREAM, BASIC_INDEXER_CONFIG); + expect(mockCallback).toHaveBeenCalledWith(null, { streamId: BASIC_STREAM_ID }); }); it('Invalid start stream request with empty stream Id', () => { const service = getRunnerService(genericStreamHandlerType); const mockCallback = jest.fn() as unknown as any; - const indexerConfig = { - account_id: 'test-account-id', - function_name: 'test-function-name', - code: 'test-code', - schema: 'test-schema', - }; - const request = { - request: { - streamId: '', - redisStream: 'test-redis-stream', - indexerConfig: JSON.stringify(indexerConfig), - } - } as unknown as any; + const request = generateRequest('', BASIC_REDIS_STREAM, JSON.stringify(BASIC_INDEXER_CONFIG)); service.StartStream(request, mockCallback); @@ -63,18 +59,7 @@ describe('Runner gRPC Service', () => { it('Invalid start stream request with missing redis stream Id parameter', () => { const service = getRunnerService(genericStreamHandlerType); const mockCallback = jest.fn() as unknown as any; - const indexerConfig = { - account_id: 'test-account-id', - function_name: 'test-function-name', - code: 'test-code', - schema: 'test-schema', - }; - const request = { - request: { - streamId: 'test-stream-id', - indexerConfig: JSON.stringify(indexerConfig), - } - } as unknown as any; + const request = generateRequest(BASIC_STREAM_ID, undefined, JSON.stringify(BASIC_INDEXER_CONFIG)); service.StartStream(request, mockCallback); @@ -88,12 +73,7 @@ describe('Runner gRPC Service', () => { it('Invalid start stream request with missing indexer config parameter', () => { const service = getRunnerService(genericStreamHandlerType); const mockCallback = jest.fn() as unknown as any; - const request = { - request: { - streamId: 'test-stream-id', - redisStream: 'test-redis-stream', - } - } as unknown as any; + const request = generateRequest(BASIC_STREAM_ID, BASIC_REDIS_STREAM, undefined); service.StartStream(request, mockCallback); @@ -107,18 +87,13 @@ describe('Runner gRPC Service', () => { it('Invalid start stream request with missing code parameter in indexerConfig', () => { const service = getRunnerService(genericStreamHandlerType); const mockCallback = jest.fn() as unknown as any; - const indexerConfig = { - account_id: 'test-account-id', - function_name: 'test-function-name', - schema: 'test-schema', - }; - const request = { - request: { - streamId: 'test-stream-id', - redisStream: 'test-redis-stream', - indexerConfig: JSON.stringify(indexerConfig), + const request = generateRequest(BASIC_STREAM_ID, BASIC_REDIS_STREAM, JSON.stringify( + { + account_id: 'test-account-id', + function_name: 'test-function-name', + schema: 'test-schema', } - } as unknown as any; + )); service.StartStream(request, mockCallback); @@ -132,13 +107,7 @@ describe('Runner gRPC Service', () => { it('Invalid start stream request with invalid JSON for indexerConfig', () => { const service = getRunnerService(genericStreamHandlerType); const mockCallback = jest.fn() as unknown as any; - const request = { - request: { - streamId: 'test-stream-id', - redisStream: 'test-redis-stream', - indexerConfig: '{', - } - } as unknown as any; + const request = generateRequest(BASIC_STREAM_ID, BASIC_REDIS_STREAM, '{'); service.StartStream(request, mockCallback); @@ -152,32 +121,338 @@ describe('Runner gRPC Service', () => { it('starts a stream twice with correct settings, gets error second time', () => { const service = getRunnerService(genericStreamHandlerType); const mockCallback = jest.fn() as unknown as any; - const redisStream = 'test-redis-stream'; const indexerConfig = { account_id: 'test-account-id', function_name: 'test-function-name', code: 'test-code', schema: 'test-schema', }; - const startRequest = { - request: { - streamId: 'test-stream-id', - redisStream, - indexerConfig: JSON.stringify(indexerConfig), - } - } as unknown as any; + const startRequest = generateRequest(BASIC_STREAM_ID, BASIC_REDIS_STREAM, JSON.stringify(indexerConfig)); service.StartStream(startRequest, mockCallback); service.StartStream(startRequest, mockCallback); expect(genericStreamHandlerType).toHaveBeenCalledTimes(1); - expect(genericStreamHandlerType).toHaveBeenCalledWith(redisStream, indexerConfig); + expect(genericStreamHandlerType).toHaveBeenCalledWith(BASIC_REDIS_STREAM, indexerConfig); expect(mockCallback.mock.calls).toEqual([ - [null, { streamId: 'test-stream-id' }], + [null, { streamId: BASIC_STREAM_ID }], [{ code: grpc.status.ALREADY_EXISTS, - message: 'Stream test-stream-id can\'t be started as it already exists' + message: `Stream ${BASIC_STREAM_ID} can't be started as it already exists.` + }, null] + ]); + }); + + it('updates a stream with correct settings', () => { + const updateIndexerConfig = jest.fn(); + const streamHandlerType = jest.fn().mockImplementation(() => { + return { updateIndexerConfig }; + }); + const service = getRunnerService(streamHandlerType); + const mockCallback = jest.fn() as unknown as any; + const indexerConfig = BASIC_INDEXER_CONFIG; + const startRequest = generateRequest(BASIC_STREAM_ID, BASIC_REDIS_STREAM, JSON.stringify(indexerConfig)); + + service.StartStream(startRequest, mockCallback); + + indexerConfig.code = 'test-code-2'; + const updateRequest = generateRequest(BASIC_STREAM_ID, undefined, JSON.stringify(indexerConfig)); + + service.UpdateStream(updateRequest, mockCallback); + + indexerConfig.code = 'test-code'; + expect(streamHandlerType).toHaveBeenCalledTimes(1); + indexerConfig.code = 'test-code-2'; + expect(updateIndexerConfig.mock.calls).toEqual([ + [indexerConfig] + ]); + expect(mockCallback).toHaveBeenCalledWith(null, { streamId: BASIC_STREAM_ID }); + expect(mockCallback.mock.calls).toEqual([ + [null, { streamId: BASIC_STREAM_ID }], + [null, { streamId: BASIC_STREAM_ID }], + ]); + }); + + it('Invalid update stream request with empty stream Id', () => { + const service = getRunnerService(genericStreamHandlerType); + const mockCallback = jest.fn() as unknown as any; + const request = generateRequest('', undefined, JSON.stringify(BASIC_INDEXER_CONFIG)); + + service.UpdateStream(request, mockCallback); + + expect(genericStreamHandlerType).toHaveBeenCalledTimes(0); + expect(mockCallback).toHaveBeenCalledWith({ + code: grpc.status.INVALID_ARGUMENT, + message: 'Invalid streamId. It must be a non-empty string.' + }, null); + }); + + it('Invalid update stream request with non-existent stream', () => { + const service = getRunnerService(genericStreamHandlerType); + const mockCallback = jest.fn() as unknown as any; + const request = generateRequest(BASIC_STREAM_ID, undefined, JSON.stringify(BASIC_INDEXER_CONFIG)); + + service.UpdateStream(request, mockCallback); + + expect(genericStreamHandlerType).toHaveBeenCalledTimes(0); + expect(mockCallback).toHaveBeenCalledWith({ + code: grpc.status.INVALID_ARGUMENT, + message: `Stream ${BASIC_STREAM_ID} cannot be updated as it does not exist.` + }, null); + }); + + it('Invalid start stream request with missing indexer config parameter', () => { + const service = getRunnerService(genericStreamHandlerType); + const mockCallback = jest.fn() as unknown as any; + const request = generateRequest(BASIC_STREAM_ID, BASIC_REDIS_STREAM, undefined); + + service.StartStream(request, mockCallback); + + expect(genericStreamHandlerType).toHaveBeenCalledTimes(0); + expect(mockCallback).toHaveBeenCalledWith({ + code: grpc.status.INVALID_ARGUMENT, + message: 'Invalid indexerConfig. It must be a non-empty string.' + }, null); + }); + + it('Invalid start stream request with missing code parameter in indexerConfig', () => { + const service = getRunnerService(genericStreamHandlerType); + const mockCallback = jest.fn() as unknown as any; + const request = generateRequest(BASIC_STREAM_ID, BASIC_REDIS_STREAM, JSON.stringify( + { + account_id: 'test-account-id', + function_name: 'test-function-name', + schema: 'test-schema', + } + )); + + service.StartStream(request, mockCallback); + + expect(genericStreamHandlerType).toHaveBeenCalledTimes(0); + expect(mockCallback).toHaveBeenCalledWith({ + code: grpc.status.INVALID_ARGUMENT, + message: 'Invalid indexer config. It must contain account id, function name, code, and schema.' + }, null); + }); + + it('Invalid start stream request with invalid JSON for indexerConfig', () => { + const service = getRunnerService(genericStreamHandlerType); + const mockCallback = jest.fn() as unknown as any; + const request = generateRequest(BASIC_STREAM_ID, BASIC_REDIS_STREAM, '{'); + + service.StartStream(request, mockCallback); + + expect(genericStreamHandlerType).toHaveBeenCalledTimes(0); + expect(mockCallback).toHaveBeenCalledWith({ + code: grpc.status.INVALID_ARGUMENT, + message: 'Invalid indexer config. It must be a valid JSON string.' + }, null); + }); + + it('stops a stream with correct settings', async () => { + const stop = jest.fn().mockImplementation(async () => { + await Promise.resolve(); + }); + const streamHandlerType = jest.fn().mockImplementation(() => { + return { stop }; + }); + const service = getRunnerService(streamHandlerType); + const mockCallback = jest.fn() as unknown as any; + const requestA = generateRequest(BASIC_STREAM_ID + '-A', BASIC_REDIS_STREAM + '-A', JSON.stringify(BASIC_INDEXER_CONFIG)); + const requestB = generateRequest(BASIC_STREAM_ID + '-B', BASIC_REDIS_STREAM + '-B', JSON.stringify(BASIC_INDEXER_CONFIG)); + + service.StartStream(requestA, mockCallback); + service.StartStream(requestB, mockCallback); + + const stopRequest = generateRequest(BASIC_STREAM_ID + '-A', undefined, undefined); // Stops stream A + + await new Promise((resolve, reject) => { + service.StopStream(stopRequest, function (err, response) { + if (err) { + reject(err); return; + } + mockCallback(err, response); + resolve(response); + }); + }); + + service.StartStream(requestA, mockCallback); + + expect(streamHandlerType).toHaveBeenCalledTimes(3); + expect(stop).toHaveBeenCalledTimes(1); + expect(mockCallback.mock.calls).toEqual([ + [null, { streamId: BASIC_STREAM_ID + '-A' }], // Start A + [null, { streamId: BASIC_STREAM_ID + '-B' }], // Start B + [null, { streamId: BASIC_STREAM_ID + '-A' }], // Stop A + [null, { streamId: BASIC_STREAM_ID + '-A' }], // Stop B + ]); + }); + + it('Invalid stop stream request with empty stream Id', () => { + const stop = jest.fn().mockImplementation(async () => { + await Promise.resolve(); + }); + const streamHandlerType = jest.fn().mockImplementation(() => { + return { stop }; + }); + const service = getRunnerService(streamHandlerType); + const mockCallback = jest.fn() as unknown as any; + const request = generateRequest('', undefined, undefined); + + service.StopStream(request, mockCallback); + + expect(stop).toHaveBeenCalledTimes(0); + expect(mockCallback).toHaveBeenCalledWith({ + code: grpc.status.INVALID_ARGUMENT, + message: 'Invalid streamId. It must be a non-empty string.' + }, null); + }); + + it('Invalid stop stream request with non-existent stream', () => { + const stop = jest.fn().mockImplementation(async () => { + await Promise.resolve(); + }); + const streamHandlerType = jest.fn().mockImplementation(() => { + return { stop }; + }); + const service = getRunnerService(streamHandlerType); + const mockCallback = jest.fn() as unknown as any; + const request = generateRequest(BASIC_STREAM_ID, undefined, undefined); + + service.StopStream(request, mockCallback); + + expect(stop).toHaveBeenCalledTimes(0); + expect(mockCallback).toHaveBeenCalledWith({ + code: grpc.status.INVALID_ARGUMENT, + message: `Stream ${BASIC_STREAM_ID} cannot be stopped as it does not exist.` + }, null); + }); + + it('Invalid stop stream request with somehow failing stop', async () => { + const stop = jest.fn().mockImplementation(async () => { + await Promise.reject(new Error('somehow fails')); + }); + const streamHandlerType = jest.fn().mockImplementation(() => { + return { stop }; + }); + const service = getRunnerService(streamHandlerType); + const mockCallback = jest.fn() as unknown as any; + const startRequest = generateRequest(BASIC_STREAM_ID, BASIC_REDIS_STREAM, JSON.stringify(BASIC_INDEXER_CONFIG)); + const stopRequest = generateRequest(BASIC_STREAM_ID, undefined, undefined); + + service.StartStream(startRequest, mockCallback); + + await new Promise((resolve, reject) => { + service.StopStream(stopRequest, function (err, response) { + if (err) { // Should get somehow fails error + mockCallback(err, response); + resolve(err.details); return; + } + reject(err); + }); + }); + + expect(stop).toHaveBeenCalledTimes(1); + expect(mockCallback.mock.calls).toEqual([ + [null, { streamId: BASIC_STREAM_ID }], + [{ + code: grpc.status.INTERNAL, + message: 'somehow fails' }, null] ]); }); + + it('valid list stream request lists streams correctly', async () => { + const stop = jest.fn().mockImplementation(async () => { + await Promise.resolve(); + }); + const streamHandlerType = jest.fn().mockImplementation((...args) => { + return { + stop, + indexerName: `${args[1].account_id as string}/${args[1].function_name as string}`, + }; + }); + const service = getRunnerService(streamHandlerType); + const mockCallback = jest.fn() as unknown as any; + const requestA = generateRequest(BASIC_STREAM_ID + '-A', BASIC_REDIS_STREAM + '-A', JSON.stringify(BASIC_INDEXER_CONFIG)); + const requestB = generateRequest(BASIC_STREAM_ID + '-B', BASIC_REDIS_STREAM + '-B', JSON.stringify(BASIC_INDEXER_CONFIG)); + const listRequest = generateRequest(undefined, undefined, undefined); + const stopRequest = generateRequest(BASIC_STREAM_ID + '-A', undefined, undefined); // Stops stream A + + await listStreamsPromise(listRequest, service, mockCallback); + + service.StartStream(requestA, mockCallback); + + await listStreamsPromise(listRequest, service, mockCallback); + + service.StartStream(requestB, mockCallback); + + await listStreamsPromise(listRequest, service, mockCallback); + + await new Promise((resolve, reject) => { + service.StopStream(stopRequest, function (err, response) { + if (err) { + reject(err); return; + } + mockCallback(err, response); + resolve(response); + }); + }); + + await listStreamsPromise(listRequest, service, mockCallback); + + service.StartStream(requestA, mockCallback); + + await listStreamsPromise(listRequest, service, mockCallback); + + expect(streamHandlerType).toHaveBeenCalledTimes(3); + expect(stop).toHaveBeenCalledTimes(1); + const emptyList: never[] = []; + const oneStreamList = [{ + streamId: BASIC_STREAM_ID + '-A', + indexerName: BASIC_INDEXER_CONFIG.account_id + '/' + BASIC_INDEXER_CONFIG.function_name, + status: 'RUNNING' + }]; + const twoStreamList = [{ + streamId: BASIC_STREAM_ID + '-A', + indexerName: BASIC_INDEXER_CONFIG.account_id + '/' + BASIC_INDEXER_CONFIG.function_name, + status: 'RUNNING' + }, + { + streamId: BASIC_STREAM_ID + '-B', + indexerName: BASIC_INDEXER_CONFIG.account_id + '/' + BASIC_INDEXER_CONFIG.function_name, + status: 'RUNNING' + }]; + expect(mockCallback.mock.calls[0][1]).toEqual({ streams: emptyList }); + expect(mockCallback.mock.calls[2][1]).toEqual({ streams: oneStreamList }); + expect(mockCallback.mock.calls[4][1]).toEqual({ streams: twoStreamList }); + oneStreamList[0].streamId = BASIC_STREAM_ID + '-B'; + expect(mockCallback.mock.calls[6][1]).toEqual({ streams: oneStreamList }); // After stop was called + twoStreamList[0].streamId = BASIC_STREAM_ID + '-B'; + twoStreamList[1].streamId = BASIC_STREAM_ID + '-A'; + expect(mockCallback.mock.calls[8][1]).toEqual({ streams: twoStreamList }); // Order is reversed now + }); }); + +async function listStreamsPromise (listRequest: any, service: RunnerHandlers, mockCallback: jest.Mock): Promise { + await new Promise((resolve, reject) => { + service.ListStreams(listRequest, function (err, response) { + if (err) { + reject(err); return; + } + mockCallback(err, response); + resolve(response); + }); + }); +} + +function generateRequest (streamId: string | undefined = undefined, redisStream: string | undefined = undefined, indexerConfig: string | undefined = undefined): any { + const request = { + ...(streamId !== undefined && { streamId }), + ...(redisStream !== undefined && { redisStream }), + ...(indexerConfig !== undefined && { indexerConfig }), + }; + return { + request + }; +} diff --git a/runner/src/service/runner-service.ts b/runner/src/service/runner-service.ts index 98355e01b..5bfbc39a7 100644 --- a/runner/src/service/runner-service.ts +++ b/runner/src/service/runner-service.ts @@ -8,6 +8,7 @@ import { type StopStreamRequest__Output } from '../generated/spec/StopStreamRequ import { type StopStreamResponse__Output, type StopStreamResponse } from '../generated/spec/StopStreamResponse'; import { type ListStreamsRequest__Output } from '../generated/spec/ListStreamsRequest'; import { type ListStreamsResponse__Output, type ListStreamsResponse } from '../generated/spec/ListStreamsResponse'; +import { type StreamInfo__Output } from '../generated/spec/StreamInfo'; import type StreamHandler from '../stream-handler'; import * as grpc from '@grpc/grpc-js'; import assert from 'assert'; @@ -80,8 +81,8 @@ function getRunnerService (StreamHandlerType: typeof StreamHandler): RunnerHandl const streamId: string = call.request.streamId; streamHandlers.get(streamId)?.stop() .then(() => { - callback(null, { streamId }); streamHandlers.delete(streamId); + callback(null, { streamId }); }).catch(error => { const grpcError = handleInternalError(error); callback(grpcError, null); @@ -89,17 +90,24 @@ function getRunnerService (StreamHandlerType: typeof StreamHandler): RunnerHandl }, ListStreams (call: ServerUnaryCall, callback: sendUnaryData): void { + // TODO: Refactor to make use of repeated field console.log('ListStreams called', call.request); // TODO: Return more information than just streamId - callback(null, { - streams: Object.keys(streamHandlers).map(stream => { - return { + const response: StreamInfo__Output[] = []; + try { + streamHandlers.forEach((handler, stream) => { + response.push({ streamId: stream, - indexerName: streamHandlers.get(stream)?.indexerName ?? 'undefined_indexer_name', + indexerName: handler.indexerName, status: 'RUNNING' // TODO: Keep updated status in stream handler - }; - }) - }); + }); + }); + callback(null, { + streams: response + }); + } catch (error) { + callback(handleInternalError(error), null); + } } }; return RunnerService; @@ -166,7 +174,7 @@ function validateStartStreamRequest (request: StartStreamRequest__Output, stream } assert(request.streamId !== undefined); if (streamHandlers.get(request.streamId) !== undefined) { - grpcError.message = `Stream ${request.streamId} can't be started as it already exists`; + grpcError.message = `Stream ${request.streamId} can't be started as it already exists.`; grpcError.code = grpc.status.ALREADY_EXISTS; return grpcError; } @@ -198,7 +206,7 @@ function validateUpdateStreamRequest (request: UpdateStreamRequest__Output, stre } assert(request.streamId !== undefined); if (streamHandlers.get(request.streamId) === undefined) { - grpcError.message = `Stream ${request.streamId} cannot be updated as it does not exist`; + grpcError.message = `Stream ${request.streamId} cannot be updated as it does not exist.`; return grpcError; } @@ -223,7 +231,7 @@ function validateStopStreamRequest (request: StopStreamRequest__Output, streamHa } assert(request.streamId !== undefined); if (streamHandlers.get(request.streamId) === undefined) { - grpcError.message = `Stream ${request.streamId} cannot be stopped as it does not exist`; + grpcError.message = `Stream ${request.streamId} cannot be stopped as it does not exist.`; return grpcError; } From e6fc7e5e3cb47e9c51522c5ae8f01747dd296bc7 Mon Sep 17 00:00:00 2001 From: Darun Seethammagari Date: Mon, 18 Dec 2023 19:09:21 -0800 Subject: [PATCH 10/18] Prepare for PR --- runner/src/index.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/runner/src/index.ts b/runner/src/index.ts index 185e9455d..a4f0d4070 100644 --- a/runner/src/index.ts +++ b/runner/src/index.ts @@ -1,7 +1,6 @@ import { startServer as startMetricsServer } from './metrics'; import RedisClient from './redis-client'; import StreamHandler from './stream-handler'; -import startServer from './service/runner-server'; const STREAM_HANDLER_THROTTLE_MS = 500; @@ -14,14 +13,11 @@ startMetricsServer().catch((err) => { type StreamHandlers = Record; void (async function main () { - startServer(); - try { const streamHandlers: StreamHandlers = {}; while (true) { - // const streamKeys = await redisClient.getStreams(); - const streamKeys: string[] = []; + const streamKeys = await redisClient.getStreams(); streamKeys.forEach((streamKey) => { if (streamHandlers[streamKey] !== undefined) { From 7ed12c4388a188046c821aa5c14b73f3938d4754 Mon Sep 17 00:00:00 2001 From: Darun Seethammagari Date: Mon, 18 Dec 2023 19:31:40 -0800 Subject: [PATCH 11/18] Small fixes --- runner/protos/runner.proto | 2 +- runner/src/stream-handler/worker.ts | 7 ++- runner/src/test-client.ts | 77 ----------------------------- runner/test.sh | 29 ----------- runner/tsconfig.json | 2 +- 5 files changed, 5 insertions(+), 112 deletions(-) delete mode 100644 runner/src/test-client.ts delete mode 100755 runner/test.sh diff --git a/runner/protos/runner.proto b/runner/protos/runner.proto index 13bdcb5da..29d76e4d1 100644 --- a/runner/protos/runner.proto +++ b/runner/protos/runner.proto @@ -63,4 +63,4 @@ message StreamInfo { string stream_id = 1; string indexer_name = 2; string status = 3; -} \ No newline at end of file +} diff --git a/runner/src/stream-handler/worker.ts b/runner/src/stream-handler/worker.ts index 1fa72fdb1..8ee91235b 100644 --- a/runner/src/stream-handler/worker.ts +++ b/runner/src/stream-handler/worker.ts @@ -92,7 +92,7 @@ async function blockQueueProducer (workerContext: WorkerContext, streamKey: stri async function blockQueueConsumer (workerContext: WorkerContext, streamKey: string): Promise { const indexer = new Indexer(); const isHistorical = workerContext.streamType === 'historical'; - // let streamMessageId = ''; + let streamMessageId = ''; let indexerName = ''; let currBlockHeight = 0; @@ -103,7 +103,6 @@ async function blockQueueConsumer (workerContext: WorkerContext, streamKey: stri continue; } const startTime = performance.now(); - // TODO: Verify no case where stream storage is more up to date than config variable const indexerConfig = config ?? await workerContext.redisClient.getStreamStorage(streamKey); indexerName = `${indexerConfig.account_id}/${indexerConfig.function_name}`; const functions = { @@ -122,7 +121,7 @@ async function blockQueueConsumer (workerContext: WorkerContext, streamKey: stri } const block = queueMessage.block; currBlockHeight = block.blockHeight; - // streamMessageId = queueMessage.streamMessageId; + streamMessageId = queueMessage.streamMessageId; if (block === undefined || block.blockHeight == null) { console.error('Block failed to process or does not have block height', block); @@ -131,7 +130,7 @@ async function blockQueueConsumer (workerContext: WorkerContext, streamKey: stri METRICS.BLOCK_WAIT_DURATION.labels({ indexer: indexerName, type: workerContext.streamType }).observe(performance.now() - blockStartTime); await indexer.runFunctions(block, functions, isHistorical, { provision: true }); - // await workerContext.redisClient.deleteStreamMessage(streamKey, streamMessageId); + await workerContext.redisClient.deleteStreamMessage(streamKey, streamMessageId); await workerContext.queue.shift(); METRICS.EXECUTION_DURATION.labels({ indexer: indexerName, type: workerContext.streamType }).observe(performance.now() - startTime); diff --git a/runner/src/test-client.ts b/runner/src/test-client.ts deleted file mode 100644 index 6da528129..000000000 --- a/runner/src/test-client.ts +++ /dev/null @@ -1,77 +0,0 @@ -import runnerClient from './service/runner-client'; - -const indexer = { - account_id: 'darunrs.near', - redis_stream: 'darunrs.near/test_sweat_blockheight:real_time:stream', - function_name: 'test_sweat_blockheight', - code: "\n const h = block.header().height;\n await context.set('height', h);\n", - start_block_height: 106881495, - schema: 'CREATE TABLE\n' + - ' "indexer_storage" (\n' + - ' "function_name" TEXT NOT NULL,\n' + - ' "key_name" TEXT NOT NULL,\n' + - ' "value" TEXT NOT NULL,\n' + - ' PRIMARY KEY ("function_name", "key_name")\n' + - ' )\n', - provisioned: true, - indexer_rule: { - indexer_rule_kind: 'Action', - matching_rule: { - rule: 'ACTION_ANY', - affected_account_id: 'token.sweat', - status: 'SUCCESS' - }, - id: null, - name: null - } -}; - -const updateCode = '\n const h = block.header().height;\n'; - -const sleep = async (ms: number): Promise => { await new Promise((resolve) => setTimeout(resolve, ms)); }; - -void (async function main () { - let count = 0; - while (count < 20) { - if (count === 4) { - runnerClient.StartStream({ - streamId: 'darunrs sweat blockheight', - redisStream: indexer.redis_stream, - indexerConfig: JSON.stringify(indexer) - }, (err, response) => { - if (err) { - console.error('error: ', err); - } else { - console.log('start: ', response); - } - }); - } - if (count === 9) { - indexer.code = updateCode; - runnerClient.UpdateStream({ - streamId: 'darunrs sweat blockheight', - indexerConfig: JSON.stringify(indexer) - }, (err, response) => { - if (err) { - console.error('error: ', err); - } else { - console.log('update: ', response); - } - }); - } - if (count === 14) { - indexer.code = updateCode; - runnerClient.StopStream({ - streamId: 'darunrs sweat blockheight', - }, (err, response) => { - if (err) { - console.error('error: ', err); - } else { - console.log('stop: ', response); - } - }); - } - count++; - await sleep(1000); - } -})(); diff --git a/runner/test.sh b/runner/test.sh deleted file mode 100755 index fa8755b94..000000000 --- a/runner/test.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - -# PostgreSQL superuser credentials -PG_SUPERUSER="postgres" -PG_SUPERUSER_PASSWORD="postgres" - -# Exclude these databases and users -EXCLUDED_DATABASES="'postgres', 'template0', 'template1'" -EXCLUDED_USERS="'postgres'" - -# Get a list of databases, excluding the defaults -DATABASES=$(psql -U $PG_SUPERUSER -t -c "SELECT datname FROM pg_database WHERE datname NOT IN ($EXCLUDED_DATABASES);") - -# Get a list of users, excluding 'postgres' -USERS=$(psql -U $PG_SUPERUSER -t -c "SELECT usename FROM pg_user WHERE usename NOT IN ($EXCLUDED_USERS);") - -# Drop each database -for db in $DATABASES; do - echo "Dropping database: $db" - psql -U $PG_SUPERUSER -c "DROP DATABASE IF EXISTS $db;" -done - -# Drop each user -for user in $USERS; do - echo "Dropping user: $user" - psql -U $PG_SUPERUSER -c "DROP USER IF EXISTS $user;" -done - -echo "All non-default databases and users have been dropped." diff --git a/runner/tsconfig.json b/runner/tsconfig.json index d4fd10457..c3aead636 100644 --- a/runner/tsconfig.json +++ b/runner/tsconfig.json @@ -18,7 +18,7 @@ "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ - "skipLibCheck": true, /* Skip type checking all .d.ts files. */ + "skipLibCheck": true /* Skip type checking all .d.ts files. */ }, "include": ["src"], "exclude": ["node_modules", "dist"] From eec3eb5519a0699bb44c0f22e140f262011d4416 Mon Sep 17 00:00:00 2001 From: Darun Seethammagari Date: Tue, 19 Dec 2023 16:34:19 -0800 Subject: [PATCH 12/18] Address some PR Comments --- runner/.gitignore | 1 + runner/package-lock.json | 654 +----------------- runner/package.json | 3 - runner/src/generated/runner.ts | 24 - .../src/generated/spec/ListStreamsRequest.ts | 8 - .../src/generated/spec/ListStreamsResponse.ts | 11 - runner/src/generated/spec/Runner.ts | 69 -- .../src/generated/spec/StartStreamRequest.ts | 14 - .../src/generated/spec/StartStreamResponse.ts | 10 - .../src/generated/spec/StopStreamRequest.ts | 10 - .../src/generated/spec/StopStreamResponse.ts | 10 - runner/src/generated/spec/StreamInfo.ts | 14 - .../src/generated/spec/UpdateStreamRequest.ts | 12 - .../generated/spec/UpdateStreamResponse.ts | 10 - 14 files changed, 23 insertions(+), 827 deletions(-) delete mode 100644 runner/src/generated/runner.ts delete mode 100644 runner/src/generated/spec/ListStreamsRequest.ts delete mode 100644 runner/src/generated/spec/ListStreamsResponse.ts delete mode 100644 runner/src/generated/spec/Runner.ts delete mode 100644 runner/src/generated/spec/StartStreamRequest.ts delete mode 100644 runner/src/generated/spec/StartStreamResponse.ts delete mode 100644 runner/src/generated/spec/StopStreamRequest.ts delete mode 100644 runner/src/generated/spec/StopStreamResponse.ts delete mode 100644 runner/src/generated/spec/StreamInfo.ts delete mode 100644 runner/src/generated/spec/UpdateStreamRequest.ts delete mode 100644 runner/src/generated/spec/UpdateStreamResponse.ts diff --git a/runner/.gitignore b/runner/.gitignore index 7f277a13c..5959a6b35 100644 --- a/runner/.gitignore +++ b/runner/.gitignore @@ -1,2 +1,3 @@ **/dist /node_modules +src/generated/ \ No newline at end of file diff --git a/runner/package-lock.json b/runner/package-lock.json index 005017abd..e7d1d570d 100644 --- a/runner/package-lock.json +++ b/runner/package-lock.json @@ -13,10 +13,7 @@ "@grpc/grpc-js": "^1.9.12", "@grpc/proto-loader": "^0.7.10", "@near-lake/primitives": "^0.1.0", - "@protobuf-ts/plugin": "^2.9.3", - "@protobuf-ts/runtime": "^2.9.3", "express": "^4.18.2", - "grpc": "^1.24.11", "long": "^5.2.3", "node-fetch": "^2.6.11", "node-sql-parser": "^4.10.0", @@ -2225,47 +2222,6 @@ "@jridgewell/sourcemap-codec": "^1.4.10" } }, - "node_modules/@mapbox/node-pre-gyp": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.11.tgz", - "integrity": "sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ==", - "dependencies": { - "detect-libc": "^2.0.0", - "https-proxy-agent": "^5.0.0", - "make-dir": "^3.1.0", - "node-fetch": "^2.6.7", - "nopt": "^5.0.0", - "npmlog": "^5.0.1", - "rimraf": "^3.0.2", - "semver": "^7.3.5", - "tar": "^6.1.11" - }, - "bin": { - "node-pre-gyp": "bin/node-pre-gyp" - } - }, - "node_modules/@mapbox/node-pre-gyp/node_modules/make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "dependencies": { - "semver": "^6.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@mapbox/node-pre-gyp/node_modules/make-dir/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "bin": { - "semver": "bin/semver.js" - } - }, "node_modules/@near-lake/primitives": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/@near-lake/primitives/-/primitives-0.1.0.tgz", @@ -2332,76 +2288,6 @@ "integrity": "sha512-t0hLfiEKfMUoqhG+U1oid7Pva4bbDPHYfJNiB7BiIjRkj1pyC++4N3huJfqY6aRH6VTB0rvtzQwjM4K6qpfOig==", "dev": true }, - "node_modules/@protobuf-ts/plugin": { - "version": "2.9.3", - "resolved": "https://registry.npmjs.org/@protobuf-ts/plugin/-/plugin-2.9.3.tgz", - "integrity": "sha512-tHYACv+nnIV2eoiMxeZhrgMqGiUktzUzrhfgnROg/rr8TecPLp9v5/yqNibN+bad5k7d57aqlTuQKhFl+J4W/g==", - "dependencies": { - "@protobuf-ts/plugin-framework": "^2.9.3", - "@protobuf-ts/protoc": "^2.9.3", - "@protobuf-ts/runtime": "^2.9.3", - "@protobuf-ts/runtime-rpc": "^2.9.3", - "typescript": "^3.9" - }, - "bin": { - "protoc-gen-dump": "bin/protoc-gen-dump", - "protoc-gen-ts": "bin/protoc-gen-ts" - } - }, - "node_modules/@protobuf-ts/plugin-framework": { - "version": "2.9.3", - "resolved": "https://registry.npmjs.org/@protobuf-ts/plugin-framework/-/plugin-framework-2.9.3.tgz", - "integrity": "sha512-iqdkhAu7fGPvBCVOoAEEFJ1/oaGIBoNIMgSv2WonTNJVHxv5FvvAfWFn6nG/eta34fHRZT38ZXTaYcMUkv8AiQ==", - "dependencies": { - "@protobuf-ts/runtime": "^2.9.3", - "typescript": "^3.9" - } - }, - "node_modules/@protobuf-ts/plugin-framework/node_modules/typescript": { - "version": "3.9.10", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz", - "integrity": "sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, - "node_modules/@protobuf-ts/plugin/node_modules/typescript": { - "version": "3.9.10", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz", - "integrity": "sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, - "node_modules/@protobuf-ts/protoc": { - "version": "2.9.3", - "resolved": "https://registry.npmjs.org/@protobuf-ts/protoc/-/protoc-2.9.3.tgz", - "integrity": "sha512-TJ0Ycx/CIBqpB4wpKt6K05kjXj6zv36s/qpdCT/wdJBhpayOVBqLF5NpLp3WIiw1PmIxvqalB6QHKjvnLzGKLA==", - "bin": { - "protoc": "protoc.js" - } - }, - "node_modules/@protobuf-ts/runtime": { - "version": "2.9.3", - "resolved": "https://registry.npmjs.org/@protobuf-ts/runtime/-/runtime-2.9.3.tgz", - "integrity": "sha512-nivzCpg/qYD0RX2OmHOahJALb8ndjGmUhNBcTJ0BbXoqKwCSM6vYA+vegzS3rhuaPgbyC7Ec8idlnizzUfIRuw==" - }, - "node_modules/@protobuf-ts/runtime-rpc": { - "version": "2.9.3", - "resolved": "https://registry.npmjs.org/@protobuf-ts/runtime-rpc/-/runtime-rpc-2.9.3.tgz", - "integrity": "sha512-WelHpctvZeG8yhbb7tnsrLzotq9xjMCXuGuhJ8qMyEdNoBBEodbXseofAYFTebo2/PN2LzyEq3X6vwr5f8jqTA==", - "dependencies": { - "@protobuf-ts/runtime": "^2.9.3" - } - }, "node_modules/@protobufjs/aspromise": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", @@ -3495,15 +3381,6 @@ "@types/node": "*" } }, - "node_modules/@types/bytebuffer": { - "version": "5.0.48", - "resolved": "https://registry.npmjs.org/@types/bytebuffer/-/bytebuffer-5.0.48.tgz", - "integrity": "sha512-ormKm68NtTOtR8C/4jyRJEYbwKABXRkHHR/1fmkiuFbCQkltgtXSUGfldCSmJzvuyJvmBzWjBbOi79Ry/oJQug==", - "dependencies": { - "@types/long": "^3.0.0", - "@types/node": "*" - } - }, "node_modules/@types/connect": { "version": "3.4.35", "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz", @@ -3598,11 +3475,6 @@ "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", "dev": true }, - "node_modules/@types/long": { - "version": "3.0.32", - "resolved": "https://registry.npmjs.org/@types/long/-/long-3.0.32.tgz", - "integrity": "sha512-ZXyOOm83p7X8p3s0IYM3VeueNmHpkk/yMlP8CLeOnEcu6hIwPH7YjZBvhQkR0ZFS2DqZAxKtJ/M5fcuv3OU5BA==" - }, "node_modules/@types/mime": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.2.tgz", @@ -3958,11 +3830,6 @@ "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/abbrev": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" - }, "node_modules/accepts": { "version": "1.3.8", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", @@ -4003,17 +3870,6 @@ "node": ">=0.4.0" } }, - "node_modules/agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", - "dependencies": { - "debug": "4" - }, - "engines": { - "node": ">= 6.0.0" - } - }, "node_modules/ajv": { "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", @@ -4092,23 +3948,6 @@ "node": ">= 8" } }, - "node_modules/aproba": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", - "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==" - }, - "node_modules/are-we-there-yet": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz", - "integrity": "sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==", - "dependencies": { - "delegates": "^1.0.0", - "readable-stream": "^3.6.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/arg": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", @@ -4242,15 +4081,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/ascli": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/ascli/-/ascli-1.0.1.tgz", - "integrity": "sha512-JGQaNxpaCJz9Bd1JvVaFIHuWn9S+l3xhN17R0V/vmUDiGE0QngNMXhjlqpwqV+91plWz9Fg+Lt28Lj7p5vjs8A==", - "dependencies": { - "colour": "~0.7.1", - "optjs": "~3.2.2" - } - }, "node_modules/assert-plus": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", @@ -4371,7 +4201,8 @@ "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true }, "node_modules/big-integer": { "version": "1.6.51", @@ -4443,6 +4274,7 @@ "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -4551,25 +4383,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/bytebuffer": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/bytebuffer/-/bytebuffer-5.0.1.tgz", - "integrity": "sha512-IuzSdmADppkZ6DlpycMkm8l9zeEq16fWtLvunEwFiYciR/BHo4E8/xs5piFquG+Za8OWmMqHF8zuRviz2LHvRQ==", - "dependencies": { - "long": "~3" - }, - "engines": { - "node": ">=0.8" - } - }, - "node_modules/bytebuffer/node_modules/long": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/long/-/long-3.2.0.tgz", - "integrity": "sha512-ZYvPPOMqUwPoDsbJaR10iQJYnMuZhRTvHYl62ErLIEX7RgFlziSBUUvrt3OVfc47QlHHpzPZYP17g3Fv7oeJkg==", - "engines": { - "node": ">=0.6" - } - }, "node_modules/bytes": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", @@ -4653,14 +4466,6 @@ "node": ">=10" } }, - "node_modules/chownr": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", - "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", - "engines": { - "node": ">=10" - } - }, "node_modules/ci-info": { "version": "3.8.0", "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz", @@ -4713,14 +4518,6 @@ "node": ">= 0.12.0" } }, - "node_modules/code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/collect-v8-coverage": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz", @@ -4743,22 +4540,6 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, - "node_modules/color-support": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", - "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", - "bin": { - "color-support": "bin.js" - } - }, - "node_modules/colour": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/colour/-/colour-0.7.1.tgz", - "integrity": "sha512-Rel466v0EnmKPcsxHo91L4kgPs/6XF7Pu2LJNszq9lXYwi5CFWEeIiRaTX5ym7PPMdj4udDHkLSVC1//JVkZQg==", - "engines": { - "node": ">=0.8" - } - }, "node_modules/combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", @@ -4774,12 +4555,8 @@ "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" - }, - "node_modules/console-control-strings": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", - "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==" + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true }, "node_modules/content-disposition": { "version": "0.5.4", @@ -4848,6 +4625,7 @@ "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, "dependencies": { "ms": "2.1.2" }, @@ -4860,14 +4638,6 @@ } } }, - "node_modules/decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/dedent": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.1.tgz", @@ -4968,11 +4738,6 @@ "node": ">=0.4.0" } }, - "node_modules/delegates": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==" - }, "node_modules/depd": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", @@ -4990,14 +4755,6 @@ "npm": "1.2.8000 || >= 1.4.16" } }, - "node_modules/detect-libc": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.2.tgz", - "integrity": "sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw==", - "engines": { - "node": ">=8" - } - }, "node_modules/detect-newline": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", @@ -5996,32 +5753,11 @@ "node": ">= 0.6" } }, - "node_modules/fs-minipass": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", - "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", - "dependencies": { - "minipass": "^3.0.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/fs-minipass/node_modules/minipass": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", - "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true }, "node_modules/fsevents": { "version": "2.3.2", @@ -6069,25 +5805,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/gauge": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-3.0.2.tgz", - "integrity": "sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==", - "dependencies": { - "aproba": "^1.0.3 || ^2.0.0", - "color-support": "^1.1.2", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.1", - "object-assign": "^4.1.1", - "signal-exit": "^3.0.0", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1", - "wide-align": "^1.1.2" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/generic-pool": { "version": "3.9.0", "resolved": "https://registry.npmjs.org/generic-pool/-/generic-pool-3.9.0.tgz", @@ -6168,6 +5885,7 @@ "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -6269,133 +5987,6 @@ "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", "dev": true }, - "node_modules/grpc": { - "version": "1.24.11", - "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.24.11.tgz", - "integrity": "sha512-8/AQdFCzCeCDWW3SoaMNp6ccbRvTQEH1O1u1uFtt29eWsg5gSZCJ3m6fbkduEIh3smY7WAPP+LgVJ5n3nZRxcA==", - "deprecated": "This library will not receive further updates other than security fixes. We recommend using @grpc/grpc-js instead.", - "hasInstallScript": true, - "dependencies": { - "@mapbox/node-pre-gyp": "^1.0.4", - "@types/bytebuffer": "^5.0.40", - "lodash.camelcase": "^4.3.0", - "lodash.clone": "^4.5.0", - "nan": "^2.13.2", - "protobufjs": "^5.0.3" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/grpc/node_modules/ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/grpc/node_modules/camelcase": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", - "integrity": "sha512-DLIsRzJVBQu72meAKPkWQOLcujdXT32hwdfnkI1frSiSRMK1MofjKHf+MEx0SB6fjEFXL8fBDv1dKymBlOp4Qw==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/grpc/node_modules/cliui": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha512-0yayqDxWQbqk3ojkYqUKqaAQ6AfNKeKWRNA8kR0WXzAsdHpP4BIaOmMAG87JGuO6qcobyW4GjxHd9PmhEd+T9w==", - "dependencies": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wrap-ansi": "^2.0.0" - } - }, - "node_modules/grpc/node_modules/is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw==", - "dependencies": { - "number-is-nan": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/grpc/node_modules/protobufjs": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-5.0.3.tgz", - "integrity": "sha512-55Kcx1MhPZX0zTbVosMQEO5R6/rikNXd9b6RQK4KSPcrSIIwoXTtebIczUrXlwaSrbz4x8XUVThGPob1n8I4QA==", - "dependencies": { - "ascli": "~1", - "bytebuffer": "~5", - "glob": "^7.0.5", - "yargs": "^3.10.0" - }, - "bin": { - "pbjs": "bin/pbjs" - }, - "engines": { - "node": ">=0.8" - } - }, - "node_modules/grpc/node_modules/string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha512-0XsVpQLnVCXHJfyEs8tC0zpTVIr5PKKsQtkT29IwupnPTjtPmQ3xT/4yCREF9hYkV/3M3kzcUTSAZT6a6h81tw==", - "dependencies": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/grpc/node_modules/strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", - "dependencies": { - "ansi-regex": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/grpc/node_modules/wrap-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", - "integrity": "sha512-vAaEaDM946gbNpH5pLVNR+vX2ht6n0Bt3GXwVB1AuAqZosOvHNF3P7wDnh8KLkSqgUh0uh77le7Owgoz+Z9XBw==", - "dependencies": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/grpc/node_modules/y18n": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.2.tgz", - "integrity": "sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ==" - }, - "node_modules/grpc/node_modules/yargs": { - "version": "3.32.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.32.0.tgz", - "integrity": "sha512-ONJZiimStfZzhKamYvR/xvmgW3uEkAUFSP91y2caTEPhzF6uP2JfPiVZcq66b/YR0C3uitxSV7+T1x8p5bkmMg==", - "dependencies": { - "camelcase": "^2.0.1", - "cliui": "^3.0.3", - "decamelize": "^1.1.1", - "os-locale": "^1.4.0", - "string-width": "^1.0.1", - "window-size": "^0.1.4", - "y18n": "^3.2.0" - } - }, "node_modules/has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -6474,11 +6065,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/has-unicode": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==" - }, "node_modules/html-escaper": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", @@ -6500,18 +6086,6 @@ "node": ">= 0.8" } }, - "node_modules/https-proxy-agent": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", - "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", - "dependencies": { - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/human-signals": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-4.3.1.tgz", @@ -6589,6 +6163,7 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dev": true, "dependencies": { "once": "^1.3.0", "wrappy": "1" @@ -6613,14 +6188,6 @@ "node": ">= 0.4" } }, - "node_modules/invert-kv": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", - "integrity": "sha512-xgs2NH9AE66ucSq4cNG1nhSFghr5l6tdL15Pk+jl46bmmBapgoaY/AacXyaDznAqmGL99TiLSQgO/XazFSKYeQ==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/ipaddr.js": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", @@ -7763,17 +7330,6 @@ "node": ">=6" } }, - "node_modules/lcid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", - "integrity": "sha512-YiGkH6EnGrDGqLMITnGjXtGmNtjoXw9SVUzcaos8RBi7Ps0VBylkq+vOcY9QE5poLasPCR849ucFUkl0UzUyOw==", - "dependencies": { - "invert-kv": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/leven": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", @@ -7822,11 +7378,6 @@ "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==" }, - "node_modules/lodash.clone": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.clone/-/lodash.clone-4.5.0.tgz", - "integrity": "sha512-GhrVeweiTD6uTmmn5hV/lzgCQhccwReIVRLHp7LT4SopOjqEZ5BbX8b5WWEtAKasjmy8hR7ZPwsYlxRCku5odg==" - }, "node_modules/lodash.memoize": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", @@ -7848,6 +7399,7 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, "dependencies": { "yallist": "^4.0.0" }, @@ -7980,6 +7532,7 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, "dependencies": { "brace-expansion": "^1.1.7" }, @@ -7996,57 +7549,11 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/minipass": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", - "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", - "engines": { - "node": ">=8" - } - }, - "node_modules/minizlib": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", - "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", - "dependencies": { - "minipass": "^3.0.0", - "yallist": "^4.0.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/minizlib/node_modules/minipass": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", - "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "bin": { - "mkdirp": "bin/cmd.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - }, - "node_modules/nan": { - "version": "2.18.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.18.0.tgz", - "integrity": "sha512-W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w==" + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true }, "node_modules/natural-compare": { "version": "1.4.0", @@ -8110,20 +7617,6 @@ "node": ">=8" } }, - "node_modules/nopt": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", - "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==", - "dependencies": { - "abbrev": "1" - }, - "bin": { - "nopt": "bin/nopt.js" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", @@ -8160,33 +7653,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/npmlog": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-5.0.1.tgz", - "integrity": "sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==", - "dependencies": { - "are-we-there-yet": "^2.0.0", - "console-control-strings": "^1.1.0", - "gauge": "^3.0.0", - "set-blocking": "^2.0.0" - } - }, - "node_modules/number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/object-inspect": { "version": "1.12.3", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", @@ -8289,6 +7755,7 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, "dependencies": { "wrappy": "1" } @@ -8343,22 +7810,6 @@ "node": ">= 0.8.0" } }, - "node_modules/optjs": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/optjs/-/optjs-3.2.2.tgz", - "integrity": "sha512-f8lTJm4LKirX+45xsFhuRNjA4f46QVLQKfGoNH7e2AEWS+24eM4XNH4pQ8Tw2LISCIvbST/wNcLdtgvgcqVaxA==" - }, - "node_modules/os-locale": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", - "integrity": "sha512-PRT7ZORmwu2MEFt4/fv3Q+mEfN4zetKxufQrkShY2oGvUms9r8otu5HfdyIFHkYXjO7laNsoVGmM2MANfuTA8g==", - "dependencies": { - "lcid": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", @@ -8454,6 +7905,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, "engines": { "node": ">=0.10.0" } @@ -8926,19 +8378,6 @@ "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", "dev": true }, - "node_modules/readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/redis": { "version": "4.6.7", "resolved": "https://registry.npmjs.org/redis/-/redis-4.6.7.tgz", @@ -9047,6 +8486,7 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, "dependencies": { "glob": "^7.1.3" }, @@ -9250,6 +8690,7 @@ "version": "7.5.4", "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, "dependencies": { "lru-cache": "^6.0.0" }, @@ -9315,11 +8756,6 @@ "node": ">= 0.8.0" } }, - "node_modules/set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==" - }, "node_modules/setprototypeof": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", @@ -9362,7 +8798,8 @@ "node_modules/signal-exit": { "version": "3.0.7", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true }, "node_modules/sisteransi": { "version": "1.0.5", @@ -9441,14 +8878,6 @@ "node": ">= 0.8" } }, - "node_modules/string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, "node_modules/string-length": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", @@ -9615,22 +9044,6 @@ "integrity": "sha512-t0hLfiEKfMUoqhG+U1oid7Pva4bbDPHYfJNiB7BiIjRkj1pyC++4N3huJfqY6aRH6VTB0rvtzQwjM4K6qpfOig==", "dev": true }, - "node_modules/tar": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.0.tgz", - "integrity": "sha512-/Wo7DcT0u5HUV486xg675HtjNd3BXZ6xDbzsCUZPt5iw8bTQ63bP0Raut3mvro9u+CUyq7YQd8Cx55fsZXxqLQ==", - "dependencies": { - "chownr": "^2.0.0", - "fs-minipass": "^2.0.0", - "minipass": "^5.0.0", - "minizlib": "^2.1.1", - "mkdirp": "^1.0.3", - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/tdigest": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/tdigest/-/tdigest-0.1.2.tgz", @@ -10044,11 +9457,6 @@ "node": ">=6" } }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" - }, "node_modules/utils-merge": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", @@ -10217,25 +9625,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/wide-align": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", - "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", - "dependencies": { - "string-width": "^1.0.2 || 2 || 3 || 4" - } - }, - "node_modules/window-size": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.4.tgz", - "integrity": "sha512-2thx4pB0cV3h+Bw7QmMXcEbdmOzv9t0HFplJH/Lz6yu60hXYy5RT8rUu+wlIreVxWsGN20mo+MHeCSfUpQBwPw==", - "bin": { - "window-size": "cli.js" - }, - "engines": { - "node": ">= 0.10.0" - } - }, "node_modules/wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", @@ -10255,7 +9644,8 @@ "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true }, "node_modules/write-file-atomic": { "version": "4.0.2", diff --git a/runner/package.json b/runner/package.json index 49589f885..724f418cb 100644 --- a/runner/package.json +++ b/runner/package.json @@ -47,10 +47,7 @@ "@grpc/grpc-js": "^1.9.12", "@grpc/proto-loader": "^0.7.10", "@near-lake/primitives": "^0.1.0", - "@protobuf-ts/plugin": "^2.9.3", - "@protobuf-ts/runtime": "^2.9.3", "express": "^4.18.2", - "grpc": "^1.24.11", "long": "^5.2.3", "node-fetch": "^2.6.11", "node-sql-parser": "^4.10.0", diff --git a/runner/src/generated/runner.ts b/runner/src/generated/runner.ts deleted file mode 100644 index fbd94035f..000000000 --- a/runner/src/generated/runner.ts +++ /dev/null @@ -1,24 +0,0 @@ -import type * as grpc from '@grpc/grpc-js'; -import type { MessageTypeDefinition } from '@grpc/proto-loader'; - -import type { RunnerClient as _spec_RunnerClient, RunnerDefinition as _spec_RunnerDefinition } from './spec/Runner'; - -type SubtypeConstructor any, Subtype> = { - new(...args: ConstructorParameters): Subtype; -}; - -export interface ProtoGrpcType { - spec: { - ListStreamsRequest: MessageTypeDefinition - ListStreamsResponse: MessageTypeDefinition - Runner: SubtypeConstructor & { service: _spec_RunnerDefinition } - StartStreamRequest: MessageTypeDefinition - StartStreamResponse: MessageTypeDefinition - StopStreamRequest: MessageTypeDefinition - StopStreamResponse: MessageTypeDefinition - StreamInfo: MessageTypeDefinition - UpdateStreamRequest: MessageTypeDefinition - UpdateStreamResponse: MessageTypeDefinition - } -} - diff --git a/runner/src/generated/spec/ListStreamsRequest.ts b/runner/src/generated/spec/ListStreamsRequest.ts deleted file mode 100644 index 94280735b..000000000 --- a/runner/src/generated/spec/ListStreamsRequest.ts +++ /dev/null @@ -1,8 +0,0 @@ -// Original file: protos/runner.proto - - -export interface ListStreamsRequest { -} - -export interface ListStreamsRequest__Output { -} diff --git a/runner/src/generated/spec/ListStreamsResponse.ts b/runner/src/generated/spec/ListStreamsResponse.ts deleted file mode 100644 index 770aae25f..000000000 --- a/runner/src/generated/spec/ListStreamsResponse.ts +++ /dev/null @@ -1,11 +0,0 @@ -// Original file: protos/runner.proto - -import type { StreamInfo as _spec_StreamInfo, StreamInfo__Output as _spec_StreamInfo__Output } from '../spec/StreamInfo'; - -export interface ListStreamsResponse { - 'streams'?: (_spec_StreamInfo)[]; -} - -export interface ListStreamsResponse__Output { - 'streams': (_spec_StreamInfo__Output)[]; -} diff --git a/runner/src/generated/spec/Runner.ts b/runner/src/generated/spec/Runner.ts deleted file mode 100644 index fd4dc29ad..000000000 --- a/runner/src/generated/spec/Runner.ts +++ /dev/null @@ -1,69 +0,0 @@ -// Original file: protos/runner.proto - -import type * as grpc from '@grpc/grpc-js' -import type { MethodDefinition } from '@grpc/proto-loader' -import type { ListStreamsRequest as _spec_ListStreamsRequest, ListStreamsRequest__Output as _spec_ListStreamsRequest__Output } from '../spec/ListStreamsRequest'; -import type { ListStreamsResponse as _spec_ListStreamsResponse, ListStreamsResponse__Output as _spec_ListStreamsResponse__Output } from '../spec/ListStreamsResponse'; -import type { StartStreamRequest as _spec_StartStreamRequest, StartStreamRequest__Output as _spec_StartStreamRequest__Output } from '../spec/StartStreamRequest'; -import type { StartStreamResponse as _spec_StartStreamResponse, StartStreamResponse__Output as _spec_StartStreamResponse__Output } from '../spec/StartStreamResponse'; -import type { StopStreamRequest as _spec_StopStreamRequest, StopStreamRequest__Output as _spec_StopStreamRequest__Output } from '../spec/StopStreamRequest'; -import type { StopStreamResponse as _spec_StopStreamResponse, StopStreamResponse__Output as _spec_StopStreamResponse__Output } from '../spec/StopStreamResponse'; -import type { UpdateStreamRequest as _spec_UpdateStreamRequest, UpdateStreamRequest__Output as _spec_UpdateStreamRequest__Output } from '../spec/UpdateStreamRequest'; -import type { UpdateStreamResponse as _spec_UpdateStreamResponse, UpdateStreamResponse__Output as _spec_UpdateStreamResponse__Output } from '../spec/UpdateStreamResponse'; - -export interface RunnerClient extends grpc.Client { - ListStreams(argument: _spec_ListStreamsRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_spec_ListStreamsResponse__Output>): grpc.ClientUnaryCall; - ListStreams(argument: _spec_ListStreamsRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_spec_ListStreamsResponse__Output>): grpc.ClientUnaryCall; - ListStreams(argument: _spec_ListStreamsRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_spec_ListStreamsResponse__Output>): grpc.ClientUnaryCall; - ListStreams(argument: _spec_ListStreamsRequest, callback: grpc.requestCallback<_spec_ListStreamsResponse__Output>): grpc.ClientUnaryCall; - listStreams(argument: _spec_ListStreamsRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_spec_ListStreamsResponse__Output>): grpc.ClientUnaryCall; - listStreams(argument: _spec_ListStreamsRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_spec_ListStreamsResponse__Output>): grpc.ClientUnaryCall; - listStreams(argument: _spec_ListStreamsRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_spec_ListStreamsResponse__Output>): grpc.ClientUnaryCall; - listStreams(argument: _spec_ListStreamsRequest, callback: grpc.requestCallback<_spec_ListStreamsResponse__Output>): grpc.ClientUnaryCall; - - StartStream(argument: _spec_StartStreamRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_spec_StartStreamResponse__Output>): grpc.ClientUnaryCall; - StartStream(argument: _spec_StartStreamRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_spec_StartStreamResponse__Output>): grpc.ClientUnaryCall; - StartStream(argument: _spec_StartStreamRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_spec_StartStreamResponse__Output>): grpc.ClientUnaryCall; - StartStream(argument: _spec_StartStreamRequest, callback: grpc.requestCallback<_spec_StartStreamResponse__Output>): grpc.ClientUnaryCall; - startStream(argument: _spec_StartStreamRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_spec_StartStreamResponse__Output>): grpc.ClientUnaryCall; - startStream(argument: _spec_StartStreamRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_spec_StartStreamResponse__Output>): grpc.ClientUnaryCall; - startStream(argument: _spec_StartStreamRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_spec_StartStreamResponse__Output>): grpc.ClientUnaryCall; - startStream(argument: _spec_StartStreamRequest, callback: grpc.requestCallback<_spec_StartStreamResponse__Output>): grpc.ClientUnaryCall; - - StopStream(argument: _spec_StopStreamRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_spec_StopStreamResponse__Output>): grpc.ClientUnaryCall; - StopStream(argument: _spec_StopStreamRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_spec_StopStreamResponse__Output>): grpc.ClientUnaryCall; - StopStream(argument: _spec_StopStreamRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_spec_StopStreamResponse__Output>): grpc.ClientUnaryCall; - StopStream(argument: _spec_StopStreamRequest, callback: grpc.requestCallback<_spec_StopStreamResponse__Output>): grpc.ClientUnaryCall; - stopStream(argument: _spec_StopStreamRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_spec_StopStreamResponse__Output>): grpc.ClientUnaryCall; - stopStream(argument: _spec_StopStreamRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_spec_StopStreamResponse__Output>): grpc.ClientUnaryCall; - stopStream(argument: _spec_StopStreamRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_spec_StopStreamResponse__Output>): grpc.ClientUnaryCall; - stopStream(argument: _spec_StopStreamRequest, callback: grpc.requestCallback<_spec_StopStreamResponse__Output>): grpc.ClientUnaryCall; - - UpdateStream(argument: _spec_UpdateStreamRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_spec_UpdateStreamResponse__Output>): grpc.ClientUnaryCall; - UpdateStream(argument: _spec_UpdateStreamRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_spec_UpdateStreamResponse__Output>): grpc.ClientUnaryCall; - UpdateStream(argument: _spec_UpdateStreamRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_spec_UpdateStreamResponse__Output>): grpc.ClientUnaryCall; - UpdateStream(argument: _spec_UpdateStreamRequest, callback: grpc.requestCallback<_spec_UpdateStreamResponse__Output>): grpc.ClientUnaryCall; - updateStream(argument: _spec_UpdateStreamRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_spec_UpdateStreamResponse__Output>): grpc.ClientUnaryCall; - updateStream(argument: _spec_UpdateStreamRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_spec_UpdateStreamResponse__Output>): grpc.ClientUnaryCall; - updateStream(argument: _spec_UpdateStreamRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_spec_UpdateStreamResponse__Output>): grpc.ClientUnaryCall; - updateStream(argument: _spec_UpdateStreamRequest, callback: grpc.requestCallback<_spec_UpdateStreamResponse__Output>): grpc.ClientUnaryCall; - -} - -export interface RunnerHandlers extends grpc.UntypedServiceImplementation { - ListStreams: grpc.handleUnaryCall<_spec_ListStreamsRequest__Output, _spec_ListStreamsResponse>; - - StartStream: grpc.handleUnaryCall<_spec_StartStreamRequest__Output, _spec_StartStreamResponse>; - - StopStream: grpc.handleUnaryCall<_spec_StopStreamRequest__Output, _spec_StopStreamResponse>; - - UpdateStream: grpc.handleUnaryCall<_spec_UpdateStreamRequest__Output, _spec_UpdateStreamResponse>; - -} - -export interface RunnerDefinition extends grpc.ServiceDefinition { - ListStreams: MethodDefinition<_spec_ListStreamsRequest, _spec_ListStreamsResponse, _spec_ListStreamsRequest__Output, _spec_ListStreamsResponse__Output> - StartStream: MethodDefinition<_spec_StartStreamRequest, _spec_StartStreamResponse, _spec_StartStreamRequest__Output, _spec_StartStreamResponse__Output> - StopStream: MethodDefinition<_spec_StopStreamRequest, _spec_StopStreamResponse, _spec_StopStreamRequest__Output, _spec_StopStreamResponse__Output> - UpdateStream: MethodDefinition<_spec_UpdateStreamRequest, _spec_UpdateStreamResponse, _spec_UpdateStreamRequest__Output, _spec_UpdateStreamResponse__Output> -} diff --git a/runner/src/generated/spec/StartStreamRequest.ts b/runner/src/generated/spec/StartStreamRequest.ts deleted file mode 100644 index 6f56d8864..000000000 --- a/runner/src/generated/spec/StartStreamRequest.ts +++ /dev/null @@ -1,14 +0,0 @@ -// Original file: protos/runner.proto - - -export interface StartStreamRequest { - 'streamId'?: (string); - 'redisStream'?: (string); - 'indexerConfig'?: (string); -} - -export interface StartStreamRequest__Output { - 'streamId': (string); - 'redisStream': (string); - 'indexerConfig': (string); -} diff --git a/runner/src/generated/spec/StartStreamResponse.ts b/runner/src/generated/spec/StartStreamResponse.ts deleted file mode 100644 index 21f78c715..000000000 --- a/runner/src/generated/spec/StartStreamResponse.ts +++ /dev/null @@ -1,10 +0,0 @@ -// Original file: protos/runner.proto - - -export interface StartStreamResponse { - 'streamId'?: (string); -} - -export interface StartStreamResponse__Output { - 'streamId': (string); -} diff --git a/runner/src/generated/spec/StopStreamRequest.ts b/runner/src/generated/spec/StopStreamRequest.ts deleted file mode 100644 index 96e978d6a..000000000 --- a/runner/src/generated/spec/StopStreamRequest.ts +++ /dev/null @@ -1,10 +0,0 @@ -// Original file: protos/runner.proto - - -export interface StopStreamRequest { - 'streamId'?: (string); -} - -export interface StopStreamRequest__Output { - 'streamId': (string); -} diff --git a/runner/src/generated/spec/StopStreamResponse.ts b/runner/src/generated/spec/StopStreamResponse.ts deleted file mode 100644 index 6296f4180..000000000 --- a/runner/src/generated/spec/StopStreamResponse.ts +++ /dev/null @@ -1,10 +0,0 @@ -// Original file: protos/runner.proto - - -export interface StopStreamResponse { - 'streamId'?: (string); -} - -export interface StopStreamResponse__Output { - 'streamId': (string); -} diff --git a/runner/src/generated/spec/StreamInfo.ts b/runner/src/generated/spec/StreamInfo.ts deleted file mode 100644 index 4a2884226..000000000 --- a/runner/src/generated/spec/StreamInfo.ts +++ /dev/null @@ -1,14 +0,0 @@ -// Original file: protos/runner.proto - - -export interface StreamInfo { - 'streamId'?: (string); - 'indexerName'?: (string); - 'status'?: (string); -} - -export interface StreamInfo__Output { - 'streamId': (string); - 'indexerName': (string); - 'status': (string); -} diff --git a/runner/src/generated/spec/UpdateStreamRequest.ts b/runner/src/generated/spec/UpdateStreamRequest.ts deleted file mode 100644 index 8b731eb78..000000000 --- a/runner/src/generated/spec/UpdateStreamRequest.ts +++ /dev/null @@ -1,12 +0,0 @@ -// Original file: protos/runner.proto - - -export interface UpdateStreamRequest { - 'streamId'?: (string); - 'indexerConfig'?: (string); -} - -export interface UpdateStreamRequest__Output { - 'streamId': (string); - 'indexerConfig': (string); -} diff --git a/runner/src/generated/spec/UpdateStreamResponse.ts b/runner/src/generated/spec/UpdateStreamResponse.ts deleted file mode 100644 index e9b0cc8e6..000000000 --- a/runner/src/generated/spec/UpdateStreamResponse.ts +++ /dev/null @@ -1,10 +0,0 @@ -// Original file: protos/runner.proto - - -export interface UpdateStreamResponse { - 'streamId'?: (string); -} - -export interface UpdateStreamResponse__Output { - 'streamId': (string); -} From 4ee0e5a43be75d37f777d41c7c599f10e18d7df1 Mon Sep 17 00:00:00 2001 From: Darun Seethammagari Date: Tue, 19 Dec 2023 17:22:35 -0800 Subject: [PATCH 13/18] Rename Stream to Executor --- runner/protos/runner.proto | 46 +++++++------- runner/src/service/runner-service.test.ts | 74 +++++++++++------------ runner/src/service/runner-service.ts | 54 ++++++++--------- 3 files changed, 87 insertions(+), 87 deletions(-) diff --git a/runner/protos/runner.proto b/runner/protos/runner.proto index 29d76e4d1..802d6606d 100644 --- a/runner/protos/runner.proto +++ b/runner/protos/runner.proto @@ -3,63 +3,63 @@ package spec; service Runner { // Starts a new Runner stream worker - rpc StartStream (StartStreamRequest) returns (StartStreamResponse); + rpc StartExecutor (StartExecutorRequest) returns (StartExecutorResponse); // Updates an existing Runner stream worker - rpc UpdateStream (UpdateStreamRequest) returns (UpdateStreamResponse); + rpc UpdateExecutor (UpdateExecutorRequest) returns (UpdateExecutorResponse); // Stops an existing Runner stream worker - rpc StopStream (StopStreamRequest) returns (StopStreamResponse); + rpc StopExecutor (StopExecutorRequest) returns (StopExecutorResponse); // Lists all Runner stream workers - rpc ListStreams (ListStreamsRequest) returns (ListStreamsResponse); + rpc ListExecutors (ListExecutorsRequest) returns (ListExecutorsResponse); } -// Start Stream Request -message StartStreamRequest { +// Start Executor Request +message StartExecutorRequest { string stream_id = 1; string redis_stream = 2; string indexer_config = 3; // JSON containing code, schema, etc. } -// Start Stream Response -message StartStreamResponse { +// Start Executor Response +message StartExecutorResponse { string stream_id = 1; } -// Update Stream Request -message UpdateStreamRequest { +// Update Executor Request +message UpdateExecutorRequest { string stream_id = 1; string indexer_config = 2; // JSON containing code, schema, etc. } -// Update Stream Response -message UpdateStreamResponse { +// Update Executor Response +message UpdateExecutorResponse { string stream_id = 1; } -// Stop Stream Request -message StopStreamRequest { +// Stop Executor Request +message StopExecutorRequest { string stream_id = 1; } -// Stop Stream Response -message StopStreamResponse { +// Stop Executor Response +message StopExecutorResponse { string stream_id = 1; } -// List Stream Request -message ListStreamsRequest { +// List Executor Request +message ListExecutorsRequest { } -// List Stream Response -message ListStreamsResponse { +// List Executor Response +message ListExecutorsResponse { // List of all streams, including stopped or crashed ones - repeated StreamInfo streams = 1; + repeated ExecutorInfo streams = 1; } -// Information about a single BlockStream instance. -message StreamInfo { +// Information about a single BlockExecutor instance. +message ExecutorInfo { string stream_id = 1; string indexer_name = 2; string status = 3; diff --git a/runner/src/service/runner-service.test.ts b/runner/src/service/runner-service.test.ts index 3956699d6..d402951f9 100644 --- a/runner/src/service/runner-service.test.ts +++ b/runner/src/service/runner-service.test.ts @@ -36,7 +36,7 @@ describe('Runner gRPC Service', () => { const mockCallback = jest.fn() as unknown as any; const request = generateRequest(BASIC_STREAM_ID, BASIC_REDIS_STREAM, JSON.stringify(BASIC_INDEXER_CONFIG)); - service.StartStream(request, mockCallback); + service.StartExecutor(request, mockCallback); expect(genericStreamHandlerType).toHaveBeenCalledWith(BASIC_REDIS_STREAM, BASIC_INDEXER_CONFIG); expect(mockCallback).toHaveBeenCalledWith(null, { streamId: BASIC_STREAM_ID }); @@ -47,7 +47,7 @@ describe('Runner gRPC Service', () => { const mockCallback = jest.fn() as unknown as any; const request = generateRequest('', BASIC_REDIS_STREAM, JSON.stringify(BASIC_INDEXER_CONFIG)); - service.StartStream(request, mockCallback); + service.StartExecutor(request, mockCallback); expect(genericStreamHandlerType).toHaveBeenCalledTimes(0); expect(mockCallback).toHaveBeenCalledWith({ @@ -61,7 +61,7 @@ describe('Runner gRPC Service', () => { const mockCallback = jest.fn() as unknown as any; const request = generateRequest(BASIC_STREAM_ID, undefined, JSON.stringify(BASIC_INDEXER_CONFIG)); - service.StartStream(request, mockCallback); + service.StartExecutor(request, mockCallback); expect(genericStreamHandlerType).toHaveBeenCalledTimes(0); expect(mockCallback).toHaveBeenCalledWith({ @@ -75,7 +75,7 @@ describe('Runner gRPC Service', () => { const mockCallback = jest.fn() as unknown as any; const request = generateRequest(BASIC_STREAM_ID, BASIC_REDIS_STREAM, undefined); - service.StartStream(request, mockCallback); + service.StartExecutor(request, mockCallback); expect(genericStreamHandlerType).toHaveBeenCalledTimes(0); expect(mockCallback).toHaveBeenCalledWith({ @@ -95,7 +95,7 @@ describe('Runner gRPC Service', () => { } )); - service.StartStream(request, mockCallback); + service.StartExecutor(request, mockCallback); expect(genericStreamHandlerType).toHaveBeenCalledTimes(0); expect(mockCallback).toHaveBeenCalledWith({ @@ -109,7 +109,7 @@ describe('Runner gRPC Service', () => { const mockCallback = jest.fn() as unknown as any; const request = generateRequest(BASIC_STREAM_ID, BASIC_REDIS_STREAM, '{'); - service.StartStream(request, mockCallback); + service.StartExecutor(request, mockCallback); expect(genericStreamHandlerType).toHaveBeenCalledTimes(0); expect(mockCallback).toHaveBeenCalledWith({ @@ -129,8 +129,8 @@ describe('Runner gRPC Service', () => { }; const startRequest = generateRequest(BASIC_STREAM_ID, BASIC_REDIS_STREAM, JSON.stringify(indexerConfig)); - service.StartStream(startRequest, mockCallback); - service.StartStream(startRequest, mockCallback); + service.StartExecutor(startRequest, mockCallback); + service.StartExecutor(startRequest, mockCallback); expect(genericStreamHandlerType).toHaveBeenCalledTimes(1); expect(genericStreamHandlerType).toHaveBeenCalledWith(BASIC_REDIS_STREAM, indexerConfig); @@ -138,7 +138,7 @@ describe('Runner gRPC Service', () => { [null, { streamId: BASIC_STREAM_ID }], [{ code: grpc.status.ALREADY_EXISTS, - message: `Stream ${BASIC_STREAM_ID} can't be started as it already exists.` + message: `Stream Executor ${BASIC_STREAM_ID} can't be started as it already exists.` }, null] ]); }); @@ -153,12 +153,12 @@ describe('Runner gRPC Service', () => { const indexerConfig = BASIC_INDEXER_CONFIG; const startRequest = generateRequest(BASIC_STREAM_ID, BASIC_REDIS_STREAM, JSON.stringify(indexerConfig)); - service.StartStream(startRequest, mockCallback); + service.StartExecutor(startRequest, mockCallback); indexerConfig.code = 'test-code-2'; const updateRequest = generateRequest(BASIC_STREAM_ID, undefined, JSON.stringify(indexerConfig)); - service.UpdateStream(updateRequest, mockCallback); + service.UpdateExecutor(updateRequest, mockCallback); indexerConfig.code = 'test-code'; expect(streamHandlerType).toHaveBeenCalledTimes(1); @@ -178,7 +178,7 @@ describe('Runner gRPC Service', () => { const mockCallback = jest.fn() as unknown as any; const request = generateRequest('', undefined, JSON.stringify(BASIC_INDEXER_CONFIG)); - service.UpdateStream(request, mockCallback); + service.UpdateExecutor(request, mockCallback); expect(genericStreamHandlerType).toHaveBeenCalledTimes(0); expect(mockCallback).toHaveBeenCalledWith({ @@ -192,12 +192,12 @@ describe('Runner gRPC Service', () => { const mockCallback = jest.fn() as unknown as any; const request = generateRequest(BASIC_STREAM_ID, undefined, JSON.stringify(BASIC_INDEXER_CONFIG)); - service.UpdateStream(request, mockCallback); + service.UpdateExecutor(request, mockCallback); expect(genericStreamHandlerType).toHaveBeenCalledTimes(0); expect(mockCallback).toHaveBeenCalledWith({ code: grpc.status.INVALID_ARGUMENT, - message: `Stream ${BASIC_STREAM_ID} cannot be updated as it does not exist.` + message: `Stream Executor ${BASIC_STREAM_ID} cannot be updated as it does not exist.` }, null); }); @@ -206,7 +206,7 @@ describe('Runner gRPC Service', () => { const mockCallback = jest.fn() as unknown as any; const request = generateRequest(BASIC_STREAM_ID, BASIC_REDIS_STREAM, undefined); - service.StartStream(request, mockCallback); + service.StartExecutor(request, mockCallback); expect(genericStreamHandlerType).toHaveBeenCalledTimes(0); expect(mockCallback).toHaveBeenCalledWith({ @@ -226,7 +226,7 @@ describe('Runner gRPC Service', () => { } )); - service.StartStream(request, mockCallback); + service.StartExecutor(request, mockCallback); expect(genericStreamHandlerType).toHaveBeenCalledTimes(0); expect(mockCallback).toHaveBeenCalledWith({ @@ -240,7 +240,7 @@ describe('Runner gRPC Service', () => { const mockCallback = jest.fn() as unknown as any; const request = generateRequest(BASIC_STREAM_ID, BASIC_REDIS_STREAM, '{'); - service.StartStream(request, mockCallback); + service.StartExecutor(request, mockCallback); expect(genericStreamHandlerType).toHaveBeenCalledTimes(0); expect(mockCallback).toHaveBeenCalledWith({ @@ -261,13 +261,13 @@ describe('Runner gRPC Service', () => { const requestA = generateRequest(BASIC_STREAM_ID + '-A', BASIC_REDIS_STREAM + '-A', JSON.stringify(BASIC_INDEXER_CONFIG)); const requestB = generateRequest(BASIC_STREAM_ID + '-B', BASIC_REDIS_STREAM + '-B', JSON.stringify(BASIC_INDEXER_CONFIG)); - service.StartStream(requestA, mockCallback); - service.StartStream(requestB, mockCallback); + service.StartExecutor(requestA, mockCallback); + service.StartExecutor(requestB, mockCallback); const stopRequest = generateRequest(BASIC_STREAM_ID + '-A', undefined, undefined); // Stops stream A await new Promise((resolve, reject) => { - service.StopStream(stopRequest, function (err, response) { + service.StopExecutor(stopRequest, function (err, response) { if (err) { reject(err); return; } @@ -276,7 +276,7 @@ describe('Runner gRPC Service', () => { }); }); - service.StartStream(requestA, mockCallback); + service.StartExecutor(requestA, mockCallback); expect(streamHandlerType).toHaveBeenCalledTimes(3); expect(stop).toHaveBeenCalledTimes(1); @@ -299,7 +299,7 @@ describe('Runner gRPC Service', () => { const mockCallback = jest.fn() as unknown as any; const request = generateRequest('', undefined, undefined); - service.StopStream(request, mockCallback); + service.StopExecutor(request, mockCallback); expect(stop).toHaveBeenCalledTimes(0); expect(mockCallback).toHaveBeenCalledWith({ @@ -319,12 +319,12 @@ describe('Runner gRPC Service', () => { const mockCallback = jest.fn() as unknown as any; const request = generateRequest(BASIC_STREAM_ID, undefined, undefined); - service.StopStream(request, mockCallback); + service.StopExecutor(request, mockCallback); expect(stop).toHaveBeenCalledTimes(0); expect(mockCallback).toHaveBeenCalledWith({ code: grpc.status.INVALID_ARGUMENT, - message: `Stream ${BASIC_STREAM_ID} cannot be stopped as it does not exist.` + message: `Stream Executor ${BASIC_STREAM_ID} cannot be stopped as it does not exist.` }, null); }); @@ -340,10 +340,10 @@ describe('Runner gRPC Service', () => { const startRequest = generateRequest(BASIC_STREAM_ID, BASIC_REDIS_STREAM, JSON.stringify(BASIC_INDEXER_CONFIG)); const stopRequest = generateRequest(BASIC_STREAM_ID, undefined, undefined); - service.StartStream(startRequest, mockCallback); + service.StartExecutor(startRequest, mockCallback); await new Promise((resolve, reject) => { - service.StopStream(stopRequest, function (err, response) { + service.StopExecutor(stopRequest, function (err, response) { if (err) { // Should get somehow fails error mockCallback(err, response); resolve(err.details); return; @@ -379,18 +379,18 @@ describe('Runner gRPC Service', () => { const listRequest = generateRequest(undefined, undefined, undefined); const stopRequest = generateRequest(BASIC_STREAM_ID + '-A', undefined, undefined); // Stops stream A - await listStreamsPromise(listRequest, service, mockCallback); + await listExecutorsPromise(listRequest, service, mockCallback); - service.StartStream(requestA, mockCallback); + service.StartExecutor(requestA, mockCallback); - await listStreamsPromise(listRequest, service, mockCallback); + await listExecutorsPromise(listRequest, service, mockCallback); - service.StartStream(requestB, mockCallback); + service.StartExecutor(requestB, mockCallback); - await listStreamsPromise(listRequest, service, mockCallback); + await listExecutorsPromise(listRequest, service, mockCallback); await new Promise((resolve, reject) => { - service.StopStream(stopRequest, function (err, response) { + service.StopExecutor(stopRequest, function (err, response) { if (err) { reject(err); return; } @@ -399,11 +399,11 @@ describe('Runner gRPC Service', () => { }); }); - await listStreamsPromise(listRequest, service, mockCallback); + await listExecutorsPromise(listRequest, service, mockCallback); - service.StartStream(requestA, mockCallback); + service.StartExecutor(requestA, mockCallback); - await listStreamsPromise(listRequest, service, mockCallback); + await listExecutorsPromise(listRequest, service, mockCallback); expect(streamHandlerType).toHaveBeenCalledTimes(3); expect(stop).toHaveBeenCalledTimes(1); @@ -434,9 +434,9 @@ describe('Runner gRPC Service', () => { }); }); -async function listStreamsPromise (listRequest: any, service: RunnerHandlers, mockCallback: jest.Mock): Promise { +async function listExecutorsPromise (listRequest: any, service: RunnerHandlers, mockCallback: jest.Mock): Promise { await new Promise((resolve, reject) => { - service.ListStreams(listRequest, function (err, response) { + service.ListExecutors(listRequest, function (err, response) { if (err) { reject(err); return; } diff --git a/runner/src/service/runner-service.ts b/runner/src/service/runner-service.ts index 5bfbc39a7..adc23d1f3 100644 --- a/runner/src/service/runner-service.ts +++ b/runner/src/service/runner-service.ts @@ -1,14 +1,14 @@ import { type ServerUnaryCall, type sendUnaryData } from '@grpc/grpc-js'; import { type RunnerHandlers } from '../generated/spec/Runner'; -import { type StartStreamResponse__Output, type StartStreamResponse } from '../generated/spec/StartStreamResponse'; -import { type StartStreamRequest__Output } from '../generated/spec/StartStreamRequest'; -import { type UpdateStreamRequest__Output } from '../generated/spec/UpdateStreamRequest'; -import { type UpdateStreamResponse__Output, type UpdateStreamResponse } from '../generated/spec/UpdateStreamResponse'; -import { type StopStreamRequest__Output } from '../generated/spec/StopStreamRequest'; -import { type StopStreamResponse__Output, type StopStreamResponse } from '../generated/spec/StopStreamResponse'; -import { type ListStreamsRequest__Output } from '../generated/spec/ListStreamsRequest'; -import { type ListStreamsResponse__Output, type ListStreamsResponse } from '../generated/spec/ListStreamsResponse'; -import { type StreamInfo__Output } from '../generated/spec/StreamInfo'; +import { type StartExecutorResponse__Output, type StartExecutorResponse } from '../generated/spec/StartExecutorResponse'; +import { type StartExecutorRequest__Output } from '../generated/spec/StartExecutorRequest'; +import { type UpdateExecutorRequest__Output } from '../generated/spec/UpdateExecutorRequest'; +import { type UpdateExecutorResponse__Output, type UpdateExecutorResponse } from '../generated/spec/UpdateExecutorResponse'; +import { type StopExecutorRequest__Output } from '../generated/spec/StopExecutorRequest'; +import { type StopExecutorResponse__Output, type StopExecutorResponse } from '../generated/spec/StopExecutorResponse'; +import { type ListExecutorsRequest__Output } from '../generated/spec/ListExecutorsRequest'; +import { type ListExecutorsResponse__Output, type ListExecutorsResponse } from '../generated/spec/ListExecutorsResponse'; +import { type ExecutorInfo__Output } from '../generated/spec/ExecutorInfo'; import type StreamHandler from '../stream-handler'; import * as grpc from '@grpc/grpc-js'; import assert from 'assert'; @@ -19,10 +19,10 @@ function getRunnerService (StreamHandlerType: typeof StreamHandler): RunnerHandl const streamHandlers: StreamHandlers = new Map(); const RunnerService: RunnerHandlers = { - StartStream (call: ServerUnaryCall, callback: sendUnaryData): void { - console.log('StartStream called', call.request); + StartExecutor (call: ServerUnaryCall, callback: sendUnaryData): void { + console.log('StartExecutor called'); // Validate request - const validationResult = validateStartStreamRequest(call.request, streamHandlers); + const validationResult = validateStartExecutorRequest(call.request, streamHandlers); if (validationResult !== null) { callback(validationResult, null); return; @@ -44,10 +44,10 @@ function getRunnerService (StreamHandlerType: typeof StreamHandler): RunnerHandl } }, - UpdateStream (call: ServerUnaryCall, callback: sendUnaryData): void { - console.log('UpdateStream called', call.request); + UpdateExecutor (call: ServerUnaryCall, callback: sendUnaryData): void { + console.log('UpdateExecutor called'); // Validate request - const validationResult = validateUpdateStreamRequest(call.request, streamHandlers); + const validationResult = validateUpdateExecutorRequest(call.request, streamHandlers); if (validationResult !== null) { callback(validationResult, null); return; @@ -68,10 +68,10 @@ function getRunnerService (StreamHandlerType: typeof StreamHandler): RunnerHandl } }, - StopStream (call: ServerUnaryCall, callback: sendUnaryData): void { - console.log('StopStream called', call.request); + StopExecutor (call: ServerUnaryCall, callback: sendUnaryData): void { + console.log('StopExecutor called'); // Validate request - const validationResult = validateStopStreamRequest(call.request, streamHandlers); + const validationResult = validateStopExecutorRequest(call.request, streamHandlers); if (validationResult !== null) { callback(validationResult, null); return; @@ -89,11 +89,11 @@ function getRunnerService (StreamHandlerType: typeof StreamHandler): RunnerHandl }); }, - ListStreams (call: ServerUnaryCall, callback: sendUnaryData): void { + ListExecutors (_: ServerUnaryCall, callback: sendUnaryData): void { // TODO: Refactor to make use of repeated field - console.log('ListStreams called', call.request); + console.log('ListExecutors called'); // TODO: Return more information than just streamId - const response: StreamInfo__Output[] = []; + const response: ExecutorInfo__Output[] = []; try { streamHandlers.forEach((handler, stream) => { response.push({ @@ -161,7 +161,7 @@ function validateIndexerConfig (indexerConfig: string): any | null { return null; } -function validateStartStreamRequest (request: StartStreamRequest__Output, streamHandlers: StreamHandlers): any | null { +function validateStartExecutorRequest (request: StartExecutorRequest__Output, streamHandlers: StreamHandlers): any | null { const grpcError = { code: grpc.status.INVALID_ARGUMENT, message: '' @@ -174,7 +174,7 @@ function validateStartStreamRequest (request: StartStreamRequest__Output, stream } assert(request.streamId !== undefined); if (streamHandlers.get(request.streamId) !== undefined) { - grpcError.message = `Stream ${request.streamId} can't be started as it already exists.`; + grpcError.message = `Stream Executor ${request.streamId} can't be started as it already exists.`; grpcError.code = grpc.status.ALREADY_EXISTS; return grpcError; } @@ -193,7 +193,7 @@ function validateStartStreamRequest (request: StartStreamRequest__Output, stream return null; } -function validateUpdateStreamRequest (request: UpdateStreamRequest__Output, streamHandlers: StreamHandlers): any | null { +function validateUpdateExecutorRequest (request: UpdateExecutorRequest__Output, streamHandlers: StreamHandlers): any | null { const grpcError = { code: grpc.status.INVALID_ARGUMENT, message: '' @@ -206,7 +206,7 @@ function validateUpdateStreamRequest (request: UpdateStreamRequest__Output, stre } assert(request.streamId !== undefined); if (streamHandlers.get(request.streamId) === undefined) { - grpcError.message = `Stream ${request.streamId} cannot be updated as it does not exist.`; + grpcError.message = `Stream Executor ${request.streamId} cannot be updated as it does not exist.`; return grpcError; } @@ -218,7 +218,7 @@ function validateUpdateStreamRequest (request: UpdateStreamRequest__Output, stre return null; } -function validateStopStreamRequest (request: StopStreamRequest__Output, streamHandlers: StreamHandlers): any | null { +function validateStopExecutorRequest (request: StopExecutorRequest__Output, streamHandlers: StreamHandlers): any | null { const grpcError = { code: grpc.status.INVALID_ARGUMENT, message: '' @@ -231,7 +231,7 @@ function validateStopStreamRequest (request: StopStreamRequest__Output, streamHa } assert(request.streamId !== undefined); if (streamHandlers.get(request.streamId) === undefined) { - grpcError.message = `Stream ${request.streamId} cannot be stopped as it does not exist.`; + grpcError.message = `Stream Executor ${request.streamId} cannot be stopped as it does not exist.`; return grpcError; } From 53217ce1b62055c3c61250e4f63ead25a703a749 Mon Sep 17 00:00:00 2001 From: Darun Seethammagari Date: Tue, 19 Dec 2023 17:44:18 -0800 Subject: [PATCH 14/18] Run codegen with build --- runner/.gitignore | 2 +- runner/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/runner/.gitignore b/runner/.gitignore index 5959a6b35..716d562d9 100644 --- a/runner/.gitignore +++ b/runner/.gitignore @@ -1,3 +1,3 @@ **/dist /node_modules -src/generated/ \ No newline at end of file +src/generated/ diff --git a/runner/package.json b/runner/package.json index 724f418cb..194d54c1a 100644 --- a/runner/package.json +++ b/runner/package.json @@ -7,7 +7,7 @@ "node": "18.17" }, "scripts": { - "build": "rm -rf ./dist && tsc", + "build": "rm -rf ./dist && npm run codegen && tsc", "codegen": "npx proto-loader-gen-types --longs=String --enums=String --defaults --oneofs --grpcLib=@grpc/grpc-js --outDir=src/generated/ protos/runner.proto", "start": "npm run build && node dist/index.js", "start:dev": "ts-node ./src/index.ts", From a2a4538786271d19d0eaae7fb0db5614081aeb99 Mon Sep 17 00:00:00 2001 From: Darun Seethammagari Date: Wed, 20 Dec 2023 12:41:52 -0800 Subject: [PATCH 15/18] Address Second Set of PR Comments --- runner/Dockerfile | 1 - runner/package.json | 2 +- runner/protos/runner.proto | 39 +- runner/src/{service => server}/index.ts | 0 .../src/{service => server}/runner-client.ts | 0 .../src/{service => server}/runner-server.ts | 4 +- runner/src/server/runner-service.test.ts | 351 ++++++++++++++ .../src/{service => server}/runner-service.ts | 136 ++---- runner/src/service/runner-service.test.ts | 458 ------------------ 9 files changed, 406 insertions(+), 585 deletions(-) rename runner/src/{service => server}/index.ts (100%) rename runner/src/{service => server}/runner-client.ts (100%) rename runner/src/{service => server}/runner-server.ts (86%) create mode 100644 runner/src/server/runner-service.test.ts rename runner/src/{service => server}/runner-service.ts (52%) delete mode 100644 runner/src/service/runner-service.test.ts diff --git a/runner/Dockerfile b/runner/Dockerfile index e016a3ce4..779b3adde 100644 --- a/runner/Dockerfile +++ b/runner/Dockerfile @@ -2,7 +2,6 @@ FROM node:18.18.2 AS builder WORKDIR /usr/src/app COPY . . RUN npm install -RUN npm run codegen RUN npm run build FROM node:18.18.2 diff --git a/runner/package.json b/runner/package.json index 194d54c1a..4ca268c1a 100644 --- a/runner/package.json +++ b/runner/package.json @@ -8,7 +8,7 @@ }, "scripts": { "build": "rm -rf ./dist && npm run codegen && tsc", - "codegen": "npx proto-loader-gen-types --longs=String --enums=String --defaults --oneofs --grpcLib=@grpc/grpc-js --outDir=src/generated/ protos/runner.proto", + "codegen": "rm -rf ./src/generated && proto-loader-gen-types --longs=String --enums=String --defaults --oneofs --grpcLib=@grpc/grpc-js --outDir=src/generated/ protos/runner.proto", "start": "npm run build && node dist/index.js", "start:dev": "ts-node ./src/index.ts", "start:docker": "node dist/index.js", diff --git a/runner/protos/runner.proto b/runner/protos/runner.proto index 802d6606d..e64aeaa74 100644 --- a/runner/protos/runner.proto +++ b/runner/protos/runner.proto @@ -2,50 +2,39 @@ syntax = "proto3"; package spec; service Runner { - // Starts a new Runner stream worker + // Starts a new Runner executor rpc StartExecutor (StartExecutorRequest) returns (StartExecutorResponse); - // Updates an existing Runner stream worker - rpc UpdateExecutor (UpdateExecutorRequest) returns (UpdateExecutorResponse); - - // Stops an existing Runner stream worker + // Stops an existing Runner executor rpc StopExecutor (StopExecutorRequest) returns (StopExecutorResponse); - // Lists all Runner stream workers + // Lists all Runner executor rpc ListExecutors (ListExecutorsRequest) returns (ListExecutorsResponse); } // Start Executor Request message StartExecutorRequest { - string stream_id = 1; + string executor_id = 1; string redis_stream = 2; - string indexer_config = 3; // JSON containing code, schema, etc. + string account_id = 3; + string function_name = 4; + string code = 5; + string schema = 6; } // Start Executor Response message StartExecutorResponse { - string stream_id = 1; -} - -// Update Executor Request -message UpdateExecutorRequest { - string stream_id = 1; - string indexer_config = 2; // JSON containing code, schema, etc. -} - -// Update Executor Response -message UpdateExecutorResponse { - string stream_id = 1; + string executor_id = 1; } // Stop Executor Request message StopExecutorRequest { - string stream_id = 1; + string executor_id = 1; } // Stop Executor Response message StopExecutorResponse { - string stream_id = 1; + string executor_id = 1; } // List Executor Request @@ -54,13 +43,13 @@ message ListExecutorsRequest { // List Executor Response message ListExecutorsResponse { - // List of all streams, including stopped or crashed ones - repeated ExecutorInfo streams = 1; + // List of all executors, including stopped or crashed ones + repeated ExecutorInfo executors = 1; } // Information about a single BlockExecutor instance. message ExecutorInfo { - string stream_id = 1; + string executor_id = 1; string indexer_name = 2; string status = 3; } diff --git a/runner/src/service/index.ts b/runner/src/server/index.ts similarity index 100% rename from runner/src/service/index.ts rename to runner/src/server/index.ts diff --git a/runner/src/service/runner-client.ts b/runner/src/server/runner-client.ts similarity index 100% rename from runner/src/service/runner-client.ts rename to runner/src/server/runner-client.ts diff --git a/runner/src/service/runner-server.ts b/runner/src/server/runner-server.ts similarity index 86% rename from runner/src/service/runner-server.ts rename to runner/src/server/runner-server.ts index 402f808d3..ff72fd46a 100644 --- a/runner/src/service/runner-server.ts +++ b/runner/src/server/runner-server.ts @@ -6,7 +6,7 @@ import StreamHandler from '../stream-handler/stream-handler'; const PROTO_PATH = 'protos/runner.proto'; -export default function startServer (): grpc.Server { +export default function startRunnerServer (): grpc.Server { const packageDefinition = protoLoader.loadSync(PROTO_PATH); const runnerProto = (grpc.loadPackageDefinition( packageDefinition @@ -18,7 +18,7 @@ export default function startServer (): grpc.Server { server.bindAsync( '0.0.0.0:50007', // TODO: Read port from ENV - credentials.createInsecure(), + credentials.createInsecure(), // TODO: Use secure credentials with allow for Coordinator (err: Error | null, port: number) => { if (err) { console.error(`Server error: ${err.message}`); diff --git a/runner/src/server/runner-service.test.ts b/runner/src/server/runner-service.test.ts new file mode 100644 index 000000000..5c734bac7 --- /dev/null +++ b/runner/src/server/runner-service.test.ts @@ -0,0 +1,351 @@ +import { type RunnerHandlers } from '../generated/spec/Runner'; +import type StreamHandler from '../stream-handler/stream-handler'; +import getRunnerService from './runner-service'; +import * as grpc from '@grpc/grpc-js'; + +let BASIC_EXECUTOR_ID = 'test-executor-id'; +let BASIC_REDIS_STREAM = 'test-redis-stream'; +let BASIC_ACCOUNT_ID = 'test-account-id'; +let BASIC_FUNCTION_NAME = 'test-function-name'; +let BASIC_CODE = 'test-code'; +let BASIC_SCHEMA = 'test-schema'; +let BASIC_INDEXER_CONFIG = { + account_id: BASIC_ACCOUNT_ID, + function_name: BASIC_FUNCTION_NAME, + code: BASIC_CODE, + schema: BASIC_SCHEMA, +}; + +beforeAll(() => { + BASIC_EXECUTOR_ID = 'test-executor-id'; + BASIC_REDIS_STREAM = 'test-redis-stream'; + BASIC_ACCOUNT_ID = 'test-account-id'; + BASIC_FUNCTION_NAME = 'test-function-name'; + BASIC_CODE = 'test-code'; + BASIC_SCHEMA = 'test-schema'; + BASIC_INDEXER_CONFIG = { + account_id: BASIC_ACCOUNT_ID, + function_name: BASIC_FUNCTION_NAME, + code: BASIC_CODE, + schema: BASIC_SCHEMA, + }; +}); + +describe('Runner gRPC Service', () => { + let genericStreamHandlerType: typeof StreamHandler; + beforeEach(() => { + genericStreamHandlerType = jest.fn().mockImplementation(() => { + return { updateIndexerConfig: jest.fn() }; + }); + }); + + it('starts a executor with correct settings', () => { + const service = getRunnerService(genericStreamHandlerType); + const mockCallback = jest.fn() as unknown as any; + const request = generateRequest(BASIC_EXECUTOR_ID, BASIC_REDIS_STREAM, BASIC_ACCOUNT_ID, BASIC_FUNCTION_NAME, BASIC_CODE, BASIC_SCHEMA); + + service.StartExecutor(request, mockCallback); + + expect(genericStreamHandlerType).toHaveBeenCalledWith(BASIC_REDIS_STREAM, BASIC_INDEXER_CONFIG); + expect(mockCallback).toHaveBeenCalledWith(null, { executorId: BASIC_EXECUTOR_ID }); + }); + + it('Invalid start executor request with empty executor Id', () => { + const service = getRunnerService(genericStreamHandlerType); + const mockCallback = jest.fn() as unknown as any; + const request = generateRequest('', BASIC_REDIS_STREAM, BASIC_ACCOUNT_ID, BASIC_FUNCTION_NAME, BASIC_CODE, BASIC_SCHEMA); + + service.StartExecutor(request, mockCallback); + + expect(genericStreamHandlerType).toHaveBeenCalledTimes(0); + expect(mockCallback).toHaveBeenCalledWith({ + code: grpc.status.INVALID_ARGUMENT, + message: 'Invalid executorId. It must be a non-empty string.' + }, null); + }); + + it('Invalid start executor request with missing redis stream Id parameter', () => { + const service = getRunnerService(genericStreamHandlerType); + const mockCallback = jest.fn() as unknown as any; + const request = generateRequest(BASIC_EXECUTOR_ID, undefined, BASIC_ACCOUNT_ID, BASIC_FUNCTION_NAME, BASIC_CODE, BASIC_SCHEMA); + + service.StartExecutor(request, mockCallback); + + expect(mockCallback).toHaveBeenCalledWith({ + code: grpc.status.INVALID_ARGUMENT, + message: 'Invalid redisStream. It must be a non-empty string.' + }, null); + expect(genericStreamHandlerType).toHaveBeenCalledTimes(0); + }); + + it('Invalid start executor request with missing config parameters', () => { + const service = getRunnerService(genericStreamHandlerType); + const mockCallback = jest.fn() as unknown as any; + let request = generateRequest(BASIC_EXECUTOR_ID, BASIC_REDIS_STREAM, undefined, BASIC_FUNCTION_NAME, BASIC_CODE, BASIC_SCHEMA); + service.StartExecutor(request, mockCallback); + + request = generateRequest(BASIC_EXECUTOR_ID, BASIC_REDIS_STREAM, BASIC_ACCOUNT_ID, '', BASIC_CODE, BASIC_SCHEMA); + service.StartExecutor(request, mockCallback); + + request = generateRequest(BASIC_EXECUTOR_ID, BASIC_REDIS_STREAM, BASIC_ACCOUNT_ID, BASIC_FUNCTION_NAME, undefined, BASIC_SCHEMA); + service.StartExecutor(request, mockCallback); + + request = generateRequest(BASIC_EXECUTOR_ID, BASIC_REDIS_STREAM, BASIC_ACCOUNT_ID, BASIC_FUNCTION_NAME, BASIC_CODE, ''); + service.StartExecutor(request, mockCallback); + + expect(genericStreamHandlerType).toHaveBeenCalledTimes(0); + expect(mockCallback.mock.calls).toEqual([ + [{ + code: grpc.status.INVALID_ARGUMENT, + message: 'Invalid accountId. It must be a non-empty string.' + }, null], + [{ + code: grpc.status.INVALID_ARGUMENT, + message: 'Invalid functionName. It must be a non-empty string.' + }, null], + [{ + code: grpc.status.INVALID_ARGUMENT, + message: 'Invalid code. It must be a non-empty string.' + }, null], + [{ + code: grpc.status.INVALID_ARGUMENT, + message: 'Invalid schema. It must be a non-empty string.' + }, null] + ]); + }); + + it('starts a executor twice with correct settings, gets error second time', () => { + const service = getRunnerService(genericStreamHandlerType); + const mockCallback = jest.fn() as unknown as any; + const startRequest = generateRequest(BASIC_EXECUTOR_ID, BASIC_REDIS_STREAM, BASIC_ACCOUNT_ID, BASIC_FUNCTION_NAME, BASIC_CODE, BASIC_SCHEMA); + + service.StartExecutor(startRequest, mockCallback); + service.StartExecutor(startRequest, mockCallback); + + expect(genericStreamHandlerType).toHaveBeenCalledTimes(1); + expect(genericStreamHandlerType).toHaveBeenCalledWith(BASIC_REDIS_STREAM, BASIC_INDEXER_CONFIG); + expect(mockCallback.mock.calls).toEqual([ + [null, { executorId: BASIC_EXECUTOR_ID }], + [{ + code: grpc.status.ALREADY_EXISTS, + message: `Executor ${BASIC_EXECUTOR_ID} can't be started as it already exists.` + }, null] + ]); + }); + + it('stops a executor with correct settings', async () => { + const stop = jest.fn().mockImplementation(async () => { + await Promise.resolve(); + }); + const streamHandlerType = jest.fn().mockImplementation(() => { + return { stop }; + }); + const service = getRunnerService(streamHandlerType); + const mockCallback = jest.fn() as unknown as any; + const requestA = generateRequest(BASIC_EXECUTOR_ID + '-A', BASIC_REDIS_STREAM + '-A', BASIC_ACCOUNT_ID, BASIC_FUNCTION_NAME, BASIC_CODE, BASIC_SCHEMA); + const requestB = generateRequest(BASIC_EXECUTOR_ID + '-B', BASIC_REDIS_STREAM + '-B', BASIC_ACCOUNT_ID, BASIC_FUNCTION_NAME, BASIC_CODE, BASIC_SCHEMA); + + service.StartExecutor(requestA, mockCallback); + service.StartExecutor(requestB, mockCallback); + + const stopRequest = generateRequest(BASIC_EXECUTOR_ID + '-A', undefined, undefined); // Stops executor A + + await new Promise((resolve, reject) => { + service.StopExecutor(stopRequest, function (err, response) { + if (err) { + reject(err); return; + } + mockCallback(err, response); + resolve(response); + }); + }); + + service.StartExecutor(requestA, mockCallback); + + expect(streamHandlerType).toHaveBeenCalledTimes(3); + expect(stop).toHaveBeenCalledTimes(1); + expect(mockCallback.mock.calls).toEqual([ + [null, { executorId: BASIC_EXECUTOR_ID + '-A' }], // Start A + [null, { executorId: BASIC_EXECUTOR_ID + '-B' }], // Start B + [null, { executorId: BASIC_EXECUTOR_ID + '-A' }], // Stop A + [null, { executorId: BASIC_EXECUTOR_ID + '-A' }], // Stop B + ]); + }); + + it('Invalid stop executor request with empty executor Id', () => { + const stop = jest.fn().mockImplementation(async () => { + await Promise.resolve(); + }); + const streamHandlerType = jest.fn().mockImplementation(() => { + return { stop }; + }); + const service = getRunnerService(streamHandlerType); + const mockCallback = jest.fn() as unknown as any; + const request = generateRequest(''); + + service.StopExecutor(request, mockCallback); + + expect(stop).toHaveBeenCalledTimes(0); + expect(mockCallback).toHaveBeenCalledWith({ + code: grpc.status.INVALID_ARGUMENT, + message: 'Invalid executorId. It must be a non-empty string.' + }, null); + }); + + it('Invalid stop executor request with non-existent executor', () => { + const stop = jest.fn().mockImplementation(async () => { + await Promise.resolve(); + }); + const streamHandlerType = jest.fn().mockImplementation(() => { + return { stop }; + }); + const service = getRunnerService(streamHandlerType); + const mockCallback = jest.fn() as unknown as any; + const request = generateRequest(BASIC_EXECUTOR_ID, undefined, undefined); + + service.StopExecutor(request, mockCallback); + + expect(stop).toHaveBeenCalledTimes(0); + expect(mockCallback).toHaveBeenCalledWith({ + code: grpc.status.INVALID_ARGUMENT, + message: `Executor ${BASIC_EXECUTOR_ID} cannot be stopped as it does not exist.` + }, null); + }); + + it('Invalid stop executor request with somehow failing stop', async () => { + const stop = jest.fn().mockImplementation(async () => { + await Promise.reject(new Error('somehow fails')); + }); + const streamHandlerType = jest.fn().mockImplementation(() => { + return { stop }; + }); + const service = getRunnerService(streamHandlerType); + const mockCallback = jest.fn() as unknown as any; + const startRequest = generateRequest(BASIC_EXECUTOR_ID, BASIC_REDIS_STREAM, BASIC_ACCOUNT_ID, BASIC_FUNCTION_NAME, BASIC_CODE, BASIC_SCHEMA); + const stopRequest = generateRequest(BASIC_EXECUTOR_ID, undefined, undefined); + + service.StartExecutor(startRequest, mockCallback); + + await new Promise((resolve, reject) => { + service.StopExecutor(stopRequest, function (err, response) { + if (err) { // Should get somehow fails error + mockCallback(err, response); + resolve(err.details); return; + } + reject(err); + }); + }); + + expect(stop).toHaveBeenCalledTimes(1); + expect(mockCallback.mock.calls).toEqual([ + [null, { executorId: BASIC_EXECUTOR_ID }], + [{ + code: grpc.status.INTERNAL, + message: 'somehow fails' + }, null] + ]); + }); + + it('valid list executor request lists executors correctly', async () => { + const stop = jest.fn().mockImplementation(async () => { + await Promise.resolve(); + }); + const streamHandlerType = jest.fn().mockImplementation((...args) => { + return { + stop, + indexerName: `${args[1].account_id as string}/${args[1].function_name as string}`, + }; + }); + const service = getRunnerService(streamHandlerType); + const mockCallback = jest.fn() as unknown as any; + const requestA = generateRequest(BASIC_EXECUTOR_ID + '-A', BASIC_REDIS_STREAM + '-A', BASIC_ACCOUNT_ID, BASIC_FUNCTION_NAME, BASIC_CODE, BASIC_SCHEMA); + const requestB = generateRequest(BASIC_EXECUTOR_ID + '-B', BASIC_REDIS_STREAM + '-B', BASIC_ACCOUNT_ID, BASIC_FUNCTION_NAME, BASIC_CODE, BASIC_SCHEMA); + const listRequest = generateRequest(undefined, undefined, undefined); + const stopRequest = generateRequest(BASIC_EXECUTOR_ID + '-A', undefined, undefined); // Stops executor A + + await listExecutorsPromise(listRequest, service, mockCallback); + + service.StartExecutor(requestA, mockCallback); + + await listExecutorsPromise(listRequest, service, mockCallback); + + service.StartExecutor(requestB, mockCallback); + + await listExecutorsPromise(listRequest, service, mockCallback); + + await new Promise((resolve, reject) => { + service.StopExecutor(stopRequest, function (err, response) { + if (err) { + reject(err); return; + } + mockCallback(err, response); + resolve(response); + }); + }); + + await listExecutorsPromise(listRequest, service, mockCallback); + + service.StartExecutor(requestA, mockCallback); + + await listExecutorsPromise(listRequest, service, mockCallback); + + expect(streamHandlerType).toHaveBeenCalledTimes(3); + expect(stop).toHaveBeenCalledTimes(1); + const emptyList: never[] = []; + const oneExecutorList = [{ + executorId: BASIC_EXECUTOR_ID + '-A', + indexerName: BASIC_INDEXER_CONFIG.account_id + '/' + BASIC_INDEXER_CONFIG.function_name, + status: 'RUNNING' + }]; + const twoExecutorList = [{ + executorId: BASIC_EXECUTOR_ID + '-A', + indexerName: BASIC_INDEXER_CONFIG.account_id + '/' + BASIC_INDEXER_CONFIG.function_name, + status: 'RUNNING' + }, + { + executorId: BASIC_EXECUTOR_ID + '-B', + indexerName: BASIC_INDEXER_CONFIG.account_id + '/' + BASIC_INDEXER_CONFIG.function_name, + status: 'RUNNING' + }]; + expect(mockCallback.mock.calls[0][1]).toEqual({ executors: emptyList }); + expect(mockCallback.mock.calls[2][1]).toEqual({ executors: oneExecutorList }); + expect(mockCallback.mock.calls[4][1]).toEqual({ executors: twoExecutorList }); + oneExecutorList[0].executorId = BASIC_EXECUTOR_ID + '-B'; + expect(mockCallback.mock.calls[6][1]).toEqual({ executors: oneExecutorList }); // After stop was called + twoExecutorList[0].executorId = BASIC_EXECUTOR_ID + '-B'; + twoExecutorList[1].executorId = BASIC_EXECUTOR_ID + '-A'; + expect(mockCallback.mock.calls[8][1]).toEqual({ executors: twoExecutorList }); // Order is reversed now + }); +}); + +async function listExecutorsPromise (listRequest: any, service: RunnerHandlers, mockCallback: jest.Mock): Promise { + await new Promise((resolve, reject) => { + service.ListExecutors(listRequest, function (err, response) { + if (err) { + reject(err); return; + } + mockCallback(err, response); + resolve(response); + }); + }); +} + +function generateRequest ( + executorId: string | undefined = undefined, + redisStream: string | undefined = undefined, + accountId: string | undefined = undefined, + functionName: string | undefined = undefined, + code: string | undefined = undefined, + schema: string | undefined = undefined): any { + const request = { + ...(executorId !== undefined && { executorId }), + ...(redisStream !== undefined && { redisStream }), + ...(accountId !== undefined && { accountId }), + ...(functionName !== undefined && { functionName }), + ...(code !== undefined && { code }), + ...(schema !== undefined && { schema }), + }; + return { + request + }; +} diff --git a/runner/src/service/runner-service.ts b/runner/src/server/runner-service.ts similarity index 52% rename from runner/src/service/runner-service.ts rename to runner/src/server/runner-service.ts index adc23d1f3..17581d7b4 100644 --- a/runner/src/service/runner-service.ts +++ b/runner/src/server/runner-service.ts @@ -2,8 +2,6 @@ import { type ServerUnaryCall, type sendUnaryData } from '@grpc/grpc-js'; import { type RunnerHandlers } from '../generated/spec/Runner'; import { type StartExecutorResponse__Output, type StartExecutorResponse } from '../generated/spec/StartExecutorResponse'; import { type StartExecutorRequest__Output } from '../generated/spec/StartExecutorRequest'; -import { type UpdateExecutorRequest__Output } from '../generated/spec/UpdateExecutorRequest'; -import { type UpdateExecutorResponse__Output, type UpdateExecutorResponse } from '../generated/spec/UpdateExecutorResponse'; import { type StopExecutorRequest__Output } from '../generated/spec/StopExecutorRequest'; import { type StopExecutorResponse__Output, type StopExecutorResponse } from '../generated/spec/StopExecutorResponse'; import { type ListExecutorsRequest__Output } from '../generated/spec/ListExecutorsRequest'; @@ -30,39 +28,14 @@ function getRunnerService (StreamHandlerType: typeof StreamHandler): RunnerHandl // Handle request try { - const config = JSON.parse(call.request.indexerConfig); const streamHandler = new StreamHandlerType(call.request.redisStream, { - account_id: config.account_id, - function_name: config.function_name, - code: config.code, - schema: config.schema + account_id: call.request.accountId, + function_name: call.request.functionName, + code: call.request.code, + schema: call.request.schema }); - streamHandlers.set(call.request.streamId, streamHandler); - callback(null, { streamId: call.request.streamId }); - } catch (error) { - callback(handleInternalError(error), null); - } - }, - - UpdateExecutor (call: ServerUnaryCall, callback: sendUnaryData): void { - console.log('UpdateExecutor called'); - // Validate request - const validationResult = validateUpdateExecutorRequest(call.request, streamHandlers); - if (validationResult !== null) { - callback(validationResult, null); - return; - } - - // Handle request - try { - const config = JSON.parse(call.request.indexerConfig); - streamHandlers.get(call.request.streamId)?.updateIndexerConfig({ - account_id: config.account_id, - function_name: config.function_name, - code: config.code, - schema: config.schema - }); - callback(null, { streamId: call.request.streamId }); + streamHandlers.set(call.request.executorId, streamHandler); + callback(null, { executorId: call.request.executorId }); } catch (error) { callback(handleInternalError(error), null); } @@ -78,11 +51,11 @@ function getRunnerService (StreamHandlerType: typeof StreamHandler): RunnerHandl } // Handle request - const streamId: string = call.request.streamId; - streamHandlers.get(streamId)?.stop() + const executorId: string = call.request.executorId; + streamHandlers.get(executorId)?.stop() .then(() => { - streamHandlers.delete(streamId); - callback(null, { streamId }); + streamHandlers.delete(executorId); + callback(null, { executorId }); }).catch(error => { const grpcError = handleInternalError(error); callback(grpcError, null); @@ -92,18 +65,18 @@ function getRunnerService (StreamHandlerType: typeof StreamHandler): RunnerHandl ListExecutors (_: ServerUnaryCall, callback: sendUnaryData): void { // TODO: Refactor to make use of repeated field console.log('ListExecutors called'); - // TODO: Return more information than just streamId + // TODO: Return more information than just executorId const response: ExecutorInfo__Output[] = []; try { streamHandlers.forEach((handler, stream) => { response.push({ - streamId: stream, + executorId: stream, indexerName: handler.indexerName, status: 'RUNNING' // TODO: Keep updated status in stream handler }); }); callback(null, { - streams: response + executors: response }); } catch (error) { callback(handleInternalError(error), null); @@ -126,36 +99,14 @@ function handleInternalError (error: unknown): any { }; } -function validateStringParameter (parameter: string, parameterName: string): any | null { +function validateStringParameter (parameterName: string, parameterValue: string): any | null { const grpcError = { code: grpc.status.INVALID_ARGUMENT, message: '' }; - if (parameter === undefined || parameter.trim() === '') { - grpcError.message = `Invalid ${parameterName}. It must be a non-empty string.`; - return grpcError; - } - return null; -} -function validateIndexerConfig (indexerConfig: string): any | null { - const grpcError = { - code: grpc.status.INVALID_ARGUMENT, - message: '' - }; - const validation = validateStringParameter(indexerConfig, 'indexerConfig'); - if (validation !== null) { - return validation; - } - assert(indexerConfig !== undefined); - try { - const config = JSON.parse(indexerConfig); - if (config.account_id === undefined || config.function_name === undefined || config.code === undefined || config.schema === undefined) { - grpcError.message = 'Invalid indexer config. It must contain account id, function name, code, and schema.'; - return grpcError; - } - } catch (error) { - grpcError.message = 'Invalid indexer config. It must be a valid JSON string.'; + if (parameterValue === undefined || parameterValue.trim() === '') { + grpcError.message = `Invalid ${parameterName}. It must be a non-empty string.`; return grpcError; } return null; @@ -167,54 +118,43 @@ function validateStartExecutorRequest (request: StartExecutorRequest__Output, st message: '' }; - // Validate streamId - let validationResult = validateStringParameter(request.streamId, 'streamId'); + // Validate request parameters + let validationResult = validateStringParameter('executorId', request.executorId); if (validationResult !== null) { return validationResult; } - assert(request.streamId !== undefined); - if (streamHandlers.get(request.streamId) !== undefined) { - grpcError.message = `Stream Executor ${request.streamId} can't be started as it already exists.`; - grpcError.code = grpc.status.ALREADY_EXISTS; - return grpcError; - } - // Validate redisStream - validationResult = validateStringParameter(request.redisStream, 'redisStream'); + validationResult = validateStringParameter('redisStream', request.redisStream); if (validationResult !== null) { return validationResult; } - // Validate indexerConfig - validationResult = validateIndexerConfig(request.indexerConfig); + validationResult = validateStringParameter('accountId', request.accountId); if (validationResult !== null) { return validationResult; } - return null; -} - -function validateUpdateExecutorRequest (request: UpdateExecutorRequest__Output, streamHandlers: StreamHandlers): any | null { - const grpcError = { - code: grpc.status.INVALID_ARGUMENT, - message: '' - }; - // Validate streamId - let validationResult = validateStringParameter(request.streamId, 'streamId'); + validationResult = validateStringParameter('functionName', request.functionName); if (validationResult !== null) { return validationResult; } - assert(request.streamId !== undefined); - if (streamHandlers.get(request.streamId) === undefined) { - grpcError.message = `Stream Executor ${request.streamId} cannot be updated as it does not exist.`; - return grpcError; + + validationResult = validateStringParameter('code', request.code); + if (validationResult !== null) { + return validationResult; } - // Validate indexerConfig - validationResult = validateIndexerConfig(request.indexerConfig); + validationResult = validateStringParameter('schema', request.schema); if (validationResult !== null) { return validationResult; } + + // Validate executorId uniqueness + if (streamHandlers.get(request.executorId) !== undefined) { + grpcError.message = `Executor ${request.executorId} can't be started as it already exists.`; + grpcError.code = grpc.status.ALREADY_EXISTS; + return grpcError; + } return null; } @@ -224,14 +164,14 @@ function validateStopExecutorRequest (request: StopExecutorRequest__Output, stre message: '' }; - // Validate streamId - const validationResult = validateStringParameter(request.streamId, 'streamId'); + // Validate executorId + const validationResult = validateStringParameter('executorId', request.executorId); if (validationResult !== null) { return validationResult; } - assert(request.streamId !== undefined); - if (streamHandlers.get(request.streamId) === undefined) { - grpcError.message = `Stream Executor ${request.streamId} cannot be stopped as it does not exist.`; + assert(request.executorId !== undefined); + if (streamHandlers.get(request.executorId) === undefined) { + grpcError.message = `Executor ${request.executorId} cannot be stopped as it does not exist.`; return grpcError; } diff --git a/runner/src/service/runner-service.test.ts b/runner/src/service/runner-service.test.ts deleted file mode 100644 index d402951f9..000000000 --- a/runner/src/service/runner-service.test.ts +++ /dev/null @@ -1,458 +0,0 @@ -import { type RunnerHandlers } from '../generated/spec/Runner'; -import type StreamHandler from '../stream-handler/stream-handler'; -import getRunnerService from './runner-service'; -import * as grpc from '@grpc/grpc-js'; - -let BASIC_STREAM_ID = 'test-stream-id'; -let BASIC_REDIS_STREAM = 'test-redis-stream'; -let BASIC_INDEXER_CONFIG = { - account_id: 'test-account-id', - function_name: 'test-function-name', - code: 'test-code', - schema: 'test-schema', -}; - -beforeEach(() => { - BASIC_STREAM_ID = 'test-stream-id'; - BASIC_REDIS_STREAM = 'test-redis-stream'; - BASIC_INDEXER_CONFIG = { - account_id: 'test-account-id', - function_name: 'test-function-name', - code: 'test-code', - schema: 'test-schema', - }; -}); - -describe('Runner gRPC Service', () => { - let genericStreamHandlerType: typeof StreamHandler; - beforeEach(() => { - genericStreamHandlerType = jest.fn().mockImplementation(() => { - return { updateIndexerConfig: jest.fn() }; - }); - }); - - it('starts a stream with correct settings', () => { - const service = getRunnerService(genericStreamHandlerType); - const mockCallback = jest.fn() as unknown as any; - const request = generateRequest(BASIC_STREAM_ID, BASIC_REDIS_STREAM, JSON.stringify(BASIC_INDEXER_CONFIG)); - - service.StartExecutor(request, mockCallback); - - expect(genericStreamHandlerType).toHaveBeenCalledWith(BASIC_REDIS_STREAM, BASIC_INDEXER_CONFIG); - expect(mockCallback).toHaveBeenCalledWith(null, { streamId: BASIC_STREAM_ID }); - }); - - it('Invalid start stream request with empty stream Id', () => { - const service = getRunnerService(genericStreamHandlerType); - const mockCallback = jest.fn() as unknown as any; - const request = generateRequest('', BASIC_REDIS_STREAM, JSON.stringify(BASIC_INDEXER_CONFIG)); - - service.StartExecutor(request, mockCallback); - - expect(genericStreamHandlerType).toHaveBeenCalledTimes(0); - expect(mockCallback).toHaveBeenCalledWith({ - code: grpc.status.INVALID_ARGUMENT, - message: 'Invalid streamId. It must be a non-empty string.' - }, null); - }); - - it('Invalid start stream request with missing redis stream Id parameter', () => { - const service = getRunnerService(genericStreamHandlerType); - const mockCallback = jest.fn() as unknown as any; - const request = generateRequest(BASIC_STREAM_ID, undefined, JSON.stringify(BASIC_INDEXER_CONFIG)); - - service.StartExecutor(request, mockCallback); - - expect(genericStreamHandlerType).toHaveBeenCalledTimes(0); - expect(mockCallback).toHaveBeenCalledWith({ - code: grpc.status.INVALID_ARGUMENT, - message: 'Invalid redisStream. It must be a non-empty string.' - }, null); - }); - - it('Invalid start stream request with missing indexer config parameter', () => { - const service = getRunnerService(genericStreamHandlerType); - const mockCallback = jest.fn() as unknown as any; - const request = generateRequest(BASIC_STREAM_ID, BASIC_REDIS_STREAM, undefined); - - service.StartExecutor(request, mockCallback); - - expect(genericStreamHandlerType).toHaveBeenCalledTimes(0); - expect(mockCallback).toHaveBeenCalledWith({ - code: grpc.status.INVALID_ARGUMENT, - message: 'Invalid indexerConfig. It must be a non-empty string.' - }, null); - }); - - it('Invalid start stream request with missing code parameter in indexerConfig', () => { - const service = getRunnerService(genericStreamHandlerType); - const mockCallback = jest.fn() as unknown as any; - const request = generateRequest(BASIC_STREAM_ID, BASIC_REDIS_STREAM, JSON.stringify( - { - account_id: 'test-account-id', - function_name: 'test-function-name', - schema: 'test-schema', - } - )); - - service.StartExecutor(request, mockCallback); - - expect(genericStreamHandlerType).toHaveBeenCalledTimes(0); - expect(mockCallback).toHaveBeenCalledWith({ - code: grpc.status.INVALID_ARGUMENT, - message: 'Invalid indexer config. It must contain account id, function name, code, and schema.' - }, null); - }); - - it('Invalid start stream request with invalid JSON for indexerConfig', () => { - const service = getRunnerService(genericStreamHandlerType); - const mockCallback = jest.fn() as unknown as any; - const request = generateRequest(BASIC_STREAM_ID, BASIC_REDIS_STREAM, '{'); - - service.StartExecutor(request, mockCallback); - - expect(genericStreamHandlerType).toHaveBeenCalledTimes(0); - expect(mockCallback).toHaveBeenCalledWith({ - code: grpc.status.INVALID_ARGUMENT, - message: 'Invalid indexer config. It must be a valid JSON string.' - }, null); - }); - - it('starts a stream twice with correct settings, gets error second time', () => { - const service = getRunnerService(genericStreamHandlerType); - const mockCallback = jest.fn() as unknown as any; - const indexerConfig = { - account_id: 'test-account-id', - function_name: 'test-function-name', - code: 'test-code', - schema: 'test-schema', - }; - const startRequest = generateRequest(BASIC_STREAM_ID, BASIC_REDIS_STREAM, JSON.stringify(indexerConfig)); - - service.StartExecutor(startRequest, mockCallback); - service.StartExecutor(startRequest, mockCallback); - - expect(genericStreamHandlerType).toHaveBeenCalledTimes(1); - expect(genericStreamHandlerType).toHaveBeenCalledWith(BASIC_REDIS_STREAM, indexerConfig); - expect(mockCallback.mock.calls).toEqual([ - [null, { streamId: BASIC_STREAM_ID }], - [{ - code: grpc.status.ALREADY_EXISTS, - message: `Stream Executor ${BASIC_STREAM_ID} can't be started as it already exists.` - }, null] - ]); - }); - - it('updates a stream with correct settings', () => { - const updateIndexerConfig = jest.fn(); - const streamHandlerType = jest.fn().mockImplementation(() => { - return { updateIndexerConfig }; - }); - const service = getRunnerService(streamHandlerType); - const mockCallback = jest.fn() as unknown as any; - const indexerConfig = BASIC_INDEXER_CONFIG; - const startRequest = generateRequest(BASIC_STREAM_ID, BASIC_REDIS_STREAM, JSON.stringify(indexerConfig)); - - service.StartExecutor(startRequest, mockCallback); - - indexerConfig.code = 'test-code-2'; - const updateRequest = generateRequest(BASIC_STREAM_ID, undefined, JSON.stringify(indexerConfig)); - - service.UpdateExecutor(updateRequest, mockCallback); - - indexerConfig.code = 'test-code'; - expect(streamHandlerType).toHaveBeenCalledTimes(1); - indexerConfig.code = 'test-code-2'; - expect(updateIndexerConfig.mock.calls).toEqual([ - [indexerConfig] - ]); - expect(mockCallback).toHaveBeenCalledWith(null, { streamId: BASIC_STREAM_ID }); - expect(mockCallback.mock.calls).toEqual([ - [null, { streamId: BASIC_STREAM_ID }], - [null, { streamId: BASIC_STREAM_ID }], - ]); - }); - - it('Invalid update stream request with empty stream Id', () => { - const service = getRunnerService(genericStreamHandlerType); - const mockCallback = jest.fn() as unknown as any; - const request = generateRequest('', undefined, JSON.stringify(BASIC_INDEXER_CONFIG)); - - service.UpdateExecutor(request, mockCallback); - - expect(genericStreamHandlerType).toHaveBeenCalledTimes(0); - expect(mockCallback).toHaveBeenCalledWith({ - code: grpc.status.INVALID_ARGUMENT, - message: 'Invalid streamId. It must be a non-empty string.' - }, null); - }); - - it('Invalid update stream request with non-existent stream', () => { - const service = getRunnerService(genericStreamHandlerType); - const mockCallback = jest.fn() as unknown as any; - const request = generateRequest(BASIC_STREAM_ID, undefined, JSON.stringify(BASIC_INDEXER_CONFIG)); - - service.UpdateExecutor(request, mockCallback); - - expect(genericStreamHandlerType).toHaveBeenCalledTimes(0); - expect(mockCallback).toHaveBeenCalledWith({ - code: grpc.status.INVALID_ARGUMENT, - message: `Stream Executor ${BASIC_STREAM_ID} cannot be updated as it does not exist.` - }, null); - }); - - it('Invalid start stream request with missing indexer config parameter', () => { - const service = getRunnerService(genericStreamHandlerType); - const mockCallback = jest.fn() as unknown as any; - const request = generateRequest(BASIC_STREAM_ID, BASIC_REDIS_STREAM, undefined); - - service.StartExecutor(request, mockCallback); - - expect(genericStreamHandlerType).toHaveBeenCalledTimes(0); - expect(mockCallback).toHaveBeenCalledWith({ - code: grpc.status.INVALID_ARGUMENT, - message: 'Invalid indexerConfig. It must be a non-empty string.' - }, null); - }); - - it('Invalid start stream request with missing code parameter in indexerConfig', () => { - const service = getRunnerService(genericStreamHandlerType); - const mockCallback = jest.fn() as unknown as any; - const request = generateRequest(BASIC_STREAM_ID, BASIC_REDIS_STREAM, JSON.stringify( - { - account_id: 'test-account-id', - function_name: 'test-function-name', - schema: 'test-schema', - } - )); - - service.StartExecutor(request, mockCallback); - - expect(genericStreamHandlerType).toHaveBeenCalledTimes(0); - expect(mockCallback).toHaveBeenCalledWith({ - code: grpc.status.INVALID_ARGUMENT, - message: 'Invalid indexer config. It must contain account id, function name, code, and schema.' - }, null); - }); - - it('Invalid start stream request with invalid JSON for indexerConfig', () => { - const service = getRunnerService(genericStreamHandlerType); - const mockCallback = jest.fn() as unknown as any; - const request = generateRequest(BASIC_STREAM_ID, BASIC_REDIS_STREAM, '{'); - - service.StartExecutor(request, mockCallback); - - expect(genericStreamHandlerType).toHaveBeenCalledTimes(0); - expect(mockCallback).toHaveBeenCalledWith({ - code: grpc.status.INVALID_ARGUMENT, - message: 'Invalid indexer config. It must be a valid JSON string.' - }, null); - }); - - it('stops a stream with correct settings', async () => { - const stop = jest.fn().mockImplementation(async () => { - await Promise.resolve(); - }); - const streamHandlerType = jest.fn().mockImplementation(() => { - return { stop }; - }); - const service = getRunnerService(streamHandlerType); - const mockCallback = jest.fn() as unknown as any; - const requestA = generateRequest(BASIC_STREAM_ID + '-A', BASIC_REDIS_STREAM + '-A', JSON.stringify(BASIC_INDEXER_CONFIG)); - const requestB = generateRequest(BASIC_STREAM_ID + '-B', BASIC_REDIS_STREAM + '-B', JSON.stringify(BASIC_INDEXER_CONFIG)); - - service.StartExecutor(requestA, mockCallback); - service.StartExecutor(requestB, mockCallback); - - const stopRequest = generateRequest(BASIC_STREAM_ID + '-A', undefined, undefined); // Stops stream A - - await new Promise((resolve, reject) => { - service.StopExecutor(stopRequest, function (err, response) { - if (err) { - reject(err); return; - } - mockCallback(err, response); - resolve(response); - }); - }); - - service.StartExecutor(requestA, mockCallback); - - expect(streamHandlerType).toHaveBeenCalledTimes(3); - expect(stop).toHaveBeenCalledTimes(1); - expect(mockCallback.mock.calls).toEqual([ - [null, { streamId: BASIC_STREAM_ID + '-A' }], // Start A - [null, { streamId: BASIC_STREAM_ID + '-B' }], // Start B - [null, { streamId: BASIC_STREAM_ID + '-A' }], // Stop A - [null, { streamId: BASIC_STREAM_ID + '-A' }], // Stop B - ]); - }); - - it('Invalid stop stream request with empty stream Id', () => { - const stop = jest.fn().mockImplementation(async () => { - await Promise.resolve(); - }); - const streamHandlerType = jest.fn().mockImplementation(() => { - return { stop }; - }); - const service = getRunnerService(streamHandlerType); - const mockCallback = jest.fn() as unknown as any; - const request = generateRequest('', undefined, undefined); - - service.StopExecutor(request, mockCallback); - - expect(stop).toHaveBeenCalledTimes(0); - expect(mockCallback).toHaveBeenCalledWith({ - code: grpc.status.INVALID_ARGUMENT, - message: 'Invalid streamId. It must be a non-empty string.' - }, null); - }); - - it('Invalid stop stream request with non-existent stream', () => { - const stop = jest.fn().mockImplementation(async () => { - await Promise.resolve(); - }); - const streamHandlerType = jest.fn().mockImplementation(() => { - return { stop }; - }); - const service = getRunnerService(streamHandlerType); - const mockCallback = jest.fn() as unknown as any; - const request = generateRequest(BASIC_STREAM_ID, undefined, undefined); - - service.StopExecutor(request, mockCallback); - - expect(stop).toHaveBeenCalledTimes(0); - expect(mockCallback).toHaveBeenCalledWith({ - code: grpc.status.INVALID_ARGUMENT, - message: `Stream Executor ${BASIC_STREAM_ID} cannot be stopped as it does not exist.` - }, null); - }); - - it('Invalid stop stream request with somehow failing stop', async () => { - const stop = jest.fn().mockImplementation(async () => { - await Promise.reject(new Error('somehow fails')); - }); - const streamHandlerType = jest.fn().mockImplementation(() => { - return { stop }; - }); - const service = getRunnerService(streamHandlerType); - const mockCallback = jest.fn() as unknown as any; - const startRequest = generateRequest(BASIC_STREAM_ID, BASIC_REDIS_STREAM, JSON.stringify(BASIC_INDEXER_CONFIG)); - const stopRequest = generateRequest(BASIC_STREAM_ID, undefined, undefined); - - service.StartExecutor(startRequest, mockCallback); - - await new Promise((resolve, reject) => { - service.StopExecutor(stopRequest, function (err, response) { - if (err) { // Should get somehow fails error - mockCallback(err, response); - resolve(err.details); return; - } - reject(err); - }); - }); - - expect(stop).toHaveBeenCalledTimes(1); - expect(mockCallback.mock.calls).toEqual([ - [null, { streamId: BASIC_STREAM_ID }], - [{ - code: grpc.status.INTERNAL, - message: 'somehow fails' - }, null] - ]); - }); - - it('valid list stream request lists streams correctly', async () => { - const stop = jest.fn().mockImplementation(async () => { - await Promise.resolve(); - }); - const streamHandlerType = jest.fn().mockImplementation((...args) => { - return { - stop, - indexerName: `${args[1].account_id as string}/${args[1].function_name as string}`, - }; - }); - const service = getRunnerService(streamHandlerType); - const mockCallback = jest.fn() as unknown as any; - const requestA = generateRequest(BASIC_STREAM_ID + '-A', BASIC_REDIS_STREAM + '-A', JSON.stringify(BASIC_INDEXER_CONFIG)); - const requestB = generateRequest(BASIC_STREAM_ID + '-B', BASIC_REDIS_STREAM + '-B', JSON.stringify(BASIC_INDEXER_CONFIG)); - const listRequest = generateRequest(undefined, undefined, undefined); - const stopRequest = generateRequest(BASIC_STREAM_ID + '-A', undefined, undefined); // Stops stream A - - await listExecutorsPromise(listRequest, service, mockCallback); - - service.StartExecutor(requestA, mockCallback); - - await listExecutorsPromise(listRequest, service, mockCallback); - - service.StartExecutor(requestB, mockCallback); - - await listExecutorsPromise(listRequest, service, mockCallback); - - await new Promise((resolve, reject) => { - service.StopExecutor(stopRequest, function (err, response) { - if (err) { - reject(err); return; - } - mockCallback(err, response); - resolve(response); - }); - }); - - await listExecutorsPromise(listRequest, service, mockCallback); - - service.StartExecutor(requestA, mockCallback); - - await listExecutorsPromise(listRequest, service, mockCallback); - - expect(streamHandlerType).toHaveBeenCalledTimes(3); - expect(stop).toHaveBeenCalledTimes(1); - const emptyList: never[] = []; - const oneStreamList = [{ - streamId: BASIC_STREAM_ID + '-A', - indexerName: BASIC_INDEXER_CONFIG.account_id + '/' + BASIC_INDEXER_CONFIG.function_name, - status: 'RUNNING' - }]; - const twoStreamList = [{ - streamId: BASIC_STREAM_ID + '-A', - indexerName: BASIC_INDEXER_CONFIG.account_id + '/' + BASIC_INDEXER_CONFIG.function_name, - status: 'RUNNING' - }, - { - streamId: BASIC_STREAM_ID + '-B', - indexerName: BASIC_INDEXER_CONFIG.account_id + '/' + BASIC_INDEXER_CONFIG.function_name, - status: 'RUNNING' - }]; - expect(mockCallback.mock.calls[0][1]).toEqual({ streams: emptyList }); - expect(mockCallback.mock.calls[2][1]).toEqual({ streams: oneStreamList }); - expect(mockCallback.mock.calls[4][1]).toEqual({ streams: twoStreamList }); - oneStreamList[0].streamId = BASIC_STREAM_ID + '-B'; - expect(mockCallback.mock.calls[6][1]).toEqual({ streams: oneStreamList }); // After stop was called - twoStreamList[0].streamId = BASIC_STREAM_ID + '-B'; - twoStreamList[1].streamId = BASIC_STREAM_ID + '-A'; - expect(mockCallback.mock.calls[8][1]).toEqual({ streams: twoStreamList }); // Order is reversed now - }); -}); - -async function listExecutorsPromise (listRequest: any, service: RunnerHandlers, mockCallback: jest.Mock): Promise { - await new Promise((resolve, reject) => { - service.ListExecutors(listRequest, function (err, response) { - if (err) { - reject(err); return; - } - mockCallback(err, response); - resolve(response); - }); - }); -} - -function generateRequest (streamId: string | undefined = undefined, redisStream: string | undefined = undefined, indexerConfig: string | undefined = undefined): any { - const request = { - ...(streamId !== undefined && { streamId }), - ...(redisStream !== undefined && { redisStream }), - ...(indexerConfig !== undefined && { indexerConfig }), - }; - return { - request - }; -} From 1decb747f0ad9a60af742177cfe03decf1025ba5 Mon Sep 17 00:00:00 2001 From: Darun Seethammagari Date: Wed, 20 Dec 2023 14:50:47 -0800 Subject: [PATCH 16/18] Fix GitHub tests --- runner/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runner/package.json b/runner/package.json index 4ca268c1a..1d0e4402b 100644 --- a/runner/package.json +++ b/runner/package.json @@ -12,7 +12,7 @@ "start": "npm run build && node dist/index.js", "start:dev": "ts-node ./src/index.ts", "start:docker": "node dist/index.js", - "test": "node --experimental-vm-modules ./node_modules/.bin/jest", + "test": "npm run codegen && node --experimental-vm-modules ./node_modules/.bin/jest", "lint": "eslint -c .eslintrc.js" }, "keywords": [], From 7e3d730e92d62f7a1e6aecb27d6e5db2f234467a Mon Sep 17 00:00:00 2001 From: Darun Seethammagari Date: Thu, 21 Dec 2023 10:58:27 -0800 Subject: [PATCH 17/18] Address Second round PR Comments --- runner/package.json | 2 +- runner/protos/runner.proto | 5 ++- runner/src/server/runner-client.ts | 3 ++ runner/src/server/runner-service.test.ts | 47 +++++++++------------ runner/src/server/runner-service.ts | 14 +++--- runner/src/stream-handler/stream-handler.ts | 8 ---- runner/src/stream-handler/worker.ts | 7 --- 7 files changed, 35 insertions(+), 51 deletions(-) diff --git a/runner/package.json b/runner/package.json index 1d0e4402b..089f577f4 100644 --- a/runner/package.json +++ b/runner/package.json @@ -12,7 +12,7 @@ "start": "npm run build && node dist/index.js", "start:dev": "ts-node ./src/index.ts", "start:docker": "node dist/index.js", - "test": "npm run codegen && node --experimental-vm-modules ./node_modules/.bin/jest", + "test": "npm run build && node --experimental-vm-modules ./node_modules/.bin/jest", "lint": "eslint -c .eslintrc.js" }, "keywords": [], diff --git a/runner/protos/runner.proto b/runner/protos/runner.proto index e64aeaa74..16c365ddc 100644 --- a/runner/protos/runner.proto +++ b/runner/protos/runner.proto @@ -50,6 +50,7 @@ message ListExecutorsResponse { // Information about a single BlockExecutor instance. message ExecutorInfo { string executor_id = 1; - string indexer_name = 2; - string status = 3; + string account_id = 2; + string function_name = 3; + string status = 4; } diff --git a/runner/src/server/runner-client.ts b/runner/src/server/runner-client.ts index ace98ba67..a7325104b 100644 --- a/runner/src/server/runner-client.ts +++ b/runner/src/server/runner-client.ts @@ -3,10 +3,13 @@ import * as protoLoader from '@grpc/proto-loader'; import { type ProtoGrpcType } from '../generated/runner'; import { type RunnerClient } from '../generated/spec/Runner'; +// TODO: Replace this client with a Rust client + const PROTO_PATH = 'protos/runner.proto'; const packageDefinition = protoLoader.loadSync(PROTO_PATH); const runner = (grpc.loadPackageDefinition(packageDefinition) as unknown) as ProtoGrpcType; +// TODO: Use secure creds with env variable Port number const runnerClient: RunnerClient = new runner.spec.Runner('localhost:50007', grpc.credentials.createInsecure()); export default runnerClient; diff --git a/runner/src/server/runner-service.test.ts b/runner/src/server/runner-service.test.ts index 5c734bac7..2e9a27fd6 100644 --- a/runner/src/server/runner-service.test.ts +++ b/runner/src/server/runner-service.test.ts @@ -3,39 +3,27 @@ import type StreamHandler from '../stream-handler/stream-handler'; import getRunnerService from './runner-service'; import * as grpc from '@grpc/grpc-js'; -let BASIC_EXECUTOR_ID = 'test-executor-id'; -let BASIC_REDIS_STREAM = 'test-redis-stream'; -let BASIC_ACCOUNT_ID = 'test-account-id'; -let BASIC_FUNCTION_NAME = 'test-function-name'; -let BASIC_CODE = 'test-code'; -let BASIC_SCHEMA = 'test-schema'; -let BASIC_INDEXER_CONFIG = { +const BASIC_EXECUTOR_ID = 'test-executor-id'; +const BASIC_REDIS_STREAM = 'test-redis-stream'; +const BASIC_ACCOUNT_ID = 'test-account-id'; +const BASIC_FUNCTION_NAME = 'test-function-name'; +const BASIC_CODE = 'test-code'; +const BASIC_SCHEMA = 'test-schema'; +const BASIC_INDEXER_CONFIG = { account_id: BASIC_ACCOUNT_ID, function_name: BASIC_FUNCTION_NAME, code: BASIC_CODE, schema: BASIC_SCHEMA, }; -beforeAll(() => { - BASIC_EXECUTOR_ID = 'test-executor-id'; - BASIC_REDIS_STREAM = 'test-redis-stream'; - BASIC_ACCOUNT_ID = 'test-account-id'; - BASIC_FUNCTION_NAME = 'test-function-name'; - BASIC_CODE = 'test-code'; - BASIC_SCHEMA = 'test-schema'; - BASIC_INDEXER_CONFIG = { - account_id: BASIC_ACCOUNT_ID, - function_name: BASIC_FUNCTION_NAME, - code: BASIC_CODE, - schema: BASIC_SCHEMA, - }; -}); - describe('Runner gRPC Service', () => { let genericStreamHandlerType: typeof StreamHandler; beforeEach(() => { - genericStreamHandlerType = jest.fn().mockImplementation(() => { - return { updateIndexerConfig: jest.fn() }; + genericStreamHandlerType = jest.fn().mockImplementation((...args) => { + return { + updateIndexerConfig: jest.fn(), + indexerConfig: { account_id: args[1].account_id, function_name: args[1].function_name } + }; }); }); @@ -253,7 +241,7 @@ describe('Runner gRPC Service', () => { const streamHandlerType = jest.fn().mockImplementation((...args) => { return { stop, - indexerName: `${args[1].account_id as string}/${args[1].function_name as string}`, + indexerConfig: { account_id: args[1].account_id, function_name: args[1].function_name }, }; }); const service = getRunnerService(streamHandlerType); @@ -294,17 +282,20 @@ describe('Runner gRPC Service', () => { const emptyList: never[] = []; const oneExecutorList = [{ executorId: BASIC_EXECUTOR_ID + '-A', - indexerName: BASIC_INDEXER_CONFIG.account_id + '/' + BASIC_INDEXER_CONFIG.function_name, + accountId: BASIC_INDEXER_CONFIG.account_id, + functionName: BASIC_INDEXER_CONFIG.function_name, status: 'RUNNING' }]; const twoExecutorList = [{ executorId: BASIC_EXECUTOR_ID + '-A', - indexerName: BASIC_INDEXER_CONFIG.account_id + '/' + BASIC_INDEXER_CONFIG.function_name, + accountId: BASIC_INDEXER_CONFIG.account_id, + functionName: BASIC_INDEXER_CONFIG.function_name, status: 'RUNNING' }, { executorId: BASIC_EXECUTOR_ID + '-B', - indexerName: BASIC_INDEXER_CONFIG.account_id + '/' + BASIC_INDEXER_CONFIG.function_name, + accountId: BASIC_INDEXER_CONFIG.account_id, + functionName: BASIC_INDEXER_CONFIG.function_name, status: 'RUNNING' }]; expect(mockCallback.mock.calls[0][1]).toEqual({ executors: emptyList }); diff --git a/runner/src/server/runner-service.ts b/runner/src/server/runner-service.ts index 17581d7b4..41acd7033 100644 --- a/runner/src/server/runner-service.ts +++ b/runner/src/server/runner-service.ts @@ -18,7 +18,7 @@ function getRunnerService (StreamHandlerType: typeof StreamHandler): RunnerHandl const RunnerService: RunnerHandlers = { StartExecutor (call: ServerUnaryCall, callback: sendUnaryData): void { - console.log('StartExecutor called'); + console.log('StartExecutor called on', call.request.executorId); // Validate request const validationResult = validateStartExecutorRequest(call.request, streamHandlers); if (validationResult !== null) { @@ -42,7 +42,7 @@ function getRunnerService (StreamHandlerType: typeof StreamHandler): RunnerHandl }, StopExecutor (call: ServerUnaryCall, callback: sendUnaryData): void { - console.log('StopExecutor called'); + console.log('StopExecutor called on', call.request.executorId); // Validate request const validationResult = validateStopExecutorRequest(call.request, streamHandlers); if (validationResult !== null) { @@ -68,10 +68,14 @@ function getRunnerService (StreamHandlerType: typeof StreamHandler): RunnerHandl // TODO: Return more information than just executorId const response: ExecutorInfo__Output[] = []; try { - streamHandlers.forEach((handler, stream) => { + streamHandlers.forEach((handler, executorId) => { + if (handler.indexerConfig?.account_id === undefined || handler.indexerConfig?.function_name === undefined) { + throw new Error(`Stream handler ${executorId} has no/invalid indexer config.`); + } response.push({ - executorId: stream, - indexerName: handler.indexerName, + executorId, + accountId: handler.indexerConfig?.account_id, + functionName: handler.indexerConfig?.function_name, status: 'RUNNING' // TODO: Keep updated status in stream handler }); }); diff --git a/runner/src/stream-handler/stream-handler.ts b/runner/src/stream-handler/stream-handler.ts index b6877f5aa..953a263a3 100644 --- a/runner/src/stream-handler/stream-handler.ts +++ b/runner/src/stream-handler/stream-handler.ts @@ -12,13 +12,11 @@ export interface IndexerConfig { export default class StreamHandler { private readonly worker: Worker; - readonly indexerName: string; constructor ( public readonly streamKey: string, public readonly indexerConfig: IndexerConfig | undefined = undefined ) { - this.indexerName = (indexerConfig?.account_id ?? 'undefined_account') + '/' + (indexerConfig?.function_name ?? 'undefined_function'); if (isMainThread) { this.worker = new Worker(path.join(__dirname, 'worker.js'), { workerData: { @@ -38,12 +36,6 @@ export default class StreamHandler { await this.worker.terminate(); } - updateIndexerConfig (indexerConfig: IndexerConfig): void { - this.worker.postMessage({ - indexerConfig, - }); - } - private handleError (error: Error): void { console.log(`Encountered error processing stream: ${this.streamKey}, terminating thread`, error); this.worker.terminate().catch(() => { diff --git a/runner/src/stream-handler/worker.ts b/runner/src/stream-handler/worker.ts index 8ee91235b..2b47f40b5 100644 --- a/runner/src/stream-handler/worker.ts +++ b/runner/src/stream-handler/worker.ts @@ -29,13 +29,6 @@ const sleep = async (ms: number): Promise => { await new Promise((resolve) let config: IndexerConfig | undefined; -parentPort?.on('message', (message) => { - if (message.indexerConfig) { - // Update the streamKey inside the Worker - config = message.indexerConfig; - } -}); - void (async function main () { const { streamKey, indexerConfig } = workerData; config = indexerConfig; From 425df286f796f35f46dd99ddddd60b2108c1b39d Mon Sep 17 00:00:00 2001 From: Darun Seethammagari Date: Thu, 21 Dec 2023 11:25:46 -0800 Subject: [PATCH 18/18] Test undoing package change for test failure --- runner/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runner/package.json b/runner/package.json index 089f577f4..1d0e4402b 100644 --- a/runner/package.json +++ b/runner/package.json @@ -12,7 +12,7 @@ "start": "npm run build && node dist/index.js", "start:dev": "ts-node ./src/index.ts", "start:docker": "node dist/index.js", - "test": "npm run build && node --experimental-vm-modules ./node_modules/.bin/jest", + "test": "npm run codegen && node --experimental-vm-modules ./node_modules/.bin/jest", "lint": "eslint -c .eslintrc.js" }, "keywords": [],