Skip to content

Commit

Permalink
chore: update synth.py to use new option (#301)
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaozhenliu-gg5 authored and alexander-fenster committed Nov 20, 2019
1 parent f29a2fc commit 5d50361
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -322,9 +322,10 @@ export class TextToSpeechClient {
): Promise<
[
protosTypes.google.cloud.texttospeech.v1.ISynthesizeSpeechResponse,

(
| protosTypes.google.cloud.texttospeech.v1.ISynthesizeSpeechRequest
| undefined,
| undefined
),
{} | undefined
]
>;
Expand Down Expand Up @@ -375,9 +376,10 @@ export class TextToSpeechClient {
): Promise<
[
protosTypes.google.cloud.texttospeech.v1.ISynthesizeSpeechResponse,

(
| protosTypes.google.cloud.texttospeech.v1.ISynthesizeSpeechRequest
| undefined,
| undefined
),
{} | undefined
]
> | void {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,9 +250,10 @@ export class TextToSpeechClient {
): Promise<
[
protosTypes.google.cloud.texttospeech.v1beta1.IListVoicesResponse,

(
| protosTypes.google.cloud.texttospeech.v1beta1.IListVoicesRequest
| undefined,
| undefined
),
{} | undefined
]
>;
Expand Down Expand Up @@ -305,9 +306,10 @@ export class TextToSpeechClient {
): Promise<
[
protosTypes.google.cloud.texttospeech.v1beta1.IListVoicesResponse,

(
| protosTypes.google.cloud.texttospeech.v1beta1.IListVoicesRequest
| undefined,
| undefined
),
{} | undefined
]
> | void {
Expand All @@ -328,9 +330,10 @@ export class TextToSpeechClient {
): Promise<
[
protosTypes.google.cloud.texttospeech.v1beta1.ISynthesizeSpeechResponse,

(
| protosTypes.google.cloud.texttospeech.v1beta1.ISynthesizeSpeechRequest
| undefined,
| undefined
),
{} | undefined
]
>;
Expand Down Expand Up @@ -381,9 +384,10 @@ export class TextToSpeechClient {
): Promise<
[
protosTypes.google.cloud.texttospeech.v1beta1.ISynthesizeSpeechResponse,

(
| protosTypes.google.cloud.texttospeech.v1beta1.ISynthesizeSpeechRequest
| undefined,
| undefined
),
{} | undefined
]
> | void {
Expand Down
6 changes: 3 additions & 3 deletions packages/google-cloud-texttospeech/synth.metadata
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"updateTime": "2019-11-19T04:10:28.515707Z",
"updateTime": "2019-11-20T00:30:33.625930Z",
"sources": [
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "d8dd7fe8d5304f7bd1c52207703d7f27d5328c5a",
"internalRef": "281088257"
"sha": "328ebe76adb06128d12547ed70107fb841aebf4e",
"internalRef": "281402467"
}
},
{
Expand Down
7 changes: 2 additions & 5 deletions packages/google-cloud-texttospeech/synth.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
library = gapic.typescript_library(
'texttospeech',
generator_args={
"grpc-service-config": f"google/cloud/texttospeech/{version}/texttospeech_grpc_service_config.json"
"grpc-service-config": f"google/cloud/texttospeech/{version}/texttospeech_grpc_service_config.json",
"package-name":f"@google-cloud/text-to-speech"
},
proto_path=f'/google/cloud/texttospeech/{version}',
version=version)
Expand All @@ -44,10 +45,6 @@
templates = common_templates.node_library(source_location='build/src')
s.copy(templates)

# Fix system tests
# TODO: must be a feature of pack-n-play
s.replace('system-test/fixtures/sample/src/index.*', "'texttospeech'", "'@google-cloud/text-to-speech'")

# Node.js specific cleanup
subprocess.run(['npm', 'install'])
subprocess.run(['npm', 'run', 'fix'])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
// ** https://github.com/googleapis/gapic-generator-typescript **
// ** All changes to this file may be overwritten. **


/* eslint-disable node/no-missing-require, no-unused-vars */
const texttospeech = require('@google-cloud/text-to-speech');

function main() {
Expand Down
10 changes: 5 additions & 5 deletions packages/google-cloud-texttospeech/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,23 +39,23 @@ module.exports = {
exclude: /node_modules/
},
{
test: /node_modules[\\\/]@grpc[\\\/]grpc-js/,
test: /node_modules[\\/]@grpc[\\/]grpc-js/,
use: 'null-loader'
},
{
test: /node_modules[\\\/]grpc/,
test: /node_modules[\\/]grpc/,
use: 'null-loader'
},
{
test: /node_modules[\\\/]retry-request/,
test: /node_modules[\\/]retry-request/,
use: 'null-loader'
},
{
test: /node_modules[\\\/]https-proxy-agent/,
test: /node_modules[\\/]https-proxy-agent/,
use: 'null-loader'
},
{
test: /node_modules[\\\/]gtoken/,
test: /node_modules[\\/]gtoken/,
use: 'null-loader'
},
],
Expand Down

0 comments on commit 5d50361

Please sign in to comment.