Skip to content
This repository has been archived by the owner on Dec 19, 2023. It is now read-only.

chore: update synth.py to pass package name #301

Merged
merged 1 commit into from
Nov 20, 2019
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
10 changes: 6 additions & 4 deletions src/v1/text_to_speech_client.ts
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
20 changes: 12 additions & 8 deletions src/v1beta1/text_to_speech_client.ts
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 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 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
2 changes: 2 additions & 0 deletions system-test/fixtures/sample/src/index.js
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 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