diff --git a/clients/client-accessanalyzer/runtimeConfig.browser.ts b/clients/client-accessanalyzer/runtimeConfig.browser.ts index aeb0a8d93038..bbf58d8c68c3 100644 --- a/clients/client-accessanalyzer/runtimeConfig.browser.ts +++ b/clients/client-accessanalyzer/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-acm-pca/runtimeConfig.browser.ts b/clients/client-acm-pca/runtimeConfig.browser.ts index a4bcf1ceb424..aca417a2f4df 100644 --- a/clients/client-acm-pca/runtimeConfig.browser.ts +++ b/clients/client-acm-pca/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-acm/runtimeConfig.browser.ts b/clients/client-acm/runtimeConfig.browser.ts index bcefe6b8a7f9..d3e941a002f1 100644 --- a/clients/client-acm/runtimeConfig.browser.ts +++ b/clients/client-acm/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-alexa-for-business/runtimeConfig.browser.ts b/clients/client-alexa-for-business/runtimeConfig.browser.ts index a2cff05b4fa5..d50bc895292a 100644 --- a/clients/client-alexa-for-business/runtimeConfig.browser.ts +++ b/clients/client-alexa-for-business/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-amplify/runtimeConfig.browser.ts b/clients/client-amplify/runtimeConfig.browser.ts index c949cd76810a..8bb122ed24b4 100644 --- a/clients/client-amplify/runtimeConfig.browser.ts +++ b/clients/client-amplify/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-amplifybackend/runtimeConfig.browser.ts b/clients/client-amplifybackend/runtimeConfig.browser.ts index 8b63035791eb..66e58a26982a 100644 --- a/clients/client-amplifybackend/runtimeConfig.browser.ts +++ b/clients/client-amplifybackend/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-api-gateway/runtimeConfig.browser.ts b/clients/client-api-gateway/runtimeConfig.browser.ts index 7400734f7dd8..c35ccb98fb4f 100644 --- a/clients/client-api-gateway/runtimeConfig.browser.ts +++ b/clients/client-api-gateway/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-apigatewaymanagementapi/runtimeConfig.browser.ts b/clients/client-apigatewaymanagementapi/runtimeConfig.browser.ts index 495e2a35002d..5d933b7194b9 100644 --- a/clients/client-apigatewaymanagementapi/runtimeConfig.browser.ts +++ b/clients/client-apigatewaymanagementapi/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-apigatewayv2/runtimeConfig.browser.ts b/clients/client-apigatewayv2/runtimeConfig.browser.ts index 252cbaed9c53..b702e6d612b5 100644 --- a/clients/client-apigatewayv2/runtimeConfig.browser.ts +++ b/clients/client-apigatewayv2/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-app-mesh/runtimeConfig.browser.ts b/clients/client-app-mesh/runtimeConfig.browser.ts index 86c3bc604ead..ecf4ecaa2dd0 100644 --- a/clients/client-app-mesh/runtimeConfig.browser.ts +++ b/clients/client-app-mesh/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-appconfig/runtimeConfig.browser.ts b/clients/client-appconfig/runtimeConfig.browser.ts index 70c3399964a3..3f1bf159c27c 100644 --- a/clients/client-appconfig/runtimeConfig.browser.ts +++ b/clients/client-appconfig/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-appflow/runtimeConfig.browser.ts b/clients/client-appflow/runtimeConfig.browser.ts index 07716d2d9cf8..512676514cdd 100644 --- a/clients/client-appflow/runtimeConfig.browser.ts +++ b/clients/client-appflow/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-appintegrations/runtimeConfig.browser.ts b/clients/client-appintegrations/runtimeConfig.browser.ts index bf3d02b583b0..438dc0691ea0 100644 --- a/clients/client-appintegrations/runtimeConfig.browser.ts +++ b/clients/client-appintegrations/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-application-auto-scaling/runtimeConfig.browser.ts b/clients/client-application-auto-scaling/runtimeConfig.browser.ts index 672c67f8c32f..fdbbd94ec843 100644 --- a/clients/client-application-auto-scaling/runtimeConfig.browser.ts +++ b/clients/client-application-auto-scaling/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-application-discovery-service/runtimeConfig.browser.ts b/clients/client-application-discovery-service/runtimeConfig.browser.ts index 62063888123c..dbe5b6df378a 100644 --- a/clients/client-application-discovery-service/runtimeConfig.browser.ts +++ b/clients/client-application-discovery-service/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-application-insights/runtimeConfig.browser.ts b/clients/client-application-insights/runtimeConfig.browser.ts index 49e66e814f90..8a4cc23147be 100644 --- a/clients/client-application-insights/runtimeConfig.browser.ts +++ b/clients/client-application-insights/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-appstream/runtimeConfig.browser.ts b/clients/client-appstream/runtimeConfig.browser.ts index 61eb82131b71..7a56458d57e5 100644 --- a/clients/client-appstream/runtimeConfig.browser.ts +++ b/clients/client-appstream/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-appsync/runtimeConfig.browser.ts b/clients/client-appsync/runtimeConfig.browser.ts index 80ceb4f5d2f4..f27861ab6ae2 100644 --- a/clients/client-appsync/runtimeConfig.browser.ts +++ b/clients/client-appsync/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-athena/runtimeConfig.browser.ts b/clients/client-athena/runtimeConfig.browser.ts index 41065604cf9a..bebbac957be1 100644 --- a/clients/client-athena/runtimeConfig.browser.ts +++ b/clients/client-athena/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-auditmanager/runtimeConfig.browser.ts b/clients/client-auditmanager/runtimeConfig.browser.ts index 27b62c42ae95..2671f8aeb7e9 100644 --- a/clients/client-auditmanager/runtimeConfig.browser.ts +++ b/clients/client-auditmanager/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-auto-scaling-plans/runtimeConfig.browser.ts b/clients/client-auto-scaling-plans/runtimeConfig.browser.ts index b8f212f41372..d7da378eff21 100644 --- a/clients/client-auto-scaling-plans/runtimeConfig.browser.ts +++ b/clients/client-auto-scaling-plans/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-auto-scaling/runtimeConfig.browser.ts b/clients/client-auto-scaling/runtimeConfig.browser.ts index 14b11b988408..90ea7c0ee920 100644 --- a/clients/client-auto-scaling/runtimeConfig.browser.ts +++ b/clients/client-auto-scaling/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-backup/runtimeConfig.browser.ts b/clients/client-backup/runtimeConfig.browser.ts index 3c04da688cc2..7d7d828f2c42 100644 --- a/clients/client-backup/runtimeConfig.browser.ts +++ b/clients/client-backup/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-batch/runtimeConfig.browser.ts b/clients/client-batch/runtimeConfig.browser.ts index 6452870bc5d0..da196fafd5dc 100644 --- a/clients/client-batch/runtimeConfig.browser.ts +++ b/clients/client-batch/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-braket/runtimeConfig.browser.ts b/clients/client-braket/runtimeConfig.browser.ts index d484004a6a5a..6280a709a78d 100644 --- a/clients/client-braket/runtimeConfig.browser.ts +++ b/clients/client-braket/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-budgets/runtimeConfig.browser.ts b/clients/client-budgets/runtimeConfig.browser.ts index 62aeae2b5d24..217993252eb0 100644 --- a/clients/client-budgets/runtimeConfig.browser.ts +++ b/clients/client-budgets/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-chime/runtimeConfig.browser.ts b/clients/client-chime/runtimeConfig.browser.ts index ad19e700cd2d..655037a729fa 100644 --- a/clients/client-chime/runtimeConfig.browser.ts +++ b/clients/client-chime/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-cloud9/runtimeConfig.browser.ts b/clients/client-cloud9/runtimeConfig.browser.ts index ccce50f41d0a..5bf128592888 100644 --- a/clients/client-cloud9/runtimeConfig.browser.ts +++ b/clients/client-cloud9/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-clouddirectory/runtimeConfig.browser.ts b/clients/client-clouddirectory/runtimeConfig.browser.ts index f1329da68e89..59e4cf5f4367 100644 --- a/clients/client-clouddirectory/runtimeConfig.browser.ts +++ b/clients/client-clouddirectory/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-cloudformation/runtimeConfig.browser.ts b/clients/client-cloudformation/runtimeConfig.browser.ts index 49bb84829d39..0d040c39db13 100644 --- a/clients/client-cloudformation/runtimeConfig.browser.ts +++ b/clients/client-cloudformation/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-cloudfront/runtimeConfig.browser.ts b/clients/client-cloudfront/runtimeConfig.browser.ts index d55467186b68..3ab6cf9c74d7 100644 --- a/clients/client-cloudfront/runtimeConfig.browser.ts +++ b/clients/client-cloudfront/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-cloudhsm-v2/runtimeConfig.browser.ts b/clients/client-cloudhsm-v2/runtimeConfig.browser.ts index 144968a4090c..4db1b42ff9b9 100644 --- a/clients/client-cloudhsm-v2/runtimeConfig.browser.ts +++ b/clients/client-cloudhsm-v2/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-cloudhsm/runtimeConfig.browser.ts b/clients/client-cloudhsm/runtimeConfig.browser.ts index 3bb7bda68b8b..3d1af821974d 100644 --- a/clients/client-cloudhsm/runtimeConfig.browser.ts +++ b/clients/client-cloudhsm/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-cloudsearch-domain/runtimeConfig.browser.ts b/clients/client-cloudsearch-domain/runtimeConfig.browser.ts index 2694787f9e6b..0c1db3af09e9 100644 --- a/clients/client-cloudsearch-domain/runtimeConfig.browser.ts +++ b/clients/client-cloudsearch-domain/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-cloudsearch/runtimeConfig.browser.ts b/clients/client-cloudsearch/runtimeConfig.browser.ts index f2889ae25731..019424631002 100644 --- a/clients/client-cloudsearch/runtimeConfig.browser.ts +++ b/clients/client-cloudsearch/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-cloudtrail/runtimeConfig.browser.ts b/clients/client-cloudtrail/runtimeConfig.browser.ts index 2c16e643a330..8c525d5edd69 100644 --- a/clients/client-cloudtrail/runtimeConfig.browser.ts +++ b/clients/client-cloudtrail/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-cloudwatch-events/runtimeConfig.browser.ts b/clients/client-cloudwatch-events/runtimeConfig.browser.ts index 5332bdc0a9f4..93cf5a4b7c54 100644 --- a/clients/client-cloudwatch-events/runtimeConfig.browser.ts +++ b/clients/client-cloudwatch-events/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-cloudwatch-logs/runtimeConfig.browser.ts b/clients/client-cloudwatch-logs/runtimeConfig.browser.ts index 6ae79aae4f41..fdb7e48a57e2 100644 --- a/clients/client-cloudwatch-logs/runtimeConfig.browser.ts +++ b/clients/client-cloudwatch-logs/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-cloudwatch/runtimeConfig.browser.ts b/clients/client-cloudwatch/runtimeConfig.browser.ts index 7b5639bad5d6..2eaf36a1c8d9 100644 --- a/clients/client-cloudwatch/runtimeConfig.browser.ts +++ b/clients/client-cloudwatch/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-codeartifact/runtimeConfig.browser.ts b/clients/client-codeartifact/runtimeConfig.browser.ts index 8b2a1a02f2b6..a914d88b9cb9 100644 --- a/clients/client-codeartifact/runtimeConfig.browser.ts +++ b/clients/client-codeartifact/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-codebuild/runtimeConfig.browser.ts b/clients/client-codebuild/runtimeConfig.browser.ts index 633b77f1b86e..0888e2bf45b5 100644 --- a/clients/client-codebuild/runtimeConfig.browser.ts +++ b/clients/client-codebuild/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-codecommit/runtimeConfig.browser.ts b/clients/client-codecommit/runtimeConfig.browser.ts index 03571d079145..579c5d72c91d 100644 --- a/clients/client-codecommit/runtimeConfig.browser.ts +++ b/clients/client-codecommit/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-codedeploy/runtimeConfig.browser.ts b/clients/client-codedeploy/runtimeConfig.browser.ts index a6341af9c966..42983c6aa1b2 100644 --- a/clients/client-codedeploy/runtimeConfig.browser.ts +++ b/clients/client-codedeploy/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-codeguru-reviewer/runtimeConfig.browser.ts b/clients/client-codeguru-reviewer/runtimeConfig.browser.ts index 1d0495c14761..fac72750f042 100644 --- a/clients/client-codeguru-reviewer/runtimeConfig.browser.ts +++ b/clients/client-codeguru-reviewer/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-codeguruprofiler/runtimeConfig.browser.ts b/clients/client-codeguruprofiler/runtimeConfig.browser.ts index 0f5f6aac7096..2187e5afc054 100644 --- a/clients/client-codeguruprofiler/runtimeConfig.browser.ts +++ b/clients/client-codeguruprofiler/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-codepipeline/runtimeConfig.browser.ts b/clients/client-codepipeline/runtimeConfig.browser.ts index d2ff3b3be587..c53aa8baca1a 100644 --- a/clients/client-codepipeline/runtimeConfig.browser.ts +++ b/clients/client-codepipeline/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-codestar-connections/runtimeConfig.browser.ts b/clients/client-codestar-connections/runtimeConfig.browser.ts index bc9a8f2984a5..9e34eeff3073 100644 --- a/clients/client-codestar-connections/runtimeConfig.browser.ts +++ b/clients/client-codestar-connections/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-codestar-notifications/runtimeConfig.browser.ts b/clients/client-codestar-notifications/runtimeConfig.browser.ts index 268551b9023d..0de827f647b0 100644 --- a/clients/client-codestar-notifications/runtimeConfig.browser.ts +++ b/clients/client-codestar-notifications/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-codestar/runtimeConfig.browser.ts b/clients/client-codestar/runtimeConfig.browser.ts index 4c05dd5b66b1..204a28074465 100644 --- a/clients/client-codestar/runtimeConfig.browser.ts +++ b/clients/client-codestar/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-cognito-identity-provider/runtimeConfig.browser.ts b/clients/client-cognito-identity-provider/runtimeConfig.browser.ts index 472a323f1a67..acb8c54d4318 100644 --- a/clients/client-cognito-identity-provider/runtimeConfig.browser.ts +++ b/clients/client-cognito-identity-provider/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-cognito-identity/runtimeConfig.browser.ts b/clients/client-cognito-identity/runtimeConfig.browser.ts index e3f589a52f54..d625b9c2dcbb 100644 --- a/clients/client-cognito-identity/runtimeConfig.browser.ts +++ b/clients/client-cognito-identity/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-cognito-sync/runtimeConfig.browser.ts b/clients/client-cognito-sync/runtimeConfig.browser.ts index 004eb46a6b63..b78197623a1b 100644 --- a/clients/client-cognito-sync/runtimeConfig.browser.ts +++ b/clients/client-cognito-sync/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-comprehend/runtimeConfig.browser.ts b/clients/client-comprehend/runtimeConfig.browser.ts index af1800d92e0a..1f68b5df2fad 100644 --- a/clients/client-comprehend/runtimeConfig.browser.ts +++ b/clients/client-comprehend/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-comprehendmedical/runtimeConfig.browser.ts b/clients/client-comprehendmedical/runtimeConfig.browser.ts index 4c343f29435a..c6e45e9ee9a0 100644 --- a/clients/client-comprehendmedical/runtimeConfig.browser.ts +++ b/clients/client-comprehendmedical/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-compute-optimizer/runtimeConfig.browser.ts b/clients/client-compute-optimizer/runtimeConfig.browser.ts index fde4656cc147..d87057715835 100644 --- a/clients/client-compute-optimizer/runtimeConfig.browser.ts +++ b/clients/client-compute-optimizer/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-config-service/runtimeConfig.browser.ts b/clients/client-config-service/runtimeConfig.browser.ts index f0b1afa77a08..92c2a624db4e 100644 --- a/clients/client-config-service/runtimeConfig.browser.ts +++ b/clients/client-config-service/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-connect-contact-lens/runtimeConfig.browser.ts b/clients/client-connect-contact-lens/runtimeConfig.browser.ts index 0a1a469fd0c6..366d49bd320a 100644 --- a/clients/client-connect-contact-lens/runtimeConfig.browser.ts +++ b/clients/client-connect-contact-lens/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-connect/runtimeConfig.browser.ts b/clients/client-connect/runtimeConfig.browser.ts index 7c410928f7cc..7fd696cd40af 100644 --- a/clients/client-connect/runtimeConfig.browser.ts +++ b/clients/client-connect/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-connectparticipant/runtimeConfig.browser.ts b/clients/client-connectparticipant/runtimeConfig.browser.ts index 70752ee89876..ffdff93581c7 100644 --- a/clients/client-connectparticipant/runtimeConfig.browser.ts +++ b/clients/client-connectparticipant/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-cost-and-usage-report-service/runtimeConfig.browser.ts b/clients/client-cost-and-usage-report-service/runtimeConfig.browser.ts index 21c8ead8353e..fb65ea470939 100644 --- a/clients/client-cost-and-usage-report-service/runtimeConfig.browser.ts +++ b/clients/client-cost-and-usage-report-service/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-cost-explorer/runtimeConfig.browser.ts b/clients/client-cost-explorer/runtimeConfig.browser.ts index c71ce08faa8c..26359598197f 100644 --- a/clients/client-cost-explorer/runtimeConfig.browser.ts +++ b/clients/client-cost-explorer/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-customer-profiles/runtimeConfig.browser.ts b/clients/client-customer-profiles/runtimeConfig.browser.ts index a2df749fde28..18fc50ab7f21 100644 --- a/clients/client-customer-profiles/runtimeConfig.browser.ts +++ b/clients/client-customer-profiles/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-data-pipeline/runtimeConfig.browser.ts b/clients/client-data-pipeline/runtimeConfig.browser.ts index 1e77ced30265..31bd5fa4524b 100644 --- a/clients/client-data-pipeline/runtimeConfig.browser.ts +++ b/clients/client-data-pipeline/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-database-migration-service/runtimeConfig.browser.ts b/clients/client-database-migration-service/runtimeConfig.browser.ts index 58c4380c89dd..049031658af0 100644 --- a/clients/client-database-migration-service/runtimeConfig.browser.ts +++ b/clients/client-database-migration-service/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-databrew/runtimeConfig.browser.ts b/clients/client-databrew/runtimeConfig.browser.ts index cc1f7256fa5a..21ee8f2bcd37 100644 --- a/clients/client-databrew/runtimeConfig.browser.ts +++ b/clients/client-databrew/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-dataexchange/runtimeConfig.browser.ts b/clients/client-dataexchange/runtimeConfig.browser.ts index b752ebb2cab0..17ec047e8c0a 100644 --- a/clients/client-dataexchange/runtimeConfig.browser.ts +++ b/clients/client-dataexchange/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-datasync/runtimeConfig.browser.ts b/clients/client-datasync/runtimeConfig.browser.ts index 86312c79d6bd..5dc601b934aa 100644 --- a/clients/client-datasync/runtimeConfig.browser.ts +++ b/clients/client-datasync/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-dax/runtimeConfig.browser.ts b/clients/client-dax/runtimeConfig.browser.ts index 479881e0d24b..d07393060ace 100644 --- a/clients/client-dax/runtimeConfig.browser.ts +++ b/clients/client-dax/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-detective/runtimeConfig.browser.ts b/clients/client-detective/runtimeConfig.browser.ts index 219b9dd6966b..7b7119903b68 100644 --- a/clients/client-detective/runtimeConfig.browser.ts +++ b/clients/client-detective/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-device-farm/runtimeConfig.browser.ts b/clients/client-device-farm/runtimeConfig.browser.ts index f414ba7f6c0d..adba2e833d0b 100644 --- a/clients/client-device-farm/runtimeConfig.browser.ts +++ b/clients/client-device-farm/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-devops-guru/runtimeConfig.browser.ts b/clients/client-devops-guru/runtimeConfig.browser.ts index 00afcbb7c11b..c9728351d669 100644 --- a/clients/client-devops-guru/runtimeConfig.browser.ts +++ b/clients/client-devops-guru/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-direct-connect/runtimeConfig.browser.ts b/clients/client-direct-connect/runtimeConfig.browser.ts index eed44cacf695..4a52d918431f 100644 --- a/clients/client-direct-connect/runtimeConfig.browser.ts +++ b/clients/client-direct-connect/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-directory-service/runtimeConfig.browser.ts b/clients/client-directory-service/runtimeConfig.browser.ts index 6e00eb5f0de8..d54971e87753 100644 --- a/clients/client-directory-service/runtimeConfig.browser.ts +++ b/clients/client-directory-service/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-dlm/runtimeConfig.browser.ts b/clients/client-dlm/runtimeConfig.browser.ts index c7d18b08674f..dd2e229dc2fe 100644 --- a/clients/client-dlm/runtimeConfig.browser.ts +++ b/clients/client-dlm/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-docdb/runtimeConfig.browser.ts b/clients/client-docdb/runtimeConfig.browser.ts index b798cd4d9032..f4c390685ce5 100644 --- a/clients/client-docdb/runtimeConfig.browser.ts +++ b/clients/client-docdb/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-dynamodb-streams/runtimeConfig.browser.ts b/clients/client-dynamodb-streams/runtimeConfig.browser.ts index 5fda2a9dc204..9dc4d84b1f8e 100644 --- a/clients/client-dynamodb-streams/runtimeConfig.browser.ts +++ b/clients/client-dynamodb-streams/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-dynamodb/runtimeConfig.browser.ts b/clients/client-dynamodb/runtimeConfig.browser.ts index 093f0fc12ba8..44fffd134eb3 100644 --- a/clients/client-dynamodb/runtimeConfig.browser.ts +++ b/clients/client-dynamodb/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-ebs/runtimeConfig.browser.ts b/clients/client-ebs/runtimeConfig.browser.ts index b70adb2b1f95..468c92392ac0 100644 --- a/clients/client-ebs/runtimeConfig.browser.ts +++ b/clients/client-ebs/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-ec2-instance-connect/runtimeConfig.browser.ts b/clients/client-ec2-instance-connect/runtimeConfig.browser.ts index f7cc2a8563e5..f327d58e137d 100644 --- a/clients/client-ec2-instance-connect/runtimeConfig.browser.ts +++ b/clients/client-ec2-instance-connect/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-ec2/runtimeConfig.browser.ts b/clients/client-ec2/runtimeConfig.browser.ts index 3dc145d0bb6d..4c4b2259f445 100644 --- a/clients/client-ec2/runtimeConfig.browser.ts +++ b/clients/client-ec2/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-ecr-public/runtimeConfig.browser.ts b/clients/client-ecr-public/runtimeConfig.browser.ts index 29935a75d326..d414db647ba6 100644 --- a/clients/client-ecr-public/runtimeConfig.browser.ts +++ b/clients/client-ecr-public/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-ecr/runtimeConfig.browser.ts b/clients/client-ecr/runtimeConfig.browser.ts index e395d392ca81..a1ffa1bd96e7 100644 --- a/clients/client-ecr/runtimeConfig.browser.ts +++ b/clients/client-ecr/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-ecs/runtimeConfig.browser.ts b/clients/client-ecs/runtimeConfig.browser.ts index f21c330e793a..aa35b806aaf6 100644 --- a/clients/client-ecs/runtimeConfig.browser.ts +++ b/clients/client-ecs/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-efs/runtimeConfig.browser.ts b/clients/client-efs/runtimeConfig.browser.ts index a0f96ef370d3..96b057e2f47c 100644 --- a/clients/client-efs/runtimeConfig.browser.ts +++ b/clients/client-efs/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-eks/runtimeConfig.browser.ts b/clients/client-eks/runtimeConfig.browser.ts index 18bdde866615..128955113e9d 100644 --- a/clients/client-eks/runtimeConfig.browser.ts +++ b/clients/client-eks/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-elastic-beanstalk/runtimeConfig.browser.ts b/clients/client-elastic-beanstalk/runtimeConfig.browser.ts index 64f164662460..4aabede81499 100644 --- a/clients/client-elastic-beanstalk/runtimeConfig.browser.ts +++ b/clients/client-elastic-beanstalk/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-elastic-inference/runtimeConfig.browser.ts b/clients/client-elastic-inference/runtimeConfig.browser.ts index e3ecfb81266a..77558932d13b 100644 --- a/clients/client-elastic-inference/runtimeConfig.browser.ts +++ b/clients/client-elastic-inference/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-elastic-load-balancing-v2/runtimeConfig.browser.ts b/clients/client-elastic-load-balancing-v2/runtimeConfig.browser.ts index 5df884437663..fdc17f289488 100644 --- a/clients/client-elastic-load-balancing-v2/runtimeConfig.browser.ts +++ b/clients/client-elastic-load-balancing-v2/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-elastic-load-balancing/runtimeConfig.browser.ts b/clients/client-elastic-load-balancing/runtimeConfig.browser.ts index 38a78b1d37fa..76bcaa376b6c 100644 --- a/clients/client-elastic-load-balancing/runtimeConfig.browser.ts +++ b/clients/client-elastic-load-balancing/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-elastic-transcoder/runtimeConfig.browser.ts b/clients/client-elastic-transcoder/runtimeConfig.browser.ts index f042639ee7cb..27b651045025 100644 --- a/clients/client-elastic-transcoder/runtimeConfig.browser.ts +++ b/clients/client-elastic-transcoder/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-elasticache/runtimeConfig.browser.ts b/clients/client-elasticache/runtimeConfig.browser.ts index 53ab8ea46797..b688fe6e0c04 100644 --- a/clients/client-elasticache/runtimeConfig.browser.ts +++ b/clients/client-elasticache/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-elasticsearch-service/runtimeConfig.browser.ts b/clients/client-elasticsearch-service/runtimeConfig.browser.ts index 370d87d91737..aa03d60d61e8 100644 --- a/clients/client-elasticsearch-service/runtimeConfig.browser.ts +++ b/clients/client-elasticsearch-service/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-emr-containers/runtimeConfig.browser.ts b/clients/client-emr-containers/runtimeConfig.browser.ts index 3f4b5cb15c73..b3649cafbb49 100644 --- a/clients/client-emr-containers/runtimeConfig.browser.ts +++ b/clients/client-emr-containers/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-emr/runtimeConfig.browser.ts b/clients/client-emr/runtimeConfig.browser.ts index 7c3cad005a10..7ee0e664ce55 100644 --- a/clients/client-emr/runtimeConfig.browser.ts +++ b/clients/client-emr/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-eventbridge/runtimeConfig.browser.ts b/clients/client-eventbridge/runtimeConfig.browser.ts index 1cc11b027edb..256e18cfcde8 100644 --- a/clients/client-eventbridge/runtimeConfig.browser.ts +++ b/clients/client-eventbridge/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-firehose/runtimeConfig.browser.ts b/clients/client-firehose/runtimeConfig.browser.ts index 4055fed137ae..d7161b43ca3a 100644 --- a/clients/client-firehose/runtimeConfig.browser.ts +++ b/clients/client-firehose/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-fms/runtimeConfig.browser.ts b/clients/client-fms/runtimeConfig.browser.ts index d37950073f38..fff3246fcab3 100644 --- a/clients/client-fms/runtimeConfig.browser.ts +++ b/clients/client-fms/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-forecast/runtimeConfig.browser.ts b/clients/client-forecast/runtimeConfig.browser.ts index eadbbca2134c..7499e355265c 100644 --- a/clients/client-forecast/runtimeConfig.browser.ts +++ b/clients/client-forecast/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-forecastquery/runtimeConfig.browser.ts b/clients/client-forecastquery/runtimeConfig.browser.ts index 68db5d5a774d..2bed73624251 100644 --- a/clients/client-forecastquery/runtimeConfig.browser.ts +++ b/clients/client-forecastquery/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-frauddetector/runtimeConfig.browser.ts b/clients/client-frauddetector/runtimeConfig.browser.ts index 1909b62ecccf..84c8d695f4a5 100644 --- a/clients/client-frauddetector/runtimeConfig.browser.ts +++ b/clients/client-frauddetector/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-fsx/runtimeConfig.browser.ts b/clients/client-fsx/runtimeConfig.browser.ts index 656d5f2ecfad..60224eef505c 100644 --- a/clients/client-fsx/runtimeConfig.browser.ts +++ b/clients/client-fsx/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-gamelift/runtimeConfig.browser.ts b/clients/client-gamelift/runtimeConfig.browser.ts index 2db1887920f7..e6f736468816 100644 --- a/clients/client-gamelift/runtimeConfig.browser.ts +++ b/clients/client-gamelift/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-glacier/runtimeConfig.browser.ts b/clients/client-glacier/runtimeConfig.browser.ts index 7cea1de95be0..54b7288bfe44 100644 --- a/clients/client-glacier/runtimeConfig.browser.ts +++ b/clients/client-glacier/runtimeConfig.browser.ts @@ -3,7 +3,7 @@ import packageInfo from "./package.json"; import { Sha256 } from "@aws-crypto/sha256-browser"; import { bodyChecksumGenerator } from "@aws-sdk/body-checksum-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"; @@ -23,13 +23,13 @@ export const ClientDefaultValues: Required = { base64Encoder: toBase64, bodyChecksumGenerator, 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, diff --git a/clients/client-global-accelerator/runtimeConfig.browser.ts b/clients/client-global-accelerator/runtimeConfig.browser.ts index 2819fe76bc95..8b80f1505851 100644 --- a/clients/client-global-accelerator/runtimeConfig.browser.ts +++ b/clients/client-global-accelerator/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-glue/runtimeConfig.browser.ts b/clients/client-glue/runtimeConfig.browser.ts index 8d710ddd4466..423b72ed802b 100644 --- a/clients/client-glue/runtimeConfig.browser.ts +++ b/clients/client-glue/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-greengrass/runtimeConfig.browser.ts b/clients/client-greengrass/runtimeConfig.browser.ts index db04ddb05b6a..a0f8a7d88f7e 100644 --- a/clients/client-greengrass/runtimeConfig.browser.ts +++ b/clients/client-greengrass/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-groundstation/runtimeConfig.browser.ts b/clients/client-groundstation/runtimeConfig.browser.ts index 63ce249eec93..1b2cab366b2d 100644 --- a/clients/client-groundstation/runtimeConfig.browser.ts +++ b/clients/client-groundstation/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-guardduty/runtimeConfig.browser.ts b/clients/client-guardduty/runtimeConfig.browser.ts index 42daae6239f5..6824e82ff9ef 100644 --- a/clients/client-guardduty/runtimeConfig.browser.ts +++ b/clients/client-guardduty/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-health/runtimeConfig.browser.ts b/clients/client-health/runtimeConfig.browser.ts index f240e86f78ad..0f6d60d9f918 100644 --- a/clients/client-health/runtimeConfig.browser.ts +++ b/clients/client-health/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-healthlake/runtimeConfig.browser.ts b/clients/client-healthlake/runtimeConfig.browser.ts index c4159dbce380..0a2bc5584732 100644 --- a/clients/client-healthlake/runtimeConfig.browser.ts +++ b/clients/client-healthlake/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-honeycode/runtimeConfig.browser.ts b/clients/client-honeycode/runtimeConfig.browser.ts index 637b3d4e203a..cbc616c22790 100644 --- a/clients/client-honeycode/runtimeConfig.browser.ts +++ b/clients/client-honeycode/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-iam/runtimeConfig.browser.ts b/clients/client-iam/runtimeConfig.browser.ts index 50a2cf2e3bf2..4d7d7fdd5dce 100644 --- a/clients/client-iam/runtimeConfig.browser.ts +++ b/clients/client-iam/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-identitystore/runtimeConfig.browser.ts b/clients/client-identitystore/runtimeConfig.browser.ts index d8a2cadaa580..aae356565e76 100644 --- a/clients/client-identitystore/runtimeConfig.browser.ts +++ b/clients/client-identitystore/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-imagebuilder/runtimeConfig.browser.ts b/clients/client-imagebuilder/runtimeConfig.browser.ts index b6306f2ab833..e55f75064944 100644 --- a/clients/client-imagebuilder/runtimeConfig.browser.ts +++ b/clients/client-imagebuilder/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-inspector/runtimeConfig.browser.ts b/clients/client-inspector/runtimeConfig.browser.ts index 1f5d3b0db130..4535c9032e08 100644 --- a/clients/client-inspector/runtimeConfig.browser.ts +++ b/clients/client-inspector/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-iot-1click-devices-service/runtimeConfig.browser.ts b/clients/client-iot-1click-devices-service/runtimeConfig.browser.ts index 25b6583ea85a..aaabaf27f431 100644 --- a/clients/client-iot-1click-devices-service/runtimeConfig.browser.ts +++ b/clients/client-iot-1click-devices-service/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-iot-1click-projects/runtimeConfig.browser.ts b/clients/client-iot-1click-projects/runtimeConfig.browser.ts index faf186a8ecc3..7736b8307427 100644 --- a/clients/client-iot-1click-projects/runtimeConfig.browser.ts +++ b/clients/client-iot-1click-projects/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-iot-data-plane/runtimeConfig.browser.ts b/clients/client-iot-data-plane/runtimeConfig.browser.ts index 194deddffebf..ec8b152a7734 100644 --- a/clients/client-iot-data-plane/runtimeConfig.browser.ts +++ b/clients/client-iot-data-plane/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-iot-events-data/runtimeConfig.browser.ts b/clients/client-iot-events-data/runtimeConfig.browser.ts index 01eb8f57b9c5..f0333ad8ca54 100644 --- a/clients/client-iot-events-data/runtimeConfig.browser.ts +++ b/clients/client-iot-events-data/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-iot-events/runtimeConfig.browser.ts b/clients/client-iot-events/runtimeConfig.browser.ts index 804b7eb72473..f449203087c7 100644 --- a/clients/client-iot-events/runtimeConfig.browser.ts +++ b/clients/client-iot-events/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-iot-jobs-data-plane/runtimeConfig.browser.ts b/clients/client-iot-jobs-data-plane/runtimeConfig.browser.ts index 31f147e2cddb..bdda4ab924fe 100644 --- a/clients/client-iot-jobs-data-plane/runtimeConfig.browser.ts +++ b/clients/client-iot-jobs-data-plane/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-iot/runtimeConfig.browser.ts b/clients/client-iot/runtimeConfig.browser.ts index 5e9d55556e85..5226d6679de6 100644 --- a/clients/client-iot/runtimeConfig.browser.ts +++ b/clients/client-iot/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-iotanalytics/runtimeConfig.browser.ts b/clients/client-iotanalytics/runtimeConfig.browser.ts index 0d538cb77aab..9ff5a29f69e3 100644 --- a/clients/client-iotanalytics/runtimeConfig.browser.ts +++ b/clients/client-iotanalytics/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-iotsecuretunneling/runtimeConfig.browser.ts b/clients/client-iotsecuretunneling/runtimeConfig.browser.ts index a283dc531b8a..612b852628b2 100644 --- a/clients/client-iotsecuretunneling/runtimeConfig.browser.ts +++ b/clients/client-iotsecuretunneling/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-iotsitewise/runtimeConfig.browser.ts b/clients/client-iotsitewise/runtimeConfig.browser.ts index 6cbdb8c98bca..e7ddfe61c787 100644 --- a/clients/client-iotsitewise/runtimeConfig.browser.ts +++ b/clients/client-iotsitewise/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-iotthingsgraph/runtimeConfig.browser.ts b/clients/client-iotthingsgraph/runtimeConfig.browser.ts index 159ad6ba04c0..5cc83f3d0b8f 100644 --- a/clients/client-iotthingsgraph/runtimeConfig.browser.ts +++ b/clients/client-iotthingsgraph/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-ivs/runtimeConfig.browser.ts b/clients/client-ivs/runtimeConfig.browser.ts index a89f8e29d34b..ff0467ac8149 100644 --- a/clients/client-ivs/runtimeConfig.browser.ts +++ b/clients/client-ivs/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-kafka/runtimeConfig.browser.ts b/clients/client-kafka/runtimeConfig.browser.ts index 482bfddb2bc1..d47e8a142225 100644 --- a/clients/client-kafka/runtimeConfig.browser.ts +++ b/clients/client-kafka/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-kendra/runtimeConfig.browser.ts b/clients/client-kendra/runtimeConfig.browser.ts index 5de465a4dc60..704697825d35 100644 --- a/clients/client-kendra/runtimeConfig.browser.ts +++ b/clients/client-kendra/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-kinesis-analytics-v2/runtimeConfig.browser.ts b/clients/client-kinesis-analytics-v2/runtimeConfig.browser.ts index 20883a7973d8..fdd21508a7e4 100644 --- a/clients/client-kinesis-analytics-v2/runtimeConfig.browser.ts +++ b/clients/client-kinesis-analytics-v2/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-kinesis-analytics/runtimeConfig.browser.ts b/clients/client-kinesis-analytics/runtimeConfig.browser.ts index 5a4f7b637179..93cd9ea746fb 100644 --- a/clients/client-kinesis-analytics/runtimeConfig.browser.ts +++ b/clients/client-kinesis-analytics/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-kinesis-video-archived-media/runtimeConfig.browser.ts b/clients/client-kinesis-video-archived-media/runtimeConfig.browser.ts index 726ce434e9bc..806b0bc395c2 100644 --- a/clients/client-kinesis-video-archived-media/runtimeConfig.browser.ts +++ b/clients/client-kinesis-video-archived-media/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-kinesis-video-media/runtimeConfig.browser.ts b/clients/client-kinesis-video-media/runtimeConfig.browser.ts index dc4e45085385..11a18ecbc761 100644 --- a/clients/client-kinesis-video-media/runtimeConfig.browser.ts +++ b/clients/client-kinesis-video-media/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-kinesis-video-signaling/runtimeConfig.browser.ts b/clients/client-kinesis-video-signaling/runtimeConfig.browser.ts index b8a4a05b10bb..e5ee4073f546 100644 --- a/clients/client-kinesis-video-signaling/runtimeConfig.browser.ts +++ b/clients/client-kinesis-video-signaling/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-kinesis-video/runtimeConfig.browser.ts b/clients/client-kinesis-video/runtimeConfig.browser.ts index b4f7f5823785..b36f16642b0a 100644 --- a/clients/client-kinesis-video/runtimeConfig.browser.ts +++ b/clients/client-kinesis-video/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-kinesis/runtimeConfig.browser.ts b/clients/client-kinesis/runtimeConfig.browser.ts index 9e50610795c8..1df440a4f658 100644 --- a/clients/client-kinesis/runtimeConfig.browser.ts +++ b/clients/client-kinesis/runtimeConfig.browser.ts @@ -3,7 +3,7 @@ import packageInfo from "./package.json"; import { Sha256 } from "@aws-crypto/sha256-browser"; import { eventStreamSerdeProvider } from "@aws-sdk/eventstream-serde-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"; @@ -22,14 +22,14 @@ export const ClientDefaultValues: Required = { 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, }), eventStreamSerdeProvider, maxAttempts: DEFAULT_MAX_ATTEMPTS, - region: invalidAsyncFunction("Region is missing") as any, + region: invalidProvider("Region is missing"), requestHandler: new FetchHttpHandler(), sha256: Sha256, streamCollector, diff --git a/clients/client-kms/runtimeConfig.browser.ts b/clients/client-kms/runtimeConfig.browser.ts index e405ffcb16b9..8bc086334e31 100644 --- a/clients/client-kms/runtimeConfig.browser.ts +++ b/clients/client-kms/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-lakeformation/runtimeConfig.browser.ts b/clients/client-lakeformation/runtimeConfig.browser.ts index 544afdc81a0b..eac313394a23 100644 --- a/clients/client-lakeformation/runtimeConfig.browser.ts +++ b/clients/client-lakeformation/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-lambda/runtimeConfig.browser.ts b/clients/client-lambda/runtimeConfig.browser.ts index 6eb4f52d4894..a76383f47445 100644 --- a/clients/client-lambda/runtimeConfig.browser.ts +++ b/clients/client-lambda/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-lex-model-building-service/runtimeConfig.browser.ts b/clients/client-lex-model-building-service/runtimeConfig.browser.ts index 28692dc4c13b..8574d540eed5 100644 --- a/clients/client-lex-model-building-service/runtimeConfig.browser.ts +++ b/clients/client-lex-model-building-service/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-lex-runtime-service/runtimeConfig.browser.ts b/clients/client-lex-runtime-service/runtimeConfig.browser.ts index 372e780aedeb..1b5cc12c8218 100644 --- a/clients/client-lex-runtime-service/runtimeConfig.browser.ts +++ b/clients/client-lex-runtime-service/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-license-manager/runtimeConfig.browser.ts b/clients/client-license-manager/runtimeConfig.browser.ts index 900ebefbe423..7ac131938c2b 100644 --- a/clients/client-license-manager/runtimeConfig.browser.ts +++ b/clients/client-license-manager/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-lightsail/runtimeConfig.browser.ts b/clients/client-lightsail/runtimeConfig.browser.ts index 58ebf455d018..edeb18667b72 100644 --- a/clients/client-lightsail/runtimeConfig.browser.ts +++ b/clients/client-lightsail/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-lookoutvision/runtimeConfig.browser.ts b/clients/client-lookoutvision/runtimeConfig.browser.ts index 398dcae421f1..8417a8a5e001 100644 --- a/clients/client-lookoutvision/runtimeConfig.browser.ts +++ b/clients/client-lookoutvision/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-machine-learning/runtimeConfig.browser.ts b/clients/client-machine-learning/runtimeConfig.browser.ts index fe9066f189ed..a9c27f695658 100644 --- a/clients/client-machine-learning/runtimeConfig.browser.ts +++ b/clients/client-machine-learning/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-macie/runtimeConfig.browser.ts b/clients/client-macie/runtimeConfig.browser.ts index feabe5319b68..b5e2a3b915a7 100644 --- a/clients/client-macie/runtimeConfig.browser.ts +++ b/clients/client-macie/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-macie2/runtimeConfig.browser.ts b/clients/client-macie2/runtimeConfig.browser.ts index 781ab5aa9361..2314a7f95d90 100644 --- a/clients/client-macie2/runtimeConfig.browser.ts +++ b/clients/client-macie2/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-managedblockchain/runtimeConfig.browser.ts b/clients/client-managedblockchain/runtimeConfig.browser.ts index 252b912df3f5..948697afae0f 100644 --- a/clients/client-managedblockchain/runtimeConfig.browser.ts +++ b/clients/client-managedblockchain/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-marketplace-catalog/runtimeConfig.browser.ts b/clients/client-marketplace-catalog/runtimeConfig.browser.ts index 7d950c823a99..fe3f6565ec58 100644 --- a/clients/client-marketplace-catalog/runtimeConfig.browser.ts +++ b/clients/client-marketplace-catalog/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-marketplace-commerce-analytics/runtimeConfig.browser.ts b/clients/client-marketplace-commerce-analytics/runtimeConfig.browser.ts index 4aa94f6bfe7d..8156ebc88e9d 100644 --- a/clients/client-marketplace-commerce-analytics/runtimeConfig.browser.ts +++ b/clients/client-marketplace-commerce-analytics/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-marketplace-entitlement-service/runtimeConfig.browser.ts b/clients/client-marketplace-entitlement-service/runtimeConfig.browser.ts index 1c7f94b781e2..474219a9d6ed 100644 --- a/clients/client-marketplace-entitlement-service/runtimeConfig.browser.ts +++ b/clients/client-marketplace-entitlement-service/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-marketplace-metering/runtimeConfig.browser.ts b/clients/client-marketplace-metering/runtimeConfig.browser.ts index 05926f90a756..78e3d4be7d3c 100644 --- a/clients/client-marketplace-metering/runtimeConfig.browser.ts +++ b/clients/client-marketplace-metering/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-mediaconnect/runtimeConfig.browser.ts b/clients/client-mediaconnect/runtimeConfig.browser.ts index c4e5bca28f5e..29b489c1eae8 100644 --- a/clients/client-mediaconnect/runtimeConfig.browser.ts +++ b/clients/client-mediaconnect/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-mediaconvert/runtimeConfig.browser.ts b/clients/client-mediaconvert/runtimeConfig.browser.ts index 0fce6306bee4..a96286eba8ed 100644 --- a/clients/client-mediaconvert/runtimeConfig.browser.ts +++ b/clients/client-mediaconvert/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-medialive/runtimeConfig.browser.ts b/clients/client-medialive/runtimeConfig.browser.ts index a9ef851ef24d..74ee478b9ab6 100644 --- a/clients/client-medialive/runtimeConfig.browser.ts +++ b/clients/client-medialive/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-mediapackage-vod/runtimeConfig.browser.ts b/clients/client-mediapackage-vod/runtimeConfig.browser.ts index db74a22c4d59..5132bf7b79db 100644 --- a/clients/client-mediapackage-vod/runtimeConfig.browser.ts +++ b/clients/client-mediapackage-vod/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-mediapackage/runtimeConfig.browser.ts b/clients/client-mediapackage/runtimeConfig.browser.ts index 08bfbaeb4728..a37d44937c10 100644 --- a/clients/client-mediapackage/runtimeConfig.browser.ts +++ b/clients/client-mediapackage/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-mediastore-data/runtimeConfig.browser.ts b/clients/client-mediastore-data/runtimeConfig.browser.ts index e633725eb489..75525bee5919 100644 --- a/clients/client-mediastore-data/runtimeConfig.browser.ts +++ b/clients/client-mediastore-data/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-mediastore/runtimeConfig.browser.ts b/clients/client-mediastore/runtimeConfig.browser.ts index d01eecf79f06..7300e889b592 100644 --- a/clients/client-mediastore/runtimeConfig.browser.ts +++ b/clients/client-mediastore/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-mediatailor/runtimeConfig.browser.ts b/clients/client-mediatailor/runtimeConfig.browser.ts index 43d481229aa9..7a04824b759d 100644 --- a/clients/client-mediatailor/runtimeConfig.browser.ts +++ b/clients/client-mediatailor/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-migration-hub/runtimeConfig.browser.ts b/clients/client-migration-hub/runtimeConfig.browser.ts index dab14126017f..7d7b823a65f9 100644 --- a/clients/client-migration-hub/runtimeConfig.browser.ts +++ b/clients/client-migration-hub/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-migrationhub-config/runtimeConfig.browser.ts b/clients/client-migrationhub-config/runtimeConfig.browser.ts index c4b08edced93..9dd7a76d8b97 100644 --- a/clients/client-migrationhub-config/runtimeConfig.browser.ts +++ b/clients/client-migrationhub-config/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-mobile/runtimeConfig.browser.ts b/clients/client-mobile/runtimeConfig.browser.ts index ef8542c72690..09db2b54df52 100644 --- a/clients/client-mobile/runtimeConfig.browser.ts +++ b/clients/client-mobile/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-mq/runtimeConfig.browser.ts b/clients/client-mq/runtimeConfig.browser.ts index 4fe8d23829f0..ee657b921310 100644 --- a/clients/client-mq/runtimeConfig.browser.ts +++ b/clients/client-mq/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-mturk/runtimeConfig.browser.ts b/clients/client-mturk/runtimeConfig.browser.ts index fffa5f6f2f72..30619b070dc8 100644 --- a/clients/client-mturk/runtimeConfig.browser.ts +++ b/clients/client-mturk/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-neptune/runtimeConfig.browser.ts b/clients/client-neptune/runtimeConfig.browser.ts index a78e68c38ab4..0d9aaae703b7 100644 --- a/clients/client-neptune/runtimeConfig.browser.ts +++ b/clients/client-neptune/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-network-firewall/runtimeConfig.browser.ts b/clients/client-network-firewall/runtimeConfig.browser.ts index db9d1c9ee76b..bfe70813e581 100644 --- a/clients/client-network-firewall/runtimeConfig.browser.ts +++ b/clients/client-network-firewall/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-networkmanager/runtimeConfig.browser.ts b/clients/client-networkmanager/runtimeConfig.browser.ts index 5107e027a729..2b784fc780d9 100644 --- a/clients/client-networkmanager/runtimeConfig.browser.ts +++ b/clients/client-networkmanager/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-opsworks/runtimeConfig.browser.ts b/clients/client-opsworks/runtimeConfig.browser.ts index 4057c7787d36..91630ce4b085 100644 --- a/clients/client-opsworks/runtimeConfig.browser.ts +++ b/clients/client-opsworks/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-opsworkscm/runtimeConfig.browser.ts b/clients/client-opsworkscm/runtimeConfig.browser.ts index 7f2185cac520..3641accbc789 100644 --- a/clients/client-opsworkscm/runtimeConfig.browser.ts +++ b/clients/client-opsworkscm/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-organizations/runtimeConfig.browser.ts b/clients/client-organizations/runtimeConfig.browser.ts index 2d368f08078c..7ba5808c1496 100644 --- a/clients/client-organizations/runtimeConfig.browser.ts +++ b/clients/client-organizations/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-outposts/runtimeConfig.browser.ts b/clients/client-outposts/runtimeConfig.browser.ts index cc31f1773f6a..f69b029622a5 100644 --- a/clients/client-outposts/runtimeConfig.browser.ts +++ b/clients/client-outposts/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-personalize-events/runtimeConfig.browser.ts b/clients/client-personalize-events/runtimeConfig.browser.ts index 29d961ec3988..8619ed6e2951 100644 --- a/clients/client-personalize-events/runtimeConfig.browser.ts +++ b/clients/client-personalize-events/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-personalize-runtime/runtimeConfig.browser.ts b/clients/client-personalize-runtime/runtimeConfig.browser.ts index c78c795d4b63..908e0005a0b9 100644 --- a/clients/client-personalize-runtime/runtimeConfig.browser.ts +++ b/clients/client-personalize-runtime/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-personalize/runtimeConfig.browser.ts b/clients/client-personalize/runtimeConfig.browser.ts index ccca8adda904..8492a6936e30 100644 --- a/clients/client-personalize/runtimeConfig.browser.ts +++ b/clients/client-personalize/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-pi/runtimeConfig.browser.ts b/clients/client-pi/runtimeConfig.browser.ts index ce5fcb03867d..5cdca135bf0e 100644 --- a/clients/client-pi/runtimeConfig.browser.ts +++ b/clients/client-pi/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-pinpoint-email/runtimeConfig.browser.ts b/clients/client-pinpoint-email/runtimeConfig.browser.ts index 3e52b3e2c7d0..3c74648bbb2c 100644 --- a/clients/client-pinpoint-email/runtimeConfig.browser.ts +++ b/clients/client-pinpoint-email/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-pinpoint-sms-voice/runtimeConfig.browser.ts b/clients/client-pinpoint-sms-voice/runtimeConfig.browser.ts index d53c04af3c93..f81e48b3b52b 100644 --- a/clients/client-pinpoint-sms-voice/runtimeConfig.browser.ts +++ b/clients/client-pinpoint-sms-voice/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-pinpoint/runtimeConfig.browser.ts b/clients/client-pinpoint/runtimeConfig.browser.ts index 3cd77708455f..4d0bf08f5df7 100644 --- a/clients/client-pinpoint/runtimeConfig.browser.ts +++ b/clients/client-pinpoint/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-polly/runtimeConfig.browser.ts b/clients/client-polly/runtimeConfig.browser.ts index 2d61a1001fb6..3f65667b8940 100644 --- a/clients/client-polly/runtimeConfig.browser.ts +++ b/clients/client-polly/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-pricing/runtimeConfig.browser.ts b/clients/client-pricing/runtimeConfig.browser.ts index 14c3de2c1ed1..bcce66740e73 100644 --- a/clients/client-pricing/runtimeConfig.browser.ts +++ b/clients/client-pricing/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-qldb-session/runtimeConfig.browser.ts b/clients/client-qldb-session/runtimeConfig.browser.ts index cbdc898f9e8a..d2d8ac7b9884 100644 --- a/clients/client-qldb-session/runtimeConfig.browser.ts +++ b/clients/client-qldb-session/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-qldb/runtimeConfig.browser.ts b/clients/client-qldb/runtimeConfig.browser.ts index b0232ba79b34..e09e79b14454 100644 --- a/clients/client-qldb/runtimeConfig.browser.ts +++ b/clients/client-qldb/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-quicksight/runtimeConfig.browser.ts b/clients/client-quicksight/runtimeConfig.browser.ts index baad8cbe2390..11c0040a0338 100644 --- a/clients/client-quicksight/runtimeConfig.browser.ts +++ b/clients/client-quicksight/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-ram/runtimeConfig.browser.ts b/clients/client-ram/runtimeConfig.browser.ts index ff3ede4ef91b..f954f29e9354 100644 --- a/clients/client-ram/runtimeConfig.browser.ts +++ b/clients/client-ram/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-rds-data/runtimeConfig.browser.ts b/clients/client-rds-data/runtimeConfig.browser.ts index d4d9e6db5c9b..dcb7e151db6c 100644 --- a/clients/client-rds-data/runtimeConfig.browser.ts +++ b/clients/client-rds-data/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-rds/runtimeConfig.browser.ts b/clients/client-rds/runtimeConfig.browser.ts index e8a83bb55950..b7315f96e578 100644 --- a/clients/client-rds/runtimeConfig.browser.ts +++ b/clients/client-rds/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-redshift-data/runtimeConfig.browser.ts b/clients/client-redshift-data/runtimeConfig.browser.ts index 8ade1939e18b..c2de75494ebd 100644 --- a/clients/client-redshift-data/runtimeConfig.browser.ts +++ b/clients/client-redshift-data/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-redshift/runtimeConfig.browser.ts b/clients/client-redshift/runtimeConfig.browser.ts index 0073064ccbd3..9f165a8763db 100644 --- a/clients/client-redshift/runtimeConfig.browser.ts +++ b/clients/client-redshift/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-rekognition/runtimeConfig.browser.ts b/clients/client-rekognition/runtimeConfig.browser.ts index f2ad5648510d..6309afc83091 100644 --- a/clients/client-rekognition/runtimeConfig.browser.ts +++ b/clients/client-rekognition/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-resource-groups-tagging-api/runtimeConfig.browser.ts b/clients/client-resource-groups-tagging-api/runtimeConfig.browser.ts index 59de4b69fb7e..04f1f82ddc18 100644 --- a/clients/client-resource-groups-tagging-api/runtimeConfig.browser.ts +++ b/clients/client-resource-groups-tagging-api/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-resource-groups/runtimeConfig.browser.ts b/clients/client-resource-groups/runtimeConfig.browser.ts index 3402d2e436bd..8d102e54216b 100644 --- a/clients/client-resource-groups/runtimeConfig.browser.ts +++ b/clients/client-resource-groups/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-robomaker/runtimeConfig.browser.ts b/clients/client-robomaker/runtimeConfig.browser.ts index 40b9c97b70d0..bc5fbff7b662 100644 --- a/clients/client-robomaker/runtimeConfig.browser.ts +++ b/clients/client-robomaker/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-route-53-domains/runtimeConfig.browser.ts b/clients/client-route-53-domains/runtimeConfig.browser.ts index b46103d9f6b1..5b8bfe285977 100644 --- a/clients/client-route-53-domains/runtimeConfig.browser.ts +++ b/clients/client-route-53-domains/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-route-53/runtimeConfig.browser.ts b/clients/client-route-53/runtimeConfig.browser.ts index 55cc424c3ada..9f965ce2ceb8 100644 --- a/clients/client-route-53/runtimeConfig.browser.ts +++ b/clients/client-route-53/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-route53resolver/runtimeConfig.browser.ts b/clients/client-route53resolver/runtimeConfig.browser.ts index ea448824a938..dd2525fb87a5 100644 --- a/clients/client-route53resolver/runtimeConfig.browser.ts +++ b/clients/client-route53resolver/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-s3-control/runtimeConfig.browser.ts b/clients/client-s3-control/runtimeConfig.browser.ts index 7a5ad67c1de6..f5587dcd2bc0 100644 --- a/clients/client-s3-control/runtimeConfig.browser.ts +++ b/clients/client-s3-control/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-s3/runtimeConfig.browser.ts b/clients/client-s3/runtimeConfig.browser.ts index a40ebe805729..9a2fd4388181 100644 --- a/clients/client-s3/runtimeConfig.browser.ts +++ b/clients/client-s3/runtimeConfig.browser.ts @@ -4,7 +4,7 @@ import { Sha256 } from "@aws-crypto/sha256-browser"; import { eventStreamSerdeProvider } from "@aws-sdk/eventstream-serde-browser"; import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler"; import { blobHasher as streamHasher } from "@aws-sdk/hash-blob-browser"; -import { invalidAsyncFunction } from "@aws-sdk/invalid-dependency"; +import { invalidProvider } from "@aws-sdk/invalid-dependency"; import { Md5 } from "@aws-sdk/md5-js"; import { DEFAULT_MAX_ATTEMPTS } from "@aws-sdk/middleware-retry"; import { parseUrl } from "@aws-sdk/url-parser-browser"; @@ -24,7 +24,7 @@ export const ClientDefaultValues: Required = { 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, @@ -32,7 +32,7 @@ export const ClientDefaultValues: Required = { eventStreamSerdeProvider, maxAttempts: DEFAULT_MAX_ATTEMPTS, md5: Md5, - region: invalidAsyncFunction("Region is missing") as any, + region: invalidProvider("Region is missing"), requestHandler: new FetchHttpHandler(), sha256: Sha256, streamCollector, diff --git a/clients/client-s3outposts/runtimeConfig.browser.ts b/clients/client-s3outposts/runtimeConfig.browser.ts index a45cef78c9b6..9bce86dc465a 100644 --- a/clients/client-s3outposts/runtimeConfig.browser.ts +++ b/clients/client-s3outposts/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-sagemaker-a2i-runtime/runtimeConfig.browser.ts b/clients/client-sagemaker-a2i-runtime/runtimeConfig.browser.ts index 415392b4e693..c35f1d39b67e 100644 --- a/clients/client-sagemaker-a2i-runtime/runtimeConfig.browser.ts +++ b/clients/client-sagemaker-a2i-runtime/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-sagemaker-edge/runtimeConfig.browser.ts b/clients/client-sagemaker-edge/runtimeConfig.browser.ts index 07691bcf0d29..ff0cdc908172 100644 --- a/clients/client-sagemaker-edge/runtimeConfig.browser.ts +++ b/clients/client-sagemaker-edge/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-sagemaker-featurestore-runtime/runtimeConfig.browser.ts b/clients/client-sagemaker-featurestore-runtime/runtimeConfig.browser.ts index 47abf099083b..dcde1335e351 100644 --- a/clients/client-sagemaker-featurestore-runtime/runtimeConfig.browser.ts +++ b/clients/client-sagemaker-featurestore-runtime/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-sagemaker-runtime/runtimeConfig.browser.ts b/clients/client-sagemaker-runtime/runtimeConfig.browser.ts index 66dc79dc4bb3..c56c19772c86 100644 --- a/clients/client-sagemaker-runtime/runtimeConfig.browser.ts +++ b/clients/client-sagemaker-runtime/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-sagemaker/runtimeConfig.browser.ts b/clients/client-sagemaker/runtimeConfig.browser.ts index f1ff8687fbad..1e7e80c238c6 100644 --- a/clients/client-sagemaker/runtimeConfig.browser.ts +++ b/clients/client-sagemaker/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-savingsplans/runtimeConfig.browser.ts b/clients/client-savingsplans/runtimeConfig.browser.ts index eb401f250ce5..f77615378ec6 100644 --- a/clients/client-savingsplans/runtimeConfig.browser.ts +++ b/clients/client-savingsplans/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-schemas/runtimeConfig.browser.ts b/clients/client-schemas/runtimeConfig.browser.ts index 915071791fbb..2832222223cb 100644 --- a/clients/client-schemas/runtimeConfig.browser.ts +++ b/clients/client-schemas/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-secrets-manager/runtimeConfig.browser.ts b/clients/client-secrets-manager/runtimeConfig.browser.ts index 9e26246a3c46..8e5c607a8b04 100644 --- a/clients/client-secrets-manager/runtimeConfig.browser.ts +++ b/clients/client-secrets-manager/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-securityhub/runtimeConfig.browser.ts b/clients/client-securityhub/runtimeConfig.browser.ts index 6ba9bee2afa0..5bbd93e119bc 100644 --- a/clients/client-securityhub/runtimeConfig.browser.ts +++ b/clients/client-securityhub/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-serverlessapplicationrepository/runtimeConfig.browser.ts b/clients/client-serverlessapplicationrepository/runtimeConfig.browser.ts index be17cfbba112..980d7a24ff5a 100644 --- a/clients/client-serverlessapplicationrepository/runtimeConfig.browser.ts +++ b/clients/client-serverlessapplicationrepository/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-service-catalog-appregistry/runtimeConfig.browser.ts b/clients/client-service-catalog-appregistry/runtimeConfig.browser.ts index c1a44b749fce..5b130f27ffd5 100644 --- a/clients/client-service-catalog-appregistry/runtimeConfig.browser.ts +++ b/clients/client-service-catalog-appregistry/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-service-catalog/runtimeConfig.browser.ts b/clients/client-service-catalog/runtimeConfig.browser.ts index 77795b217d49..bb0e84695f5b 100644 --- a/clients/client-service-catalog/runtimeConfig.browser.ts +++ b/clients/client-service-catalog/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-service-quotas/runtimeConfig.browser.ts b/clients/client-service-quotas/runtimeConfig.browser.ts index 463ad036364f..db33a88213dc 100644 --- a/clients/client-service-quotas/runtimeConfig.browser.ts +++ b/clients/client-service-quotas/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-servicediscovery/runtimeConfig.browser.ts b/clients/client-servicediscovery/runtimeConfig.browser.ts index a3b13d5e8207..90af5ff1b25a 100644 --- a/clients/client-servicediscovery/runtimeConfig.browser.ts +++ b/clients/client-servicediscovery/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-ses/runtimeConfig.browser.ts b/clients/client-ses/runtimeConfig.browser.ts index d75c725b6b3e..ecdd41afbcdf 100644 --- a/clients/client-ses/runtimeConfig.browser.ts +++ b/clients/client-ses/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-sesv2/runtimeConfig.browser.ts b/clients/client-sesv2/runtimeConfig.browser.ts index 1dcda64649fc..1948881d710b 100644 --- a/clients/client-sesv2/runtimeConfig.browser.ts +++ b/clients/client-sesv2/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-sfn/runtimeConfig.browser.ts b/clients/client-sfn/runtimeConfig.browser.ts index feb4baba53c7..96e716d73f7b 100644 --- a/clients/client-sfn/runtimeConfig.browser.ts +++ b/clients/client-sfn/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-shield/runtimeConfig.browser.ts b/clients/client-shield/runtimeConfig.browser.ts index 483403f16dea..279e231ab501 100644 --- a/clients/client-shield/runtimeConfig.browser.ts +++ b/clients/client-shield/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-signer/runtimeConfig.browser.ts b/clients/client-signer/runtimeConfig.browser.ts index 1fc6924f82a8..91209cfa2fcc 100644 --- a/clients/client-signer/runtimeConfig.browser.ts +++ b/clients/client-signer/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-sms/runtimeConfig.browser.ts b/clients/client-sms/runtimeConfig.browser.ts index f832dbc9de70..0c01cf825442 100644 --- a/clients/client-sms/runtimeConfig.browser.ts +++ b/clients/client-sms/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-snowball/runtimeConfig.browser.ts b/clients/client-snowball/runtimeConfig.browser.ts index 2f20490bf5cb..8035356dd780 100644 --- a/clients/client-snowball/runtimeConfig.browser.ts +++ b/clients/client-snowball/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-sns/runtimeConfig.browser.ts b/clients/client-sns/runtimeConfig.browser.ts index 6fa0f51b1f04..889cf3a3ab22 100644 --- a/clients/client-sns/runtimeConfig.browser.ts +++ b/clients/client-sns/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-sqs/runtimeConfig.browser.ts b/clients/client-sqs/runtimeConfig.browser.ts index 764ee1f356da..6a8cf15353dd 100644 --- a/clients/client-sqs/runtimeConfig.browser.ts +++ b/clients/client-sqs/runtimeConfig.browser.ts @@ -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 { Md5 } from "@aws-sdk/md5-js"; import { DEFAULT_MAX_ATTEMPTS } from "@aws-sdk/middleware-retry"; import { parseUrl } from "@aws-sdk/url-parser-browser"; @@ -22,14 +22,14 @@ export const ClientDefaultValues: Required = { 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, md5: Md5, - region: invalidAsyncFunction("Region is missing") as any, + region: invalidProvider("Region is missing"), requestHandler: new FetchHttpHandler(), sha256: Sha256, streamCollector, diff --git a/clients/client-ssm/runtimeConfig.browser.ts b/clients/client-ssm/runtimeConfig.browser.ts index fa23d9f2cd18..8b386fc9db5e 100644 --- a/clients/client-ssm/runtimeConfig.browser.ts +++ b/clients/client-ssm/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-sso-admin/runtimeConfig.browser.ts b/clients/client-sso-admin/runtimeConfig.browser.ts index 827f3a688623..84092553b86a 100644 --- a/clients/client-sso-admin/runtimeConfig.browser.ts +++ b/clients/client-sso-admin/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-sso-oidc/runtimeConfig.browser.ts b/clients/client-sso-oidc/runtimeConfig.browser.ts index d1cb30d36219..f0465cfbe5be 100644 --- a/clients/client-sso-oidc/runtimeConfig.browser.ts +++ b/clients/client-sso-oidc/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-sso/runtimeConfig.browser.ts b/clients/client-sso/runtimeConfig.browser.ts index 9df1925afc84..f33ccd8984bb 100644 --- a/clients/client-sso/runtimeConfig.browser.ts +++ b/clients/client-sso/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-storage-gateway/runtimeConfig.browser.ts b/clients/client-storage-gateway/runtimeConfig.browser.ts index bd6ffe278c2e..df32c43b2b1e 100644 --- a/clients/client-storage-gateway/runtimeConfig.browser.ts +++ b/clients/client-storage-gateway/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-sts/runtimeConfig.browser.ts b/clients/client-sts/runtimeConfig.browser.ts index 9b88b1c246ed..1671f641cacc 100644 --- a/clients/client-sts/runtimeConfig.browser.ts +++ b/clients/client-sts/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-support/runtimeConfig.browser.ts b/clients/client-support/runtimeConfig.browser.ts index 9c2064edbee9..068c11953e42 100644 --- a/clients/client-support/runtimeConfig.browser.ts +++ b/clients/client-support/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-swf/runtimeConfig.browser.ts b/clients/client-swf/runtimeConfig.browser.ts index b6754ff11c96..d5c46041b0bc 100644 --- a/clients/client-swf/runtimeConfig.browser.ts +++ b/clients/client-swf/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-synthetics/runtimeConfig.browser.ts b/clients/client-synthetics/runtimeConfig.browser.ts index 7b5d4d70637f..fde554ed3db2 100644 --- a/clients/client-synthetics/runtimeConfig.browser.ts +++ b/clients/client-synthetics/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-textract/runtimeConfig.browser.ts b/clients/client-textract/runtimeConfig.browser.ts index 11de7ecefc85..ca69670db9aa 100644 --- a/clients/client-textract/runtimeConfig.browser.ts +++ b/clients/client-textract/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-timestream-query/runtimeConfig.browser.ts b/clients/client-timestream-query/runtimeConfig.browser.ts index 5169263f83ee..f25b557f88a3 100644 --- a/clients/client-timestream-query/runtimeConfig.browser.ts +++ b/clients/client-timestream-query/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-timestream-write/runtimeConfig.browser.ts b/clients/client-timestream-write/runtimeConfig.browser.ts index 7fd541135e2a..35589f940b83 100644 --- a/clients/client-timestream-write/runtimeConfig.browser.ts +++ b/clients/client-timestream-write/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-transcribe-streaming/runtimeConfig.browser.ts b/clients/client-transcribe-streaming/runtimeConfig.browser.ts index 275e7b9b13ea..49a30816b923 100644 --- a/clients/client-transcribe-streaming/runtimeConfig.browser.ts +++ b/clients/client-transcribe-streaming/runtimeConfig.browser.ts @@ -3,7 +3,7 @@ import packageInfo from "./package.json"; import { Sha256 } from "@aws-crypto/sha256-browser"; import { eventStreamSerdeProvider } from "@aws-sdk/eventstream-serde-browser"; import { 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 { WebSocketHandler, eventStreamPayloadHandler } from "@aws-sdk/middleware-sdk-transcribe-streaming"; import { parseUrl } from "@aws-sdk/url-parser-browser"; @@ -23,7 +23,7 @@ export const ClientDefaultValues: Required = { 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, @@ -31,7 +31,7 @@ export const ClientDefaultValues: Required = { eventStreamPayloadHandlerProvider: () => eventStreamPayloadHandler, eventStreamSerdeProvider, maxAttempts: DEFAULT_MAX_ATTEMPTS, - region: invalidAsyncFunction("Region is missing") as any, + region: invalidProvider("Region is missing"), requestHandler: new WebSocketHandler(), sha256: Sha256, streamCollector, diff --git a/clients/client-transcribe/runtimeConfig.browser.ts b/clients/client-transcribe/runtimeConfig.browser.ts index 06eb8ccd38ce..126301c9d2f2 100644 --- a/clients/client-transcribe/runtimeConfig.browser.ts +++ b/clients/client-transcribe/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-transfer/runtimeConfig.browser.ts b/clients/client-transfer/runtimeConfig.browser.ts index 213ee1a26176..595e62e64b1f 100644 --- a/clients/client-transfer/runtimeConfig.browser.ts +++ b/clients/client-transfer/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-translate/runtimeConfig.browser.ts b/clients/client-translate/runtimeConfig.browser.ts index 6f390efa0477..d95fec94cd4d 100644 --- a/clients/client-translate/runtimeConfig.browser.ts +++ b/clients/client-translate/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-waf-regional/runtimeConfig.browser.ts b/clients/client-waf-regional/runtimeConfig.browser.ts index 53e6577de3fd..7b6d221840f0 100644 --- a/clients/client-waf-regional/runtimeConfig.browser.ts +++ b/clients/client-waf-regional/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-waf/runtimeConfig.browser.ts b/clients/client-waf/runtimeConfig.browser.ts index 6320a2adf8c8..96a7b91e5dcb 100644 --- a/clients/client-waf/runtimeConfig.browser.ts +++ b/clients/client-waf/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-wafv2/runtimeConfig.browser.ts b/clients/client-wafv2/runtimeConfig.browser.ts index 78ea50474f8e..ca5fc4956637 100644 --- a/clients/client-wafv2/runtimeConfig.browser.ts +++ b/clients/client-wafv2/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-workdocs/runtimeConfig.browser.ts b/clients/client-workdocs/runtimeConfig.browser.ts index 5754fdb8e48b..f90f3a53e420 100644 --- a/clients/client-workdocs/runtimeConfig.browser.ts +++ b/clients/client-workdocs/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-worklink/runtimeConfig.browser.ts b/clients/client-worklink/runtimeConfig.browser.ts index 663f07a10d94..a64c8dfafb0d 100644 --- a/clients/client-worklink/runtimeConfig.browser.ts +++ b/clients/client-worklink/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-workmail/runtimeConfig.browser.ts b/clients/client-workmail/runtimeConfig.browser.ts index de4422b136f3..3ba26dc6d692 100644 --- a/clients/client-workmail/runtimeConfig.browser.ts +++ b/clients/client-workmail/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-workmailmessageflow/runtimeConfig.browser.ts b/clients/client-workmailmessageflow/runtimeConfig.browser.ts index 08dd2fc81b76..5fd7543281d6 100644 --- a/clients/client-workmailmessageflow/runtimeConfig.browser.ts +++ b/clients/client-workmailmessageflow/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-workspaces/runtimeConfig.browser.ts b/clients/client-workspaces/runtimeConfig.browser.ts index f2d8015ebb6d..4bd11708b6bb 100644 --- a/clients/client-workspaces/runtimeConfig.browser.ts +++ b/clients/client-workspaces/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/clients/client-xray/runtimeConfig.browser.ts b/clients/client-xray/runtimeConfig.browser.ts index fab31f339564..5e45d4680e5a 100644 --- a/clients/client-xray/runtimeConfig.browser.ts +++ b/clients/client-xray/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/AddAwsRuntimeConfig.java b/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/AddAwsRuntimeConfig.java index d6a7a72019e8..4c18c0ec010a 100644 --- a/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/AddAwsRuntimeConfig.java +++ b/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/AddAwsRuntimeConfig.java @@ -141,17 +141,14 @@ private Map> getDefaultConfig(LanguageTarget return MapUtils.of( "region", writer -> { writer.addDependency(TypeScriptDependency.INVALID_DEPENDENCY); - writer.addImport("invalidAsyncFunction", "invalidAsyncFunction", + writer.addImport("invalidProvider", "invalidProvider", TypeScriptDependency.INVALID_DEPENDENCY.packageName); - writer.write("region: invalidAsyncFunction(\"Region is missing\") as any,"); + writer.write("region: invalidProvider(\"Region is missing\"),"); }, "credentialDefaultProvider", writer -> { - writer.addDependency(TypeScriptDependency.INVALID_DEPENDENCY); - writer.addImport("invalidAsyncFunction", "invalidAsyncFunction", - TypeScriptDependency.INVALID_DEPENDENCY.packageName); writer.write( - "credentialDefaultProvider: invalidAsyncFunction(\"Credential" - + "is missing\") as any,"); + "credentialDefaultProvider: (_: unknown) => () => Promise.reject(new Error(" + + "\"Credential is missing\")),"); }, "maxAttempts", writer -> { writer.addDependency(TypeScriptDependency.MIDDLEWARE_RETRY); diff --git a/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/AddBuiltinPlugins.java b/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/AddBuiltinPlugins.java index bda22f067162..07c2ac67d0b8 100644 --- a/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/AddBuiltinPlugins.java +++ b/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/AddBuiltinPlugins.java @@ -180,7 +180,7 @@ private static boolean operationUsesAwsAuth(Model model, ServiceShape service, O } private static boolean hasOptionalAuthOperation(Model model, ServiceShape service) { - TopDownIndex topDownIndex = model.getKnowledge(TopDownIndex.class); + TopDownIndex topDownIndex = TopDownIndex.of(model); Set operations = topDownIndex.getContainedOperations(service); for (OperationShape operation : operations) { if (operation.getTrait(OptionalAuthTrait.class).isPresent()) { diff --git a/codegen/smithy-aws-typescript-codegen/src/test/java/software/amazon/smithy/aws/typescript/codegen/AddAwsRuntimeConfigTest.java b/codegen/smithy-aws-typescript-codegen/src/test/java/software/amazon/smithy/aws/typescript/codegen/AddAwsRuntimeConfigTest.java index 82328df9c7c4..0c3e392be4ac 100644 --- a/codegen/smithy-aws-typescript-codegen/src/test/java/software/amazon/smithy/aws/typescript/codegen/AddAwsRuntimeConfigTest.java +++ b/codegen/smithy-aws-typescript-codegen/src/test/java/software/amazon/smithy/aws/typescript/codegen/AddAwsRuntimeConfigTest.java @@ -37,7 +37,7 @@ public void addsAwsRuntimeConfigSettings() { // Check that both the config files were updated. assertThat(manifest.getFileString("runtimeConfig.ts").get(), containsString("credentialDefaultProvider")); - assertThat(manifest.getFileString("runtimeConfig.browser.ts").get(), containsString("invalidAsyncFunction")); + assertThat(manifest.getFileString("runtimeConfig.browser.ts").get(), containsString("invalidProvider")); // Check that the dependency interface was updated. assertThat(manifest.getFileString("NotSameClient.ts").get(), containsString("credentialDefaultProvider?")); diff --git a/packages/invalid-dependency/package.json b/packages/invalid-dependency/package.json index 645c9e72b3f9..8a163d966197 100644 --- a/packages/invalid-dependency/package.json +++ b/packages/invalid-dependency/package.json @@ -21,6 +21,7 @@ "tslib": "^1.8.0" }, "devDependencies": { + "@aws-sdk/types": "3.0.0", "@types/jest": "^26.0.4", "jest": "^26.1.0", "typescript": "~4.1.2" diff --git a/packages/invalid-dependency/src/index.ts b/packages/invalid-dependency/src/index.ts index 4f9e9a9951a5..fa0f1a6060c9 100644 --- a/packages/invalid-dependency/src/index.ts +++ b/packages/invalid-dependency/src/index.ts @@ -1,2 +1,2 @@ export * from "./invalidFunction"; -export * from "./invalidAsyncFunction"; +export * from "./invalidProvider"; diff --git a/packages/invalid-dependency/src/invalidAsyncFunction.spec.ts b/packages/invalid-dependency/src/invalidAsyncFunction.spec.ts deleted file mode 100644 index 7801c34672d9..000000000000 --- a/packages/invalid-dependency/src/invalidAsyncFunction.spec.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { invalidAsyncFunction } from "./invalidAsyncFunction"; - -describe("invalidAsyncFunction", () => { - it("rejects with error containing message", async () => { - const message = "Error"; - await expect(invalidAsyncFunction(message)).rejects.toThrow(new Error(message)); - }); -}); diff --git a/packages/invalid-dependency/src/invalidAsyncFunction.ts b/packages/invalid-dependency/src/invalidAsyncFunction.ts deleted file mode 100644 index ea31e5e2db63..000000000000 --- a/packages/invalid-dependency/src/invalidAsyncFunction.ts +++ /dev/null @@ -1 +0,0 @@ -export const invalidAsyncFunction = (message: string) => () => Promise.reject(new Error(message)); diff --git a/packages/invalid-dependency/src/invalidProvider.spec.ts b/packages/invalid-dependency/src/invalidProvider.spec.ts new file mode 100644 index 000000000000..4b7d01a6bc16 --- /dev/null +++ b/packages/invalid-dependency/src/invalidProvider.spec.ts @@ -0,0 +1,10 @@ +import { invalidProvider } from "./invalidProvider"; + +describe("invalidProvider", () => { + it("rejects with error containing message", async () => { + const message = "Error"; + const provider = invalidProvider(message); + //@ts-ignore + await expect(provider()).rejects.toEqual(message); + }); +}); diff --git a/packages/invalid-dependency/src/invalidProvider.ts b/packages/invalid-dependency/src/invalidProvider.ts new file mode 100644 index 000000000000..37caac829b52 --- /dev/null +++ b/packages/invalid-dependency/src/invalidProvider.ts @@ -0,0 +1,2 @@ +import { Provider } from "@aws-sdk/types"; +export const invalidProvider: (message: string) => Provider = (message: string) => () => Promise.reject(message); diff --git a/protocol_tests/aws-ec2/runtimeConfig.browser.ts b/protocol_tests/aws-ec2/runtimeConfig.browser.ts index 0d58d1320614..689c060f16ba 100644 --- a/protocol_tests/aws-ec2/runtimeConfig.browser.ts +++ b/protocol_tests/aws-ec2/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/protocol_tests/aws-json/runtimeConfig.browser.ts b/protocol_tests/aws-json/runtimeConfig.browser.ts index 3efd7bc8a34c..531edf08ee36 100644 --- a/protocol_tests/aws-json/runtimeConfig.browser.ts +++ b/protocol_tests/aws-json/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/protocol_tests/aws-query/runtimeConfig.browser.ts b/protocol_tests/aws-query/runtimeConfig.browser.ts index 854caebc955a..8cf6562cc7e0 100644 --- a/protocol_tests/aws-query/runtimeConfig.browser.ts +++ b/protocol_tests/aws-query/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/protocol_tests/aws-restjson/runtimeConfig.browser.ts b/protocol_tests/aws-restjson/runtimeConfig.browser.ts index dd586f92ed3c..69728fc749b5 100644 --- a/protocol_tests/aws-restjson/runtimeConfig.browser.ts +++ b/protocol_tests/aws-restjson/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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, diff --git a/protocol_tests/aws-restxml/runtimeConfig.browser.ts b/protocol_tests/aws-restxml/runtimeConfig.browser.ts index fbb3e306ed3b..f73058632bd5 100644 --- a/protocol_tests/aws-restxml/runtimeConfig.browser.ts +++ b/protocol_tests/aws-restxml/runtimeConfig.browser.ts @@ -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"; @@ -21,13 +21,13 @@ export const ClientDefaultValues: Required = { 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,