@cdk8s/awscdk-resolver 0.0.609 → 0.0.611
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 +3 -3
- package/node_modules/@aws-sdk/core/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-env/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-http/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +9 -9
- package/node_modules/@aws-sdk/credential-provider-login/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-node/package.json +7 -7
- package/node_modules/@aws-sdk/credential-provider-process/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +3 -3
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/package.json +2 -2
- package/node_modules/@aws-sdk/token-providers/package.json +3 -3
- package/node_modules/@aws-sdk/xml-builder/dist-cjs/xml-parser.browser.js +1 -1
- package/node_modules/@aws-sdk/xml-builder/dist-cjs/xml-parser.js +233 -43
- package/node_modules/@aws-sdk/xml-builder/dist-es/xml-parser.browser.js +1 -1
- package/node_modules/@aws-sdk/xml-builder/dist-es/xml-parser.js +233 -43
- package/node_modules/@aws-sdk/xml-builder/dist-types/ts3.4/xml-parser.d.ts +1 -1
- package/node_modules/@aws-sdk/xml-builder/dist-types/xml-parser.d.ts +2 -1
- package/node_modules/@aws-sdk/xml-builder/package.json +4 -4
- package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +518 -371
- package/node_modules/@smithy/core/dist-cjs/submodules/client/index.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/cbor/cbor-decode.js +326 -269
- package/node_modules/@smithy/core/dist-es/submodules/cbor/cbor-encode.js +192 -103
- package/node_modules/@smithy/core/dist-es/submodules/cbor/cbor.js +4 -2
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/get-value-from-text-node.js +1 -1
- package/node_modules/@smithy/core/dist-types/submodules/cbor/cbor-decode.d.ts +4 -0
- package/node_modules/@smithy/core/dist-types/submodules/cbor/cbor-encode.d.ts +8 -4
- package/node_modules/@smithy/core/package.json +1 -1
- package/node_modules/@smithy/credential-provider-imds/package.json +2 -2
- package/node_modules/@smithy/fetch-http-handler/package.json +2 -2
- package/node_modules/@smithy/node-http-handler/package.json +2 -2
- package/node_modules/@smithy/signature-v4/package.json +2 -2
- package/package.json +9 -9
- package/node_modules/@aws-sdk/xml-builder/dist-cjs/xml-external/nodable_entities.js +0 -333
- package/node_modules/@aws-sdk/xml-builder/dist-es/xml-external/nodable_entities.js +0 -332
- package/node_modules/@aws-sdk/xml-builder/dist-types/ts3.4/xml-external/nodable_entities.d.ts +0 -66
- package/node_modules/@aws-sdk/xml-builder/dist-types/xml-external/nodable_entities.d.ts +0 -65
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/CHANGELOG.md +0 -827
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/LICENSE +0 -21
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/README.md +0 -202
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxbuilder.min.js +0 -2
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxbuilder.min.js.map +0 -1
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxp.cjs +0 -1
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxp.d.cts +0 -770
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxp.min.js +0 -2
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxp.min.js.map +0 -1
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxparser.min.js +0 -2
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxparser.min.js.map +0 -1
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxvalidator.min.js +0 -2
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxvalidator.min.js.map +0 -1
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/package.json +0 -93
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/cli/cli.js +0 -97
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/cli/man.js +0 -17
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/cli/read.js +0 -43
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/fxp.d.ts +0 -739
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/fxp.js +0 -14
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/ignoreAttributes.js +0 -18
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/util.js +0 -61
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/CharsSymbol.js +0 -16
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/EntitiesParser.js +0 -106
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/OptionsBuilder.js +0 -61
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/OutputBuilders/BaseOutputBuilder.js +0 -69
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/OutputBuilders/JsArrBuilder.js +0 -103
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/OutputBuilders/JsMinArrBuilder.js +0 -100
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/OutputBuilders/JsObjBuilder.js +0 -154
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/OutputBuilders/ParserOptionsBuilder.js +0 -94
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/Report.js +0 -0
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/TagPath.js +0 -81
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/TagPathMatcher.js +0 -13
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/XMLParser.js +0 -83
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/Xml2JsParser.js +0 -235
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/XmlPartReader.js +0 -210
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/XmlSpecialTagsReader.js +0 -111
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/inputSource/BufferSource.js +0 -116
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/inputSource/StringSource.js +0 -121
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/valueParsers/EntitiesParser.js +0 -105
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/valueParsers/booleanParser.js +0 -22
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/valueParsers/booleanParserExt.js +0 -19
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/valueParsers/currency.js +0 -38
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/valueParsers/join.js +0 -13
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/valueParsers/number.js +0 -14
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/valueParsers/trim.js +0 -6
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/validator.js +0 -425
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js +0 -6
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js +0 -407
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js +0 -163
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js +0 -840
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/xmlparser/XMLParser.js +0 -71
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/xmlparser/node2json.js +0 -177
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/xmlparser/xmlNode.js +0 -40
- package/node_modules/@nodable/entities/README.md +0 -41
- package/node_modules/@nodable/entities/package.json +0 -57
- package/node_modules/@nodable/entities/src/EntityDecoder.js +0 -644
- package/node_modules/@nodable/entities/src/EntityEncoder.js +0 -194
- package/node_modules/@nodable/entities/src/entities.js +0 -1159
- package/node_modules/@nodable/entities/src/entityTries.js +0 -49
- package/node_modules/@nodable/entities/src/index.d.ts +0 -341
- package/node_modules/@nodable/entities/src/index.js +0 -29
- package/node_modules/anynum/LICENSE +0 -21
- package/node_modules/anynum/README.md +0 -142
- package/node_modules/anynum/anynum.js +0 -135
- package/node_modules/anynum/digitTable.js +0 -116
- package/node_modules/anynum/package.json +0 -42
- package/node_modules/fast-xml-builder/CHANGELOG.md +0 -40
- package/node_modules/fast-xml-builder/LICENSE +0 -21
- package/node_modules/fast-xml-builder/README.md +0 -74
- package/node_modules/fast-xml-builder/lib/fxb.cjs +0 -1
- package/node_modules/fast-xml-builder/lib/fxb.d.cts +0 -270
- package/node_modules/fast-xml-builder/lib/fxb.min.js +0 -2
- package/node_modules/fast-xml-builder/lib/fxb.min.js.map +0 -1
- package/node_modules/fast-xml-builder/package.json +0 -81
- package/node_modules/fast-xml-builder/src/fxb.d.ts +0 -270
- package/node_modules/fast-xml-builder/src/fxb.js +0 -599
- package/node_modules/fast-xml-builder/src/ignoreAttributes.js +0 -18
- package/node_modules/fast-xml-builder/src/orderedJs2Xml.js +0 -359
- package/node_modules/fast-xml-builder/src/prettifyJs2Xml.js +0 -0
- package/node_modules/fast-xml-builder/src/util.js +0 -16
- package/node_modules/path-expression-matcher/LICENSE +0 -21
- package/node_modules/path-expression-matcher/README.md +0 -947
- package/node_modules/path-expression-matcher/lib/pem.cjs +0 -1
- package/node_modules/path-expression-matcher/lib/pem.d.cts +0 -715
- package/node_modules/path-expression-matcher/lib/pem.min.js +0 -2
- package/node_modules/path-expression-matcher/lib/pem.min.js.map +0 -1
- package/node_modules/path-expression-matcher/package.json +0 -79
- package/node_modules/path-expression-matcher/src/Expression.js +0 -232
- package/node_modules/path-expression-matcher/src/ExpressionSet.js +0 -225
- package/node_modules/path-expression-matcher/src/Matcher.js +0 -660
- package/node_modules/path-expression-matcher/src/index.d.ts +0 -589
- package/node_modules/path-expression-matcher/src/index.js +0 -29
- package/node_modules/strnum/CHANGELOG.md +0 -51
- package/node_modules/strnum/LICENSE +0 -21
- package/node_modules/strnum/README.md +0 -113
- package/node_modules/strnum/package.json +0 -36
- package/node_modules/strnum/strnum.js +0 -171
- package/node_modules/xml-naming/README.md +0 -189
- package/node_modules/xml-naming/package.json +0 -54
- package/node_modules/xml-naming/src/index.d.ts +0 -74
- package/node_modules/xml-naming/src/index.js +0 -270
|
@@ -1,83 +1,64 @@
|
|
|
1
|
-
import { NumericValue
|
|
1
|
+
import { NumericValue } from "@smithy/core/serde";
|
|
2
2
|
import { alloc, extendedFloat16, extendedFloat32, extendedFloat64, majorList, majorMap, majorNegativeInt64, majorSpecial, majorTag, majorUint64, majorUnstructuredByteString, majorUtf8String, specialFalse, specialNull, specialTrue, tagSymbol, } from "./cbor-types";
|
|
3
3
|
const USE_BUFFER = typeof Buffer !== "undefined";
|
|
4
|
+
const encodeStringCache = new Map();
|
|
5
|
+
let encodeCacheEpoch = 0;
|
|
6
|
+
let encodeCacheSaturated = false;
|
|
4
7
|
const initialSize = 2048;
|
|
5
8
|
let data = alloc(initialSize);
|
|
6
9
|
let dataView = new DataView(data.buffer, data.byteOffset, data.byteLength);
|
|
7
10
|
let cursor = 0;
|
|
8
|
-
function ensureSpace(bytes) {
|
|
9
|
-
const remaining = data.byteLength - cursor;
|
|
10
|
-
if (remaining < bytes) {
|
|
11
|
-
if (cursor < 16_000_000) {
|
|
12
|
-
resize(Math.max(data.byteLength * 4, data.byteLength + bytes));
|
|
13
|
-
}
|
|
14
|
-
else {
|
|
15
|
-
resize(data.byteLength + bytes + 16_000_000);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
export function toUint8Array() {
|
|
20
|
-
const out = alloc(cursor);
|
|
21
|
-
out.set(data.subarray(0, cursor), 0);
|
|
22
|
-
cursor = 0;
|
|
23
|
-
return out;
|
|
24
|
-
}
|
|
25
|
-
export function resize(size) {
|
|
26
|
-
const old = data;
|
|
27
|
-
data = alloc(size);
|
|
28
|
-
if (old) {
|
|
29
|
-
if (old.copy) {
|
|
30
|
-
old.copy(data, 0, 0, old.byteLength);
|
|
31
|
-
}
|
|
32
|
-
else {
|
|
33
|
-
data.set(old, 0);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
dataView = new DataView(data.buffer, data.byteOffset, data.byteLength);
|
|
37
|
-
}
|
|
38
|
-
function encodeHeader(major, value) {
|
|
39
|
-
if (value < 24) {
|
|
40
|
-
data[cursor++] = (major << 5) | value;
|
|
41
|
-
}
|
|
42
|
-
else if (value < 1 << 8) {
|
|
43
|
-
data[cursor++] = (major << 5) | 24;
|
|
44
|
-
data[cursor++] = value;
|
|
45
|
-
}
|
|
46
|
-
else if (value < 1 << 16) {
|
|
47
|
-
data[cursor++] = (major << 5) | extendedFloat16;
|
|
48
|
-
dataView.setUint16(cursor, value);
|
|
49
|
-
cursor += 2;
|
|
50
|
-
}
|
|
51
|
-
else if (value < 2 ** 32) {
|
|
52
|
-
data[cursor++] = (major << 5) | extendedFloat32;
|
|
53
|
-
dataView.setUint32(cursor, value);
|
|
54
|
-
cursor += 4;
|
|
55
|
-
}
|
|
56
|
-
else {
|
|
57
|
-
data[cursor++] = (major << 5) | extendedFloat64;
|
|
58
|
-
dataView.setBigUint64(cursor, typeof value === "bigint" ? value : BigInt(value));
|
|
59
|
-
cursor += 8;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
11
|
export function encode(_input) {
|
|
63
12
|
const encodeStack = [_input];
|
|
64
13
|
while (encodeStack.length) {
|
|
65
14
|
const input = encodeStack.pop();
|
|
66
|
-
ensureSpace(typeof input === "string" ? input.length * 4 : 64);
|
|
67
15
|
if (typeof input === "string") {
|
|
16
|
+
const len = input.length;
|
|
68
17
|
if (USE_BUFFER) {
|
|
69
|
-
|
|
70
|
-
|
|
18
|
+
ensureSpace(len * 3 + 9);
|
|
19
|
+
if (len > 23) {
|
|
20
|
+
encodeHeader(majorUtf8String, Buffer.byteLength(input));
|
|
21
|
+
cursor += data.write(input, cursor);
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
encodeStringCached(input);
|
|
25
|
+
}
|
|
71
26
|
}
|
|
72
27
|
else {
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
cursor
|
|
28
|
+
const maxBytes = len * 3;
|
|
29
|
+
ensureSpace(maxBytes + 9);
|
|
30
|
+
const headerPos = cursor;
|
|
31
|
+
const result = new TextEncoder().encodeInto(input, data.subarray(cursor + 9));
|
|
32
|
+
const byteLen = result.written;
|
|
33
|
+
let headerSize;
|
|
34
|
+
if (byteLen < 24) {
|
|
35
|
+
headerSize = 1;
|
|
36
|
+
}
|
|
37
|
+
else if (byteLen < 256) {
|
|
38
|
+
headerSize = 2;
|
|
39
|
+
}
|
|
40
|
+
else if (byteLen < 65536) {
|
|
41
|
+
headerSize = 3;
|
|
42
|
+
}
|
|
43
|
+
else if (byteLen < 4294967296) {
|
|
44
|
+
headerSize = 5;
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
headerSize = 9;
|
|
48
|
+
}
|
|
49
|
+
if (headerSize < 9) {
|
|
50
|
+
data.copyWithin(headerPos + headerSize, headerPos + 9, headerPos + 9 + byteLen);
|
|
51
|
+
}
|
|
52
|
+
cursor = headerPos;
|
|
53
|
+
encodeInteger(majorUtf8String, byteLen);
|
|
54
|
+
cursor += byteLen;
|
|
77
55
|
}
|
|
78
56
|
continue;
|
|
79
57
|
}
|
|
80
|
-
|
|
58
|
+
if (data.byteLength - cursor < 9) {
|
|
59
|
+
ensureSpace(64);
|
|
60
|
+
}
|
|
61
|
+
if (typeof input === "number") {
|
|
81
62
|
if (Number.isInteger(input)) {
|
|
82
63
|
const nonNegative = input >= 0;
|
|
83
64
|
const major = nonNegative ? majorUint64 : majorNegativeInt64;
|
|
@@ -92,7 +73,7 @@ export function encode(_input) {
|
|
|
92
73
|
else if (value < 65536) {
|
|
93
74
|
data[cursor++] = (major << 5) | extendedFloat16;
|
|
94
75
|
data[cursor++] = value >> 8;
|
|
95
|
-
data[cursor++] = value;
|
|
76
|
+
data[cursor++] = value & 0xff;
|
|
96
77
|
}
|
|
97
78
|
else if (value < 4294967296) {
|
|
98
79
|
data[cursor++] = (major << 5) | extendedFloat32;
|
|
@@ -101,7 +82,10 @@ export function encode(_input) {
|
|
|
101
82
|
}
|
|
102
83
|
else {
|
|
103
84
|
data[cursor++] = (major << 5) | extendedFloat64;
|
|
104
|
-
|
|
85
|
+
const hi = (value / 4294967296) | 0;
|
|
86
|
+
const lo = (value - hi * 4294967296) | 0;
|
|
87
|
+
dataView.setUint32(cursor, hi);
|
|
88
|
+
dataView.setUint32(cursor + 4, lo);
|
|
105
89
|
cursor += 8;
|
|
106
90
|
}
|
|
107
91
|
continue;
|
|
@@ -115,28 +99,16 @@ export function encode(_input) {
|
|
|
115
99
|
const nonNegative = input >= 0;
|
|
116
100
|
const major = nonNegative ? majorUint64 : majorNegativeInt64;
|
|
117
101
|
const value = nonNegative ? input : -input - BigInt(1);
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
data[cursor++] = n >> 8;
|
|
129
|
-
data[cursor++] = n & 0b1111_1111;
|
|
130
|
-
}
|
|
131
|
-
else if (n < 4294967296) {
|
|
132
|
-
data[cursor++] = (major << 5) | extendedFloat32;
|
|
133
|
-
dataView.setUint32(cursor, n);
|
|
134
|
-
cursor += 4;
|
|
135
|
-
}
|
|
136
|
-
else if (value < BigInt("18446744073709551616")) {
|
|
137
|
-
data[cursor++] = (major << 5) | extendedFloat64;
|
|
138
|
-
dataView.setBigUint64(cursor, value);
|
|
139
|
-
cursor += 8;
|
|
102
|
+
if (value < BigInt("18446744073709551616")) {
|
|
103
|
+
const n = Number(value);
|
|
104
|
+
if (n < 4294967296) {
|
|
105
|
+
encodeInteger(major, n);
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
data[cursor++] = (major << 5) | extendedFloat64;
|
|
109
|
+
dataView.setBigUint64(cursor, value);
|
|
110
|
+
cursor += 8;
|
|
111
|
+
}
|
|
140
112
|
}
|
|
141
113
|
else {
|
|
142
114
|
const binaryBigInt = value.toString(2);
|
|
@@ -147,14 +119,9 @@ export function encode(_input) {
|
|
|
147
119
|
bigIntBytes[bigIntBytes.byteLength - i] = Number(b & BigInt(255));
|
|
148
120
|
b >>= BigInt(8);
|
|
149
121
|
}
|
|
150
|
-
ensureSpace(bigIntBytes.byteLength * 2);
|
|
122
|
+
ensureSpace(bigIntBytes.byteLength * 2 + 16);
|
|
151
123
|
data[cursor++] = nonNegative ? 0b110_00010 : 0b110_00011;
|
|
152
|
-
|
|
153
|
-
encodeHeader(majorUnstructuredByteString, Buffer.byteLength(bigIntBytes));
|
|
154
|
-
}
|
|
155
|
-
else {
|
|
156
|
-
encodeHeader(majorUnstructuredByteString, bigIntBytes.byteLength);
|
|
157
|
-
}
|
|
124
|
+
encodeHeader(majorUnstructuredByteString, bigIntBytes.byteLength);
|
|
158
125
|
data.set(bigIntBytes, cursor);
|
|
159
126
|
cursor += bigIntBytes.byteLength;
|
|
160
127
|
}
|
|
@@ -172,15 +139,16 @@ export function encode(_input) {
|
|
|
172
139
|
throw new Error("@smithy/core/cbor: client may not serialize undefined value.");
|
|
173
140
|
}
|
|
174
141
|
else if (Array.isArray(input)) {
|
|
142
|
+
encodeInteger(majorList, input.length);
|
|
143
|
+
ensureSpace(input.length * 9 + 64);
|
|
175
144
|
for (let i = input.length - 1; i >= 0; --i) {
|
|
176
145
|
encodeStack.push(input[i]);
|
|
177
146
|
}
|
|
178
|
-
encodeHeader(majorList, input.length);
|
|
179
147
|
continue;
|
|
180
148
|
}
|
|
181
149
|
else if (typeof input.byteLength === "number") {
|
|
182
|
-
ensureSpace(input.length * 2);
|
|
183
|
-
|
|
150
|
+
ensureSpace(input.length * 2 + 9);
|
|
151
|
+
encodeInteger(majorUnstructuredByteString, input.length);
|
|
184
152
|
data.set(input, cursor);
|
|
185
153
|
cursor += input.byteLength;
|
|
186
154
|
continue;
|
|
@@ -191,9 +159,9 @@ export function encode(_input) {
|
|
|
191
159
|
const exponent = decimalIndex === -1 ? 0 : decimalIndex - input.string.length + 1;
|
|
192
160
|
const mantissa = BigInt(input.string.replace(".", ""));
|
|
193
161
|
data[cursor++] = 0b110_00100;
|
|
162
|
+
encodeInteger(majorList, 2);
|
|
194
163
|
encodeStack.push(mantissa);
|
|
195
164
|
encodeStack.push(exponent);
|
|
196
|
-
encodeHeader(majorList, 2);
|
|
197
165
|
continue;
|
|
198
166
|
}
|
|
199
167
|
if (input[tagSymbol]) {
|
|
@@ -207,14 +175,135 @@ export function encode(_input) {
|
|
|
207
175
|
}
|
|
208
176
|
}
|
|
209
177
|
const keys = Object.keys(input);
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
encodeStack.push(
|
|
178
|
+
const len = keys.length;
|
|
179
|
+
encodeInteger(majorMap, len);
|
|
180
|
+
for (let i = len - 1; i >= 0; --i) {
|
|
181
|
+
encodeStack.push(input[keys[i]]);
|
|
182
|
+
encodeStack.push(keys[i]);
|
|
214
183
|
}
|
|
215
|
-
encodeHeader(majorMap, keys.length);
|
|
216
184
|
continue;
|
|
217
185
|
}
|
|
218
186
|
throw new Error(`data type ${input?.constructor?.name ?? typeof input} not compatible for encoding.`);
|
|
219
187
|
}
|
|
220
188
|
}
|
|
189
|
+
export function advanceEncodingEpoch() {
|
|
190
|
+
encodeCacheEpoch = (encodeCacheEpoch + 1) & 0b1111_1111_1111_1111;
|
|
191
|
+
encodeCacheSaturated = false;
|
|
192
|
+
}
|
|
193
|
+
export function toUint8Array() {
|
|
194
|
+
const out = alloc(cursor);
|
|
195
|
+
out.set(data.subarray(0, cursor), 0);
|
|
196
|
+
cursor = 0;
|
|
197
|
+
return out;
|
|
198
|
+
}
|
|
199
|
+
export function resize(size) {
|
|
200
|
+
const old = data;
|
|
201
|
+
data = alloc(size);
|
|
202
|
+
if (old) {
|
|
203
|
+
if (old.copy) {
|
|
204
|
+
old.copy(data, 0, 0, old.byteLength);
|
|
205
|
+
}
|
|
206
|
+
else {
|
|
207
|
+
data.set(old, 0);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
dataView = new DataView(data.buffer, data.byteOffset, data.byteLength);
|
|
211
|
+
}
|
|
212
|
+
function encodeStringCached(input) {
|
|
213
|
+
const cached = encodeStringCache.get(input);
|
|
214
|
+
if (cached !== undefined) {
|
|
215
|
+
data.set(cached.bytes, cursor);
|
|
216
|
+
cursor += cached.bytes.length;
|
|
217
|
+
cached.epoch = encodeCacheEpoch;
|
|
218
|
+
return;
|
|
219
|
+
}
|
|
220
|
+
const start = cursor;
|
|
221
|
+
const byteLen = Buffer.byteLength(input);
|
|
222
|
+
encodeInteger(majorUtf8String, byteLen);
|
|
223
|
+
cursor += data.write(input, cursor);
|
|
224
|
+
const bytes = Uint8Array.prototype.slice.call(data, start, cursor);
|
|
225
|
+
if (encodeStringCache.size >= 2048) {
|
|
226
|
+
if (encodeCacheSaturated) {
|
|
227
|
+
return;
|
|
228
|
+
}
|
|
229
|
+
let evicted = 0;
|
|
230
|
+
for (const [key, entry] of encodeStringCache) {
|
|
231
|
+
if (evicted >= 1024) {
|
|
232
|
+
break;
|
|
233
|
+
}
|
|
234
|
+
if (entry.epoch !== encodeCacheEpoch) {
|
|
235
|
+
encodeStringCache.delete(key);
|
|
236
|
+
evicted++;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
if (evicted === 0) {
|
|
240
|
+
encodeCacheSaturated = true;
|
|
241
|
+
return;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
if (encodeStringCache.size < 2048) {
|
|
245
|
+
encodeStringCache.set(input, { epoch: encodeCacheEpoch, bytes });
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
function ensureSpace(bytes) {
|
|
249
|
+
const remaining = data.byteLength - cursor;
|
|
250
|
+
if (remaining < bytes) {
|
|
251
|
+
if (cursor < 16_000_000) {
|
|
252
|
+
resize(Math.max(data.byteLength * 4, data.byteLength + bytes));
|
|
253
|
+
}
|
|
254
|
+
else {
|
|
255
|
+
resize(data.byteLength + bytes + 16_000_000);
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
function encodeHeader(major, value) {
|
|
260
|
+
if (value < 24) {
|
|
261
|
+
data[cursor++] = (major << 5) | value;
|
|
262
|
+
}
|
|
263
|
+
else if (value < 256) {
|
|
264
|
+
data[cursor++] = (major << 5) | 24;
|
|
265
|
+
data[cursor++] = value;
|
|
266
|
+
}
|
|
267
|
+
else if (value < 65536) {
|
|
268
|
+
data[cursor++] = (major << 5) | extendedFloat16;
|
|
269
|
+
dataView.setUint16(cursor, value);
|
|
270
|
+
cursor += 2;
|
|
271
|
+
}
|
|
272
|
+
else if (value < 4294967296) {
|
|
273
|
+
data[cursor++] = (major << 5) | extendedFloat32;
|
|
274
|
+
dataView.setUint32(cursor, value);
|
|
275
|
+
cursor += 4;
|
|
276
|
+
}
|
|
277
|
+
else {
|
|
278
|
+
data[cursor++] = (major << 5) | extendedFloat64;
|
|
279
|
+
dataView.setBigUint64(cursor, typeof value === "bigint" ? value : BigInt(value));
|
|
280
|
+
cursor += 8;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
function encodeInteger(major, value) {
|
|
284
|
+
if (value < 24) {
|
|
285
|
+
data[cursor++] = (major << 5) | value;
|
|
286
|
+
}
|
|
287
|
+
else if (value < 256) {
|
|
288
|
+
data[cursor++] = (major << 5) | 24;
|
|
289
|
+
data[cursor++] = value;
|
|
290
|
+
}
|
|
291
|
+
else if (value < 65536) {
|
|
292
|
+
data[cursor++] = (major << 5) | extendedFloat16;
|
|
293
|
+
data[cursor++] = value >> 8;
|
|
294
|
+
data[cursor++] = value & 0xff;
|
|
295
|
+
}
|
|
296
|
+
else if (value < 4294967296) {
|
|
297
|
+
data[cursor++] = (major << 5) | extendedFloat32;
|
|
298
|
+
dataView.setUint32(cursor, value);
|
|
299
|
+
cursor += 4;
|
|
300
|
+
}
|
|
301
|
+
else {
|
|
302
|
+
data[cursor++] = (major << 5) | extendedFloat64;
|
|
303
|
+
const hi = (value / 4294967296) | 0;
|
|
304
|
+
const lo = (value - hi * 4294967296) | 0;
|
|
305
|
+
dataView.setUint32(cursor, hi);
|
|
306
|
+
dataView.setUint32(cursor + 4, lo);
|
|
307
|
+
cursor += 8;
|
|
308
|
+
}
|
|
309
|
+
}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { decode, setPayload } from "./cbor-decode";
|
|
2
|
-
import { encode, resize, toUint8Array } from "./cbor-encode";
|
|
1
|
+
import { advanceDecodingEpoch, decode, setPayload } from "./cbor-decode";
|
|
2
|
+
import { advanceEncodingEpoch, encode, resize, toUint8Array } from "./cbor-encode";
|
|
3
3
|
export const cbor = {
|
|
4
4
|
deserialize(payload) {
|
|
5
|
+
advanceDecodingEpoch();
|
|
5
6
|
setPayload(payload);
|
|
6
7
|
return decode(0, payload.length);
|
|
7
8
|
},
|
|
8
9
|
serialize(input) {
|
|
10
|
+
advanceEncodingEpoch();
|
|
9
11
|
try {
|
|
10
12
|
encode(input);
|
|
11
13
|
return toUint8Array();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export const getValueFromTextNode = (obj) => {
|
|
2
2
|
const textNodeName = "#text";
|
|
3
3
|
for (const key in obj) {
|
|
4
|
-
if (
|
|
4
|
+
if (Object.prototype.hasOwnProperty.call(obj, key) && obj[key][textNodeName] !== undefined) {
|
|
5
5
|
obj[key] = obj[key][textNodeName];
|
|
6
6
|
}
|
|
7
7
|
else if (typeof obj[key] === "object" && obj[key] !== null) {
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @param _input - JS data object.
|
|
3
|
+
*/
|
|
4
|
+
export declare function encode(_input: any): void;
|
|
1
5
|
/**
|
|
2
6
|
* @internal
|
|
3
7
|
*/
|
|
4
|
-
export declare function
|
|
5
|
-
export declare function resize(size: number): void;
|
|
8
|
+
export declare function advanceEncodingEpoch(): void;
|
|
6
9
|
/**
|
|
7
|
-
* @
|
|
10
|
+
* @internal
|
|
8
11
|
*/
|
|
9
|
-
export declare function
|
|
12
|
+
export declare function toUint8Array(): Uint8Array;
|
|
13
|
+
export declare function resize(size: number): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/credential-provider-imds",
|
|
3
|
-
"version": "4.4.
|
|
3
|
+
"version": "4.4.2",
|
|
4
4
|
"description": "AWS credential provider that sources credentials from the EC2 instance metadata service and ECS container metadata service",
|
|
5
5
|
"main": "./dist-cjs/index.js",
|
|
6
6
|
"module": "./dist-es/index.js",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"license": "Apache-2.0",
|
|
28
28
|
"sideEffects": false,
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@smithy/core": "^3.
|
|
30
|
+
"@smithy/core": "^3.26.0",
|
|
31
31
|
"@smithy/types": "^4.15.0",
|
|
32
32
|
"tslib": "^2.6.2"
|
|
33
33
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/fetch-http-handler",
|
|
3
|
-
"version": "5.5.
|
|
3
|
+
"version": "5.5.2",
|
|
4
4
|
"description": "Provides a way to make requests",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:types' 'yarn:build:es:cjs'",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"module": "./dist-es/index.js",
|
|
28
28
|
"types": "./dist-types/index.d.ts",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@smithy/core": "^3.
|
|
30
|
+
"@smithy/core": "^3.26.0",
|
|
31
31
|
"@smithy/types": "^4.15.0",
|
|
32
32
|
"tslib": "^2.6.2"
|
|
33
33
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/node-http-handler",
|
|
3
|
-
"version": "4.8.
|
|
3
|
+
"version": "4.8.2",
|
|
4
4
|
"description": "Provides a way to make requests",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:types' 'yarn:build:es:cjs'",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"module": "./dist-es/index.js",
|
|
27
27
|
"types": "./dist-types/index.d.ts",
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@smithy/core": "^3.
|
|
29
|
+
"@smithy/core": "^3.26.0",
|
|
30
30
|
"@smithy/types": "^4.15.0",
|
|
31
31
|
"tslib": "^2.6.2"
|
|
32
32
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/signature-v4",
|
|
3
|
-
"version": "5.5.
|
|
3
|
+
"version": "5.5.2",
|
|
4
4
|
"description": "A standalone implementation of the AWS Signature V4 request signing algorithm",
|
|
5
5
|
"main": "./dist-cjs/index.js",
|
|
6
6
|
"module": "./dist-es/index.js",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"license": "Apache-2.0",
|
|
26
26
|
"sideEffects": false,
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@smithy/core": "^3.
|
|
28
|
+
"@smithy/core": "^3.26.0",
|
|
29
29
|
"@smithy/types": "^4.15.0",
|
|
30
30
|
"tslib": "^2.6.2"
|
|
31
31
|
},
|
package/package.json
CHANGED
|
@@ -42,17 +42,17 @@
|
|
|
42
42
|
"organization": false
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@cdk8s/projen-common": "0.0.
|
|
45
|
+
"@cdk8s/projen-common": "0.0.718",
|
|
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.1128.
|
|
52
|
+
"aws-cdk": "^2.1128.1",
|
|
53
53
|
"aws-cdk-lib": "2.195.0",
|
|
54
54
|
"cdk8s": "2.68.91",
|
|
55
|
-
"cdk8s-cli": "^2.207.
|
|
55
|
+
"cdk8s-cli": "^2.207.28",
|
|
56
56
|
"commit-and-tag-version": "^12",
|
|
57
57
|
"constructs": "10.3.0",
|
|
58
58
|
"eslint": "^9",
|
|
@@ -62,11 +62,11 @@
|
|
|
62
62
|
"jest": "^27",
|
|
63
63
|
"jest-junit": "^17",
|
|
64
64
|
"jsii": "^5",
|
|
65
|
-
"jsii-diff": "^1.
|
|
65
|
+
"jsii-diff": "^1.137.0",
|
|
66
66
|
"jsii-docgen": "^10.5.0",
|
|
67
|
-
"jsii-pacmak": "^1.
|
|
67
|
+
"jsii-pacmak": "^1.137.0",
|
|
68
68
|
"jsii-rosetta": "^5",
|
|
69
|
-
"projen": "^0.100.
|
|
69
|
+
"projen": "^0.100.4",
|
|
70
70
|
"ts-jest": "^27",
|
|
71
71
|
"ts-node": "^10.9.2",
|
|
72
72
|
"typescript": "^5.9.3"
|
|
@@ -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.1075.0"
|
|
81
81
|
},
|
|
82
82
|
"bundledDependencies": [
|
|
83
83
|
"@aws-sdk/client-cloudformation"
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
"publishConfig": {
|
|
95
95
|
"access": "public"
|
|
96
96
|
},
|
|
97
|
-
"version": "0.0.
|
|
97
|
+
"version": "0.0.611",
|
|
98
98
|
"jest": {
|
|
99
99
|
"coverageProvider": "v8",
|
|
100
100
|
"testMatch": [
|
|
@@ -136,7 +136,7 @@
|
|
|
136
136
|
"preset": "ts-jest",
|
|
137
137
|
"globals": {
|
|
138
138
|
"ts-jest": {
|
|
139
|
-
"tsconfig": "tsconfig.
|
|
139
|
+
"tsconfig": "test/tsconfig.json"
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
142
|
},
|