@bufbuild/protobuf 1.2.0 → 1.2.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/google/protobuf/any_pb.js +4 -4
- package/dist/cjs/google/protobuf/api_pb.js +4 -4
- package/dist/cjs/google/protobuf/compiler/plugin_pb.js +4 -4
- package/dist/cjs/google/protobuf/descriptor_pb.js +106 -28
- package/dist/cjs/google/protobuf/duration_pb.js +1 -1
- package/dist/cjs/google/protobuf/empty_pb.js +1 -1
- package/dist/cjs/google/protobuf/field_mask_pb.js +2 -2
- package/dist/cjs/google/protobuf/source_context_pb.js +1 -1
- package/dist/cjs/google/protobuf/struct_pb.js +5 -5
- package/dist/cjs/google/protobuf/timestamp_pb.js +2 -2
- package/dist/cjs/google/protobuf/type_pb.js +27 -6
- package/dist/cjs/google/protobuf/wrappers_pb.js +9 -9
- package/dist/cjs/index.js +0 -3
- package/dist/cjs/private/binary-format-common.js +44 -6
- package/dist/cjs/proto-base64.js +2 -10
- package/dist/esm/create-descriptor-set.js +1 -1
- package/dist/esm/google/protobuf/any_pb.js +5 -4
- package/dist/esm/google/protobuf/api_pb.js +7 -4
- package/dist/esm/google/protobuf/compiler/plugin_pb.js +8 -4
- package/dist/esm/google/protobuf/descriptor_pb.js +132 -27
- package/dist/esm/google/protobuf/duration_pb.js +2 -1
- package/dist/esm/google/protobuf/empty_pb.js +2 -1
- package/dist/esm/google/protobuf/field_mask_pb.js +3 -2
- package/dist/esm/google/protobuf/source_context_pb.js +2 -1
- package/dist/esm/google/protobuf/struct_pb.js +8 -5
- package/dist/esm/google/protobuf/timestamp_pb.js +3 -2
- package/dist/esm/google/protobuf/type_pb.js +32 -6
- package/dist/esm/google/protobuf/wrappers_pb.js +18 -9
- package/dist/esm/index.js +1 -4
- package/dist/esm/private/binary-format-common.js +45 -7
- package/dist/esm/private/message-type.js +1 -1
- package/dist/esm/private/util-common.js +1 -1
- package/dist/esm/proto-base64.js +2 -10
- package/dist/types/google/protobuf/any_pb.d.ts +3 -3
- package/dist/types/google/protobuf/api_pb.d.ts +1 -1
- package/dist/types/google/protobuf/descriptor_pb.d.ts +107 -3
- package/dist/types/google/protobuf/struct_pb.d.ts +1 -1
- package/dist/types/google/protobuf/timestamp_pb.d.ts +1 -1
- package/dist/types/google/protobuf/type_pb.d.ts +19 -1
- package/dist/types/index.d.ts +5 -4
- package/dist/types/private/binary-format-common.d.ts +3 -2
- package/dist/types/private/json-format-common.d.ts +2 -1
- package/dist/types/private/message-type.d.ts +2 -1
- package/dist/types/private/scalars.d.ts +2 -1
- package/dist/types/proto-base64.d.ts +1 -9
- package/package.json +2 -2
|
@@ -23,7 +23,13 @@ export declare enum Syntax {
|
|
|
23
23
|
*
|
|
24
24
|
* @generated from enum value: SYNTAX_PROTO3 = 1;
|
|
25
25
|
*/
|
|
26
|
-
PROTO3 = 1
|
|
26
|
+
PROTO3 = 1,
|
|
27
|
+
/**
|
|
28
|
+
* Syntax `editions`.
|
|
29
|
+
*
|
|
30
|
+
* @generated from enum value: SYNTAX_EDITIONS = 2;
|
|
31
|
+
*/
|
|
32
|
+
EDITIONS = 2
|
|
27
33
|
}
|
|
28
34
|
/**
|
|
29
35
|
* A protocol buffer message type.
|
|
@@ -67,6 +73,12 @@ export declare class Type extends Message<Type> {
|
|
|
67
73
|
* @generated from field: google.protobuf.Syntax syntax = 6;
|
|
68
74
|
*/
|
|
69
75
|
syntax: Syntax;
|
|
76
|
+
/**
|
|
77
|
+
* The source edition string, only valid when syntax is SYNTAX_EDITIONS.
|
|
78
|
+
*
|
|
79
|
+
* @generated from field: string edition = 7;
|
|
80
|
+
*/
|
|
81
|
+
edition: string;
|
|
70
82
|
constructor(data?: PartialMessage<Type>);
|
|
71
83
|
static readonly runtime: typeof proto3;
|
|
72
84
|
static readonly typeName = "google.protobuf.Type";
|
|
@@ -341,6 +353,12 @@ export declare class Enum extends Message<Enum> {
|
|
|
341
353
|
* @generated from field: google.protobuf.Syntax syntax = 5;
|
|
342
354
|
*/
|
|
343
355
|
syntax: Syntax;
|
|
356
|
+
/**
|
|
357
|
+
* The source edition string, only valid when syntax is SYNTAX_EDITIONS.
|
|
358
|
+
*
|
|
359
|
+
* @generated from field: string edition = 6;
|
|
360
|
+
*/
|
|
361
|
+
edition: string;
|
|
344
362
|
constructor(data?: PartialMessage<Enum>);
|
|
345
363
|
static readonly runtime: typeof proto3;
|
|
346
364
|
static readonly typeName = "google.protobuf.Enum";
|
package/dist/types/index.d.ts
CHANGED
|
@@ -4,7 +4,8 @@ export { protoInt64 } from "./proto-int64.js";
|
|
|
4
4
|
export { protoBase64 } from "./proto-base64.js";
|
|
5
5
|
export { protoDelimited } from "./proto-delimited.js";
|
|
6
6
|
export { codegenInfo } from "./codegen-info.js";
|
|
7
|
-
export { Message
|
|
7
|
+
export { Message } from "./message.js";
|
|
8
|
+
export type { AnyMessage, PartialMessage, PlainMessage } from "./message.js";
|
|
8
9
|
export type { FieldInfo } from "./field.js";
|
|
9
10
|
export type { FieldList } from "./field-list.js";
|
|
10
11
|
export { ScalarType } from "./field.js";
|
|
@@ -15,10 +16,10 @@ export { MethodKind, MethodIdempotency } from "./service-type.js";
|
|
|
15
16
|
export { WireType, BinaryWriter, BinaryReader } from "./binary-encoding.js";
|
|
16
17
|
export type { IBinaryReader, IBinaryWriter } from "./binary-encoding.js";
|
|
17
18
|
export type { BinaryFormat, BinaryWriteOptions, BinaryReadOptions, } from "./binary-format.js";
|
|
18
|
-
export { JsonFormat, JsonObject, JsonValue, JsonReadOptions, JsonWriteOptions, JsonWriteStringOptions, } from "./json-format.js";
|
|
19
|
-
export { DescriptorSet, AnyDesc, DescFile, DescEnum, DescEnumValue, DescMessage, DescOneof, DescField, DescService, DescMethod, DescExtension, DescComments, } from "./descriptor-set.js";
|
|
19
|
+
export type { JsonFormat, JsonObject, JsonValue, JsonReadOptions, JsonWriteOptions, JsonWriteStringOptions, } from "./json-format.js";
|
|
20
|
+
export type { DescriptorSet, AnyDesc, DescFile, DescEnum, DescEnumValue, DescMessage, DescOneof, DescField, DescService, DescMethod, DescExtension, DescComments, } from "./descriptor-set.js";
|
|
20
21
|
export { createDescriptorSet } from "./create-descriptor-set.js";
|
|
21
|
-
export { IMessageTypeRegistry } from "./type-registry.js";
|
|
22
|
+
export type { IMessageTypeRegistry } from "./type-registry.js";
|
|
22
23
|
export { createRegistry } from "./create-registry.js";
|
|
23
24
|
export { createRegistryFromDescriptors } from "./create-registry-from-desc.js";
|
|
24
25
|
export * from "./google/protobuf/compiler/plugin_pb.js";
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { IBinaryWriter } from "../binary-encoding.js";
|
|
1
|
+
import type { IBinaryWriter } from "../binary-encoding.js";
|
|
2
2
|
import type { BinaryWriteOptions } from "../binary-format.js";
|
|
3
3
|
import type { BinaryFormat } from "../binary-format.js";
|
|
4
|
-
import {
|
|
4
|
+
import { ScalarType } from "../field.js";
|
|
5
|
+
import type { FieldInfo } from "../field.js";
|
|
5
6
|
import type { MessageType } from "../message-type.js";
|
|
6
7
|
export declare function makeBinaryFormatCommon(): Omit<BinaryFormat, "writeMessage">;
|
|
7
8
|
export declare function writeMapEntry(writer: IBinaryWriter, options: BinaryWriteOptions, field: FieldInfo & {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { JsonFormat, JsonValue, JsonWriteOptions } from "../json-format.js";
|
|
2
|
-
import {
|
|
2
|
+
import { ScalarType } from "../field.js";
|
|
3
|
+
import type { FieldInfo } from "../field.js";
|
|
3
4
|
import type { EnumType } from "../enum.js";
|
|
4
5
|
type JsonFormatWriteFieldFn = (field: FieldInfo, value: any, options: JsonWriteOptions) => JsonValue | undefined;
|
|
5
6
|
export declare function makeJsonFormatCommon(makeWriteField: (writeEnumFn: typeof writeEnum, writeScalarFn: typeof writeScalar) => JsonFormatWriteFieldFn): JsonFormat;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Message } from "../message.js";
|
|
2
|
+
import type { AnyMessage } from "../message.js";
|
|
2
3
|
import type { FieldListSource } from "./field-list.js";
|
|
3
4
|
import type { MessageType } from "../message-type.js";
|
|
4
5
|
import type { ProtoRuntime } from "./proto-runtime.js";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ScalarType } from "../field.js";
|
|
2
|
-
import { IBinaryWriter
|
|
2
|
+
import type { IBinaryWriter } from "../binary-encoding.js";
|
|
3
|
+
import { WireType } from "../binary-encoding.js";
|
|
3
4
|
/**
|
|
4
5
|
* Returns true if both scalar values are equal.
|
|
5
6
|
*/
|
|
@@ -12,15 +12,7 @@ export declare const protoBase64: {
|
|
|
12
12
|
*/
|
|
13
13
|
readonly dec: (base64Str: string) => Uint8Array;
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* - ignores white-space, including line breaks and tabs
|
|
18
|
-
* - allows inner padding (can decode concatenated base64 strings)
|
|
19
|
-
* - does not require padding
|
|
20
|
-
* - understands base64url encoding:
|
|
21
|
-
* "-" instead of "+",
|
|
22
|
-
* "_" instead of "/",
|
|
23
|
-
* no padding
|
|
15
|
+
* Encode a byte array to a base64 string.
|
|
24
16
|
*/
|
|
25
17
|
readonly enc: (bytes: Uint8Array) => string;
|
|
26
18
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bufbuild/protobuf",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"license": "(Apache-2.0 AND BSD-3-Clause)",
|
|
5
5
|
"description": "A complete implementation of Protocol Buffers in TypeScript, suitable for web browsers and Node.js.",
|
|
6
6
|
"repository": {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"clean": "rm -rf ./dist/cjs/* ./dist/esm/* ./dist/types/*",
|
|
14
14
|
"build": "npm run build:cjs && npm run build:esm+types",
|
|
15
15
|
"build:cjs": "../../node_modules/typescript/bin/tsc --project tsconfig.json --module commonjs --outDir ./dist/cjs && echo >./dist/cjs/package.json '{\"type\":\"commonjs\"}'",
|
|
16
|
-
"build:esm+types": "../../node_modules/typescript/bin/tsc --project tsconfig.json --module ES2015 --outDir ./dist/esm --declaration --declarationDir ./dist/types"
|
|
16
|
+
"build:esm+types": "../../node_modules/typescript/bin/tsc --project tsconfig.json --module ES2015 --verbatimModuleSyntax --outDir ./dist/esm --declaration --declarationDir ./dist/types"
|
|
17
17
|
},
|
|
18
18
|
"main": "./dist/cjs/index.js",
|
|
19
19
|
"type": "module",
|