@bufbuild/protobuf
Advanced tools
Comparing version 1.2.1 to 1.3.0
@@ -63,3 +63,3 @@ "use strict"; | ||
WireType[WireType["Bit32"] = 5] = "Bit32"; | ||
})(WireType = exports.WireType || (exports.WireType = {})); | ||
})(WireType || (exports.WireType = WireType = {})); | ||
class BinaryWriter { | ||
@@ -66,0 +66,0 @@ constructor(textEncoder) { |
@@ -45,2 +45,3 @@ "use strict"; | ||
JsonObject: { typeOnly: true, privateImportPath: "./json-format.js", publicImportPath: packageName }, | ||
protoDouble: { typeOnly: false, privateImportPath: "./proto-double.js", publicImportPath: packageName }, | ||
protoInt64: { typeOnly: false, privateImportPath: "./proto-int64.js", publicImportPath: packageName }, | ||
@@ -47,0 +48,0 @@ ScalarType: { typeOnly: false, privateImportPath: "./field.js", publicImportPath: packageName }, |
@@ -53,2 +53,2 @@ "use strict"; | ||
ScalarType[ScalarType["SINT64"] = 18] = "SINT64"; | ||
})(ScalarType = exports.ScalarType || (exports.ScalarType = {})); | ||
})(ScalarType || (exports.ScalarType = ScalarType = {})); |
@@ -266,2 +266,3 @@ "use strict"; | ||
} | ||
exports.Any = Any; | ||
Any.runtime = proto3_js_1.proto3; | ||
@@ -273,2 +274,1 @@ Any.typeName = "google.protobuf.Any"; | ||
]); | ||
exports.Any = Any; |
@@ -108,2 +108,3 @@ "use strict"; | ||
} | ||
exports.Api = Api; | ||
Api.runtime = proto3_js_1.proto3; | ||
@@ -120,3 +121,2 @@ Api.typeName = "google.protobuf.Api"; | ||
]); | ||
exports.Api = Api; | ||
/** | ||
@@ -187,2 +187,3 @@ * Method represents a method of an API interface. | ||
} | ||
exports.Method = Method; | ||
Method.runtime = proto3_js_1.proto3; | ||
@@ -199,3 +200,2 @@ Method.typeName = "google.protobuf.Method"; | ||
]); | ||
exports.Method = Method; | ||
/** | ||
@@ -314,2 +314,3 @@ * Declares an API Interface to be included in this interface. The including | ||
} | ||
exports.Mixin = Mixin; | ||
Mixin.runtime = proto3_js_1.proto3; | ||
@@ -321,2 +322,1 @@ Mixin.typeName = "google.protobuf.Mixin"; | ||
]); | ||
exports.Mixin = Mixin; |
@@ -43,2 +43,3 @@ "use strict"; | ||
} | ||
exports.Version = Version; | ||
Version.runtime = proto2_js_1.proto2; | ||
@@ -52,3 +53,2 @@ Version.typeName = "google.protobuf.compiler.Version"; | ||
]); | ||
exports.Version = Version; | ||
/** | ||
@@ -104,2 +104,3 @@ * An encoded CodeGeneratorRequest is written to the plugin's stdin. | ||
} | ||
exports.CodeGeneratorRequest = CodeGeneratorRequest; | ||
CodeGeneratorRequest.runtime = proto2_js_1.proto2; | ||
@@ -113,3 +114,2 @@ CodeGeneratorRequest.typeName = "google.protobuf.compiler.CodeGeneratorRequest"; | ||
]); | ||
exports.CodeGeneratorRequest = CodeGeneratorRequest; | ||
/** | ||
@@ -142,2 +142,3 @@ * The plugin writes an encoded CodeGeneratorResponse to stdout. | ||
} | ||
exports.CodeGeneratorResponse = CodeGeneratorResponse; | ||
CodeGeneratorResponse.runtime = proto2_js_1.proto2; | ||
@@ -150,3 +151,2 @@ CodeGeneratorResponse.typeName = "google.protobuf.compiler.CodeGeneratorResponse"; | ||
]); | ||
exports.CodeGeneratorResponse = CodeGeneratorResponse; | ||
/** | ||
@@ -167,3 +167,3 @@ * Sync with code_generator.h. | ||
CodeGeneratorResponse_Feature[CodeGeneratorResponse_Feature["PROTO3_OPTIONAL"] = 1] = "PROTO3_OPTIONAL"; | ||
})(CodeGeneratorResponse_Feature = exports.CodeGeneratorResponse_Feature || (exports.CodeGeneratorResponse_Feature = {})); | ||
})(CodeGeneratorResponse_Feature || (exports.CodeGeneratorResponse_Feature = CodeGeneratorResponse_Feature = {})); | ||
// Retrieve enum metadata with: proto2.getEnumType(CodeGeneratorResponse_Feature) | ||
@@ -197,2 +197,3 @@ proto2_js_1.proto2.util.setEnumType(CodeGeneratorResponse_Feature, "google.protobuf.compiler.CodeGeneratorResponse.Feature", [ | ||
} | ||
exports.CodeGeneratorResponse_File = CodeGeneratorResponse_File; | ||
CodeGeneratorResponse_File.runtime = proto2_js_1.proto2; | ||
@@ -206,2 +207,1 @@ CodeGeneratorResponse_File.typeName = "google.protobuf.compiler.CodeGeneratorResponse.File"; | ||
]); | ||
exports.CodeGeneratorResponse_File = CodeGeneratorResponse_File; |
@@ -163,2 +163,3 @@ "use strict"; | ||
} | ||
exports.Duration = Duration; | ||
Duration.runtime = proto3_js_1.proto3; | ||
@@ -170,2 +171,1 @@ Duration.typeName = "google.protobuf.Duration"; | ||
]); | ||
exports.Duration = Duration; |
@@ -49,5 +49,5 @@ "use strict"; | ||
} | ||
exports.Empty = Empty; | ||
Empty.runtime = proto3_js_1.proto3; | ||
Empty.typeName = "google.protobuf.Empty"; | ||
Empty.fields = proto3_js_1.proto3.util.newFieldList(() => []); | ||
exports.Empty = Empty; |
@@ -306,2 +306,3 @@ "use strict"; | ||
} | ||
exports.FieldMask = FieldMask; | ||
FieldMask.runtime = proto3_js_1.proto3; | ||
@@ -312,2 +313,1 @@ FieldMask.typeName = "google.protobuf.FieldMask"; | ||
]); | ||
exports.FieldMask = FieldMask; |
@@ -50,2 +50,3 @@ "use strict"; | ||
} | ||
exports.SourceContext = SourceContext; | ||
SourceContext.runtime = proto3_js_1.proto3; | ||
@@ -56,2 +57,1 @@ SourceContext.typeName = "google.protobuf.SourceContext"; | ||
]); | ||
exports.SourceContext = SourceContext; |
@@ -17,3 +17,3 @@ "use strict"; | ||
exports.ListValue = exports.Value = exports.Struct = exports.NullValue = void 0; | ||
// @generated by protoc-gen-es v1.2.1 with parameter "bootstrap_wkt=true,ts_nocheck=false,target=ts" | ||
// @generated by protoc-gen-es v1.3.0 with parameter "bootstrap_wkt=true,ts_nocheck=false,target=ts" | ||
// @generated from file google/protobuf/struct.proto (package google.protobuf, syntax proto3) | ||
@@ -39,3 +39,3 @@ /* eslint-disable */ | ||
NullValue[NullValue["NULL_VALUE"] = 0] = "NULL_VALUE"; | ||
})(NullValue = exports.NullValue || (exports.NullValue = {})); | ||
})(NullValue || (exports.NullValue = NullValue = {})); | ||
// Retrieve enum metadata with: proto3.getEnumType(NullValue) | ||
@@ -97,2 +97,3 @@ proto3_js_1.proto3.util.setEnumType(NullValue, "google.protobuf.NullValue", [ | ||
} | ||
exports.Struct = Struct; | ||
Struct.runtime = proto3_js_1.proto3; | ||
@@ -103,3 +104,2 @@ Struct.typeName = "google.protobuf.Struct"; | ||
]); | ||
exports.Struct = Struct; | ||
/** | ||
@@ -185,2 +185,3 @@ * `Value` represents a dynamically typed value which can be either | ||
} | ||
exports.Value = Value; | ||
Value.runtime = proto3_js_1.proto3; | ||
@@ -196,3 +197,2 @@ Value.typeName = "google.protobuf.Value"; | ||
]); | ||
exports.Value = Value; | ||
/** | ||
@@ -241,2 +241,3 @@ * `ListValue` is a wrapper around a repeated field of values. | ||
} | ||
exports.ListValue = ListValue; | ||
ListValue.runtime = proto3_js_1.proto3; | ||
@@ -247,2 +248,1 @@ ListValue.typeName = "google.protobuf.ListValue"; | ||
]); | ||
exports.ListValue = ListValue; |
@@ -207,2 +207,3 @@ "use strict"; | ||
} | ||
exports.Timestamp = Timestamp; | ||
Timestamp.runtime = proto3_js_1.proto3; | ||
@@ -214,2 +215,1 @@ Timestamp.typeName = "google.protobuf.Timestamp"; | ||
]); | ||
exports.Timestamp = Timestamp; |
@@ -17,3 +17,3 @@ "use strict"; | ||
exports.Option = exports.EnumValue = exports.Enum = exports.Field_Cardinality = exports.Field_Kind = exports.Field = exports.Type = exports.Syntax = void 0; | ||
// @generated by protoc-gen-es v1.2.1 with parameter "bootstrap_wkt=true,ts_nocheck=false,target=ts" | ||
// @generated by protoc-gen-es v1.3.0 with parameter "bootstrap_wkt=true,ts_nocheck=false,target=ts" | ||
// @generated from file google/protobuf/type.proto (package google.protobuf, syntax proto3) | ||
@@ -50,3 +50,3 @@ /* eslint-disable */ | ||
Syntax[Syntax["EDITIONS"] = 2] = "EDITIONS"; | ||
})(Syntax = exports.Syntax || (exports.Syntax = {})); | ||
})(Syntax || (exports.Syntax = Syntax = {})); | ||
// Retrieve enum metadata with: proto3.getEnumType(Syntax) | ||
@@ -117,2 +117,3 @@ proto3_js_1.proto3.util.setEnumType(Syntax, "google.protobuf.Syntax", [ | ||
} | ||
exports.Type = Type; | ||
Type.runtime = proto3_js_1.proto3; | ||
@@ -129,3 +130,2 @@ Type.typeName = "google.protobuf.Type"; | ||
]); | ||
exports.Type = Type; | ||
/** | ||
@@ -216,2 +216,3 @@ * A single field of a message type. | ||
} | ||
exports.Field = Field; | ||
Field.runtime = proto3_js_1.proto3; | ||
@@ -231,3 +232,2 @@ Field.typeName = "google.protobuf.Field"; | ||
]); | ||
exports.Field = Field; | ||
/** | ||
@@ -354,3 +354,3 @@ * Basic field types. | ||
Field_Kind[Field_Kind["TYPE_SINT64"] = 18] = "TYPE_SINT64"; | ||
})(Field_Kind = exports.Field_Kind || (exports.Field_Kind = {})); | ||
})(Field_Kind || (exports.Field_Kind = Field_Kind = {})); | ||
// Retrieve enum metadata with: proto3.getEnumType(Field_Kind) | ||
@@ -409,3 +409,3 @@ proto3_js_1.proto3.util.setEnumType(Field_Kind, "google.protobuf.Field.Kind", [ | ||
Field_Cardinality[Field_Cardinality["REPEATED"] = 3] = "REPEATED"; | ||
})(Field_Cardinality = exports.Field_Cardinality || (exports.Field_Cardinality = {})); | ||
})(Field_Cardinality || (exports.Field_Cardinality = Field_Cardinality = {})); | ||
// Retrieve enum metadata with: proto3.getEnumType(Field_Cardinality) | ||
@@ -471,2 +471,3 @@ proto3_js_1.proto3.util.setEnumType(Field_Cardinality, "google.protobuf.Field.Cardinality", [ | ||
} | ||
exports.Enum = Enum; | ||
Enum.runtime = proto3_js_1.proto3; | ||
@@ -482,3 +483,2 @@ Enum.typeName = "google.protobuf.Enum"; | ||
]); | ||
exports.Enum = Enum; | ||
/** | ||
@@ -525,2 +525,3 @@ * Enum value definition. | ||
} | ||
exports.EnumValue = EnumValue; | ||
EnumValue.runtime = proto3_js_1.proto3; | ||
@@ -533,3 +534,2 @@ EnumValue.typeName = "google.protobuf.EnumValue"; | ||
]); | ||
exports.EnumValue = EnumValue; | ||
/** | ||
@@ -568,2 +568,3 @@ * A protocol buffer option, which can be attached to a message, field, | ||
} | ||
exports.Option = Option; | ||
Option.runtime = proto3_js_1.proto3; | ||
@@ -575,2 +576,1 @@ Option.typeName = "google.protobuf.Option"; | ||
]); | ||
exports.Option = Option; |
@@ -68,2 +68,3 @@ "use strict"; | ||
} | ||
exports.DoubleValue = DoubleValue; | ||
DoubleValue.runtime = proto3_js_1.proto3; | ||
@@ -82,3 +83,2 @@ DoubleValue.typeName = "google.protobuf.DoubleValue"; | ||
}; | ||
exports.DoubleValue = DoubleValue; | ||
/** | ||
@@ -131,2 +131,3 @@ * Wrapper message for `float`. | ||
} | ||
exports.FloatValue = FloatValue; | ||
FloatValue.runtime = proto3_js_1.proto3; | ||
@@ -145,3 +146,2 @@ FloatValue.typeName = "google.protobuf.FloatValue"; | ||
}; | ||
exports.FloatValue = FloatValue; | ||
/** | ||
@@ -194,2 +194,3 @@ * Wrapper message for `int64`. | ||
} | ||
exports.Int64Value = Int64Value; | ||
Int64Value.runtime = proto3_js_1.proto3; | ||
@@ -208,3 +209,2 @@ Int64Value.typeName = "google.protobuf.Int64Value"; | ||
}; | ||
exports.Int64Value = Int64Value; | ||
/** | ||
@@ -257,2 +257,3 @@ * Wrapper message for `uint64`. | ||
} | ||
exports.UInt64Value = UInt64Value; | ||
UInt64Value.runtime = proto3_js_1.proto3; | ||
@@ -271,3 +272,2 @@ UInt64Value.typeName = "google.protobuf.UInt64Value"; | ||
}; | ||
exports.UInt64Value = UInt64Value; | ||
/** | ||
@@ -320,2 +320,3 @@ * Wrapper message for `int32`. | ||
} | ||
exports.Int32Value = Int32Value; | ||
Int32Value.runtime = proto3_js_1.proto3; | ||
@@ -334,3 +335,2 @@ Int32Value.typeName = "google.protobuf.Int32Value"; | ||
}; | ||
exports.Int32Value = Int32Value; | ||
/** | ||
@@ -383,2 +383,3 @@ * Wrapper message for `uint32`. | ||
} | ||
exports.UInt32Value = UInt32Value; | ||
UInt32Value.runtime = proto3_js_1.proto3; | ||
@@ -397,3 +398,2 @@ UInt32Value.typeName = "google.protobuf.UInt32Value"; | ||
}; | ||
exports.UInt32Value = UInt32Value; | ||
/** | ||
@@ -446,2 +446,3 @@ * Wrapper message for `bool`. | ||
} | ||
exports.BoolValue = BoolValue; | ||
BoolValue.runtime = proto3_js_1.proto3; | ||
@@ -460,3 +461,2 @@ BoolValue.typeName = "google.protobuf.BoolValue"; | ||
}; | ||
exports.BoolValue = BoolValue; | ||
/** | ||
@@ -509,2 +509,3 @@ * Wrapper message for `string`. | ||
} | ||
exports.StringValue = StringValue; | ||
StringValue.runtime = proto3_js_1.proto3; | ||
@@ -523,3 +524,2 @@ StringValue.typeName = "google.protobuf.StringValue"; | ||
}; | ||
exports.StringValue = StringValue; | ||
/** | ||
@@ -572,2 +572,3 @@ * Wrapper message for `bytes`. | ||
} | ||
exports.BytesValue = BytesValue; | ||
BytesValue.runtime = proto3_js_1.proto3; | ||
@@ -586,2 +587,1 @@ BytesValue.typeName = "google.protobuf.BytesValue"; | ||
}; | ||
exports.BytesValue = BytesValue; |
@@ -30,3 +30,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.createRegistryFromDescriptors = exports.createRegistry = exports.createDescriptorSet = exports.BinaryReader = exports.BinaryWriter = exports.WireType = exports.MethodIdempotency = exports.MethodKind = exports.ScalarType = exports.Message = exports.codegenInfo = exports.protoDelimited = exports.protoBase64 = exports.protoInt64 = exports.proto2 = exports.proto3 = void 0; | ||
exports.toPlainMessage = exports.createRegistryFromDescriptors = exports.createRegistry = exports.createDescriptorSet = exports.BinaryReader = exports.BinaryWriter = exports.WireType = exports.MethodIdempotency = exports.MethodKind = exports.ScalarType = exports.Message = exports.codegenInfo = exports.protoDelimited = exports.protoBase64 = exports.protoInt64 = exports.protoDouble = exports.proto2 = exports.proto3 = void 0; | ||
var proto3_js_1 = require("./proto3.js"); | ||
@@ -36,2 +36,4 @@ Object.defineProperty(exports, "proto3", { enumerable: true, get: function () { return proto3_js_1.proto3; } }); | ||
Object.defineProperty(exports, "proto2", { enumerable: true, get: function () { return proto2_js_1.proto2; } }); | ||
var proto_double_js_1 = require("./proto-double.js"); | ||
Object.defineProperty(exports, "protoDouble", { enumerable: true, get: function () { return proto_double_js_1.protoDouble; } }); | ||
var proto_int64_js_1 = require("./proto-int64.js"); | ||
@@ -62,2 +64,4 @@ Object.defineProperty(exports, "protoInt64", { enumerable: true, get: function () { return proto_int64_js_1.protoInt64; } }); | ||
Object.defineProperty(exports, "createRegistryFromDescriptors", { enumerable: true, get: function () { return create_registry_from_desc_js_1.createRegistryFromDescriptors; } }); | ||
var to_plain_message_js_1 = require("./to-plain-message.js"); | ||
Object.defineProperty(exports, "toPlainMessage", { enumerable: true, get: function () { return to_plain_message_js_1.toPlainMessage; } }); | ||
// ideally, we would export these types with sub-path exports: | ||
@@ -64,0 +68,0 @@ __exportStar(require("./google/protobuf/compiler/plugin_pb.js"), exports); |
@@ -78,25 +78,20 @@ "use strict"; | ||
try { | ||
for (var _d = true, iterable_1 = __asyncValues(iterable), iterable_1_1; iterable_1_1 = yield __await(iterable_1.next()), _a = iterable_1_1.done, !_a;) { | ||
for (var _d = true, iterable_1 = __asyncValues(iterable), iterable_1_1; iterable_1_1 = yield __await(iterable_1.next()), _a = iterable_1_1.done, !_a; _d = true) { | ||
_c = iterable_1_1.value; | ||
_d = false; | ||
try { | ||
const chunk = _c; | ||
buffer = append(buffer, chunk); | ||
for (;;) { | ||
const size = exports.protoDelimited.peekSize(buffer); | ||
if (size.eof) { | ||
// size is incomplete, buffer more data | ||
break; | ||
} | ||
if (size.offset + size.size > buffer.byteLength) { | ||
// message is incomplete, buffer more data | ||
break; | ||
} | ||
yield yield __await(exports.protoDelimited.dec(type, buffer)); | ||
buffer = buffer.subarray(size.offset + size.size); | ||
const chunk = _c; | ||
buffer = append(buffer, chunk); | ||
for (;;) { | ||
const size = exports.protoDelimited.peekSize(buffer); | ||
if (size.eof) { | ||
// size is incomplete, buffer more data | ||
break; | ||
} | ||
if (size.offset + size.size > buffer.byteLength) { | ||
// message is incomplete, buffer more data | ||
break; | ||
} | ||
yield yield __await(exports.protoDelimited.dec(type, buffer)); | ||
buffer = buffer.subarray(size.offset + size.size); | ||
} | ||
finally { | ||
_d = true; | ||
} | ||
} | ||
@@ -103,0 +98,0 @@ } |
@@ -22,3 +22,3 @@ "use strict"; | ||
// note that Safari 14 implements BigInt, but not the DataView methods | ||
const ok = globalThis.BigInt !== undefined && | ||
const ok = typeof BigInt === "function" && | ||
typeof dv.getBigInt64 === "function" && | ||
@@ -25,0 +25,0 @@ typeof dv.getBigUint64 === "function" && |
@@ -32,3 +32,3 @@ "use strict"; | ||
MethodKind[MethodKind["BiDiStreaming"] = 3] = "BiDiStreaming"; | ||
})(MethodKind = exports.MethodKind || (exports.MethodKind = {})); | ||
})(MethodKind || (exports.MethodKind = MethodKind = {})); | ||
/** | ||
@@ -54,2 +54,2 @@ * Is this method side-effect-free (or safe in HTTP parlance), or just | ||
MethodIdempotency[MethodIdempotency["Idempotent"] = 2] = "Idempotent"; | ||
})(MethodIdempotency = exports.MethodIdempotency || (exports.MethodIdempotency = {})); | ||
})(MethodIdempotency || (exports.MethodIdempotency = MethodIdempotency = {})); |
@@ -42,2 +42,3 @@ // Copyright 2021-2023 Buf Technologies, Inc. | ||
JsonObject: { typeOnly: true, privateImportPath: "./json-format.js", publicImportPath: packageName }, | ||
protoDouble: { typeOnly: false, privateImportPath: "./proto-double.js", publicImportPath: packageName }, | ||
protoInt64: { typeOnly: false, privateImportPath: "./proto-int64.js", publicImportPath: packageName }, | ||
@@ -44,0 +45,0 @@ ScalarType: { typeOnly: false, privateImportPath: "./field.js", publicImportPath: packageName }, |
@@ -106,3 +106,3 @@ // Copyright 2021-2023 Buf Technologies, Inc. | ||
*/ | ||
class Any extends Message { | ||
export class Any extends Message { | ||
constructor(data) { | ||
@@ -270,2 +270,1 @@ super(); | ||
]); | ||
export { Any }; |
@@ -31,3 +31,3 @@ // Copyright 2021-2023 Buf Technologies, Inc. | ||
*/ | ||
class Api extends Message { | ||
export class Api extends Message { | ||
constructor(data) { | ||
@@ -117,3 +117,2 @@ super(); | ||
]); | ||
export { Api }; | ||
/** | ||
@@ -124,3 +123,3 @@ * Method represents a method of an API interface. | ||
*/ | ||
class Method extends Message { | ||
export class Method extends Message { | ||
constructor(data) { | ||
@@ -196,3 +195,2 @@ super(); | ||
]); | ||
export { Method }; | ||
/** | ||
@@ -280,3 +278,3 @@ * Declares an API Interface to be included in this interface. The including | ||
*/ | ||
class Mixin extends Message { | ||
export class Mixin extends Message { | ||
constructor(data) { | ||
@@ -318,2 +316,1 @@ super(); | ||
]); | ||
export { Mixin }; |
@@ -22,3 +22,3 @@ // Copyright 2021-2023 Buf Technologies, Inc. | ||
*/ | ||
class Version extends Message { | ||
export class Version extends Message { | ||
constructor(data) { | ||
@@ -49,3 +49,2 @@ super(); | ||
]); | ||
export { Version }; | ||
/** | ||
@@ -56,3 +55,3 @@ * An encoded CodeGeneratorRequest is written to the plugin's stdin. | ||
*/ | ||
class CodeGeneratorRequest extends Message { | ||
export class CodeGeneratorRequest extends Message { | ||
constructor(data) { | ||
@@ -110,3 +109,2 @@ super(); | ||
]); | ||
export { CodeGeneratorRequest }; | ||
/** | ||
@@ -117,3 +115,3 @@ * The plugin writes an encoded CodeGeneratorResponse to stdout. | ||
*/ | ||
class CodeGeneratorResponse extends Message { | ||
export class CodeGeneratorResponse extends Message { | ||
constructor(data) { | ||
@@ -147,3 +145,2 @@ super(); | ||
]); | ||
export { CodeGeneratorResponse }; | ||
/** | ||
@@ -175,3 +172,3 @@ * Sync with code_generator.h. | ||
*/ | ||
class CodeGeneratorResponse_File extends Message { | ||
export class CodeGeneratorResponse_File extends Message { | ||
constructor(data) { | ||
@@ -202,2 +199,1 @@ super(); | ||
]); | ||
export { CodeGeneratorResponse_File }; |
@@ -80,3 +80,3 @@ // Copyright 2021-2023 Buf Technologies, Inc. | ||
*/ | ||
class Duration extends Message { | ||
export class Duration extends Message { | ||
constructor(data) { | ||
@@ -167,2 +167,1 @@ super(); | ||
]); | ||
export { Duration }; |
@@ -28,3 +28,3 @@ // Copyright 2021-2023 Buf Technologies, Inc. | ||
*/ | ||
class Empty extends Message { | ||
export class Empty extends Message { | ||
constructor(data) { | ||
@@ -50,2 +50,1 @@ super(); | ||
Empty.fields = proto3.util.newFieldList(() => []); | ||
export { Empty }; |
@@ -219,3 +219,3 @@ // Copyright 2021-2023 Buf Technologies, Inc. | ||
*/ | ||
class FieldMask extends Message { | ||
export class FieldMask extends Message { | ||
constructor(data) { | ||
@@ -309,2 +309,1 @@ super(); | ||
]); | ||
export { FieldMask }; |
@@ -22,3 +22,3 @@ // Copyright 2021-2023 Buf Technologies, Inc. | ||
*/ | ||
class SourceContext extends Message { | ||
export class SourceContext extends Message { | ||
constructor(data) { | ||
@@ -53,2 +53,1 @@ super(); | ||
]); | ||
export { SourceContext }; |
@@ -14,3 +14,3 @@ // Copyright 2021-2023 Buf Technologies, Inc. | ||
// limitations under the License. | ||
// @generated by protoc-gen-es v1.2.1 with parameter "bootstrap_wkt=true,ts_nocheck=false,target=ts" | ||
// @generated by protoc-gen-es v1.3.0 with parameter "bootstrap_wkt=true,ts_nocheck=false,target=ts" | ||
// @generated from file google/protobuf/struct.proto (package google.protobuf, syntax proto3) | ||
@@ -53,3 +53,3 @@ /* eslint-disable */ | ||
*/ | ||
class Struct extends Message { | ||
export class Struct extends Message { | ||
constructor(data) { | ||
@@ -99,3 +99,2 @@ super(); | ||
]); | ||
export { Struct }; | ||
/** | ||
@@ -111,3 +110,3 @@ * `Value` represents a dynamically typed value which can be either | ||
*/ | ||
class Value extends Message { | ||
export class Value extends Message { | ||
constructor(data) { | ||
@@ -192,3 +191,2 @@ super(); | ||
]); | ||
export { Value }; | ||
/** | ||
@@ -201,3 +199,3 @@ * `ListValue` is a wrapper around a repeated field of values. | ||
*/ | ||
class ListValue extends Message { | ||
export class ListValue extends Message { | ||
constructor(data) { | ||
@@ -243,2 +241,1 @@ super(); | ||
]); | ||
export { ListValue }; |
@@ -111,3 +111,3 @@ // Copyright 2021-2023 Buf Technologies, Inc. | ||
*/ | ||
class Timestamp extends Message { | ||
export class Timestamp extends Message { | ||
constructor(data) { | ||
@@ -211,2 +211,1 @@ super(); | ||
]); | ||
export { Timestamp }; |
@@ -14,3 +14,3 @@ // Copyright 2021-2023 Buf Technologies, Inc. | ||
// limitations under the License. | ||
// @generated by protoc-gen-es v1.2.1 with parameter "bootstrap_wkt=true,ts_nocheck=false,target=ts" | ||
// @generated by protoc-gen-es v1.3.0 with parameter "bootstrap_wkt=true,ts_nocheck=false,target=ts" | ||
// @generated from file google/protobuf/type.proto (package google.protobuf, syntax proto3) | ||
@@ -59,3 +59,3 @@ /* eslint-disable */ | ||
*/ | ||
class Type extends Message { | ||
export class Type extends Message { | ||
constructor(data) { | ||
@@ -125,3 +125,2 @@ super(); | ||
]); | ||
export { Type }; | ||
/** | ||
@@ -132,3 +131,3 @@ * A single field of a message type. | ||
*/ | ||
class Field extends Message { | ||
export class Field extends Message { | ||
constructor(data) { | ||
@@ -227,3 +226,2 @@ super(); | ||
]); | ||
export { Field }; | ||
/** | ||
@@ -417,3 +415,3 @@ * Basic field types. | ||
*/ | ||
class Enum extends Message { | ||
export class Enum extends Message { | ||
constructor(data) { | ||
@@ -476,3 +474,2 @@ super(); | ||
]); | ||
export { Enum }; | ||
/** | ||
@@ -483,3 +480,3 @@ * Enum value definition. | ||
*/ | ||
class EnumValue extends Message { | ||
export class EnumValue extends Message { | ||
constructor(data) { | ||
@@ -527,3 +524,2 @@ super(); | ||
]); | ||
export { EnumValue }; | ||
/** | ||
@@ -535,3 +531,3 @@ * A protocol buffer option, which can be attached to a message, field, | ||
*/ | ||
class Option extends Message { | ||
export class Option extends Message { | ||
constructor(data) { | ||
@@ -569,2 +565,1 @@ super(); | ||
]); | ||
export { Option }; |
@@ -25,3 +25,3 @@ // Copyright 2021-2023 Buf Technologies, Inc. | ||
*/ | ||
class DoubleValue extends Message { | ||
export class DoubleValue extends Message { | ||
constructor(data) { | ||
@@ -79,3 +79,2 @@ super(); | ||
}; | ||
export { DoubleValue }; | ||
/** | ||
@@ -88,3 +87,3 @@ * Wrapper message for `float`. | ||
*/ | ||
class FloatValue extends Message { | ||
export class FloatValue extends Message { | ||
constructor(data) { | ||
@@ -142,3 +141,2 @@ super(); | ||
}; | ||
export { FloatValue }; | ||
/** | ||
@@ -151,3 +149,3 @@ * Wrapper message for `int64`. | ||
*/ | ||
class Int64Value extends Message { | ||
export class Int64Value extends Message { | ||
constructor(data) { | ||
@@ -205,3 +203,2 @@ super(); | ||
}; | ||
export { Int64Value }; | ||
/** | ||
@@ -214,3 +211,3 @@ * Wrapper message for `uint64`. | ||
*/ | ||
class UInt64Value extends Message { | ||
export class UInt64Value extends Message { | ||
constructor(data) { | ||
@@ -268,3 +265,2 @@ super(); | ||
}; | ||
export { UInt64Value }; | ||
/** | ||
@@ -277,3 +273,3 @@ * Wrapper message for `int32`. | ||
*/ | ||
class Int32Value extends Message { | ||
export class Int32Value extends Message { | ||
constructor(data) { | ||
@@ -331,3 +327,2 @@ super(); | ||
}; | ||
export { Int32Value }; | ||
/** | ||
@@ -340,3 +335,3 @@ * Wrapper message for `uint32`. | ||
*/ | ||
class UInt32Value extends Message { | ||
export class UInt32Value extends Message { | ||
constructor(data) { | ||
@@ -394,3 +389,2 @@ super(); | ||
}; | ||
export { UInt32Value }; | ||
/** | ||
@@ -403,3 +397,3 @@ * Wrapper message for `bool`. | ||
*/ | ||
class BoolValue extends Message { | ||
export class BoolValue extends Message { | ||
constructor(data) { | ||
@@ -457,3 +451,2 @@ super(); | ||
}; | ||
export { BoolValue }; | ||
/** | ||
@@ -466,3 +459,3 @@ * Wrapper message for `string`. | ||
*/ | ||
class StringValue extends Message { | ||
export class StringValue extends Message { | ||
constructor(data) { | ||
@@ -520,3 +513,2 @@ super(); | ||
}; | ||
export { StringValue }; | ||
/** | ||
@@ -529,3 +521,3 @@ * Wrapper message for `bytes`. | ||
*/ | ||
class BytesValue extends Message { | ||
export class BytesValue extends Message { | ||
constructor(data) { | ||
@@ -583,2 +575,1 @@ super(); | ||
}; | ||
export { BytesValue }; |
@@ -16,2 +16,3 @@ // Copyright 2021-2023 Buf Technologies, Inc. | ||
export { proto2 } from "./proto2.js"; | ||
export { protoDouble } from "./proto-double.js"; | ||
export { protoInt64 } from "./proto-int64.js"; | ||
@@ -28,2 +29,3 @@ export { protoBase64 } from "./proto-base64.js"; | ||
export { createRegistryFromDescriptors } from "./create-registry-from-desc.js"; | ||
export { toPlainMessage } from "./to-plain-message.js"; | ||
// ideally, we would export these types with sub-path exports: | ||
@@ -30,0 +32,0 @@ export * from "./google/protobuf/compiler/plugin_pb.js"; |
@@ -75,25 +75,20 @@ // Copyright 2021-2023 Buf Technologies, Inc. | ||
try { | ||
for (var _d = true, iterable_1 = __asyncValues(iterable), iterable_1_1; iterable_1_1 = yield __await(iterable_1.next()), _a = iterable_1_1.done, !_a;) { | ||
for (var _d = true, iterable_1 = __asyncValues(iterable), iterable_1_1; iterable_1_1 = yield __await(iterable_1.next()), _a = iterable_1_1.done, !_a; _d = true) { | ||
_c = iterable_1_1.value; | ||
_d = false; | ||
try { | ||
const chunk = _c; | ||
buffer = append(buffer, chunk); | ||
for (;;) { | ||
const size = protoDelimited.peekSize(buffer); | ||
if (size.eof) { | ||
// size is incomplete, buffer more data | ||
break; | ||
} | ||
if (size.offset + size.size > buffer.byteLength) { | ||
// message is incomplete, buffer more data | ||
break; | ||
} | ||
yield yield __await(protoDelimited.dec(type, buffer)); | ||
buffer = buffer.subarray(size.offset + size.size); | ||
const chunk = _c; | ||
buffer = append(buffer, chunk); | ||
for (;;) { | ||
const size = protoDelimited.peekSize(buffer); | ||
if (size.eof) { | ||
// size is incomplete, buffer more data | ||
break; | ||
} | ||
if (size.offset + size.size > buffer.byteLength) { | ||
// message is incomplete, buffer more data | ||
break; | ||
} | ||
yield yield __await(protoDelimited.dec(type, buffer)); | ||
buffer = buffer.subarray(size.offset + size.size); | ||
} | ||
finally { | ||
_d = true; | ||
} | ||
} | ||
@@ -100,0 +95,0 @@ } |
@@ -19,3 +19,3 @@ // Copyright 2021-2023 Buf Technologies, Inc. | ||
// note that Safari 14 implements BigInt, but not the DataView methods | ||
const ok = globalThis.BigInt !== undefined && | ||
const ok = typeof BigInt === "function" && | ||
typeof dv.getBigInt64 === "function" && | ||
@@ -22,0 +22,0 @@ typeof dv.getBigUint64 === "function" && |
@@ -16,3 +16,3 @@ import { localName, safeIdentifier, safeObjectProperty } from "./private/names.js"; | ||
} | ||
type RuntimeSymbolName = "proto2" | "proto3" | "Message" | "PartialMessage" | "PlainMessage" | "FieldList" | "MessageType" | "BinaryReadOptions" | "BinaryWriteOptions" | "JsonReadOptions" | "JsonWriteOptions" | "JsonValue" | "JsonObject" | "protoInt64" | "ScalarType" | "MethodKind" | "MethodIdempotency" | "IMessageTypeRegistry"; | ||
type RuntimeSymbolName = "proto2" | "proto3" | "Message" | "PartialMessage" | "PlainMessage" | "FieldList" | "MessageType" | "BinaryReadOptions" | "BinaryWriteOptions" | "JsonReadOptions" | "JsonWriteOptions" | "JsonValue" | "JsonObject" | "protoDouble" | "protoInt64" | "ScalarType" | "MethodKind" | "MethodIdempotency" | "IMessageTypeRegistry"; | ||
type RuntimeSymbolInfo = { | ||
@@ -19,0 +19,0 @@ typeOnly: boolean; |
export { proto3 } from "./proto3.js"; | ||
export { proto2 } from "./proto2.js"; | ||
export { protoDouble } from "./proto-double.js"; | ||
export { protoInt64 } from "./proto-int64.js"; | ||
@@ -25,2 +26,3 @@ export { protoBase64 } from "./proto-base64.js"; | ||
export { createRegistryFromDescriptors } from "./create-registry-from-desc.js"; | ||
export { toPlainMessage } from "./to-plain-message.js"; | ||
export * from "./google/protobuf/compiler/plugin_pb.js"; | ||
@@ -27,0 +29,0 @@ export * from "./google/protobuf/api_pb.js"; |
{ | ||
"name": "@bufbuild/protobuf", | ||
"version": "1.2.1", | ||
"version": "1.3.0", | ||
"license": "(Apache-2.0 AND BSD-3-Clause)", | ||
@@ -5,0 +5,0 @@ "description": "A complete implementation of Protocol Buffers in TypeScript, suitable for web browsers and Node.js.", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1051433
168
26612