refactor!: Revamp apiEndpoint
#2400
Labels
api: storage
Issues related to the googleapis/nodejs-storage API.
priority: p3
Desirable enhancement or fix. May not be included in next release.
type: cleanup
An internal cleanup or hygiene concern.
With the advent of TPC and PSC, there’s a lot of complexity with apiEndpoints. To improve, we should:
async Storage#getEndpoint()
methodapiEndpoint
property privateuseAuthWithCustomEndpoint
parameter/propertycustomEndpoint
parameter/propertyAdditionally, if
STORAGE_EMULATOR_HOST
is detected and used thePassThrough
AuthClient
should be used by default (which can be overwritten via the existingauthClient
parameter) - removing the need for theuseAuthWithCustomEndpoint
parameter.This will greatly clean-up the code base as:
universeDomain
- as we can determine it asynchronously viaGoogleAuth#getUniverseDomain
. This is a major convenience for TPC customers.apiEndpoint
has been providedauth
everywhere uniformlyRelated:
apiEndpoint
nodejs-common#821PassThrough
AuthClient google-auth-library-nodejs#1771We this change we can remove the following:
nodejs-storage/src/resumable-upload.ts
Lines 284 to 288 in 755c9c2
nodejs-storage/src/resumable-upload.ts
Lines 370 to 398 in fcf3b6c
nodejs-storage/src/nodejs-common/util.ts
Lines 157 to 165 in 755c9c2
nodejs-storage/src/nodejs-common/util.ts
Lines 798 to 809 in 755c9c2
The text was updated successfully, but these errors were encountered: