@aws-sdk/rds-signer 3.1075.0 → 3.1077.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 +20 -2
- package/dist-es/Signer.js +2 -1
- package/dist-es/runtimeConfig.browser.js +0 -2
- package/dist-es/runtimeConfig.js +0 -2
- package/dist-es/runtimeConfig.native.js +0 -2
- package/dist-types/runtimeConfig.browser.d.ts +1 -1
- package/dist-types/runtimeConfig.d.ts +1 -1
- package/dist-types/runtimeConfig.native.d.ts +1 -1
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +3 -1
- package/dist-types/ts3.4/runtimeConfig.d.ts +3 -1
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +3 -1
- package/package.json +8 -11
- package/dist-cjs/runtimeConfig.browser.js +0 -11
- package/dist-cjs/runtimeConfig.js +0 -19
- package/dist-cjs/runtimeConfig.native.js +0 -11
package/dist-cjs/index.js
CHANGED
|
@@ -1,7 +1,25 @@
|
|
|
1
1
|
const { formatUrl } = require("@aws-sdk/core/util");
|
|
2
|
+
const { Sha256 } = require("@smithy/core/checksum");
|
|
2
3
|
const { HttpRequest } = require("@smithy/core/protocols");
|
|
3
4
|
const { SignatureV4 } = require("@smithy/signature-v4");
|
|
4
|
-
const {
|
|
5
|
+
const { fromNodeProviderChain } = require("@aws-sdk/credential-providers");
|
|
6
|
+
const { loadConfig, NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS } = require("@smithy/core/config");
|
|
7
|
+
|
|
8
|
+
const getRuntimeConfig = (config) => {
|
|
9
|
+
return {
|
|
10
|
+
runtime: "node",
|
|
11
|
+
...config,
|
|
12
|
+
credentials: config?.credentials ??
|
|
13
|
+
fromNodeProviderChain({
|
|
14
|
+
profile: config.profile,
|
|
15
|
+
}),
|
|
16
|
+
region: config?.region ??
|
|
17
|
+
loadConfig(NODE_REGION_CONFIG_OPTIONS, {
|
|
18
|
+
...NODE_REGION_CONFIG_FILE_OPTIONS,
|
|
19
|
+
profile: config.profile,
|
|
20
|
+
}),
|
|
21
|
+
};
|
|
22
|
+
};
|
|
5
23
|
|
|
6
24
|
const MINUTE_MS = 60_000;
|
|
7
25
|
class Signer {
|
|
@@ -20,7 +38,7 @@ class Signer {
|
|
|
20
38
|
this.hostname = runtimeConfiguration.hostname;
|
|
21
39
|
this.port = runtimeConfiguration.port;
|
|
22
40
|
this.region = runtimeConfiguration.region;
|
|
23
|
-
this.sha256 = runtimeConfiguration.sha256;
|
|
41
|
+
this.sha256 = runtimeConfiguration.sha256 ?? Sha256;
|
|
24
42
|
this.username = runtimeConfiguration.username;
|
|
25
43
|
}
|
|
26
44
|
async getAuthToken() {
|
package/dist-es/Signer.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { formatUrl } from "@aws-sdk/core/util";
|
|
2
|
+
import { Sha256 } from "@smithy/core/checksum";
|
|
2
3
|
import { HttpRequest } from "@smithy/core/protocols";
|
|
3
4
|
import { SignatureV4 } from "@smithy/signature-v4";
|
|
4
5
|
import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
|
|
@@ -19,7 +20,7 @@ export class Signer {
|
|
|
19
20
|
this.hostname = runtimeConfiguration.hostname;
|
|
20
21
|
this.port = runtimeConfiguration.port;
|
|
21
22
|
this.region = runtimeConfiguration.region;
|
|
22
|
-
this.sha256 = runtimeConfiguration.sha256;
|
|
23
|
+
this.sha256 = runtimeConfiguration.sha256 ?? Sha256;
|
|
23
24
|
this.username = runtimeConfiguration.username;
|
|
24
25
|
}
|
|
25
26
|
async getAuthToken() {
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import { Sha256 } from "@aws-crypto/sha256-browser";
|
|
2
1
|
import { invalidProvider } from "@smithy/core/client";
|
|
3
2
|
export const getRuntimeConfig = (config) => {
|
|
4
3
|
return {
|
|
5
4
|
runtime: "browser",
|
|
6
5
|
...config,
|
|
7
|
-
sha256: config?.sha256 ?? Sha256,
|
|
8
6
|
credentials: config?.credentials ?? invalidProvider("Credential is missing"),
|
|
9
7
|
region: config?.region ?? invalidProvider("Region is missing"),
|
|
10
8
|
};
|
package/dist-es/runtimeConfig.js
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { fromNodeProviderChain } from "@aws-sdk/credential-providers";
|
|
2
2
|
import { loadConfig, NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@smithy/core/config";
|
|
3
|
-
import { Hash } from "@smithy/core/serde";
|
|
4
3
|
export const getRuntimeConfig = (config) => {
|
|
5
4
|
return {
|
|
6
5
|
runtime: "node",
|
|
7
6
|
...config,
|
|
8
|
-
sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
|
|
9
7
|
credentials: config?.credentials ??
|
|
10
8
|
fromNodeProviderChain({
|
|
11
9
|
profile: config.profile,
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import { Sha256 } from "@aws-crypto/sha256-js";
|
|
2
1
|
import { invalidProvider } from "@smithy/core/client";
|
|
3
2
|
export const getRuntimeConfig = (config) => {
|
|
4
3
|
return {
|
|
5
4
|
runtime: "react-native",
|
|
6
5
|
...config,
|
|
7
|
-
sha256: config?.sha256 ?? Sha256,
|
|
8
6
|
credentials: config?.credentials ?? invalidProvider("Credential is missing"),
|
|
9
7
|
region: config?.region ?? invalidProvider("Region is missing"),
|
|
10
8
|
};
|
|
@@ -3,11 +3,11 @@ import type { SignerConfig } from "./Signer";
|
|
|
3
3
|
* @internal
|
|
4
4
|
*/
|
|
5
5
|
export declare const getRuntimeConfig: (config: SignerConfig) => {
|
|
6
|
-
sha256: import("@smithy/types").HashConstructor;
|
|
7
6
|
credentials: import("@smithy/types").AwsCredentialIdentity | import("@smithy/types").AwsCredentialIdentityProvider | import("@smithy/types").Provider<any>;
|
|
8
7
|
region: string | import("@smithy/types").Provider<any>;
|
|
9
8
|
hostname: string;
|
|
10
9
|
port: number;
|
|
10
|
+
sha256?: import("@smithy/types").ChecksumConstructor | import("@smithy/types").HashConstructor;
|
|
11
11
|
username: string;
|
|
12
12
|
profile?: string;
|
|
13
13
|
runtime: string;
|
|
@@ -3,11 +3,11 @@ import type { SignerConfig } from "./Signer";
|
|
|
3
3
|
* @internal
|
|
4
4
|
*/
|
|
5
5
|
export declare const getRuntimeConfig: (config: SignerConfig) => {
|
|
6
|
-
sha256: import("@smithy/types").HashConstructor;
|
|
7
6
|
credentials: import("@smithy/types").AwsCredentialIdentity | import("@smithy/types").AwsCredentialIdentityProvider;
|
|
8
7
|
region: string | import("@smithy/types").Provider<string>;
|
|
9
8
|
hostname: string;
|
|
10
9
|
port: number;
|
|
10
|
+
sha256?: import("@smithy/types").ChecksumConstructor | import("@smithy/types").HashConstructor;
|
|
11
11
|
username: string;
|
|
12
12
|
profile?: string;
|
|
13
13
|
runtime: string;
|
|
@@ -3,11 +3,11 @@ import type { SignerConfig } from "./Signer";
|
|
|
3
3
|
* @internal
|
|
4
4
|
*/
|
|
5
5
|
export declare const getRuntimeConfig: (config: SignerConfig) => {
|
|
6
|
-
sha256: import("@smithy/types").HashConstructor;
|
|
7
6
|
credentials: import("@smithy/types").AwsCredentialIdentity | import("@smithy/types").AwsCredentialIdentityProvider | import("@smithy/types").Provider<any>;
|
|
8
7
|
region: string | import("@smithy/types").Provider<any>;
|
|
9
8
|
hostname: string;
|
|
10
9
|
port: number;
|
|
10
|
+
sha256?: import("@smithy/types").ChecksumConstructor | import("@smithy/types").HashConstructor;
|
|
11
11
|
username: string;
|
|
12
12
|
profile?: string;
|
|
13
13
|
runtime: string;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { SignerConfig } from "./Signer";
|
|
2
2
|
export declare const getRuntimeConfig: (config: SignerConfig) => {
|
|
3
|
-
sha256: import("@smithy/types").HashConstructor;
|
|
4
3
|
credentials:
|
|
5
4
|
| import("@smithy/types").AwsCredentialIdentity
|
|
6
5
|
| import("@smithy/types").AwsCredentialIdentityProvider
|
|
@@ -8,6 +7,9 @@ export declare const getRuntimeConfig: (config: SignerConfig) => {
|
|
|
8
7
|
region: string | import("@smithy/types").Provider<any>;
|
|
9
8
|
hostname: string;
|
|
10
9
|
port: number;
|
|
10
|
+
sha256?:
|
|
11
|
+
| import("@smithy/types").ChecksumConstructor
|
|
12
|
+
| import("@smithy/types").HashConstructor;
|
|
11
13
|
username: string;
|
|
12
14
|
profile?: string;
|
|
13
15
|
runtime: string;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { SignerConfig } from "./Signer";
|
|
2
2
|
export declare const getRuntimeConfig: (config: SignerConfig) => {
|
|
3
|
-
sha256: import("@smithy/types").HashConstructor;
|
|
4
3
|
credentials:
|
|
5
4
|
| import("@smithy/types").AwsCredentialIdentity
|
|
6
5
|
| import("@smithy/types").AwsCredentialIdentityProvider;
|
|
7
6
|
region: string | import("@smithy/types").Provider<string>;
|
|
8
7
|
hostname: string;
|
|
9
8
|
port: number;
|
|
9
|
+
sha256?:
|
|
10
|
+
| import("@smithy/types").ChecksumConstructor
|
|
11
|
+
| import("@smithy/types").HashConstructor;
|
|
10
12
|
username: string;
|
|
11
13
|
profile?: string;
|
|
12
14
|
runtime: string;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { SignerConfig } from "./Signer";
|
|
2
2
|
export declare const getRuntimeConfig: (config: SignerConfig) => {
|
|
3
|
-
sha256: import("@smithy/types").HashConstructor;
|
|
4
3
|
credentials:
|
|
5
4
|
| import("@smithy/types").AwsCredentialIdentity
|
|
6
5
|
| import("@smithy/types").AwsCredentialIdentityProvider
|
|
@@ -8,6 +7,9 @@ export declare const getRuntimeConfig: (config: SignerConfig) => {
|
|
|
8
7
|
region: string | import("@smithy/types").Provider<any>;
|
|
9
8
|
hostname: string;
|
|
10
9
|
port: number;
|
|
10
|
+
sha256?:
|
|
11
|
+
| import("@smithy/types").ChecksumConstructor
|
|
12
|
+
| import("@smithy/types").HashConstructor;
|
|
11
13
|
username: string;
|
|
12
14
|
profile?: string;
|
|
13
15
|
runtime: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/rds-signer",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1077.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",
|
|
@@ -29,17 +29,15 @@
|
|
|
29
29
|
},
|
|
30
30
|
"license": "Apache-2.0",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@aws-
|
|
33
|
-
"@aws-
|
|
34
|
-
"@
|
|
35
|
-
"@
|
|
36
|
-
"@smithy/
|
|
37
|
-
"@smithy/signature-v4": "^5.4.6",
|
|
38
|
-
"@smithy/types": "^4.14.3",
|
|
32
|
+
"@aws-sdk/core": "^3.974.25",
|
|
33
|
+
"@aws-sdk/credential-providers": "3.1077.0",
|
|
34
|
+
"@smithy/core": "^3.28.0",
|
|
35
|
+
"@smithy/signature-v4": "^5.6.0",
|
|
36
|
+
"@smithy/types": "^4.15.0",
|
|
39
37
|
"tslib": "^2.6.2"
|
|
40
38
|
},
|
|
41
39
|
"devDependencies": {
|
|
42
|
-
"@aws-sdk/types": "^3.973.
|
|
40
|
+
"@aws-sdk/types": "^3.973.14",
|
|
43
41
|
"@types/node": "^20.14.8",
|
|
44
42
|
"concurrently": "7.0.0",
|
|
45
43
|
"downlevel-dts": "0.10.1",
|
|
@@ -60,8 +58,7 @@
|
|
|
60
58
|
"./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser"
|
|
61
59
|
},
|
|
62
60
|
"react-native": {
|
|
63
|
-
"./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native"
|
|
64
|
-
"./dist-cjs/runtimeConfig": "./dist-cjs/runtimeConfig.native"
|
|
61
|
+
"./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native"
|
|
65
62
|
},
|
|
66
63
|
"homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/packages/rds-signer",
|
|
67
64
|
"repository": {
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
const { Sha256 } = require("@aws-crypto/sha256-browser");
|
|
2
|
-
const { invalidProvider } = require("@smithy/core/client");
|
|
3
|
-
exports.getRuntimeConfig = (config) => {
|
|
4
|
-
return {
|
|
5
|
-
runtime: "browser",
|
|
6
|
-
...config,
|
|
7
|
-
sha256: config?.sha256 ?? Sha256,
|
|
8
|
-
credentials: config?.credentials ?? invalidProvider("Credential is missing"),
|
|
9
|
-
region: config?.region ?? invalidProvider("Region is missing"),
|
|
10
|
-
};
|
|
11
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
const { fromNodeProviderChain } = require("@aws-sdk/credential-providers");
|
|
2
|
-
const { loadConfig, NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } = require("@smithy/core/config");
|
|
3
|
-
const { Hash } = require("@smithy/core/serde");
|
|
4
|
-
exports.getRuntimeConfig = (config) => {
|
|
5
|
-
return {
|
|
6
|
-
runtime: "node",
|
|
7
|
-
...config,
|
|
8
|
-
sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
|
|
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
|
-
}),
|
|
18
|
-
};
|
|
19
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
const { Sha256 } = require("@aws-crypto/sha256-js");
|
|
2
|
-
const { invalidProvider } = require("@smithy/core/client");
|
|
3
|
-
exports.getRuntimeConfig = (config) => {
|
|
4
|
-
return {
|
|
5
|
-
runtime: "react-native",
|
|
6
|
-
...config,
|
|
7
|
-
sha256: config?.sha256 ?? Sha256,
|
|
8
|
-
credentials: config?.credentials ?? invalidProvider("Credential is missing"),
|
|
9
|
-
region: config?.region ?? invalidProvider("Region is missing"),
|
|
10
|
-
};
|
|
11
|
-
};
|