@smithy/signature-v4 5.2.0 → 5.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.
@@ -82,6 +82,7 @@ var HEADER_VALUE_TYPE;
82
82
  })(HEADER_VALUE_TYPE || (HEADER_VALUE_TYPE = {}));
83
83
  const UUID_PATTERN = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;
84
84
  export class Int64 {
85
+ bytes;
85
86
  constructor(bytes) {
86
87
  this.bytes = bytes;
87
88
  if (bytes.byteLength !== 8) {
@@ -89,7 +90,7 @@ export class Int64 {
89
90
  }
90
91
  }
91
92
  static fromNumber(number) {
92
- if (number > 9223372036854776000 || number < -9223372036854776000) {
93
+ if (number > 9_223_372_036_854_775_807 || number < -9_223_372_036_854_775_808) {
93
94
  throw new Error(`${number} is too large (or, if negative, too small) to represent as an Int64`);
94
95
  }
95
96
  const bytes = new Uint8Array(8);
@@ -10,6 +10,7 @@ import { moveHeadersToQuery } from "./moveHeadersToQuery";
10
10
  import { prepareRequest } from "./prepareRequest";
11
11
  import { SignatureV4Base } from "./SignatureV4Base";
12
12
  export class SignatureV4 extends SignatureV4Base {
13
+ headerFormatter = new HeaderFormatter();
13
14
  constructor({ applyChecksum, credentials, region, service, sha256, uriEscapePath = true, }) {
14
15
  super({
15
16
  applyChecksum,
@@ -19,7 +20,6 @@ export class SignatureV4 extends SignatureV4Base {
19
20
  sha256,
20
21
  uriEscapePath,
21
22
  });
22
- this.headerFormatter = new HeaderFormatter();
23
23
  }
24
24
  async presign(originalRequest, options = {}) {
25
25
  const { signingDate = new Date(), expiresIn = 3600, unsignableHeaders, unhoistableHeaders, signableHeaders, hoistableHeaders, signingRegion, signingService, } = options;
@@ -5,6 +5,12 @@ import { toUint8Array } from "@smithy/util-utf8";
5
5
  import { getCanonicalQuery } from "./getCanonicalQuery";
6
6
  import { iso8601 } from "./utilDate";
7
7
  export class SignatureV4Base {
8
+ service;
9
+ regionProvider;
10
+ credentialProvider;
11
+ sha256;
12
+ uriEscapePath;
13
+ applyChecksum;
8
14
  constructor({ applyChecksum, credentials, region, service, sha256, uriEscapePath = true, }) {
9
15
  this.service = service;
10
16
  this.sha256 = sha256;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/signature-v4",
3
- "version": "5.2.0",
3
+ "version": "5.3.0",
4
4
  "description": "A standalone implementation of the AWS Signature V4 request signing algorithm",
5
5
  "main": "./dist-cjs/index.js",
6
6
  "module": "./dist-es/index.js",
@@ -26,13 +26,13 @@
26
26
  "license": "Apache-2.0",
27
27
  "sideEffects": false,
28
28
  "dependencies": {
29
- "@smithy/is-array-buffer": "^4.1.0",
30
- "@smithy/protocol-http": "^5.2.0",
31
- "@smithy/types": "^4.4.0",
32
- "@smithy/util-hex-encoding": "^4.1.0",
33
- "@smithy/util-middleware": "^4.1.0",
34
- "@smithy/util-uri-escape": "^4.1.0",
35
- "@smithy/util-utf8": "^4.1.0",
29
+ "@smithy/is-array-buffer": "^4.2.0",
30
+ "@smithy/protocol-http": "^5.3.0",
31
+ "@smithy/types": "^4.6.0",
32
+ "@smithy/util-hex-encoding": "^4.2.0",
33
+ "@smithy/util-middleware": "^4.2.0",
34
+ "@smithy/util-uri-escape": "^4.2.0",
35
+ "@smithy/util-utf8": "^4.2.0",
36
36
  "tslib": "^2.6.2"
37
37
  },
38
38
  "devDependencies": {
@@ -1 +0,0 @@
1
- module.exports = require("./index.js");
@@ -1 +0,0 @@
1
- module.exports = require("./index.js");
@@ -1 +0,0 @@
1
- module.exports = require("./index.js");
@@ -1 +0,0 @@
1
- module.exports = require("./index.js");
@@ -1 +0,0 @@
1
- module.exports = require("./index.js");
@@ -1 +0,0 @@
1
- module.exports = require("./index.js");
@@ -1 +0,0 @@
1
- module.exports = require("./index.js");
@@ -1 +0,0 @@
1
- module.exports = require("./index.js");
@@ -1 +0,0 @@
1
- module.exports = require("./index.js");
@@ -1 +0,0 @@
1
- module.exports = require("./index.js");
@@ -1 +0,0 @@
1
- module.exports = require("./index.js");
@@ -1 +0,0 @@
1
- module.exports = require("./index.js");
@@ -1 +0,0 @@
1
- module.exports = require("./index.js");
@@ -1 +0,0 @@
1
- module.exports = require("./index.js");