@aws-sdk/dsql-signer 3.1045.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 +4 -5
- 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/dist-types/runtimeConfig.d.ts +1 -1
- package/dist-types/ts3.4/runtimeConfig.d.ts +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
|
|
|
@@ -28,7 +28,7 @@ class DsqlSigner {
|
|
|
28
28
|
credentials: this.credentials,
|
|
29
29
|
sha256: this.sha256,
|
|
30
30
|
});
|
|
31
|
-
const request = new
|
|
31
|
+
const request = new protocols.HttpRequest({
|
|
32
32
|
method: "GET",
|
|
33
33
|
protocol: this.protocol,
|
|
34
34
|
hostname: this.hostname,
|
|
@@ -42,7 +42,7 @@ class DsqlSigner {
|
|
|
42
42
|
const presigned = await signer.presign(request, {
|
|
43
43
|
expiresIn: this.expiresIn,
|
|
44
44
|
});
|
|
45
|
-
return
|
|
45
|
+
return util.formatUrl(presigned).replace(`${this.protocol}//`, "");
|
|
46
46
|
}
|
|
47
47
|
async getDbConnectAuthToken() {
|
|
48
48
|
return this._getAuthToken("DbConnect");
|
|
@@ -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
|
+
sha256: config?.sha256 ?? sha256_browser_1.Sha256,
|
|
10
|
+
credentials: (0, client_1.invalidProvider)("Credential is missing"),
|
|
11
|
+
region: (0, client_1.invalidProvider)("Region is missing"),
|
|
12
|
+
...config,
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
exports.getRuntimeConfig = getRuntimeConfig;
|
|
@@ -2,15 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getRuntimeConfig = void 0;
|
|
4
4
|
const credential_provider_node_1 = require("@aws-sdk/credential-provider-node");
|
|
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
|
-
sha256: config?.sha256 ??
|
|
10
|
+
sha256: config?.sha256 ?? serde_1.Hash.bind(null, "sha256"),
|
|
12
11
|
credentials: config?.credentials ?? (0, credential_provider_node_1.defaultProvider)(),
|
|
13
|
-
region: config?.region ?? (0,
|
|
12
|
+
region: config?.region ?? (0, config_1.loadConfig)(config_1.NODE_REGION_CONFIG_OPTIONS, config_1.NODE_REGION_CONFIG_FILE_OPTIONS),
|
|
14
13
|
...config,
|
|
15
14
|
};
|
|
16
15
|
};
|
|
@@ -2,13 +2,13 @@
|
|
|
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
|
sha256: config?.sha256 ?? sha256_js_1.Sha256,
|
|
10
|
-
credentials: (0,
|
|
11
|
-
region: (0,
|
|
10
|
+
credentials: (0, client_1.invalidProvider)("Credential is missing"),
|
|
11
|
+
region: (0, client_1.invalidProvider)("Region is missing"),
|
|
12
12
|
...config,
|
|
13
13
|
};
|
|
14
14
|
};
|
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 } from "./runtimeConfig";
|
|
5
5
|
export class DsqlSigner {
|
package/dist-es/runtimeConfig.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { defaultProvider } from "@aws-sdk/credential-provider-node";
|
|
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/dsql-signer",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1046.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",
|
|
@@ -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-provider-node": "^3.972.40",
|
|
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
|
},
|
|
@@ -62,7 +58,10 @@
|
|
|
62
58
|
"browser": {
|
|
63
59
|
"./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser"
|
|
64
60
|
},
|
|
65
|
-
"react-native": {
|
|
61
|
+
"react-native": {
|
|
62
|
+
"./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native",
|
|
63
|
+
"./dist-cjs/runtimeConfig": "./dist-cjs/runtimeConfig.native"
|
|
64
|
+
},
|
|
66
65
|
"homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/packages/dsql-signer",
|
|
67
66
|
"repository": {
|
|
68
67
|
"type": "git",
|