@aws-sdk/config 3.974.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/LICENSE +201 -0
- package/README.md +235 -0
- package/credentials.d.ts +7 -0
- package/credentials.js +5 -0
- package/dist-cjs/index.js +2 -0
- package/dist-cjs/submodules/credentials/index.js +12 -0
- package/dist-cjs/submodules/logger/index.js +40 -0
- package/dist-cjs/submodules/protocol/index.js +47 -0
- package/dist-cjs/submodules/requestHandler/index.js +24 -0
- package/dist-cjs/submodules/retryStrategy/index.js +34 -0
- package/dist-cjs/submodules/typecheck/index.js +14 -0
- package/dist-es/index.js +1 -0
- package/dist-es/submodules/credentials/index.js +1 -0
- package/dist-es/submodules/logger/LogLevel.js +30 -0
- package/dist-es/submodules/logger/index.js +2 -0
- package/dist-es/submodules/protocol/index.js +3 -0
- package/dist-es/submodules/requestHandler/index.js +3 -0
- package/dist-es/submodules/retryStrategy/index.js +1 -0
- package/dist-es/submodules/typecheck/index.js +1 -0
- package/dist-types/api-extractor-type-index.d.ts +6 -0
- package/dist-types/index.d.ts +1 -0
- package/dist-types/submodules/credentials/index.d.ts +2 -0
- package/dist-types/submodules/logger/LogLevel.d.ts +23 -0
- package/dist-types/submodules/logger/index.d.ts +3 -0
- package/dist-types/submodules/protocol/index.d.ts +3 -0
- package/dist-types/submodules/requestHandler/index.d.ts +3 -0
- package/dist-types/submodules/retryStrategy/index.d.ts +1 -0
- package/dist-types/submodules/typecheck/index.d.ts +2 -0
- package/dist-types/ts3.4/api-extractor-type-index.d.ts +6 -0
- package/dist-types/ts3.4/index.d.ts +1 -0
- package/dist-types/ts3.4/submodules/credentials/index.d.ts +5 -0
- package/dist-types/ts3.4/submodules/logger/LogLevel.d.ts +13 -0
- package/dist-types/ts3.4/submodules/logger/index.d.ts +3 -0
- package/dist-types/ts3.4/submodules/protocol/index.d.ts +14 -0
- package/dist-types/ts3.4/submodules/requestHandler/index.d.ts +3 -0
- package/dist-types/ts3.4/submodules/retryStrategy/index.d.ts +10 -0
- package/dist-types/ts3.4/submodules/typecheck/index.d.ts +9 -0
- package/logger.d.ts +7 -0
- package/logger.js +5 -0
- package/package.json +125 -0
- package/protocol.d.ts +7 -0
- package/protocol.js +5 -0
- package/requestHandler.d.ts +7 -0
- package/requestHandler.js +5 -0
- package/retryStrategy.d.ts +7 -0
- package/retryStrategy.js +5 -0
- package/typecheck.d.ts +7 -0
- package/typecheck.js +5 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
# `@aws-sdk/config`
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@aws-sdk/config)
|
|
4
|
+
[](https://www.npmjs.com/package/@aws-sdk/config)
|
|
5
|
+
|
|
6
|
+
This package exports dependency implementations for configuring the AWS SDK for JavaScript v3
|
|
7
|
+
clients that may be used in your application code.
|
|
8
|
+
|
|
9
|
+
For an overview of configuration options on SDK clients,
|
|
10
|
+
see [supplemental-docs/CLIENTS.md](https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md).
|
|
11
|
+
|
|
12
|
+
## Table of Contents
|
|
13
|
+
|
|
14
|
+
<!-- TOC start (generated with https://github.com/derlin/bitdowntoc) -->
|
|
15
|
+
|
|
16
|
+
- [Usage](#usage)
|
|
17
|
+
- [`@aws-sdk/config/credentials`](#aws-sdkconfigcredentials)
|
|
18
|
+
- [`@aws-sdk/config/logger`](#aws-sdkconfiglogger)
|
|
19
|
+
- [`@aws-sdk/config/protocol`](#aws-sdkconfigprotocol)
|
|
20
|
+
- [`@aws-sdk/config/requestHandler`](#aws-sdkconfigrequesthandler)
|
|
21
|
+
- [`@aws-sdk/config/retryStrategy`](#aws-sdkconfigretrystrategy)
|
|
22
|
+
- [`@aws-sdk/config/typecheck`](#aws-sdkconfigtypecheck)
|
|
23
|
+
- [Compile-time transforms](#compile-time-transforms)
|
|
24
|
+
- [Runtime Typecheck](#runtime-typecheck)
|
|
25
|
+
|
|
26
|
+
<!-- TOC end -->
|
|
27
|
+
|
|
28
|
+
## Usage
|
|
29
|
+
|
|
30
|
+
Install this alongside your SDK client packages(s) to access optional SDK plugins and injectable
|
|
31
|
+
dependency implementations.
|
|
32
|
+
|
|
33
|
+
```json5
|
|
34
|
+
{
|
|
35
|
+
name: "your-app",
|
|
36
|
+
dependencies: {
|
|
37
|
+
"@aws-sdk/client-s3": "<=3.x.y",
|
|
38
|
+
// where 3.x.y is a version of your choosing.
|
|
39
|
+
"@aws-sdk/client-dynamodb": "<=3.x.y",
|
|
40
|
+
"@aws-sdk/config": "<=3.x.y",
|
|
41
|
+
},
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
The elements exported from this package are organized into submodules accessible by import paths.
|
|
46
|
+
|
|
47
|
+
## `@aws-sdk/config/credentials`
|
|
48
|
+
|
|
49
|
+
This module includes the same API exported from `@aws-sdk/credential-providers`.
|
|
50
|
+
|
|
51
|
+
```js
|
|
52
|
+
// example: credentials
|
|
53
|
+
import { fromIni } from "@aws-sdk/config/credentials";
|
|
54
|
+
|
|
55
|
+
new S3Client({
|
|
56
|
+
credentials: fromIni(),
|
|
57
|
+
});
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
See [@aws-sdk/credential-providers](https://www.npmjs.com/package/@aws-sdk/credential-providers)
|
|
61
|
+
for the complete API.
|
|
62
|
+
|
|
63
|
+
See
|
|
64
|
+
also [CLIENTS.md#credentials](https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md#credentials-credentials).
|
|
65
|
+
|
|
66
|
+
## `@aws-sdk/config/logger`
|
|
67
|
+
|
|
68
|
+
This module exports a helper for log level filtering.
|
|
69
|
+
|
|
70
|
+
```js
|
|
71
|
+
// example: logger
|
|
72
|
+
import { LogLevel } from "@aws-sdk/config/logger";
|
|
73
|
+
|
|
74
|
+
new S3Client({
|
|
75
|
+
logger: new LogLevel("debug", console),
|
|
76
|
+
});
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
See [CLIENTS.md#logger](https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md#logger-logger)
|
|
80
|
+
for implementing your own logger.
|
|
81
|
+
|
|
82
|
+
## `@aws-sdk/config/protocol`
|
|
83
|
+
|
|
84
|
+
This module exports a selection of AWS Protocols, which you can use for protocol selection override or extend
|
|
85
|
+
to customize serialization behavior (advanced usage).
|
|
86
|
+
|
|
87
|
+
```js
|
|
88
|
+
// example: protocol selection.
|
|
89
|
+
import { CloudWatchClient } from "@aws-sdk/client-cloudwatch";
|
|
90
|
+
import { AwsSmithyRpcV2CborProtocol } from "@aws-sdk/config/protocol";
|
|
91
|
+
|
|
92
|
+
new CloudWatchClient({
|
|
93
|
+
protocol: AwsSmithyRpcV2CborProtocol,
|
|
94
|
+
});
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
```js
|
|
98
|
+
// example: protocol extension.
|
|
99
|
+
import { AwsRestXmlProtocol } from "@aws-sdk/config/protocol";
|
|
100
|
+
|
|
101
|
+
new S3Client({
|
|
102
|
+
protocol: class CustomAwsRestXmlProtocol extends AwsRestXmlProtocol {},
|
|
103
|
+
});
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
See [CLIENTS.md#protocol](https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md#protocol-protocol).
|
|
107
|
+
|
|
108
|
+
## `@aws-sdk/config/requestHandler`
|
|
109
|
+
|
|
110
|
+
This module exports the two common HTTP request handler implementations
|
|
111
|
+
for extension.
|
|
112
|
+
|
|
113
|
+
```js
|
|
114
|
+
// example: requestHandler extension.
|
|
115
|
+
import { NodeHttpHandler, FetchHttpHandler } from "@aws-sdk/config/requestHandler";
|
|
116
|
+
|
|
117
|
+
new S3Client({
|
|
118
|
+
requestHandler: new (class extends NodeHttpHandler {
|
|
119
|
+
async handle(request) {
|
|
120
|
+
return super.handle(request);
|
|
121
|
+
}
|
|
122
|
+
})(),
|
|
123
|
+
});
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
See [CLIENTS.md#requestHandler](https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md#request-handler-requesthandler).
|
|
127
|
+
|
|
128
|
+
## `@aws-sdk/config/retryStrategy`
|
|
129
|
+
|
|
130
|
+
This module exports the SDK retry strategy implementations. Please keep in mind that
|
|
131
|
+
typically, you won't need to customize the retry behavior of the SDK, and that
|
|
132
|
+
`maxAttempts` and `retryMode` can be configured with simple values that do not need imports.
|
|
133
|
+
|
|
134
|
+
See [CLIENTS.md#retryStrategy](https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md#retry-strategy-retrystrategy-retrymode-maxattempts).
|
|
135
|
+
|
|
136
|
+
```js
|
|
137
|
+
// example: retryStrategy with custom backoff.
|
|
138
|
+
import { ConfiguredRetryStrategy } from "@aws-sdk/config/retryStrategy";
|
|
139
|
+
|
|
140
|
+
new S3Client({
|
|
141
|
+
retryStrategy: new ConfiguredRetryStrategy(
|
|
142
|
+
// attempts
|
|
143
|
+
5,
|
|
144
|
+
|
|
145
|
+
// backoff 1 additional second per attempt
|
|
146
|
+
(attempt: number) => 500 + attempt * 1_000
|
|
147
|
+
),
|
|
148
|
+
});
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
## `@aws-sdk/config/typecheck`
|
|
152
|
+
|
|
153
|
+
This module exports compile-time type transform helpers and runtime typechecking components.
|
|
154
|
+
|
|
155
|
+
### Compile-time transforms
|
|
156
|
+
|
|
157
|
+
For compile-time type transform helpers, see usage at [@smithy/types](https://www.npmjs.com/package/@smithy/types).
|
|
158
|
+
|
|
159
|
+
```ts
|
|
160
|
+
// example: type transformers.
|
|
161
|
+
import type { AssertiveClient, BrowserClient, NodeJsClient, UncheckedClient } from "@aws-sdk/config/typecheck";
|
|
162
|
+
|
|
163
|
+
// UncheckedClient makes output fields non-nullable.
|
|
164
|
+
// You should still perform type checks as you deem
|
|
165
|
+
// necessary, but the SDK will no longer prompt you
|
|
166
|
+
// with nullability errors.
|
|
167
|
+
const s3 = new S3({}) as UncheckedClient<S3>;
|
|
168
|
+
|
|
169
|
+
// this transform narrows the type of output streams to Node.js Readable.
|
|
170
|
+
const s3Nodejs = new S3Client({}) as NodeJsClient<S3Client>;
|
|
171
|
+
|
|
172
|
+
// this transform narrows the type of output streams to web ReadableStream.
|
|
173
|
+
const s3Browser = new S3Client({}) as BrowserClient<S3Client>;
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
### Runtime Typecheck
|
|
177
|
+
|
|
178
|
+
Refer to [SCHEMAS.md](https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/SCHEMAS.md) for an introduciton
|
|
179
|
+
to how the SDK uses schemas to serialize and deserialize data structures. Schemas are also
|
|
180
|
+
used by the runtime typecheck plugin.
|
|
181
|
+
|
|
182
|
+
```js
|
|
183
|
+
// example: runtime typecheck usage with SDK client
|
|
184
|
+
import { DynamoDB } from "@aws-sdk/client-dynamodb";
|
|
185
|
+
import { getRuntimeTypecheckPlugin } from "@aws-sdk/config/typecheck";
|
|
186
|
+
|
|
187
|
+
const ddb = new DynamoDB();
|
|
188
|
+
|
|
189
|
+
ddb.middlewareStack.use(
|
|
190
|
+
// requires AWS SDK v3.953.0+ for shape checking.
|
|
191
|
+
// requires AWS SDK v3.969.0+ for required member checks.
|
|
192
|
+
getRuntimeTypecheckPlugin({
|
|
193
|
+
logger: console,
|
|
194
|
+
// throw means stop execution,
|
|
195
|
+
// other values correspond to logger channel.
|
|
196
|
+
input: "throw" || "error" || "warn" || "info" || "debug",
|
|
197
|
+
})
|
|
198
|
+
);
|
|
199
|
+
|
|
200
|
+
await ddb
|
|
201
|
+
.getItem({
|
|
202
|
+
Key: {
|
|
203
|
+
id: {
|
|
204
|
+
S: new Date("wrong type"),
|
|
205
|
+
},
|
|
206
|
+
},
|
|
207
|
+
})
|
|
208
|
+
.catch(console.error);
|
|
209
|
+
|
|
210
|
+
/*
|
|
211
|
+
Error: DynamoDBClient->GetItemCommand input validation:
|
|
212
|
+
{}.TableName: is required.
|
|
213
|
+
{}.Key["id"].S: expected string, got object.
|
|
214
|
+
<... stack trace ...>
|
|
215
|
+
*/
|
|
216
|
+
|
|
217
|
+
// standalone usage
|
|
218
|
+
import { GetItemInput$ } from "@aws-sdk/client-dynamodb";
|
|
219
|
+
import { validateSchema } from "@aws-sdk/config/typecheck";
|
|
220
|
+
|
|
221
|
+
const errors = validateSchema(GetItemInput$, {
|
|
222
|
+
Key: {
|
|
223
|
+
id: {
|
|
224
|
+
S: new Date("wrong type"),
|
|
225
|
+
},
|
|
226
|
+
},
|
|
227
|
+
});
|
|
228
|
+
|
|
229
|
+
console.log(errors.join("\n"));
|
|
230
|
+
|
|
231
|
+
/*
|
|
232
|
+
{}.TableName: is required.
|
|
233
|
+
{}.Key["id"].S: expected string, got object.
|
|
234
|
+
*/
|
|
235
|
+
```
|
package/credentials.d.ts
ADDED
package/credentials.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var credentialProviders = require('@aws-sdk/credential-providers');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Object.keys(credentialProviders).forEach(function (k) {
|
|
8
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return credentialProviders[k]; }
|
|
11
|
+
});
|
|
12
|
+
});
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var smithyClient = require('@smithy/smithy-client');
|
|
4
|
+
|
|
5
|
+
class LogLevel {
|
|
6
|
+
minimum;
|
|
7
|
+
logger;
|
|
8
|
+
static LEVELS = ["trace", "debug", "info", "warn", "error"];
|
|
9
|
+
level = 5;
|
|
10
|
+
constructor(minimum, logger = console) {
|
|
11
|
+
this.minimum = minimum;
|
|
12
|
+
this.logger = logger;
|
|
13
|
+
const index = LogLevel.LEVELS.indexOf(minimum);
|
|
14
|
+
if (index === -1) {
|
|
15
|
+
throw new Error(`Log level must be one of ${LogLevel.LEVELS.join(", ")}`);
|
|
16
|
+
}
|
|
17
|
+
this.level = index;
|
|
18
|
+
}
|
|
19
|
+
trace(...args) {
|
|
20
|
+
this.level <= 0 && this.logger.trace?.(...args);
|
|
21
|
+
}
|
|
22
|
+
debug(...args) {
|
|
23
|
+
this.level <= 1 && this.logger.debug?.(...args);
|
|
24
|
+
}
|
|
25
|
+
info(...args) {
|
|
26
|
+
this.level <= 2 && this.logger.info?.(...args);
|
|
27
|
+
}
|
|
28
|
+
warn(...args) {
|
|
29
|
+
this.level <= 3 && this.logger.warn?.(...args);
|
|
30
|
+
}
|
|
31
|
+
error(...args) {
|
|
32
|
+
this.level <= 4 && this.logger.error?.(...args);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
Object.defineProperty(exports, "NoOpLogger", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function () { return smithyClient.NoOpLogger; }
|
|
39
|
+
});
|
|
40
|
+
exports.LogLevel = LogLevel;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var protocols = require('@aws-sdk/core/protocols');
|
|
4
|
+
var protocols$1 = require('@smithy/core/protocols');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
Object.defineProperty(exports, "AwsJson1_0Protocol", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return protocols.AwsJson1_0Protocol; }
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "AwsJson1_1Protocol", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () { return protocols.AwsJson1_1Protocol; }
|
|
15
|
+
});
|
|
16
|
+
Object.defineProperty(exports, "AwsJsonRpcProtocol", {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function () { return protocols.AwsJsonRpcProtocol; }
|
|
19
|
+
});
|
|
20
|
+
Object.defineProperty(exports, "AwsQueryProtocol", {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function () { return protocols.AwsQueryProtocol; }
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "AwsRestJsonProtocol", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () { return protocols.AwsRestJsonProtocol; }
|
|
27
|
+
});
|
|
28
|
+
Object.defineProperty(exports, "AwsRestXmlProtocol", {
|
|
29
|
+
enumerable: true,
|
|
30
|
+
get: function () { return protocols.AwsRestXmlProtocol; }
|
|
31
|
+
});
|
|
32
|
+
Object.defineProperty(exports, "AwsSmithyRpcV2CborProtocol", {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function () { return protocols.AwsSmithyRpcV2CborProtocol; }
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(exports, "HttpBindingProtocol", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function () { return protocols$1.HttpBindingProtocol; }
|
|
39
|
+
});
|
|
40
|
+
Object.defineProperty(exports, "HttpProtocol", {
|
|
41
|
+
enumerable: true,
|
|
42
|
+
get: function () { return protocols$1.HttpProtocol; }
|
|
43
|
+
});
|
|
44
|
+
Object.defineProperty(exports, "RpcProtocol", {
|
|
45
|
+
enumerable: true,
|
|
46
|
+
get: function () { return protocols$1.RpcProtocol; }
|
|
47
|
+
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var fetchHttpHandler = require('@smithy/fetch-http-handler');
|
|
4
|
+
var nodeHttpHandler = require('@smithy/node-http-handler');
|
|
5
|
+
var protocolHttp = require('@smithy/protocol-http');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, "FetchHttpHandler", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () { return fetchHttpHandler.FetchHttpHandler; }
|
|
12
|
+
});
|
|
13
|
+
Object.defineProperty(exports, "NodeHttpHandler", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function () { return nodeHttpHandler.NodeHttpHandler; }
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(exports, "HttpRequest", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () { return protocolHttp.HttpRequest; }
|
|
20
|
+
});
|
|
21
|
+
Object.defineProperty(exports, "HttpResponse", {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () { return protocolHttp.HttpResponse; }
|
|
24
|
+
});
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var utilRetry = require('@smithy/util-retry');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "AdaptiveRetryStrategy", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () { return utilRetry.AdaptiveRetryStrategy; }
|
|
10
|
+
});
|
|
11
|
+
Object.defineProperty(exports, "ConfiguredRetryStrategy", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function () { return utilRetry.ConfiguredRetryStrategy; }
|
|
14
|
+
});
|
|
15
|
+
Object.defineProperty(exports, "DEFAULT_MAX_ATTEMPTS", {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function () { return utilRetry.DEFAULT_MAX_ATTEMPTS; }
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports, "DEFAULT_RETRY_MODE", {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: function () { return utilRetry.DEFAULT_RETRY_MODE; }
|
|
22
|
+
});
|
|
23
|
+
Object.defineProperty(exports, "DefaultRateLimiter", {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
get: function () { return utilRetry.DefaultRateLimiter; }
|
|
26
|
+
});
|
|
27
|
+
Object.defineProperty(exports, "RETRY_MODES", {
|
|
28
|
+
enumerable: true,
|
|
29
|
+
get: function () { return utilRetry.RETRY_MODES; }
|
|
30
|
+
});
|
|
31
|
+
Object.defineProperty(exports, "StandardRetryStrategy", {
|
|
32
|
+
enumerable: true,
|
|
33
|
+
get: function () { return utilRetry.StandardRetryStrategy; }
|
|
34
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var typecheck = require('@smithy/typecheck');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "getRuntimeTypecheckPlugin", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () { return typecheck.getRuntimeTypecheckPlugin; }
|
|
10
|
+
});
|
|
11
|
+
Object.defineProperty(exports, "validateSchema", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function () { return typecheck.validateSchema; }
|
|
14
|
+
});
|
package/dist-es/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@aws-sdk/credential-providers";
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export class LogLevel {
|
|
2
|
+
minimum;
|
|
3
|
+
logger;
|
|
4
|
+
static LEVELS = ["trace", "debug", "info", "warn", "error"];
|
|
5
|
+
level = 5;
|
|
6
|
+
constructor(minimum, logger = console) {
|
|
7
|
+
this.minimum = minimum;
|
|
8
|
+
this.logger = logger;
|
|
9
|
+
const index = LogLevel.LEVELS.indexOf(minimum);
|
|
10
|
+
if (index === -1) {
|
|
11
|
+
throw new Error(`Log level must be one of ${LogLevel.LEVELS.join(", ")}`);
|
|
12
|
+
}
|
|
13
|
+
this.level = index;
|
|
14
|
+
}
|
|
15
|
+
trace(...args) {
|
|
16
|
+
this.level <= 0 && this.logger.trace?.(...args);
|
|
17
|
+
}
|
|
18
|
+
debug(...args) {
|
|
19
|
+
this.level <= 1 && this.logger.debug?.(...args);
|
|
20
|
+
}
|
|
21
|
+
info(...args) {
|
|
22
|
+
this.level <= 2 && this.logger.info?.(...args);
|
|
23
|
+
}
|
|
24
|
+
warn(...args) {
|
|
25
|
+
this.level <= 3 && this.logger.warn?.(...args);
|
|
26
|
+
}
|
|
27
|
+
error(...args) {
|
|
28
|
+
this.level <= 4 && this.logger.error?.(...args);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { AwsQueryProtocol, AwsJson1_0Protocol, AwsJson1_1Protocol, AwsRestJsonProtocol, AwsRestXmlProtocol, AwsSmithyRpcV2CborProtocol, } from "@aws-sdk/core/protocols";
|
|
2
|
+
export { AwsJsonRpcProtocol } from "@aws-sdk/core/protocols";
|
|
3
|
+
export { HttpProtocol, HttpBindingProtocol, RpcProtocol } from "@smithy/core/protocols";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { RETRY_MODES, DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE, DefaultRateLimiter, StandardRetryStrategy, AdaptiveRetryStrategy, ConfiguredRetryStrategy, } from "@smithy/util-retry";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { validateSchema, getRuntimeTypecheckPlugin } from "@smithy/typecheck";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * from "./submodules/credentials/index";
|
|
2
|
+
export * from "./submodules/logger/index";
|
|
3
|
+
export * from "./submodules/protocol/index";
|
|
4
|
+
export * from "./submodules/requestHandler/index";
|
|
5
|
+
export * from "./submodules/retryStrategy/index";
|
|
6
|
+
export * from "./submodules/typecheck/index";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Logger } from "@smithy/types";
|
|
2
|
+
/**
|
|
3
|
+
* Can be provided to the SDK to log all messages at or above
|
|
4
|
+
* the given level.
|
|
5
|
+
*
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export declare class LogLevel implements Logger {
|
|
9
|
+
private minimum;
|
|
10
|
+
private logger;
|
|
11
|
+
private static LEVELS;
|
|
12
|
+
private readonly level;
|
|
13
|
+
/**
|
|
14
|
+
* @param minimum - minimum log level filter.
|
|
15
|
+
* @param logger - to which messages are forwarded. Default console.
|
|
16
|
+
*/
|
|
17
|
+
constructor(minimum: keyof Logger, logger?: Logger);
|
|
18
|
+
trace(...args: any[]): void;
|
|
19
|
+
debug(...args: any[]): void;
|
|
20
|
+
info(...args: any[]): void;
|
|
21
|
+
warn(...args: any[]): void;
|
|
22
|
+
error(...args: any[]): void;
|
|
23
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { AwsQueryProtocol, AwsJson1_0Protocol, AwsJson1_1Protocol, AwsRestJsonProtocol, AwsRestXmlProtocol, AwsSmithyRpcV2CborProtocol, } from "@aws-sdk/core/protocols";
|
|
2
|
+
export { AwsJsonRpcProtocol } from "@aws-sdk/core/protocols";
|
|
3
|
+
export { HttpProtocol, HttpBindingProtocol, RpcProtocol } from "@smithy/core/protocols";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { RETRY_MODES, DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE, DefaultRateLimiter, StandardRetryStrategy, AdaptiveRetryStrategy, ConfiguredRetryStrategy, type DefaultRateLimiterOptions, } from "@smithy/util-retry";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * from "./submodules/credentials/index";
|
|
2
|
+
export * from "./submodules/logger/index";
|
|
3
|
+
export * from "./submodules/protocol/index";
|
|
4
|
+
export * from "./submodules/requestHandler/index";
|
|
5
|
+
export * from "./submodules/retryStrategy/index";
|
|
6
|
+
export * from "./submodules/typecheck/index";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Logger } from "@smithy/types";
|
|
2
|
+
export declare class LogLevel implements Logger {
|
|
3
|
+
private minimum;
|
|
4
|
+
private logger;
|
|
5
|
+
private static LEVELS;
|
|
6
|
+
private readonly level;
|
|
7
|
+
constructor(minimum: keyof Logger, logger?: Logger);
|
|
8
|
+
trace(...args: any[]): void;
|
|
9
|
+
debug(...args: any[]): void;
|
|
10
|
+
info(...args: any[]): void;
|
|
11
|
+
warn(...args: any[]): void;
|
|
12
|
+
error(...args: any[]): void;
|
|
13
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export {
|
|
2
|
+
AwsQueryProtocol,
|
|
3
|
+
AwsJson1_0Protocol,
|
|
4
|
+
AwsJson1_1Protocol,
|
|
5
|
+
AwsRestJsonProtocol,
|
|
6
|
+
AwsRestXmlProtocol,
|
|
7
|
+
AwsSmithyRpcV2CborProtocol,
|
|
8
|
+
} from "@aws-sdk/core/protocols";
|
|
9
|
+
export { AwsJsonRpcProtocol } from "@aws-sdk/core/protocols";
|
|
10
|
+
export {
|
|
11
|
+
HttpProtocol,
|
|
12
|
+
HttpBindingProtocol,
|
|
13
|
+
RpcProtocol,
|
|
14
|
+
} from "@smithy/core/protocols";
|
package/logger.d.ts
ADDED
package/logger.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@aws-sdk/config",
|
|
3
|
+
"version": "3.974.0",
|
|
4
|
+
"description": "Injectable dependencies, extensions, and other plugins for AWS SDK clients.",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"build": "yarn lint && concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
|
|
7
|
+
"build:cjs": "node ../../scripts/compilation/inline config && premove ./dist-cjs/api-extractor-type-index.js",
|
|
8
|
+
"build:es": "tsc -p tsconfig.es.json && premove ./dist-es/api-extractor-type-index.js",
|
|
9
|
+
"build:include:deps": "yarn g:turbo run build -F=\"$npm_package_name\"",
|
|
10
|
+
"build:types": "tsc -p tsconfig.types.json",
|
|
11
|
+
"build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
|
|
12
|
+
"lint": "node ../../scripts/validation/submodules-linter.js --pkg config",
|
|
13
|
+
"clean": "premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo",
|
|
14
|
+
"extract:docs": "api-extractor run --local",
|
|
15
|
+
"test": "yarn g:vitest run",
|
|
16
|
+
"test:watch": "yarn g:vitest watch",
|
|
17
|
+
"test:integration": "yarn g:vitest run -c vitest.config.integ.mts",
|
|
18
|
+
"test:integration:watch": "yarn g:vitest watch -c vitest.config.integ.mts"
|
|
19
|
+
},
|
|
20
|
+
"main": "./dist-cjs/index.js",
|
|
21
|
+
"module": "./dist-es/index.js",
|
|
22
|
+
"types": "./dist-types/index.d.ts",
|
|
23
|
+
"exports": {
|
|
24
|
+
"./credentials": {
|
|
25
|
+
"types": "./dist-types/submodules/credentials/index.d.ts",
|
|
26
|
+
"module": "./dist-es/submodules/credentials/index.js",
|
|
27
|
+
"node": "./dist-cjs/submodules/credentials/index.js",
|
|
28
|
+
"import": "./dist-es/submodules/credentials/index.js",
|
|
29
|
+
"require": "./dist-cjs/submodules/credentials/index.js"
|
|
30
|
+
},
|
|
31
|
+
"./logger": {
|
|
32
|
+
"types": "./dist-types/submodules/logger/index.d.ts",
|
|
33
|
+
"module": "./dist-es/submodules/logger/index.js",
|
|
34
|
+
"node": "./dist-cjs/submodules/logger/index.js",
|
|
35
|
+
"import": "./dist-es/submodules/logger/index.js",
|
|
36
|
+
"require": "./dist-cjs/submodules/logger/index.js"
|
|
37
|
+
},
|
|
38
|
+
"./protocol": {
|
|
39
|
+
"types": "./dist-types/submodules/protocol/index.d.ts",
|
|
40
|
+
"module": "./dist-es/submodules/protocol/index.js",
|
|
41
|
+
"node": "./dist-cjs/submodules/protocol/index.js",
|
|
42
|
+
"import": "./dist-es/submodules/protocol/index.js",
|
|
43
|
+
"require": "./dist-cjs/submodules/protocol/index.js"
|
|
44
|
+
},
|
|
45
|
+
"./requestHandler": {
|
|
46
|
+
"types": "./dist-types/submodules/requestHandler/index.d.ts",
|
|
47
|
+
"module": "./dist-es/submodules/requestHandler/index.js",
|
|
48
|
+
"node": "./dist-cjs/submodules/requestHandler/index.js",
|
|
49
|
+
"import": "./dist-es/submodules/requestHandler/index.js",
|
|
50
|
+
"require": "./dist-cjs/submodules/requestHandler/index.js"
|
|
51
|
+
},
|
|
52
|
+
"./retryStrategy": {
|
|
53
|
+
"types": "./dist-types/submodules/retryStrategy/index.d.ts",
|
|
54
|
+
"module": "./dist-es/submodules/retryStrategy/index.js",
|
|
55
|
+
"node": "./dist-cjs/submodules/retryStrategy/index.js",
|
|
56
|
+
"import": "./dist-es/submodules/retryStrategy/index.js",
|
|
57
|
+
"require": "./dist-cjs/submodules/retryStrategy/index.js"
|
|
58
|
+
},
|
|
59
|
+
"./typecheck": {
|
|
60
|
+
"types": "./dist-types/submodules/typecheck/index.d.ts",
|
|
61
|
+
"module": "./dist-es/submodules/typecheck/index.js",
|
|
62
|
+
"node": "./dist-cjs/submodules/typecheck/index.js",
|
|
63
|
+
"import": "./dist-es/submodules/typecheck/index.js",
|
|
64
|
+
"require": "./dist-cjs/submodules/typecheck/index.js"
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"files": [
|
|
68
|
+
"./credentials.d.ts",
|
|
69
|
+
"./credentials.js",
|
|
70
|
+
"./logger.d.ts",
|
|
71
|
+
"./logger.js",
|
|
72
|
+
"./protocol.d.ts",
|
|
73
|
+
"./protocol.js",
|
|
74
|
+
"./requestHandler.d.ts",
|
|
75
|
+
"./requestHandler.js",
|
|
76
|
+
"./retryStrategy.d.ts",
|
|
77
|
+
"./retryStrategy.js",
|
|
78
|
+
"./typecheck.d.ts",
|
|
79
|
+
"./typecheck.js",
|
|
80
|
+
"dist-*/**"
|
|
81
|
+
],
|
|
82
|
+
"sideEffects": false,
|
|
83
|
+
"author": {
|
|
84
|
+
"name": "AWS SDK for JavaScript Team",
|
|
85
|
+
"url": "https://aws.amazon.com/javascript/"
|
|
86
|
+
},
|
|
87
|
+
"license": "Apache-2.0",
|
|
88
|
+
"dependencies": {
|
|
89
|
+
"@aws-sdk/core": "^3.973.0",
|
|
90
|
+
"@aws-sdk/credential-providers": "3.974.0",
|
|
91
|
+
"@aws-sdk/types": "^3.973.0",
|
|
92
|
+
"@smithy/core": "^3.21.0",
|
|
93
|
+
"@smithy/fetch-http-handler": "^5.3.9",
|
|
94
|
+
"@smithy/node-http-handler": "^4.4.8",
|
|
95
|
+
"@smithy/protocol-http": "^5.3.8",
|
|
96
|
+
"@smithy/smithy-client": "^4.10.11",
|
|
97
|
+
"@smithy/typecheck": "^1.0.4",
|
|
98
|
+
"@smithy/types": "^4.12.0",
|
|
99
|
+
"@smithy/util-retry": "^4.2.8",
|
|
100
|
+
"tslib": "^2.6.2"
|
|
101
|
+
},
|
|
102
|
+
"devDependencies": {
|
|
103
|
+
"@tsconfig/recommended": "1.0.1",
|
|
104
|
+
"concurrently": "7.0.0",
|
|
105
|
+
"downlevel-dts": "0.10.1",
|
|
106
|
+
"premove": "4.0.0",
|
|
107
|
+
"typescript": "~5.8.3"
|
|
108
|
+
},
|
|
109
|
+
"engines": {
|
|
110
|
+
"node": ">=20.0.0"
|
|
111
|
+
},
|
|
112
|
+
"typesVersions": {
|
|
113
|
+
"<4.0": {
|
|
114
|
+
"dist-types/*": [
|
|
115
|
+
"dist-types/ts3.4/*"
|
|
116
|
+
]
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
"homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/packages/config",
|
|
120
|
+
"repository": {
|
|
121
|
+
"type": "git",
|
|
122
|
+
"url": "https://github.com/aws/aws-sdk-js-v3.git",
|
|
123
|
+
"directory": "packages/config"
|
|
124
|
+
}
|
|
125
|
+
}
|
package/protocol.d.ts
ADDED
package/protocol.js
ADDED
package/retryStrategy.js
ADDED
package/typecheck.d.ts
ADDED