@cdklabs/cdk-ecs-codedeploy 0.0.416 → 0.0.418
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 +4 -4
- package/.jsii.tabl.json +1 -1
- package/lib/api-canary/index.js +1 -1
- package/lib/ecs-appspec/index.js +1 -1
- package/lib/ecs-deployment/index.js +1 -1
- package/lib/ecs-patterns/application-load-balanced-codedeployed-fargate-service.js +1 -1
- package/node_modules/@aws-sdk/client-codedeploy/dist-types/endpoint/EndpointParameters.d.ts +1 -1
- package/node_modules/@aws-sdk/client-codedeploy/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +4 -1
- package/node_modules/@aws-sdk/client-codedeploy/package.json +20 -20
- package/node_modules/@aws-sdk/client-sso/dist-types/endpoint/EndpointParameters.d.ts +1 -1
- package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +4 -1
- package/node_modules/@aws-sdk/client-sso/package.json +18 -18
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.js +12 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/client/index.js +1 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/client/setTokenFeature.js +7 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/client/index.d.ts +1 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/client/setTokenFeature.d.ts +7 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/index.d.ts +1 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/setTokenFeature.d.ts +6 -0
- package/node_modules/@aws-sdk/core/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-env/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-http/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +9 -9
- package/node_modules/@aws-sdk/credential-provider-node/package.json +8 -8
- package/node_modules/@aws-sdk/credential-provider-process/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +4 -4
- package/node_modules/@aws-sdk/middleware-host-header/package.json +2 -2
- package/node_modules/@aws-sdk/middleware-logger/package.json +2 -2
- package/node_modules/@aws-sdk/middleware-recursion-detection/package.json +2 -2
- package/node_modules/@aws-sdk/middleware-user-agent/package.json +5 -5
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/endpoint/EndpointParameters.d.ts +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/endpoint/EndpointParameters.d.ts +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/endpoint/EndpointParameters.d.ts +4 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/endpoint/EndpointParameters.d.ts +4 -1
- package/node_modules/@aws-sdk/nested-clients/package.json +18 -18
- package/node_modules/@aws-sdk/region-config-resolver/package.json +2 -2
- package/node_modules/@aws-sdk/token-providers/dist-cjs/index.js +6 -3
- package/node_modules/@aws-sdk/token-providers/dist-es/fromEnvSigningName.js +5 -2
- package/node_modules/@aws-sdk/token-providers/package.json +4 -4
- package/node_modules/@aws-sdk/types/dist-types/feature-ids.d.ts +7 -1
- package/node_modules/@aws-sdk/types/dist-types/identity/TokenIdentity.d.ts +10 -0
- package/node_modules/@aws-sdk/types/dist-types/ts3.4/feature-ids.d.ts +5 -1
- package/node_modules/@aws-sdk/types/dist-types/ts3.4/identity/TokenIdentity.d.ts +5 -0
- package/node_modules/@aws-sdk/types/package.json +1 -1
- package/node_modules/@aws-sdk/util-endpoints/package.json +2 -2
- package/node_modules/@aws-sdk/util-user-agent-browser/package.json +2 -2
- package/node_modules/@aws-sdk/util-user-agent-node/package.json +3 -3
- package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +55 -8
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +34 -2
- package/node_modules/@smithy/core/dist-es/submodules/cbor/byte-printer.js +3 -0
- package/node_modules/@smithy/core/dist-es/submodules/cbor/cbor-decode.js +24 -4
- package/node_modules/@smithy/core/dist-es/submodules/cbor/cbor-encode.js +33 -3
- package/node_modules/@smithy/core/dist-es/submodules/serde/value/NumericValue.js +32 -2
- package/node_modules/@smithy/core/dist-types/submodules/cbor/byte-printer.d.ts +6 -0
- package/node_modules/@smithy/core/dist-types/submodules/serde/value/NumericValue.d.ts +3 -1
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/cbor/byte-printer.d.ts +6 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/serde/value/NumericValue.d.ts +3 -1
- package/node_modules/@smithy/core/package.json +1 -1
- package/node_modules/@smithy/middleware-endpoint/package.json +2 -2
- package/node_modules/@smithy/middleware-retry/package.json +2 -2
- package/node_modules/@smithy/smithy-client/package.json +3 -3
- package/node_modules/@smithy/util-defaults-mode-browser/package.json +2 -2
- package/node_modules/@smithy/util-defaults-mode-node/package.json +2 -2
- package/node_modules/@smithy/util-waiter/dist-cjs/index.js +27 -8
- package/node_modules/@smithy/util-waiter/dist-es/createWaiter.js +27 -8
- package/node_modules/@smithy/util-waiter/package.json +1 -1
- package/package.json +6 -6
@@ -36,6 +36,7 @@ __export(cbor_exports, {
|
|
36
36
|
module.exports = __toCommonJS(cbor_exports);
|
37
37
|
|
38
38
|
// src/submodules/cbor/cbor-decode.ts
|
39
|
+
var import_serde = require("@smithy/core/serde");
|
39
40
|
var import_util_utf8 = require("@smithy/util-utf8");
|
40
41
|
|
41
42
|
// src/submodules/cbor/cbor-types.ts
|
@@ -131,10 +132,27 @@ function decode(at, to) {
|
|
131
132
|
_offset = offset;
|
132
133
|
return castBigInt(negativeInt);
|
133
134
|
} else {
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
135
|
+
if (minor === 2 || minor === 3) {
|
136
|
+
const length = decodeCount(at + offset, to);
|
137
|
+
let b = BigInt(0);
|
138
|
+
const start = at + offset + _offset;
|
139
|
+
for (let i = start; i < start + length; ++i) {
|
140
|
+
b = b << BigInt(8) | BigInt(payload[i]);
|
141
|
+
}
|
142
|
+
_offset = offset + length;
|
143
|
+
return minor === 3 ? -b - BigInt(1) : b;
|
144
|
+
} else if (minor === 4) {
|
145
|
+
const decimalFraction = decode(at + offset, to);
|
146
|
+
const [exponent, mantissa] = decimalFraction;
|
147
|
+
const s = mantissa.toString();
|
148
|
+
const numericString = exponent === 0 ? s : s.slice(0, s.length + exponent) + "." + s.slice(exponent);
|
149
|
+
return new import_serde.NumericValue(numericString, "bigDecimal");
|
150
|
+
} else {
|
151
|
+
const value = decode(at + offset, to);
|
152
|
+
const valueOffset = _offset;
|
153
|
+
_offset = offset + valueOffset;
|
154
|
+
return tag({ tag: castBigInt(unsignedInt), value });
|
155
|
+
}
|
138
156
|
}
|
139
157
|
case majorUtf8String:
|
140
158
|
case majorMap:
|
@@ -440,6 +458,7 @@ function castBigInt(bigInt) {
|
|
440
458
|
}
|
441
459
|
|
442
460
|
// src/submodules/cbor/cbor-encode.ts
|
461
|
+
var import_serde2 = require("@smithy/core/serde");
|
443
462
|
var import_util_utf82 = require("@smithy/util-utf8");
|
444
463
|
var USE_BUFFER2 = typeof Buffer !== "undefined";
|
445
464
|
var initialSize = 2048;
|
@@ -557,10 +576,28 @@ function encode(_input) {
|
|
557
576
|
data[cursor++] = major << 5 | extendedFloat32;
|
558
577
|
dataView2.setUint32(cursor, n);
|
559
578
|
cursor += 4;
|
560
|
-
} else {
|
579
|
+
} else if (value < BigInt("18446744073709551616")) {
|
561
580
|
data[cursor++] = major << 5 | extendedFloat64;
|
562
581
|
dataView2.setBigUint64(cursor, value);
|
563
582
|
cursor += 8;
|
583
|
+
} else {
|
584
|
+
const binaryBigInt = value.toString(2);
|
585
|
+
const bigIntBytes = new Uint8Array(Math.ceil(binaryBigInt.length / 8));
|
586
|
+
let b = value;
|
587
|
+
let i = 0;
|
588
|
+
while (bigIntBytes.byteLength - ++i >= 0) {
|
589
|
+
bigIntBytes[bigIntBytes.byteLength - i] = Number(b & BigInt(255));
|
590
|
+
b >>= BigInt(8);
|
591
|
+
}
|
592
|
+
ensureSpace(bigIntBytes.byteLength * 2);
|
593
|
+
data[cursor++] = nonNegative ? 194 : 195;
|
594
|
+
if (USE_BUFFER2) {
|
595
|
+
encodeHeader(majorUnstructuredByteString, Buffer.byteLength(bigIntBytes));
|
596
|
+
} else {
|
597
|
+
encodeHeader(majorUnstructuredByteString, bigIntBytes.byteLength);
|
598
|
+
}
|
599
|
+
data.set(bigIntBytes, cursor);
|
600
|
+
cursor += bigIntBytes.byteLength;
|
564
601
|
}
|
565
602
|
continue;
|
566
603
|
} else if (input === null) {
|
@@ -584,6 +621,16 @@ function encode(_input) {
|
|
584
621
|
cursor += input.byteLength;
|
585
622
|
continue;
|
586
623
|
} else if (typeof input === "object") {
|
624
|
+
if (input instanceof import_serde2.NumericValue) {
|
625
|
+
const decimalIndex = input.string.indexOf(".");
|
626
|
+
const exponent = decimalIndex === -1 ? 0 : decimalIndex - input.string.length + 1;
|
627
|
+
const mantissa = BigInt(input.string.replace(".", ""));
|
628
|
+
data[cursor++] = 196;
|
629
|
+
encodeStack.push(mantissa);
|
630
|
+
encodeStack.push(exponent);
|
631
|
+
encodeHeader(majorList, 2);
|
632
|
+
continue;
|
633
|
+
}
|
587
634
|
if (input[tagSymbol]) {
|
588
635
|
if ("tag" in input && "value" in input) {
|
589
636
|
encodeStack.push(input.value);
|
@@ -732,7 +779,7 @@ var import_util_middleware = require("@smithy/util-middleware");
|
|
732
779
|
|
733
780
|
// src/submodules/cbor/CborCodec.ts
|
734
781
|
var import_schema = require("@smithy/core/schema");
|
735
|
-
var
|
782
|
+
var import_serde3 = require("@smithy/core/serde");
|
736
783
|
var CborCodec = class {
|
737
784
|
createSerializer() {
|
738
785
|
const serializer = new CborShapeSerializer();
|
@@ -753,7 +800,7 @@ var CborShapeSerializer = class {
|
|
753
800
|
this.serdeContext = serdeContext;
|
754
801
|
}
|
755
802
|
write(schema, value) {
|
756
|
-
this.value = (0,
|
803
|
+
this.value = (0, import_serde3.copyDocumentWithTransform)(value, schema, (_, schemaRef) => {
|
757
804
|
if (_ instanceof Date) {
|
758
805
|
return dateToTag(_);
|
759
806
|
}
|
@@ -802,7 +849,7 @@ var CborShapeDeserializer = class {
|
|
802
849
|
const schema = ns.getSchema();
|
803
850
|
if (typeof schema === "number") {
|
804
851
|
if (ns.isTimestampSchema()) {
|
805
|
-
return (0,
|
852
|
+
return (0, import_serde3.parseEpochTimestamp)(value);
|
806
853
|
}
|
807
854
|
if (ns.isBlobSchema()) {
|
808
855
|
return value;
|
@@ -671,10 +671,42 @@ var NumericValue = class {
|
|
671
671
|
constructor(string, type) {
|
672
672
|
this.string = string;
|
673
673
|
this.type = type;
|
674
|
+
let dot = 0;
|
675
|
+
for (let i = 0; i < string.length; ++i) {
|
676
|
+
const char = string.charCodeAt(i);
|
677
|
+
if (i === 0 && char === 45) {
|
678
|
+
continue;
|
679
|
+
}
|
680
|
+
if (char === 46) {
|
681
|
+
if (dot) {
|
682
|
+
throw new Error("@smithy/core/serde - NumericValue must contain at most one decimal point.");
|
683
|
+
}
|
684
|
+
dot = 1;
|
685
|
+
continue;
|
686
|
+
}
|
687
|
+
if (char < 48 || char > 57) {
|
688
|
+
throw new Error(
|
689
|
+
`@smithy/core/serde - NumericValue must only contain [0-9], at most one decimal point ".", and an optional negation prefix "-".`
|
690
|
+
);
|
691
|
+
}
|
692
|
+
}
|
693
|
+
}
|
694
|
+
toString() {
|
695
|
+
return this.string;
|
696
|
+
}
|
697
|
+
[Symbol.hasInstance](object) {
|
698
|
+
if (!object || typeof object !== "object") {
|
699
|
+
return false;
|
700
|
+
}
|
701
|
+
const _nv = object;
|
702
|
+
if (typeof _nv.string === "string" && typeof _nv.type === "string" && _nv.constructor?.name === "NumericValue") {
|
703
|
+
return true;
|
704
|
+
}
|
705
|
+
return false;
|
674
706
|
}
|
675
707
|
};
|
676
|
-
function nv(
|
677
|
-
return new NumericValue(
|
708
|
+
function nv(input) {
|
709
|
+
return new NumericValue(String(input), "bigDecimal");
|
678
710
|
}
|
679
711
|
// Annotate the CommonJS export names for ESM import in node:
|
680
712
|
0 && (module.exports = {
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { NumericValue } from "@smithy/core/serde";
|
1
2
|
import { toUtf8 } from "@smithy/util-utf8";
|
2
3
|
import { alloc, extendedFloat16, extendedFloat32, extendedFloat64, extendedOneByte, majorList, majorMap, majorNegativeInt64, majorTag, majorUint64, majorUnstructuredByteString, majorUtf8String, minorIndefinite, specialFalse, specialNull, specialTrue, specialUndefined, tag, } from "./cbor-types";
|
3
4
|
const USE_TEXT_DECODER = typeof TextDecoder !== "undefined";
|
@@ -72,10 +73,29 @@ export function decode(at, to) {
|
|
72
73
|
return castBigInt(negativeInt);
|
73
74
|
}
|
74
75
|
else {
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
76
|
+
if (minor === 2 || minor === 3) {
|
77
|
+
const length = decodeCount(at + offset, to);
|
78
|
+
let b = BigInt(0);
|
79
|
+
const start = at + offset + _offset;
|
80
|
+
for (let i = start; i < start + length; ++i) {
|
81
|
+
b = (b << BigInt(8)) | BigInt(payload[i]);
|
82
|
+
}
|
83
|
+
_offset = offset + length;
|
84
|
+
return minor === 3 ? -b - BigInt(1) : b;
|
85
|
+
}
|
86
|
+
else if (minor === 4) {
|
87
|
+
const decimalFraction = decode(at + offset, to);
|
88
|
+
const [exponent, mantissa] = decimalFraction;
|
89
|
+
const s = mantissa.toString();
|
90
|
+
const numericString = exponent === 0 ? s : s.slice(0, s.length + exponent) + "." + s.slice(exponent);
|
91
|
+
return new NumericValue(numericString, "bigDecimal");
|
92
|
+
}
|
93
|
+
else {
|
94
|
+
const value = decode(at + offset, to);
|
95
|
+
const valueOffset = _offset;
|
96
|
+
_offset = offset + valueOffset;
|
97
|
+
return tag({ tag: castBigInt(unsignedInt), value });
|
98
|
+
}
|
79
99
|
}
|
80
100
|
case majorUtf8String:
|
81
101
|
case majorMap:
|
@@ -1,6 +1,6 @@
|
|
1
|
+
import { NumericValue } from "@smithy/core/serde";
|
1
2
|
import { fromUtf8 } from "@smithy/util-utf8";
|
2
|
-
import { extendedFloat16, extendedFloat32, extendedFloat64, majorList, majorMap, majorNegativeInt64, majorSpecial, majorTag, majorUint64, majorUnstructuredByteString, majorUtf8String, specialFalse, specialNull, specialTrue, tagSymbol, } from "./cbor-types";
|
3
|
-
import { alloc } from "./cbor-types";
|
3
|
+
import { alloc, extendedFloat16, extendedFloat32, extendedFloat64, majorList, majorMap, majorNegativeInt64, majorSpecial, majorTag, majorUint64, majorUnstructuredByteString, majorUtf8String, specialFalse, specialNull, specialTrue, tagSymbol, } from "./cbor-types";
|
4
4
|
const USE_BUFFER = typeof Buffer !== "undefined";
|
5
5
|
const initialSize = 2048;
|
6
6
|
let data = alloc(initialSize);
|
@@ -134,11 +134,31 @@ export function encode(_input) {
|
|
134
134
|
dataView.setUint32(cursor, n);
|
135
135
|
cursor += 4;
|
136
136
|
}
|
137
|
-
else {
|
137
|
+
else if (value < BigInt("18446744073709551616")) {
|
138
138
|
data[cursor++] = (major << 5) | extendedFloat64;
|
139
139
|
dataView.setBigUint64(cursor, value);
|
140
140
|
cursor += 8;
|
141
141
|
}
|
142
|
+
else {
|
143
|
+
const binaryBigInt = value.toString(2);
|
144
|
+
const bigIntBytes = new Uint8Array(Math.ceil(binaryBigInt.length / 8));
|
145
|
+
let b = value;
|
146
|
+
let i = 0;
|
147
|
+
while (bigIntBytes.byteLength - ++i >= 0) {
|
148
|
+
bigIntBytes[bigIntBytes.byteLength - i] = Number(b & BigInt(255));
|
149
|
+
b >>= BigInt(8);
|
150
|
+
}
|
151
|
+
ensureSpace(bigIntBytes.byteLength * 2);
|
152
|
+
data[cursor++] = nonNegative ? 194 : 195;
|
153
|
+
if (USE_BUFFER) {
|
154
|
+
encodeHeader(majorUnstructuredByteString, Buffer.byteLength(bigIntBytes));
|
155
|
+
}
|
156
|
+
else {
|
157
|
+
encodeHeader(majorUnstructuredByteString, bigIntBytes.byteLength);
|
158
|
+
}
|
159
|
+
data.set(bigIntBytes, cursor);
|
160
|
+
cursor += bigIntBytes.byteLength;
|
161
|
+
}
|
142
162
|
continue;
|
143
163
|
}
|
144
164
|
else if (input === null) {
|
@@ -167,6 +187,16 @@ export function encode(_input) {
|
|
167
187
|
continue;
|
168
188
|
}
|
169
189
|
else if (typeof input === "object") {
|
190
|
+
if (input instanceof NumericValue) {
|
191
|
+
const decimalIndex = input.string.indexOf(".");
|
192
|
+
const exponent = decimalIndex === -1 ? 0 : decimalIndex - input.string.length + 1;
|
193
|
+
const mantissa = BigInt(input.string.replace(".", ""));
|
194
|
+
data[cursor++] = 196;
|
195
|
+
encodeStack.push(mantissa);
|
196
|
+
encodeStack.push(exponent);
|
197
|
+
encodeHeader(majorList, 2);
|
198
|
+
continue;
|
199
|
+
}
|
170
200
|
if (input[tagSymbol]) {
|
171
201
|
if ("tag" in input && "value" in input) {
|
172
202
|
encodeStack.push(input.value);
|
@@ -2,8 +2,38 @@ export class NumericValue {
|
|
2
2
|
constructor(string, type) {
|
3
3
|
this.string = string;
|
4
4
|
this.type = type;
|
5
|
+
let dot = 0;
|
6
|
+
for (let i = 0; i < string.length; ++i) {
|
7
|
+
const char = string.charCodeAt(i);
|
8
|
+
if (i === 0 && char === 45) {
|
9
|
+
continue;
|
10
|
+
}
|
11
|
+
if (char === 46) {
|
12
|
+
if (dot) {
|
13
|
+
throw new Error("@smithy/core/serde - NumericValue must contain at most one decimal point.");
|
14
|
+
}
|
15
|
+
dot = 1;
|
16
|
+
continue;
|
17
|
+
}
|
18
|
+
if (char < 48 || char > 57) {
|
19
|
+
throw new Error(`@smithy/core/serde - NumericValue must only contain [0-9], at most one decimal point ".", and an optional negation prefix "-".`);
|
20
|
+
}
|
21
|
+
}
|
22
|
+
}
|
23
|
+
toString() {
|
24
|
+
return this.string;
|
25
|
+
}
|
26
|
+
[Symbol.hasInstance](object) {
|
27
|
+
if (!object || typeof object !== "object") {
|
28
|
+
return false;
|
29
|
+
}
|
30
|
+
const _nv = object;
|
31
|
+
if (typeof _nv.string === "string" && typeof _nv.type === "string" && _nv.constructor?.name === "NumericValue") {
|
32
|
+
return true;
|
33
|
+
}
|
34
|
+
return false;
|
5
35
|
}
|
6
36
|
}
|
7
|
-
export function nv(
|
8
|
-
return new NumericValue(
|
37
|
+
export function nv(input) {
|
38
|
+
return new NumericValue(String(input), "bigDecimal");
|
9
39
|
}
|
@@ -23,9 +23,11 @@ export declare class NumericValue {
|
|
23
23
|
readonly string: string;
|
24
24
|
readonly type: NumericType;
|
25
25
|
constructor(string: string, type: NumericType);
|
26
|
+
toString(): string;
|
27
|
+
[Symbol.hasInstance](object: unknown): boolean;
|
26
28
|
}
|
27
29
|
/**
|
28
30
|
* Serde shortcut.
|
29
31
|
* @internal
|
30
32
|
*/
|
31
|
-
export declare function nv(
|
33
|
+
export declare function nv(input: string | unknown): NumericValue;
|
@@ -23,9 +23,11 @@ export declare class NumericValue {
|
|
23
23
|
readonly string: string;
|
24
24
|
readonly type: NumericType;
|
25
25
|
constructor(string: string, type: NumericType);
|
26
|
+
toString(): string;
|
27
|
+
[Symbol.hasInstance](object: unknown): boolean;
|
26
28
|
}
|
27
29
|
/**
|
28
30
|
* Serde shortcut.
|
29
31
|
* @internal
|
30
32
|
*/
|
31
|
-
export declare function nv(
|
33
|
+
export declare function nv(input: string | unknown): NumericValue;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@smithy/middleware-endpoint",
|
3
|
-
"version": "4.1.
|
3
|
+
"version": "4.1.13",
|
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 middleware-endpoint",
|
@@ -24,7 +24,7 @@
|
|
24
24
|
},
|
25
25
|
"license": "Apache-2.0",
|
26
26
|
"dependencies": {
|
27
|
-
"@smithy/core": "^3.
|
27
|
+
"@smithy/core": "^3.6.0",
|
28
28
|
"@smithy/middleware-serde": "^4.0.8",
|
29
29
|
"@smithy/node-config-provider": "^4.1.3",
|
30
30
|
"@smithy/shared-ini-file-loader": "^4.0.4",
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@smithy/middleware-retry",
|
3
|
-
"version": "4.1.
|
3
|
+
"version": "4.1.14",
|
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 middleware-retry",
|
@@ -36,7 +36,7 @@
|
|
36
36
|
"@smithy/node-config-provider": "^4.1.3",
|
37
37
|
"@smithy/protocol-http": "^5.1.2",
|
38
38
|
"@smithy/service-error-classification": "^4.0.6",
|
39
|
-
"@smithy/smithy-client": "^4.4.
|
39
|
+
"@smithy/smithy-client": "^4.4.5",
|
40
40
|
"@smithy/types": "^4.3.1",
|
41
41
|
"@smithy/util-middleware": "^4.0.4",
|
42
42
|
"@smithy/util-retry": "^4.0.6",
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@smithy/smithy-client",
|
3
|
-
"version": "4.4.
|
3
|
+
"version": "4.4.5",
|
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 smithy-client",
|
@@ -24,8 +24,8 @@
|
|
24
24
|
},
|
25
25
|
"license": "Apache-2.0",
|
26
26
|
"dependencies": {
|
27
|
-
"@smithy/core": "^3.
|
28
|
-
"@smithy/middleware-endpoint": "^4.1.
|
27
|
+
"@smithy/core": "^3.6.0",
|
28
|
+
"@smithy/middleware-endpoint": "^4.1.13",
|
29
29
|
"@smithy/middleware-stack": "^4.0.4",
|
30
30
|
"@smithy/protocol-http": "^5.1.2",
|
31
31
|
"@smithy/types": "^4.3.1",
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@smithy/util-defaults-mode-browser",
|
3
|
-
"version": "4.0.
|
3
|
+
"version": "4.0.21",
|
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-defaults-mode-browser",
|
@@ -24,7 +24,7 @@
|
|
24
24
|
"license": "Apache-2.0",
|
25
25
|
"dependencies": {
|
26
26
|
"@smithy/property-provider": "^4.0.4",
|
27
|
-
"@smithy/smithy-client": "^4.4.
|
27
|
+
"@smithy/smithy-client": "^4.4.5",
|
28
28
|
"@smithy/types": "^4.3.1",
|
29
29
|
"bowser": "^2.11.0",
|
30
30
|
"tslib": "^2.6.2"
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@smithy/util-defaults-mode-node",
|
3
|
-
"version": "4.0.
|
3
|
+
"version": "4.0.21",
|
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-defaults-mode-node",
|
@@ -27,7 +27,7 @@
|
|
27
27
|
"@smithy/credential-provider-imds": "^4.0.6",
|
28
28
|
"@smithy/node-config-provider": "^4.1.3",
|
29
29
|
"@smithy/property-provider": "^4.0.4",
|
30
|
-
"@smithy/smithy-client": "^4.4.
|
30
|
+
"@smithy/smithy-client": "^4.4.5",
|
31
31
|
"@smithy/types": "^4.3.1",
|
32
32
|
"tslib": "^2.6.2"
|
33
33
|
},
|
@@ -149,15 +149,24 @@ var validateWaiterOptions = /* @__PURE__ */ __name((options) => {
|
|
149
149
|
}, "validateWaiterOptions");
|
150
150
|
|
151
151
|
// src/createWaiter.ts
|
152
|
-
var abortTimeout = /* @__PURE__ */ __name(
|
153
|
-
|
154
|
-
|
152
|
+
var abortTimeout = /* @__PURE__ */ __name((abortSignal) => {
|
153
|
+
let onAbort;
|
154
|
+
const promise = new Promise((resolve) => {
|
155
|
+
onAbort = /* @__PURE__ */ __name(() => resolve({ state: "ABORTED" /* ABORTED */ }), "onAbort");
|
155
156
|
if (typeof abortSignal.addEventListener === "function") {
|
156
157
|
abortSignal.addEventListener("abort", onAbort);
|
157
158
|
} else {
|
158
159
|
abortSignal.onabort = onAbort;
|
159
160
|
}
|
160
161
|
});
|
162
|
+
return {
|
163
|
+
clearListener() {
|
164
|
+
if (typeof abortSignal.removeEventListener === "function") {
|
165
|
+
abortSignal.removeEventListener("abort", onAbort);
|
166
|
+
}
|
167
|
+
},
|
168
|
+
aborted: promise
|
169
|
+
};
|
161
170
|
}, "abortTimeout");
|
162
171
|
var createWaiter = /* @__PURE__ */ __name(async (options, input, acceptorChecks) => {
|
163
172
|
const params = {
|
@@ -166,13 +175,23 @@ var createWaiter = /* @__PURE__ */ __name(async (options, input, acceptorChecks)
|
|
166
175
|
};
|
167
176
|
validateWaiterOptions(params);
|
168
177
|
const exitConditions = [runPolling(params, input, acceptorChecks)];
|
169
|
-
|
170
|
-
exitConditions.push(abortTimeout(options.abortController.signal));
|
171
|
-
}
|
178
|
+
const finalize = [];
|
172
179
|
if (options.abortSignal) {
|
173
|
-
|
180
|
+
const { aborted, clearListener } = abortTimeout(options.abortSignal);
|
181
|
+
finalize.push(clearListener);
|
182
|
+
exitConditions.push(aborted);
|
183
|
+
}
|
184
|
+
if (options.abortController?.signal) {
|
185
|
+
const { aborted, clearListener } = abortTimeout(options.abortController.signal);
|
186
|
+
finalize.push(clearListener);
|
187
|
+
exitConditions.push(aborted);
|
174
188
|
}
|
175
|
-
return Promise.race(exitConditions)
|
189
|
+
return Promise.race(exitConditions).then((result) => {
|
190
|
+
for (const fn of finalize) {
|
191
|
+
fn();
|
192
|
+
}
|
193
|
+
return result;
|
194
|
+
});
|
176
195
|
}, "createWaiter");
|
177
196
|
// Annotate the CommonJS export names for ESM import in node:
|
178
197
|
|
@@ -1,9 +1,10 @@
|
|
1
1
|
import { runPolling } from "./poller";
|
2
2
|
import { validateWaiterOptions } from "./utils";
|
3
3
|
import { waiterServiceDefaults, WaiterState } from "./waiter";
|
4
|
-
const abortTimeout =
|
5
|
-
|
6
|
-
|
4
|
+
const abortTimeout = (abortSignal) => {
|
5
|
+
let onAbort;
|
6
|
+
const promise = new Promise((resolve) => {
|
7
|
+
onAbort = () => resolve({ state: WaiterState.ABORTED });
|
7
8
|
if (typeof abortSignal.addEventListener === "function") {
|
8
9
|
abortSignal.addEventListener("abort", onAbort);
|
9
10
|
}
|
@@ -11,6 +12,14 @@ const abortTimeout = async (abortSignal) => {
|
|
11
12
|
abortSignal.onabort = onAbort;
|
12
13
|
}
|
13
14
|
});
|
15
|
+
return {
|
16
|
+
clearListener() {
|
17
|
+
if (typeof abortSignal.removeEventListener === "function") {
|
18
|
+
abortSignal.removeEventListener("abort", onAbort);
|
19
|
+
}
|
20
|
+
},
|
21
|
+
aborted: promise,
|
22
|
+
};
|
14
23
|
};
|
15
24
|
export const createWaiter = async (options, input, acceptorChecks) => {
|
16
25
|
const params = {
|
@@ -19,11 +28,21 @@ export const createWaiter = async (options, input, acceptorChecks) => {
|
|
19
28
|
};
|
20
29
|
validateWaiterOptions(params);
|
21
30
|
const exitConditions = [runPolling(params, input, acceptorChecks)];
|
22
|
-
|
23
|
-
exitConditions.push(abortTimeout(options.abortController.signal));
|
24
|
-
}
|
31
|
+
const finalize = [];
|
25
32
|
if (options.abortSignal) {
|
26
|
-
|
33
|
+
const { aborted, clearListener } = abortTimeout(options.abortSignal);
|
34
|
+
finalize.push(clearListener);
|
35
|
+
exitConditions.push(aborted);
|
36
|
+
}
|
37
|
+
if (options.abortController?.signal) {
|
38
|
+
const { aborted, clearListener } = abortTimeout(options.abortController.signal);
|
39
|
+
finalize.push(clearListener);
|
40
|
+
exitConditions.push(aborted);
|
27
41
|
}
|
28
|
-
return Promise.race(exitConditions)
|
42
|
+
return Promise.race(exitConditions).then((result) => {
|
43
|
+
for (const fn of finalize) {
|
44
|
+
fn();
|
45
|
+
}
|
46
|
+
return result;
|
47
|
+
});
|
29
48
|
};
|
package/package.json
CHANGED
@@ -84,21 +84,21 @@
|
|
84
84
|
"aws-cdk-lib": "2.139.0",
|
85
85
|
"aws-sdk-client-mock": "^4.1.0",
|
86
86
|
"aws-sdk-client-mock-jest": "^4.1.0",
|
87
|
-
"cdk-nag": "^2.36.
|
87
|
+
"cdk-nag": "^2.36.34",
|
88
88
|
"cdklabs-projen-project-types": "^0.3.1",
|
89
89
|
"commit-and-tag-version": "^12",
|
90
90
|
"constructs": "10.0.5",
|
91
|
-
"esbuild": "^0.25.
|
91
|
+
"esbuild": "^0.25.6",
|
92
92
|
"eslint": "^9",
|
93
93
|
"eslint-import-resolver-typescript": "^3.10.1",
|
94
|
-
"eslint-plugin-import": "^2.
|
94
|
+
"eslint-plugin-import": "^2.32.0",
|
95
95
|
"jest": "^27",
|
96
96
|
"jest-junit": "^16",
|
97
97
|
"jsii": "~5.7",
|
98
98
|
"jsii-diff": "^1.112.0",
|
99
99
|
"jsii-docgen": "^10.5.0",
|
100
100
|
"jsii-pacmak": "^1.112.0",
|
101
|
-
"jsii-rosetta": "^5.8.
|
101
|
+
"jsii-rosetta": "^5.8.10",
|
102
102
|
"lambda-tester": "^4.0.1",
|
103
103
|
"projen": "0.92.9",
|
104
104
|
"ts-jest": "^27",
|
@@ -110,7 +110,7 @@
|
|
110
110
|
"constructs": "^10.0.5"
|
111
111
|
},
|
112
112
|
"dependencies": {
|
113
|
-
"@aws-sdk/client-codedeploy": "^3.
|
113
|
+
"@aws-sdk/client-codedeploy": "^3.840.0",
|
114
114
|
"jmespath": "^0.16.0"
|
115
115
|
},
|
116
116
|
"bundledDependencies": [
|
@@ -128,7 +128,7 @@
|
|
128
128
|
"publishConfig": {
|
129
129
|
"access": "public"
|
130
130
|
},
|
131
|
-
"version": "0.0.
|
131
|
+
"version": "0.0.418",
|
132
132
|
"jest": {
|
133
133
|
"coverageProvider": "v8",
|
134
134
|
"testMatch": [
|