@aws-sdk/client-sts 3.391.0 → 3.395.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/STSClient.js +4 -2
- package/dist-cjs/clientConfiguration.js +2 -0
- package/dist-cjs/runtimeConfig.shared.js +1 -0
- package/dist-cjs/runtimeExtensions.js +16 -0
- package/dist-es/STSClient.js +4 -2
- package/dist-es/clientConfiguration.js +1 -0
- package/dist-es/runtimeConfig.shared.js +1 -0
- package/dist-es/runtimeExtensions.js +12 -0
- package/dist-types/STSClient.d.ts +6 -1
- package/dist-types/clientConfiguration.d.ts +6 -0
- package/dist-types/runtimeConfig.browser.d.ts +1 -0
- package/dist-types/runtimeConfig.d.ts +1 -0
- package/dist-types/runtimeConfig.native.d.ts +1 -0
- package/dist-types/runtimeConfig.shared.d.ts +1 -0
- package/dist-types/runtimeExtensions.d.ts +17 -0
- package/dist-types/ts3.4/STSClient.d.ts +3 -0
- package/dist-types/ts3.4/clientConfiguration.d.ts +2 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +1 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +1 -0
- package/dist-types/ts3.4/runtimeExtensions.d.ts +11 -0
- package/package.json +2 -2
package/dist-cjs/STSClient.js
CHANGED
|
@@ -14,6 +14,7 @@ const smithy_client_1 = require("@smithy/smithy-client");
|
|
|
14
14
|
Object.defineProperty(exports, "__Client", { enumerable: true, get: function () { return smithy_client_1.Client; } });
|
|
15
15
|
const EndpointParameters_1 = require("./endpoint/EndpointParameters");
|
|
16
16
|
const runtimeConfig_1 = require("./runtimeConfig");
|
|
17
|
+
const runtimeExtensions_1 = require("./runtimeExtensions");
|
|
17
18
|
class STSClient extends smithy_client_1.Client {
|
|
18
19
|
constructor(...[configuration]) {
|
|
19
20
|
const _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration || {});
|
|
@@ -24,8 +25,9 @@ class STSClient extends smithy_client_1.Client {
|
|
|
24
25
|
const _config_5 = (0, middleware_host_header_1.resolveHostHeaderConfig)(_config_4);
|
|
25
26
|
const _config_6 = (0, middleware_sdk_sts_1.resolveStsAuthConfig)(_config_5, { stsClientCtor: STSClient });
|
|
26
27
|
const _config_7 = (0, middleware_user_agent_1.resolveUserAgentConfig)(_config_6);
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
const _config_8 = (0, runtimeExtensions_1.resolveRuntimeExtensions)(_config_7, configuration?.extensions || []);
|
|
29
|
+
super(_config_8);
|
|
30
|
+
this.config = _config_8;
|
|
29
31
|
this.middlewareStack.use((0, middleware_retry_1.getRetryPlugin)(this.config));
|
|
30
32
|
this.middlewareStack.use((0, middleware_content_length_1.getContentLengthPlugin)(this.config));
|
|
31
33
|
this.middlewareStack.use((0, middleware_host_header_1.getHostHeaderPlugin)(this.config));
|
|
@@ -12,6 +12,7 @@ const getRuntimeConfig = (config) => ({
|
|
|
12
12
|
base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,
|
|
13
13
|
disableHostPrefix: config?.disableHostPrefix ?? false,
|
|
14
14
|
endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
|
|
15
|
+
extensions: config?.extensions ?? [],
|
|
15
16
|
logger: config?.logger ?? new smithy_client_1.NoOpLogger(),
|
|
16
17
|
serviceId: config?.serviceId ?? "STS",
|
|
17
18
|
urlParser: config?.urlParser ?? url_parser_1.parseUrl,
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resolveRuntimeExtensions = void 0;
|
|
4
|
+
const types_1 = require("@smithy/types");
|
|
5
|
+
const asPartial = (t) => t;
|
|
6
|
+
const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
7
|
+
const clientConfiguration = {
|
|
8
|
+
...asPartial((0, types_1.getDefaultClientConfiguration)(runtimeConfig)),
|
|
9
|
+
};
|
|
10
|
+
extensions.forEach((extension) => extension.configureClient(clientConfiguration));
|
|
11
|
+
return {
|
|
12
|
+
...runtimeConfig,
|
|
13
|
+
...(0, types_1.resolveDefaultRuntimeConfig)(clientConfiguration),
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
exports.resolveRuntimeExtensions = resolveRuntimeExtensions;
|
package/dist-es/STSClient.js
CHANGED
|
@@ -10,6 +10,7 @@ import { getRetryPlugin, resolveRetryConfig } from "@smithy/middleware-retry";
|
|
|
10
10
|
import { Client as __Client, } from "@smithy/smithy-client";
|
|
11
11
|
import { resolveClientEndpointParameters, } from "./endpoint/EndpointParameters";
|
|
12
12
|
import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
|
|
13
|
+
import { resolveRuntimeExtensions } from "./runtimeExtensions";
|
|
13
14
|
export { __Client };
|
|
14
15
|
export class STSClient extends __Client {
|
|
15
16
|
constructor(...[configuration]) {
|
|
@@ -21,8 +22,9 @@ export class STSClient extends __Client {
|
|
|
21
22
|
const _config_5 = resolveHostHeaderConfig(_config_4);
|
|
22
23
|
const _config_6 = resolveStsAuthConfig(_config_5, { stsClientCtor: STSClient });
|
|
23
24
|
const _config_7 = resolveUserAgentConfig(_config_6);
|
|
24
|
-
|
|
25
|
-
|
|
25
|
+
const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
|
|
26
|
+
super(_config_8);
|
|
27
|
+
this.config = _config_8;
|
|
26
28
|
this.middlewareStack.use(getRetryPlugin(this.config));
|
|
27
29
|
this.middlewareStack.use(getContentLengthPlugin(this.config));
|
|
28
30
|
this.middlewareStack.use(getHostHeaderPlugin(this.config));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -9,6 +9,7 @@ export const getRuntimeConfig = (config) => ({
|
|
|
9
9
|
base64Encoder: config?.base64Encoder ?? toBase64,
|
|
10
10
|
disableHostPrefix: config?.disableHostPrefix ?? false,
|
|
11
11
|
endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
|
|
12
|
+
extensions: config?.extensions ?? [],
|
|
12
13
|
logger: config?.logger ?? new NoOpLogger(),
|
|
13
14
|
serviceId: config?.serviceId ?? "STS",
|
|
14
15
|
urlParser: config?.urlParser ?? parseUrl,
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { getDefaultClientConfiguration, resolveDefaultRuntimeConfig } from "@smithy/types";
|
|
2
|
+
const asPartial = (t) => t;
|
|
3
|
+
export const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
4
|
+
const clientConfiguration = {
|
|
5
|
+
...asPartial(getDefaultClientConfiguration(runtimeConfig)),
|
|
6
|
+
};
|
|
7
|
+
extensions.forEach((extension) => extension.configureClient(clientConfiguration));
|
|
8
|
+
return {
|
|
9
|
+
...runtimeConfig,
|
|
10
|
+
...resolveDefaultRuntimeConfig(clientConfiguration),
|
|
11
|
+
};
|
|
12
|
+
};
|
|
@@ -17,6 +17,7 @@ import { GetCallerIdentityCommandInput, GetCallerIdentityCommandOutput } from ".
|
|
|
17
17
|
import { GetFederationTokenCommandInput, GetFederationTokenCommandOutput } from "./commands/GetFederationTokenCommand";
|
|
18
18
|
import { GetSessionTokenCommandInput, GetSessionTokenCommandOutput } from "./commands/GetSessionTokenCommand";
|
|
19
19
|
import { ClientInputEndpointParameters, ClientResolvedEndpointParameters, EndpointParameters } from "./endpoint/EndpointParameters";
|
|
20
|
+
import { RuntimeExtension, RuntimeExtensionsConfig } from "./runtimeExtensions";
|
|
20
21
|
export { __Client };
|
|
21
22
|
/**
|
|
22
23
|
* @public
|
|
@@ -124,6 +125,10 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
|
|
|
124
125
|
* Optional logger for logging debug/info/warn/error.
|
|
125
126
|
*/
|
|
126
127
|
logger?: __Logger;
|
|
128
|
+
/**
|
|
129
|
+
* Optional extensions
|
|
130
|
+
*/
|
|
131
|
+
extensions?: RuntimeExtension[];
|
|
127
132
|
/**
|
|
128
133
|
* The {@link @smithy/smithy-client#DefaultsMode} that will be used to determine how certain default configuration options are resolved in the SDK.
|
|
129
134
|
*/
|
|
@@ -143,7 +148,7 @@ export interface STSClientConfig extends STSClientConfigType {
|
|
|
143
148
|
/**
|
|
144
149
|
* @public
|
|
145
150
|
*/
|
|
146
|
-
export type STSClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & Required<ClientDefaults> & RegionResolvedConfig & EndpointResolvedConfig<EndpointParameters> & RetryResolvedConfig & HostHeaderResolvedConfig & StsAuthResolvedConfig & UserAgentResolvedConfig & ClientResolvedEndpointParameters;
|
|
151
|
+
export type STSClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & Required<ClientDefaults> & RuntimeExtensionsConfig & RegionResolvedConfig & EndpointResolvedConfig<EndpointParameters> & RetryResolvedConfig & HostHeaderResolvedConfig & StsAuthResolvedConfig & UserAgentResolvedConfig & ClientResolvedEndpointParameters;
|
|
147
152
|
/**
|
|
148
153
|
* @public
|
|
149
154
|
*
|
|
@@ -26,6 +26,7 @@ export declare const getRuntimeConfig: (config: STSClientConfig) => {
|
|
|
26
26
|
disableHostPrefix: boolean;
|
|
27
27
|
serviceId: string;
|
|
28
28
|
logger: import("@smithy/types").Logger;
|
|
29
|
+
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
|
29
30
|
endpoint?: ((string | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider<import("@smithy/types").EndpointV2>) & (string | import("@smithy/types").Provider<string> | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider<import("@smithy/types").EndpointV2>)) | undefined;
|
|
30
31
|
endpointProvider: (endpointParams: import("./endpoint/EndpointParameters").EndpointParameters, context?: {
|
|
31
32
|
logger?: import("@smithy/types").Logger | undefined;
|
|
@@ -26,6 +26,7 @@ export declare const getRuntimeConfig: (config: STSClientConfig) => {
|
|
|
26
26
|
disableHostPrefix: boolean;
|
|
27
27
|
serviceId: string;
|
|
28
28
|
logger: import("@smithy/types").Logger;
|
|
29
|
+
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
|
29
30
|
endpoint?: ((string | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider<import("@smithy/types").EndpointV2>) & (string | import("@smithy/types").Provider<string> | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider<import("@smithy/types").EndpointV2>)) | undefined;
|
|
30
31
|
endpointProvider: (endpointParams: import("./endpoint/EndpointParameters").EndpointParameters, context?: {
|
|
31
32
|
logger?: import("@smithy/types").Logger | undefined;
|
|
@@ -24,6 +24,7 @@ export declare const getRuntimeConfig: (config: STSClientConfig) => {
|
|
|
24
24
|
maxAttempts: number | import("@smithy/types").Provider<number>;
|
|
25
25
|
retryMode: string | import("@smithy/types").Provider<string>;
|
|
26
26
|
logger: import("@smithy/types").Logger;
|
|
27
|
+
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
|
27
28
|
defaultsMode: import("@smithy/smithy-client").DefaultsMode | import("@smithy/types").Provider<import("@smithy/smithy-client").DefaultsMode>;
|
|
28
29
|
endpoint?: string | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider<import("@smithy/types").EndpointV2> | undefined;
|
|
29
30
|
endpointProvider: (endpointParams: import("./endpoint/EndpointParameters").EndpointParameters, context?: {
|
|
@@ -10,6 +10,7 @@ export declare const getRuntimeConfig: (config: STSClientConfig) => {
|
|
|
10
10
|
endpointProvider: (endpointParams: import("./endpoint/EndpointParameters").EndpointParameters, context?: {
|
|
11
11
|
logger?: import("@smithy/types").Logger | undefined;
|
|
12
12
|
}) => import("@smithy/types").EndpointV2;
|
|
13
|
+
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
|
13
14
|
logger: import("@smithy/types").Logger;
|
|
14
15
|
serviceId: string;
|
|
15
16
|
urlParser: import("@smithy/types").UrlParser;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { STSClientConfiguration } from "./clientConfiguration";
|
|
2
|
+
/**
|
|
3
|
+
* @public
|
|
4
|
+
*/
|
|
5
|
+
export interface RuntimeExtension {
|
|
6
|
+
configureClient(clientConfiguration: STSClientConfiguration): void;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
export interface RuntimeExtensionsConfig {
|
|
12
|
+
extensions: RuntimeExtension[];
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
export declare const resolveRuntimeExtensions: (runtimeConfig: any, extensions: RuntimeExtension[]) => any;
|
|
@@ -82,6 +82,7 @@ import {
|
|
|
82
82
|
ClientResolvedEndpointParameters,
|
|
83
83
|
EndpointParameters,
|
|
84
84
|
} from "./endpoint/EndpointParameters";
|
|
85
|
+
import { RuntimeExtension, RuntimeExtensionsConfig } from "./runtimeExtensions";
|
|
85
86
|
export { __Client };
|
|
86
87
|
export type ServiceInputTypes =
|
|
87
88
|
| AssumeRoleCommandInput
|
|
@@ -123,6 +124,7 @@ export interface ClientDefaults
|
|
|
123
124
|
maxAttempts?: number | __Provider<number>;
|
|
124
125
|
retryMode?: string | __Provider<string>;
|
|
125
126
|
logger?: __Logger;
|
|
127
|
+
extensions?: RuntimeExtension[];
|
|
126
128
|
defaultsMode?: __DefaultsMode | __Provider<__DefaultsMode>;
|
|
127
129
|
}
|
|
128
130
|
export type STSClientConfigType = Partial<
|
|
@@ -140,6 +142,7 @@ export interface STSClientConfig extends STSClientConfigType {}
|
|
|
140
142
|
export type STSClientResolvedConfigType =
|
|
141
143
|
__SmithyResolvedConfiguration<__HttpHandlerOptions> &
|
|
142
144
|
Required<ClientDefaults> &
|
|
145
|
+
RuntimeExtensionsConfig &
|
|
143
146
|
RegionResolvedConfig &
|
|
144
147
|
EndpointResolvedConfig<EndpointParameters> &
|
|
145
148
|
RetryResolvedConfig &
|
|
@@ -36,6 +36,7 @@ export declare const getRuntimeConfig: (config: STSClientConfig) => {
|
|
|
36
36
|
disableHostPrefix: boolean;
|
|
37
37
|
serviceId: string;
|
|
38
38
|
logger: import("@smithy/types").Logger;
|
|
39
|
+
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
|
39
40
|
endpoint?:
|
|
40
41
|
| ((
|
|
41
42
|
| string
|
|
@@ -34,6 +34,7 @@ export declare const getRuntimeConfig: (config: STSClientConfig) => {
|
|
|
34
34
|
disableHostPrefix: boolean;
|
|
35
35
|
serviceId: string;
|
|
36
36
|
logger: import("@smithy/types").Logger;
|
|
37
|
+
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
|
37
38
|
endpoint?:
|
|
38
39
|
| ((
|
|
39
40
|
| string
|
|
@@ -32,6 +32,7 @@ export declare const getRuntimeConfig: (config: STSClientConfig) => {
|
|
|
32
32
|
maxAttempts: number | import("@smithy/types").Provider<number>;
|
|
33
33
|
retryMode: string | import("@smithy/types").Provider<string>;
|
|
34
34
|
logger: import("@smithy/types").Logger;
|
|
35
|
+
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
|
35
36
|
defaultsMode:
|
|
36
37
|
| import("@smithy/smithy-client").DefaultsMode
|
|
37
38
|
| import("@smithy/types").Provider<
|
|
@@ -10,6 +10,7 @@ export declare const getRuntimeConfig: (config: STSClientConfig) => {
|
|
|
10
10
|
logger?: import("@smithy/types").Logger | undefined;
|
|
11
11
|
}
|
|
12
12
|
) => import("@smithy/types").EndpointV2;
|
|
13
|
+
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
|
13
14
|
logger: import("@smithy/types").Logger;
|
|
14
15
|
serviceId: string;
|
|
15
16
|
urlParser: import("@smithy/types").UrlParser;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { STSClientConfiguration } from "./clientConfiguration";
|
|
2
|
+
export interface RuntimeExtension {
|
|
3
|
+
configureClient(clientConfiguration: STSClientConfiguration): void;
|
|
4
|
+
}
|
|
5
|
+
export interface RuntimeExtensionsConfig {
|
|
6
|
+
extensions: RuntimeExtension[];
|
|
7
|
+
}
|
|
8
|
+
export declare const resolveRuntimeExtensions: (
|
|
9
|
+
runtimeConfig: any,
|
|
10
|
+
extensions: RuntimeExtension[]
|
|
11
|
+
) => any;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-sts",
|
|
3
3
|
"description": "AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.395.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@aws-crypto/sha256-browser": "3.0.0",
|
|
25
25
|
"@aws-crypto/sha256-js": "3.0.0",
|
|
26
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
26
|
+
"@aws-sdk/credential-provider-node": "3.395.0",
|
|
27
27
|
"@aws-sdk/middleware-host-header": "3.391.0",
|
|
28
28
|
"@aws-sdk/middleware-logger": "3.391.0",
|
|
29
29
|
"@aws-sdk/middleware-recursion-detection": "3.391.0",
|