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

feat: deferred client initialization #281

Merged
merged 1 commit into from
Mar 6, 2020
Merged

Conversation

alexander-fenster
Copy link
Contributor

This PR includes changes from googleapis/gapic-generator-typescript#317
that will move the asynchronous initialization and authentication from the client constructor
to an initialize() method. This method will be automatically called when the first RPC call
is performed.

The client library usage has not changed, there is no need to update any code.

If you want to make sure the client is authenticated before the first RPC call, you can do

await client.initialize();

manually before calling any client method.

@alexander-fenster alexander-fenster added the automerge Merge the pull request once unit tests and other checks pass. label Mar 5, 2020
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Mar 5, 2020
@codecov
Copy link

codecov bot commented Mar 5, 2020

Codecov Report

Merging #281 into master will decrease coverage by 90.41%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #281       +/-   ##
=========================================
- Coverage   90.41%     0%   -90.42%     
=========================================
  Files           9      9               
  Lines        3078   3208      +130     
  Branches      145      0      -145     
=========================================
- Hits         2783      0     -2783     
- Misses        291   3208     +2917     
+ Partials        4      0        -4
Impacted Files Coverage Δ
src/v1p1beta1/asset_service_client.ts 0% <0%> (-90.86%) ⬇️
src/v1beta1/asset_service_client.ts 0% <0%> (-90.47%) ⬇️
src/v1p2beta1/asset_service_client.ts 0% <0%> (-87.39%) ⬇️
src/v1/asset_service_client.ts 0% <0%> (-91.47%) ⬇️
src/v1p1beta1/index.ts 0% <0%> (-100%) ⬇️
src/index.ts 0% <0%> (-100%) ⬇️
src/v1/index.ts 0% <0%> (-100%) ⬇️
src/v1beta1/index.ts 0% <0%> (-100%) ⬇️
src/v1p2beta1/index.ts 0% <0%> (-100%) ⬇️
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 184fd2f...8984236. Read the comment docs.

@gcf-merge-on-green gcf-merge-on-green bot merged commit 8148ab0 into master Mar 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
automerge Merge the pull request once unit tests and other checks pass. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants