@bufbuild/protobuf
Advanced tools
Comparing version 0.0.2-alpha.3 to 0.0.3
@@ -17,3 +17,3 @@ "use strict"; | ||
exports.Any = void 0; | ||
const index_js_1 = require("../../index.js"); | ||
const index_runtime_js_1 = require("../../index-runtime.js"); | ||
/** | ||
@@ -106,3 +106,3 @@ * `Any` contains an arbitrary serialized protocol buffer message along with a | ||
*/ | ||
class Any extends index_js_1.Message { | ||
class Any extends index_runtime_js_1.Message { | ||
constructor(data) { | ||
@@ -149,3 +149,3 @@ super(); | ||
this.value = new Uint8Array(0); | ||
index_js_1.proto3.util.initPartial(data, this); | ||
index_runtime_js_1.proto3.util.initPartial(data, this); | ||
} | ||
@@ -236,11 +236,11 @@ toJson(options) { | ||
static equals(a, b) { | ||
return index_js_1.proto3.util.equals(Any, a, b); | ||
return index_runtime_js_1.proto3.util.equals(Any, a, b); | ||
} | ||
} | ||
exports.Any = Any; | ||
Any.runtime = index_js_1.proto3; | ||
Any.runtime = index_runtime_js_1.proto3; | ||
Any.typeName = "google.protobuf.Any"; | ||
Any.fields = index_js_1.proto3.util.newFieldList(() => [ | ||
Any.fields = index_runtime_js_1.proto3.util.newFieldList(() => [ | ||
{ no: 1, name: "type_url", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
{ no: 2, name: "value", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, | ||
]); |
@@ -17,3 +17,3 @@ "use strict"; | ||
exports.Mixin = exports.Method = exports.Api = void 0; | ||
const index_js_1 = require("../../index.js"); | ||
const index_runtime_js_1 = require("../../index-runtime.js"); | ||
const type_pb_js_1 = require("./type_pb.js"); | ||
@@ -34,3 +34,3 @@ const source_context_pb_js_1 = require("./source_context_pb.js"); | ||
*/ | ||
class Api extends index_js_1.Message { | ||
class Api extends index_runtime_js_1.Message { | ||
constructor(data) { | ||
@@ -95,3 +95,3 @@ super(); | ||
this.syntax = type_pb_js_1.Syntax.PROTO2; | ||
index_js_1.proto3.util.initPartial(data, this); | ||
index_runtime_js_1.proto3.util.initPartial(data, this); | ||
} | ||
@@ -108,9 +108,9 @@ static fromBinary(bytes, options) { | ||
static equals(a, b) { | ||
return index_js_1.proto3.util.equals(Api, a, b); | ||
return index_runtime_js_1.proto3.util.equals(Api, a, b); | ||
} | ||
} | ||
exports.Api = Api; | ||
Api.runtime = index_js_1.proto3; | ||
Api.runtime = index_runtime_js_1.proto3; | ||
Api.typeName = "google.protobuf.Api"; | ||
Api.fields = index_js_1.proto3.util.newFieldList(() => [ | ||
Api.fields = index_runtime_js_1.proto3.util.newFieldList(() => [ | ||
{ no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
@@ -122,3 +122,3 @@ { no: 2, name: "methods", kind: "message", T: Method, repeated: true }, | ||
{ no: 6, name: "mixins", kind: "message", T: Mixin, repeated: true }, | ||
{ no: 7, name: "syntax", kind: "enum", T: index_js_1.proto3.getEnumType(type_pb_js_1.Syntax) }, | ||
{ no: 7, name: "syntax", kind: "enum", T: index_runtime_js_1.proto3.getEnumType(type_pb_js_1.Syntax) }, | ||
]); | ||
@@ -130,3 +130,3 @@ /** | ||
*/ | ||
class Method extends index_js_1.Message { | ||
class Method extends index_runtime_js_1.Message { | ||
constructor(data) { | ||
@@ -176,3 +176,3 @@ super(); | ||
this.syntax = type_pb_js_1.Syntax.PROTO2; | ||
index_js_1.proto3.util.initPartial(data, this); | ||
index_runtime_js_1.proto3.util.initPartial(data, this); | ||
} | ||
@@ -189,9 +189,9 @@ static fromBinary(bytes, options) { | ||
static equals(a, b) { | ||
return index_js_1.proto3.util.equals(Method, a, b); | ||
return index_runtime_js_1.proto3.util.equals(Method, a, b); | ||
} | ||
} | ||
exports.Method = Method; | ||
Method.runtime = index_js_1.proto3; | ||
Method.runtime = index_runtime_js_1.proto3; | ||
Method.typeName = "google.protobuf.Method"; | ||
Method.fields = index_js_1.proto3.util.newFieldList(() => [ | ||
Method.fields = index_runtime_js_1.proto3.util.newFieldList(() => [ | ||
{ no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
@@ -203,3 +203,3 @@ { no: 2, name: "request_type_url", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
{ no: 6, name: "options", kind: "message", T: type_pb_js_1.Option, repeated: true }, | ||
{ no: 7, name: "syntax", kind: "enum", T: index_js_1.proto3.getEnumType(type_pb_js_1.Syntax) }, | ||
{ no: 7, name: "syntax", kind: "enum", T: index_runtime_js_1.proto3.getEnumType(type_pb_js_1.Syntax) }, | ||
]); | ||
@@ -288,3 +288,3 @@ /** | ||
*/ | ||
class Mixin extends index_js_1.Message { | ||
class Mixin extends index_runtime_js_1.Message { | ||
constructor(data) { | ||
@@ -305,3 +305,3 @@ super(); | ||
this.root = ""; | ||
index_js_1.proto3.util.initPartial(data, this); | ||
index_runtime_js_1.proto3.util.initPartial(data, this); | ||
} | ||
@@ -318,11 +318,11 @@ static fromBinary(bytes, options) { | ||
static equals(a, b) { | ||
return index_js_1.proto3.util.equals(Mixin, a, b); | ||
return index_runtime_js_1.proto3.util.equals(Mixin, a, b); | ||
} | ||
} | ||
exports.Mixin = Mixin; | ||
Mixin.runtime = index_js_1.proto3; | ||
Mixin.runtime = index_runtime_js_1.proto3; | ||
Mixin.typeName = "google.protobuf.Mixin"; | ||
Mixin.fields = index_js_1.proto3.util.newFieldList(() => [ | ||
Mixin.fields = index_runtime_js_1.proto3.util.newFieldList(() => [ | ||
{ no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
{ no: 2, name: "root", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
]); |
@@ -17,3 +17,3 @@ "use strict"; | ||
exports.CodeGeneratorResponse_File = exports.CodeGeneratorResponse_Feature = exports.CodeGeneratorResponse = exports.CodeGeneratorRequest = exports.Version = void 0; | ||
const index_js_1 = require("../../../index.js"); | ||
const index_runtime_js_1 = require("../../../index-runtime.js"); | ||
const descriptor_pb_js_1 = require("../descriptor_pb.js"); | ||
@@ -25,6 +25,6 @@ /** | ||
*/ | ||
class Version extends index_js_1.Message { | ||
class Version extends index_runtime_js_1.Message { | ||
constructor(data) { | ||
super(); | ||
index_js_1.proto2.util.initPartial(data, this); | ||
index_runtime_js_1.proto2.util.initPartial(data, this); | ||
} | ||
@@ -41,9 +41,9 @@ static fromBinary(bytes, options) { | ||
static equals(a, b) { | ||
return index_js_1.proto2.util.equals(Version, a, b); | ||
return index_runtime_js_1.proto2.util.equals(Version, a, b); | ||
} | ||
} | ||
exports.Version = Version; | ||
Version.runtime = index_js_1.proto2; | ||
Version.runtime = index_runtime_js_1.proto2; | ||
Version.typeName = "google.protobuf.compiler.Version"; | ||
Version.fields = index_js_1.proto2.util.newFieldList(() => [ | ||
Version.fields = index_runtime_js_1.proto2.util.newFieldList(() => [ | ||
{ no: 1, name: "major", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, | ||
@@ -59,3 +59,3 @@ { no: 2, name: "minor", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, | ||
*/ | ||
class CodeGeneratorRequest extends index_js_1.Message { | ||
class CodeGeneratorRequest extends index_runtime_js_1.Message { | ||
constructor(data) { | ||
@@ -90,3 +90,3 @@ super(); | ||
this.protoFile = []; | ||
index_js_1.proto2.util.initPartial(data, this); | ||
index_runtime_js_1.proto2.util.initPartial(data, this); | ||
} | ||
@@ -103,9 +103,9 @@ static fromBinary(bytes, options) { | ||
static equals(a, b) { | ||
return index_js_1.proto2.util.equals(CodeGeneratorRequest, a, b); | ||
return index_runtime_js_1.proto2.util.equals(CodeGeneratorRequest, a, b); | ||
} | ||
} | ||
exports.CodeGeneratorRequest = CodeGeneratorRequest; | ||
CodeGeneratorRequest.runtime = index_js_1.proto2; | ||
CodeGeneratorRequest.runtime = index_runtime_js_1.proto2; | ||
CodeGeneratorRequest.typeName = "google.protobuf.compiler.CodeGeneratorRequest"; | ||
CodeGeneratorRequest.fields = index_js_1.proto2.util.newFieldList(() => [ | ||
CodeGeneratorRequest.fields = index_runtime_js_1.proto2.util.newFieldList(() => [ | ||
{ no: 1, name: "file_to_generate", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, | ||
@@ -121,3 +121,3 @@ { no: 2, name: "parameter", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, | ||
*/ | ||
class CodeGeneratorResponse extends index_js_1.Message { | ||
class CodeGeneratorResponse extends index_runtime_js_1.Message { | ||
constructor(data) { | ||
@@ -129,3 +129,3 @@ super(); | ||
this.file = []; | ||
index_js_1.proto2.util.initPartial(data, this); | ||
index_runtime_js_1.proto2.util.initPartial(data, this); | ||
} | ||
@@ -142,9 +142,9 @@ static fromBinary(bytes, options) { | ||
static equals(a, b) { | ||
return index_js_1.proto2.util.equals(CodeGeneratorResponse, a, b); | ||
return index_runtime_js_1.proto2.util.equals(CodeGeneratorResponse, a, b); | ||
} | ||
} | ||
exports.CodeGeneratorResponse = CodeGeneratorResponse; | ||
CodeGeneratorResponse.runtime = index_js_1.proto2; | ||
CodeGeneratorResponse.runtime = index_runtime_js_1.proto2; | ||
CodeGeneratorResponse.typeName = "google.protobuf.compiler.CodeGeneratorResponse"; | ||
CodeGeneratorResponse.fields = index_js_1.proto2.util.newFieldList(() => [ | ||
CodeGeneratorResponse.fields = index_runtime_js_1.proto2.util.newFieldList(() => [ | ||
{ no: 1, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, | ||
@@ -171,3 +171,3 @@ { no: 2, name: "supported_features", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true }, | ||
// Retrieve enum metadata with: proto2.getEnumType(CodeGeneratorResponse_Feature) | ||
index_js_1.proto2.util.setEnumType(CodeGeneratorResponse_Feature, "google.protobuf.compiler.CodeGeneratorResponse.Feature", [ | ||
index_runtime_js_1.proto2.util.setEnumType(CodeGeneratorResponse_Feature, "google.protobuf.compiler.CodeGeneratorResponse.Feature", [ | ||
{ no: 0, name: "FEATURE_NONE" }, | ||
@@ -181,6 +181,6 @@ { no: 1, name: "FEATURE_PROTO3_OPTIONAL" }, | ||
*/ | ||
class CodeGeneratorResponse_File extends index_js_1.Message { | ||
class CodeGeneratorResponse_File extends index_runtime_js_1.Message { | ||
constructor(data) { | ||
super(); | ||
index_js_1.proto2.util.initPartial(data, this); | ||
index_runtime_js_1.proto2.util.initPartial(data, this); | ||
} | ||
@@ -197,9 +197,9 @@ static fromBinary(bytes, options) { | ||
static equals(a, b) { | ||
return index_js_1.proto2.util.equals(CodeGeneratorResponse_File, a, b); | ||
return index_runtime_js_1.proto2.util.equals(CodeGeneratorResponse_File, a, b); | ||
} | ||
} | ||
exports.CodeGeneratorResponse_File = CodeGeneratorResponse_File; | ||
CodeGeneratorResponse_File.runtime = index_js_1.proto2; | ||
CodeGeneratorResponse_File.runtime = index_runtime_js_1.proto2; | ||
CodeGeneratorResponse_File.typeName = "google.protobuf.compiler.CodeGeneratorResponse.File"; | ||
CodeGeneratorResponse_File.fields = index_js_1.proto2.util.newFieldList(() => [ | ||
CodeGeneratorResponse_File.fields = index_runtime_js_1.proto2.util.newFieldList(() => [ | ||
{ no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, | ||
@@ -206,0 +206,0 @@ { no: 2, name: "insertion_point", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, |
@@ -17,3 +17,3 @@ "use strict"; | ||
exports.Duration = void 0; | ||
const index_js_1 = require("../../index.js"); | ||
const index_runtime_js_1 = require("../../index-runtime.js"); | ||
/** | ||
@@ -83,3 +83,3 @@ * A Duration represents a signed, fixed-length span of time represented | ||
*/ | ||
class Duration extends index_js_1.Message { | ||
class Duration extends index_runtime_js_1.Message { | ||
constructor(data) { | ||
@@ -94,3 +94,3 @@ super(); | ||
*/ | ||
this.seconds = index_js_1.protoInt64.zero; | ||
this.seconds = index_runtime_js_1.protoInt64.zero; | ||
/** | ||
@@ -107,17 +107,17 @@ * Signed fractions of a second at nanosecond resolution of the span | ||
this.nanos = 0; | ||
index_js_1.proto3.util.initPartial(data, this); | ||
index_runtime_js_1.proto3.util.initPartial(data, this); | ||
} | ||
fromJson(json, options) { | ||
if (typeof json !== "string") { | ||
throw new Error(`cannot decode google.protobuf.Duration from JSON: ${index_js_1.proto3.json.debug(json)}`); | ||
throw new Error(`cannot decode google.protobuf.Duration from JSON: ${index_runtime_js_1.proto3.json.debug(json)}`); | ||
} | ||
const match = json.match(/^(-?[0-9]+)(?:\.([0-9]+))?s/); | ||
if (match === null) { | ||
throw new Error(`cannot decode google.protobuf.Duration from JSON: ${index_js_1.proto3.json.debug(json)}`); | ||
throw new Error(`cannot decode google.protobuf.Duration from JSON: ${index_runtime_js_1.proto3.json.debug(json)}`); | ||
} | ||
const longSeconds = Number(match[1]); | ||
if (longSeconds > 315576000000 || longSeconds < -315576000000) { | ||
throw new Error(`cannot decode google.protobuf.Duration from JSON: ${index_js_1.proto3.json.debug(json)}`); | ||
throw new Error(`cannot decode google.protobuf.Duration from JSON: ${index_runtime_js_1.proto3.json.debug(json)}`); | ||
} | ||
this.seconds = index_js_1.protoInt64.parse(longSeconds); | ||
this.seconds = index_runtime_js_1.protoInt64.parse(longSeconds); | ||
if (typeof match[2] == "string") { | ||
@@ -160,11 +160,11 @@ const nanosStr = match[2] + "0".repeat(9 - match[2].length); | ||
static equals(a, b) { | ||
return index_js_1.proto3.util.equals(Duration, a, b); | ||
return index_runtime_js_1.proto3.util.equals(Duration, a, b); | ||
} | ||
} | ||
exports.Duration = Duration; | ||
Duration.runtime = index_js_1.proto3; | ||
Duration.runtime = index_runtime_js_1.proto3; | ||
Duration.typeName = "google.protobuf.Duration"; | ||
Duration.fields = index_js_1.proto3.util.newFieldList(() => [ | ||
Duration.fields = index_runtime_js_1.proto3.util.newFieldList(() => [ | ||
{ no: 1, name: "seconds", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, | ||
{ no: 2, name: "nanos", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, | ||
]); |
@@ -17,3 +17,3 @@ "use strict"; | ||
exports.Empty = void 0; | ||
const index_js_1 = require("../../index.js"); | ||
const index_runtime_js_1 = require("../../index-runtime.js"); | ||
/** | ||
@@ -32,6 +32,6 @@ * A generic empty message that you can re-use to avoid defining duplicated | ||
*/ | ||
class Empty extends index_js_1.Message { | ||
class Empty extends index_runtime_js_1.Message { | ||
constructor(data) { | ||
super(); | ||
index_js_1.proto3.util.initPartial(data, this); | ||
index_runtime_js_1.proto3.util.initPartial(data, this); | ||
} | ||
@@ -48,8 +48,8 @@ static fromBinary(bytes, options) { | ||
static equals(a, b) { | ||
return index_js_1.proto3.util.equals(Empty, a, b); | ||
return index_runtime_js_1.proto3.util.equals(Empty, a, b); | ||
} | ||
} | ||
exports.Empty = Empty; | ||
Empty.runtime = index_js_1.proto3; | ||
Empty.runtime = index_runtime_js_1.proto3; | ||
Empty.typeName = "google.protobuf.Empty"; | ||
Empty.fields = index_js_1.proto3.util.newFieldList(() => []); | ||
Empty.fields = index_runtime_js_1.proto3.util.newFieldList(() => []); |
@@ -17,3 +17,3 @@ "use strict"; | ||
exports.FieldMask = void 0; | ||
const index_js_1 = require("../../index.js"); | ||
const index_runtime_js_1 = require("../../index-runtime.js"); | ||
/** | ||
@@ -222,3 +222,3 @@ * `FieldMask` represents a set of symbolic field paths, for example: | ||
*/ | ||
class FieldMask extends index_js_1.Message { | ||
class FieldMask extends index_runtime_js_1.Message { | ||
constructor(data) { | ||
@@ -232,3 +232,3 @@ super(); | ||
this.paths = []; | ||
index_js_1.proto3.util.initPartial(data, this); | ||
index_runtime_js_1.proto3.util.initPartial(data, this); | ||
} | ||
@@ -280,3 +280,3 @@ toJson(options) { | ||
if (typeof json !== "string") { | ||
throw new Error("cannot decode google.protobuf.FieldMask from JSON: " + index_js_1.proto3.json.debug(json)); | ||
throw new Error("cannot decode google.protobuf.FieldMask from JSON: " + index_runtime_js_1.proto3.json.debug(json)); | ||
} | ||
@@ -306,10 +306,10 @@ if (json === "") { | ||
static equals(a, b) { | ||
return index_js_1.proto3.util.equals(FieldMask, a, b); | ||
return index_runtime_js_1.proto3.util.equals(FieldMask, a, b); | ||
} | ||
} | ||
exports.FieldMask = FieldMask; | ||
FieldMask.runtime = index_js_1.proto3; | ||
FieldMask.runtime = index_runtime_js_1.proto3; | ||
FieldMask.typeName = "google.protobuf.FieldMask"; | ||
FieldMask.fields = index_js_1.proto3.util.newFieldList(() => [ | ||
FieldMask.fields = index_runtime_js_1.proto3.util.newFieldList(() => [ | ||
{ no: 1, name: "paths", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, | ||
]); |
@@ -17,3 +17,3 @@ "use strict"; | ||
exports.SourceContext = void 0; | ||
const index_js_1 = require("../../index.js"); | ||
const index_runtime_js_1 = require("../../index-runtime.js"); | ||
/** | ||
@@ -25,3 +25,3 @@ * `SourceContext` represents information about the source of a | ||
*/ | ||
class SourceContext extends index_js_1.Message { | ||
class SourceContext extends index_runtime_js_1.Message { | ||
constructor(data) { | ||
@@ -36,3 +36,3 @@ super(); | ||
this.fileName = ""; | ||
index_js_1.proto3.util.initPartial(data, this); | ||
index_runtime_js_1.proto3.util.initPartial(data, this); | ||
} | ||
@@ -49,10 +49,10 @@ static fromBinary(bytes, options) { | ||
static equals(a, b) { | ||
return index_js_1.proto3.util.equals(SourceContext, a, b); | ||
return index_runtime_js_1.proto3.util.equals(SourceContext, a, b); | ||
} | ||
} | ||
exports.SourceContext = SourceContext; | ||
SourceContext.runtime = index_js_1.proto3; | ||
SourceContext.runtime = index_runtime_js_1.proto3; | ||
SourceContext.typeName = "google.protobuf.SourceContext"; | ||
SourceContext.fields = index_js_1.proto3.util.newFieldList(() => [ | ||
SourceContext.fields = index_runtime_js_1.proto3.util.newFieldList(() => [ | ||
{ no: 1, name: "file_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
]); |
@@ -17,3 +17,3 @@ "use strict"; | ||
exports.ListValue = exports.Value = exports.Struct = exports.NullValue = void 0; | ||
const index_js_1 = require("../../index.js"); | ||
const index_runtime_js_1 = require("../../index-runtime.js"); | ||
/** | ||
@@ -37,3 +37,3 @@ * `NullValue` is a singleton enumeration to represent the null value for the | ||
// Retrieve enum metadata with: proto3.getEnumType(NullValue) | ||
index_js_1.proto3.util.setEnumType(NullValue, "google.protobuf.NullValue", [ | ||
index_runtime_js_1.proto3.util.setEnumType(NullValue, "google.protobuf.NullValue", [ | ||
{ no: 0, name: "NULL_VALUE" }, | ||
@@ -53,3 +53,3 @@ ]); | ||
*/ | ||
class Struct extends index_js_1.Message { | ||
class Struct extends index_runtime_js_1.Message { | ||
constructor(data) { | ||
@@ -63,3 +63,3 @@ super(); | ||
this.fields = {}; | ||
index_js_1.proto3.util.initPartial(data, this); | ||
index_runtime_js_1.proto3.util.initPartial(data, this); | ||
} | ||
@@ -75,3 +75,3 @@ toJson(options) { | ||
if (typeof json != "object" || json == null || Array.isArray(json)) { | ||
throw new Error("cannot decode google.protobuf.Struct from JSON " + index_js_1.proto3.json.debug(json)); | ||
throw new Error("cannot decode google.protobuf.Struct from JSON " + index_runtime_js_1.proto3.json.debug(json)); | ||
} | ||
@@ -93,9 +93,9 @@ for (const [k, v] of Object.entries(json)) { | ||
static equals(a, b) { | ||
return index_js_1.proto3.util.equals(Struct, a, b); | ||
return index_runtime_js_1.proto3.util.equals(Struct, a, b); | ||
} | ||
} | ||
exports.Struct = Struct; | ||
Struct.runtime = index_js_1.proto3; | ||
Struct.runtime = index_runtime_js_1.proto3; | ||
Struct.typeName = "google.protobuf.Struct"; | ||
Struct.fields = index_js_1.proto3.util.newFieldList(() => [ | ||
Struct.fields = index_runtime_js_1.proto3.util.newFieldList(() => [ | ||
{ no: 1, name: "fields", kind: "map", K: 9 /* ScalarType.STRING */, V: { kind: "message", T: Value } }, | ||
@@ -113,3 +113,3 @@ ]); | ||
*/ | ||
class Value extends index_js_1.Message { | ||
class Value extends index_runtime_js_1.Message { | ||
constructor(data) { | ||
@@ -123,3 +123,3 @@ super(); | ||
this.kind = { case: undefined }; | ||
index_js_1.proto3.util.initPartial(data, this); | ||
index_runtime_js_1.proto3.util.initPartial(data, this); | ||
} | ||
@@ -163,3 +163,3 @@ toJson(options) { | ||
default: | ||
throw new Error("cannot decode google.protobuf.Value from JSON " + index_js_1.proto3.json.debug(json)); | ||
throw new Error("cannot decode google.protobuf.Value from JSON " + index_runtime_js_1.proto3.json.debug(json)); | ||
} | ||
@@ -178,10 +178,10 @@ return this; | ||
static equals(a, b) { | ||
return index_js_1.proto3.util.equals(Value, a, b); | ||
return index_runtime_js_1.proto3.util.equals(Value, a, b); | ||
} | ||
} | ||
exports.Value = Value; | ||
Value.runtime = index_js_1.proto3; | ||
Value.runtime = index_runtime_js_1.proto3; | ||
Value.typeName = "google.protobuf.Value"; | ||
Value.fields = index_js_1.proto3.util.newFieldList(() => [ | ||
{ no: 1, name: "null_value", kind: "enum", T: index_js_1.proto3.getEnumType(NullValue), oneof: "kind" }, | ||
Value.fields = index_runtime_js_1.proto3.util.newFieldList(() => [ | ||
{ no: 1, name: "null_value", kind: "enum", T: index_runtime_js_1.proto3.getEnumType(NullValue), oneof: "kind" }, | ||
{ no: 2, name: "number_value", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, oneof: "kind" }, | ||
@@ -200,3 +200,3 @@ { no: 3, name: "string_value", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "kind" }, | ||
*/ | ||
class ListValue extends index_js_1.Message { | ||
class ListValue extends index_runtime_js_1.Message { | ||
constructor(data) { | ||
@@ -210,3 +210,3 @@ super(); | ||
this.values = []; | ||
index_js_1.proto3.util.initPartial(data, this); | ||
index_runtime_js_1.proto3.util.initPartial(data, this); | ||
} | ||
@@ -218,3 +218,3 @@ toJson(options) { | ||
if (!Array.isArray(json)) { | ||
throw new Error("cannot decode google.protobuf.ListValue from JSON " + index_js_1.proto3.json.debug(json)); | ||
throw new Error("cannot decode google.protobuf.ListValue from JSON " + index_runtime_js_1.proto3.json.debug(json)); | ||
} | ||
@@ -236,10 +236,10 @@ for (let e of json) { | ||
static equals(a, b) { | ||
return index_js_1.proto3.util.equals(ListValue, a, b); | ||
return index_runtime_js_1.proto3.util.equals(ListValue, a, b); | ||
} | ||
} | ||
exports.ListValue = ListValue; | ||
ListValue.runtime = index_js_1.proto3; | ||
ListValue.runtime = index_runtime_js_1.proto3; | ||
ListValue.typeName = "google.protobuf.ListValue"; | ||
ListValue.fields = index_js_1.proto3.util.newFieldList(() => [ | ||
ListValue.fields = index_runtime_js_1.proto3.util.newFieldList(() => [ | ||
{ no: 1, name: "values", kind: "message", T: Value, repeated: true }, | ||
]); |
@@ -17,3 +17,3 @@ "use strict"; | ||
exports.Timestamp = void 0; | ||
const index_js_1 = require("../../index.js"); | ||
const index_runtime_js_1 = require("../../index-runtime.js"); | ||
/** | ||
@@ -116,3 +116,3 @@ * A Timestamp represents a point in time independent of any time zone or local | ||
*/ | ||
class Timestamp extends index_js_1.Message { | ||
class Timestamp extends index_runtime_js_1.Message { | ||
constructor(data) { | ||
@@ -127,3 +127,3 @@ super(); | ||
*/ | ||
this.seconds = index_js_1.protoInt64.zero; | ||
this.seconds = index_runtime_js_1.protoInt64.zero; | ||
/** | ||
@@ -138,7 +138,7 @@ * Non-negative fractions of a second at nanosecond resolution. Negative | ||
this.nanos = 0; | ||
index_js_1.proto3.util.initPartial(data, this); | ||
index_runtime_js_1.proto3.util.initPartial(data, this); | ||
} | ||
fromJson(json, options) { | ||
if (typeof json !== "string") { | ||
throw new Error(`cannot decode google.protobuf.Timestamp from JSON: ${index_js_1.proto3.json.debug(json)}`); | ||
throw new Error(`cannot decode google.protobuf.Timestamp from JSON: ${index_runtime_js_1.proto3.json.debug(json)}`); | ||
} | ||
@@ -156,3 +156,3 @@ const matches = json.match(/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:Z|\.([0-9]{3,9})Z|([+-][0-9][0-9]:[0-9][0-9]))$/); | ||
} | ||
this.seconds = index_js_1.protoInt64.parse(ms / 1000); | ||
this.seconds = index_runtime_js_1.protoInt64.parse(ms / 1000); | ||
this.nanos = 0; | ||
@@ -196,3 +196,3 @@ if (matches[7]) { | ||
return new Timestamp({ | ||
seconds: index_js_1.protoInt64.parse(Math.floor(ms / 1000)), | ||
seconds: index_runtime_js_1.protoInt64.parse(Math.floor(ms / 1000)), | ||
nanos: (ms % 1000) * 1000000, | ||
@@ -211,11 +211,11 @@ }); | ||
static equals(a, b) { | ||
return index_js_1.proto3.util.equals(Timestamp, a, b); | ||
return index_runtime_js_1.proto3.util.equals(Timestamp, a, b); | ||
} | ||
} | ||
exports.Timestamp = Timestamp; | ||
Timestamp.runtime = index_js_1.proto3; | ||
Timestamp.runtime = index_runtime_js_1.proto3; | ||
Timestamp.typeName = "google.protobuf.Timestamp"; | ||
Timestamp.fields = index_js_1.proto3.util.newFieldList(() => [ | ||
Timestamp.fields = index_runtime_js_1.proto3.util.newFieldList(() => [ | ||
{ no: 1, name: "seconds", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, | ||
{ no: 2, name: "nanos", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, | ||
]); |
@@ -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; | ||
const index_js_1 = require("../../index.js"); | ||
const index_runtime_js_1 = require("../../index-runtime.js"); | ||
const source_context_pb_js_1 = require("./source_context_pb.js"); | ||
@@ -42,3 +42,3 @@ const any_pb_js_1 = require("./any_pb.js"); | ||
// Retrieve enum metadata with: proto3.getEnumType(Syntax) | ||
index_js_1.proto3.util.setEnumType(Syntax, "google.protobuf.Syntax", [ | ||
index_runtime_js_1.proto3.util.setEnumType(Syntax, "google.protobuf.Syntax", [ | ||
{ no: 0, name: "SYNTAX_PROTO2" }, | ||
@@ -52,3 +52,3 @@ { no: 1, name: "SYNTAX_PROTO3" }, | ||
*/ | ||
class Type extends index_js_1.Message { | ||
class Type extends index_runtime_js_1.Message { | ||
constructor(data) { | ||
@@ -86,3 +86,3 @@ super(); | ||
this.syntax = Syntax.PROTO2; | ||
index_js_1.proto3.util.initPartial(data, this); | ||
index_runtime_js_1.proto3.util.initPartial(data, this); | ||
} | ||
@@ -99,9 +99,9 @@ static fromBinary(bytes, options) { | ||
static equals(a, b) { | ||
return index_js_1.proto3.util.equals(Type, a, b); | ||
return index_runtime_js_1.proto3.util.equals(Type, a, b); | ||
} | ||
} | ||
exports.Type = Type; | ||
Type.runtime = index_js_1.proto3; | ||
Type.runtime = index_runtime_js_1.proto3; | ||
Type.typeName = "google.protobuf.Type"; | ||
Type.fields = index_js_1.proto3.util.newFieldList(() => [ | ||
Type.fields = index_runtime_js_1.proto3.util.newFieldList(() => [ | ||
{ no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
@@ -112,3 +112,3 @@ { no: 2, name: "fields", kind: "message", T: Field, repeated: true }, | ||
{ no: 5, name: "source_context", kind: "message", T: source_context_pb_js_1.SourceContext }, | ||
{ no: 6, name: "syntax", kind: "enum", T: index_js_1.proto3.getEnumType(Syntax) }, | ||
{ no: 6, name: "syntax", kind: "enum", T: index_runtime_js_1.proto3.getEnumType(Syntax) }, | ||
]); | ||
@@ -120,3 +120,3 @@ /** | ||
*/ | ||
class Field extends index_js_1.Message { | ||
class Field extends index_runtime_js_1.Message { | ||
constructor(data) { | ||
@@ -186,3 +186,3 @@ super(); | ||
this.defaultValue = ""; | ||
index_js_1.proto3.util.initPartial(data, this); | ||
index_runtime_js_1.proto3.util.initPartial(data, this); | ||
} | ||
@@ -199,11 +199,11 @@ static fromBinary(bytes, options) { | ||
static equals(a, b) { | ||
return index_js_1.proto3.util.equals(Field, a, b); | ||
return index_runtime_js_1.proto3.util.equals(Field, a, b); | ||
} | ||
} | ||
exports.Field = Field; | ||
Field.runtime = index_js_1.proto3; | ||
Field.runtime = index_runtime_js_1.proto3; | ||
Field.typeName = "google.protobuf.Field"; | ||
Field.fields = index_js_1.proto3.util.newFieldList(() => [ | ||
{ no: 1, name: "kind", kind: "enum", T: index_js_1.proto3.getEnumType(Field_Kind) }, | ||
{ no: 2, name: "cardinality", kind: "enum", T: index_js_1.proto3.getEnumType(Field_Cardinality) }, | ||
Field.fields = index_runtime_js_1.proto3.util.newFieldList(() => [ | ||
{ no: 1, name: "kind", kind: "enum", T: index_runtime_js_1.proto3.getEnumType(Field_Kind) }, | ||
{ no: 2, name: "cardinality", kind: "enum", T: index_runtime_js_1.proto3.getEnumType(Field_Cardinality) }, | ||
{ no: 3, name: "number", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, | ||
@@ -341,3 +341,3 @@ { no: 4, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
// Retrieve enum metadata with: proto3.getEnumType(Field_Kind) | ||
index_js_1.proto3.util.setEnumType(Field_Kind, "google.protobuf.Field.Kind", [ | ||
index_runtime_js_1.proto3.util.setEnumType(Field_Kind, "google.protobuf.Field.Kind", [ | ||
{ no: 0, name: "TYPE_UNKNOWN" }, | ||
@@ -396,3 +396,3 @@ { no: 1, name: "TYPE_DOUBLE" }, | ||
// Retrieve enum metadata with: proto3.getEnumType(Field_Cardinality) | ||
index_js_1.proto3.util.setEnumType(Field_Cardinality, "google.protobuf.Field.Cardinality", [ | ||
index_runtime_js_1.proto3.util.setEnumType(Field_Cardinality, "google.protobuf.Field.Cardinality", [ | ||
{ no: 0, name: "CARDINALITY_UNKNOWN" }, | ||
@@ -408,3 +408,3 @@ { no: 1, name: "CARDINALITY_OPTIONAL" }, | ||
*/ | ||
class Enum extends index_js_1.Message { | ||
class Enum extends index_runtime_js_1.Message { | ||
constructor(data) { | ||
@@ -436,3 +436,3 @@ super(); | ||
this.syntax = Syntax.PROTO2; | ||
index_js_1.proto3.util.initPartial(data, this); | ||
index_runtime_js_1.proto3.util.initPartial(data, this); | ||
} | ||
@@ -449,9 +449,9 @@ static fromBinary(bytes, options) { | ||
static equals(a, b) { | ||
return index_js_1.proto3.util.equals(Enum, a, b); | ||
return index_runtime_js_1.proto3.util.equals(Enum, a, b); | ||
} | ||
} | ||
exports.Enum = Enum; | ||
Enum.runtime = index_js_1.proto3; | ||
Enum.runtime = index_runtime_js_1.proto3; | ||
Enum.typeName = "google.protobuf.Enum"; | ||
Enum.fields = index_js_1.proto3.util.newFieldList(() => [ | ||
Enum.fields = index_runtime_js_1.proto3.util.newFieldList(() => [ | ||
{ no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
@@ -461,3 +461,3 @@ { no: 2, name: "enumvalue", kind: "message", T: EnumValue, repeated: true }, | ||
{ no: 4, name: "source_context", kind: "message", T: source_context_pb_js_1.SourceContext }, | ||
{ no: 5, name: "syntax", kind: "enum", T: index_js_1.proto3.getEnumType(Syntax) }, | ||
{ no: 5, name: "syntax", kind: "enum", T: index_runtime_js_1.proto3.getEnumType(Syntax) }, | ||
]); | ||
@@ -469,3 +469,3 @@ /** | ||
*/ | ||
class EnumValue extends index_js_1.Message { | ||
class EnumValue extends index_runtime_js_1.Message { | ||
constructor(data) { | ||
@@ -491,3 +491,3 @@ super(); | ||
this.options = []; | ||
index_js_1.proto3.util.initPartial(data, this); | ||
index_runtime_js_1.proto3.util.initPartial(data, this); | ||
} | ||
@@ -504,9 +504,9 @@ static fromBinary(bytes, options) { | ||
static equals(a, b) { | ||
return index_js_1.proto3.util.equals(EnumValue, a, b); | ||
return index_runtime_js_1.proto3.util.equals(EnumValue, a, b); | ||
} | ||
} | ||
exports.EnumValue = EnumValue; | ||
EnumValue.runtime = index_js_1.proto3; | ||
EnumValue.runtime = index_runtime_js_1.proto3; | ||
EnumValue.typeName = "google.protobuf.EnumValue"; | ||
EnumValue.fields = index_js_1.proto3.util.newFieldList(() => [ | ||
EnumValue.fields = index_runtime_js_1.proto3.util.newFieldList(() => [ | ||
{ no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
@@ -522,3 +522,3 @@ { no: 2, name: "number", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, | ||
*/ | ||
class Option extends index_js_1.Message { | ||
class Option extends index_runtime_js_1.Message { | ||
constructor(data) { | ||
@@ -535,3 +535,3 @@ super(); | ||
this.name = ""; | ||
index_js_1.proto3.util.initPartial(data, this); | ||
index_runtime_js_1.proto3.util.initPartial(data, this); | ||
} | ||
@@ -548,11 +548,11 @@ static fromBinary(bytes, options) { | ||
static equals(a, b) { | ||
return index_js_1.proto3.util.equals(Option, a, b); | ||
return index_runtime_js_1.proto3.util.equals(Option, a, b); | ||
} | ||
} | ||
exports.Option = Option; | ||
Option.runtime = index_js_1.proto3; | ||
Option.runtime = index_runtime_js_1.proto3; | ||
Option.typeName = "google.protobuf.Option"; | ||
Option.fields = index_js_1.proto3.util.newFieldList(() => [ | ||
Option.fields = index_runtime_js_1.proto3.util.newFieldList(() => [ | ||
{ no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
{ no: 2, name: "value", kind: "message", T: any_pb_js_1.Any }, | ||
]); |
@@ -17,3 +17,3 @@ "use strict"; | ||
exports.BytesValue = exports.StringValue = exports.BoolValue = exports.UInt32Value = exports.Int32Value = exports.UInt64Value = exports.Int64Value = exports.FloatValue = exports.DoubleValue = void 0; | ||
const index_js_1 = require("../../index.js"); | ||
const index_runtime_js_1 = require("../../index-runtime.js"); | ||
/** | ||
@@ -26,3 +26,3 @@ * Wrapper message for `double`. | ||
*/ | ||
class DoubleValue extends index_js_1.Message { | ||
class DoubleValue extends index_runtime_js_1.Message { | ||
constructor(data) { | ||
@@ -36,10 +36,10 @@ super(); | ||
this.value = 0; | ||
index_js_1.proto3.util.initPartial(data, this); | ||
index_runtime_js_1.proto3.util.initPartial(data, this); | ||
} | ||
toJson(options) { | ||
return index_js_1.proto3.json.writeScalar(index_js_1.ScalarType.DOUBLE, this.value, true); | ||
return index_runtime_js_1.proto3.json.writeScalar(index_runtime_js_1.ScalarType.DOUBLE, this.value, true); | ||
} | ||
fromJson(json, options) { | ||
try { | ||
this.value = index_js_1.proto3.json.readScalar(index_js_1.ScalarType.DOUBLE, json); | ||
this.value = index_runtime_js_1.proto3.json.readScalar(index_runtime_js_1.ScalarType.DOUBLE, json); | ||
} | ||
@@ -65,9 +65,9 @@ catch (e) { | ||
static equals(a, b) { | ||
return index_js_1.proto3.util.equals(DoubleValue, a, b); | ||
return index_runtime_js_1.proto3.util.equals(DoubleValue, a, b); | ||
} | ||
} | ||
exports.DoubleValue = DoubleValue; | ||
DoubleValue.runtime = index_js_1.proto3; | ||
DoubleValue.runtime = index_runtime_js_1.proto3; | ||
DoubleValue.typeName = "google.protobuf.DoubleValue"; | ||
DoubleValue.fields = index_js_1.proto3.util.newFieldList(() => [ | ||
DoubleValue.fields = index_runtime_js_1.proto3.util.newFieldList(() => [ | ||
{ no: 1, name: "value", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ }, | ||
@@ -90,3 +90,3 @@ ]); | ||
*/ | ||
class FloatValue extends index_js_1.Message { | ||
class FloatValue extends index_runtime_js_1.Message { | ||
constructor(data) { | ||
@@ -100,10 +100,10 @@ super(); | ||
this.value = 0; | ||
index_js_1.proto3.util.initPartial(data, this); | ||
index_runtime_js_1.proto3.util.initPartial(data, this); | ||
} | ||
toJson(options) { | ||
return index_js_1.proto3.json.writeScalar(index_js_1.ScalarType.FLOAT, this.value, true); | ||
return index_runtime_js_1.proto3.json.writeScalar(index_runtime_js_1.ScalarType.FLOAT, this.value, true); | ||
} | ||
fromJson(json, options) { | ||
try { | ||
this.value = index_js_1.proto3.json.readScalar(index_js_1.ScalarType.FLOAT, json); | ||
this.value = index_runtime_js_1.proto3.json.readScalar(index_runtime_js_1.ScalarType.FLOAT, json); | ||
} | ||
@@ -129,9 +129,9 @@ catch (e) { | ||
static equals(a, b) { | ||
return index_js_1.proto3.util.equals(FloatValue, a, b); | ||
return index_runtime_js_1.proto3.util.equals(FloatValue, a, b); | ||
} | ||
} | ||
exports.FloatValue = FloatValue; | ||
FloatValue.runtime = index_js_1.proto3; | ||
FloatValue.runtime = index_runtime_js_1.proto3; | ||
FloatValue.typeName = "google.protobuf.FloatValue"; | ||
FloatValue.fields = index_js_1.proto3.util.newFieldList(() => [ | ||
FloatValue.fields = index_runtime_js_1.proto3.util.newFieldList(() => [ | ||
{ no: 1, name: "value", kind: "scalar", T: 2 /* ScalarType.FLOAT */ }, | ||
@@ -154,3 +154,3 @@ ]); | ||
*/ | ||
class Int64Value extends index_js_1.Message { | ||
class Int64Value extends index_runtime_js_1.Message { | ||
constructor(data) { | ||
@@ -163,11 +163,11 @@ super(); | ||
*/ | ||
this.value = index_js_1.protoInt64.zero; | ||
index_js_1.proto3.util.initPartial(data, this); | ||
this.value = index_runtime_js_1.protoInt64.zero; | ||
index_runtime_js_1.proto3.util.initPartial(data, this); | ||
} | ||
toJson(options) { | ||
return index_js_1.proto3.json.writeScalar(index_js_1.ScalarType.INT64, this.value, true); | ||
return index_runtime_js_1.proto3.json.writeScalar(index_runtime_js_1.ScalarType.INT64, this.value, true); | ||
} | ||
fromJson(json, options) { | ||
try { | ||
this.value = index_js_1.proto3.json.readScalar(index_js_1.ScalarType.INT64, json); | ||
this.value = index_runtime_js_1.proto3.json.readScalar(index_runtime_js_1.ScalarType.INT64, json); | ||
} | ||
@@ -193,9 +193,9 @@ catch (e) { | ||
static equals(a, b) { | ||
return index_js_1.proto3.util.equals(Int64Value, a, b); | ||
return index_runtime_js_1.proto3.util.equals(Int64Value, a, b); | ||
} | ||
} | ||
exports.Int64Value = Int64Value; | ||
Int64Value.runtime = index_js_1.proto3; | ||
Int64Value.runtime = index_runtime_js_1.proto3; | ||
Int64Value.typeName = "google.protobuf.Int64Value"; | ||
Int64Value.fields = index_js_1.proto3.util.newFieldList(() => [ | ||
Int64Value.fields = index_runtime_js_1.proto3.util.newFieldList(() => [ | ||
{ no: 1, name: "value", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, | ||
@@ -218,3 +218,3 @@ ]); | ||
*/ | ||
class UInt64Value extends index_js_1.Message { | ||
class UInt64Value extends index_runtime_js_1.Message { | ||
constructor(data) { | ||
@@ -227,11 +227,11 @@ super(); | ||
*/ | ||
this.value = index_js_1.protoInt64.zero; | ||
index_js_1.proto3.util.initPartial(data, this); | ||
this.value = index_runtime_js_1.protoInt64.zero; | ||
index_runtime_js_1.proto3.util.initPartial(data, this); | ||
} | ||
toJson(options) { | ||
return index_js_1.proto3.json.writeScalar(index_js_1.ScalarType.UINT64, this.value, true); | ||
return index_runtime_js_1.proto3.json.writeScalar(index_runtime_js_1.ScalarType.UINT64, this.value, true); | ||
} | ||
fromJson(json, options) { | ||
try { | ||
this.value = index_js_1.proto3.json.readScalar(index_js_1.ScalarType.UINT64, json); | ||
this.value = index_runtime_js_1.proto3.json.readScalar(index_runtime_js_1.ScalarType.UINT64, json); | ||
} | ||
@@ -257,9 +257,9 @@ catch (e) { | ||
static equals(a, b) { | ||
return index_js_1.proto3.util.equals(UInt64Value, a, b); | ||
return index_runtime_js_1.proto3.util.equals(UInt64Value, a, b); | ||
} | ||
} | ||
exports.UInt64Value = UInt64Value; | ||
UInt64Value.runtime = index_js_1.proto3; | ||
UInt64Value.runtime = index_runtime_js_1.proto3; | ||
UInt64Value.typeName = "google.protobuf.UInt64Value"; | ||
UInt64Value.fields = index_js_1.proto3.util.newFieldList(() => [ | ||
UInt64Value.fields = index_runtime_js_1.proto3.util.newFieldList(() => [ | ||
{ no: 1, name: "value", kind: "scalar", T: 4 /* ScalarType.UINT64 */ }, | ||
@@ -282,3 +282,3 @@ ]); | ||
*/ | ||
class Int32Value extends index_js_1.Message { | ||
class Int32Value extends index_runtime_js_1.Message { | ||
constructor(data) { | ||
@@ -292,10 +292,10 @@ super(); | ||
this.value = 0; | ||
index_js_1.proto3.util.initPartial(data, this); | ||
index_runtime_js_1.proto3.util.initPartial(data, this); | ||
} | ||
toJson(options) { | ||
return index_js_1.proto3.json.writeScalar(index_js_1.ScalarType.INT32, this.value, true); | ||
return index_runtime_js_1.proto3.json.writeScalar(index_runtime_js_1.ScalarType.INT32, this.value, true); | ||
} | ||
fromJson(json, options) { | ||
try { | ||
this.value = index_js_1.proto3.json.readScalar(index_js_1.ScalarType.INT32, json); | ||
this.value = index_runtime_js_1.proto3.json.readScalar(index_runtime_js_1.ScalarType.INT32, json); | ||
} | ||
@@ -321,9 +321,9 @@ catch (e) { | ||
static equals(a, b) { | ||
return index_js_1.proto3.util.equals(Int32Value, a, b); | ||
return index_runtime_js_1.proto3.util.equals(Int32Value, a, b); | ||
} | ||
} | ||
exports.Int32Value = Int32Value; | ||
Int32Value.runtime = index_js_1.proto3; | ||
Int32Value.runtime = index_runtime_js_1.proto3; | ||
Int32Value.typeName = "google.protobuf.Int32Value"; | ||
Int32Value.fields = index_js_1.proto3.util.newFieldList(() => [ | ||
Int32Value.fields = index_runtime_js_1.proto3.util.newFieldList(() => [ | ||
{ no: 1, name: "value", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, | ||
@@ -346,3 +346,3 @@ ]); | ||
*/ | ||
class UInt32Value extends index_js_1.Message { | ||
class UInt32Value extends index_runtime_js_1.Message { | ||
constructor(data) { | ||
@@ -356,10 +356,10 @@ super(); | ||
this.value = 0; | ||
index_js_1.proto3.util.initPartial(data, this); | ||
index_runtime_js_1.proto3.util.initPartial(data, this); | ||
} | ||
toJson(options) { | ||
return index_js_1.proto3.json.writeScalar(index_js_1.ScalarType.UINT32, this.value, true); | ||
return index_runtime_js_1.proto3.json.writeScalar(index_runtime_js_1.ScalarType.UINT32, this.value, true); | ||
} | ||
fromJson(json, options) { | ||
try { | ||
this.value = index_js_1.proto3.json.readScalar(index_js_1.ScalarType.UINT32, json); | ||
this.value = index_runtime_js_1.proto3.json.readScalar(index_runtime_js_1.ScalarType.UINT32, json); | ||
} | ||
@@ -385,9 +385,9 @@ catch (e) { | ||
static equals(a, b) { | ||
return index_js_1.proto3.util.equals(UInt32Value, a, b); | ||
return index_runtime_js_1.proto3.util.equals(UInt32Value, a, b); | ||
} | ||
} | ||
exports.UInt32Value = UInt32Value; | ||
UInt32Value.runtime = index_js_1.proto3; | ||
UInt32Value.runtime = index_runtime_js_1.proto3; | ||
UInt32Value.typeName = "google.protobuf.UInt32Value"; | ||
UInt32Value.fields = index_js_1.proto3.util.newFieldList(() => [ | ||
UInt32Value.fields = index_runtime_js_1.proto3.util.newFieldList(() => [ | ||
{ no: 1, name: "value", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, | ||
@@ -410,3 +410,3 @@ ]); | ||
*/ | ||
class BoolValue extends index_js_1.Message { | ||
class BoolValue extends index_runtime_js_1.Message { | ||
constructor(data) { | ||
@@ -420,10 +420,10 @@ super(); | ||
this.value = false; | ||
index_js_1.proto3.util.initPartial(data, this); | ||
index_runtime_js_1.proto3.util.initPartial(data, this); | ||
} | ||
toJson(options) { | ||
return index_js_1.proto3.json.writeScalar(index_js_1.ScalarType.BOOL, this.value, true); | ||
return index_runtime_js_1.proto3.json.writeScalar(index_runtime_js_1.ScalarType.BOOL, this.value, true); | ||
} | ||
fromJson(json, options) { | ||
try { | ||
this.value = index_js_1.proto3.json.readScalar(index_js_1.ScalarType.BOOL, json); | ||
this.value = index_runtime_js_1.proto3.json.readScalar(index_runtime_js_1.ScalarType.BOOL, json); | ||
} | ||
@@ -449,9 +449,9 @@ catch (e) { | ||
static equals(a, b) { | ||
return index_js_1.proto3.util.equals(BoolValue, a, b); | ||
return index_runtime_js_1.proto3.util.equals(BoolValue, a, b); | ||
} | ||
} | ||
exports.BoolValue = BoolValue; | ||
BoolValue.runtime = index_js_1.proto3; | ||
BoolValue.runtime = index_runtime_js_1.proto3; | ||
BoolValue.typeName = "google.protobuf.BoolValue"; | ||
BoolValue.fields = index_js_1.proto3.util.newFieldList(() => [ | ||
BoolValue.fields = index_runtime_js_1.proto3.util.newFieldList(() => [ | ||
{ no: 1, name: "value", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, | ||
@@ -474,3 +474,3 @@ ]); | ||
*/ | ||
class StringValue extends index_js_1.Message { | ||
class StringValue extends index_runtime_js_1.Message { | ||
constructor(data) { | ||
@@ -484,10 +484,10 @@ super(); | ||
this.value = ""; | ||
index_js_1.proto3.util.initPartial(data, this); | ||
index_runtime_js_1.proto3.util.initPartial(data, this); | ||
} | ||
toJson(options) { | ||
return index_js_1.proto3.json.writeScalar(index_js_1.ScalarType.STRING, this.value, true); | ||
return index_runtime_js_1.proto3.json.writeScalar(index_runtime_js_1.ScalarType.STRING, this.value, true); | ||
} | ||
fromJson(json, options) { | ||
try { | ||
this.value = index_js_1.proto3.json.readScalar(index_js_1.ScalarType.STRING, json); | ||
this.value = index_runtime_js_1.proto3.json.readScalar(index_runtime_js_1.ScalarType.STRING, json); | ||
} | ||
@@ -513,9 +513,9 @@ catch (e) { | ||
static equals(a, b) { | ||
return index_js_1.proto3.util.equals(StringValue, a, b); | ||
return index_runtime_js_1.proto3.util.equals(StringValue, a, b); | ||
} | ||
} | ||
exports.StringValue = StringValue; | ||
StringValue.runtime = index_js_1.proto3; | ||
StringValue.runtime = index_runtime_js_1.proto3; | ||
StringValue.typeName = "google.protobuf.StringValue"; | ||
StringValue.fields = index_js_1.proto3.util.newFieldList(() => [ | ||
StringValue.fields = index_runtime_js_1.proto3.util.newFieldList(() => [ | ||
{ no: 1, name: "value", kind: "scalar", T: 9 /* ScalarType.STRING */ }, | ||
@@ -538,3 +538,3 @@ ]); | ||
*/ | ||
class BytesValue extends index_js_1.Message { | ||
class BytesValue extends index_runtime_js_1.Message { | ||
constructor(data) { | ||
@@ -548,10 +548,10 @@ super(); | ||
this.value = new Uint8Array(0); | ||
index_js_1.proto3.util.initPartial(data, this); | ||
index_runtime_js_1.proto3.util.initPartial(data, this); | ||
} | ||
toJson(options) { | ||
return index_js_1.proto3.json.writeScalar(index_js_1.ScalarType.BYTES, this.value, true); | ||
return index_runtime_js_1.proto3.json.writeScalar(index_runtime_js_1.ScalarType.BYTES, this.value, true); | ||
} | ||
fromJson(json, options) { | ||
try { | ||
this.value = index_js_1.proto3.json.readScalar(index_js_1.ScalarType.BYTES, json); | ||
this.value = index_runtime_js_1.proto3.json.readScalar(index_runtime_js_1.ScalarType.BYTES, json); | ||
} | ||
@@ -577,9 +577,9 @@ catch (e) { | ||
static equals(a, b) { | ||
return index_js_1.proto3.util.equals(BytesValue, a, b); | ||
return index_runtime_js_1.proto3.util.equals(BytesValue, a, b); | ||
} | ||
} | ||
exports.BytesValue = BytesValue; | ||
BytesValue.runtime = index_js_1.proto3; | ||
BytesValue.runtime = index_runtime_js_1.proto3; | ||
BytesValue.typeName = "google.protobuf.BytesValue"; | ||
BytesValue.fields = index_js_1.proto3.util.newFieldList(() => [ | ||
BytesValue.fields = index_runtime_js_1.proto3.util.newFieldList(() => [ | ||
{ no: 1, name: "value", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, | ||
@@ -586,0 +586,0 @@ ]); |
@@ -30,41 +30,5 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.BinaryReader = exports.BinaryWriter = exports.WireType = exports.DescriptorSet = exports.DescriptorRegistry = exports.TypeRegistry = exports.MethodIdempotency = exports.MethodKind = exports.ScalarType = exports.Message = exports.protoBase64 = exports.protoInt64 = exports.proto2 = exports.proto3 = void 0; | ||
var proto3_js_1 = require("./proto3.js"); | ||
Object.defineProperty(exports, "proto3", { enumerable: true, get: function () { return proto3_js_1.proto3; } }); | ||
var proto2_js_1 = require("./proto2.js"); | ||
Object.defineProperty(exports, "proto2", { enumerable: true, get: function () { return proto2_js_1.proto2; } }); | ||
var proto_int64_js_1 = require("./proto-int64.js"); | ||
Object.defineProperty(exports, "protoInt64", { enumerable: true, get: function () { return proto_int64_js_1.protoInt64; } }); | ||
var proto_base64_js_1 = require("./proto-base64.js"); | ||
Object.defineProperty(exports, "protoBase64", { enumerable: true, get: function () { return proto_base64_js_1.protoBase64; } }); | ||
var message_js_1 = require("./message.js"); | ||
Object.defineProperty(exports, "Message", { enumerable: true, get: function () { return message_js_1.Message; } }); | ||
var field_js_1 = require("./field.js"); | ||
Object.defineProperty(exports, "ScalarType", { enumerable: true, get: function () { return field_js_1.ScalarType; } }); | ||
var service_type_js_1 = require("./service-type.js"); | ||
Object.defineProperty(exports, "MethodKind", { enumerable: true, get: function () { return service_type_js_1.MethodKind; } }); | ||
Object.defineProperty(exports, "MethodIdempotency", { enumerable: true, get: function () { return service_type_js_1.MethodIdempotency; } }); | ||
var type_registry_js_1 = require("./type-registry.js"); | ||
Object.defineProperty(exports, "TypeRegistry", { enumerable: true, get: function () { return type_registry_js_1.TypeRegistry; } }); | ||
var descriptor_registry_js_1 = require("./descriptor-registry.js"); | ||
Object.defineProperty(exports, "DescriptorRegistry", { enumerable: true, get: function () { return descriptor_registry_js_1.DescriptorRegistry; } }); | ||
var descriptor_set_js_1 = require("./descriptor-set.js"); | ||
Object.defineProperty(exports, "DescriptorSet", { enumerable: true, get: function () { return descriptor_set_js_1.DescriptorSet; } }); | ||
var binary_encoding_js_1 = require("./binary-encoding.js"); | ||
Object.defineProperty(exports, "WireType", { enumerable: true, get: function () { return binary_encoding_js_1.WireType; } }); | ||
Object.defineProperty(exports, "BinaryWriter", { enumerable: true, get: function () { return binary_encoding_js_1.BinaryWriter; } }); | ||
Object.defineProperty(exports, "BinaryReader", { enumerable: true, get: function () { return binary_encoding_js_1.BinaryReader; } }); | ||
var json_format_js_1 = require("./json-format.js"); | ||
// ideally, we would export these types with sub-path exports: | ||
__exportStar(require("./google/protobuf/compiler/plugin_pb.js"), exports); | ||
__exportStar(require("./google/protobuf/api_pb.js"), exports); | ||
__exportStar(require("./google/protobuf/any_pb.js"), exports); | ||
__exportStar(require("./google/protobuf/descriptor_pb.js"), exports); | ||
__exportStar(require("./google/protobuf/duration_pb.js"), exports); | ||
__exportStar(require("./google/protobuf/empty_pb.js"), exports); | ||
__exportStar(require("./google/protobuf/field_mask_pb.js"), exports); | ||
__exportStar(require("./google/protobuf/source_context_pb.js"), exports); | ||
__exportStar(require("./google/protobuf/struct_pb.js"), exports); | ||
__exportStar(require("./google/protobuf/timestamp_pb.js"), exports); | ||
__exportStar(require("./google/protobuf/type_pb.js"), exports); | ||
__exportStar(require("./google/protobuf/wrappers_pb.js"), exports); | ||
// To avoid circular imports when the wkt import from ./index.js, we | ||
// use a separate ./index-runtime.js | ||
__exportStar(require("./index-runtime.js"), exports); | ||
__exportStar(require("./index-wkt.js"), exports); |
@@ -84,3 +84,3 @@ "use strict"; | ||
else { | ||
t[localName] = val instanceof mt ? mt : new mt(val); | ||
t[localName] = val instanceof mt ? val : new mt(val); | ||
} | ||
@@ -87,0 +87,0 @@ } |
@@ -14,3 +14,3 @@ // Copyright 2021-2022 Buf Technologies, Inc. | ||
// limitations under the License. | ||
import { Message, proto3 } from "../../index.js"; | ||
import { Message, proto3 } from "../../index-runtime.js"; | ||
/** | ||
@@ -17,0 +17,0 @@ * `Any` contains an arbitrary serialized protocol buffer message along with a |
@@ -14,3 +14,3 @@ // Copyright 2021-2022 Buf Technologies, Inc. | ||
// limitations under the License. | ||
import { Message, proto3 } from "../../index.js"; | ||
import { Message, proto3 } from "../../index-runtime.js"; | ||
import { Option, Syntax } from "./type_pb.js"; | ||
@@ -17,0 +17,0 @@ import { SourceContext } from "./source_context_pb.js"; |
@@ -14,3 +14,3 @@ // Copyright 2021-2022 Buf Technologies, Inc. | ||
// limitations under the License. | ||
import { Message, proto2 } from "../../../index.js"; | ||
import { Message, proto2 } from "../../../index-runtime.js"; | ||
import { FileDescriptorProto, GeneratedCodeInfo } from "../descriptor_pb.js"; | ||
@@ -17,0 +17,0 @@ /** |
@@ -14,3 +14,3 @@ // Copyright 2021-2022 Buf Technologies, Inc. | ||
// limitations under the License. | ||
import { Message, proto2 } from "../../index.js"; | ||
import { Message, proto2 } from "../../index-runtime.js"; | ||
/** | ||
@@ -17,0 +17,0 @@ * The protocol compiler can output a FileDescriptorSet containing the .proto |
@@ -14,3 +14,3 @@ // Copyright 2021-2022 Buf Technologies, Inc. | ||
// limitations under the License. | ||
import { Message, proto3, protoInt64 } from "../../index.js"; | ||
import { Message, proto3, protoInt64 } from "../../index-runtime.js"; | ||
/** | ||
@@ -17,0 +17,0 @@ * A Duration represents a signed, fixed-length span of time represented |
@@ -14,3 +14,3 @@ // Copyright 2021-2022 Buf Technologies, Inc. | ||
// limitations under the License. | ||
import { Message, proto3 } from "../../index.js"; | ||
import { Message, proto3 } from "../../index-runtime.js"; | ||
/** | ||
@@ -17,0 +17,0 @@ * A generic empty message that you can re-use to avoid defining duplicated |
@@ -14,3 +14,3 @@ // Copyright 2021-2022 Buf Technologies, Inc. | ||
// limitations under the License. | ||
import { Message, proto3 } from "../../index.js"; | ||
import { Message, proto3 } from "../../index-runtime.js"; | ||
/** | ||
@@ -17,0 +17,0 @@ * `FieldMask` represents a set of symbolic field paths, for example: |
@@ -14,3 +14,3 @@ // Copyright 2021-2022 Buf Technologies, Inc. | ||
// limitations under the License. | ||
import { Message, proto3 } from "../../index.js"; | ||
import { Message, proto3 } from "../../index-runtime.js"; | ||
/** | ||
@@ -17,0 +17,0 @@ * `SourceContext` represents information about the source of a |
@@ -14,3 +14,3 @@ // Copyright 2021-2022 Buf Technologies, Inc. | ||
// limitations under the License. | ||
import { Message, proto3 } from "../../index.js"; | ||
import { Message, proto3 } from "../../index-runtime.js"; | ||
/** | ||
@@ -17,0 +17,0 @@ * `NullValue` is a singleton enumeration to represent the null value for the |
@@ -14,3 +14,3 @@ // Copyright 2021-2022 Buf Technologies, Inc. | ||
// limitations under the License. | ||
import { Message, proto3, protoInt64 } from "../../index.js"; | ||
import { Message, proto3, protoInt64 } from "../../index-runtime.js"; | ||
/** | ||
@@ -17,0 +17,0 @@ * A Timestamp represents a point in time independent of any time zone or local |
@@ -14,3 +14,3 @@ // Copyright 2021-2022 Buf Technologies, Inc. | ||
// limitations under the License. | ||
import { Message, proto3 } from "../../index.js"; | ||
import { Message, proto3 } from "../../index-runtime.js"; | ||
import { SourceContext } from "./source_context_pb.js"; | ||
@@ -17,0 +17,0 @@ import { Any } from "./any_pb.js"; |
@@ -14,3 +14,3 @@ // Copyright 2021-2022 Buf Technologies, Inc. | ||
// limitations under the License. | ||
import { Message, ScalarType, proto3, protoInt64 } from "../../index.js"; | ||
import { Message, ScalarType, proto3, protoInt64 } from "../../index-runtime.js"; | ||
/** | ||
@@ -17,0 +17,0 @@ * Wrapper message for `double`. |
@@ -14,26 +14,5 @@ // Copyright 2021-2022 Buf Technologies, Inc. | ||
// limitations under the License. | ||
export { proto3 } from "./proto3.js"; | ||
export { proto2 } from "./proto2.js"; | ||
export { protoInt64 } from "./proto-int64.js"; | ||
export { protoBase64 } from "./proto-base64.js"; | ||
export { Message, } from "./message.js"; | ||
export { ScalarType } from "./field.js"; | ||
export { MethodKind, MethodIdempotency } from "./service-type.js"; | ||
export { TypeRegistry } from "./type-registry.js"; | ||
export { DescriptorRegistry } from "./descriptor-registry.js"; | ||
export { DescriptorSet } from "./descriptor-set.js"; | ||
export { WireType, BinaryWriter, BinaryReader } from "./binary-encoding.js"; | ||
export {} from "./json-format.js"; | ||
// ideally, we would export these types with sub-path exports: | ||
export * from "./google/protobuf/compiler/plugin_pb.js"; | ||
export * from "./google/protobuf/api_pb.js"; | ||
export * from "./google/protobuf/any_pb.js"; | ||
export * from "./google/protobuf/descriptor_pb.js"; | ||
export * from "./google/protobuf/duration_pb.js"; | ||
export * from "./google/protobuf/empty_pb.js"; | ||
export * from "./google/protobuf/field_mask_pb.js"; | ||
export * from "./google/protobuf/source_context_pb.js"; | ||
export * from "./google/protobuf/struct_pb.js"; | ||
export * from "./google/protobuf/timestamp_pb.js"; | ||
export * from "./google/protobuf/type_pb.js"; | ||
export * from "./google/protobuf/wrappers_pb.js"; | ||
// To avoid circular imports when the wkt import from ./index.js, we | ||
// use a separate ./index-runtime.js | ||
export * from "./index-runtime.js"; | ||
export * from "./index-wkt.js"; |
@@ -81,3 +81,3 @@ // Copyright 2021-2022 Buf Technologies, Inc. | ||
else { | ||
t[localName] = val instanceof mt ? mt : new mt(val); | ||
t[localName] = val instanceof mt ? val : new mt(val); | ||
} | ||
@@ -84,0 +84,0 @@ } |
@@ -1,3 +0,3 @@ | ||
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, JsonWriteOptions, MessageType, PartialMessage, PlainMessage } from "../../index.js"; | ||
import { Message } from "../../index.js"; | ||
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, JsonWriteOptions, MessageType, PartialMessage, PlainMessage } from "../../index-runtime.js"; | ||
import { Message } from "../../index-runtime.js"; | ||
/** | ||
@@ -4,0 +4,0 @@ * `Any` contains an arbitrary serialized protocol buffer message along with a |
@@ -1,3 +0,3 @@ | ||
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "../../index.js"; | ||
import { Message } from "../../index.js"; | ||
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "../../index-runtime.js"; | ||
import { Message } from "../../index-runtime.js"; | ||
import { Option, Syntax } from "./type_pb.js"; | ||
@@ -4,0 +4,0 @@ import { SourceContext } from "./source_context_pb.js"; |
@@ -1,3 +0,3 @@ | ||
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "../../../index.js"; | ||
import { Message } from "../../../index.js"; | ||
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "../../../index-runtime.js"; | ||
import { Message } from "../../../index-runtime.js"; | ||
import { FileDescriptorProto, GeneratedCodeInfo } from "../descriptor_pb.js"; | ||
@@ -4,0 +4,0 @@ /** |
@@ -1,3 +0,3 @@ | ||
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, JsonWriteOptions, PartialMessage, PlainMessage } from "../../index.js"; | ||
import { Message } from "../../index.js"; | ||
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, JsonWriteOptions, PartialMessage, PlainMessage } from "../../index-runtime.js"; | ||
import { Message } from "../../index-runtime.js"; | ||
/** | ||
@@ -4,0 +4,0 @@ * A Duration represents a signed, fixed-length span of time represented |
@@ -1,3 +0,3 @@ | ||
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "../../index.js"; | ||
import { Message } from "../../index.js"; | ||
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "../../index-runtime.js"; | ||
import { Message } from "../../index-runtime.js"; | ||
/** | ||
@@ -4,0 +4,0 @@ * A generic empty message that you can re-use to avoid defining duplicated |
@@ -1,3 +0,3 @@ | ||
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, JsonWriteOptions, PartialMessage, PlainMessage } from "../../index.js"; | ||
import { Message } from "../../index.js"; | ||
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, JsonWriteOptions, PartialMessage, PlainMessage } from "../../index-runtime.js"; | ||
import { Message } from "../../index-runtime.js"; | ||
/** | ||
@@ -4,0 +4,0 @@ * `FieldMask` represents a set of symbolic field paths, for example: |
@@ -1,3 +0,3 @@ | ||
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "../../index.js"; | ||
import { Message } from "../../index.js"; | ||
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "../../index-runtime.js"; | ||
import { Message } from "../../index-runtime.js"; | ||
/** | ||
@@ -4,0 +4,0 @@ * `SourceContext` represents information about the source of a |
@@ -1,3 +0,3 @@ | ||
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, JsonWriteOptions, PartialMessage, PlainMessage } from "../../index.js"; | ||
import { Message } from "../../index.js"; | ||
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, JsonWriteOptions, PartialMessage, PlainMessage } from "../../index-runtime.js"; | ||
import { Message } from "../../index-runtime.js"; | ||
/** | ||
@@ -4,0 +4,0 @@ * `NullValue` is a singleton enumeration to represent the null value for the |
@@ -1,3 +0,3 @@ | ||
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, JsonWriteOptions, PartialMessage, PlainMessage } from "../../index.js"; | ||
import { Message } from "../../index.js"; | ||
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, JsonWriteOptions, PartialMessage, PlainMessage } from "../../index-runtime.js"; | ||
import { Message } from "../../index-runtime.js"; | ||
/** | ||
@@ -4,0 +4,0 @@ * A Timestamp represents a point in time independent of any time zone or local |
@@ -1,3 +0,3 @@ | ||
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "../../index.js"; | ||
import { Message } from "../../index.js"; | ||
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "../../index-runtime.js"; | ||
import { Message } from "../../index-runtime.js"; | ||
import { SourceContext } from "./source_context_pb.js"; | ||
@@ -4,0 +4,0 @@ import { Any } from "./any_pb.js"; |
@@ -1,3 +0,3 @@ | ||
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, JsonWriteOptions, PartialMessage, PlainMessage } from "../../index.js"; | ||
import { Message } from "../../index.js"; | ||
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, JsonWriteOptions, PartialMessage, PlainMessage } from "../../index-runtime.js"; | ||
import { Message } from "../../index-runtime.js"; | ||
/** | ||
@@ -4,0 +4,0 @@ * Wrapper message for `double`. |
@@ -1,31 +0,2 @@ | ||
export { proto3 } from "./proto3.js"; | ||
export { proto2 } from "./proto2.js"; | ||
export { protoInt64 } from "./proto-int64.js"; | ||
export { protoBase64 } from "./proto-base64.js"; | ||
export { Message, AnyMessage, PartialMessage, PlainMessage, } from "./message.js"; | ||
export type { FieldInfo } from "./field.js"; | ||
export type { FieldList } from "./field-list.js"; | ||
export { ScalarType } from "./field.js"; | ||
export type { MessageType } from "./message-type.js"; | ||
export type { EnumType, EnumValueInfo } from "./enum.js"; | ||
export type { ServiceType, MethodInfo, MethodInfoUnary, MethodInfoServerStreaming, MethodInfoClientStreaming, MethodInfoBiDiStreaming, } from "./service-type.js"; | ||
export { MethodKind, MethodIdempotency } from "./service-type.js"; | ||
export { TypeRegistry, IMessageTypeRegistry } from "./type-registry.js"; | ||
export { DescriptorRegistry } from "./descriptor-registry.js"; | ||
export { DescriptorSet } from "./descriptor-set.js"; | ||
export { WireType, BinaryWriter, BinaryReader } from "./binary-encoding.js"; | ||
export type { IBinaryReader, IBinaryWriter } from "./binary-encoding.js"; | ||
export type { BinaryFormat, BinaryWriteOptions, BinaryReadOptions, } from "./binary-format.js"; | ||
export { JsonFormat, JsonObject, JsonValue, JsonReadOptions, JsonWriteOptions, JsonWriteStringOptions, } from "./json-format.js"; | ||
export * from "./google/protobuf/compiler/plugin_pb.js"; | ||
export * from "./google/protobuf/api_pb.js"; | ||
export * from "./google/protobuf/any_pb.js"; | ||
export * from "./google/protobuf/descriptor_pb.js"; | ||
export * from "./google/protobuf/duration_pb.js"; | ||
export * from "./google/protobuf/empty_pb.js"; | ||
export * from "./google/protobuf/field_mask_pb.js"; | ||
export * from "./google/protobuf/source_context_pb.js"; | ||
export * from "./google/protobuf/struct_pb.js"; | ||
export * from "./google/protobuf/timestamp_pb.js"; | ||
export * from "./google/protobuf/type_pb.js"; | ||
export * from "./google/protobuf/wrappers_pb.js"; | ||
export * from "./index-runtime.js"; | ||
export * from "./index-wkt.js"; |
@@ -70,5 +70,3 @@ import type { BinaryReadOptions, BinaryWriteOptions } from "./binary-format.js"; | ||
*/ | ||
export declare type PlainMessage<T extends Message> = { | ||
[P in keyof T as T[P] extends Function ? never : P]: T[P]; | ||
}; | ||
export declare type PlainMessage<T extends Message> = Omit<T, keyof Message>; | ||
/** | ||
@@ -75,0 +73,0 @@ * PartialMessage<T> constructs a type from a message. The resulting type |
{ | ||
"name": "@bufbuild/protobuf", | ||
"version": "0.0.2-alpha.3", | ||
"version": "0.0.3", | ||
"license": "(Apache-2.0 AND BSD-3-Clause)", | ||
@@ -25,3 +25,3 @@ "description": "A complete implementation of protocol buffers in TypeScript, suitable for web browsers and Node.js.", | ||
"devDependencies": { | ||
"typescript": "^4.6.3" | ||
"typescript": "^4.6.4" | ||
}, | ||
@@ -28,0 +28,0 @@ "files": [ |
# @bufbuild/protobuf | ||
[![npm](https://img.shields.io/npm/v/@bufbuild/protobuf?style=flat-square)](https://www.npmjs.com/package/@bufbuild/protobuf) | ||
A complete implementation of protocol buffers in TypeScript, | ||
suitable for web browsers and Node.js. | ||
suitable for web browsers and Node.js. | ||
Learn more at [github.com/bufbuild/protobuf-es](https://github.com/bufbuild/protobuf-es). | ||
Learn more at [github.com/bufbuild/protobuf-es](github.com/bufbuild/protobuf-es). | ||
This is the runtime library for the code generator plugin [`protoc-gen-es`](../protoc-gen-es). |
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
900027
152
22998
10