@smithy/core 2.2.7 → 2.3.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
@@ -210,6 +210,7 @@ __name(_DefaultIdentityProviderConfig, "DefaultIdentityProviderConfig");
210
210
  var DefaultIdentityProviderConfig = _DefaultIdentityProviderConfig;
211
211
 
212
212
  // src/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.ts
213
+
213
214
  var import_types = require("@smithy/types");
214
215
  var _HttpApiKeyAuthSigner = class _HttpApiKeyAuthSigner {
215
216
  async sign(httpRequest, identity, signingProperties) {
@@ -227,7 +228,7 @@ var _HttpApiKeyAuthSigner = class _HttpApiKeyAuthSigner {
227
228
  if (!identity.apiKey) {
228
229
  throw new Error("request could not be signed with `apiKey` since the `apiKey` is not defined");
229
230
  }
230
- const clonedRequest = httpRequest.clone();
231
+ const clonedRequest = import_protocol_http.HttpRequest.clone(httpRequest);
231
232
  if (signingProperties.in === import_types.HttpApiKeyAuthLocation.QUERY) {
232
233
  clonedRequest.query[signingProperties.name] = identity.apiKey;
233
234
  } else if (signingProperties.in === import_types.HttpApiKeyAuthLocation.HEADER) {
@@ -244,9 +245,10 @@ __name(_HttpApiKeyAuthSigner, "HttpApiKeyAuthSigner");
244
245
  var HttpApiKeyAuthSigner = _HttpApiKeyAuthSigner;
245
246
 
246
247
  // src/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.ts
248
+
247
249
  var _HttpBearerAuthSigner = class _HttpBearerAuthSigner {
248
250
  async sign(httpRequest, identity, signingProperties) {
249
- const clonedRequest = httpRequest.clone();
251
+ const clonedRequest = import_protocol_http.HttpRequest.clone(httpRequest);
250
252
  if (!identity.token) {
251
253
  throw new Error("request could not be signed with `token` since the `token` is not defined");
252
254
  }
@@ -1,3 +1,4 @@
1
+ import { HttpRequest } from "@smithy/protocol-http";
1
2
  import { HttpApiKeyAuthLocation } from "@smithy/types";
2
3
  export class HttpApiKeyAuthSigner {
3
4
  async sign(httpRequest, identity, signingProperties) {
@@ -13,7 +14,7 @@ export class HttpApiKeyAuthSigner {
13
14
  if (!identity.apiKey) {
14
15
  throw new Error("request could not be signed with `apiKey` since the `apiKey` is not defined");
15
16
  }
16
- const clonedRequest = httpRequest.clone();
17
+ const clonedRequest = HttpRequest.clone(httpRequest);
17
18
  if (signingProperties.in === HttpApiKeyAuthLocation.QUERY) {
18
19
  clonedRequest.query[signingProperties.name] = identity.apiKey;
19
20
  }
@@ -1,6 +1,7 @@
1
+ import { HttpRequest } from "@smithy/protocol-http";
1
2
  export class HttpBearerAuthSigner {
2
3
  async sign(httpRequest, identity, signingProperties) {
3
- const clonedRequest = httpRequest.clone();
4
+ const clonedRequest = HttpRequest.clone(httpRequest);
4
5
  if (!identity.token) {
5
6
  throw new Error("request could not be signed with `token` since the `token` is not defined");
6
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/core",
3
- "version": "2.2.7",
3
+ "version": "2.3.0",
4
4
  "scripts": {
5
5
  "build": "yarn lint && concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
6
6
  "build:cjs": "node ../../scripts/inline core",
@@ -38,11 +38,11 @@
38
38
  },
39
39
  "license": "Apache-2.0",
40
40
  "dependencies": {
41
- "@smithy/middleware-endpoint": "^3.0.5",
42
- "@smithy/middleware-retry": "^3.0.10",
41
+ "@smithy/middleware-endpoint": "^3.1.0",
42
+ "@smithy/middleware-retry": "^3.0.12",
43
43
  "@smithy/middleware-serde": "^3.0.3",
44
- "@smithy/protocol-http": "^4.0.4",
45
- "@smithy/smithy-client": "^3.1.8",
44
+ "@smithy/protocol-http": "^4.1.0",
45
+ "@smithy/smithy-client": "^3.1.10",
46
46
  "@smithy/types": "^3.3.0",
47
47
  "@smithy/util-middleware": "^3.0.3",
48
48
  "tslib": "^2.6.2"