@cdk8s/awscdk-resolver 0.0.661 → 0.0.663
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/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/package.json +1 -1
- package/node_modules/@smithy/core/dist-cjs/index.js +3 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +126 -39
- package/node_modules/@smithy/core/dist-cjs/submodules/client/index.js +14 -3
- package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.browser.js +3 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.js +3 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.browser.js +10 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js +10 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +16 -2
- package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.browser.js +4 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.js +4 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.browser.js +4 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +4 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.native.js +4 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/transport/index.js +7 -0
- package/node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/DefaultIdentityProviderConfig.js +3 -0
- package/node_modules/@smithy/core/dist-es/submodules/cbor/cbor-decode.js +29 -13
- package/node_modules/@smithy/core/dist-es/submodules/cbor/cbor-encode.js +12 -4
- package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v1/CborShapeDeserializer.js +9 -0
- package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v1/CborShapeSerializer.js +7 -0
- package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v2/CborShapeDeserializer2.js +44 -15
- package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v2/CborShapeSerializer2.js +22 -4
- package/node_modules/@smithy/core/dist-es/submodules/cbor/parseCborBody.js +5 -0
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/extensions/checksum.js +3 -0
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/get-value-from-text-node.js +4 -1
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/object-mapping.js +6 -1
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/serde-json.js +4 -1
- package/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/resolveEndpoint.js +3 -0
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js +7 -0
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/HeaderMarshaller.js +4 -1
- package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingProtocol.js +9 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +5 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/RpcProtocol.js +3 -0
- package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/parseRetryAfterHeader.js +4 -1
- package/node_modules/@smithy/core/dist-es/submodules/serde/index.browser.js +1 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/index.js +1 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/index.native.js +1 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/parse-utils.js +3 -0
- package/node_modules/@smithy/core/dist-es/submodules/transport/hasOwn.js +3 -0
- package/node_modules/@smithy/core/dist-es/submodules/transport/index.js +1 -0
- package/node_modules/@smithy/core/dist-es/submodules/transport/toEndpointV1.js +3 -0
- package/node_modules/@smithy/core/dist-types/submodules/serde/index.browser.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/submodules/serde/index.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/submodules/serde/index.native.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/submodules/transport/hasOwn.d.ts +4 -0
- package/node_modules/@smithy/core/dist-types/submodules/transport/index.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/serde/index.browser.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/serde/index.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/serde/index.native.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/transport/hasOwn.d.ts +4 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/transport/index.d.ts +1 -0
- package/node_modules/@smithy/core/package.json +1 -1
- package/node_modules/@smithy/node-http-handler/dist-cjs/index.js +7 -2
- package/node_modules/@smithy/node-http-handler/dist-es/get-transformed-headers.js +3 -0
- package/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +3 -0
- package/node_modules/@smithy/node-http-handler/package.json +2 -2
- package/node_modules/@smithy/signature-v4/dist-cjs/index.js +19 -7
- package/node_modules/@smithy/signature-v4/dist-es/HeaderFormatter.js +4 -1
- package/node_modules/@smithy/signature-v4/dist-es/getCanonicalQuery.js +4 -1
- package/node_modules/@smithy/signature-v4/dist-es/getPayloadHash.js +4 -1
- package/node_modules/@smithy/signature-v4/dist-es/headerUtil.js +10 -3
- package/node_modules/@smithy/signature-v4/dist-es/moveHeadersToQuery.js +4 -1
- package/node_modules/@smithy/signature-v4/dist-es/prepareRequest.js +4 -1
- package/node_modules/@smithy/signature-v4/package.json +2 -2
- package/package.json +5 -5
package/.jsii
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"url": "https://aws.amazon.com"
|
|
8
8
|
},
|
|
9
9
|
"bundled": {
|
|
10
|
-
"@aws-sdk/client-cloudformation": "^3.
|
|
10
|
+
"@aws-sdk/client-cloudformation": "^3.1115.0"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"aws-cdk-lib": "^2.195.0",
|
|
@@ -4083,6 +4083,6 @@
|
|
|
4083
4083
|
"symbolId": "src/resolve:AwsCdkResolver"
|
|
4084
4084
|
}
|
|
4085
4085
|
},
|
|
4086
|
-
"version": "0.0.
|
|
4087
|
-
"fingerprint": "
|
|
4086
|
+
"version": "0.0.663",
|
|
4087
|
+
"fingerprint": "uyuSbkSQHbUajGh7QWOepysxX7rKjtfrN28UtXxRmNU="
|
|
4088
4088
|
}
|
package/lib/resolve.js
CHANGED
|
@@ -39,7 +39,7 @@ const child_process_1 = require("child_process");
|
|
|
39
39
|
const path = __importStar(require("path"));
|
|
40
40
|
const aws_cdk_lib_1 = require("aws-cdk-lib");
|
|
41
41
|
class AwsCdkResolver {
|
|
42
|
-
static [JSII_RTTI_SYMBOL_1] = { fqn: "@cdk8s/awscdk-resolver.AwsCdkResolver", version: "0.0.
|
|
42
|
+
static [JSII_RTTI_SYMBOL_1] = { fqn: "@cdk8s/awscdk-resolver.AwsCdkResolver", version: "0.0.663" };
|
|
43
43
|
resolve(context) {
|
|
44
44
|
if (!aws_cdk_lib_1.Token.isUnresolved(context.value)) {
|
|
45
45
|
return;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-cloudformation",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1115.0",
|
|
4
4
|
"description": "AWS SDK for JavaScript Cloudformation Client for Node.js, Browser and React Native",
|
|
5
5
|
"homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-cloudformation",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const { getSmithyContext } = require("@smithy/core/transport");
|
|
1
|
+
const { getSmithyContext, hasOwn } = require("@smithy/core/transport");
|
|
2
2
|
exports.getSmithyContext = getSmithyContext;
|
|
3
3
|
const { HttpRequest } = require("@smithy/core/protocols");
|
|
4
4
|
const { requestBuilder } = require("@smithy/core/protocols");
|
|
@@ -203,6 +203,8 @@ class DefaultIdentityProviderConfig {
|
|
|
203
203
|
authSchemes = new Map();
|
|
204
204
|
constructor(config) {
|
|
205
205
|
for (const key in config) {
|
|
206
|
+
if (!hasOwn(config, key))
|
|
207
|
+
continue;
|
|
206
208
|
const value = config[key];
|
|
207
209
|
if (value !== undefined) {
|
|
208
210
|
this.authSchemes.set(key, value);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const { nv, NumericValue, calculateBodyLength, generateIdempotencyToken, fromBase64, _parseEpochTimestamp } = require("@smithy/core/serde");
|
|
2
|
+
const { hasOwn, getSmithyContext } = require("@smithy/core/transport");
|
|
2
3
|
const { HttpRequest, collectBody, SerdeContext, RpcProtocol } = require("@smithy/core/protocols");
|
|
3
4
|
const { NormalizedSchema, deref, TypeRegistry } = require("@smithy/core/schema");
|
|
4
|
-
const { getSmithyContext } = require("@smithy/core/transport");
|
|
5
5
|
|
|
6
6
|
const majorUint64 = 0;
|
|
7
7
|
const majorNegativeInt64 = 1;
|
|
@@ -299,23 +299,39 @@ function decodeTagValue(at, to, minor, unsignedInt, offset) {
|
|
|
299
299
|
}
|
|
300
300
|
else if (minor === 4) {
|
|
301
301
|
const decimalFraction = decode(at + offset, to);
|
|
302
|
-
const [
|
|
302
|
+
const [rawExponent, mantissa] = decimalFraction;
|
|
303
303
|
const normalizer = mantissa < 0 ? -1 : 1;
|
|
304
|
-
const
|
|
305
|
-
|
|
304
|
+
const absMantissa = BigInt(normalizer) * BigInt(mantissa);
|
|
305
|
+
const mantissaDigits = String(absMantissa);
|
|
306
306
|
const sign = mantissa < 0 ? "-" : "";
|
|
307
|
-
numericString
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
numericString =
|
|
317
|
-
|
|
318
|
-
|
|
307
|
+
let numericString;
|
|
308
|
+
const isSmallExponent = typeof rawExponent === "number" && Math.abs(rawExponent) <= 2 ** 28;
|
|
309
|
+
if (isSmallExponent) {
|
|
310
|
+
const exponent = rawExponent;
|
|
311
|
+
const mantissaStr = "0".repeat(Math.abs(exponent) + 1) + mantissaDigits;
|
|
312
|
+
numericString =
|
|
313
|
+
exponent === 0
|
|
314
|
+
? mantissaStr
|
|
315
|
+
: mantissaStr.slice(0, mantissaStr.length + exponent) + "." + mantissaStr.slice(exponent);
|
|
316
|
+
numericString = numericString.replace(/^0+/g, "");
|
|
317
|
+
if (numericString === "") {
|
|
318
|
+
numericString = "0";
|
|
319
|
+
}
|
|
320
|
+
if (numericString[0] === ".") {
|
|
321
|
+
numericString = "0" + numericString;
|
|
322
|
+
}
|
|
323
|
+
numericString = sign + numericString;
|
|
324
|
+
}
|
|
325
|
+
else {
|
|
326
|
+
const bigExponent = BigInt(rawExponent);
|
|
327
|
+
if (mantissaDigits.length === 1) {
|
|
328
|
+
numericString = sign + mantissaDigits + "e" + String(bigExponent);
|
|
329
|
+
}
|
|
330
|
+
else {
|
|
331
|
+
const adjustedExp = bigExponent + BigInt(mantissaDigits.length - 1);
|
|
332
|
+
numericString = sign + mantissaDigits[0] + "." + mantissaDigits.slice(1) + "e" + String(adjustedExp);
|
|
333
|
+
}
|
|
334
|
+
}
|
|
319
335
|
_offset = offset + _offset;
|
|
320
336
|
return nv(numericString);
|
|
321
337
|
}
|
|
@@ -664,13 +680,21 @@ function encode(_input) {
|
|
|
664
680
|
}
|
|
665
681
|
else if (typeof input === "object") {
|
|
666
682
|
if (input instanceof NumericValue) {
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
const
|
|
683
|
+
let str = input.string;
|
|
684
|
+
let expOffset = BigInt(0);
|
|
685
|
+
const eIndex = str.search(/[eE]/);
|
|
686
|
+
if (eIndex !== -1) {
|
|
687
|
+
expOffset = BigInt(str.slice(eIndex + 1));
|
|
688
|
+
str = str.slice(0, eIndex);
|
|
689
|
+
}
|
|
690
|
+
const decimalIndex = str.indexOf(".");
|
|
691
|
+
const fractionDigits = decimalIndex === -1 ? 0 : str.length - decimalIndex - 1;
|
|
692
|
+
const exponent = expOffset - BigInt(fractionDigits);
|
|
693
|
+
const mantissa = BigInt(str.replace(".", ""));
|
|
670
694
|
data[cursor$1++] = 0b110_00100;
|
|
671
695
|
encodeInteger(majorList, 2);
|
|
672
696
|
encodeStack.push(mantissa);
|
|
673
|
-
encodeStack.push(exponent);
|
|
697
|
+
encodeStack.push(exponent >= -0x20000000000000n && exponent <= 0x1fffffffffffffn ? Number(exponent) : exponent);
|
|
674
698
|
continue;
|
|
675
699
|
}
|
|
676
700
|
if (input[tagSymbol]) {
|
|
@@ -888,6 +912,8 @@ const loadSmithyRpcV2CborErrorCode = (output, data) => {
|
|
|
888
912
|
}
|
|
889
913
|
let codeKey;
|
|
890
914
|
for (const key in data) {
|
|
915
|
+
if (!hasOwn(data, key))
|
|
916
|
+
continue;
|
|
891
917
|
if (key.toLowerCase() === "code") {
|
|
892
918
|
codeKey = key;
|
|
893
919
|
break;
|
|
@@ -920,6 +946,8 @@ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, bod
|
|
|
920
946
|
}
|
|
921
947
|
if (endpoint.headers) {
|
|
922
948
|
for (const name in endpoint.headers) {
|
|
949
|
+
if (!hasOwn(endpoint.headers, name))
|
|
950
|
+
continue;
|
|
923
951
|
contents.headers[name] = endpoint.headers[name];
|
|
924
952
|
}
|
|
925
953
|
}
|
|
@@ -1180,6 +1208,8 @@ function writeStruct(ns, value, serdeContext) {
|
|
|
1180
1208
|
}
|
|
1181
1209
|
if (typeof value.__type === "string") {
|
|
1182
1210
|
for (const k in value) {
|
|
1211
|
+
if (!hasOwn(value, k))
|
|
1212
|
+
continue;
|
|
1183
1213
|
if (!memberNames.includes(k)) {
|
|
1184
1214
|
writeString(k);
|
|
1185
1215
|
writeUntypedValue(value[k]);
|
|
@@ -1245,6 +1275,8 @@ function writeMap(ns, value, isDocument, serdeContext) {
|
|
|
1245
1275
|
const valueSchema = ns.getValueSchema();
|
|
1246
1276
|
const keys = [];
|
|
1247
1277
|
for (const k in value) {
|
|
1278
|
+
if (!hasOwn(value, k))
|
|
1279
|
+
continue;
|
|
1248
1280
|
const v = value[k];
|
|
1249
1281
|
if (isDocument ? v !== undefined : v != null || sparse) {
|
|
1250
1282
|
keys.push(k);
|
|
@@ -1506,14 +1538,27 @@ function writeTag(tagValue, innerValue) {
|
|
|
1506
1538
|
writeUntypedValue(innerValue);
|
|
1507
1539
|
}
|
|
1508
1540
|
function writeNumericValue(nv) {
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
const
|
|
1541
|
+
let str = nv.string;
|
|
1542
|
+
let expOffset = BigInt(0);
|
|
1543
|
+
const eIndex = str.search(/[eE]/);
|
|
1544
|
+
if (eIndex !== -1) {
|
|
1545
|
+
expOffset = BigInt(str.slice(eIndex + 1));
|
|
1546
|
+
str = str.slice(0, eIndex);
|
|
1547
|
+
}
|
|
1548
|
+
const decimalIndex = str.indexOf(".");
|
|
1549
|
+
const fractionDigits = decimalIndex === -1 ? 0 : str.length - decimalIndex - 1;
|
|
1550
|
+
const exponent = expOffset - BigInt(fractionDigits);
|
|
1551
|
+
const mantissa = BigInt(str.replace(".", ""));
|
|
1512
1552
|
ensure(9);
|
|
1513
1553
|
buf[cursor++] = 0b110_00100;
|
|
1514
1554
|
encodeHeader(majorList, 2);
|
|
1515
1555
|
ensure(9);
|
|
1516
|
-
|
|
1556
|
+
if (exponent >= -0x20000000000000n && exponent <= 0x1fffffffffffffn) {
|
|
1557
|
+
writeInteger(Number(exponent));
|
|
1558
|
+
}
|
|
1559
|
+
else {
|
|
1560
|
+
writeBigInt(exponent);
|
|
1561
|
+
}
|
|
1517
1562
|
writeBigInt(mantissa);
|
|
1518
1563
|
}
|
|
1519
1564
|
function writeTimestamp(date) {
|
|
@@ -1645,6 +1690,8 @@ function readStruct(ns, count, startPos) {
|
|
|
1645
1690
|
if (isUnion) {
|
|
1646
1691
|
let resultEmpty = true;
|
|
1647
1692
|
for (const _ in result) {
|
|
1693
|
+
if (!hasOwn(result, _))
|
|
1694
|
+
continue;
|
|
1648
1695
|
resultEmpty = false;
|
|
1649
1696
|
break;
|
|
1650
1697
|
}
|
|
@@ -1684,23 +1731,39 @@ function readTag(ns) {
|
|
|
1684
1731
|
if (tagNumber === 4) {
|
|
1685
1732
|
const docSchema = NormalizedSchema.of(15);
|
|
1686
1733
|
const pair = readValue(docSchema);
|
|
1687
|
-
const [
|
|
1734
|
+
const [rawExponent, mantissa] = pair;
|
|
1688
1735
|
const normalizer = mantissa < 0 ? -1 : 1;
|
|
1689
|
-
const
|
|
1690
|
-
|
|
1736
|
+
const absMantissa = BigInt(normalizer) * BigInt(mantissa);
|
|
1737
|
+
const mantissaDigits = String(absMantissa);
|
|
1691
1738
|
const sign = mantissa < 0 ? "-" : "";
|
|
1692
|
-
numericString
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
numericString =
|
|
1702
|
-
|
|
1703
|
-
|
|
1739
|
+
let numericString;
|
|
1740
|
+
const isSmallExponent = typeof rawExponent === "number" && Math.abs(rawExponent) <= 2 ** 28;
|
|
1741
|
+
if (isSmallExponent) {
|
|
1742
|
+
const exponent = rawExponent;
|
|
1743
|
+
const mantissaStr = "0".repeat(Math.abs(exponent) + 1) + mantissaDigits;
|
|
1744
|
+
numericString =
|
|
1745
|
+
exponent === 0
|
|
1746
|
+
? mantissaStr
|
|
1747
|
+
: mantissaStr.slice(0, mantissaStr.length + exponent) + "." + mantissaStr.slice(exponent);
|
|
1748
|
+
numericString = numericString.replace(/^0+/g, "");
|
|
1749
|
+
if (numericString === "") {
|
|
1750
|
+
numericString = "0";
|
|
1751
|
+
}
|
|
1752
|
+
if (numericString[0] === ".") {
|
|
1753
|
+
numericString = "0" + numericString;
|
|
1754
|
+
}
|
|
1755
|
+
numericString = sign + numericString;
|
|
1756
|
+
}
|
|
1757
|
+
else {
|
|
1758
|
+
const bigExponent = BigInt(rawExponent);
|
|
1759
|
+
if (mantissaDigits.length === 1) {
|
|
1760
|
+
numericString = sign + mantissaDigits + "e" + String(bigExponent);
|
|
1761
|
+
}
|
|
1762
|
+
else {
|
|
1763
|
+
const adjustedExp = bigExponent + BigInt(mantissaDigits.length - 1);
|
|
1764
|
+
numericString = sign + mantissaDigits[0] + "." + mantissaDigits.slice(1) + "e" + String(adjustedExp);
|
|
1765
|
+
}
|
|
1766
|
+
}
|
|
1704
1767
|
return nv(numericString);
|
|
1705
1768
|
}
|
|
1706
1769
|
const docSchema = NormalizedSchema.of(15);
|
|
@@ -1797,6 +1860,8 @@ function readMapIndefinite(ns) {
|
|
|
1797
1860
|
if (isUnion) {
|
|
1798
1861
|
let resultEmpty = true;
|
|
1799
1862
|
for (const _ in result) {
|
|
1863
|
+
if (!hasOwn(result, _))
|
|
1864
|
+
continue;
|
|
1800
1865
|
resultEmpty = false;
|
|
1801
1866
|
break;
|
|
1802
1867
|
}
|
|
@@ -2101,6 +2166,8 @@ function transformObject(ns, value) {
|
|
|
2101
2166
|
if (ns.isMapSchema()) {
|
|
2102
2167
|
const targetSchema = ns.getValueSchema();
|
|
2103
2168
|
for (const key in value) {
|
|
2169
|
+
if (!hasOwn(value, key))
|
|
2170
|
+
continue;
|
|
2104
2171
|
newObject[key] = transformObject(targetSchema, value[key]);
|
|
2105
2172
|
}
|
|
2106
2173
|
}
|
|
@@ -2110,6 +2177,8 @@ function transformObject(ns, value) {
|
|
|
2110
2177
|
if (isUnion) {
|
|
2111
2178
|
keys = new Set();
|
|
2112
2179
|
for (const k in value) {
|
|
2180
|
+
if (!hasOwn(value, k))
|
|
2181
|
+
continue;
|
|
2113
2182
|
if (k !== "__type") {
|
|
2114
2183
|
keys.add(k);
|
|
2115
2184
|
}
|
|
@@ -2126,6 +2195,8 @@ function transformObject(ns, value) {
|
|
|
2126
2195
|
if (isUnion && keys?.size === 1) {
|
|
2127
2196
|
let newObjectEmpty = true;
|
|
2128
2197
|
for (const _ in newObject) {
|
|
2198
|
+
if (!hasOwn(newObject, _))
|
|
2199
|
+
continue;
|
|
2129
2200
|
newObjectEmpty = false;
|
|
2130
2201
|
break;
|
|
2131
2202
|
}
|
|
@@ -2136,6 +2207,8 @@ function transformObject(ns, value) {
|
|
|
2136
2207
|
}
|
|
2137
2208
|
else if (typeof value.__type === "string") {
|
|
2138
2209
|
for (const k in value) {
|
|
2210
|
+
if (!hasOwn(value, k))
|
|
2211
|
+
continue;
|
|
2139
2212
|
if (!(k in newObject)) {
|
|
2140
2213
|
newObject[k] = value[k];
|
|
2141
2214
|
}
|
|
@@ -2298,6 +2371,8 @@ class CborShapeSerializer extends SerdeContext {
|
|
|
2298
2371
|
if (ns.isMapSchema()) {
|
|
2299
2372
|
const sparse = !!ns.getMergedTraits().sparse;
|
|
2300
2373
|
for (const key in sourceObject) {
|
|
2374
|
+
if (!hasOwn(sourceObject, key))
|
|
2375
|
+
continue;
|
|
2301
2376
|
const value = this.serialize(ns.getValueSchema(), sourceObject[key]);
|
|
2302
2377
|
if (value != null || sparse) {
|
|
2303
2378
|
newObject[key] = value;
|
|
@@ -2318,6 +2393,8 @@ class CborShapeSerializer extends SerdeContext {
|
|
|
2318
2393
|
}
|
|
2319
2394
|
else if (typeof sourceObject.__type === "string") {
|
|
2320
2395
|
for (const k in sourceObject) {
|
|
2396
|
+
if (!hasOwn(sourceObject, k))
|
|
2397
|
+
continue;
|
|
2321
2398
|
if (!(k in newObject)) {
|
|
2322
2399
|
newObject[k] = this.serialize(15, sourceObject[k]);
|
|
2323
2400
|
}
|
|
@@ -2334,6 +2411,8 @@ class CborShapeSerializer extends SerdeContext {
|
|
|
2334
2411
|
return newArray;
|
|
2335
2412
|
}
|
|
2336
2413
|
for (const key in sourceObject) {
|
|
2414
|
+
if (!hasOwn(sourceObject, key))
|
|
2415
|
+
continue;
|
|
2337
2416
|
newObject[key] = this.serialize(ns.getValueSchema(), sourceObject[key]);
|
|
2338
2417
|
}
|
|
2339
2418
|
}
|
|
@@ -2408,6 +2487,8 @@ class CborShapeDeserializer extends SerdeContext {
|
|
|
2408
2487
|
if (ns.isMapSchema()) {
|
|
2409
2488
|
const targetSchema = ns.getValueSchema();
|
|
2410
2489
|
for (const key in value) {
|
|
2490
|
+
if (!hasOwn(value, key))
|
|
2491
|
+
continue;
|
|
2411
2492
|
const itemValue = this.readValue(targetSchema, value[key]);
|
|
2412
2493
|
newObject[key] = itemValue;
|
|
2413
2494
|
}
|
|
@@ -2418,6 +2499,8 @@ class CborShapeDeserializer extends SerdeContext {
|
|
|
2418
2499
|
if (isUnion) {
|
|
2419
2500
|
keys = new Set();
|
|
2420
2501
|
for (const k in value) {
|
|
2502
|
+
if (!hasOwn(value, k))
|
|
2503
|
+
continue;
|
|
2421
2504
|
if (k !== "__type") {
|
|
2422
2505
|
keys.add(k);
|
|
2423
2506
|
}
|
|
@@ -2434,6 +2517,8 @@ class CborShapeDeserializer extends SerdeContext {
|
|
|
2434
2517
|
if (isUnion && keys?.size === 1) {
|
|
2435
2518
|
let newObjectEmpty = true;
|
|
2436
2519
|
for (const _ in newObject) {
|
|
2520
|
+
if (!hasOwn(newObject, _))
|
|
2521
|
+
continue;
|
|
2437
2522
|
newObjectEmpty = false;
|
|
2438
2523
|
break;
|
|
2439
2524
|
}
|
|
@@ -2444,6 +2529,8 @@ class CborShapeDeserializer extends SerdeContext {
|
|
|
2444
2529
|
}
|
|
2445
2530
|
else if (typeof value.__type === "string") {
|
|
2446
2531
|
for (const k in value) {
|
|
2532
|
+
if (!hasOwn(value, k))
|
|
2533
|
+
continue;
|
|
2447
2534
|
if (!(k in newObject)) {
|
|
2448
2535
|
newObject[k] = value[k];
|
|
2449
2536
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
const { hasOwn } = require("@smithy/core/transport");
|
|
1
2
|
const { getSmithyContext, normalizeProvider } = require("@smithy/core/transport");
|
|
2
3
|
exports.getSmithyContext = getSmithyContext;
|
|
3
4
|
exports.normalizeProvider = normalizeProvider;
|
|
@@ -867,6 +868,8 @@ const knownAlgorithms = Object.values(AlgorithmId);
|
|
|
867
868
|
const getChecksumConfiguration = (runtimeConfig) => {
|
|
868
869
|
const checksumAlgorithms = [];
|
|
869
870
|
for (const id in AlgorithmId) {
|
|
871
|
+
if (!hasOwn(AlgorithmId, id))
|
|
872
|
+
continue;
|
|
870
873
|
const algorithmId = AlgorithmId[id];
|
|
871
874
|
if (runtimeConfig[algorithmId] === undefined) {
|
|
872
875
|
continue;
|
|
@@ -940,7 +943,9 @@ const getArrayIfSingleItem = (mayBeArray) => Array.isArray(mayBeArray) ? mayBeAr
|
|
|
940
943
|
const getValueFromTextNode = (obj) => {
|
|
941
944
|
const textNodeName = "#text";
|
|
942
945
|
for (const key in obj) {
|
|
943
|
-
if (
|
|
946
|
+
if (!hasOwn(obj, key))
|
|
947
|
+
continue;
|
|
948
|
+
if (obj[key][textNodeName] !== undefined) {
|
|
944
949
|
obj[key] = obj[key][textNodeName];
|
|
945
950
|
}
|
|
946
951
|
else if (typeof obj[key] === "object" && obj[key] !== null) {
|
|
@@ -981,7 +986,9 @@ function map(arg0, arg1, arg2) {
|
|
|
981
986
|
instructions = arg1;
|
|
982
987
|
}
|
|
983
988
|
}
|
|
984
|
-
for (const key
|
|
989
|
+
for (const key in instructions) {
|
|
990
|
+
if (!hasOwn(instructions, key))
|
|
991
|
+
continue;
|
|
985
992
|
if (!Array.isArray(instructions[key])) {
|
|
986
993
|
target[key] = instructions[key];
|
|
987
994
|
continue;
|
|
@@ -1000,6 +1007,8 @@ const convertMap = (target) => {
|
|
|
1000
1007
|
const take = (source, instructions) => {
|
|
1001
1008
|
const out = {};
|
|
1002
1009
|
for (const key in instructions) {
|
|
1010
|
+
if (!hasOwn(instructions, key))
|
|
1011
|
+
continue;
|
|
1003
1012
|
applyInstruction(out, source, instructions, key);
|
|
1004
1013
|
}
|
|
1005
1014
|
return out;
|
|
@@ -1079,7 +1088,9 @@ const _json = (obj) => {
|
|
|
1079
1088
|
}
|
|
1080
1089
|
if (typeof obj === "object") {
|
|
1081
1090
|
const target = {};
|
|
1082
|
-
for (const key
|
|
1091
|
+
for (const key in obj) {
|
|
1092
|
+
if (!hasOwn(obj, key))
|
|
1093
|
+
continue;
|
|
1083
1094
|
if (obj[key] == null) {
|
|
1084
1095
|
continue;
|
|
1085
1096
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const { toEndpointV1, getSmithyContext, normalizeProvider, isValidHostLabel } = require("@smithy/core/transport");
|
|
1
|
+
const { toEndpointV1, getSmithyContext, normalizeProvider, isValidHostLabel, hasOwn } = require("@smithy/core/transport");
|
|
2
2
|
exports.isValidHostLabel = isValidHostLabel;
|
|
3
3
|
exports.middlewareEndpointToEndpointV1 = toEndpointV1;
|
|
4
4
|
exports.toEndpointV1 = toEndpointV1;
|
|
@@ -782,6 +782,8 @@ const resolveEndpoint = (ruleSetObject, options) => {
|
|
|
782
782
|
const { parameters, rules } = ruleSetObject;
|
|
783
783
|
options.logger?.debug?.(`${debugId} Initial EndpointParams: ${toDebugString(endpointParams)}`);
|
|
784
784
|
for (const paramKey in parameters) {
|
|
785
|
+
if (!hasOwn(parameters, paramKey))
|
|
786
|
+
continue;
|
|
785
787
|
const parameter = parameters[paramKey];
|
|
786
788
|
const endpointParam = endpointParams[paramKey];
|
|
787
789
|
if (endpointParam == null && parameter.default != null) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const { CONFIG_PREFIX_SEPARATOR, booleanSelector, SelectorType, loadConfig } = require("@smithy/core/config");
|
|
2
|
-
const { toEndpointV1, getSmithyContext, normalizeProvider, isValidHostLabel } = require("@smithy/core/transport");
|
|
2
|
+
const { toEndpointV1, getSmithyContext, normalizeProvider, isValidHostLabel, hasOwn } = require("@smithy/core/transport");
|
|
3
3
|
exports.isValidHostLabel = isValidHostLabel;
|
|
4
4
|
exports.middlewareEndpointToEndpointV1 = toEndpointV1;
|
|
5
5
|
exports.toEndpointV1 = toEndpointV1;
|
|
@@ -830,6 +830,8 @@ const resolveEndpoint = (ruleSetObject, options) => {
|
|
|
830
830
|
const { parameters, rules } = ruleSetObject;
|
|
831
831
|
options.logger?.debug?.(`${debugId} Initial EndpointParams: ${toDebugString(endpointParams)}`);
|
|
832
832
|
for (const paramKey in parameters) {
|
|
833
|
+
if (!hasOwn(parameters, paramKey))
|
|
834
|
+
continue;
|
|
833
835
|
const parameter = parameters[paramKey];
|
|
834
836
|
const endpointParam = endpointParams[paramKey];
|
|
835
837
|
if (endpointParam == null && parameter.default != null) {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const { Crc32 } = require("@smithy/core/checksum");
|
|
2
|
+
const { hasOwn } = require("@smithy/core/transport");
|
|
2
3
|
const { toHex, fromHex, toUtf8, fromUtf8 } = require("@smithy/core/serde");
|
|
3
4
|
const { TypeRegistry } = require("@smithy/core/schema");
|
|
4
5
|
|
|
@@ -55,7 +56,9 @@ class HeaderMarshaller {
|
|
|
55
56
|
}
|
|
56
57
|
format(headers) {
|
|
57
58
|
const chunks = [];
|
|
58
|
-
for (const headerName
|
|
59
|
+
for (const headerName in headers) {
|
|
60
|
+
if (!hasOwn(headers, headerName))
|
|
61
|
+
continue;
|
|
59
62
|
const bytes = this.fromUtf8(headerName);
|
|
60
63
|
chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName]));
|
|
61
64
|
}
|
|
@@ -638,6 +641,8 @@ class EventStreamSerde {
|
|
|
638
641
|
}
|
|
639
642
|
let unionMember = "";
|
|
640
643
|
for (const key in event) {
|
|
644
|
+
if (!hasOwn(event, key))
|
|
645
|
+
continue;
|
|
641
646
|
if (key !== "__type") {
|
|
642
647
|
unionMember = key;
|
|
643
648
|
break;
|
|
@@ -665,6 +670,8 @@ class EventStreamSerde {
|
|
|
665
670
|
const asyncIterable = marshaller.deserialize(response.body, async (event) => {
|
|
666
671
|
let unionMember = "";
|
|
667
672
|
for (const key in event) {
|
|
673
|
+
if (!hasOwn(event, key))
|
|
674
|
+
continue;
|
|
668
675
|
if (key !== "__type") {
|
|
669
676
|
unionMember = key;
|
|
670
677
|
break;
|
|
@@ -739,6 +746,8 @@ class EventStreamSerde {
|
|
|
739
746
|
throw new Error("@smithy::core/protocols - initial-response event encountered in event stream but no response schema given.");
|
|
740
747
|
}
|
|
741
748
|
for (const key in firstEvent.value) {
|
|
749
|
+
if (!hasOwn(firstEvent.value, key))
|
|
750
|
+
continue;
|
|
742
751
|
initialResponseContainer[key] = firstEvent.value[key];
|
|
743
752
|
}
|
|
744
753
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const { Crc32 } = require("@smithy/core/checksum");
|
|
2
|
+
const { hasOwn } = require("@smithy/core/transport");
|
|
2
3
|
const { toHex, fromHex, toUtf8, fromUtf8 } = require("@smithy/core/serde");
|
|
3
4
|
const { Readable } = require("node:stream");
|
|
4
5
|
const { TypeRegistry } = require("@smithy/core/schema");
|
|
@@ -56,7 +57,9 @@ class HeaderMarshaller {
|
|
|
56
57
|
}
|
|
57
58
|
format(headers) {
|
|
58
59
|
const chunks = [];
|
|
59
|
-
for (const headerName
|
|
60
|
+
for (const headerName in headers) {
|
|
61
|
+
if (!hasOwn(headers, headerName))
|
|
62
|
+
continue;
|
|
60
63
|
const bytes = this.fromUtf8(headerName);
|
|
61
64
|
chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName]));
|
|
62
65
|
}
|
|
@@ -663,6 +666,8 @@ class EventStreamSerde {
|
|
|
663
666
|
}
|
|
664
667
|
let unionMember = "";
|
|
665
668
|
for (const key in event) {
|
|
669
|
+
if (!hasOwn(event, key))
|
|
670
|
+
continue;
|
|
666
671
|
if (key !== "__type") {
|
|
667
672
|
unionMember = key;
|
|
668
673
|
break;
|
|
@@ -690,6 +695,8 @@ class EventStreamSerde {
|
|
|
690
695
|
const asyncIterable = marshaller.deserialize(response.body, async (event) => {
|
|
691
696
|
let unionMember = "";
|
|
692
697
|
for (const key in event) {
|
|
698
|
+
if (!hasOwn(event, key))
|
|
699
|
+
continue;
|
|
693
700
|
if (key !== "__type") {
|
|
694
701
|
unionMember = key;
|
|
695
702
|
break;
|
|
@@ -764,6 +771,8 @@ class EventStreamSerde {
|
|
|
764
771
|
throw new Error("@smithy::core/protocols - initial-response event encountered in event stream but no response schema given.");
|
|
765
772
|
}
|
|
766
773
|
for (const key in firstEvent.value) {
|
|
774
|
+
if (!hasOwn(firstEvent.value, key))
|
|
775
|
+
continue;
|
|
767
776
|
initialResponseContainer[key] = firstEvent.value[key];
|
|
768
777
|
}
|
|
769
778
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
const { Uint8ArrayBlobAdapter, sdkStreamMixin, splitEvery, splitHeader, fromBase64, _parseEpochTimestamp, _parseRfc7231DateTime, _parseRfc3339DateTimeWithOffset, LazyJsonString, NumericValue, toUtf8, fromUtf8, generateIdempotencyToken, toBase64, dateToUtcString, quoteHeader } = require("@smithy/core/serde");
|
|
2
|
-
const {
|
|
3
|
-
const { HttpRequest, HttpResponse, isValidHostname } = require("@smithy/core/transport");
|
|
2
|
+
const { HttpRequest, HttpResponse, hasOwn, isValidHostname } = require("@smithy/core/transport");
|
|
4
3
|
const { parseQueryString, parseUrl } = require("@smithy/core/transport");
|
|
5
4
|
exports.HttpRequest = HttpRequest;
|
|
6
5
|
exports.HttpResponse = HttpResponse;
|
|
7
6
|
exports.isValidHostname = isValidHostname;
|
|
8
7
|
exports.parseQueryString = parseQueryString;
|
|
9
8
|
exports.parseUrl = parseUrl;
|
|
9
|
+
const { TypeRegistry, NormalizedSchema, translateTraits } = require("@smithy/core/schema");
|
|
10
10
|
const { FieldPosition } = require("@smithy/types");
|
|
11
11
|
|
|
12
12
|
const collectBody = async (streamBody = new Uint8Array(), context) => {
|
|
@@ -75,6 +75,8 @@ class HttpProtocol extends SerdeContext {
|
|
|
75
75
|
}
|
|
76
76
|
if (endpoint.headers) {
|
|
77
77
|
for (const name in endpoint.headers) {
|
|
78
|
+
if (!hasOwn(endpoint.headers, name))
|
|
79
|
+
continue;
|
|
78
80
|
request.headers[name] = endpoint.headers[name].join(", ");
|
|
79
81
|
}
|
|
80
82
|
}
|
|
@@ -90,6 +92,8 @@ class HttpProtocol extends SerdeContext {
|
|
|
90
92
|
};
|
|
91
93
|
if (endpoint.headers) {
|
|
92
94
|
for (const name in endpoint.headers) {
|
|
95
|
+
if (!hasOwn(endpoint.headers, name))
|
|
96
|
+
continue;
|
|
93
97
|
request.headers[name] = endpoint.headers[name];
|
|
94
98
|
}
|
|
95
99
|
}
|
|
@@ -269,6 +273,8 @@ class HttpBindingProtocol extends HttpProtocol {
|
|
|
269
273
|
}
|
|
270
274
|
else if (typeof memberTraits.httpPrefixHeaders === "string") {
|
|
271
275
|
for (const key in inputMemberValue) {
|
|
276
|
+
if (!hasOwn(inputMemberValue, key))
|
|
277
|
+
continue;
|
|
272
278
|
const val = inputMemberValue[key];
|
|
273
279
|
const amalgam = memberTraits.httpPrefixHeaders + key;
|
|
274
280
|
serializer.write([memberNs.getValueSchema(), { httpHeader: amalgam }], val);
|
|
@@ -315,6 +321,8 @@ class HttpBindingProtocol extends HttpProtocol {
|
|
|
315
321
|
const traits = ns.getMergedTraits();
|
|
316
322
|
if (traits.httpQueryParams) {
|
|
317
323
|
for (const key in data) {
|
|
324
|
+
if (!hasOwn(data, key))
|
|
325
|
+
continue;
|
|
318
326
|
if (!(key in query)) {
|
|
319
327
|
const val = data[key];
|
|
320
328
|
const valueSchema = ns.getValueSchema();
|
|
@@ -358,6 +366,8 @@ class HttpBindingProtocol extends HttpProtocol {
|
|
|
358
366
|
throw new Error("@smithy/core/protocols - HTTP Protocol error handler failed to throw.");
|
|
359
367
|
}
|
|
360
368
|
for (const header in response.headers) {
|
|
369
|
+
if (!hasOwn(response.headers, header))
|
|
370
|
+
continue;
|
|
361
371
|
const value = response.headers[header];
|
|
362
372
|
delete response.headers[header];
|
|
363
373
|
response.headers[header.toLowerCase()] = value;
|
|
@@ -445,6 +455,8 @@ class HttpBindingProtocol extends HttpProtocol {
|
|
|
445
455
|
else if (memberTraits.httpPrefixHeaders !== undefined) {
|
|
446
456
|
dataObject[memberName] = {};
|
|
447
457
|
for (const header in response.headers) {
|
|
458
|
+
if (!hasOwn(response.headers, header))
|
|
459
|
+
continue;
|
|
448
460
|
if (header.startsWith(memberTraits.httpPrefixHeaders)) {
|
|
449
461
|
const value = response.headers[header];
|
|
450
462
|
const valueSchema = memberSchema.getValueSchema();
|
|
@@ -530,6 +542,8 @@ class RpcProtocol extends HttpProtocol {
|
|
|
530
542
|
throw new Error("@smithy/core/protocols - RPC Protocol error handler failed to throw.");
|
|
531
543
|
}
|
|
532
544
|
for (const header in response.headers) {
|
|
545
|
+
if (!hasOwn(response.headers, header))
|
|
546
|
+
continue;
|
|
533
547
|
const value = response.headers[header];
|
|
534
548
|
delete response.headers[header];
|
|
535
549
|
response.headers[header.toLowerCase()] = value;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
const { NoOpLogger, normalizeProvider } = require("@smithy/core/client");
|
|
2
2
|
const { HttpResponse, HttpRequest } = require("@smithy/core/protocols");
|
|
3
3
|
const { parseRfc7231DateTime, v4 } = require("@smithy/core/serde");
|
|
4
|
+
const { hasOwn } = require("@smithy/core/transport");
|
|
4
5
|
|
|
5
6
|
const isStreamingPayload = (request) => request?.body instanceof ReadableStream;
|
|
6
7
|
|
|
@@ -92,7 +93,9 @@ function parseRetryAfterHeader(response, logger) {
|
|
|
92
93
|
if (!HttpResponse.isInstance(response)) {
|
|
93
94
|
return;
|
|
94
95
|
}
|
|
95
|
-
for (const header
|
|
96
|
+
for (const header in response.headers) {
|
|
97
|
+
if (!hasOwn(response.headers, header))
|
|
98
|
+
continue;
|
|
96
99
|
const h = header.toLowerCase();
|
|
97
100
|
if (h === "retry-after") {
|
|
98
101
|
const retryAfter = response.headers[header];
|