cdk-comprehend-s3olap 2.0.78 → 2.0.81

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 (42) hide show
  1. package/.jsii +3 -3
  2. package/lib/cdk-comprehend-s3olap.js +2 -2
  3. package/lib/comprehend-lambdas.js +2 -2
  4. package/lib/iam-roles.js +4 -4
  5. package/node_modules/aws-sdk/CHANGELOG.md +13 -1
  6. package/node_modules/aws-sdk/README.md +1 -1
  7. package/node_modules/aws-sdk/apis/iotwireless-2020-11-22.min.json +123 -79
  8. package/node_modules/aws-sdk/apis/mediapackage-2017-10-12.min.json +7 -0
  9. package/node_modules/aws-sdk/apis/panorama-2019-07-24.min.json +47 -10
  10. package/node_modules/aws-sdk/apis/sso-oidc-2019-06-10.min.json +1 -2
  11. package/node_modules/aws-sdk/clients/elbv2.d.ts +1 -1
  12. package/node_modules/aws-sdk/clients/gamelift.d.ts +1 -1
  13. package/node_modules/aws-sdk/clients/iotwireless.d.ts +60 -11
  14. package/node_modules/aws-sdk/clients/mediapackage.d.ts +2 -0
  15. package/node_modules/aws-sdk/clients/panorama.d.ts +62 -0
  16. package/node_modules/aws-sdk/clients/rds.d.ts +5 -5
  17. package/node_modules/aws-sdk/clients/ssooidc.d.ts +12 -12
  18. package/node_modules/aws-sdk/dist/aws-sdk-core-react-native.js +151 -31
  19. package/node_modules/aws-sdk/dist/aws-sdk-react-native.js +157 -37
  20. package/node_modules/aws-sdk/dist/aws-sdk.js +230 -114
  21. package/node_modules/aws-sdk/dist/aws-sdk.min.js +11 -11
  22. package/node_modules/aws-sdk/lib/config-base.d.ts +14 -0
  23. package/node_modules/aws-sdk/lib/config.js +78 -1
  24. package/node_modules/aws-sdk/lib/core.js +1 -1
  25. package/node_modules/aws-sdk/lib/event_listeners.js +49 -30
  26. package/node_modules/aws-sdk/lib/node_loader.js +17 -1
  27. package/node_modules/aws-sdk/lib/service.js +2 -0
  28. package/node_modules/aws-sdk/lib/shared-ini/ini-loader.d.ts +1 -12
  29. package/node_modules/aws-sdk/lib/shared-ini/ini-loader.js +68 -30
  30. package/node_modules/aws-sdk/lib/signers/bearer.js +14 -0
  31. package/node_modules/aws-sdk/lib/signers/request_signer.js +2 -0
  32. package/node_modules/aws-sdk/lib/token/sso_token_provider.d.ts +12 -0
  33. package/node_modules/aws-sdk/lib/token/sso_token_provider.js +245 -0
  34. package/node_modules/aws-sdk/lib/token/static_token_provider.d.ts +8 -0
  35. package/node_modules/aws-sdk/lib/token/static_token_provider.js +27 -0
  36. package/node_modules/aws-sdk/lib/token/token_provider_chain.d.ts +24 -0
  37. package/node_modules/aws-sdk/lib/token/token_provider_chain.js +165 -0
  38. package/node_modules/aws-sdk/lib/token.d.ts +101 -0
  39. package/node_modules/aws-sdk/lib/token.js +219 -0
  40. package/node_modules/aws-sdk/package.json +1 -1
  41. package/node_modules/aws-sdk/scripts/region-checker/allowlist.js +4 -1
  42. package/package.json +6 -6
@@ -0,0 +1,219 @@
1
+ var AWS = require('./core');
2
+
3
+ /**
4
+ * Represents AWS token object, which contains {token}, and optional
5
+ * {expireTime}.
6
+ * Creating a `Token` object allows you to pass around your
7
+ * token to configuration and service objects.
8
+ *
9
+ * Note that this class typically does not need to be constructed manually,
10
+ * as the {AWS.Config} and {AWS.Service} classes both accept simple
11
+ * options hashes with the two keys. The token from this object will be used
12
+ * automatically in operations which require them.
13
+ *
14
+ * ## Expiring and Refreshing Token
15
+ *
16
+ * Occasionally token can expire in the middle of a long-running
17
+ * application. In this case, the SDK will automatically attempt to
18
+ * refresh the token from the storage location if the Token
19
+ * class implements the {refresh} method.
20
+ *
21
+ * If you are implementing a token storage location, you
22
+ * will want to create a subclass of the `Token` class and
23
+ * override the {refresh} method. This method allows token to be
24
+ * retrieved from the backing store, be it a file system, database, or
25
+ * some network storage. The method should reset the token attributes
26
+ * on the object.
27
+ *
28
+ * @!attribute token
29
+ * @return [String] represents the literal token string. This will typically
30
+ * be a base64 encoded string.
31
+ * @!attribute expireTime
32
+ * @return [Date] a time when token should be considered expired. Used
33
+ * in conjunction with {expired}.
34
+ * @!attribute expired
35
+ * @return [Boolean] whether the token is expired and require a refresh. Used
36
+ * in conjunction with {expireTime}.
37
+ */
38
+ AWS.Token = AWS.util.inherit({
39
+ /**
40
+ * Creates a Token object with a given set of information in options hash.
41
+ * @option options token [String] represents the literal token string.
42
+ * @option options expireTime [Date] field representing the time at which
43
+ * the token expires.
44
+ * @example Create a token object
45
+ * var token = new AWS.Token({ token: 'token' });
46
+ */
47
+ constructor: function Token(options) {
48
+ // hide token from being displayed with util.inspect
49
+ AWS.util.hideProperties(this, ['token']);
50
+
51
+ this.expired = false;
52
+ this.expireTime = null;
53
+ this.refreshCallbacks = [];
54
+ if (arguments.length === 1) {
55
+ var options = arguments[0];
56
+ this.token = options.token;
57
+ this.expireTime = options.expireTime;
58
+ }
59
+ },
60
+
61
+ /**
62
+ * @return [Integer] the number of seconds before {expireTime} during which
63
+ * the token will be considered expired.
64
+ */
65
+ expiryWindow: 15,
66
+
67
+ /**
68
+ * @return [Boolean] whether the Token object should call {refresh}
69
+ * @note Subclasses should override this method to provide custom refresh
70
+ * logic.
71
+ */
72
+ needsRefresh: function needsRefresh() {
73
+ var currentTime = AWS.util.date.getDate().getTime();
74
+ var adjustedTime = new Date(currentTime + this.expiryWindow * 1000);
75
+
76
+ if (this.expireTime && adjustedTime > this.expireTime)
77
+ return true;
78
+
79
+ return this.expired || !this.token;
80
+ },
81
+
82
+ /**
83
+ * Gets the existing token, refreshing them if they are not yet loaded
84
+ * or have expired. Users should call this method before using {refresh},
85
+ * as this will not attempt to reload token when they are already
86
+ * loaded into the object.
87
+ *
88
+ * @callback callback function(err)
89
+ * When this callback is called with no error, it means either token
90
+ * do not need to be refreshed or refreshed token information has
91
+ * been loaded into the object (as the `token` property).
92
+ * @param err [Error] if an error occurred, this value will be filled
93
+ */
94
+ get: function get(callback) {
95
+ var self = this;
96
+ if (this.needsRefresh()) {
97
+ this.refresh(function(err) {
98
+ if (!err) self.expired = false; // reset expired flag
99
+ if (callback) callback(err);
100
+ });
101
+ } else if (callback) {
102
+ callback();
103
+ }
104
+ },
105
+
106
+ /**
107
+ * @!method getPromise()
108
+ * Returns a 'thenable' promise.
109
+ * Gets the existing token, refreshing it if it's not yet loaded
110
+ * or have expired. Users should call this method before using {refresh},
111
+ * as this will not attempt to reload token when it's already
112
+ * loaded into the object.
113
+ *
114
+ * Two callbacks can be provided to the `then` method on the returned promise.
115
+ * The first callback will be called if the promise is fulfilled, and the second
116
+ * callback will be called if the promise is rejected.
117
+ * @callback fulfilledCallback function()
118
+ * Called if the promise is fulfilled. When this callback is called, it means
119
+ * either token does not need to be refreshed or refreshed token information
120
+ * has been loaded into the object (as the `token` property).
121
+ * @callback rejectedCallback function(err)
122
+ * Called if the promise is rejected.
123
+ * @param err [Error] if an error occurred, this value will be filled.
124
+ * @return [Promise] A promise that represents the state of the `get` call.
125
+ * @example Calling the `getPromise` method.
126
+ * var promise = tokenProvider.getPromise();
127
+ * promise.then(function() { ... }, function(err) { ... });
128
+ */
129
+
130
+ /**
131
+ * @!method refreshPromise()
132
+ * Returns a 'thenable' promise.
133
+ * Refreshes the token. Users should call {get} before attempting
134
+ * to forcibly refresh token.
135
+ *
136
+ * Two callbacks can be provided to the `then` method on the returned promise.
137
+ * The first callback will be called if the promise is fulfilled, and the second
138
+ * callback will be called if the promise is rejected.
139
+ * @callback fulfilledCallback function()
140
+ * Called if the promise is fulfilled. When this callback is called, it
141
+ * means refreshed token information has been loaded into the object
142
+ * (as the `token` property).
143
+ * @callback rejectedCallback function(err)
144
+ * Called if the promise is rejected.
145
+ * @param err [Error] if an error occurred, this value will be filled.
146
+ * @return [Promise] A promise that represents the state of the `refresh` call.
147
+ * @example Calling the `refreshPromise` method.
148
+ * var promise = tokenProvider.refreshPromise();
149
+ * promise.then(function() { ... }, function(err) { ... });
150
+ */
151
+
152
+ /**
153
+ * Refreshes the token. Users should call {get} before attempting
154
+ * to forcibly refresh token.
155
+ *
156
+ * @callback callback function(err)
157
+ * When this callback is called with no error, it means refreshed
158
+ * token information has been loaded into the object (as the
159
+ * `token` property).
160
+ * @param err [Error] if an error occurred, this value will be filled
161
+ * @note Subclasses should override this class to reset the
162
+ * {token} on the token object and then call the callback with
163
+ * any error information.
164
+ * @see get
165
+ */
166
+ refresh: function refresh(callback) {
167
+ this.expired = false;
168
+ callback();
169
+ },
170
+
171
+ /**
172
+ * @api private
173
+ * @param callback
174
+ */
175
+ coalesceRefresh: function coalesceRefresh(callback, sync) {
176
+ var self = this;
177
+ if (self.refreshCallbacks.push(callback) === 1) {
178
+ self.load(function onLoad(err) {
179
+ AWS.util.arrayEach(self.refreshCallbacks, function(callback) {
180
+ if (sync) {
181
+ callback(err);
182
+ } else {
183
+ // callback could throw, so defer to ensure all callbacks are notified
184
+ AWS.util.defer(function () {
185
+ callback(err);
186
+ });
187
+ }
188
+ });
189
+ self.refreshCallbacks.length = 0;
190
+ });
191
+ }
192
+ },
193
+
194
+ /**
195
+ * @api private
196
+ * @param callback
197
+ */
198
+ load: function load(callback) {
199
+ callback();
200
+ }
201
+ });
202
+
203
+ /**
204
+ * @api private
205
+ */
206
+ AWS.Token.addPromisesToClass = function addPromisesToClass(PromiseDependency) {
207
+ this.prototype.getPromise = AWS.util.promisifyMethod('get', PromiseDependency);
208
+ this.prototype.refreshPromise = AWS.util.promisifyMethod('refresh', PromiseDependency);
209
+ };
210
+
211
+ /**
212
+ * @api private
213
+ */
214
+ AWS.Token.deletePromisesFromClass = function deletePromisesFromClass() {
215
+ delete this.prototype.getPromise;
216
+ delete this.prototype.refreshPromise;
217
+ };
218
+
219
+ AWS.util.addPromises(AWS.Token);
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "aws-sdk",
3
3
  "description": "AWS SDK for JavaScript",
4
- "version": "2.1202.0",
4
+ "version": "2.1204.0",
5
5
  "author": {
6
6
  "name": "Amazon Web Services",
7
7
  "email": "",
@@ -50,7 +50,10 @@ var allowlist = {
50
50
  773,
51
51
  774,
52
52
  775,
53
- 780,
53
+ 780
54
+ ],
55
+ '/token/sso_token_provider.js': [
56
+ 60
54
57
  ]
55
58
  };
56
59
 
package/package.json CHANGED
@@ -44,7 +44,7 @@
44
44
  "@types/node": "^14",
45
45
  "@typescript-eslint/eslint-plugin": "^5",
46
46
  "@typescript-eslint/parser": "^5",
47
- "aws-cdk-lib": "^2.38.1",
47
+ "aws-cdk-lib": "^2.39.0",
48
48
  "constructs": "^10.0.5",
49
49
  "esbuild": "^0.15.5",
50
50
  "eslint": "^8",
@@ -59,18 +59,18 @@
59
59
  "jsii-pacmak": "^1.65.0",
60
60
  "json-schema": "^0.4.0",
61
61
  "npm-check-updates": "^15",
62
- "projen": "^0.61.28",
62
+ "projen": "^0.61.31",
63
63
  "standard-version": "^9",
64
64
  "ts-jest": "^27",
65
- "typescript": "^4.7.4"
65
+ "typescript": "^4.8.2"
66
66
  },
67
67
  "peerDependencies": {
68
68
  "aws-cdk-lib": "^2.27.0",
69
69
  "constructs": "^10.0.5"
70
70
  },
71
71
  "dependencies": {
72
- "aws-cdk-lib": "^2.38.1",
73
- "aws-sdk": "^2.1202.0",
72
+ "aws-cdk-lib": "^2.39.0",
73
+ "aws-sdk": "^2.1204.0",
74
74
  "constructs": "^10.0.5",
75
75
  "esbuild": "^0.15.5"
76
76
  },
@@ -92,7 +92,7 @@
92
92
  ],
93
93
  "main": "lib/index.js",
94
94
  "license": "Apache-2.0",
95
- "version": "2.0.78",
95
+ "version": "2.0.81",
96
96
  "jest": {
97
97
  "testMatch": [
98
98
  "<rootDir>/src/**/__tests__/**/*.ts?(x)",