@aws-sdk/client-appconfigdata 3.1007.0 → 3.1009.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.
Files changed (2) hide show
  1. package/README.md +26 -46
  2. package/package.json +35 -35
package/README.md CHANGED
@@ -67,8 +67,9 @@ configuration using the AppConfig Data <code>StartConfigurationSession</code> an
67
67
  configuration</a> in the <i>AppConfig User Guide</i>.</p>
68
68
 
69
69
  ## Installing
70
- To install this package, simply type add or install @aws-sdk/client-appconfigdata
71
- using your favorite package manager:
70
+
71
+ To install this package, use the CLI of your favorite package manager:
72
+
72
73
  - `npm install @aws-sdk/client-appconfigdata`
73
74
  - `yarn add @aws-sdk/client-appconfigdata`
74
75
  - `pnpm add @aws-sdk/client-appconfigdata`
@@ -93,15 +94,15 @@ import { AppConfigDataClient, GetLatestConfigurationCommand } from "@aws-sdk/cli
93
94
 
94
95
  ### Usage
95
96
 
96
- To send a request, you:
97
+ To send a request:
97
98
 
98
- - Initiate client with configuration (e.g. credentials, region).
99
- - Initiate command with input parameters.
100
- - Call `send` operation on client with command object as input.
101
- - If you are using a custom http handler, you may call `destroy()` to close open connections.
99
+ - Instantiate a client with configuration (e.g. credentials, region).
100
+ - See [docs/CLIENTS](https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md) for configuration details.
101
+ - See [@aws-sdk/config](https://github.com/aws/aws-sdk-js-v3/blob/main/packages/config/README.md) for additional options.
102
+ - Instantiate a command with input parameters.
103
+ - Call the `send` operation on the client, providing the command object as input.
102
104
 
103
105
  ```js
104
- // a client can be shared by different commands.
105
106
  const client = new AppConfigDataClient({ region: "REGION" });
106
107
 
107
108
  const params = { /** input parameters */ };
@@ -110,7 +111,7 @@ const command = new GetLatestConfigurationCommand(params);
110
111
 
111
112
  #### Async/await
112
113
 
113
- We recommend using [await](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await)
114
+ We recommend using the [await](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await)
114
115
  operator to wait for the promise returned by send operation as follows:
115
116
 
116
117
  ```js
@@ -125,26 +126,9 @@ try {
125
126
  }
126
127
  ```
127
128
 
128
- Async-await is clean, concise, intuitive, easy to debug and has better error handling
129
- as compared to using Promise chains or callbacks.
130
-
131
129
  #### Promises
132
130
 
133
- You can also use [Promise chaining](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises#chaining)
134
- to execute send operation.
135
-
136
- ```js
137
- client.send(command).then(
138
- (data) => {
139
- // process data.
140
- },
141
- (error) => {
142
- // error handling.
143
- }
144
- );
145
- ```
146
-
147
- Promises can also be called using `.catch()` and `.finally()` as follows:
131
+ You can also use [Promise chaining](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises#chaining).
148
132
 
149
133
  ```js
150
134
  client
@@ -160,27 +144,21 @@ client
160
144
  });
161
145
  ```
162
146
 
163
- #### Callbacks
164
-
165
- We do not recommend using callbacks because of [callback hell](http://callbackhell.com/),
166
- but they are supported by the send operation.
147
+ #### Aggregated client
167
148
 
168
- ```js
169
- // callbacks.
170
- client.send(command, (err, data) => {
171
- // process err and data.
172
- });
173
- ```
149
+ The aggregated client class is exported from the same package, but without the "Client" suffix.
174
150
 
175
- #### v2 compatible style
151
+ `AppConfigData` extends `AppConfigDataClient` and additionally supports all operations, waiters, and paginators as methods.
152
+ This style may be familiar to you from the AWS SDK for JavaScript v2.
176
153
 
177
- The client can also send requests using v2 compatible style.
178
- However, it results in a bigger bundle size and may be dropped in next major version. More details in the blog post
179
- on [modular packages in AWS SDK for JavaScript](https://aws.amazon.com/blogs/developer/modular-packages-in-aws-sdk-for-javascript/)
154
+ If you are bundling the AWS SDK, we recommend using only the bare-bones client (`AppConfigDataClient`).
155
+ More details are in the blog post on
156
+ [modular packages in AWS SDK for JavaScript](https://aws.amazon.com/blogs/developer/modular-packages-in-aws-sdk-for-javascript/).
180
157
 
181
158
  ```ts
182
- import * as AWS from "@aws-sdk/client-appconfigdata";
183
- const client = new AWS.AppConfigData({ region: "REGION" });
159
+ import { AppConfigData } from "@aws-sdk/client-appconfigdata";
160
+
161
+ const client = new AppConfigData({ region: "REGION" });
184
162
 
185
163
  // async/await.
186
164
  try {
@@ -200,7 +178,7 @@ client
200
178
  // error handling.
201
179
  });
202
180
 
203
- // callbacks.
181
+ // callbacks (not recommended).
204
182
  client.getLatestConfiguration(params, (err, data) => {
205
183
  // process err and data.
206
184
  });
@@ -228,12 +206,14 @@ try {
228
206
  }
229
207
  ```
230
208
 
209
+ See also [docs/ERROR_HANDLING](https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/ERROR_HANDLING.md).
210
+
231
211
  ## Getting Help
232
212
 
233
213
  Please use these community resources for getting help.
234
- We use the GitHub issues for tracking bugs and feature requests, but have limited bandwidth to address them.
214
+ We use GitHub issues for tracking bugs and feature requests, but have limited bandwidth to address them.
235
215
 
236
- - Visit [Developer Guide](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/welcome.html)
216
+ - Visit the [Developer Guide](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/welcome.html)
237
217
  or [API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/index.html).
238
218
  - Check out the blog posts tagged with [`aws-sdk-js`](https://aws.amazon.com/blogs/developer/tag/aws-sdk-js/)
239
219
  on AWS Developer Blog.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-appconfigdata",
3
3
  "description": "AWS SDK for JavaScript Appconfigdata Client for Node.js, Browser and React Native",
4
- "version": "3.1007.0",
4
+ "version": "3.1009.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
7
7
  "build:cjs": "node ../../scripts/compilation/inline client-appconfigdata",
@@ -25,47 +25,47 @@
25
25
  "dependencies": {
26
26
  "@aws-crypto/sha256-browser": "5.2.0",
27
27
  "@aws-crypto/sha256-js": "5.2.0",
28
- "@aws-sdk/core": "^3.973.19",
29
- "@aws-sdk/credential-provider-node": "^3.972.19",
30
- "@aws-sdk/middleware-host-header": "^3.972.7",
31
- "@aws-sdk/middleware-logger": "^3.972.7",
32
- "@aws-sdk/middleware-recursion-detection": "^3.972.7",
33
- "@aws-sdk/middleware-user-agent": "^3.972.20",
34
- "@aws-sdk/region-config-resolver": "^3.972.7",
35
- "@aws-sdk/types": "^3.973.5",
36
- "@aws-sdk/util-endpoints": "^3.996.4",
37
- "@aws-sdk/util-user-agent-browser": "^3.972.7",
38
- "@aws-sdk/util-user-agent-node": "^3.973.5",
39
- "@smithy/config-resolver": "^4.4.10",
40
- "@smithy/core": "^3.23.9",
41
- "@smithy/fetch-http-handler": "^5.3.13",
42
- "@smithy/hash-node": "^4.2.11",
43
- "@smithy/invalid-dependency": "^4.2.11",
44
- "@smithy/middleware-content-length": "^4.2.11",
45
- "@smithy/middleware-endpoint": "^4.4.23",
46
- "@smithy/middleware-retry": "^4.4.40",
47
- "@smithy/middleware-serde": "^4.2.12",
48
- "@smithy/middleware-stack": "^4.2.11",
49
- "@smithy/node-config-provider": "^4.3.11",
50
- "@smithy/node-http-handler": "^4.4.14",
51
- "@smithy/protocol-http": "^5.3.11",
52
- "@smithy/smithy-client": "^4.12.3",
53
- "@smithy/types": "^4.13.0",
54
- "@smithy/url-parser": "^4.2.11",
28
+ "@aws-sdk/core": "^3.973.20",
29
+ "@aws-sdk/credential-provider-node": "^3.972.21",
30
+ "@aws-sdk/middleware-host-header": "^3.972.8",
31
+ "@aws-sdk/middleware-logger": "^3.972.8",
32
+ "@aws-sdk/middleware-recursion-detection": "^3.972.8",
33
+ "@aws-sdk/middleware-user-agent": "^3.972.21",
34
+ "@aws-sdk/region-config-resolver": "^3.972.8",
35
+ "@aws-sdk/types": "^3.973.6",
36
+ "@aws-sdk/util-endpoints": "^3.996.5",
37
+ "@aws-sdk/util-user-agent-browser": "^3.972.8",
38
+ "@aws-sdk/util-user-agent-node": "^3.973.7",
39
+ "@smithy/config-resolver": "^4.4.11",
40
+ "@smithy/core": "^3.23.11",
41
+ "@smithy/fetch-http-handler": "^5.3.15",
42
+ "@smithy/hash-node": "^4.2.12",
43
+ "@smithy/invalid-dependency": "^4.2.12",
44
+ "@smithy/middleware-content-length": "^4.2.12",
45
+ "@smithy/middleware-endpoint": "^4.4.25",
46
+ "@smithy/middleware-retry": "^4.4.42",
47
+ "@smithy/middleware-serde": "^4.2.14",
48
+ "@smithy/middleware-stack": "^4.2.12",
49
+ "@smithy/node-config-provider": "^4.3.12",
50
+ "@smithy/node-http-handler": "^4.4.16",
51
+ "@smithy/protocol-http": "^5.3.12",
52
+ "@smithy/smithy-client": "^4.12.5",
53
+ "@smithy/types": "^4.13.1",
54
+ "@smithy/url-parser": "^4.2.12",
55
55
  "@smithy/util-base64": "^4.3.2",
56
56
  "@smithy/util-body-length-browser": "^4.2.2",
57
57
  "@smithy/util-body-length-node": "^4.2.3",
58
- "@smithy/util-defaults-mode-browser": "^4.3.39",
59
- "@smithy/util-defaults-mode-node": "^4.2.42",
60
- "@smithy/util-endpoints": "^3.3.2",
61
- "@smithy/util-middleware": "^4.2.11",
62
- "@smithy/util-retry": "^4.2.11",
63
- "@smithy/util-stream": "^4.5.17",
58
+ "@smithy/util-defaults-mode-browser": "^4.3.41",
59
+ "@smithy/util-defaults-mode-node": "^4.2.44",
60
+ "@smithy/util-endpoints": "^3.3.3",
61
+ "@smithy/util-middleware": "^4.2.12",
62
+ "@smithy/util-retry": "^4.2.12",
63
+ "@smithy/util-stream": "^4.5.19",
64
64
  "@smithy/util-utf8": "^4.2.2",
65
65
  "tslib": "^2.6.2"
66
66
  },
67
67
  "devDependencies": {
68
- "@smithy/snapshot-testing": "^2.0.0",
68
+ "@smithy/snapshot-testing": "^2.0.2",
69
69
  "@tsconfig/node20": "20.1.8",
70
70
  "@types/node": "^20.14.8",
71
71
  "concurrently": "7.0.0",