chore: migrate google-cloud-speech to librarian#8635
Conversation
There was a problem hiding this comment.
Code Review
This pull request transitions the library to a fully auto-generated client by removing the custom "streamingRecognize" helper, its associated tests, and updating the metadata and entry point. The reviewer notes that manual edits to generated TypeScript client files should be avoided, and any custom helpers should be restored upstream in the generator.
| // ** This file is automatically generated by synthtool. ** | ||
| // ** https://github.com/googleapis/synthtool ** | ||
| // ** All changes to this file may be overwritten. ** | ||
|
|
||
| import {ImprovedStreamingClient} from './helpers'; | ||
| import * as v1p1beta1 from './v1p1beta1'; | ||
| import * as v1 from './v1'; | ||
| import * as v1p1beta1 from './v1p1beta1'; | ||
| import * as v2 from './v2'; | ||
|
|
||
| // The following code is adapted from http://www.typescriptlang.org/docs/handbook/mixins.html | ||
| // tslint:disable-next-line no-any | ||
| Object.defineProperty( | ||
| v1.SpeechClient.prototype, | ||
| 'streamingRecognize', | ||
| Object.getOwnPropertyDescriptor( | ||
| ImprovedStreamingClient.prototype, | ||
| 'streamingRecognize' | ||
| )! | ||
| ); | ||
| Object.defineProperty( | ||
| v1p1beta1.SpeechClient.prototype, | ||
| 'streamingRecognize', | ||
| Object.getOwnPropertyDescriptor( | ||
| ImprovedStreamingClient.prototype, | ||
| 'streamingRecognize' | ||
| )! | ||
| ); | ||
| Object.defineProperty( | ||
| v2.SpeechClient.prototype, | ||
| 'streamingRecognize', | ||
| Object.getOwnPropertyDescriptor( | ||
| ImprovedStreamingClient.prototype, | ||
| 'streamingRecognize' | ||
| )! | ||
| ); |
There was a problem hiding this comment.
Do not manually edit generated TypeScript client files. Any changes or updates must be made upstream in the generator. If the custom streamingRecognize helper (previously in helpers.ts) needs to be restored, please ensure this is handled upstream in the generator rather than manually editing the files in this repository.
References
- Do not manually edit generated TypeScript client files. Any changes or updates must be made upstream in the generator.
|
@pearigee and I were debugging the test failures, and we found that this code is being post-processed in by librarian.js. Additionally, the imports in the index file need to be updated to account for the deleted files. |
No description provided.