@bufbuild/protobuf 1.9.0 → 2.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/clone.d.ts +6 -0
- package/dist/cjs/clone.js +77 -0
- package/dist/cjs/codegenv1/boot.d.ts +63 -0
- package/dist/cjs/codegenv1/boot.js +102 -0
- package/dist/cjs/codegenv1/embed.d.ts +43 -0
- package/dist/cjs/codegenv1/embed.js +238 -0
- package/dist/cjs/codegenv1/enum.d.ts +17 -0
- package/dist/cjs/codegenv1/enum.js +43 -0
- package/dist/cjs/codegenv1/extension.d.ts +9 -0
- package/dist/cjs/codegenv1/extension.js +29 -0
- package/dist/cjs/codegenv1/file.d.ts +7 -0
- package/dist/cjs/codegenv1/file.js +38 -0
- package/dist/cjs/codegenv1/index.d.ts +9 -0
- package/dist/cjs/codegenv1/index.js +38 -0
- package/dist/cjs/codegenv1/message.d.ts +9 -0
- package/dist/cjs/codegenv1/message.js +25 -0
- package/dist/cjs/codegenv1/restore-json-names.d.ts +2 -0
- package/dist/cjs/codegenv1/restore-json-names.js +27 -0
- package/dist/cjs/codegenv1/service.d.ts +8 -0
- package/dist/cjs/codegenv1/service.js +28 -0
- package/dist/cjs/codegenv1/symbols.d.ts +116 -0
- package/dist/cjs/codegenv1/symbols.js +58 -0
- package/dist/cjs/codegenv1/types.d.ts +19 -0
- package/dist/cjs/codegenv1/types.js +21 -0
- package/dist/cjs/create.d.ts +9 -0
- package/dist/cjs/create.js +242 -0
- package/dist/{esm/descriptor-set.d.ts → cjs/desc-types.d.ts} +144 -242
- package/dist/cjs/equals.d.ts +9 -0
- package/dist/cjs/equals.js +133 -0
- package/dist/cjs/{extension-accessor.d.ts → extensions.d.ts} +11 -7
- package/dist/cjs/extensions.js +138 -0
- package/dist/cjs/fields.d.ts +22 -0
- package/dist/cjs/fields.js +39 -0
- package/dist/cjs/from-binary.d.ts +34 -0
- package/dist/cjs/from-binary.js +221 -0
- package/dist/cjs/from-json.d.ts +48 -0
- package/dist/cjs/from-json.js +614 -0
- package/dist/cjs/index.d.ts +16 -42
- package/dist/cjs/index.js +21 -55
- package/dist/cjs/is-message.d.ts +5 -20
- package/dist/cjs/is-message.js +11 -29
- package/dist/cjs/json-value.d.ts +16 -0
- package/dist/cjs/proto-int64.js +2 -2
- package/dist/cjs/reflect/error.d.ts +9 -0
- package/dist/cjs/reflect/error.js +36 -0
- package/dist/cjs/reflect/guard.d.ts +20 -0
- package/dist/cjs/reflect/guard.js +78 -0
- package/dist/cjs/reflect/index.d.ts +8 -0
- package/dist/cjs/reflect/index.js +41 -0
- package/dist/cjs/reflect/names.d.ts +23 -0
- package/dist/cjs/reflect/names.js +112 -0
- package/dist/cjs/reflect/nested-types.d.ts +2 -0
- package/dist/cjs/reflect/nested-types.js +38 -0
- package/dist/cjs/reflect/reflect-check.d.ts +10 -0
- package/dist/cjs/reflect/reflect-check.js +150 -0
- package/dist/cjs/reflect/reflect-types.d.ts +136 -0
- package/dist/cjs/{extension.js → reflect/reflect-types.js} +1 -0
- package/dist/cjs/reflect/reflect.d.ts +23 -0
- package/dist/cjs/reflect/reflect.js +409 -0
- package/dist/cjs/reflect/registry.d.ts +82 -0
- package/dist/cjs/reflect/registry.js +870 -0
- package/dist/{esm → cjs/reflect}/scalar.d.ts +21 -1
- package/dist/cjs/reflect/scalar.js +298 -0
- package/dist/cjs/reflect/unsafe.d.ts +58 -0
- package/dist/cjs/reflect/unsafe.js +171 -0
- package/dist/cjs/to-binary.d.ts +24 -0
- package/dist/cjs/to-binary.js +194 -0
- package/dist/cjs/to-json.d.ts +50 -0
- package/dist/cjs/to-json.js +384 -0
- package/dist/cjs/types.d.ts +68 -0
- package/dist/cjs/wire/base64-encoding.d.ts +23 -0
- package/dist/cjs/wire/base64-encoding.js +156 -0
- package/dist/cjs/wire/binary-encoding.d.ts +242 -0
- package/dist/cjs/{binary-encoding.js → wire/binary-encoding.js} +11 -10
- package/dist/cjs/wire/index.d.ts +5 -0
- package/dist/cjs/wire/index.js +34 -0
- package/dist/cjs/wire/size-delimited.d.ts +51 -0
- package/dist/cjs/wire/size-delimited.js +154 -0
- package/dist/cjs/wire/text-encoding.d.ts +26 -0
- package/dist/cjs/wire/text-encoding.js +55 -0
- package/dist/cjs/wire/text-format.d.ts +14 -0
- package/dist/cjs/{private → wire}/text-format.js +12 -2
- package/dist/{esm/google → cjs/wire}/varint.d.ts +2 -2
- package/dist/cjs/{google → wire}/varint.js +11 -10
- package/dist/cjs/wkt/any.d.ts +38 -0
- package/dist/cjs/wkt/any.js +76 -0
- package/dist/cjs/{google → wkt/gen/google}/protobuf/any_pb.d.ts +6 -27
- package/dist/cjs/wkt/gen/google/protobuf/any_pb.js +22 -0
- package/dist/cjs/{google → wkt/gen/google}/protobuf/api_pb.d.ts +14 -38
- package/dist/cjs/wkt/gen/google/protobuf/api_pb.js +30 -0
- package/dist/cjs/{google → wkt/gen/google}/protobuf/compiler/plugin_pb.d.ts +47 -77
- package/dist/cjs/wkt/gen/google/protobuf/compiler/plugin_pb.js +55 -0
- package/dist/cjs/{google → wkt/gen/google}/protobuf/descriptor_pb.d.ts +384 -533
- package/dist/cjs/wkt/gen/google/protobuf/descriptor_pb.js +691 -0
- package/dist/{esm → cjs/wkt/gen}/google/protobuf/duration_pb.d.ts +6 -18
- package/dist/cjs/wkt/gen/google/protobuf/duration_pb.js +22 -0
- package/dist/cjs/wkt/gen/google/protobuf/empty_pb.d.ts +17 -0
- package/dist/cjs/wkt/gen/google/protobuf/empty_pb.js +22 -0
- package/dist/{esm → cjs/wkt/gen}/google/protobuf/field_mask_pb.d.ts +6 -18
- package/dist/cjs/{proto-double.js → wkt/gen/google/protobuf/field_mask_pb.js} +7 -14
- package/dist/cjs/wkt/gen/google/protobuf/source_context_pb.d.ts +19 -0
- package/dist/cjs/wkt/gen/google/protobuf/source_context_pb.js +22 -0
- package/dist/{esm → cjs/wkt/gen}/google/protobuf/struct_pb.d.ts +28 -57
- package/dist/cjs/wkt/gen/google/protobuf/struct_pb.js +48 -0
- package/dist/{esm → cjs/wkt/gen}/google/protobuf/timestamp_pb.d.ts +6 -21
- package/dist/cjs/wkt/gen/google/protobuf/timestamp_pb.js +22 -0
- package/dist/{esm → cjs/wkt/gen}/google/protobuf/type_pb.d.ts +47 -82
- package/dist/cjs/wkt/gen/google/protobuf/type_pb.js +223 -0
- package/dist/cjs/wkt/gen/google/protobuf/wrappers_pb.d.ts +147 -0
- package/dist/cjs/wkt/gen/google/protobuf/wrappers_pb.js +46 -0
- package/dist/cjs/wkt/index.d.ts +15 -0
- package/dist/cjs/wkt/index.js +44 -0
- package/dist/cjs/wkt/timestamp.d.ts +21 -0
- package/dist/cjs/wkt/timestamp.js +58 -0
- package/dist/cjs/wkt/wrappers.d.ts +15 -0
- package/dist/cjs/wkt/wrappers.js +43 -0
- package/dist/esm/clone.d.ts +6 -0
- package/dist/esm/clone.js +73 -0
- package/dist/esm/codegenv1/boot.d.ts +63 -0
- package/dist/esm/codegenv1/boot.js +97 -0
- package/dist/esm/codegenv1/embed.d.ts +43 -0
- package/dist/esm/codegenv1/embed.js +232 -0
- package/dist/esm/codegenv1/enum.d.ts +17 -0
- package/dist/esm/codegenv1/enum.js +38 -0
- package/dist/esm/codegenv1/extension.d.ts +9 -0
- package/dist/esm/codegenv1/extension.js +25 -0
- package/dist/esm/codegenv1/file.d.ts +7 -0
- package/dist/esm/codegenv1/file.js +34 -0
- package/dist/esm/codegenv1/index.d.ts +9 -0
- package/dist/esm/codegenv1/index.js +22 -0
- package/dist/esm/codegenv1/message.d.ts +9 -0
- package/dist/esm/codegenv1/message.js +21 -0
- package/dist/esm/codegenv1/restore-json-names.d.ts +2 -0
- package/dist/esm/codegenv1/restore-json-names.js +23 -0
- package/dist/esm/codegenv1/service.d.ts +8 -0
- package/dist/esm/codegenv1/service.js +24 -0
- package/dist/esm/codegenv1/symbols.d.ts +116 -0
- package/dist/esm/codegenv1/symbols.js +55 -0
- package/dist/esm/codegenv1/types.d.ts +19 -0
- package/dist/esm/{field-list.js → codegenv1/types.js} +6 -0
- package/dist/esm/create.d.ts +9 -0
- package/dist/esm/create.js +239 -0
- package/dist/{cjs/descriptor-set.d.ts → esm/desc-types.d.ts} +144 -242
- package/dist/esm/equals.d.ts +9 -0
- package/dist/esm/equals.js +129 -0
- package/dist/esm/{extension-accessor.d.ts → extensions.d.ts} +11 -7
- package/dist/esm/extensions.js +130 -0
- package/dist/esm/fields.d.ts +22 -0
- package/dist/esm/fields.js +34 -0
- package/dist/esm/from-binary.d.ts +34 -0
- package/dist/esm/from-binary.js +215 -0
- package/dist/esm/from-json.d.ts +48 -0
- package/dist/esm/from-json.js +607 -0
- package/dist/esm/index.d.ts +16 -42
- package/dist/esm/index.js +13 -30
- package/dist/esm/is-message.d.ts +5 -20
- package/dist/esm/is-message.js +11 -29
- package/dist/esm/json-value.d.ts +16 -0
- package/dist/esm/proto-int64.js +2 -2
- package/dist/esm/reflect/error.d.ts +9 -0
- package/dist/esm/reflect/error.js +31 -0
- package/dist/esm/reflect/guard.d.ts +20 -0
- package/dist/esm/reflect/guard.js +70 -0
- package/dist/esm/reflect/index.d.ts +8 -0
- package/dist/esm/reflect/index.js +21 -0
- package/dist/esm/reflect/names.d.ts +23 -0
- package/dist/esm/reflect/names.js +106 -0
- package/dist/esm/reflect/nested-types.d.ts +2 -0
- package/dist/esm/reflect/nested-types.js +34 -0
- package/dist/esm/reflect/reflect-check.d.ts +10 -0
- package/dist/esm/reflect/reflect-check.js +143 -0
- package/dist/esm/reflect/reflect-types.d.ts +136 -0
- package/dist/esm/reflect/reflect-types.js +15 -0
- package/dist/esm/reflect/reflect.d.ts +23 -0
- package/dist/esm/reflect/reflect.js +403 -0
- package/dist/esm/reflect/registry.d.ts +82 -0
- package/dist/esm/reflect/registry.js +865 -0
- package/dist/{cjs → esm/reflect}/scalar.d.ts +21 -1
- package/dist/esm/reflect/scalar.js +289 -0
- package/dist/esm/reflect/unsafe.d.ts +58 -0
- package/dist/esm/reflect/unsafe.js +160 -0
- package/dist/esm/to-binary.d.ts +24 -0
- package/dist/esm/to-binary.js +189 -0
- package/dist/esm/to-json.d.ts +50 -0
- package/dist/esm/to-json.js +379 -0
- package/dist/esm/types.d.ts +68 -0
- package/dist/esm/wire/base64-encoding.d.ts +23 -0
- package/dist/esm/wire/base64-encoding.js +151 -0
- package/dist/esm/wire/binary-encoding.d.ts +242 -0
- package/dist/esm/{binary-encoding.js → wire/binary-encoding.js} +11 -10
- package/dist/esm/wire/index.d.ts +5 -0
- package/dist/esm/wire/index.js +18 -0
- package/dist/esm/wire/size-delimited.d.ts +51 -0
- package/dist/esm/wire/size-delimited.js +148 -0
- package/dist/esm/wire/text-encoding.d.ts +26 -0
- package/dist/esm/wire/text-encoding.js +50 -0
- package/dist/esm/wire/text-format.d.ts +14 -0
- package/dist/esm/{private → wire}/text-format.js +12 -2
- package/dist/{cjs/google → esm/wire}/varint.d.ts +2 -2
- package/dist/esm/{google → wire}/varint.js +11 -10
- package/dist/esm/wkt/any.d.ts +38 -0
- package/dist/esm/wkt/any.js +69 -0
- package/dist/esm/{google → wkt/gen/google}/protobuf/any_pb.d.ts +6 -27
- package/dist/esm/wkt/gen/google/protobuf/any_pb.js +19 -0
- package/dist/esm/{google → wkt/gen/google}/protobuf/api_pb.d.ts +14 -38
- package/dist/esm/wkt/gen/google/protobuf/api_pb.js +27 -0
- package/dist/esm/{google → wkt/gen/google}/protobuf/compiler/plugin_pb.d.ts +47 -77
- package/dist/esm/wkt/gen/google/protobuf/compiler/plugin_pb.js +52 -0
- package/dist/esm/{google → wkt/gen/google}/protobuf/descriptor_pb.d.ts +384 -533
- package/dist/esm/wkt/gen/google/protobuf/descriptor_pb.js +687 -0
- package/dist/{cjs → esm/wkt/gen}/google/protobuf/duration_pb.d.ts +6 -18
- package/dist/esm/wkt/gen/google/protobuf/duration_pb.js +19 -0
- package/dist/esm/wkt/gen/google/protobuf/empty_pb.d.ts +17 -0
- package/dist/esm/wkt/gen/google/protobuf/empty_pb.js +19 -0
- package/dist/{cjs → esm/wkt/gen}/google/protobuf/field_mask_pb.d.ts +6 -18
- package/dist/esm/wkt/gen/google/protobuf/field_mask_pb.js +19 -0
- package/dist/esm/wkt/gen/google/protobuf/source_context_pb.d.ts +19 -0
- package/dist/esm/wkt/gen/google/protobuf/source_context_pb.js +19 -0
- package/dist/{cjs → esm/wkt/gen}/google/protobuf/struct_pb.d.ts +28 -57
- package/dist/esm/wkt/gen/google/protobuf/struct_pb.js +45 -0
- package/dist/{cjs → esm/wkt/gen}/google/protobuf/timestamp_pb.d.ts +6 -21
- package/dist/esm/wkt/gen/google/protobuf/timestamp_pb.js +19 -0
- package/dist/{cjs → esm/wkt/gen}/google/protobuf/type_pb.d.ts +47 -82
- package/dist/esm/wkt/gen/google/protobuf/type_pb.js +220 -0
- package/dist/esm/wkt/gen/google/protobuf/wrappers_pb.d.ts +147 -0
- package/dist/esm/wkt/gen/google/protobuf/wrappers_pb.js +43 -0
- package/dist/esm/wkt/index.d.ts +15 -0
- package/dist/esm/wkt/index.js +28 -0
- package/dist/esm/wkt/timestamp.d.ts +21 -0
- package/dist/esm/wkt/timestamp.js +50 -0
- package/dist/esm/wkt/wrappers.d.ts +15 -0
- package/dist/esm/wkt/wrappers.js +38 -0
- package/package.json +37 -5
- package/dist/cjs/binary-encoding.d.ts +0 -420
- package/dist/cjs/binary-format.d.ts +0 -113
- package/dist/cjs/codegen-info.d.ts +0 -33
- package/dist/cjs/codegen-info.js +0 -69
- package/dist/cjs/create-descriptor-set.d.ts +0 -36
- package/dist/cjs/create-descriptor-set.js +0 -910
- package/dist/cjs/create-registry-from-desc.d.ts +0 -15
- package/dist/cjs/create-registry-from-desc.js +0 -264
- package/dist/cjs/create-registry.d.ts +0 -9
- package/dist/cjs/create-registry.js +0 -94
- package/dist/cjs/enum.d.ts +0 -35
- package/dist/cjs/extension-accessor.js +0 -114
- package/dist/cjs/extension.d.ts +0 -24
- package/dist/cjs/field-list.d.ts +0 -27
- package/dist/cjs/field-list.js +0 -15
- package/dist/cjs/field.d.ts +0 -314
- package/dist/cjs/field.js +0 -15
- package/dist/cjs/google/protobuf/any_pb.js +0 -273
- package/dist/cjs/google/protobuf/api_pb.js +0 -316
- package/dist/cjs/google/protobuf/compiler/plugin_pb.js +0 -219
- package/dist/cjs/google/protobuf/descriptor_pb.js +0 -2034
- package/dist/cjs/google/protobuf/duration_pb.js +0 -169
- package/dist/cjs/google/protobuf/empty_pb.d.ts +0 -28
- package/dist/cjs/google/protobuf/empty_pb.js +0 -52
- package/dist/cjs/google/protobuf/field_mask_pb.js +0 -311
- package/dist/cjs/google/protobuf/source_context_pb.d.ts +0 -29
- package/dist/cjs/google/protobuf/source_context_pb.js +0 -55
- package/dist/cjs/google/protobuf/struct_pb.js +0 -240
- package/dist/cjs/google/protobuf/timestamp_pb.js +0 -213
- package/dist/cjs/google/protobuf/type_pb.js +0 -562
- package/dist/cjs/google/protobuf/wrappers_pb.d.ts +0 -267
- package/dist/cjs/google/protobuf/wrappers_pb.js +0 -569
- package/dist/cjs/json-format.d.ts +0 -111
- package/dist/cjs/json-format.js +0 -15
- package/dist/cjs/message-type.d.ts +0 -51
- package/dist/cjs/message-type.js +0 -15
- package/dist/cjs/message.d.ts +0 -131
- package/dist/cjs/message.js +0 -129
- package/dist/cjs/private/binary-format.d.ts +0 -7
- package/dist/cjs/private/binary-format.js +0 -430
- package/dist/cjs/private/enum.d.ts +0 -27
- package/dist/cjs/private/enum.js +0 -94
- package/dist/cjs/private/extensions.d.ts +0 -34
- package/dist/cjs/private/extensions.js +0 -86
- package/dist/cjs/private/feature-set.d.ts +0 -19
- package/dist/cjs/private/feature-set.js +0 -106
- package/dist/cjs/private/field-list.d.ts +0 -18
- package/dist/cjs/private/field-list.js +0 -76
- package/dist/cjs/private/field-normalize.d.ts +0 -9
- package/dist/cjs/private/field-normalize.js +0 -69
- package/dist/cjs/private/field-wrapper.d.ts +0 -25
- package/dist/cjs/private/field-wrapper.js +0 -57
- package/dist/cjs/private/field.d.ts +0 -16
- package/dist/cjs/private/field.js +0 -45
- package/dist/cjs/private/json-format.d.ts +0 -2
- package/dist/cjs/private/json-format.js +0 -626
- package/dist/cjs/private/message-type.d.ts +0 -18
- package/dist/cjs/private/message-type.js +0 -50
- package/dist/cjs/private/names.d.ts +0 -43
- package/dist/cjs/private/names.js +0 -278
- package/dist/cjs/private/options-map.d.ts +0 -7
- package/dist/cjs/private/options-map.js +0 -15
- package/dist/cjs/private/proto-runtime.d.ts +0 -53
- package/dist/cjs/private/proto-runtime.js +0 -41
- package/dist/cjs/private/reflect.d.ts +0 -9
- package/dist/cjs/private/reflect.js +0 -79
- package/dist/cjs/private/reify-wkt.d.ts +0 -102
- package/dist/cjs/private/reify-wkt.js +0 -172
- package/dist/cjs/private/scalars.d.ts +0 -18
- package/dist/cjs/private/scalars.js +0 -105
- package/dist/cjs/private/text-format.d.ts +0 -4
- package/dist/cjs/private/util-common.d.ts +0 -2
- package/dist/cjs/private/util-common.js +0 -237
- package/dist/cjs/private/util.d.ts +0 -38
- package/dist/cjs/private/util.js +0 -15
- package/dist/cjs/proto-base64.d.ts +0 -18
- package/dist/cjs/proto-base64.js +0 -128
- package/dist/cjs/proto-delimited.d.ts +0 -54
- package/dist/cjs/proto-delimited.js +0 -155
- package/dist/cjs/proto-double.d.ts +0 -5
- package/dist/cjs/proto2.d.ts +0 -4
- package/dist/cjs/proto2.js +0 -53
- package/dist/cjs/proto3.d.ts +0 -4
- package/dist/cjs/proto3.js +0 -56
- package/dist/cjs/scalar.js +0 -81
- package/dist/cjs/service-type.d.ts +0 -96
- package/dist/cjs/service-type.js +0 -53
- package/dist/cjs/to-plain-message.d.ts +0 -12
- package/dist/cjs/to-plain-message.js +0 -72
- package/dist/cjs/type-registry.d.ts +0 -57
- package/dist/cjs/type-registry.js +0 -15
- package/dist/esm/binary-encoding.d.ts +0 -420
- package/dist/esm/binary-format.d.ts +0 -113
- package/dist/esm/codegen-info.d.ts +0 -33
- package/dist/esm/codegen-info.js +0 -67
- package/dist/esm/create-descriptor-set.d.ts +0 -36
- package/dist/esm/create-descriptor-set.js +0 -906
- package/dist/esm/create-registry-from-desc.d.ts +0 -15
- package/dist/esm/create-registry-from-desc.js +0 -261
- package/dist/esm/create-registry.d.ts +0 -9
- package/dist/esm/create-registry.js +0 -90
- package/dist/esm/descriptor-set.js +0 -14
- package/dist/esm/enum.d.ts +0 -35
- package/dist/esm/extension-accessor.js +0 -107
- package/dist/esm/extension.d.ts +0 -24
- package/dist/esm/field-list.d.ts +0 -27
- package/dist/esm/field.d.ts +0 -314
- package/dist/esm/field.js +0 -14
- package/dist/esm/google/protobuf/any_pb.js +0 -269
- package/dist/esm/google/protobuf/api_pb.js +0 -310
- package/dist/esm/google/protobuf/compiler/plugin_pb.js +0 -212
- package/dist/esm/google/protobuf/descriptor_pb.js +0 -1999
- package/dist/esm/google/protobuf/duration_pb.js +0 -165
- package/dist/esm/google/protobuf/empty_pb.d.ts +0 -28
- package/dist/esm/google/protobuf/empty_pb.js +0 -48
- package/dist/esm/google/protobuf/field_mask_pb.js +0 -307
- package/dist/esm/google/protobuf/source_context_pb.d.ts +0 -29
- package/dist/esm/google/protobuf/source_context_pb.js +0 -51
- package/dist/esm/google/protobuf/struct_pb.js +0 -234
- package/dist/esm/google/protobuf/timestamp_pb.js +0 -209
- package/dist/esm/google/protobuf/type_pb.js +0 -554
- package/dist/esm/google/protobuf/wrappers_pb.d.ts +0 -267
- package/dist/esm/google/protobuf/wrappers_pb.js +0 -557
- package/dist/esm/json-format.d.ts +0 -111
- package/dist/esm/json-format.js +0 -14
- package/dist/esm/message-type.d.ts +0 -51
- package/dist/esm/message-type.js +0 -14
- package/dist/esm/message.d.ts +0 -131
- package/dist/esm/message.js +0 -125
- package/dist/esm/private/binary-format.d.ts +0 -7
- package/dist/esm/private/binary-format.js +0 -426
- package/dist/esm/private/enum.d.ts +0 -27
- package/dist/esm/private/enum.js +0 -87
- package/dist/esm/private/extensions.d.ts +0 -34
- package/dist/esm/private/extensions.js +0 -81
- package/dist/esm/private/feature-set.d.ts +0 -19
- package/dist/esm/private/feature-set.js +0 -102
- package/dist/esm/private/field-list.d.ts +0 -18
- package/dist/esm/private/field-list.js +0 -72
- package/dist/esm/private/field-normalize.d.ts +0 -9
- package/dist/esm/private/field-normalize.js +0 -65
- package/dist/esm/private/field-wrapper.d.ts +0 -25
- package/dist/esm/private/field-wrapper.js +0 -53
- package/dist/esm/private/field.d.ts +0 -16
- package/dist/esm/private/field.js +0 -41
- package/dist/esm/private/json-format.d.ts +0 -2
- package/dist/esm/private/json-format.js +0 -623
- package/dist/esm/private/message-type.d.ts +0 -18
- package/dist/esm/private/message-type.js +0 -46
- package/dist/esm/private/names.d.ts +0 -43
- package/dist/esm/private/names.js +0 -269
- package/dist/esm/private/options-map.d.ts +0 -7
- package/dist/esm/private/options-map.js +0 -14
- package/dist/esm/private/proto-runtime.d.ts +0 -53
- package/dist/esm/private/proto-runtime.js +0 -37
- package/dist/esm/private/reflect.d.ts +0 -9
- package/dist/esm/private/reflect.js +0 -74
- package/dist/esm/private/reify-wkt.d.ts +0 -102
- package/dist/esm/private/reify-wkt.js +0 -168
- package/dist/esm/private/scalars.d.ts +0 -18
- package/dist/esm/private/scalars.js +0 -99
- package/dist/esm/private/text-format.d.ts +0 -4
- package/dist/esm/private/util-common.d.ts +0 -2
- package/dist/esm/private/util-common.js +0 -234
- package/dist/esm/private/util.d.ts +0 -38
- package/dist/esm/private/util.js +0 -14
- package/dist/esm/proto-base64.d.ts +0 -18
- package/dist/esm/proto-base64.js +0 -125
- package/dist/esm/proto-delimited.d.ts +0 -54
- package/dist/esm/proto-delimited.js +0 -152
- package/dist/esm/proto-double.d.ts +0 -5
- package/dist/esm/proto-double.js +0 -26
- package/dist/esm/proto2.d.ts +0 -4
- package/dist/esm/proto2.js +0 -50
- package/dist/esm/proto3.d.ts +0 -4
- package/dist/esm/proto3.js +0 -53
- package/dist/esm/scalar.js +0 -78
- package/dist/esm/service-type.d.ts +0 -96
- package/dist/esm/service-type.js +0 -50
- package/dist/esm/to-plain-message.d.ts +0 -12
- package/dist/esm/to-plain-message.js +0 -70
- package/dist/esm/type-registry.d.ts +0 -57
- package/dist/esm/type-registry.js +0 -14
- /package/dist/cjs/{binary-format.js → desc-types.js} +0 -0
- /package/dist/cjs/{descriptor-set.js → json-value.js} +0 -0
- /package/dist/cjs/{private → reflect}/assert.d.ts +0 -0
- /package/dist/cjs/{private → reflect}/assert.js +0 -0
- /package/dist/cjs/{enum.js → types.js} +0 -0
- /package/dist/esm/{binary-format.js → desc-types.js} +0 -0
- /package/dist/esm/{enum.js → json-value.js} +0 -0
- /package/dist/esm/{private → reflect}/assert.d.ts +0 -0
- /package/dist/esm/{private → reflect}/assert.js +0 -0
- /package/dist/esm/{extension.js → types.js} +0 -0
|
@@ -1,569 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Copyright 2021-2024 Buf Technologies, Inc.
|
|
3
|
-
//
|
|
4
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
// you may not use this file except in compliance with the License.
|
|
6
|
-
// You may obtain a copy of the License at
|
|
7
|
-
//
|
|
8
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
//
|
|
10
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
// See the License for the specific language governing permissions and
|
|
14
|
-
// limitations under the License.
|
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.BytesValue = exports.StringValue = exports.BoolValue = exports.UInt32Value = exports.Int32Value = exports.UInt64Value = exports.Int64Value = exports.FloatValue = exports.DoubleValue = void 0;
|
|
17
|
-
const message_js_1 = require("../../message.js");
|
|
18
|
-
const proto3_js_1 = require("../../proto3.js");
|
|
19
|
-
const scalar_js_1 = require("../../scalar.js");
|
|
20
|
-
const proto_int64_js_1 = require("../../proto-int64.js");
|
|
21
|
-
/**
|
|
22
|
-
* Wrapper message for `double`.
|
|
23
|
-
*
|
|
24
|
-
* The JSON representation for `DoubleValue` is JSON number.
|
|
25
|
-
*
|
|
26
|
-
* @generated from message google.protobuf.DoubleValue
|
|
27
|
-
*/
|
|
28
|
-
class DoubleValue extends message_js_1.Message {
|
|
29
|
-
constructor(data) {
|
|
30
|
-
super();
|
|
31
|
-
/**
|
|
32
|
-
* The double value.
|
|
33
|
-
*
|
|
34
|
-
* @generated from field: double value = 1;
|
|
35
|
-
*/
|
|
36
|
-
this.value = 0;
|
|
37
|
-
proto3_js_1.proto3.util.initPartial(data, this);
|
|
38
|
-
}
|
|
39
|
-
toJson(options) {
|
|
40
|
-
return proto3_js_1.proto3.json.writeScalar(scalar_js_1.ScalarType.DOUBLE, this.value, true);
|
|
41
|
-
}
|
|
42
|
-
fromJson(json, options) {
|
|
43
|
-
try {
|
|
44
|
-
this.value = proto3_js_1.proto3.json.readScalar(scalar_js_1.ScalarType.DOUBLE, json);
|
|
45
|
-
}
|
|
46
|
-
catch (e) {
|
|
47
|
-
let m = `cannot decode message google.protobuf.DoubleValue from JSON"`;
|
|
48
|
-
if (e instanceof Error && e.message.length > 0) {
|
|
49
|
-
m += `: ${e.message}`;
|
|
50
|
-
}
|
|
51
|
-
throw new Error(m);
|
|
52
|
-
}
|
|
53
|
-
return this;
|
|
54
|
-
}
|
|
55
|
-
static fromBinary(bytes, options) {
|
|
56
|
-
return new DoubleValue().fromBinary(bytes, options);
|
|
57
|
-
}
|
|
58
|
-
static fromJson(jsonValue, options) {
|
|
59
|
-
return new DoubleValue().fromJson(jsonValue, options);
|
|
60
|
-
}
|
|
61
|
-
static fromJsonString(jsonString, options) {
|
|
62
|
-
return new DoubleValue().fromJsonString(jsonString, options);
|
|
63
|
-
}
|
|
64
|
-
static equals(a, b) {
|
|
65
|
-
return proto3_js_1.proto3.util.equals(DoubleValue, a, b);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
exports.DoubleValue = DoubleValue;
|
|
69
|
-
DoubleValue.runtime = proto3_js_1.proto3;
|
|
70
|
-
DoubleValue.typeName = "google.protobuf.DoubleValue";
|
|
71
|
-
DoubleValue.fields = proto3_js_1.proto3.util.newFieldList(() => [
|
|
72
|
-
{ no: 1, name: "value", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ },
|
|
73
|
-
]);
|
|
74
|
-
DoubleValue.fieldWrapper = {
|
|
75
|
-
wrapField(value) {
|
|
76
|
-
return new DoubleValue({ value });
|
|
77
|
-
},
|
|
78
|
-
unwrapField(value) {
|
|
79
|
-
return value.value;
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
/**
|
|
83
|
-
* Wrapper message for `float`.
|
|
84
|
-
*
|
|
85
|
-
* The JSON representation for `FloatValue` is JSON number.
|
|
86
|
-
*
|
|
87
|
-
* @generated from message google.protobuf.FloatValue
|
|
88
|
-
*/
|
|
89
|
-
class FloatValue extends message_js_1.Message {
|
|
90
|
-
constructor(data) {
|
|
91
|
-
super();
|
|
92
|
-
/**
|
|
93
|
-
* The float value.
|
|
94
|
-
*
|
|
95
|
-
* @generated from field: float value = 1;
|
|
96
|
-
*/
|
|
97
|
-
this.value = 0;
|
|
98
|
-
proto3_js_1.proto3.util.initPartial(data, this);
|
|
99
|
-
}
|
|
100
|
-
toJson(options) {
|
|
101
|
-
return proto3_js_1.proto3.json.writeScalar(scalar_js_1.ScalarType.FLOAT, this.value, true);
|
|
102
|
-
}
|
|
103
|
-
fromJson(json, options) {
|
|
104
|
-
try {
|
|
105
|
-
this.value = proto3_js_1.proto3.json.readScalar(scalar_js_1.ScalarType.FLOAT, json);
|
|
106
|
-
}
|
|
107
|
-
catch (e) {
|
|
108
|
-
let m = `cannot decode message google.protobuf.FloatValue from JSON"`;
|
|
109
|
-
if (e instanceof Error && e.message.length > 0) {
|
|
110
|
-
m += `: ${e.message}`;
|
|
111
|
-
}
|
|
112
|
-
throw new Error(m);
|
|
113
|
-
}
|
|
114
|
-
return this;
|
|
115
|
-
}
|
|
116
|
-
static fromBinary(bytes, options) {
|
|
117
|
-
return new FloatValue().fromBinary(bytes, options);
|
|
118
|
-
}
|
|
119
|
-
static fromJson(jsonValue, options) {
|
|
120
|
-
return new FloatValue().fromJson(jsonValue, options);
|
|
121
|
-
}
|
|
122
|
-
static fromJsonString(jsonString, options) {
|
|
123
|
-
return new FloatValue().fromJsonString(jsonString, options);
|
|
124
|
-
}
|
|
125
|
-
static equals(a, b) {
|
|
126
|
-
return proto3_js_1.proto3.util.equals(FloatValue, a, b);
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
exports.FloatValue = FloatValue;
|
|
130
|
-
FloatValue.runtime = proto3_js_1.proto3;
|
|
131
|
-
FloatValue.typeName = "google.protobuf.FloatValue";
|
|
132
|
-
FloatValue.fields = proto3_js_1.proto3.util.newFieldList(() => [
|
|
133
|
-
{ no: 1, name: "value", kind: "scalar", T: 2 /* ScalarType.FLOAT */ },
|
|
134
|
-
]);
|
|
135
|
-
FloatValue.fieldWrapper = {
|
|
136
|
-
wrapField(value) {
|
|
137
|
-
return new FloatValue({ value });
|
|
138
|
-
},
|
|
139
|
-
unwrapField(value) {
|
|
140
|
-
return value.value;
|
|
141
|
-
}
|
|
142
|
-
};
|
|
143
|
-
/**
|
|
144
|
-
* Wrapper message for `int64`.
|
|
145
|
-
*
|
|
146
|
-
* The JSON representation for `Int64Value` is JSON string.
|
|
147
|
-
*
|
|
148
|
-
* @generated from message google.protobuf.Int64Value
|
|
149
|
-
*/
|
|
150
|
-
class Int64Value extends message_js_1.Message {
|
|
151
|
-
constructor(data) {
|
|
152
|
-
super();
|
|
153
|
-
/**
|
|
154
|
-
* The int64 value.
|
|
155
|
-
*
|
|
156
|
-
* @generated from field: int64 value = 1;
|
|
157
|
-
*/
|
|
158
|
-
this.value = proto_int64_js_1.protoInt64.zero;
|
|
159
|
-
proto3_js_1.proto3.util.initPartial(data, this);
|
|
160
|
-
}
|
|
161
|
-
toJson(options) {
|
|
162
|
-
return proto3_js_1.proto3.json.writeScalar(scalar_js_1.ScalarType.INT64, this.value, true);
|
|
163
|
-
}
|
|
164
|
-
fromJson(json, options) {
|
|
165
|
-
try {
|
|
166
|
-
this.value = proto3_js_1.proto3.json.readScalar(scalar_js_1.ScalarType.INT64, json);
|
|
167
|
-
}
|
|
168
|
-
catch (e) {
|
|
169
|
-
let m = `cannot decode message google.protobuf.Int64Value from JSON"`;
|
|
170
|
-
if (e instanceof Error && e.message.length > 0) {
|
|
171
|
-
m += `: ${e.message}`;
|
|
172
|
-
}
|
|
173
|
-
throw new Error(m);
|
|
174
|
-
}
|
|
175
|
-
return this;
|
|
176
|
-
}
|
|
177
|
-
static fromBinary(bytes, options) {
|
|
178
|
-
return new Int64Value().fromBinary(bytes, options);
|
|
179
|
-
}
|
|
180
|
-
static fromJson(jsonValue, options) {
|
|
181
|
-
return new Int64Value().fromJson(jsonValue, options);
|
|
182
|
-
}
|
|
183
|
-
static fromJsonString(jsonString, options) {
|
|
184
|
-
return new Int64Value().fromJsonString(jsonString, options);
|
|
185
|
-
}
|
|
186
|
-
static equals(a, b) {
|
|
187
|
-
return proto3_js_1.proto3.util.equals(Int64Value, a, b);
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
exports.Int64Value = Int64Value;
|
|
191
|
-
Int64Value.runtime = proto3_js_1.proto3;
|
|
192
|
-
Int64Value.typeName = "google.protobuf.Int64Value";
|
|
193
|
-
Int64Value.fields = proto3_js_1.proto3.util.newFieldList(() => [
|
|
194
|
-
{ no: 1, name: "value", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
|
|
195
|
-
]);
|
|
196
|
-
Int64Value.fieldWrapper = {
|
|
197
|
-
wrapField(value) {
|
|
198
|
-
return new Int64Value({ value });
|
|
199
|
-
},
|
|
200
|
-
unwrapField(value) {
|
|
201
|
-
return value.value;
|
|
202
|
-
}
|
|
203
|
-
};
|
|
204
|
-
/**
|
|
205
|
-
* Wrapper message for `uint64`.
|
|
206
|
-
*
|
|
207
|
-
* The JSON representation for `UInt64Value` is JSON string.
|
|
208
|
-
*
|
|
209
|
-
* @generated from message google.protobuf.UInt64Value
|
|
210
|
-
*/
|
|
211
|
-
class UInt64Value extends message_js_1.Message {
|
|
212
|
-
constructor(data) {
|
|
213
|
-
super();
|
|
214
|
-
/**
|
|
215
|
-
* The uint64 value.
|
|
216
|
-
*
|
|
217
|
-
* @generated from field: uint64 value = 1;
|
|
218
|
-
*/
|
|
219
|
-
this.value = proto_int64_js_1.protoInt64.zero;
|
|
220
|
-
proto3_js_1.proto3.util.initPartial(data, this);
|
|
221
|
-
}
|
|
222
|
-
toJson(options) {
|
|
223
|
-
return proto3_js_1.proto3.json.writeScalar(scalar_js_1.ScalarType.UINT64, this.value, true);
|
|
224
|
-
}
|
|
225
|
-
fromJson(json, options) {
|
|
226
|
-
try {
|
|
227
|
-
this.value = proto3_js_1.proto3.json.readScalar(scalar_js_1.ScalarType.UINT64, json);
|
|
228
|
-
}
|
|
229
|
-
catch (e) {
|
|
230
|
-
let m = `cannot decode message google.protobuf.UInt64Value from JSON"`;
|
|
231
|
-
if (e instanceof Error && e.message.length > 0) {
|
|
232
|
-
m += `: ${e.message}`;
|
|
233
|
-
}
|
|
234
|
-
throw new Error(m);
|
|
235
|
-
}
|
|
236
|
-
return this;
|
|
237
|
-
}
|
|
238
|
-
static fromBinary(bytes, options) {
|
|
239
|
-
return new UInt64Value().fromBinary(bytes, options);
|
|
240
|
-
}
|
|
241
|
-
static fromJson(jsonValue, options) {
|
|
242
|
-
return new UInt64Value().fromJson(jsonValue, options);
|
|
243
|
-
}
|
|
244
|
-
static fromJsonString(jsonString, options) {
|
|
245
|
-
return new UInt64Value().fromJsonString(jsonString, options);
|
|
246
|
-
}
|
|
247
|
-
static equals(a, b) {
|
|
248
|
-
return proto3_js_1.proto3.util.equals(UInt64Value, a, b);
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
exports.UInt64Value = UInt64Value;
|
|
252
|
-
UInt64Value.runtime = proto3_js_1.proto3;
|
|
253
|
-
UInt64Value.typeName = "google.protobuf.UInt64Value";
|
|
254
|
-
UInt64Value.fields = proto3_js_1.proto3.util.newFieldList(() => [
|
|
255
|
-
{ no: 1, name: "value", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
|
|
256
|
-
]);
|
|
257
|
-
UInt64Value.fieldWrapper = {
|
|
258
|
-
wrapField(value) {
|
|
259
|
-
return new UInt64Value({ value });
|
|
260
|
-
},
|
|
261
|
-
unwrapField(value) {
|
|
262
|
-
return value.value;
|
|
263
|
-
}
|
|
264
|
-
};
|
|
265
|
-
/**
|
|
266
|
-
* Wrapper message for `int32`.
|
|
267
|
-
*
|
|
268
|
-
* The JSON representation for `Int32Value` is JSON number.
|
|
269
|
-
*
|
|
270
|
-
* @generated from message google.protobuf.Int32Value
|
|
271
|
-
*/
|
|
272
|
-
class Int32Value extends message_js_1.Message {
|
|
273
|
-
constructor(data) {
|
|
274
|
-
super();
|
|
275
|
-
/**
|
|
276
|
-
* The int32 value.
|
|
277
|
-
*
|
|
278
|
-
* @generated from field: int32 value = 1;
|
|
279
|
-
*/
|
|
280
|
-
this.value = 0;
|
|
281
|
-
proto3_js_1.proto3.util.initPartial(data, this);
|
|
282
|
-
}
|
|
283
|
-
toJson(options) {
|
|
284
|
-
return proto3_js_1.proto3.json.writeScalar(scalar_js_1.ScalarType.INT32, this.value, true);
|
|
285
|
-
}
|
|
286
|
-
fromJson(json, options) {
|
|
287
|
-
try {
|
|
288
|
-
this.value = proto3_js_1.proto3.json.readScalar(scalar_js_1.ScalarType.INT32, json);
|
|
289
|
-
}
|
|
290
|
-
catch (e) {
|
|
291
|
-
let m = `cannot decode message google.protobuf.Int32Value from JSON"`;
|
|
292
|
-
if (e instanceof Error && e.message.length > 0) {
|
|
293
|
-
m += `: ${e.message}`;
|
|
294
|
-
}
|
|
295
|
-
throw new Error(m);
|
|
296
|
-
}
|
|
297
|
-
return this;
|
|
298
|
-
}
|
|
299
|
-
static fromBinary(bytes, options) {
|
|
300
|
-
return new Int32Value().fromBinary(bytes, options);
|
|
301
|
-
}
|
|
302
|
-
static fromJson(jsonValue, options) {
|
|
303
|
-
return new Int32Value().fromJson(jsonValue, options);
|
|
304
|
-
}
|
|
305
|
-
static fromJsonString(jsonString, options) {
|
|
306
|
-
return new Int32Value().fromJsonString(jsonString, options);
|
|
307
|
-
}
|
|
308
|
-
static equals(a, b) {
|
|
309
|
-
return proto3_js_1.proto3.util.equals(Int32Value, a, b);
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
|
-
exports.Int32Value = Int32Value;
|
|
313
|
-
Int32Value.runtime = proto3_js_1.proto3;
|
|
314
|
-
Int32Value.typeName = "google.protobuf.Int32Value";
|
|
315
|
-
Int32Value.fields = proto3_js_1.proto3.util.newFieldList(() => [
|
|
316
|
-
{ no: 1, name: "value", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
|
|
317
|
-
]);
|
|
318
|
-
Int32Value.fieldWrapper = {
|
|
319
|
-
wrapField(value) {
|
|
320
|
-
return new Int32Value({ value });
|
|
321
|
-
},
|
|
322
|
-
unwrapField(value) {
|
|
323
|
-
return value.value;
|
|
324
|
-
}
|
|
325
|
-
};
|
|
326
|
-
/**
|
|
327
|
-
* Wrapper message for `uint32`.
|
|
328
|
-
*
|
|
329
|
-
* The JSON representation for `UInt32Value` is JSON number.
|
|
330
|
-
*
|
|
331
|
-
* @generated from message google.protobuf.UInt32Value
|
|
332
|
-
*/
|
|
333
|
-
class UInt32Value extends message_js_1.Message {
|
|
334
|
-
constructor(data) {
|
|
335
|
-
super();
|
|
336
|
-
/**
|
|
337
|
-
* The uint32 value.
|
|
338
|
-
*
|
|
339
|
-
* @generated from field: uint32 value = 1;
|
|
340
|
-
*/
|
|
341
|
-
this.value = 0;
|
|
342
|
-
proto3_js_1.proto3.util.initPartial(data, this);
|
|
343
|
-
}
|
|
344
|
-
toJson(options) {
|
|
345
|
-
return proto3_js_1.proto3.json.writeScalar(scalar_js_1.ScalarType.UINT32, this.value, true);
|
|
346
|
-
}
|
|
347
|
-
fromJson(json, options) {
|
|
348
|
-
try {
|
|
349
|
-
this.value = proto3_js_1.proto3.json.readScalar(scalar_js_1.ScalarType.UINT32, json);
|
|
350
|
-
}
|
|
351
|
-
catch (e) {
|
|
352
|
-
let m = `cannot decode message google.protobuf.UInt32Value from JSON"`;
|
|
353
|
-
if (e instanceof Error && e.message.length > 0) {
|
|
354
|
-
m += `: ${e.message}`;
|
|
355
|
-
}
|
|
356
|
-
throw new Error(m);
|
|
357
|
-
}
|
|
358
|
-
return this;
|
|
359
|
-
}
|
|
360
|
-
static fromBinary(bytes, options) {
|
|
361
|
-
return new UInt32Value().fromBinary(bytes, options);
|
|
362
|
-
}
|
|
363
|
-
static fromJson(jsonValue, options) {
|
|
364
|
-
return new UInt32Value().fromJson(jsonValue, options);
|
|
365
|
-
}
|
|
366
|
-
static fromJsonString(jsonString, options) {
|
|
367
|
-
return new UInt32Value().fromJsonString(jsonString, options);
|
|
368
|
-
}
|
|
369
|
-
static equals(a, b) {
|
|
370
|
-
return proto3_js_1.proto3.util.equals(UInt32Value, a, b);
|
|
371
|
-
}
|
|
372
|
-
}
|
|
373
|
-
exports.UInt32Value = UInt32Value;
|
|
374
|
-
UInt32Value.runtime = proto3_js_1.proto3;
|
|
375
|
-
UInt32Value.typeName = "google.protobuf.UInt32Value";
|
|
376
|
-
UInt32Value.fields = proto3_js_1.proto3.util.newFieldList(() => [
|
|
377
|
-
{ no: 1, name: "value", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
|
|
378
|
-
]);
|
|
379
|
-
UInt32Value.fieldWrapper = {
|
|
380
|
-
wrapField(value) {
|
|
381
|
-
return new UInt32Value({ value });
|
|
382
|
-
},
|
|
383
|
-
unwrapField(value) {
|
|
384
|
-
return value.value;
|
|
385
|
-
}
|
|
386
|
-
};
|
|
387
|
-
/**
|
|
388
|
-
* Wrapper message for `bool`.
|
|
389
|
-
*
|
|
390
|
-
* The JSON representation for `BoolValue` is JSON `true` and `false`.
|
|
391
|
-
*
|
|
392
|
-
* @generated from message google.protobuf.BoolValue
|
|
393
|
-
*/
|
|
394
|
-
class BoolValue extends message_js_1.Message {
|
|
395
|
-
constructor(data) {
|
|
396
|
-
super();
|
|
397
|
-
/**
|
|
398
|
-
* The bool value.
|
|
399
|
-
*
|
|
400
|
-
* @generated from field: bool value = 1;
|
|
401
|
-
*/
|
|
402
|
-
this.value = false;
|
|
403
|
-
proto3_js_1.proto3.util.initPartial(data, this);
|
|
404
|
-
}
|
|
405
|
-
toJson(options) {
|
|
406
|
-
return proto3_js_1.proto3.json.writeScalar(scalar_js_1.ScalarType.BOOL, this.value, true);
|
|
407
|
-
}
|
|
408
|
-
fromJson(json, options) {
|
|
409
|
-
try {
|
|
410
|
-
this.value = proto3_js_1.proto3.json.readScalar(scalar_js_1.ScalarType.BOOL, json);
|
|
411
|
-
}
|
|
412
|
-
catch (e) {
|
|
413
|
-
let m = `cannot decode message google.protobuf.BoolValue from JSON"`;
|
|
414
|
-
if (e instanceof Error && e.message.length > 0) {
|
|
415
|
-
m += `: ${e.message}`;
|
|
416
|
-
}
|
|
417
|
-
throw new Error(m);
|
|
418
|
-
}
|
|
419
|
-
return this;
|
|
420
|
-
}
|
|
421
|
-
static fromBinary(bytes, options) {
|
|
422
|
-
return new BoolValue().fromBinary(bytes, options);
|
|
423
|
-
}
|
|
424
|
-
static fromJson(jsonValue, options) {
|
|
425
|
-
return new BoolValue().fromJson(jsonValue, options);
|
|
426
|
-
}
|
|
427
|
-
static fromJsonString(jsonString, options) {
|
|
428
|
-
return new BoolValue().fromJsonString(jsonString, options);
|
|
429
|
-
}
|
|
430
|
-
static equals(a, b) {
|
|
431
|
-
return proto3_js_1.proto3.util.equals(BoolValue, a, b);
|
|
432
|
-
}
|
|
433
|
-
}
|
|
434
|
-
exports.BoolValue = BoolValue;
|
|
435
|
-
BoolValue.runtime = proto3_js_1.proto3;
|
|
436
|
-
BoolValue.typeName = "google.protobuf.BoolValue";
|
|
437
|
-
BoolValue.fields = proto3_js_1.proto3.util.newFieldList(() => [
|
|
438
|
-
{ no: 1, name: "value", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
|
|
439
|
-
]);
|
|
440
|
-
BoolValue.fieldWrapper = {
|
|
441
|
-
wrapField(value) {
|
|
442
|
-
return new BoolValue({ value });
|
|
443
|
-
},
|
|
444
|
-
unwrapField(value) {
|
|
445
|
-
return value.value;
|
|
446
|
-
}
|
|
447
|
-
};
|
|
448
|
-
/**
|
|
449
|
-
* Wrapper message for `string`.
|
|
450
|
-
*
|
|
451
|
-
* The JSON representation for `StringValue` is JSON string.
|
|
452
|
-
*
|
|
453
|
-
* @generated from message google.protobuf.StringValue
|
|
454
|
-
*/
|
|
455
|
-
class StringValue extends message_js_1.Message {
|
|
456
|
-
constructor(data) {
|
|
457
|
-
super();
|
|
458
|
-
/**
|
|
459
|
-
* The string value.
|
|
460
|
-
*
|
|
461
|
-
* @generated from field: string value = 1;
|
|
462
|
-
*/
|
|
463
|
-
this.value = "";
|
|
464
|
-
proto3_js_1.proto3.util.initPartial(data, this);
|
|
465
|
-
}
|
|
466
|
-
toJson(options) {
|
|
467
|
-
return proto3_js_1.proto3.json.writeScalar(scalar_js_1.ScalarType.STRING, this.value, true);
|
|
468
|
-
}
|
|
469
|
-
fromJson(json, options) {
|
|
470
|
-
try {
|
|
471
|
-
this.value = proto3_js_1.proto3.json.readScalar(scalar_js_1.ScalarType.STRING, json);
|
|
472
|
-
}
|
|
473
|
-
catch (e) {
|
|
474
|
-
let m = `cannot decode message google.protobuf.StringValue from JSON"`;
|
|
475
|
-
if (e instanceof Error && e.message.length > 0) {
|
|
476
|
-
m += `: ${e.message}`;
|
|
477
|
-
}
|
|
478
|
-
throw new Error(m);
|
|
479
|
-
}
|
|
480
|
-
return this;
|
|
481
|
-
}
|
|
482
|
-
static fromBinary(bytes, options) {
|
|
483
|
-
return new StringValue().fromBinary(bytes, options);
|
|
484
|
-
}
|
|
485
|
-
static fromJson(jsonValue, options) {
|
|
486
|
-
return new StringValue().fromJson(jsonValue, options);
|
|
487
|
-
}
|
|
488
|
-
static fromJsonString(jsonString, options) {
|
|
489
|
-
return new StringValue().fromJsonString(jsonString, options);
|
|
490
|
-
}
|
|
491
|
-
static equals(a, b) {
|
|
492
|
-
return proto3_js_1.proto3.util.equals(StringValue, a, b);
|
|
493
|
-
}
|
|
494
|
-
}
|
|
495
|
-
exports.StringValue = StringValue;
|
|
496
|
-
StringValue.runtime = proto3_js_1.proto3;
|
|
497
|
-
StringValue.typeName = "google.protobuf.StringValue";
|
|
498
|
-
StringValue.fields = proto3_js_1.proto3.util.newFieldList(() => [
|
|
499
|
-
{ no: 1, name: "value", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
500
|
-
]);
|
|
501
|
-
StringValue.fieldWrapper = {
|
|
502
|
-
wrapField(value) {
|
|
503
|
-
return new StringValue({ value });
|
|
504
|
-
},
|
|
505
|
-
unwrapField(value) {
|
|
506
|
-
return value.value;
|
|
507
|
-
}
|
|
508
|
-
};
|
|
509
|
-
/**
|
|
510
|
-
* Wrapper message for `bytes`.
|
|
511
|
-
*
|
|
512
|
-
* The JSON representation for `BytesValue` is JSON string.
|
|
513
|
-
*
|
|
514
|
-
* @generated from message google.protobuf.BytesValue
|
|
515
|
-
*/
|
|
516
|
-
class BytesValue extends message_js_1.Message {
|
|
517
|
-
constructor(data) {
|
|
518
|
-
super();
|
|
519
|
-
/**
|
|
520
|
-
* The bytes value.
|
|
521
|
-
*
|
|
522
|
-
* @generated from field: bytes value = 1;
|
|
523
|
-
*/
|
|
524
|
-
this.value = new Uint8Array(0);
|
|
525
|
-
proto3_js_1.proto3.util.initPartial(data, this);
|
|
526
|
-
}
|
|
527
|
-
toJson(options) {
|
|
528
|
-
return proto3_js_1.proto3.json.writeScalar(scalar_js_1.ScalarType.BYTES, this.value, true);
|
|
529
|
-
}
|
|
530
|
-
fromJson(json, options) {
|
|
531
|
-
try {
|
|
532
|
-
this.value = proto3_js_1.proto3.json.readScalar(scalar_js_1.ScalarType.BYTES, json);
|
|
533
|
-
}
|
|
534
|
-
catch (e) {
|
|
535
|
-
let m = `cannot decode message google.protobuf.BytesValue from JSON"`;
|
|
536
|
-
if (e instanceof Error && e.message.length > 0) {
|
|
537
|
-
m += `: ${e.message}`;
|
|
538
|
-
}
|
|
539
|
-
throw new Error(m);
|
|
540
|
-
}
|
|
541
|
-
return this;
|
|
542
|
-
}
|
|
543
|
-
static fromBinary(bytes, options) {
|
|
544
|
-
return new BytesValue().fromBinary(bytes, options);
|
|
545
|
-
}
|
|
546
|
-
static fromJson(jsonValue, options) {
|
|
547
|
-
return new BytesValue().fromJson(jsonValue, options);
|
|
548
|
-
}
|
|
549
|
-
static fromJsonString(jsonString, options) {
|
|
550
|
-
return new BytesValue().fromJsonString(jsonString, options);
|
|
551
|
-
}
|
|
552
|
-
static equals(a, b) {
|
|
553
|
-
return proto3_js_1.proto3.util.equals(BytesValue, a, b);
|
|
554
|
-
}
|
|
555
|
-
}
|
|
556
|
-
exports.BytesValue = BytesValue;
|
|
557
|
-
BytesValue.runtime = proto3_js_1.proto3;
|
|
558
|
-
BytesValue.typeName = "google.protobuf.BytesValue";
|
|
559
|
-
BytesValue.fields = proto3_js_1.proto3.util.newFieldList(() => [
|
|
560
|
-
{ no: 1, name: "value", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
|
|
561
|
-
]);
|
|
562
|
-
BytesValue.fieldWrapper = {
|
|
563
|
-
wrapField(value) {
|
|
564
|
-
return new BytesValue({ value });
|
|
565
|
-
},
|
|
566
|
-
unwrapField(value) {
|
|
567
|
-
return value.value;
|
|
568
|
-
}
|
|
569
|
-
};
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import type { Message } from "./message.js";
|
|
2
|
-
import type { MessageType } from "./message-type.js";
|
|
3
|
-
import type { ScalarType, LongType } from "./scalar.js";
|
|
4
|
-
import type { IExtensionRegistry, IMessageTypeRegistry } from "./type-registry.js";
|
|
5
|
-
/**
|
|
6
|
-
* JsonFormat is the contract for serializing messages to and from JSON.
|
|
7
|
-
* Implementations may be specific to a proto syntax, and can be reflection
|
|
8
|
-
* based, or delegate to speed optimized generated code.
|
|
9
|
-
*/
|
|
10
|
-
export interface JsonFormat {
|
|
11
|
-
/**
|
|
12
|
-
* Provide options for parsing JSON data.
|
|
13
|
-
*/
|
|
14
|
-
makeReadOptions(options?: Partial<JsonReadOptions>): Readonly<JsonReadOptions>;
|
|
15
|
-
/**
|
|
16
|
-
* Provide options for serializing to JSON.
|
|
17
|
-
*/
|
|
18
|
-
makeWriteOptions(options?: Partial<JsonWriteStringOptions>): Readonly<JsonWriteStringOptions>;
|
|
19
|
-
/**
|
|
20
|
-
* Parse a message from JSON.
|
|
21
|
-
*/
|
|
22
|
-
readMessage<T extends Message<T>>(type: MessageType<T>, jsonValue: JsonValue, options: JsonReadOptions, message?: T): T;
|
|
23
|
-
/**
|
|
24
|
-
* Serialize a message to JSON.
|
|
25
|
-
*/
|
|
26
|
-
writeMessage(message: Message, options: JsonWriteOptions): JsonValue;
|
|
27
|
-
/**
|
|
28
|
-
* Parse a single scalar value from JSON.
|
|
29
|
-
*
|
|
30
|
-
* This method may throw an error, but it may have a blank error message.
|
|
31
|
-
* Callers are expected to provide context.
|
|
32
|
-
*/
|
|
33
|
-
readScalar(type: ScalarType, json: JsonValue, longType?: LongType): any;
|
|
34
|
-
/**
|
|
35
|
-
* Serialize a single scalar value to JSON.
|
|
36
|
-
*/
|
|
37
|
-
writeScalar(type: ScalarType, value: any, emitDefaultValues: boolean): JsonValue | undefined;
|
|
38
|
-
/**
|
|
39
|
-
* Returns a short string representation of a JSON value, suitable for error messages.
|
|
40
|
-
*/
|
|
41
|
-
debug(json: JsonValue): string;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Options for parsing JSON data.
|
|
45
|
-
*/
|
|
46
|
-
export interface JsonReadOptions {
|
|
47
|
-
/**
|
|
48
|
-
* Ignore unknown fields: Proto3 JSON parser should reject unknown fields
|
|
49
|
-
* by default. This option ignores unknown fields in parsing, as well as
|
|
50
|
-
* unrecognized enum string representations.
|
|
51
|
-
*/
|
|
52
|
-
ignoreUnknownFields: boolean;
|
|
53
|
-
/**
|
|
54
|
-
* This option is required to read `google.protobuf.Any` and extensions
|
|
55
|
-
* from JSON format.
|
|
56
|
-
*/
|
|
57
|
-
typeRegistry?: IMessageTypeRegistry & Partial<IExtensionRegistry>;
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Options for serializing to JSON.
|
|
61
|
-
*/
|
|
62
|
-
export interface JsonWriteOptions {
|
|
63
|
-
/**
|
|
64
|
-
* Emit fields with default values: Fields with default values are omitted
|
|
65
|
-
* by default in proto3 JSON output. This option overrides this behavior
|
|
66
|
-
* and outputs fields with their default values.
|
|
67
|
-
*/
|
|
68
|
-
emitDefaultValues: boolean;
|
|
69
|
-
/**
|
|
70
|
-
* Emit enum values as integers instead of strings: The name of an enum
|
|
71
|
-
* value is used by default in JSON output. An option may be provided to
|
|
72
|
-
* use the numeric value of the enum value instead.
|
|
73
|
-
*/
|
|
74
|
-
enumAsInteger: boolean;
|
|
75
|
-
/**
|
|
76
|
-
* Use proto field name instead of lowerCamelCase name: By default proto3
|
|
77
|
-
* JSON printer should convert the field name to lowerCamelCase and use
|
|
78
|
-
* that as the JSON name. An implementation may provide an option to use
|
|
79
|
-
* proto field name as the JSON name instead. Proto3 JSON parsers are
|
|
80
|
-
* required to accept both the converted lowerCamelCase name and the proto
|
|
81
|
-
* field name.
|
|
82
|
-
*/
|
|
83
|
-
useProtoFieldName: boolean;
|
|
84
|
-
/**
|
|
85
|
-
* This option is required to write `google.protobuf.Any` and extensions
|
|
86
|
-
* to JSON format.
|
|
87
|
-
*/
|
|
88
|
-
typeRegistry?: IMessageTypeRegistry & Partial<IExtensionRegistry>;
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* Options for serializing to JSON.
|
|
92
|
-
*/
|
|
93
|
-
export interface JsonWriteStringOptions extends JsonWriteOptions {
|
|
94
|
-
prettySpaces: number;
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* Represents any possible JSON value:
|
|
98
|
-
* - number
|
|
99
|
-
* - string
|
|
100
|
-
* - boolean
|
|
101
|
-
* - null
|
|
102
|
-
* - object (with any JSON value as property)
|
|
103
|
-
* - array (with any JSON value as element)
|
|
104
|
-
*/
|
|
105
|
-
export type JsonValue = number | string | boolean | null | JsonObject | JsonValue[];
|
|
106
|
-
/**
|
|
107
|
-
* Represents a JSON object.
|
|
108
|
-
*/
|
|
109
|
-
export type JsonObject = {
|
|
110
|
-
[k: string]: JsonValue;
|
|
111
|
-
};
|
package/dist/cjs/json-format.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Copyright 2021-2024 Buf Technologies, Inc.
|
|
3
|
-
//
|
|
4
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
// you may not use this file except in compliance with the License.
|
|
6
|
-
// You may obtain a copy of the License at
|
|
7
|
-
//
|
|
8
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
//
|
|
10
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
// See the License for the specific language governing permissions and
|
|
14
|
-
// limitations under the License.
|
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|