@aws-sdk/signature-v4-multi-region 3.428.0 → 3.437.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/README.md CHANGED
@@ -3,12 +3,9 @@
3
3
  [![NPM version](https://img.shields.io/npm/v/@aws-sdk/signature-v4-multi-region/latest.svg)](https://www.npmjs.com/package/@aws-sdk/signature-v4-multi-region)
4
4
  [![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/signature-v4-multi-region.svg)](https://www.npmjs.com/package/@aws-sdk/signature-v4-multi-region)
5
5
 
6
- > An internal package
7
-
6
+ See also https://github.com/aws/aws-sdk-js-v3/tree/main#functionality-requiring-aws-common-runtime-crt.
8
7
  ## Usage
9
8
 
10
- You probably shouldn't, at least directly.
11
-
12
9
  This package contains optional dependency [`@aws-sdk/signature-v4-crt`](https://www.npmjs.com/package/@aws-sdk/signature-v4).
13
10
  You need to install this package explicitly to sign an un-regional request using SigV4a algorithm. The package contains
14
11
  Node.js native implementation which requires building at installation. The installed package MAY NOT work if the
@@ -2,7 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SignatureV4MultiRegion = void 0;
4
4
  const signature_v4_1 = require("@smithy/signature-v4");
5
- const load_crt_1 = require("./load-crt");
6
5
  const signature_v4_crt_container_1 = require("./signature-v4-crt-container");
7
6
  class SignatureV4MultiRegion {
8
7
  constructor(options) {
@@ -29,14 +28,16 @@ class SignatureV4MultiRegion {
29
28
  if (!this.sigv4aSigner) {
30
29
  let CrtSignerV4 = null;
31
30
  try {
32
- (0, load_crt_1.loadCrt)();
33
31
  CrtSignerV4 = signature_v4_crt_container_1.signatureV4CrtContainer.CrtSignerV4;
34
32
  if (typeof CrtSignerV4 !== "function")
35
33
  throw new Error();
36
34
  }
37
35
  catch (e) {
38
36
  e.message =
39
- `${e.message}\nPlease check if you have installed "@aws-sdk/signature-v4-crt" package explicitly. \n` +
37
+ `${e.message}\n` +
38
+ `Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. \n` +
39
+ `You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] ` +
40
+ `or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. \n` +
40
41
  "For more information please go to " +
41
42
  "https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt";
42
43
  throw e;
@@ -1,5 +1,4 @@
1
1
  import { SignatureV4 } from "@smithy/signature-v4";
2
- import { loadCrt } from "./load-crt";
3
2
  import { signatureV4CrtContainer } from "./signature-v4-crt-container";
4
3
  export class SignatureV4MultiRegion {
5
4
  constructor(options) {
@@ -26,14 +25,16 @@ export class SignatureV4MultiRegion {
26
25
  if (!this.sigv4aSigner) {
27
26
  let CrtSignerV4 = null;
28
27
  try {
29
- loadCrt();
30
28
  CrtSignerV4 = signatureV4CrtContainer.CrtSignerV4;
31
29
  if (typeof CrtSignerV4 !== "function")
32
30
  throw new Error();
33
31
  }
34
32
  catch (e) {
35
33
  e.message =
36
- `${e.message}\nPlease check if you have installed "@aws-sdk/signature-v4-crt" package explicitly. \n` +
34
+ `${e.message}\n` +
35
+ `Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. \n` +
36
+ `You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] ` +
37
+ `or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. \n` +
37
38
  "For more information please go to " +
38
39
  "https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt";
39
40
  throw e;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/signature-v4-multi-region",
3
- "version": "3.428.0",
3
+ "version": "3.437.0",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
6
6
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -14,22 +14,16 @@
14
14
  "main": "./dist-cjs/index.js",
15
15
  "module": "./dist-es/index.js",
16
16
  "types": "./dist-types/index.d.ts",
17
- "browser": {
18
- "./dist-es/load-crt": "./dist-es/load-crt.browser"
19
- },
20
- "react-native": {
21
- "./dist-es/load-crt": "./dist-es/load-crt.browser"
22
- },
23
17
  "author": {
24
18
  "name": "AWS SDK for JavaScript Team",
25
19
  "url": "https://aws.amazon.com/javascript/"
26
20
  },
27
21
  "license": "Apache-2.0",
28
22
  "dependencies": {
29
- "@aws-sdk/types": "3.428.0",
30
- "@smithy/protocol-http": "^3.0.7",
23
+ "@aws-sdk/types": "3.433.0",
24
+ "@smithy/protocol-http": "^3.0.8",
31
25
  "@smithy/signature-v4": "^2.0.0",
32
- "@smithy/types": "^2.3.5",
26
+ "@smithy/types": "^2.4.0",
33
27
  "tslib": "^2.5.0"
34
28
  },
35
29
  "devDependencies": {
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.loadCrt = void 0;
4
- function loadCrt() { }
5
- exports.loadCrt = loadCrt;
@@ -1,30 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.loadCrt = void 0;
4
- const signature_v4_crt_container_1 = require("./signature-v4-crt-container");
5
- function loadCrt() {
6
- if (signature_v4_crt_container_1.signatureV4CrtContainer.CrtSignerV4) {
7
- return;
8
- }
9
- try {
10
- if (typeof require === "function") {
11
- const __require = require;
12
- const moduleName = "@aws-sdk/signature-v4-crt";
13
- __require.call(null, moduleName);
14
- process.emitWarning(`The package @aws-sdk/signature-v4-crt has been loaded dynamically.
15
- To avoid this warning, please explicitly import the package in your application with:
16
-
17
- import "@aws-sdk/signature-v4-crt"; // ESM
18
- require("@aws-sdk/signature-v4-crt"); // CJS
19
-
20
- In a future version of the AWS SDK for JavaScript (v3), this warning
21
- will become an error and dynamic loading will not be available.
22
-
23
- See https://github.com/aws/aws-sdk-js-v3/issues/5229.
24
- `);
25
- }
26
- }
27
- catch (e) {
28
- }
29
- }
30
- exports.loadCrt = loadCrt;
@@ -1 +0,0 @@
1
- export function loadCrt() { }
@@ -1,26 +0,0 @@
1
- import { signatureV4CrtContainer } from "./signature-v4-crt-container";
2
- export function loadCrt() {
3
- if (signatureV4CrtContainer.CrtSignerV4) {
4
- return;
5
- }
6
- try {
7
- if (typeof require === "function") {
8
- const __require = require;
9
- const moduleName = "@aws-sdk/signature-v4-crt";
10
- __require.call(null, moduleName);
11
- process.emitWarning(`The package @aws-sdk/signature-v4-crt has been loaded dynamically.
12
- To avoid this warning, please explicitly import the package in your application with:
13
-
14
- import "@aws-sdk/signature-v4-crt"; // ESM
15
- require("@aws-sdk/signature-v4-crt"); // CJS
16
-
17
- In a future version of the AWS SDK for JavaScript (v3), this warning
18
- will become an error and dynamic loading will not be available.
19
-
20
- See https://github.com/aws/aws-sdk-js-v3/issues/5229.
21
- `);
22
- }
23
- }
24
- catch (e) {
25
- }
26
- }
@@ -1,4 +0,0 @@
1
- /**
2
- * @internal
3
- */
4
- export declare function loadCrt(): void;
@@ -1,4 +0,0 @@
1
- /**
2
- * @internal
3
- */
4
- export declare function loadCrt(): void;
@@ -1 +0,0 @@
1
- export declare function loadCrt(): void;
@@ -1 +0,0 @@
1
- export declare function loadCrt(): void;