Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump the ts-proto group in /impl/ts-proto with 3 updates #199

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions impl/ts-proto/gen/conformance/conformance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,7 @@ export const JspbEncodingConfig = {
};

function bytesFromBase64(b64: string): Uint8Array {
if (globalThis.Buffer) {
if ((globalThis as any).Buffer) {
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
} else {
const bin = globalThis.atob(b64);
Expand All @@ -786,7 +786,7 @@ function bytesFromBase64(b64: string): Uint8Array {
}

function base64FromBytes(arr: Uint8Array): string {
if (globalThis.Buffer) {
if ((globalThis as any).Buffer) {
return globalThis.Buffer.from(arr).toString("base64");
} else {
const bin: string[] = [];
Expand Down
4 changes: 2 additions & 2 deletions impl/ts-proto/gen/google/protobuf/any.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ export const Any = {
};

function bytesFromBase64(b64: string): Uint8Array {
if (globalThis.Buffer) {
if ((globalThis as any).Buffer) {
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
} else {
const bin = globalThis.atob(b64);
Expand All @@ -214,7 +214,7 @@ function bytesFromBase64(b64: string): Uint8Array {
}

function base64FromBytes(arr: Uint8Array): string {
if (globalThis.Buffer) {
if ((globalThis as any).Buffer) {
return globalThis.Buffer.from(arr).toString("base64");
} else {
const bin: string[] = [];
Expand Down
13 changes: 8 additions & 5 deletions impl/ts-proto/gen/google/protobuf/struct.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,19 +163,22 @@ export const Struct = {

wrap(object: { [key: string]: any } | undefined): Struct {
const struct = createBaseStruct();

if (object !== undefined) {
Object.keys(object).forEach((key) => {
for (const key of Object.keys(object)) {
struct.fields.set(key, object[key]);
});
}
}
return struct;
},

unwrap(message: Struct): { [key: string]: any } {
const object: { [key: string]: any } = {};
[...message.fields.keys()].forEach((key) => {
object[key] = message.fields.get(key);
});
if (message.fields) {
for (const key of message.fields.keys()) {
object[key] = message.fields.get(key);
}
}
return object;
},
};
Expand Down
4 changes: 2 additions & 2 deletions impl/ts-proto/gen/google/protobuf/test_messages_proto2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7171,7 +7171,7 @@ export const TestAllRequiredTypesProto2_MessageSetCorrectExtension2 = {
};

function bytesFromBase64(b64: string): Uint8Array {
if (globalThis.Buffer) {
if ((globalThis as any).Buffer) {
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
} else {
const bin = globalThis.atob(b64);
Expand All @@ -7184,7 +7184,7 @@ function bytesFromBase64(b64: string): Uint8Array {
}

function base64FromBytes(arr: Uint8Array): string {
if (globalThis.Buffer) {
if ((globalThis as any).Buffer) {
return globalThis.Buffer.from(arr).toString("base64");
} else {
const bin: string[] = [];
Expand Down
4 changes: 2 additions & 2 deletions impl/ts-proto/gen/google/protobuf/test_messages_proto3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5761,7 +5761,7 @@ export const EnumOnlyProto3 = {
};

function bytesFromBase64(b64: string): Uint8Array {
if (globalThis.Buffer) {
if ((globalThis as any).Buffer) {
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
} else {
const bin = globalThis.atob(b64);
Expand All @@ -5774,7 +5774,7 @@ function bytesFromBase64(b64: string): Uint8Array {
}

function base64FromBytes(arr: Uint8Array): string {
if (globalThis.Buffer) {
if ((globalThis as any).Buffer) {
return globalThis.Buffer.from(arr).toString("base64");
} else {
const bin: string[] = [];
Expand Down
4 changes: 2 additions & 2 deletions impl/ts-proto/gen/google/protobuf/wrappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ export const BytesValue = {
};

function bytesFromBase64(b64: string): Uint8Array {
if (globalThis.Buffer) {
if ((globalThis as any).Buffer) {
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
} else {
const bin = globalThis.atob(b64);
Expand All @@ -621,7 +621,7 @@ function bytesFromBase64(b64: string): Uint8Array {
}

function base64FromBytes(arr: Uint8Array): string {
if (globalThis.Buffer) {
if ((globalThis as any).Buffer) {
return globalThis.Buffer.from(arr).toString("base64");
} else {
const bin: string[] = [];
Expand Down
Loading
Loading