@aws-sdk/client-ecs 3.185.0 → 3.188.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/CHANGELOG.md +16 -0
- package/dist-es/ECS.js +210 -217
- package/dist-es/ECSClient.js +22 -28
- package/dist-es/commands/CreateCapacityProviderCommand.js +21 -28
- package/dist-es/commands/CreateClusterCommand.js +21 -28
- package/dist-es/commands/CreateServiceCommand.js +21 -28
- package/dist-es/commands/CreateTaskSetCommand.js +21 -28
- package/dist-es/commands/DeleteAccountSettingCommand.js +21 -28
- package/dist-es/commands/DeleteAttributesCommand.js +21 -28
- package/dist-es/commands/DeleteCapacityProviderCommand.js +21 -28
- package/dist-es/commands/DeleteClusterCommand.js +21 -28
- package/dist-es/commands/DeleteServiceCommand.js +21 -28
- package/dist-es/commands/DeleteTaskSetCommand.js +21 -28
- package/dist-es/commands/DeregisterContainerInstanceCommand.js +21 -28
- package/dist-es/commands/DeregisterTaskDefinitionCommand.js +21 -28
- package/dist-es/commands/DescribeCapacityProvidersCommand.js +21 -28
- package/dist-es/commands/DescribeClustersCommand.js +21 -28
- package/dist-es/commands/DescribeContainerInstancesCommand.js +21 -28
- package/dist-es/commands/DescribeServicesCommand.js +21 -28
- package/dist-es/commands/DescribeTaskDefinitionCommand.js +21 -28
- package/dist-es/commands/DescribeTaskSetsCommand.js +21 -28
- package/dist-es/commands/DescribeTasksCommand.js +21 -28
- package/dist-es/commands/DiscoverPollEndpointCommand.js +21 -28
- package/dist-es/commands/ExecuteCommandCommand.js +21 -28
- package/dist-es/commands/ListAccountSettingsCommand.js +21 -28
- package/dist-es/commands/ListAttributesCommand.js +21 -28
- package/dist-es/commands/ListClustersCommand.js +21 -28
- package/dist-es/commands/ListContainerInstancesCommand.js +21 -28
- package/dist-es/commands/ListServicesCommand.js +21 -28
- package/dist-es/commands/ListTagsForResourceCommand.js +21 -28
- package/dist-es/commands/ListTaskDefinitionFamiliesCommand.js +21 -28
- package/dist-es/commands/ListTaskDefinitionsCommand.js +21 -28
- package/dist-es/commands/ListTasksCommand.js +21 -28
- package/dist-es/commands/PutAccountSettingCommand.js +21 -28
- package/dist-es/commands/PutAccountSettingDefaultCommand.js +21 -28
- package/dist-es/commands/PutAttributesCommand.js +21 -28
- package/dist-es/commands/PutClusterCapacityProvidersCommand.js +21 -28
- package/dist-es/commands/RegisterContainerInstanceCommand.js +21 -28
- package/dist-es/commands/RegisterTaskDefinitionCommand.js +21 -28
- package/dist-es/commands/RunTaskCommand.js +21 -28
- package/dist-es/commands/StartTaskCommand.js +21 -28
- package/dist-es/commands/StopTaskCommand.js +21 -28
- package/dist-es/commands/SubmitAttachmentStateChangesCommand.js +21 -28
- package/dist-es/commands/SubmitContainerStateChangeCommand.js +21 -28
- package/dist-es/commands/SubmitTaskStateChangeCommand.js +21 -28
- package/dist-es/commands/TagResourceCommand.js +21 -28
- package/dist-es/commands/UntagResourceCommand.js +21 -28
- package/dist-es/commands/UpdateCapacityProviderCommand.js +21 -28
- package/dist-es/commands/UpdateClusterCommand.js +21 -28
- package/dist-es/commands/UpdateClusterSettingsCommand.js +21 -28
- package/dist-es/commands/UpdateContainerAgentCommand.js +21 -28
- package/dist-es/commands/UpdateContainerInstancesStateCommand.js +21 -28
- package/dist-es/commands/UpdateServiceCommand.js +21 -28
- package/dist-es/commands/UpdateServicePrimaryTaskSetCommand.js +21 -28
- package/dist-es/commands/UpdateTaskSetCommand.js +21 -28
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/ECSServiceException.js +5 -10
- package/dist-es/models/models_0.js +818 -449
- package/dist-es/pagination/ListAccountSettingsPaginator.js +25 -68
- package/dist-es/pagination/ListAttributesPaginator.js +25 -68
- package/dist-es/pagination/ListClustersPaginator.js +25 -68
- package/dist-es/pagination/ListContainerInstancesPaginator.js +25 -68
- package/dist-es/pagination/ListServicesPaginator.js +25 -68
- package/dist-es/pagination/ListTaskDefinitionFamiliesPaginator.js +25 -68
- package/dist-es/pagination/ListTaskDefinitionsPaginator.js +25 -68
- package/dist-es/pagination/ListTasksPaginator.js +25 -68
- package/dist-es/protocols/Aws_json1_1.js +4630 -5279
- package/dist-es/runtimeConfig.browser.js +26 -12
- package/dist-es/runtimeConfig.js +30 -12
- package/dist-es/runtimeConfig.native.js +8 -5
- package/dist-es/runtimeConfig.shared.js +8 -11
- package/dist-es/waiters/waitForServicesInactive.js +47 -88
- package/dist-es/waiters/waitForServicesStable.js +72 -123
- package/dist-es/waiters/waitForTasksRunning.js +63 -114
- package/dist-es/waiters/waitForTasksStopped.js +36 -67
- package/dist-types/models/models_0.d.ts +13 -8
- package/package.json +34 -34
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { __assign, __awaiter, __generator } from "tslib";
|
|
2
1
|
import packageInfo from "../package.json";
|
|
3
2
|
import { Sha256 } from "@aws-crypto/sha256-browser";
|
|
4
3
|
import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver";
|
|
@@ -12,15 +11,30 @@ import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-browser";
|
|
|
12
11
|
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
|
|
13
12
|
import { loadConfigsForDefaultMode } from "@aws-sdk/smithy-client";
|
|
14
13
|
import { resolveDefaultsModeConfig } from "@aws-sdk/util-defaults-mode-browser";
|
|
15
|
-
export
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
14
|
+
export const getRuntimeConfig = (config) => {
|
|
15
|
+
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
16
|
+
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
17
|
+
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
18
|
+
return {
|
|
19
|
+
...clientSharedValues,
|
|
20
|
+
...config,
|
|
21
|
+
runtime: "browser",
|
|
22
|
+
defaultsMode,
|
|
23
|
+
base64Decoder: config?.base64Decoder ?? fromBase64,
|
|
24
|
+
base64Encoder: config?.base64Encoder ?? toBase64,
|
|
25
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
26
|
+
credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
|
|
27
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
|
|
28
|
+
defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
29
|
+
maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
|
|
30
|
+
region: config?.region ?? invalidProvider("Region is missing"),
|
|
31
|
+
requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider),
|
|
32
|
+
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
|
|
33
|
+
sha256: config?.sha256 ?? Sha256,
|
|
34
|
+
streamCollector: config?.streamCollector ?? streamCollector,
|
|
35
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),
|
|
36
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)),
|
|
37
|
+
utf8Decoder: config?.utf8Decoder ?? fromUtf8,
|
|
38
|
+
utf8Encoder: config?.utf8Encoder ?? toUtf8,
|
|
39
|
+
};
|
|
26
40
|
};
|
package/dist-es/runtimeConfig.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { __assign, __awaiter, __generator } from "tslib";
|
|
2
1
|
import packageInfo from "../package.json";
|
|
3
2
|
import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts";
|
|
4
3
|
import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, } from "@aws-sdk/config-resolver";
|
|
@@ -15,16 +14,35 @@ import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shar
|
|
|
15
14
|
import { loadConfigsForDefaultMode } from "@aws-sdk/smithy-client";
|
|
16
15
|
import { resolveDefaultsModeConfig } from "@aws-sdk/util-defaults-mode-node";
|
|
17
16
|
import { emitWarningIfUnsupportedVersion } from "@aws-sdk/smithy-client";
|
|
18
|
-
export
|
|
19
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
17
|
+
export const getRuntimeConfig = (config) => {
|
|
20
18
|
emitWarningIfUnsupportedVersion(process.version);
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
return
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
19
|
+
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
20
|
+
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
21
|
+
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
22
|
+
return {
|
|
23
|
+
...clientSharedValues,
|
|
24
|
+
...config,
|
|
25
|
+
runtime: "node",
|
|
26
|
+
defaultsMode,
|
|
27
|
+
base64Decoder: config?.base64Decoder ?? fromBase64,
|
|
28
|
+
base64Encoder: config?.base64Encoder ?? toBase64,
|
|
29
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
30
|
+
credentialDefaultProvider: config?.credentialDefaultProvider ?? decorateDefaultCredentialProvider(credentialDefaultProvider),
|
|
31
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
|
|
32
|
+
defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
33
|
+
maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
|
|
34
|
+
region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS),
|
|
35
|
+
requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider),
|
|
36
|
+
retryMode: config?.retryMode ??
|
|
37
|
+
loadNodeConfig({
|
|
38
|
+
...NODE_RETRY_MODE_CONFIG_OPTIONS,
|
|
39
|
+
default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
|
|
40
|
+
}),
|
|
41
|
+
sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
|
|
42
|
+
streamCollector: config?.streamCollector ?? streamCollector,
|
|
43
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
|
|
44
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),
|
|
45
|
+
utf8Decoder: config?.utf8Decoder ?? fromUtf8,
|
|
46
|
+
utf8Encoder: config?.utf8Encoder ?? toUtf8,
|
|
47
|
+
};
|
|
30
48
|
};
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import { __assign } from "tslib";
|
|
2
1
|
import { Sha256 } from "@aws-crypto/sha256-js";
|
|
3
2
|
import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.browser";
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
export const getRuntimeConfig = (config) => {
|
|
4
|
+
const browserDefaults = getBrowserRuntimeConfig(config);
|
|
5
|
+
return {
|
|
6
|
+
...browserDefaults,
|
|
7
|
+
...config,
|
|
8
|
+
runtime: "react-native",
|
|
9
|
+
sha256: config?.sha256 ?? Sha256,
|
|
10
|
+
};
|
|
8
11
|
};
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import { parseUrl } from "@aws-sdk/url-parser";
|
|
2
2
|
import { defaultRegionInfoProvider } from "./endpoints";
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
urlParser: (_e = config === null || config === void 0 ? void 0 : config.urlParser) !== null && _e !== void 0 ? _e : parseUrl,
|
|
12
|
-
});
|
|
13
|
-
};
|
|
3
|
+
export const getRuntimeConfig = (config) => ({
|
|
4
|
+
apiVersion: "2014-11-13",
|
|
5
|
+
disableHostPrefix: config?.disableHostPrefix ?? false,
|
|
6
|
+
logger: config?.logger ?? {},
|
|
7
|
+
regionInfoProvider: config?.regionInfoProvider ?? defaultRegionInfoProvider,
|
|
8
|
+
serviceId: config?.serviceId ?? "ECS",
|
|
9
|
+
urlParser: config?.urlParser ?? parseUrl,
|
|
10
|
+
});
|
|
@@ -1,93 +1,52 @@
|
|
|
1
|
-
import { __assign, __awaiter, __generator, __read, __spreadArray, __values } from "tslib";
|
|
2
1
|
import { checkExceptions, createWaiter, WaiterState } from "@aws-sdk/util-waiter";
|
|
3
2
|
import { DescribeServicesCommand } from "../commands/DescribeServicesCommand";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
});
|
|
21
|
-
return projection_3;
|
|
22
|
-
};
|
|
23
|
-
try {
|
|
24
|
-
for (_a = __values(returnComparator()), _b = _a.next(); !_b.done; _b = _a.next()) {
|
|
25
|
-
anyStringEq_4 = _b.value;
|
|
26
|
-
if (anyStringEq_4 == "MISSING") {
|
|
27
|
-
return [2, { state: WaiterState.FAILURE, reason: reason }];
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
32
|
-
finally {
|
|
33
|
-
try {
|
|
34
|
-
if (_b && !_b.done && (_e = _a.return)) _e.call(_a);
|
|
35
|
-
}
|
|
36
|
-
finally { if (e_1) throw e_1.error; }
|
|
37
|
-
}
|
|
3
|
+
const checkState = async (client, input) => {
|
|
4
|
+
let reason;
|
|
5
|
+
try {
|
|
6
|
+
const result = await client.send(new DescribeServicesCommand(input));
|
|
7
|
+
reason = result;
|
|
8
|
+
try {
|
|
9
|
+
const returnComparator = () => {
|
|
10
|
+
const flat_1 = [].concat(...result.failures);
|
|
11
|
+
const projection_3 = flat_1.map((element_2) => {
|
|
12
|
+
return element_2.reason;
|
|
13
|
+
});
|
|
14
|
+
return projection_3;
|
|
15
|
+
};
|
|
16
|
+
for (const anyStringEq_4 of returnComparator()) {
|
|
17
|
+
if (anyStringEq_4 == "MISSING") {
|
|
18
|
+
return { state: WaiterState.FAILURE, reason };
|
|
38
19
|
}
|
|
39
|
-
|
|
40
|
-
try {
|
|
41
|
-
returnComparator = function () {
|
|
42
|
-
var flat_1 = [].concat.apply([], __spreadArray([], __read(result_1.services), false));
|
|
43
|
-
var projection_3 = flat_1.map(function (element_2) {
|
|
44
|
-
return element_2.status;
|
|
45
|
-
});
|
|
46
|
-
return projection_3;
|
|
47
|
-
};
|
|
48
|
-
try {
|
|
49
|
-
for (_c = __values(returnComparator()), _d = _c.next(); !_d.done; _d = _c.next()) {
|
|
50
|
-
anyStringEq_4 = _d.value;
|
|
51
|
-
if (anyStringEq_4 == "INACTIVE") {
|
|
52
|
-
return [2, { state: WaiterState.SUCCESS, reason: reason }];
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
57
|
-
finally {
|
|
58
|
-
try {
|
|
59
|
-
if (_d && !_d.done && (_f = _c.return)) _f.call(_c);
|
|
60
|
-
}
|
|
61
|
-
finally { if (e_2) throw e_2.error; }
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
catch (e) { }
|
|
65
|
-
return [3, 3];
|
|
66
|
-
case 2:
|
|
67
|
-
exception_1 = _g.sent();
|
|
68
|
-
reason = exception_1;
|
|
69
|
-
return [3, 3];
|
|
70
|
-
case 3: return [2, { state: WaiterState.RETRY, reason: reason }];
|
|
20
|
+
}
|
|
71
21
|
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
serviceDefaults = { minDelay: 15, maxDelay: 120 };
|
|
87
|
-
return [4, createWaiter(__assign(__assign({}, serviceDefaults), params), input, checkState)];
|
|
88
|
-
case 1:
|
|
89
|
-
result = _a.sent();
|
|
90
|
-
return [2, checkExceptions(result)];
|
|
22
|
+
catch (e) { }
|
|
23
|
+
try {
|
|
24
|
+
const returnComparator = () => {
|
|
25
|
+
const flat_1 = [].concat(...result.services);
|
|
26
|
+
const projection_3 = flat_1.map((element_2) => {
|
|
27
|
+
return element_2.status;
|
|
28
|
+
});
|
|
29
|
+
return projection_3;
|
|
30
|
+
};
|
|
31
|
+
for (const anyStringEq_4 of returnComparator()) {
|
|
32
|
+
if (anyStringEq_4 == "INACTIVE") {
|
|
33
|
+
return { state: WaiterState.SUCCESS, reason };
|
|
34
|
+
}
|
|
35
|
+
}
|
|
91
36
|
}
|
|
92
|
-
|
|
93
|
-
}
|
|
37
|
+
catch (e) { }
|
|
38
|
+
}
|
|
39
|
+
catch (exception) {
|
|
40
|
+
reason = exception;
|
|
41
|
+
}
|
|
42
|
+
return { state: WaiterState.RETRY, reason };
|
|
43
|
+
};
|
|
44
|
+
export const waitForServicesInactive = async (params, input) => {
|
|
45
|
+
const serviceDefaults = { minDelay: 15, maxDelay: 120 };
|
|
46
|
+
return createWaiter({ ...serviceDefaults, ...params }, input, checkState);
|
|
47
|
+
};
|
|
48
|
+
export const waitUntilServicesInactive = async (params, input) => {
|
|
49
|
+
const serviceDefaults = { minDelay: 15, maxDelay: 120 };
|
|
50
|
+
const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState);
|
|
51
|
+
return checkExceptions(result);
|
|
52
|
+
};
|
|
@@ -1,130 +1,79 @@
|
|
|
1
|
-
import { __assign, __awaiter, __generator, __read, __spreadArray, __values } from "tslib";
|
|
2
1
|
import { checkExceptions, createWaiter, WaiterState } from "@aws-sdk/util-waiter";
|
|
3
2
|
import { DescribeServicesCommand } from "../commands/DescribeServicesCommand";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
});
|
|
21
|
-
return projection_3;
|
|
22
|
-
};
|
|
23
|
-
try {
|
|
24
|
-
for (_a = __values(returnComparator()), _b = _a.next(); !_b.done; _b = _a.next()) {
|
|
25
|
-
anyStringEq_4 = _b.value;
|
|
26
|
-
if (anyStringEq_4 == "MISSING") {
|
|
27
|
-
return [2, { state: WaiterState.FAILURE, reason: reason }];
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
32
|
-
finally {
|
|
33
|
-
try {
|
|
34
|
-
if (_b && !_b.done && (_g = _a.return)) _g.call(_a);
|
|
35
|
-
}
|
|
36
|
-
finally { if (e_1) throw e_1.error; }
|
|
37
|
-
}
|
|
3
|
+
const checkState = async (client, input) => {
|
|
4
|
+
let reason;
|
|
5
|
+
try {
|
|
6
|
+
const result = await client.send(new DescribeServicesCommand(input));
|
|
7
|
+
reason = result;
|
|
8
|
+
try {
|
|
9
|
+
const returnComparator = () => {
|
|
10
|
+
const flat_1 = [].concat(...result.failures);
|
|
11
|
+
const projection_3 = flat_1.map((element_2) => {
|
|
12
|
+
return element_2.reason;
|
|
13
|
+
});
|
|
14
|
+
return projection_3;
|
|
15
|
+
};
|
|
16
|
+
for (const anyStringEq_4 of returnComparator()) {
|
|
17
|
+
if (anyStringEq_4 == "MISSING") {
|
|
18
|
+
return { state: WaiterState.FAILURE, reason };
|
|
38
19
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
57
|
-
finally {
|
|
58
|
-
try {
|
|
59
|
-
if (_d && !_d.done && (_h = _c.return)) _h.call(_c);
|
|
60
|
-
}
|
|
61
|
-
finally { if (e_2) throw e_2.error; }
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
catch (e) { }
|
|
65
|
-
try {
|
|
66
|
-
returnComparator = function () {
|
|
67
|
-
var flat_1 = [].concat.apply([], __spreadArray([], __read(result_1.services), false));
|
|
68
|
-
var projection_3 = flat_1.map(function (element_2) {
|
|
69
|
-
return element_2.status;
|
|
70
|
-
});
|
|
71
|
-
return projection_3;
|
|
72
|
-
};
|
|
73
|
-
try {
|
|
74
|
-
for (_e = __values(returnComparator()), _f = _e.next(); !_f.done; _f = _e.next()) {
|
|
75
|
-
anyStringEq_4 = _f.value;
|
|
76
|
-
if (anyStringEq_4 == "INACTIVE") {
|
|
77
|
-
return [2, { state: WaiterState.FAILURE, reason: reason }];
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
82
|
-
finally {
|
|
83
|
-
try {
|
|
84
|
-
if (_f && !_f.done && (_j = _e.return)) _j.call(_e);
|
|
85
|
-
}
|
|
86
|
-
finally { if (e_3) throw e_3.error; }
|
|
87
|
-
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
catch (e) { }
|
|
23
|
+
try {
|
|
24
|
+
const returnComparator = () => {
|
|
25
|
+
const flat_1 = [].concat(...result.services);
|
|
26
|
+
const projection_3 = flat_1.map((element_2) => {
|
|
27
|
+
return element_2.status;
|
|
28
|
+
});
|
|
29
|
+
return projection_3;
|
|
30
|
+
};
|
|
31
|
+
for (const anyStringEq_4 of returnComparator()) {
|
|
32
|
+
if (anyStringEq_4 == "DRAINING") {
|
|
33
|
+
return { state: WaiterState.FAILURE, reason };
|
|
88
34
|
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
catch (e) { }
|
|
38
|
+
try {
|
|
39
|
+
const returnComparator = () => {
|
|
40
|
+
const flat_1 = [].concat(...result.services);
|
|
41
|
+
const projection_3 = flat_1.map((element_2) => {
|
|
42
|
+
return element_2.status;
|
|
43
|
+
});
|
|
44
|
+
return projection_3;
|
|
45
|
+
};
|
|
46
|
+
for (const anyStringEq_4 of returnComparator()) {
|
|
47
|
+
if (anyStringEq_4 == "INACTIVE") {
|
|
48
|
+
return { state: WaiterState.FAILURE, reason };
|
|
100
49
|
}
|
|
101
|
-
|
|
102
|
-
return [3, 3];
|
|
103
|
-
case 2:
|
|
104
|
-
exception_1 = _k.sent();
|
|
105
|
-
reason = exception_1;
|
|
106
|
-
return [3, 3];
|
|
107
|
-
case 3: return [2, { state: WaiterState.RETRY, reason: reason }];
|
|
50
|
+
}
|
|
108
51
|
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
return __generator(this, function (_a) {
|
|
121
|
-
switch (_a.label) {
|
|
122
|
-
case 0:
|
|
123
|
-
serviceDefaults = { minDelay: 15, maxDelay: 120 };
|
|
124
|
-
return [4, createWaiter(__assign(__assign({}, serviceDefaults), params), input, checkState)];
|
|
125
|
-
case 1:
|
|
126
|
-
result = _a.sent();
|
|
127
|
-
return [2, checkExceptions(result)];
|
|
52
|
+
catch (e) { }
|
|
53
|
+
try {
|
|
54
|
+
const returnComparator = () => {
|
|
55
|
+
const filterRes_2 = result.services.filter((element_1) => {
|
|
56
|
+
return !(element_1.deployments.length == 1.0 && element_1.runningCount == element_1.desiredCount);
|
|
57
|
+
});
|
|
58
|
+
return filterRes_2.length == 0.0;
|
|
59
|
+
};
|
|
60
|
+
if (returnComparator() == true) {
|
|
61
|
+
return { state: WaiterState.SUCCESS, reason };
|
|
62
|
+
}
|
|
128
63
|
}
|
|
129
|
-
|
|
130
|
-
}
|
|
64
|
+
catch (e) { }
|
|
65
|
+
}
|
|
66
|
+
catch (exception) {
|
|
67
|
+
reason = exception;
|
|
68
|
+
}
|
|
69
|
+
return { state: WaiterState.RETRY, reason };
|
|
70
|
+
};
|
|
71
|
+
export const waitForServicesStable = async (params, input) => {
|
|
72
|
+
const serviceDefaults = { minDelay: 15, maxDelay: 120 };
|
|
73
|
+
return createWaiter({ ...serviceDefaults, ...params }, input, checkState);
|
|
74
|
+
};
|
|
75
|
+
export const waitUntilServicesStable = async (params, input) => {
|
|
76
|
+
const serviceDefaults = { minDelay: 15, maxDelay: 120 };
|
|
77
|
+
const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState);
|
|
78
|
+
return checkExceptions(result);
|
|
79
|
+
};
|