@aws-sdk/rds-signer 3.713.0 → 3.715.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.
@@ -9,8 +9,15 @@ const getRuntimeConfig = (config) => {
9
9
  return {
10
10
  runtime: "node",
11
11
  sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"),
12
- credentials: config?.credentials ?? (0, credential_providers_1.fromNodeProviderChain)(),
13
- region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS),
12
+ credentials: config?.credentials ??
13
+ (0, credential_providers_1.fromNodeProviderChain)({
14
+ profile: config.profile,
15
+ }),
16
+ region: config?.region ??
17
+ (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, {
18
+ ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS,
19
+ profile: config.profile,
20
+ }),
14
21
  ...config,
15
22
  };
16
23
  };
@@ -6,8 +6,15 @@ export const getRuntimeConfig = (config) => {
6
6
  return {
7
7
  runtime: "node",
8
8
  sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
9
- credentials: config?.credentials ?? fromNodeProviderChain(),
10
- region: config?.region ?? loadConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS),
9
+ credentials: config?.credentials ??
10
+ fromNodeProviderChain({
11
+ profile: config.profile,
12
+ }),
13
+ region: config?.region ??
14
+ loadConfig(NODE_REGION_CONFIG_OPTIONS, {
15
+ ...NODE_REGION_CONFIG_FILE_OPTIONS,
16
+ profile: config.profile,
17
+ }),
11
18
  ...config,
12
19
  };
13
20
  };
@@ -1,7 +1,8 @@
1
1
  import { AwsCredentialIdentity, AwsCredentialIdentityProvider, ChecksumConstructor, HashConstructor } from "@smithy/types";
2
2
  export interface SignerConfig {
3
3
  /**
4
- * The AWS credentials to sign requests with. Uses the default credential provider chain if not specified.
4
+ * The AWS credentials to sign requests with.
5
+ * Uses the default credential provider chain if not specified.
5
6
  */
6
7
  credentials?: AwsCredentialIdentity | AwsCredentialIdentityProvider;
7
8
  /**
@@ -13,7 +14,9 @@ export interface SignerConfig {
13
14
  */
14
15
  port: number;
15
16
  /**
16
- * The region the database is located in. Uses the region inferred from the runtime if omitted.
17
+ * The region the database is located in.
18
+ * Uses the region of the given profile or inferred from the runtime if
19
+ * both are omitted.
17
20
  */
18
21
  region?: string;
19
22
  /**
@@ -24,6 +27,15 @@ export interface SignerConfig {
24
27
  * The username to login as.
25
28
  */
26
29
  username: string;
30
+ /**
31
+ * Optional. Can be provided to configure region from a profile
32
+ * if operating in an environment with a file system having
33
+ * an AWS configuration file.
34
+ *
35
+ * The credentials will also resolve based on this profile, if using
36
+ * a credentials provider that includes the AWS configuration file.
37
+ */
38
+ profile?: string;
27
39
  }
28
40
  /**
29
41
  * The signer class that generates an auth token to a database.
@@ -9,5 +9,6 @@ export declare const getRuntimeConfig: (config: SignerConfig) => {
9
9
  region: string | import("@smithy/types").Provider<any>;
10
10
  sha256: import("@smithy/types").HashConstructor;
11
11
  username: string;
12
+ profile?: string | undefined;
12
13
  runtime: string;
13
14
  };
@@ -9,5 +9,6 @@ export declare const getRuntimeConfig: (config: SignerConfig) => {
9
9
  region: string | import("@smithy/types").Provider<string>;
10
10
  sha256: import("@smithy/types").HashConstructor;
11
11
  username: string;
12
+ profile?: string | undefined;
12
13
  runtime: string;
13
14
  };
@@ -9,5 +9,6 @@ export declare const getRuntimeConfig: (config: SignerConfig) => {
9
9
  region: string | import("@smithy/types").Provider<any>;
10
10
  sha256: import("@smithy/types").HashConstructor;
11
11
  username: string;
12
+ profile?: string | undefined;
12
13
  runtime: string;
13
14
  };
@@ -11,6 +11,7 @@ export interface SignerConfig {
11
11
  region?: string;
12
12
  sha256?: ChecksumConstructor | HashConstructor;
13
13
  username: string;
14
+ profile?: string;
14
15
  }
15
16
  export declare class Signer {
16
17
  private readonly credentials;
@@ -9,5 +9,6 @@ export declare const getRuntimeConfig: (config: SignerConfig) => {
9
9
  region: string | import("@smithy/types").Provider<any>;
10
10
  sha256: import("@smithy/types").HashConstructor;
11
11
  username: string;
12
+ profile?: string | undefined;
12
13
  runtime: string;
13
14
  };
@@ -8,5 +8,6 @@ export declare const getRuntimeConfig: (config: SignerConfig) => {
8
8
  region: string | import("@smithy/types").Provider<string>;
9
9
  sha256: import("@smithy/types").HashConstructor;
10
10
  username: string;
11
+ profile?: string | undefined;
11
12
  runtime: string;
12
13
  };
@@ -9,5 +9,6 @@ export declare const getRuntimeConfig: (config: SignerConfig) => {
9
9
  region: string | import("@smithy/types").Provider<any>;
10
10
  sha256: import("@smithy/types").HashConstructor;
11
11
  username: string;
12
+ profile?: string | undefined;
12
13
  runtime: string;
13
14
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/rds-signer",
3
- "version": "3.713.0",
3
+ "version": "3.715.0",
4
4
  "description": "RDS utility for generating a password that can be used for IAM authentication to an RDS DB.",
5
5
  "main": "./dist-cjs/index.js",
6
6
  "module": "./dist-es/index.js",
@@ -28,8 +28,8 @@
28
28
  "dependencies": {
29
29
  "@aws-crypto/sha256-browser": "5.2.0",
30
30
  "@aws-crypto/sha256-js": "5.2.0",
31
- "@aws-sdk/credential-providers": "3.713.0",
32
- "@aws-sdk/util-format-url": "3.713.0",
31
+ "@aws-sdk/credential-providers": "3.715.0",
32
+ "@aws-sdk/util-format-url": "3.714.0",
33
33
  "@smithy/config-resolver": "^3.0.13",
34
34
  "@smithy/hash-node": "^3.0.11",
35
35
  "@smithy/invalid-dependency": "^3.0.11",
@@ -40,7 +40,7 @@
40
40
  "tslib": "^2.6.2"
41
41
  },
42
42
  "devDependencies": {
43
- "@aws-sdk/types": "3.713.0",
43
+ "@aws-sdk/types": "3.714.0",
44
44
  "@types/node": "^16.18.96",
45
45
  "concurrently": "7.0.0",
46
46
  "downlevel-dts": "0.10.1",