@aws-sdk/dsql-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 +13 -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 -2
- package/dist-types/runtimeConfig.d.ts +1 -2
- package/dist-types/runtimeConfig.native.d.ts +1 -2
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -2
- package/dist-types/ts3.4/runtimeConfig.d.ts +1 -4
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -2
- package/package.json +7 -10
- package/dist-cjs/runtimeConfig.browser.js +0 -11
- package/dist-cjs/runtimeConfig.js +0 -12
- package/dist-cjs/runtimeConfig.native.js +0 -11
package/dist-cjs/index.js
CHANGED
|
@@ -1,7 +1,18 @@
|
|
|
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 { defaultProvider } = require("@aws-sdk/credential-provider-node");
|
|
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
|
+
credentials: config?.credentials ?? defaultProvider(),
|
|
12
|
+
region: config?.region ?? loadConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS),
|
|
13
|
+
...config,
|
|
14
|
+
};
|
|
15
|
+
};
|
|
5
16
|
|
|
6
17
|
class DsqlSigner {
|
|
7
18
|
credentials;
|
|
@@ -16,7 +27,7 @@ class DsqlSigner {
|
|
|
16
27
|
this.credentials = runtimeConfiguration.credentials;
|
|
17
28
|
this.hostname = runtimeConfiguration.hostname;
|
|
18
29
|
this.region = runtimeConfiguration.region;
|
|
19
|
-
this.sha256 = runtimeConfiguration.sha256;
|
|
30
|
+
this.sha256 = runtimeConfiguration.sha256 ?? Sha256;
|
|
20
31
|
this.expiresIn = runtimeConfiguration.expiresIn ?? 900;
|
|
21
32
|
}
|
|
22
33
|
async _getAuthToken(action) {
|
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 } from "./runtimeConfig";
|
|
@@ -15,7 +16,7 @@ export class DsqlSigner {
|
|
|
15
16
|
this.credentials = runtimeConfiguration.credentials;
|
|
16
17
|
this.hostname = runtimeConfiguration.hostname;
|
|
17
18
|
this.region = runtimeConfiguration.region;
|
|
18
|
-
this.sha256 = runtimeConfiguration.sha256;
|
|
19
|
+
this.sha256 = runtimeConfiguration.sha256 ?? Sha256;
|
|
19
20
|
this.expiresIn = runtimeConfiguration.expiresIn ?? 900;
|
|
20
21
|
}
|
|
21
22
|
async _getAuthToken(action) {
|
|
@@ -1,9 +1,7 @@
|
|
|
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
|
-
sha256: config?.sha256 ?? Sha256,
|
|
7
5
|
credentials: invalidProvider("Credential is missing"),
|
|
8
6
|
region: invalidProvider("Region is missing"),
|
|
9
7
|
...config,
|
package/dist-es/runtimeConfig.js
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { defaultProvider } from "@aws-sdk/credential-provider-node";
|
|
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
|
-
sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
|
|
8
6
|
credentials: config?.credentials ?? defaultProvider(),
|
|
9
7
|
region: config?.region ?? loadConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS),
|
|
10
8
|
...config,
|
|
@@ -1,9 +1,7 @@
|
|
|
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
|
-
sha256: config?.sha256 ?? Sha256,
|
|
7
5
|
credentials: invalidProvider("Credential is missing"),
|
|
8
6
|
region: invalidProvider("Region is missing"),
|
|
9
7
|
...config,
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Sha256 } from "@aws-crypto/sha256-browser";
|
|
2
1
|
import type { DsqlSignerConfig } from "./Signer";
|
|
3
2
|
/**
|
|
4
3
|
* @internal
|
|
@@ -7,7 +6,7 @@ export declare const getRuntimeConfig: (config: DsqlSignerConfig) => {
|
|
|
7
6
|
credentials: import("@smithy/types").AwsCredentialIdentity | import("@smithy/types").AwsCredentialIdentityProvider | import("@smithy/types").Provider<any>;
|
|
8
7
|
hostname: string;
|
|
9
8
|
region: string | import("@smithy/types").Provider<any>;
|
|
10
|
-
sha256
|
|
9
|
+
sha256?: import("@smithy/types").ChecksumConstructor;
|
|
11
10
|
expiresIn?: number;
|
|
12
11
|
profile?: string;
|
|
13
12
|
runtime: string;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Hash } from "@smithy/core/serde";
|
|
2
1
|
import type { DsqlSignerConfig } from "./Signer";
|
|
3
2
|
/**
|
|
4
3
|
* @internal
|
|
@@ -7,7 +6,7 @@ export declare const getRuntimeConfig: (config: DsqlSignerConfig) => {
|
|
|
7
6
|
credentials: import("@smithy/types").AwsCredentialIdentity | import("@smithy/types").AwsCredentialIdentityProvider | import("@aws-sdk/credential-provider-node/dist-types/runtime/memoize-chain").MemoizedRuntimeConfigAwsCredentialIdentityProvider;
|
|
8
7
|
hostname: string;
|
|
9
8
|
region: string | import("@smithy/types").Provider<string>;
|
|
10
|
-
sha256
|
|
9
|
+
sha256?: import("@smithy/types").ChecksumConstructor;
|
|
11
10
|
expiresIn?: number;
|
|
12
11
|
profile?: string;
|
|
13
12
|
runtime: string;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Sha256 } from "@aws-crypto/sha256-js";
|
|
2
1
|
import type { DsqlSignerConfig } from "./Signer";
|
|
3
2
|
/**
|
|
4
3
|
* @internal
|
|
@@ -7,7 +6,7 @@ export declare const getRuntimeConfig: (config: DsqlSignerConfig) => {
|
|
|
7
6
|
credentials: import("@smithy/types").AwsCredentialIdentity | import("@smithy/types").AwsCredentialIdentityProvider | import("@smithy/types").Provider<any>;
|
|
8
7
|
hostname: string;
|
|
9
8
|
region: string | import("@smithy/types").Provider<any>;
|
|
10
|
-
sha256
|
|
9
|
+
sha256?: import("@smithy/types").ChecksumConstructor;
|
|
11
10
|
expiresIn?: number;
|
|
12
11
|
profile?: string;
|
|
13
12
|
runtime: string;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Sha256 } from "@aws-crypto/sha256-browser";
|
|
2
1
|
import { DsqlSignerConfig } from "./Signer";
|
|
3
2
|
export declare const getRuntimeConfig: (config: DsqlSignerConfig) => {
|
|
4
3
|
credentials:
|
|
@@ -7,7 +6,7 @@ export declare const getRuntimeConfig: (config: DsqlSignerConfig) => {
|
|
|
7
6
|
| import("@smithy/types").Provider<any>;
|
|
8
7
|
hostname: string;
|
|
9
8
|
region: string | import("@smithy/types").Provider<any>;
|
|
10
|
-
sha256
|
|
9
|
+
sha256?: import("@smithy/types").ChecksumConstructor;
|
|
11
10
|
expiresIn?: number;
|
|
12
11
|
profile?: string;
|
|
13
12
|
runtime: string;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Hash } from "@smithy/core/serde";
|
|
2
1
|
import { DsqlSignerConfig } from "./Signer";
|
|
3
2
|
export declare const getRuntimeConfig: (config: DsqlSignerConfig) => {
|
|
4
3
|
credentials:
|
|
@@ -7,9 +6,7 @@ export declare const getRuntimeConfig: (config: DsqlSignerConfig) => {
|
|
|
7
6
|
| import("@aws-sdk/credential-provider-node/dist-types/runtime/memoize-chain").MemoizedRuntimeConfigAwsCredentialIdentityProvider;
|
|
8
7
|
hostname: string;
|
|
9
8
|
region: string | import("@smithy/types").Provider<string>;
|
|
10
|
-
sha256
|
|
11
|
-
| import("@smithy/types").ChecksumConstructor
|
|
12
|
-
| (new (secret?: import("@smithy/types").SourceData | undefined) => Hash);
|
|
9
|
+
sha256?: import("@smithy/types").ChecksumConstructor;
|
|
13
10
|
expiresIn?: number;
|
|
14
11
|
profile?: string;
|
|
15
12
|
runtime: string;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Sha256 } from "@aws-crypto/sha256-js";
|
|
2
1
|
import { DsqlSignerConfig } from "./Signer";
|
|
3
2
|
export declare const getRuntimeConfig: (config: DsqlSignerConfig) => {
|
|
4
3
|
credentials:
|
|
@@ -7,7 +6,7 @@ export declare const getRuntimeConfig: (config: DsqlSignerConfig) => {
|
|
|
7
6
|
| import("@smithy/types").Provider<any>;
|
|
8
7
|
hostname: string;
|
|
9
8
|
region: string | import("@smithy/types").Provider<any>;
|
|
10
|
-
sha256
|
|
9
|
+
sha256?: import("@smithy/types").ChecksumConstructor;
|
|
11
10
|
expiresIn?: number;
|
|
12
11
|
profile?: string;
|
|
13
12
|
runtime: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/dsql-signer",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1077.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",
|
|
@@ -29,13 +29,11 @@
|
|
|
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-provider-node": "^3.972.60",
|
|
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": {
|
|
@@ -59,8 +57,7 @@
|
|
|
59
57
|
"./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser"
|
|
60
58
|
},
|
|
61
59
|
"react-native": {
|
|
62
|
-
"./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native"
|
|
63
|
-
"./dist-cjs/runtimeConfig": "./dist-cjs/runtimeConfig.native"
|
|
60
|
+
"./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native"
|
|
64
61
|
},
|
|
65
62
|
"homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/packages/dsql-signer",
|
|
66
63
|
"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
|
-
sha256: config?.sha256 ?? Sha256,
|
|
7
|
-
credentials: invalidProvider("Credential is missing"),
|
|
8
|
-
region: invalidProvider("Region is missing"),
|
|
9
|
-
...config,
|
|
10
|
-
};
|
|
11
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
const { defaultProvider } = require("@aws-sdk/credential-provider-node");
|
|
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
|
-
sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
|
|
8
|
-
credentials: config?.credentials ?? defaultProvider(),
|
|
9
|
-
region: config?.region ?? loadConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS),
|
|
10
|
-
...config,
|
|
11
|
-
};
|
|
12
|
-
};
|
|
@@ -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
|
-
sha256: config?.sha256 ?? Sha256,
|
|
7
|
-
credentials: invalidProvider("Credential is missing"),
|
|
8
|
-
region: invalidProvider("Region is missing"),
|
|
9
|
-
...config,
|
|
10
|
-
};
|
|
11
|
-
};
|