@aws-sdk/client-sso-oidc 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 +34 -34
package/README.md CHANGED
@@ -47,8 +47,9 @@ Guide</i>.</p>
47
47
  IAM Identity Center?</a> in the <i>IAM Identity Center User Guide</i>.</p>
48
48
 
49
49
  ## Installing
50
- To install this package, simply type add or install @aws-sdk/client-sso-oidc
51
- using your favorite package manager:
50
+
51
+ To install this package, use the CLI of your favorite package manager:
52
+
52
53
  - `npm install @aws-sdk/client-sso-oidc`
53
54
  - `yarn add @aws-sdk/client-sso-oidc`
54
55
  - `pnpm add @aws-sdk/client-sso-oidc`
@@ -73,15 +74,15 @@ import { SSOOIDCClient, CreateTokenCommand } from "@aws-sdk/client-sso-oidc";
73
74
 
74
75
  ### Usage
75
76
 
76
- To send a request, you:
77
+ To send a request:
77
78
 
78
- - Initiate client with configuration (e.g. credentials, region).
79
- - Initiate command with input parameters.
80
- - Call `send` operation on client with command object as input.
81
- - If you are using a custom http handler, you may call `destroy()` to close open connections.
79
+ - Instantiate a client with configuration (e.g. credentials, region).
80
+ - See [docs/CLIENTS](https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md) for configuration details.
81
+ - See [@aws-sdk/config](https://github.com/aws/aws-sdk-js-v3/blob/main/packages/config/README.md) for additional options.
82
+ - Instantiate a command with input parameters.
83
+ - Call the `send` operation on the client, providing the command object as input.
82
84
 
83
85
  ```js
84
- // a client can be shared by different commands.
85
86
  const client = new SSOOIDCClient({ region: "REGION" });
86
87
 
87
88
  const params = { /** input parameters */ };
@@ -90,7 +91,7 @@ const command = new CreateTokenCommand(params);
90
91
 
91
92
  #### Async/await
92
93
 
93
- We recommend using [await](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await)
94
+ We recommend using the [await](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await)
94
95
  operator to wait for the promise returned by send operation as follows:
95
96
 
96
97
  ```js
@@ -105,26 +106,9 @@ try {
105
106
  }
106
107
  ```
107
108
 
108
- Async-await is clean, concise, intuitive, easy to debug and has better error handling
109
- as compared to using Promise chains or callbacks.
110
-
111
109
  #### Promises
112
110
 
113
- You can also use [Promise chaining](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises#chaining)
114
- to execute send operation.
115
-
116
- ```js
117
- client.send(command).then(
118
- (data) => {
119
- // process data.
120
- },
121
- (error) => {
122
- // error handling.
123
- }
124
- );
125
- ```
126
-
127
- Promises can also be called using `.catch()` and `.finally()` as follows:
111
+ You can also use [Promise chaining](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises#chaining).
128
112
 
129
113
  ```js
130
114
  client
@@ -140,27 +124,21 @@ client
140
124
  });
141
125
  ```
142
126
 
143
- #### Callbacks
144
-
145
- We do not recommend using callbacks because of [callback hell](http://callbackhell.com/),
146
- but they are supported by the send operation.
127
+ #### Aggregated client
147
128
 
148
- ```js
149
- // callbacks.
150
- client.send(command, (err, data) => {
151
- // process err and data.
152
- });
153
- ```
129
+ The aggregated client class is exported from the same package, but without the "Client" suffix.
154
130
 
155
- #### v2 compatible style
131
+ `SSOOIDC` extends `SSOOIDCClient` and additionally supports all operations, waiters, and paginators as methods.
132
+ This style may be familiar to you from the AWS SDK for JavaScript v2.
156
133
 
157
- The client can also send requests using v2 compatible style.
158
- However, it results in a bigger bundle size and may be dropped in next major version. More details in the blog post
159
- on [modular packages in AWS SDK for JavaScript](https://aws.amazon.com/blogs/developer/modular-packages-in-aws-sdk-for-javascript/)
134
+ If you are bundling the AWS SDK, we recommend using only the bare-bones client (`SSOOIDCClient`).
135
+ More details are in the blog post on
136
+ [modular packages in AWS SDK for JavaScript](https://aws.amazon.com/blogs/developer/modular-packages-in-aws-sdk-for-javascript/).
160
137
 
161
138
  ```ts
162
- import * as AWS from "@aws-sdk/client-sso-oidc";
163
- const client = new AWS.SSOOIDC({ region: "REGION" });
139
+ import { SSOOIDC } from "@aws-sdk/client-sso-oidc";
140
+
141
+ const client = new SSOOIDC({ region: "REGION" });
164
142
 
165
143
  // async/await.
166
144
  try {
@@ -180,7 +158,7 @@ client
180
158
  // error handling.
181
159
  });
182
160
 
183
- // callbacks.
161
+ // callbacks (not recommended).
184
162
  client.createToken(params, (err, data) => {
185
163
  // process err and data.
186
164
  });
@@ -208,12 +186,14 @@ try {
208
186
  }
209
187
  ```
210
188
 
189
+ See also [docs/ERROR_HANDLING](https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/ERROR_HANDLING.md).
190
+
211
191
  ## Getting Help
212
192
 
213
193
  Please use these community resources for getting help.
214
- We use the GitHub issues for tracking bugs and feature requests, but have limited bandwidth to address them.
194
+ We use GitHub issues for tracking bugs and feature requests, but have limited bandwidth to address them.
215
195
 
216
- - Visit [Developer Guide](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/welcome.html)
196
+ - Visit the [Developer Guide](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/welcome.html)
217
197
  or [API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/index.html).
218
198
  - Check out the blog posts tagged with [`aws-sdk-js`](https://aws.amazon.com/blogs/developer/tag/aws-sdk-js/)
219
199
  on AWS Developer Blog.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-sso-oidc",
3
3
  "description": "AWS SDK for JavaScript Sso Oidc 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-sso-oidc",
@@ -25,46 +25,46 @@
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",
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
63
  "@smithy/util-utf8": "^4.2.2",
64
64
  "tslib": "^2.6.2"
65
65
  },
66
66
  "devDependencies": {
67
- "@smithy/snapshot-testing": "^2.0.0",
67
+ "@smithy/snapshot-testing": "^2.0.2",
68
68
  "@tsconfig/node20": "20.1.8",
69
69
  "@types/node": "^20.14.8",
70
70
  "concurrently": "7.0.0",