@aws-sdk/xhr-http-handler 3.1045.0 → 3.1047.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist-cjs/index.js CHANGED
@@ -1,7 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var protocolHttp = require('@smithy/protocol-http');
4
- var querystringBuilder = require('@smithy/querystring-builder');
3
+ var protocols = require('@smithy/core/protocols');
5
4
  var events = require('events');
6
5
 
7
6
  const requestTimeout = (timeoutInMs = 0) => new Promise((resolve, reject) => {
@@ -73,7 +72,7 @@ class XhrHttpHandler extends events.EventEmitter {
73
72
  }
74
73
  let path = request.path;
75
74
  if (request.query) {
76
- const queryString = querystringBuilder.buildQueryString(request.query);
75
+ const queryString = protocols.buildQueryString(request.query);
77
76
  if (queryString) {
78
77
  path += `?${queryString}`;
79
78
  }
@@ -129,7 +128,7 @@ class XhrHttpHandler extends events.EventEmitter {
129
128
  reject(new Error(`Unexpected XHR response type ${xhr.responseType}. Expected string or arraybuffer.`));
130
129
  })();
131
130
  resolve({
132
- response: new protocolHttp.HttpResponse({
131
+ response: new protocols.HttpResponse({
133
132
  headers: this.responseHeaders(xhr.getAllResponseHeaders()),
134
133
  statusCode: xhr.status,
135
134
  body,
@@ -1,5 +1,4 @@
1
- import { HttpResponse } from "@smithy/protocol-http";
2
- import { buildQueryString } from "@smithy/querystring-builder";
1
+ import { buildQueryString, HttpResponse } from "@smithy/core/protocols";
3
2
  import { EventEmitter } from "events";
4
3
  import { requestTimeout as requestTimeoutFn } from "./request-timeout";
5
4
  const EVENTS = {
@@ -1,5 +1,5 @@
1
- import { HttpHandler, HttpRequest } from "@smithy/protocol-http";
2
- import { HttpResponse } from "@smithy/protocol-http";
1
+ import { HttpHandler, HttpRequest } from "@smithy/core/protocols";
2
+ import { HttpResponse } from "@smithy/core/protocols";
3
3
  import { HttpHandlerOptions, Provider } from "@smithy/types";
4
4
  import { EventEmitter } from "events";
5
5
  export interface XhrHttpHandlerOptions {
@@ -1,5 +1,5 @@
1
- import type { HttpHandler, HttpRequest } from "@smithy/protocol-http";
2
- import { HttpResponse } from "@smithy/protocol-http";
1
+ import type { HttpHandler, HttpRequest } from "@smithy/core/protocols";
2
+ import { HttpResponse } from "@smithy/core/protocols";
3
3
  import type { HttpHandlerOptions, Provider } from "@smithy/types";
4
4
  import { EventEmitter } from "events";
5
5
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/xhr-http-handler",
3
- "version": "3.1045.0",
3
+ "version": "3.1047.0",
4
4
  "description": "Provides a way to make requests using XMLHttpRequest",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
@@ -22,8 +22,7 @@
22
22
  "types": "./dist-types/index.d.ts",
23
23
  "dependencies": {
24
24
  "@aws-sdk/types": "^3.973.8",
25
- "@smithy/protocol-http": "^5.3.14",
26
- "@smithy/querystring-builder": "^4.2.14",
25
+ "@smithy/core": "^3.24.1",
27
26
  "@smithy/types": "^4.14.1",
28
27
  "events": "3.3.0",
29
28
  "tslib": "^2.6.2"