refactor!: Revamp apiEndpoint
#821
Labels
priority: p2
Moderately-important priority. Fix may not be included in next release.
type: feature request
‘Nice-to-have’ improvement, new feature or different behavior or design.
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-storage#2400PassThrough
AuthClient google-auth-library-nodejs#1771We this change we can remove the following:
nodejs-common/src/util.ts
Lines 140 to 148 in 0b4380a
nodejs-common/src/util.ts
Lines 766 to 777 in 0b4380a
The text was updated successfully, but these errors were encountered: