@aws-sdk/dsql-signer 3.855.0 → 3.856.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.
Files changed (2) hide show
  1. package/README.md +10 -5
  2. package/package.json +6 -3
package/README.md CHANGED
@@ -32,31 +32,36 @@ const { DsqlSigner } = require("@aws-sdk/dsql-signer");
32
32
  ### Generate Authentication Token for Dsql IAM Authentication
33
33
 
34
34
  ```js
35
+ import { Hash } from "@smithy/hash-node";
36
+ import { fromNodeProviderChain } from "@aws-sdk/credential-providers";
37
+
35
38
  const signer = new DsqlSigner({
36
39
  /**
37
40
  * Required: The hostname of the database to connect to.
38
41
  */
39
- hostname: "foo0bar1baz2quux3quux4.dsql.us-east-1.on.aws";
42
+ hostname: "foo0bar1baz2quux3quux4.dsql.us-east-1.on.aws",
40
43
 
41
44
  /**
42
45
  * Optional: The region the database is located in. Uses the region inferred from the runtime if omitted.
43
46
  */
44
- region?: "us-east-1";
47
+ region: "us-east-1",
45
48
 
46
49
  /**
47
50
  * Optional: The SHA256 hasher constructor to sign the request.
48
51
  */
49
- sha256?: HashCtor;
52
+ sha256: Hash.bind(null, "sha256"),
50
53
 
51
54
  /**
52
55
  * Optional: The amount of time in seconds the generated token is valid
53
56
  */
54
- expiresIn?: 3600;
57
+ expiresIn: 3600,
55
58
 
56
59
  /**
57
60
  * Optional: The AWS credentials to sign requests with. Uses the default credential provider chain if not specified.
61
+ * You can use any credential provider from https://www.npmjs.com/package/@aws-sdk/credential-providers,
62
+ * or provide a credentials object.
58
63
  */
59
- credentials?: fromNodeCredentialProvider();
64
+ credentials: fromNodeProviderChain(),
60
65
  });
61
66
 
62
67
  // Creates auth token.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/dsql-signer",
3
- "version": "3.855.0",
3
+ "version": "3.856.0",
4
4
  "description": "Dsql utility for generating a password token that can be used for IAM authentication to a Dsql Database.",
5
5
  "main": "./dist-cjs/index.js",
6
6
  "module": "./dist-es/index.js",
@@ -14,7 +14,10 @@
14
14
  "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
15
15
  "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo",
16
16
  "extract:docs": "api-extractor run --local",
17
- "test": "yarn g:vitest run"
17
+ "test": "yarn g:vitest run",
18
+ "test:watch": "yarn g:vitest watch",
19
+ "test:integration": "yarn g:vitest run -c vitest.config.integ.ts",
20
+ "test:integration:watch": "yarn g:vitest watch -c vitest.config.integ.ts"
18
21
  },
19
22
  "engines": {
20
23
  "node": ">=18.0.0"
@@ -27,7 +30,7 @@
27
30
  "dependencies": {
28
31
  "@aws-crypto/sha256-browser": "5.2.0",
29
32
  "@aws-crypto/sha256-js": "5.2.0",
30
- "@aws-sdk/credential-providers": "3.855.0",
33
+ "@aws-sdk/credential-providers": "3.856.0",
31
34
  "@aws-sdk/util-format-url": "3.840.0",
32
35
  "@smithy/config-resolver": "^4.1.4",
33
36
  "@smithy/hash-node": "^4.0.4",