Skip to content

Commit

Permalink
chore: new owl bot post processor docker image (#507)
Browse files Browse the repository at this point in the history
gcr.io/repo-automation-bots/owlbot-nodejs:latest@sha256:f93bb861d6f12574437bb9aee426b71eafd63b419669ff0ed029f4b7e7162e3f
  • Loading branch information
gcf-owl-bot[bot] authored May 10, 2021
1 parent e13950f commit 73baa90
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 61 deletions.
18 changes: 9 additions & 9 deletions packages/google-cloud-texttospeech/protos/protos.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 18 additions & 18 deletions packages/google-cloud-texttospeech/protos/protos.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -200,13 +200,14 @@ export class TextToSpeechClient {
const textToSpeechStubMethods = ['listVoices', 'synthesizeSpeech'];
for (const methodName of textToSpeechStubMethods) {
const callPromise = this.textToSpeechStub.then(
stub => (...args: Array<{}>) => {
if (this._terminated) {
return Promise.reject('The client has already been closed.');
}
const func = stub[methodName];
return func.apply(stub, args);
},
stub =>
(...args: Array<{}>) => {
if (this._terminated) {
return Promise.reject('The client has already been closed.');
}
const func = stub[methodName];
return func.apply(stub, args);
},
(err: Error | null | undefined) => () => {
throw err;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,13 +200,14 @@ export class TextToSpeechClient {
const textToSpeechStubMethods = ['listVoices', 'synthesizeSpeech'];
for (const methodName of textToSpeechStubMethods) {
const callPromise = this.textToSpeechStub.then(
stub => (...args: Array<{}>) => {
if (this._terminated) {
return Promise.reject('The client has already been closed.');
}
const func = stub[methodName];
return func.apply(stub, args);
},
stub =>
(...args: Array<{}>) => {
if (this._terminated) {
return Promise.reject('The client has already been closed.');
}
const func = stub[methodName];
return func.apply(stub, args);
},
(err: Error | null | undefined) => () => {
throw err;
}
Expand Down
17 changes: 7 additions & 10 deletions packages/google-cloud-texttospeech/test/gapic_text_to_speech_v1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@ import * as texttospeechModule from '../src';
import {protobuf} from 'google-gax';

function generateSampleMessage<T extends object>(instance: T) {
const filledObject = (instance.constructor as typeof protobuf.Message).toObject(
instance as protobuf.Message<T>,
{defaults: true}
);
const filledObject = (
instance.constructor as typeof protobuf.Message
).toObject(instance as protobuf.Message<T>, {defaults: true});
return (instance.constructor as typeof protobuf.Message).fromObject(
filledObject
) as T;
Expand Down Expand Up @@ -168,9 +167,8 @@ describe('v1.TextToSpeechClient', () => {
const expectedResponse = generateSampleMessage(
new protos.google.cloud.texttospeech.v1.ListVoicesResponse()
);
client.innerApiCalls.listVoices = stubSimpleCallWithCallback(
expectedResponse
);
client.innerApiCalls.listVoices =
stubSimpleCallWithCallback(expectedResponse);
const promise = new Promise((resolve, reject) => {
client.listVoices(
request,
Expand Down Expand Up @@ -256,9 +254,8 @@ describe('v1.TextToSpeechClient', () => {
const expectedResponse = generateSampleMessage(
new protos.google.cloud.texttospeech.v1.SynthesizeSpeechResponse()
);
client.innerApiCalls.synthesizeSpeech = stubSimpleCallWithCallback(
expectedResponse
);
client.innerApiCalls.synthesizeSpeech =
stubSimpleCallWithCallback(expectedResponse);
const promise = new Promise((resolve, reject) => {
client.synthesizeSpeech(
request,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@ import * as texttospeechModule from '../src';
import {protobuf} from 'google-gax';

function generateSampleMessage<T extends object>(instance: T) {
const filledObject = (instance.constructor as typeof protobuf.Message).toObject(
instance as protobuf.Message<T>,
{defaults: true}
);
const filledObject = (
instance.constructor as typeof protobuf.Message
).toObject(instance as protobuf.Message<T>, {defaults: true});
return (instance.constructor as typeof protobuf.Message).fromObject(
filledObject
) as T;
Expand Down Expand Up @@ -170,9 +169,8 @@ describe('v1beta1.TextToSpeechClient', () => {
const expectedResponse = generateSampleMessage(
new protos.google.cloud.texttospeech.v1beta1.ListVoicesResponse()
);
client.innerApiCalls.listVoices = stubSimpleCallWithCallback(
expectedResponse
);
client.innerApiCalls.listVoices =
stubSimpleCallWithCallback(expectedResponse);
const promise = new Promise((resolve, reject) => {
client.listVoices(
request,
Expand Down Expand Up @@ -258,9 +256,8 @@ describe('v1beta1.TextToSpeechClient', () => {
const expectedResponse = generateSampleMessage(
new protos.google.cloud.texttospeech.v1beta1.SynthesizeSpeechResponse()
);
client.innerApiCalls.synthesizeSpeech = stubSimpleCallWithCallback(
expectedResponse
);
client.innerApiCalls.synthesizeSpeech =
stubSimpleCallWithCallback(expectedResponse);
const promise = new Promise((resolve, reject) => {
client.synthesizeSpeech(
request,
Expand Down

0 comments on commit 73baa90

Please sign in to comment.