@cdk8s/awscdk-resolver 0.0.211 → 0.0.213
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/.jsii +3 -3
- package/lib/resolve.js +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/package.json +36 -36
- package/node_modules/@aws-sdk/client-sso/package.json +32 -32
- package/node_modules/@aws-sdk/client-sso-oidc/package.json +34 -34
- package/node_modules/@aws-sdk/client-sts/package.json +34 -34
- package/node_modules/@aws-sdk/core/package.json +10 -10
- package/node_modules/@aws-sdk/credential-provider-env/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-http/package.json +10 -10
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +13 -13
- package/node_modules/@aws-sdk/credential-provider-node/package.json +12 -12
- package/node_modules/@aws-sdk/credential-provider-process/package.json +6 -6
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +8 -8
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +6 -6
- package/node_modules/@aws-sdk/middleware-host-header/package.json +4 -4
- package/node_modules/@aws-sdk/middleware-logger/package.json +3 -3
- package/node_modules/@aws-sdk/middleware-recursion-detection/package.json +4 -4
- package/node_modules/@aws-sdk/middleware-user-agent/package.json +7 -7
- package/node_modules/@aws-sdk/region-config-resolver/package.json +5 -5
- package/node_modules/@aws-sdk/token-providers/package.json +6 -6
- package/node_modules/@aws-sdk/types/package.json +2 -2
- package/node_modules/@aws-sdk/util-endpoints/package.json +4 -4
- package/node_modules/@aws-sdk/util-user-agent-browser/package.json +3 -3
- package/node_modules/@aws-sdk/util-user-agent-node/package.json +5 -5
- package/node_modules/@smithy/abort-controller/package.json +2 -2
- package/node_modules/@smithy/config-resolver/package.json +4 -4
- package/node_modules/@smithy/core/package.json +6 -6
- package/node_modules/@smithy/credential-provider-imds/package.json +5 -5
- package/node_modules/@smithy/fetch-http-handler/package.json +5 -5
- package/node_modules/@smithy/hash-node/package.json +2 -2
- package/node_modules/@smithy/invalid-dependency/package.json +2 -2
- package/node_modules/@smithy/middleware-content-length/package.json +3 -3
- package/node_modules/@smithy/middleware-endpoint/package.json +8 -8
- package/node_modules/@smithy/middleware-retry/package.json +8 -8
- package/node_modules/@smithy/middleware-serde/package.json +2 -2
- package/node_modules/@smithy/middleware-stack/package.json +2 -2
- package/node_modules/@smithy/node-config-provider/package.json +4 -4
- package/node_modules/@smithy/node-http-handler/dist-cjs/index.js +11 -8
- package/node_modules/@smithy/node-http-handler/dist-es/timing.js +2 -2
- package/node_modules/@smithy/node-http-handler/dist-es/write-request-body.js +9 -6
- package/node_modules/@smithy/node-http-handler/dist-types/timing.d.ts +2 -2
- package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/timing.d.ts +2 -2
- package/node_modules/@smithy/node-http-handler/package.json +5 -5
- package/node_modules/@smithy/property-provider/package.json +2 -2
- package/node_modules/@smithy/protocol-http/package.json +2 -2
- package/node_modules/@smithy/querystring-builder/package.json +2 -2
- package/node_modules/@smithy/querystring-parser/package.json +2 -2
- package/node_modules/@smithy/service-error-classification/dist-cjs/index.js +2 -2
- package/node_modules/@smithy/service-error-classification/dist-es/index.js +3 -2
- package/node_modules/@smithy/service-error-classification/dist-types/index.d.ts +1 -1
- package/node_modules/@smithy/service-error-classification/dist-types/ts3.4/index.d.ts +1 -1
- package/node_modules/@smithy/service-error-classification/package.json +2 -2
- package/node_modules/@smithy/shared-ini-file-loader/package.json +2 -2
- package/node_modules/@smithy/signature-v4/package.json +4 -4
- package/node_modules/@smithy/smithy-client/dist-cjs/index.js +22 -34
- package/node_modules/@smithy/smithy-client/dist-es/lazy-json.js +22 -31
- package/node_modules/@smithy/smithy-client/dist-types/lazy-json.d.ts +34 -15
- package/node_modules/@smithy/smithy-client/dist-types/ts3.4/lazy-json.d.ts +34 -15
- package/node_modules/@smithy/smithy-client/package.json +7 -7
- package/node_modules/@smithy/types/dist-types/shapes.d.ts +1 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/shapes.d.ts +1 -0
- package/node_modules/@smithy/types/package.json +1 -1
- package/node_modules/@smithy/url-parser/package.json +3 -3
- package/node_modules/@smithy/util-defaults-mode-browser/package.json +4 -4
- package/node_modules/@smithy/util-defaults-mode-node/package.json +7 -7
- package/node_modules/@smithy/util-endpoints/package.json +3 -3
- package/node_modules/@smithy/util-middleware/package.json +2 -2
- package/node_modules/@smithy/util-retry/package.json +3 -3
- package/node_modules/@smithy/util-stream/package.json +4 -4
- package/node_modules/@smithy/util-waiter/dist-cjs/index.js +31 -4
- package/node_modules/@smithy/util-waiter/dist-es/poller.js +30 -4
- package/node_modules/@smithy/util-waiter/dist-types/ts3.4/waiter.d.ts +5 -0
- package/node_modules/@smithy/util-waiter/dist-types/waiter.d.ts +5 -0
- package/node_modules/@smithy/util-waiter/package.json +3 -3
- package/package.json +7 -7
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@smithy/util-stream",
|
3
|
-
"version": "3.3.
|
3
|
+
"version": "3.3.2",
|
4
4
|
"scripts": {
|
5
5
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
|
6
6
|
"build:cjs": "node ../../scripts/inline util-stream",
|
@@ -28,9 +28,9 @@
|
|
28
28
|
},
|
29
29
|
"license": "Apache-2.0",
|
30
30
|
"dependencies": {
|
31
|
-
"@smithy/fetch-http-handler": "^4.1.
|
32
|
-
"@smithy/node-http-handler": "^3.3.
|
33
|
-
"@smithy/types": "^3.7.
|
31
|
+
"@smithy/fetch-http-handler": "^4.1.2",
|
32
|
+
"@smithy/node-http-handler": "^3.3.2",
|
33
|
+
"@smithy/types": "^3.7.2",
|
34
34
|
"@smithy/util-base64": "^3.0.0",
|
35
35
|
"@smithy/util-buffer-from": "^3.0.0",
|
36
36
|
"@smithy/util-hex-encoding": "^3.0.0",
|
@@ -80,29 +80,56 @@ var exponentialBackoffWithJitter = /* @__PURE__ */ __name((minDelay, maxDelay, a
|
|
80
80
|
var randomInRange = /* @__PURE__ */ __name((min, max) => min + Math.random() * (max - min), "randomInRange");
|
81
81
|
var runPolling = /* @__PURE__ */ __name(async ({ minDelay, maxDelay, maxWaitTime, abortController, client, abortSignal }, input, acceptorChecks) => {
|
82
82
|
var _a;
|
83
|
+
const observedResponses = {};
|
83
84
|
const { state, reason } = await acceptorChecks(client, input);
|
85
|
+
if (reason) {
|
86
|
+
const message = createMessageFromResponse(reason);
|
87
|
+
observedResponses[message] |= 0;
|
88
|
+
observedResponses[message] += 1;
|
89
|
+
}
|
84
90
|
if (state !== "RETRY" /* RETRY */) {
|
85
|
-
return { state, reason };
|
91
|
+
return { state, reason, observedResponses };
|
86
92
|
}
|
87
93
|
let currentAttempt = 1;
|
88
94
|
const waitUntil = Date.now() + maxWaitTime * 1e3;
|
89
95
|
const attemptCeiling = Math.log(maxDelay / minDelay) / Math.log(2) + 1;
|
90
96
|
while (true) {
|
91
97
|
if (((_a = abortController == null ? void 0 : abortController.signal) == null ? void 0 : _a.aborted) || (abortSignal == null ? void 0 : abortSignal.aborted)) {
|
92
|
-
|
98
|
+
const message = "AbortController signal aborted.";
|
99
|
+
observedResponses[message] |= 0;
|
100
|
+
observedResponses[message] += 1;
|
101
|
+
return { state: "ABORTED" /* ABORTED */, observedResponses };
|
93
102
|
}
|
94
103
|
const delay = exponentialBackoffWithJitter(minDelay, maxDelay, attemptCeiling, currentAttempt);
|
95
104
|
if (Date.now() + delay * 1e3 > waitUntil) {
|
96
|
-
return { state: "TIMEOUT" /* TIMEOUT
|
105
|
+
return { state: "TIMEOUT" /* TIMEOUT */, observedResponses };
|
97
106
|
}
|
98
107
|
await sleep(delay);
|
99
108
|
const { state: state2, reason: reason2 } = await acceptorChecks(client, input);
|
109
|
+
if (reason2) {
|
110
|
+
const message = createMessageFromResponse(reason2);
|
111
|
+
observedResponses[message] |= 0;
|
112
|
+
observedResponses[message] += 1;
|
113
|
+
}
|
100
114
|
if (state2 !== "RETRY" /* RETRY */) {
|
101
|
-
return { state: state2, reason: reason2 };
|
115
|
+
return { state: state2, reason: reason2, observedResponses };
|
102
116
|
}
|
103
117
|
currentAttempt += 1;
|
104
118
|
}
|
105
119
|
}, "runPolling");
|
120
|
+
var createMessageFromResponse = /* @__PURE__ */ __name((reason) => {
|
121
|
+
var _a;
|
122
|
+
if (reason == null ? void 0 : reason.$responseBodyText) {
|
123
|
+
return `Deserialization error for body: ${reason.$responseBodyText}`;
|
124
|
+
}
|
125
|
+
if ((_a = reason == null ? void 0 : reason.$metadata) == null ? void 0 : _a.httpStatusCode) {
|
126
|
+
if (reason.$response || reason.message) {
|
127
|
+
return `${reason.$response.statusCode ?? reason.$metadata.httpStatusCode ?? "Unknown"}: ${reason.message}`;
|
128
|
+
}
|
129
|
+
return `${reason.$metadata.httpStatusCode}: OK`;
|
130
|
+
}
|
131
|
+
return String((reason == null ? void 0 : reason.message) ?? JSON.stringify(reason) ?? "Unknown");
|
132
|
+
}, "createMessageFromResponse");
|
106
133
|
|
107
134
|
// src/utils/validate.ts
|
108
135
|
var validateWaiterOptions = /* @__PURE__ */ __name((options) => {
|
@@ -8,26 +8,52 @@ const exponentialBackoffWithJitter = (minDelay, maxDelay, attemptCeiling, attemp
|
|
8
8
|
};
|
9
9
|
const randomInRange = (min, max) => min + Math.random() * (max - min);
|
10
10
|
export const runPolling = async ({ minDelay, maxDelay, maxWaitTime, abortController, client, abortSignal }, input, acceptorChecks) => {
|
11
|
+
const observedResponses = {};
|
11
12
|
const { state, reason } = await acceptorChecks(client, input);
|
13
|
+
if (reason) {
|
14
|
+
const message = createMessageFromResponse(reason);
|
15
|
+
observedResponses[message] |= 0;
|
16
|
+
observedResponses[message] += 1;
|
17
|
+
}
|
12
18
|
if (state !== WaiterState.RETRY) {
|
13
|
-
return { state, reason };
|
19
|
+
return { state, reason, observedResponses };
|
14
20
|
}
|
15
21
|
let currentAttempt = 1;
|
16
22
|
const waitUntil = Date.now() + maxWaitTime * 1000;
|
17
23
|
const attemptCeiling = Math.log(maxDelay / minDelay) / Math.log(2) + 1;
|
18
24
|
while (true) {
|
19
25
|
if (abortController?.signal?.aborted || abortSignal?.aborted) {
|
20
|
-
|
26
|
+
const message = "AbortController signal aborted.";
|
27
|
+
observedResponses[message] |= 0;
|
28
|
+
observedResponses[message] += 1;
|
29
|
+
return { state: WaiterState.ABORTED, observedResponses };
|
21
30
|
}
|
22
31
|
const delay = exponentialBackoffWithJitter(minDelay, maxDelay, attemptCeiling, currentAttempt);
|
23
32
|
if (Date.now() + delay * 1000 > waitUntil) {
|
24
|
-
return { state: WaiterState.TIMEOUT };
|
33
|
+
return { state: WaiterState.TIMEOUT, observedResponses };
|
25
34
|
}
|
26
35
|
await sleep(delay);
|
27
36
|
const { state, reason } = await acceptorChecks(client, input);
|
37
|
+
if (reason) {
|
38
|
+
const message = createMessageFromResponse(reason);
|
39
|
+
observedResponses[message] |= 0;
|
40
|
+
observedResponses[message] += 1;
|
41
|
+
}
|
28
42
|
if (state !== WaiterState.RETRY) {
|
29
|
-
return { state, reason };
|
43
|
+
return { state, reason, observedResponses };
|
30
44
|
}
|
31
45
|
currentAttempt += 1;
|
32
46
|
}
|
33
47
|
};
|
48
|
+
const createMessageFromResponse = (reason) => {
|
49
|
+
if (reason?.$responseBodyText) {
|
50
|
+
return `Deserialization error for body: ${reason.$responseBodyText}`;
|
51
|
+
}
|
52
|
+
if (reason?.$metadata?.httpStatusCode) {
|
53
|
+
if (reason.$response || reason.message) {
|
54
|
+
return `${reason.$response.statusCode ?? reason.$metadata.httpStatusCode ?? "Unknown"}: ${reason.message}`;
|
55
|
+
}
|
56
|
+
return `${reason.$metadata.httpStatusCode}: OK`;
|
57
|
+
}
|
58
|
+
return String(reason?.message ?? JSON.stringify(reason) ?? "Unknown");
|
59
|
+
};
|
@@ -34,6 +34,11 @@ export type WaiterResult = {
|
|
34
34
|
* (optional) Indicates a reason for why a waiter has reached its state.
|
35
35
|
*/
|
36
36
|
reason?: any;
|
37
|
+
/**
|
38
|
+
* Responses observed by the waiter during its polling, where the value
|
39
|
+
* is the count.
|
40
|
+
*/
|
41
|
+
observedResponses?: Record<string, number>;
|
37
42
|
};
|
38
43
|
/**
|
39
44
|
* @internal
|
@@ -34,6 +34,11 @@ export type WaiterResult = {
|
|
34
34
|
* (optional) Indicates a reason for why a waiter has reached its state.
|
35
35
|
*/
|
36
36
|
reason?: any;
|
37
|
+
/**
|
38
|
+
* Responses observed by the waiter during its polling, where the value
|
39
|
+
* is the count.
|
40
|
+
*/
|
41
|
+
observedResponses?: Record<string, number>;
|
37
42
|
};
|
38
43
|
/**
|
39
44
|
* @internal
|
@@ -1,10 +1,10 @@
|
|
1
1
|
{
|
2
2
|
"name": "@smithy/util-waiter",
|
3
|
-
"version": "3.
|
3
|
+
"version": "3.2.0",
|
4
4
|
"description": "Shared utilities for client waiters for the AWS SDK",
|
5
5
|
"dependencies": {
|
6
|
-
"@smithy/abort-controller": "^3.1.
|
7
|
-
"@smithy/types": "^3.7.
|
6
|
+
"@smithy/abort-controller": "^3.1.9",
|
7
|
+
"@smithy/types": "^3.7.2",
|
8
8
|
"tslib": "^2.6.2"
|
9
9
|
},
|
10
10
|
"scripts": {
|
package/package.json
CHANGED
@@ -42,21 +42,21 @@
|
|
42
42
|
"organization": false
|
43
43
|
},
|
44
44
|
"devDependencies": {
|
45
|
-
"@cdk8s/projen-common": "0.0.
|
45
|
+
"@cdk8s/projen-common": "0.0.560",
|
46
46
|
"@stylistic/eslint-plugin": "^2",
|
47
47
|
"@types/fs-extra": "^11.0.4",
|
48
48
|
"@types/jest": "^27",
|
49
49
|
"@types/node": "16.18.78",
|
50
50
|
"@typescript-eslint/eslint-plugin": "^8",
|
51
51
|
"@typescript-eslint/parser": "^8",
|
52
|
-
"aws-cdk": "^2.
|
52
|
+
"aws-cdk": "^2.172.0",
|
53
53
|
"aws-cdk-lib": "2.109.0",
|
54
54
|
"cdk8s": "2.68.91",
|
55
|
-
"cdk8s-cli": "^2.198.
|
55
|
+
"cdk8s-cli": "^2.198.279",
|
56
56
|
"commit-and-tag-version": "^12",
|
57
57
|
"constructs": "10.3.0",
|
58
58
|
"eslint": "^9",
|
59
|
-
"eslint-import-resolver-typescript": "^3.
|
59
|
+
"eslint-import-resolver-typescript": "^3.7.0",
|
60
60
|
"eslint-plugin-import": "^2.31.0",
|
61
61
|
"fs-extra": "^11.2.0",
|
62
62
|
"jest": "^27",
|
@@ -66,7 +66,7 @@
|
|
66
66
|
"jsii-docgen": "^10.5.0",
|
67
67
|
"jsii-pacmak": "^1.105.0",
|
68
68
|
"jsii-rosetta": "^5",
|
69
|
-
"projen": "^0.90.
|
69
|
+
"projen": "^0.90.6",
|
70
70
|
"ts-jest": "^27",
|
71
71
|
"ts-node": "^10.9.2",
|
72
72
|
"typescript": "^5.7.2"
|
@@ -77,7 +77,7 @@
|
|
77
77
|
"constructs": "^10.3.0"
|
78
78
|
},
|
79
79
|
"dependencies": {
|
80
|
-
"@aws-sdk/client-cloudformation": "^3.
|
80
|
+
"@aws-sdk/client-cloudformation": "^3.709.0"
|
81
81
|
},
|
82
82
|
"bundledDependencies": [
|
83
83
|
"@aws-sdk/client-cloudformation"
|
@@ -93,7 +93,7 @@
|
|
93
93
|
"publishConfig": {
|
94
94
|
"access": "public"
|
95
95
|
},
|
96
|
-
"version": "0.0.
|
96
|
+
"version": "0.0.213",
|
97
97
|
"jest": {
|
98
98
|
"coverageProvider": "v8",
|
99
99
|
"testMatch": [
|