|
15 | 15 | */ |
16 | 16 |
|
17 | 17 | const arrify = require('arrify'); |
18 | | -const common = require('@google-cloud/common-grpc'); |
| 18 | +const {replaceProjectIdToken} = require('@google-cloud/projectify'); |
| 19 | +const {promisifyAll} = require('@google-cloud/promisify'); |
19 | 20 | const extend = require('extend'); |
20 | | -const GrpcService = require('@google-cloud/common-grpc').Service; |
| 21 | +const {Service} = require('@google-cloud/common-grpc'); |
21 | 22 | const {GoogleAuth} = require('google-auth-library'); |
22 | 23 | const gax = require('google-gax'); |
23 | 24 | const grpc = new gax.GrpcClient().grpc; |
@@ -337,7 +338,7 @@ const v2 = require('./v2'); |
337 | 338 | */ |
338 | 339 | class Bigtable { |
339 | 340 | constructor(options) { |
340 | | - options = common.util.normalizeArguments(this, options); |
| 341 | + options = options || {}; |
341 | 342 |
|
342 | 343 | // Determine what scopes are needed. |
343 | 344 | // It is the union of the scopes on all three clients. |
@@ -654,7 +655,7 @@ class Bigtable { |
654 | 655 | let reqOpts = extend(true, {}, config.reqOpts); |
655 | 656 |
|
656 | 657 | if (this.shouldReplaceProjectIdToken && projectId !== '{{projectId}}') { |
657 | | - reqOpts = common.util.replaceProjectIdToken(reqOpts, projectId); |
| 658 | + reqOpts = replaceProjectIdToken(reqOpts, projectId); |
658 | 659 | } |
659 | 660 |
|
660 | 661 | const requestFn = gaxClient[config.method].bind( |
@@ -708,7 +709,7 @@ class Bigtable { |
708 | 709 | currentRetryAttempt: 0, |
709 | 710 | noResponseRetries: 0, |
710 | 711 | objectMode: true, |
711 | | - shouldRetryFn: GrpcService.shouldRetryRequest_, |
| 712 | + shouldRetryFn: Service.shouldRetryRequest_, |
712 | 713 | request() { |
713 | 714 | gaxStream = requestFn(); |
714 | 715 | return gaxStream; |
@@ -762,7 +763,7 @@ class Bigtable { |
762 | 763 | * All async methods (except for streams) will return a Promise in the event |
763 | 764 | * that a callback is omitted. |
764 | 765 | */ |
765 | | -common.util.promisifyAll(Bigtable, { |
| 766 | +promisifyAll(Bigtable, { |
766 | 767 | exclude: ['instance', 'operation', 'request'], |
767 | 768 | }); |
768 | 769 |
|
|
0 commit comments