@aws-sdk/rds-signer 3.1044.0 → 3.1046.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 +4 -4
- package/dist-cjs/runtimeConfig.browser.js +15 -0
- package/dist-cjs/runtimeConfig.js +5 -6
- package/dist-cjs/runtimeConfig.native.js +3 -3
- package/dist-es/Signer.js +2 -2
- package/dist-es/runtimeConfig.browser.js +1 -1
- package/dist-es/runtimeConfig.js +2 -3
- package/dist-es/runtimeConfig.native.js +1 -1
- package/package.json +9 -10
package/dist-cjs/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var util = require('@aws-sdk/core/util');
|
|
4
|
+
var protocols = require('@smithy/core/protocols');
|
|
5
5
|
var signatureV4 = require('@smithy/signature-v4');
|
|
6
6
|
var runtimeConfig = require('./runtimeConfig');
|
|
7
7
|
|
|
@@ -30,7 +30,7 @@ class Signer {
|
|
|
30
30
|
credentials: this.credentials,
|
|
31
31
|
sha256: this.sha256,
|
|
32
32
|
});
|
|
33
|
-
const request = new
|
|
33
|
+
const request = new protocols.HttpRequest({
|
|
34
34
|
method: "GET",
|
|
35
35
|
protocol: this.protocol,
|
|
36
36
|
hostname: this.hostname,
|
|
@@ -46,7 +46,7 @@ class Signer {
|
|
|
46
46
|
const presigned = await signer.presign(request, {
|
|
47
47
|
expiresIn: 900,
|
|
48
48
|
});
|
|
49
|
-
return
|
|
49
|
+
return util.formatUrl(presigned).replace(`${this.protocol}//`, "");
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getRuntimeConfig = void 0;
|
|
4
|
+
const sha256_browser_1 = require("@aws-crypto/sha256-browser");
|
|
5
|
+
const client_1 = require("@smithy/core/client");
|
|
6
|
+
const getRuntimeConfig = (config) => {
|
|
7
|
+
return {
|
|
8
|
+
runtime: "browser",
|
|
9
|
+
...config,
|
|
10
|
+
sha256: config?.sha256 ?? sha256_browser_1.Sha256,
|
|
11
|
+
credentials: config?.credentials ?? (0, client_1.invalidProvider)("Credential is missing"),
|
|
12
|
+
region: config?.region ?? (0, client_1.invalidProvider)("Region is missing"),
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
exports.getRuntimeConfig = getRuntimeConfig;
|
|
@@ -2,21 +2,20 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getRuntimeConfig = void 0;
|
|
4
4
|
const credential_providers_1 = require("@aws-sdk/credential-providers");
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const node_config_provider_1 = require("@smithy/node-config-provider");
|
|
5
|
+
const config_1 = require("@smithy/core/config");
|
|
6
|
+
const serde_1 = require("@smithy/core/serde");
|
|
8
7
|
const getRuntimeConfig = (config) => {
|
|
9
8
|
return {
|
|
10
9
|
runtime: "node",
|
|
11
10
|
...config,
|
|
12
|
-
sha256: config?.sha256 ??
|
|
11
|
+
sha256: config?.sha256 ?? serde_1.Hash.bind(null, "sha256"),
|
|
13
12
|
credentials: config?.credentials ??
|
|
14
13
|
(0, credential_providers_1.fromNodeProviderChain)({
|
|
15
14
|
profile: config.profile,
|
|
16
15
|
}),
|
|
17
16
|
region: config?.region ??
|
|
18
|
-
(0,
|
|
19
|
-
...
|
|
17
|
+
(0, config_1.loadConfig)(config_1.NODE_REGION_CONFIG_OPTIONS, {
|
|
18
|
+
...config_1.NODE_REGION_CONFIG_FILE_OPTIONS,
|
|
20
19
|
profile: config.profile,
|
|
21
20
|
}),
|
|
22
21
|
};
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getRuntimeConfig = void 0;
|
|
4
4
|
const sha256_js_1 = require("@aws-crypto/sha256-js");
|
|
5
|
-
const
|
|
5
|
+
const client_1 = require("@smithy/core/client");
|
|
6
6
|
const getRuntimeConfig = (config) => {
|
|
7
7
|
return {
|
|
8
8
|
runtime: "react-native",
|
|
9
9
|
...config,
|
|
10
10
|
sha256: config?.sha256 ?? sha256_js_1.Sha256,
|
|
11
|
-
credentials: config?.credentials ?? (0,
|
|
12
|
-
region: config?.region ?? (0,
|
|
11
|
+
credentials: config?.credentials ?? (0, client_1.invalidProvider)("Credential is missing"),
|
|
12
|
+
region: config?.region ?? (0, client_1.invalidProvider)("Region is missing"),
|
|
13
13
|
};
|
|
14
14
|
};
|
|
15
15
|
exports.getRuntimeConfig = getRuntimeConfig;
|
package/dist-es/Signer.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { formatUrl } from "@aws-sdk/util
|
|
2
|
-
import { HttpRequest } from "@smithy/
|
|
1
|
+
import { formatUrl } from "@aws-sdk/core/util";
|
|
2
|
+
import { HttpRequest } from "@smithy/core/protocols";
|
|
3
3
|
import { SignatureV4 } from "@smithy/signature-v4";
|
|
4
4
|
import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
|
|
5
5
|
export class Signer {
|
package/dist-es/runtimeConfig.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { fromNodeProviderChain } from "@aws-sdk/credential-providers";
|
|
2
|
-
import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@smithy/config
|
|
3
|
-
import { Hash } from "@smithy/
|
|
4
|
-
import { loadConfig } from "@smithy/node-config-provider";
|
|
2
|
+
import { loadConfig, NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@smithy/core/config";
|
|
3
|
+
import { Hash } from "@smithy/core/serde";
|
|
5
4
|
export const getRuntimeConfig = (config) => {
|
|
6
5
|
return {
|
|
7
6
|
runtime: "node",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/rds-signer",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1046.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",
|
|
@@ -31,14 +31,10 @@
|
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
33
33
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
34
|
-
"@aws-sdk/
|
|
35
|
-
"@aws-sdk/
|
|
36
|
-
"@smithy/
|
|
37
|
-
"@smithy/
|
|
38
|
-
"@smithy/invalid-dependency": "^4.2.14",
|
|
39
|
-
"@smithy/node-config-provider": "^4.3.14",
|
|
40
|
-
"@smithy/protocol-http": "^5.3.14",
|
|
41
|
-
"@smithy/signature-v4": "^5.3.14",
|
|
34
|
+
"@aws-sdk/core": "^3.974.9",
|
|
35
|
+
"@aws-sdk/credential-providers": "3.1046.0",
|
|
36
|
+
"@smithy/core": "^3.24.1",
|
|
37
|
+
"@smithy/signature-v4": "^5.4.1",
|
|
42
38
|
"@smithy/types": "^4.14.1",
|
|
43
39
|
"tslib": "^2.6.2"
|
|
44
40
|
},
|
|
@@ -63,7 +59,10 @@
|
|
|
63
59
|
"browser": {
|
|
64
60
|
"./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser"
|
|
65
61
|
},
|
|
66
|
-
"react-native": {
|
|
62
|
+
"react-native": {
|
|
63
|
+
"./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native",
|
|
64
|
+
"./dist-cjs/runtimeConfig": "./dist-cjs/runtimeConfig.native"
|
|
65
|
+
},
|
|
67
66
|
"homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/packages/rds-signer",
|
|
68
67
|
"repository": {
|
|
69
68
|
"type": "git",
|