This repository was archived by the owner on Nov 18, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +7
-5
lines changed
Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 1212 "@grpc/proto-loader" : " ^0.3.0" ,
1313 "duplexify" : " ^3.6.0" ,
1414 "google-auth-library" : " ^2.0.0" ,
15- "google-proto-files" : " ^0.17 .0" ,
15+ "google-proto-files" : " ^0.18 .0" ,
1616 "grpc" : " ^1.15.1" ,
1717 "is-stream-ended" : " ^0.1.4" ,
1818 "lodash.at" : " ^4.6.0" ,
Original file line number Diff line number Diff line change 3333import * as grpcProtoLoaderTypes from '@grpc/proto-loader' ; // for types only
3434import * as fs from 'fs' ;
3535import { GoogleAuth , GoogleAuthOptions } from 'google-auth-library' ;
36+ import { getProtoPath } from 'google-proto-files' ;
3637import * as grpcTypes from 'grpc' ; // for types only
3738import { OutgoingHttpHeaders } from 'http' ;
3839import * as path from 'path' ;
@@ -42,9 +43,7 @@ import * as walk from 'walkdir';
4243
4344import * as gax from './gax' ;
4445
45- let googleProtoFilesDir = require ( 'google-proto-files' ) ( '..' ) ;
46- googleProtoFilesDir = path . normalize ( googleProtoFilesDir ) ;
47-
46+ const googleProtoFilesDir = path . normalize ( getProtoPath ( '..' ) ) ;
4847
4948// INCLUDE_DIRS is passed to @grpc /proto-loader
5049const INCLUDE_DIRS : string [ ] = [ ] ;
Original file line number Diff line number Diff line change 2424 * merge preserves those additions if the generated source changes.
2525 */
2626
27+ import { getProtoPath } from 'google-proto-files' ;
28+
2729import * as apiCallable from './api_callable' ;
2830import * as gax from './gax' ;
2931import * as pagedIteration from './paged_iteration' ;
@@ -431,9 +433,10 @@ export class OperationsClient {
431433 return this [ '_deleteOperation' ] ( request , options , callback ) ;
432434 }
433435}
436+
434437export class OperationsClientBuilder {
435438 constructor ( gaxGrpc ) {
436- const protoFilesRoot = require ( 'google-proto-files' ) ( '..' ) ;
439+ const protoFilesRoot = getProtoPath ( '..' ) ;
437440 const operationsClient = gaxGrpc . loadProto (
438441 protoFilesRoot , 'google/longrunning/operations.proto' ) ;
439442 Object . assign ( this , operationsClient . google . longrunning ) ;
You can’t perform that action at this time.
0 commit comments