Skip to content

Commit

Permalink
fix(clients): default region and credential provider (#1834)
Browse files Browse the repository at this point in the history
* feat(invalid-dependency): replace invalidAsyncFunction with invalidProvider

* chore: fix codegen region provider and default credential provider in browser

* fix(clients): default region and credential provider
  • Loading branch information
AllanZhengYP authored Dec 23, 2020
1 parent ca1f0d6 commit bc79ab5
Show file tree
Hide file tree
Showing 261 changed files with 776 additions and 775 deletions.
6 changes: 3 additions & 3 deletions clients/client-accessanalyzer/runtimeConfig.browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import packageInfo from "./package.json";

import { Sha256 } from "@aws-crypto/sha256-browser";
import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
import { invalidAsyncFunction } from "@aws-sdk/invalid-dependency";
import { invalidProvider } from "@aws-sdk/invalid-dependency";
import { DEFAULT_MAX_ATTEMPTS } from "@aws-sdk/middleware-retry";
import { parseUrl } from "@aws-sdk/url-parser-browser";
import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser";
Expand All @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required<ClientDefaults> = {
base64Decoder: fromBase64,
base64Encoder: toBase64,
bodyLengthChecker: calculateBodyLength,
credentialDefaultProvider: invalidAsyncFunction("Credentialis missing") as any,
credentialDefaultProvider: (_: unknown) => () => Promise.reject(new Error("Credential is missing")),
defaultUserAgentProvider: defaultUserAgent({
serviceId: ClientSharedValues.serviceId,
clientVersion: packageInfo.version,
}),
maxAttempts: DEFAULT_MAX_ATTEMPTS,
region: invalidAsyncFunction("Region is missing") as any,
region: invalidProvider("Region is missing"),
requestHandler: new FetchHttpHandler(),
sha256: Sha256,
streamCollector,
Expand Down
6 changes: 3 additions & 3 deletions clients/client-acm-pca/runtimeConfig.browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import packageInfo from "./package.json";

import { Sha256 } from "@aws-crypto/sha256-browser";
import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
import { invalidAsyncFunction } from "@aws-sdk/invalid-dependency";
import { invalidProvider } from "@aws-sdk/invalid-dependency";
import { DEFAULT_MAX_ATTEMPTS } from "@aws-sdk/middleware-retry";
import { parseUrl } from "@aws-sdk/url-parser-browser";
import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser";
Expand All @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required<ClientDefaults> = {
base64Decoder: fromBase64,
base64Encoder: toBase64,
bodyLengthChecker: calculateBodyLength,
credentialDefaultProvider: invalidAsyncFunction("Credentialis missing") as any,
credentialDefaultProvider: (_: unknown) => () => Promise.reject(new Error("Credential is missing")),
defaultUserAgentProvider: defaultUserAgent({
serviceId: ClientSharedValues.serviceId,
clientVersion: packageInfo.version,
}),
maxAttempts: DEFAULT_MAX_ATTEMPTS,
region: invalidAsyncFunction("Region is missing") as any,
region: invalidProvider("Region is missing"),
requestHandler: new FetchHttpHandler(),
sha256: Sha256,
streamCollector,
Expand Down
6 changes: 3 additions & 3 deletions clients/client-acm/runtimeConfig.browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import packageInfo from "./package.json";

import { Sha256 } from "@aws-crypto/sha256-browser";
import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
import { invalidAsyncFunction } from "@aws-sdk/invalid-dependency";
import { invalidProvider } from "@aws-sdk/invalid-dependency";
import { DEFAULT_MAX_ATTEMPTS } from "@aws-sdk/middleware-retry";
import { parseUrl } from "@aws-sdk/url-parser-browser";
import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser";
Expand All @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required<ClientDefaults> = {
base64Decoder: fromBase64,
base64Encoder: toBase64,
bodyLengthChecker: calculateBodyLength,
credentialDefaultProvider: invalidAsyncFunction("Credentialis missing") as any,
credentialDefaultProvider: (_: unknown) => () => Promise.reject(new Error("Credential is missing")),
defaultUserAgentProvider: defaultUserAgent({
serviceId: ClientSharedValues.serviceId,
clientVersion: packageInfo.version,
}),
maxAttempts: DEFAULT_MAX_ATTEMPTS,
region: invalidAsyncFunction("Region is missing") as any,
region: invalidProvider("Region is missing"),
requestHandler: new FetchHttpHandler(),
sha256: Sha256,
streamCollector,
Expand Down
6 changes: 3 additions & 3 deletions clients/client-alexa-for-business/runtimeConfig.browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import packageInfo from "./package.json";

import { Sha256 } from "@aws-crypto/sha256-browser";
import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
import { invalidAsyncFunction } from "@aws-sdk/invalid-dependency";
import { invalidProvider } from "@aws-sdk/invalid-dependency";
import { DEFAULT_MAX_ATTEMPTS } from "@aws-sdk/middleware-retry";
import { parseUrl } from "@aws-sdk/url-parser-browser";
import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser";
Expand All @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required<ClientDefaults> = {
base64Decoder: fromBase64,
base64Encoder: toBase64,
bodyLengthChecker: calculateBodyLength,
credentialDefaultProvider: invalidAsyncFunction("Credentialis missing") as any,
credentialDefaultProvider: (_: unknown) => () => Promise.reject(new Error("Credential is missing")),
defaultUserAgentProvider: defaultUserAgent({
serviceId: ClientSharedValues.serviceId,
clientVersion: packageInfo.version,
}),
maxAttempts: DEFAULT_MAX_ATTEMPTS,
region: invalidAsyncFunction("Region is missing") as any,
region: invalidProvider("Region is missing"),
requestHandler: new FetchHttpHandler(),
sha256: Sha256,
streamCollector,
Expand Down
6 changes: 3 additions & 3 deletions clients/client-amplify/runtimeConfig.browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import packageInfo from "./package.json";

import { Sha256 } from "@aws-crypto/sha256-browser";
import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
import { invalidAsyncFunction } from "@aws-sdk/invalid-dependency";
import { invalidProvider } from "@aws-sdk/invalid-dependency";
import { DEFAULT_MAX_ATTEMPTS } from "@aws-sdk/middleware-retry";
import { parseUrl } from "@aws-sdk/url-parser-browser";
import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser";
Expand All @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required<ClientDefaults> = {
base64Decoder: fromBase64,
base64Encoder: toBase64,
bodyLengthChecker: calculateBodyLength,
credentialDefaultProvider: invalidAsyncFunction("Credentialis missing") as any,
credentialDefaultProvider: (_: unknown) => () => Promise.reject(new Error("Credential is missing")),
defaultUserAgentProvider: defaultUserAgent({
serviceId: ClientSharedValues.serviceId,
clientVersion: packageInfo.version,
}),
maxAttempts: DEFAULT_MAX_ATTEMPTS,
region: invalidAsyncFunction("Region is missing") as any,
region: invalidProvider("Region is missing"),
requestHandler: new FetchHttpHandler(),
sha256: Sha256,
streamCollector,
Expand Down
6 changes: 3 additions & 3 deletions clients/client-amplifybackend/runtimeConfig.browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import packageInfo from "./package.json";

import { Sha256 } from "@aws-crypto/sha256-browser";
import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
import { invalidAsyncFunction } from "@aws-sdk/invalid-dependency";
import { invalidProvider } from "@aws-sdk/invalid-dependency";
import { DEFAULT_MAX_ATTEMPTS } from "@aws-sdk/middleware-retry";
import { parseUrl } from "@aws-sdk/url-parser-browser";
import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser";
Expand All @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required<ClientDefaults> = {
base64Decoder: fromBase64,
base64Encoder: toBase64,
bodyLengthChecker: calculateBodyLength,
credentialDefaultProvider: invalidAsyncFunction("Credentialis missing") as any,
credentialDefaultProvider: (_: unknown) => () => Promise.reject(new Error("Credential is missing")),
defaultUserAgentProvider: defaultUserAgent({
serviceId: ClientSharedValues.serviceId,
clientVersion: packageInfo.version,
}),
maxAttempts: DEFAULT_MAX_ATTEMPTS,
region: invalidAsyncFunction("Region is missing") as any,
region: invalidProvider("Region is missing"),
requestHandler: new FetchHttpHandler(),
sha256: Sha256,
streamCollector,
Expand Down
6 changes: 3 additions & 3 deletions clients/client-api-gateway/runtimeConfig.browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import packageInfo from "./package.json";

import { Sha256 } from "@aws-crypto/sha256-browser";
import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
import { invalidAsyncFunction } from "@aws-sdk/invalid-dependency";
import { invalidProvider } from "@aws-sdk/invalid-dependency";
import { DEFAULT_MAX_ATTEMPTS } from "@aws-sdk/middleware-retry";
import { parseUrl } from "@aws-sdk/url-parser-browser";
import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser";
Expand All @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required<ClientDefaults> = {
base64Decoder: fromBase64,
base64Encoder: toBase64,
bodyLengthChecker: calculateBodyLength,
credentialDefaultProvider: invalidAsyncFunction("Credentialis missing") as any,
credentialDefaultProvider: (_: unknown) => () => Promise.reject(new Error("Credential is missing")),
defaultUserAgentProvider: defaultUserAgent({
serviceId: ClientSharedValues.serviceId,
clientVersion: packageInfo.version,
}),
maxAttempts: DEFAULT_MAX_ATTEMPTS,
region: invalidAsyncFunction("Region is missing") as any,
region: invalidProvider("Region is missing"),
requestHandler: new FetchHttpHandler(),
sha256: Sha256,
streamCollector,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import packageInfo from "./package.json";

import { Sha256 } from "@aws-crypto/sha256-browser";
import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
import { invalidAsyncFunction } from "@aws-sdk/invalid-dependency";
import { invalidProvider } from "@aws-sdk/invalid-dependency";
import { DEFAULT_MAX_ATTEMPTS } from "@aws-sdk/middleware-retry";
import { parseUrl } from "@aws-sdk/url-parser-browser";
import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser";
Expand All @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required<ClientDefaults> = {
base64Decoder: fromBase64,
base64Encoder: toBase64,
bodyLengthChecker: calculateBodyLength,
credentialDefaultProvider: invalidAsyncFunction("Credentialis missing") as any,
credentialDefaultProvider: (_: unknown) => () => Promise.reject(new Error("Credential is missing")),
defaultUserAgentProvider: defaultUserAgent({
serviceId: ClientSharedValues.serviceId,
clientVersion: packageInfo.version,
}),
maxAttempts: DEFAULT_MAX_ATTEMPTS,
region: invalidAsyncFunction("Region is missing") as any,
region: invalidProvider("Region is missing"),
requestHandler: new FetchHttpHandler(),
sha256: Sha256,
streamCollector,
Expand Down
6 changes: 3 additions & 3 deletions clients/client-apigatewayv2/runtimeConfig.browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import packageInfo from "./package.json";

import { Sha256 } from "@aws-crypto/sha256-browser";
import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
import { invalidAsyncFunction } from "@aws-sdk/invalid-dependency";
import { invalidProvider } from "@aws-sdk/invalid-dependency";
import { DEFAULT_MAX_ATTEMPTS } from "@aws-sdk/middleware-retry";
import { parseUrl } from "@aws-sdk/url-parser-browser";
import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser";
Expand All @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required<ClientDefaults> = {
base64Decoder: fromBase64,
base64Encoder: toBase64,
bodyLengthChecker: calculateBodyLength,
credentialDefaultProvider: invalidAsyncFunction("Credentialis missing") as any,
credentialDefaultProvider: (_: unknown) => () => Promise.reject(new Error("Credential is missing")),
defaultUserAgentProvider: defaultUserAgent({
serviceId: ClientSharedValues.serviceId,
clientVersion: packageInfo.version,
}),
maxAttempts: DEFAULT_MAX_ATTEMPTS,
region: invalidAsyncFunction("Region is missing") as any,
region: invalidProvider("Region is missing"),
requestHandler: new FetchHttpHandler(),
sha256: Sha256,
streamCollector,
Expand Down
6 changes: 3 additions & 3 deletions clients/client-app-mesh/runtimeConfig.browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import packageInfo from "./package.json";

import { Sha256 } from "@aws-crypto/sha256-browser";
import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
import { invalidAsyncFunction } from "@aws-sdk/invalid-dependency";
import { invalidProvider } from "@aws-sdk/invalid-dependency";
import { DEFAULT_MAX_ATTEMPTS } from "@aws-sdk/middleware-retry";
import { parseUrl } from "@aws-sdk/url-parser-browser";
import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser";
Expand All @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required<ClientDefaults> = {
base64Decoder: fromBase64,
base64Encoder: toBase64,
bodyLengthChecker: calculateBodyLength,
credentialDefaultProvider: invalidAsyncFunction("Credentialis missing") as any,
credentialDefaultProvider: (_: unknown) => () => Promise.reject(new Error("Credential is missing")),
defaultUserAgentProvider: defaultUserAgent({
serviceId: ClientSharedValues.serviceId,
clientVersion: packageInfo.version,
}),
maxAttempts: DEFAULT_MAX_ATTEMPTS,
region: invalidAsyncFunction("Region is missing") as any,
region: invalidProvider("Region is missing"),
requestHandler: new FetchHttpHandler(),
sha256: Sha256,
streamCollector,
Expand Down
6 changes: 3 additions & 3 deletions clients/client-appconfig/runtimeConfig.browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import packageInfo from "./package.json";

import { Sha256 } from "@aws-crypto/sha256-browser";
import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
import { invalidAsyncFunction } from "@aws-sdk/invalid-dependency";
import { invalidProvider } from "@aws-sdk/invalid-dependency";
import { DEFAULT_MAX_ATTEMPTS } from "@aws-sdk/middleware-retry";
import { parseUrl } from "@aws-sdk/url-parser-browser";
import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser";
Expand All @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required<ClientDefaults> = {
base64Decoder: fromBase64,
base64Encoder: toBase64,
bodyLengthChecker: calculateBodyLength,
credentialDefaultProvider: invalidAsyncFunction("Credentialis missing") as any,
credentialDefaultProvider: (_: unknown) => () => Promise.reject(new Error("Credential is missing")),
defaultUserAgentProvider: defaultUserAgent({
serviceId: ClientSharedValues.serviceId,
clientVersion: packageInfo.version,
}),
maxAttempts: DEFAULT_MAX_ATTEMPTS,
region: invalidAsyncFunction("Region is missing") as any,
region: invalidProvider("Region is missing"),
requestHandler: new FetchHttpHandler(),
sha256: Sha256,
streamCollector,
Expand Down
6 changes: 3 additions & 3 deletions clients/client-appflow/runtimeConfig.browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import packageInfo from "./package.json";

import { Sha256 } from "@aws-crypto/sha256-browser";
import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
import { invalidAsyncFunction } from "@aws-sdk/invalid-dependency";
import { invalidProvider } from "@aws-sdk/invalid-dependency";
import { DEFAULT_MAX_ATTEMPTS } from "@aws-sdk/middleware-retry";
import { parseUrl } from "@aws-sdk/url-parser-browser";
import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser";
Expand All @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required<ClientDefaults> = {
base64Decoder: fromBase64,
base64Encoder: toBase64,
bodyLengthChecker: calculateBodyLength,
credentialDefaultProvider: invalidAsyncFunction("Credentialis missing") as any,
credentialDefaultProvider: (_: unknown) => () => Promise.reject(new Error("Credential is missing")),
defaultUserAgentProvider: defaultUserAgent({
serviceId: ClientSharedValues.serviceId,
clientVersion: packageInfo.version,
}),
maxAttempts: DEFAULT_MAX_ATTEMPTS,
region: invalidAsyncFunction("Region is missing") as any,
region: invalidProvider("Region is missing"),
requestHandler: new FetchHttpHandler(),
sha256: Sha256,
streamCollector,
Expand Down
6 changes: 3 additions & 3 deletions clients/client-appintegrations/runtimeConfig.browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import packageInfo from "./package.json";

import { Sha256 } from "@aws-crypto/sha256-browser";
import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
import { invalidAsyncFunction } from "@aws-sdk/invalid-dependency";
import { invalidProvider } from "@aws-sdk/invalid-dependency";
import { DEFAULT_MAX_ATTEMPTS } from "@aws-sdk/middleware-retry";
import { parseUrl } from "@aws-sdk/url-parser-browser";
import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser";
Expand All @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required<ClientDefaults> = {
base64Decoder: fromBase64,
base64Encoder: toBase64,
bodyLengthChecker: calculateBodyLength,
credentialDefaultProvider: invalidAsyncFunction("Credentialis missing") as any,
credentialDefaultProvider: (_: unknown) => () => Promise.reject(new Error("Credential is missing")),
defaultUserAgentProvider: defaultUserAgent({
serviceId: ClientSharedValues.serviceId,
clientVersion: packageInfo.version,
}),
maxAttempts: DEFAULT_MAX_ATTEMPTS,
region: invalidAsyncFunction("Region is missing") as any,
region: invalidProvider("Region is missing"),
requestHandler: new FetchHttpHandler(),
sha256: Sha256,
streamCollector,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import packageInfo from "./package.json";

import { Sha256 } from "@aws-crypto/sha256-browser";
import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
import { invalidAsyncFunction } from "@aws-sdk/invalid-dependency";
import { invalidProvider } from "@aws-sdk/invalid-dependency";
import { DEFAULT_MAX_ATTEMPTS } from "@aws-sdk/middleware-retry";
import { parseUrl } from "@aws-sdk/url-parser-browser";
import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser";
Expand All @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required<ClientDefaults> = {
base64Decoder: fromBase64,
base64Encoder: toBase64,
bodyLengthChecker: calculateBodyLength,
credentialDefaultProvider: invalidAsyncFunction("Credentialis missing") as any,
credentialDefaultProvider: (_: unknown) => () => Promise.reject(new Error("Credential is missing")),
defaultUserAgentProvider: defaultUserAgent({
serviceId: ClientSharedValues.serviceId,
clientVersion: packageInfo.version,
}),
maxAttempts: DEFAULT_MAX_ATTEMPTS,
region: invalidAsyncFunction("Region is missing") as any,
region: invalidProvider("Region is missing"),
requestHandler: new FetchHttpHandler(),
sha256: Sha256,
streamCollector,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import packageInfo from "./package.json";

import { Sha256 } from "@aws-crypto/sha256-browser";
import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
import { invalidAsyncFunction } from "@aws-sdk/invalid-dependency";
import { invalidProvider } from "@aws-sdk/invalid-dependency";
import { DEFAULT_MAX_ATTEMPTS } from "@aws-sdk/middleware-retry";
import { parseUrl } from "@aws-sdk/url-parser-browser";
import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser";
Expand All @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required<ClientDefaults> = {
base64Decoder: fromBase64,
base64Encoder: toBase64,
bodyLengthChecker: calculateBodyLength,
credentialDefaultProvider: invalidAsyncFunction("Credentialis missing") as any,
credentialDefaultProvider: (_: unknown) => () => Promise.reject(new Error("Credential is missing")),
defaultUserAgentProvider: defaultUserAgent({
serviceId: ClientSharedValues.serviceId,
clientVersion: packageInfo.version,
}),
maxAttempts: DEFAULT_MAX_ATTEMPTS,
region: invalidAsyncFunction("Region is missing") as any,
region: invalidProvider("Region is missing"),
requestHandler: new FetchHttpHandler(),
sha256: Sha256,
streamCollector,
Expand Down
6 changes: 3 additions & 3 deletions clients/client-application-insights/runtimeConfig.browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import packageInfo from "./package.json";

import { Sha256 } from "@aws-crypto/sha256-browser";
import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
import { invalidAsyncFunction } from "@aws-sdk/invalid-dependency";
import { invalidProvider } from "@aws-sdk/invalid-dependency";
import { DEFAULT_MAX_ATTEMPTS } from "@aws-sdk/middleware-retry";
import { parseUrl } from "@aws-sdk/url-parser-browser";
import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser";
Expand All @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required<ClientDefaults> = {
base64Decoder: fromBase64,
base64Encoder: toBase64,
bodyLengthChecker: calculateBodyLength,
credentialDefaultProvider: invalidAsyncFunction("Credentialis missing") as any,
credentialDefaultProvider: (_: unknown) => () => Promise.reject(new Error("Credential is missing")),
defaultUserAgentProvider: defaultUserAgent({
serviceId: ClientSharedValues.serviceId,
clientVersion: packageInfo.version,
}),
maxAttempts: DEFAULT_MAX_ATTEMPTS,
region: invalidAsyncFunction("Region is missing") as any,
region: invalidProvider("Region is missing"),
requestHandler: new FetchHttpHandler(),
sha256: Sha256,
streamCollector,
Expand Down
Loading

0 comments on commit bc79ab5

Please sign in to comment.