Skip to content

Commit

Permalink
feat: refactor http request handlers (#1186)
Browse files Browse the repository at this point in the history
* fix: support all the webs

* Collapse stream-collector-browser and stream-collector-native into stream-collector-web
* Update FetchHttpHandler to return blob if stream not implemented

* fix: check for existence of response body, not ReadableStream impl

* feat: move stream-collector-web into fetch-http-handler

* feat: move stream-collector-node into node-http-handler

* feat: codegen for refactoring request handlers and stream collector

* test: s3 integ test: import stream collector from handler package

* chore update fetch-http-handler.spec.ts

Co-authored-by: Russell Anthony <[email protected]>
Co-authored-by: Trivikram Kamat <[email protected]>
  • Loading branch information
3 people authored May 18, 2020
1 parent 117e9ca commit 605ebc5
Show file tree
Hide file tree
Showing 934 changed files with 529 additions and 4,997 deletions.
3 changes: 0 additions & 3 deletions clients/client-accessanalyzer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@
"@aws-sdk/protocol-http": "1.0.0-beta.4",
"@aws-sdk/region-provider": "1.0.0-beta.4",
"@aws-sdk/smithy-client": "1.0.0-beta.5",
"@aws-sdk/stream-collector-browser": "1.0.0-beta.4",
"@aws-sdk/stream-collector-native": "1.0.0-beta.4",
"@aws-sdk/stream-collector-node": "1.0.0-beta.4",
"@aws-sdk/types": "1.0.0-beta.4",
"@aws-sdk/url-parser-browser": "1.0.0-beta.4",
"@aws-sdk/url-parser-node": "1.0.0-beta.4",
Expand Down
3 changes: 1 addition & 2 deletions clients/client-accessanalyzer/runtimeConfig.browser.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { name, version } from "./package.json";
import { Sha256 } from "@aws-crypto/sha256-browser";
import { FetchHttpHandler } from "@aws-sdk/fetch-http-handler";
import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
import { invalidFunction } from "@aws-sdk/invalid-dependency";
import { streamCollector } from "@aws-sdk/stream-collector-browser";
import { parseUrl } from "@aws-sdk/url-parser-browser";
import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser";
import { calculateBodyLength } from "@aws-sdk/util-body-length-browser";
Expand Down
4 changes: 0 additions & 4 deletions clients/client-accessanalyzer/runtimeConfig.native.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { name, version } from "./package.json";
import { Sha256 } from "@aws-crypto/sha256-js";
import { FetchHttpHandler } from "@aws-sdk/fetch-http-handler";
import { streamCollector } from "@aws-sdk/stream-collector-native";
import { parseUrl } from "@aws-sdk/url-parser-node";
import { ClientDefaults } from "./AccessAnalyzerClient";
import { ClientDefaultValues as BrowserDefaults } from "./runtimeConfig.browser";
Expand All @@ -10,8 +8,6 @@ export const ClientDefaultValues: Required<ClientDefaults> = {
...BrowserDefaults,
runtime: "react-native",
defaultUserAgent: `aws-sdk-js-v3-react-native-${name}/${version}`,
requestHandler: new FetchHttpHandler({ bufferBody: true }),
sha256: Sha256,
streamCollector,
urlParser: parseUrl
};
3 changes: 1 addition & 2 deletions clients/client-accessanalyzer/runtimeConfig.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { name, version } from "./package.json";
import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
import { Hash } from "@aws-sdk/hash-node";
import { NodeHttpHandler } from "@aws-sdk/node-http-handler";
import { NodeHttpHandler, streamCollector } from "@aws-sdk/node-http-handler";
import { defaultProvider as regionDefaultProvider } from "@aws-sdk/region-provider";
import { streamCollector } from "@aws-sdk/stream-collector-node";
import { parseUrl } from "@aws-sdk/url-parser-node";
import { fromBase64, toBase64 } from "@aws-sdk/util-base64-node";
import { calculateBodyLength } from "@aws-sdk/util-body-length-node";
Expand Down
3 changes: 0 additions & 3 deletions clients/client-acm-pca/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@
"@aws-sdk/protocol-http": "1.0.0-beta.4",
"@aws-sdk/region-provider": "1.0.0-beta.4",
"@aws-sdk/smithy-client": "1.0.0-beta.5",
"@aws-sdk/stream-collector-browser": "1.0.0-beta.4",
"@aws-sdk/stream-collector-native": "1.0.0-beta.4",
"@aws-sdk/stream-collector-node": "1.0.0-beta.4",
"@aws-sdk/types": "1.0.0-beta.4",
"@aws-sdk/url-parser-browser": "1.0.0-beta.4",
"@aws-sdk/url-parser-node": "1.0.0-beta.4",
Expand Down
3 changes: 1 addition & 2 deletions clients/client-acm-pca/runtimeConfig.browser.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { name, version } from "./package.json";
import { Sha256 } from "@aws-crypto/sha256-browser";
import { FetchHttpHandler } from "@aws-sdk/fetch-http-handler";
import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
import { invalidFunction } from "@aws-sdk/invalid-dependency";
import { streamCollector } from "@aws-sdk/stream-collector-browser";
import { parseUrl } from "@aws-sdk/url-parser-browser";
import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser";
import { calculateBodyLength } from "@aws-sdk/util-body-length-browser";
Expand Down
4 changes: 0 additions & 4 deletions clients/client-acm-pca/runtimeConfig.native.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { name, version } from "./package.json";
import { Sha256 } from "@aws-crypto/sha256-js";
import { FetchHttpHandler } from "@aws-sdk/fetch-http-handler";
import { streamCollector } from "@aws-sdk/stream-collector-native";
import { parseUrl } from "@aws-sdk/url-parser-node";
import { ClientDefaults } from "./ACMPCAClient";
import { ClientDefaultValues as BrowserDefaults } from "./runtimeConfig.browser";
Expand All @@ -10,8 +8,6 @@ export const ClientDefaultValues: Required<ClientDefaults> = {
...BrowserDefaults,
runtime: "react-native",
defaultUserAgent: `aws-sdk-js-v3-react-native-${name}/${version}`,
requestHandler: new FetchHttpHandler({ bufferBody: true }),
sha256: Sha256,
streamCollector,
urlParser: parseUrl
};
3 changes: 1 addition & 2 deletions clients/client-acm-pca/runtimeConfig.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { name, version } from "./package.json";
import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
import { Hash } from "@aws-sdk/hash-node";
import { NodeHttpHandler } from "@aws-sdk/node-http-handler";
import { NodeHttpHandler, streamCollector } from "@aws-sdk/node-http-handler";
import { defaultProvider as regionDefaultProvider } from "@aws-sdk/region-provider";
import { streamCollector } from "@aws-sdk/stream-collector-node";
import { parseUrl } from "@aws-sdk/url-parser-node";
import { fromBase64, toBase64 } from "@aws-sdk/util-base64-node";
import { calculateBodyLength } from "@aws-sdk/util-body-length-node";
Expand Down
3 changes: 0 additions & 3 deletions clients/client-acm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@
"@aws-sdk/protocol-http": "1.0.0-beta.4",
"@aws-sdk/region-provider": "1.0.0-beta.4",
"@aws-sdk/smithy-client": "1.0.0-beta.5",
"@aws-sdk/stream-collector-browser": "1.0.0-beta.4",
"@aws-sdk/stream-collector-native": "1.0.0-beta.4",
"@aws-sdk/stream-collector-node": "1.0.0-beta.4",
"@aws-sdk/types": "1.0.0-beta.4",
"@aws-sdk/url-parser-browser": "1.0.0-beta.4",
"@aws-sdk/url-parser-node": "1.0.0-beta.4",
Expand Down
3 changes: 1 addition & 2 deletions clients/client-acm/runtimeConfig.browser.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { name, version } from "./package.json";
import { Sha256 } from "@aws-crypto/sha256-browser";
import { FetchHttpHandler } from "@aws-sdk/fetch-http-handler";
import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
import { invalidFunction } from "@aws-sdk/invalid-dependency";
import { streamCollector } from "@aws-sdk/stream-collector-browser";
import { parseUrl } from "@aws-sdk/url-parser-browser";
import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser";
import { calculateBodyLength } from "@aws-sdk/util-body-length-browser";
Expand Down
4 changes: 0 additions & 4 deletions clients/client-acm/runtimeConfig.native.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { name, version } from "./package.json";
import { Sha256 } from "@aws-crypto/sha256-js";
import { FetchHttpHandler } from "@aws-sdk/fetch-http-handler";
import { streamCollector } from "@aws-sdk/stream-collector-native";
import { parseUrl } from "@aws-sdk/url-parser-node";
import { ClientDefaults } from "./ACMClient";
import { ClientDefaultValues as BrowserDefaults } from "./runtimeConfig.browser";
Expand All @@ -10,8 +8,6 @@ export const ClientDefaultValues: Required<ClientDefaults> = {
...BrowserDefaults,
runtime: "react-native",
defaultUserAgent: `aws-sdk-js-v3-react-native-${name}/${version}`,
requestHandler: new FetchHttpHandler({ bufferBody: true }),
sha256: Sha256,
streamCollector,
urlParser: parseUrl
};
3 changes: 1 addition & 2 deletions clients/client-acm/runtimeConfig.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { name, version } from "./package.json";
import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
import { Hash } from "@aws-sdk/hash-node";
import { NodeHttpHandler } from "@aws-sdk/node-http-handler";
import { NodeHttpHandler, streamCollector } from "@aws-sdk/node-http-handler";
import { defaultProvider as regionDefaultProvider } from "@aws-sdk/region-provider";
import { streamCollector } from "@aws-sdk/stream-collector-node";
import { parseUrl } from "@aws-sdk/url-parser-node";
import { fromBase64, toBase64 } from "@aws-sdk/util-base64-node";
import { calculateBodyLength } from "@aws-sdk/util-body-length-node";
Expand Down
3 changes: 0 additions & 3 deletions clients/client-alexa-for-business/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@
"@aws-sdk/protocol-http": "1.0.0-beta.4",
"@aws-sdk/region-provider": "1.0.0-beta.4",
"@aws-sdk/smithy-client": "1.0.0-beta.5",
"@aws-sdk/stream-collector-browser": "1.0.0-beta.4",
"@aws-sdk/stream-collector-native": "1.0.0-beta.4",
"@aws-sdk/stream-collector-node": "1.0.0-beta.4",
"@aws-sdk/types": "1.0.0-beta.4",
"@aws-sdk/url-parser-browser": "1.0.0-beta.4",
"@aws-sdk/url-parser-node": "1.0.0-beta.4",
Expand Down
3 changes: 1 addition & 2 deletions clients/client-alexa-for-business/runtimeConfig.browser.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { name, version } from "./package.json";
import { Sha256 } from "@aws-crypto/sha256-browser";
import { FetchHttpHandler } from "@aws-sdk/fetch-http-handler";
import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
import { invalidFunction } from "@aws-sdk/invalid-dependency";
import { streamCollector } from "@aws-sdk/stream-collector-browser";
import { parseUrl } from "@aws-sdk/url-parser-browser";
import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser";
import { calculateBodyLength } from "@aws-sdk/util-body-length-browser";
Expand Down
4 changes: 0 additions & 4 deletions clients/client-alexa-for-business/runtimeConfig.native.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { name, version } from "./package.json";
import { Sha256 } from "@aws-crypto/sha256-js";
import { FetchHttpHandler } from "@aws-sdk/fetch-http-handler";
import { streamCollector } from "@aws-sdk/stream-collector-native";
import { parseUrl } from "@aws-sdk/url-parser-node";
import { ClientDefaults } from "./AlexaForBusinessClient";
import { ClientDefaultValues as BrowserDefaults } from "./runtimeConfig.browser";
Expand All @@ -10,8 +8,6 @@ export const ClientDefaultValues: Required<ClientDefaults> = {
...BrowserDefaults,
runtime: "react-native",
defaultUserAgent: `aws-sdk-js-v3-react-native-${name}/${version}`,
requestHandler: new FetchHttpHandler({ bufferBody: true }),
sha256: Sha256,
streamCollector,
urlParser: parseUrl
};
3 changes: 1 addition & 2 deletions clients/client-alexa-for-business/runtimeConfig.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { name, version } from "./package.json";
import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
import { Hash } from "@aws-sdk/hash-node";
import { NodeHttpHandler } from "@aws-sdk/node-http-handler";
import { NodeHttpHandler, streamCollector } from "@aws-sdk/node-http-handler";
import { defaultProvider as regionDefaultProvider } from "@aws-sdk/region-provider";
import { streamCollector } from "@aws-sdk/stream-collector-node";
import { parseUrl } from "@aws-sdk/url-parser-node";
import { fromBase64, toBase64 } from "@aws-sdk/util-base64-node";
import { calculateBodyLength } from "@aws-sdk/util-body-length-node";
Expand Down
3 changes: 0 additions & 3 deletions clients/client-amplify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@
"@aws-sdk/protocol-http": "1.0.0-beta.4",
"@aws-sdk/region-provider": "1.0.0-beta.4",
"@aws-sdk/smithy-client": "1.0.0-beta.5",
"@aws-sdk/stream-collector-browser": "1.0.0-beta.4",
"@aws-sdk/stream-collector-native": "1.0.0-beta.4",
"@aws-sdk/stream-collector-node": "1.0.0-beta.4",
"@aws-sdk/types": "1.0.0-beta.4",
"@aws-sdk/url-parser-browser": "1.0.0-beta.4",
"@aws-sdk/url-parser-node": "1.0.0-beta.4",
Expand Down
3 changes: 1 addition & 2 deletions clients/client-amplify/runtimeConfig.browser.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { name, version } from "./package.json";
import { Sha256 } from "@aws-crypto/sha256-browser";
import { FetchHttpHandler } from "@aws-sdk/fetch-http-handler";
import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
import { invalidFunction } from "@aws-sdk/invalid-dependency";
import { streamCollector } from "@aws-sdk/stream-collector-browser";
import { parseUrl } from "@aws-sdk/url-parser-browser";
import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser";
import { calculateBodyLength } from "@aws-sdk/util-body-length-browser";
Expand Down
4 changes: 0 additions & 4 deletions clients/client-amplify/runtimeConfig.native.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { name, version } from "./package.json";
import { Sha256 } from "@aws-crypto/sha256-js";
import { FetchHttpHandler } from "@aws-sdk/fetch-http-handler";
import { streamCollector } from "@aws-sdk/stream-collector-native";
import { parseUrl } from "@aws-sdk/url-parser-node";
import { ClientDefaults } from "./AmplifyClient";
import { ClientDefaultValues as BrowserDefaults } from "./runtimeConfig.browser";
Expand All @@ -10,8 +8,6 @@ export const ClientDefaultValues: Required<ClientDefaults> = {
...BrowserDefaults,
runtime: "react-native",
defaultUserAgent: `aws-sdk-js-v3-react-native-${name}/${version}`,
requestHandler: new FetchHttpHandler({ bufferBody: true }),
sha256: Sha256,
streamCollector,
urlParser: parseUrl
};
3 changes: 1 addition & 2 deletions clients/client-amplify/runtimeConfig.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { name, version } from "./package.json";
import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
import { Hash } from "@aws-sdk/hash-node";
import { NodeHttpHandler } from "@aws-sdk/node-http-handler";
import { NodeHttpHandler, streamCollector } from "@aws-sdk/node-http-handler";
import { defaultProvider as regionDefaultProvider } from "@aws-sdk/region-provider";
import { streamCollector } from "@aws-sdk/stream-collector-node";
import { parseUrl } from "@aws-sdk/url-parser-node";
import { fromBase64, toBase64 } from "@aws-sdk/util-base64-node";
import { calculateBodyLength } from "@aws-sdk/util-body-length-node";
Expand Down
3 changes: 0 additions & 3 deletions clients/client-api-gateway/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@
"@aws-sdk/protocol-http": "1.0.0-beta.4",
"@aws-sdk/region-provider": "1.0.0-beta.4",
"@aws-sdk/smithy-client": "1.0.0-beta.5",
"@aws-sdk/stream-collector-browser": "1.0.0-beta.4",
"@aws-sdk/stream-collector-native": "1.0.0-beta.4",
"@aws-sdk/stream-collector-node": "1.0.0-beta.4",
"@aws-sdk/types": "1.0.0-beta.4",
"@aws-sdk/url-parser-browser": "1.0.0-beta.4",
"@aws-sdk/url-parser-node": "1.0.0-beta.4",
Expand Down
3 changes: 1 addition & 2 deletions clients/client-api-gateway/runtimeConfig.browser.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { name, version } from "./package.json";
import { Sha256 } from "@aws-crypto/sha256-browser";
import { FetchHttpHandler } from "@aws-sdk/fetch-http-handler";
import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
import { invalidFunction } from "@aws-sdk/invalid-dependency";
import { streamCollector } from "@aws-sdk/stream-collector-browser";
import { parseUrl } from "@aws-sdk/url-parser-browser";
import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser";
import { calculateBodyLength } from "@aws-sdk/util-body-length-browser";
Expand Down
4 changes: 0 additions & 4 deletions clients/client-api-gateway/runtimeConfig.native.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { name, version } from "./package.json";
import { Sha256 } from "@aws-crypto/sha256-js";
import { FetchHttpHandler } from "@aws-sdk/fetch-http-handler";
import { streamCollector } from "@aws-sdk/stream-collector-native";
import { parseUrl } from "@aws-sdk/url-parser-node";
import { ClientDefaults } from "./APIGatewayClient";
import { ClientDefaultValues as BrowserDefaults } from "./runtimeConfig.browser";
Expand All @@ -10,8 +8,6 @@ export const ClientDefaultValues: Required<ClientDefaults> = {
...BrowserDefaults,
runtime: "react-native",
defaultUserAgent: `aws-sdk-js-v3-react-native-${name}/${version}`,
requestHandler: new FetchHttpHandler({ bufferBody: true }),
sha256: Sha256,
streamCollector,
urlParser: parseUrl
};
3 changes: 1 addition & 2 deletions clients/client-api-gateway/runtimeConfig.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { name, version } from "./package.json";
import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
import { Hash } from "@aws-sdk/hash-node";
import { NodeHttpHandler } from "@aws-sdk/node-http-handler";
import { NodeHttpHandler, streamCollector } from "@aws-sdk/node-http-handler";
import { defaultProvider as regionDefaultProvider } from "@aws-sdk/region-provider";
import { streamCollector } from "@aws-sdk/stream-collector-node";
import { parseUrl } from "@aws-sdk/url-parser-node";
import { fromBase64, toBase64 } from "@aws-sdk/util-base64-node";
import { calculateBodyLength } from "@aws-sdk/util-body-length-node";
Expand Down
3 changes: 0 additions & 3 deletions clients/client-apigatewaymanagementapi/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@
"@aws-sdk/protocol-http": "1.0.0-beta.4",
"@aws-sdk/region-provider": "1.0.0-beta.4",
"@aws-sdk/smithy-client": "1.0.0-beta.5",
"@aws-sdk/stream-collector-browser": "1.0.0-beta.4",
"@aws-sdk/stream-collector-native": "1.0.0-beta.4",
"@aws-sdk/stream-collector-node": "1.0.0-beta.4",
"@aws-sdk/types": "1.0.0-beta.4",
"@aws-sdk/url-parser-browser": "1.0.0-beta.4",
"@aws-sdk/url-parser-node": "1.0.0-beta.4",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { name, version } from "./package.json";
import { Sha256 } from "@aws-crypto/sha256-browser";
import { FetchHttpHandler } from "@aws-sdk/fetch-http-handler";
import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
import { invalidFunction } from "@aws-sdk/invalid-dependency";
import { streamCollector } from "@aws-sdk/stream-collector-browser";
import { parseUrl } from "@aws-sdk/url-parser-browser";
import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser";
import { calculateBodyLength } from "@aws-sdk/util-body-length-browser";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { name, version } from "./package.json";
import { Sha256 } from "@aws-crypto/sha256-js";
import { FetchHttpHandler } from "@aws-sdk/fetch-http-handler";
import { streamCollector } from "@aws-sdk/stream-collector-native";
import { parseUrl } from "@aws-sdk/url-parser-node";
import { ClientDefaults } from "./ApiGatewayManagementApiClient";
import { ClientDefaultValues as BrowserDefaults } from "./runtimeConfig.browser";
Expand All @@ -10,8 +8,6 @@ export const ClientDefaultValues: Required<ClientDefaults> = {
...BrowserDefaults,
runtime: "react-native",
defaultUserAgent: `aws-sdk-js-v3-react-native-${name}/${version}`,
requestHandler: new FetchHttpHandler({ bufferBody: true }),
sha256: Sha256,
streamCollector,
urlParser: parseUrl
};
3 changes: 1 addition & 2 deletions clients/client-apigatewaymanagementapi/runtimeConfig.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { name, version } from "./package.json";
import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
import { Hash } from "@aws-sdk/hash-node";
import { NodeHttpHandler } from "@aws-sdk/node-http-handler";
import { NodeHttpHandler, streamCollector } from "@aws-sdk/node-http-handler";
import { defaultProvider as regionDefaultProvider } from "@aws-sdk/region-provider";
import { streamCollector } from "@aws-sdk/stream-collector-node";
import { parseUrl } from "@aws-sdk/url-parser-node";
import { fromBase64, toBase64 } from "@aws-sdk/util-base64-node";
import { calculateBodyLength } from "@aws-sdk/util-body-length-node";
Expand Down
3 changes: 0 additions & 3 deletions clients/client-apigatewayv2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@
"@aws-sdk/protocol-http": "1.0.0-beta.4",
"@aws-sdk/region-provider": "1.0.0-beta.4",
"@aws-sdk/smithy-client": "1.0.0-beta.5",
"@aws-sdk/stream-collector-browser": "1.0.0-beta.4",
"@aws-sdk/stream-collector-native": "1.0.0-beta.4",
"@aws-sdk/stream-collector-node": "1.0.0-beta.4",
"@aws-sdk/types": "1.0.0-beta.4",
"@aws-sdk/url-parser-browser": "1.0.0-beta.4",
"@aws-sdk/url-parser-node": "1.0.0-beta.4",
Expand Down
3 changes: 1 addition & 2 deletions clients/client-apigatewayv2/runtimeConfig.browser.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { name, version } from "./package.json";
import { Sha256 } from "@aws-crypto/sha256-browser";
import { FetchHttpHandler } from "@aws-sdk/fetch-http-handler";
import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
import { invalidFunction } from "@aws-sdk/invalid-dependency";
import { streamCollector } from "@aws-sdk/stream-collector-browser";
import { parseUrl } from "@aws-sdk/url-parser-browser";
import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser";
import { calculateBodyLength } from "@aws-sdk/util-body-length-browser";
Expand Down
4 changes: 0 additions & 4 deletions clients/client-apigatewayv2/runtimeConfig.native.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { name, version } from "./package.json";
import { Sha256 } from "@aws-crypto/sha256-js";
import { FetchHttpHandler } from "@aws-sdk/fetch-http-handler";
import { streamCollector } from "@aws-sdk/stream-collector-native";
import { parseUrl } from "@aws-sdk/url-parser-node";
import { ClientDefaults } from "./ApiGatewayV2Client";
import { ClientDefaultValues as BrowserDefaults } from "./runtimeConfig.browser";
Expand All @@ -10,8 +8,6 @@ export const ClientDefaultValues: Required<ClientDefaults> = {
...BrowserDefaults,
runtime: "react-native",
defaultUserAgent: `aws-sdk-js-v3-react-native-${name}/${version}`,
requestHandler: new FetchHttpHandler({ bufferBody: true }),
sha256: Sha256,
streamCollector,
urlParser: parseUrl
};
3 changes: 1 addition & 2 deletions clients/client-apigatewayv2/runtimeConfig.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { name, version } from "./package.json";
import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
import { Hash } from "@aws-sdk/hash-node";
import { NodeHttpHandler } from "@aws-sdk/node-http-handler";
import { NodeHttpHandler, streamCollector } from "@aws-sdk/node-http-handler";
import { defaultProvider as regionDefaultProvider } from "@aws-sdk/region-provider";
import { streamCollector } from "@aws-sdk/stream-collector-node";
import { parseUrl } from "@aws-sdk/url-parser-node";
import { fromBase64, toBase64 } from "@aws-sdk/util-base64-node";
import { calculateBodyLength } from "@aws-sdk/util-body-length-node";
Expand Down
Loading

0 comments on commit 605ebc5

Please sign in to comment.