@cdk8s/awscdk-resolver 0.0.713 → 0.0.715

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.
Files changed (79) hide show
  1. package/.jsii +3 -3
  2. package/lib/resolve.js +1 -1
  3. package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/index.js +1 -1
  4. package/node_modules/@aws-sdk/client-cloudformation/package.json +4 -4
  5. package/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +94 -1589
  6. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/index.js +1 -7
  7. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJsonRpcProtocol.js +1 -3
  8. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsRestJsonProtocol.js +1 -3
  9. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/index.d.ts +2 -8
  10. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJson1_0Protocol.d.ts +1 -2
  11. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJson1_1Protocol.d.ts +1 -2
  12. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJsonRpcProtocol.d.ts +2 -3
  13. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsRestJsonProtocol.d.ts +2 -3
  14. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/index.d.ts +10 -10
  15. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJson1_0Protocol.d.ts +1 -2
  16. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJson1_1Protocol.d.ts +1 -2
  17. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJsonRpcProtocol.d.ts +2 -3
  18. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsRestJsonProtocol.d.ts +2 -3
  19. package/node_modules/@aws-sdk/core/package.json +2 -2
  20. package/node_modules/@aws-sdk/credential-provider-env/package.json +3 -3
  21. package/node_modules/@aws-sdk/credential-provider-http/package.json +3 -3
  22. package/node_modules/@aws-sdk/credential-provider-ini/package.json +10 -10
  23. package/node_modules/@aws-sdk/credential-provider-login/package.json +4 -4
  24. package/node_modules/@aws-sdk/credential-provider-node/package.json +8 -8
  25. package/node_modules/@aws-sdk/credential-provider-process/package.json +3 -3
  26. package/node_modules/@aws-sdk/credential-provider-sso/package.json +5 -5
  27. package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +4 -4
  28. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +1 -1
  29. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +1 -1
  30. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +1 -1
  31. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +1 -1
  32. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +1 -1
  33. package/node_modules/@aws-sdk/nested-clients/package.json +3 -3
  34. package/node_modules/@aws-sdk/token-providers/dist-cjs/index.js +37 -19
  35. package/node_modules/@aws-sdk/token-providers/dist-es/fromSso.js +37 -19
  36. package/node_modules/@aws-sdk/token-providers/package.json +4 -4
  37. package/package.json +7 -7
  38. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonSettings.js +0 -1
  39. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v1/JsonCodec.js +0 -20
  40. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v1/JsonSettings.js +0 -1
  41. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v1/JsonShapeDeserializer.js +0 -160
  42. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v1/JsonShapeSerializer.js +0 -193
  43. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v2/JsonBytesStringAdapter.js +0 -103
  44. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v2/JsonCodec2.js +0 -20
  45. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v2/JsonShapeDeserializer2.js +0 -200
  46. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v2/JsonShapeSerializer2.js +0 -519
  47. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/detectBufferParsing.js +0 -18
  48. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/jsonReplacer.js +0 -46
  49. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/jsonReviver.js +0 -121
  50. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/needsReviver.js +0 -41
  51. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/parseJsonBody.js +0 -89
  52. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/JsonSettings.d.ts +0 -7
  53. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/codec-v1/JsonCodec.d.ts +0 -15
  54. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/codec-v1/JsonSettings.d.ts +0 -7
  55. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/codec-v1/JsonShapeDeserializer.d.ts +0 -14
  56. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/codec-v1/JsonShapeSerializer.d.ts +0 -29
  57. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/codec-v2/JsonBytesStringAdapter.d.ts +0 -51
  58. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/codec-v2/JsonCodec2.d.ts +0 -13
  59. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/codec-v2/JsonShapeDeserializer2.d.ts +0 -30
  60. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/codec-v2/JsonShapeSerializer2.d.ts +0 -60
  61. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/detectBufferParsing.d.ts +0 -1
  62. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/jsonReplacer.d.ts +0 -21
  63. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/jsonReviver.d.ts +0 -15
  64. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/needsReviver.d.ts +0 -11
  65. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/parseJsonBody.d.ts +0 -22
  66. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/JsonSettings.d.ts +0 -4
  67. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonCodec.d.ts +0 -11
  68. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonSettings.d.ts +0 -4
  69. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonShapeDeserializer.d.ts +0 -13
  70. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonShapeSerializer.d.ts +0 -18
  71. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonBytesStringAdapter.d.ts +0 -27
  72. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonCodec2.d.ts +0 -9
  73. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonShapeDeserializer2.d.ts +0 -15
  74. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonShapeSerializer2.d.ts +0 -39
  75. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/detectBufferParsing.d.ts +0 -1
  76. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/jsonReplacer.d.ts +0 -7
  77. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/jsonReviver.d.ts +0 -7
  78. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/needsReviver.d.ts +0 -2
  79. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/parseJsonBody.d.ts +0 -14
@@ -1,200 +0,0 @@
1
- import { determineTimestampFormat } from "@smithy/core/protocols";
2
- import { NormalizedSchema } from "@smithy/core/schema";
3
- import { fromBase64, LazyJsonString, NumericValue, parseEpochTimestamp, parseRfc3339DateTimeWithOffset, parseRfc7231DateTime, } from "@smithy/core/serde";
4
- import { SerdeContextConfig } from "../../ConfigurableSerdeContext";
5
- import { UnionSerde } from "../../UnionSerde";
6
- import { detectBufferParsing } from "../detectBufferParsing";
7
- import { jsonReviver } from "../jsonReviver";
8
- import { needsReviver } from "../needsReviver";
9
- import { parseJsonBody } from "../parseJsonBody";
10
- import { writeKey } from "../../writeKey";
11
- export class JsonShapeDeserializer2 extends SerdeContextConfig {
12
- settings;
13
- constructor(settings) {
14
- super();
15
- this.settings = settings;
16
- }
17
- async read(schema, data) {
18
- const reviver = needsReviver(schema) ? jsonReviver : undefined;
19
- let parsed;
20
- if (typeof data === "string") {
21
- if (data.length === 0) {
22
- return {};
23
- }
24
- parsed = JSON.parse(data, reviver);
25
- }
26
- else if (data instanceof Uint8Array && detectBufferParsing()) {
27
- if (data.byteLength === 0) {
28
- return {};
29
- }
30
- const buf = Buffer.isBuffer(data) ? data : Buffer.from(data.buffer, data.byteOffset, data.byteLength);
31
- parsed = JSON.parse(buf, reviver);
32
- }
33
- else {
34
- parsed = await parseJsonBody(data, this.serdeContext, schema);
35
- }
36
- return this._read(schema, parsed);
37
- }
38
- readObject(schema, data) {
39
- return this._read(schema, data);
40
- }
41
- _read(schema, value) {
42
- const isObject = value !== null && typeof value === "object";
43
- const ns = NormalizedSchema.of(schema);
44
- if (isObject) {
45
- if (ns.isStructSchema()) {
46
- return this._readStruct(ns, value);
47
- }
48
- if (Array.isArray(value) && ns.isListSchema()) {
49
- const listMember = ns.getValueSchema();
50
- if (this.needsTransform(listMember)) {
51
- for (let i = 0; i < value.length; ++i) {
52
- value[i] = this._read(listMember, value[i]);
53
- }
54
- }
55
- return value;
56
- }
57
- if (ns.isMapSchema()) {
58
- const mapMember = ns.getValueSchema();
59
- const map = value;
60
- if (this.needsTransform(mapMember)) {
61
- for (const k in map) {
62
- if (k === "__proto__") {
63
- writeKey(map);
64
- }
65
- map[k] = this._read(mapMember, map[k]);
66
- }
67
- }
68
- return map;
69
- }
70
- }
71
- if (ns.isBlobSchema() && typeof value === "string") {
72
- return fromBase64(value);
73
- }
74
- const mediaType = ns.getMergedTraits().mediaType;
75
- if (ns.isStringSchema() && typeof value === "string" && mediaType) {
76
- const isJson = mediaType === "application/json" || mediaType.endsWith("+json");
77
- if (isJson) {
78
- return LazyJsonString.from(value);
79
- }
80
- return value;
81
- }
82
- if (ns.isTimestampSchema() && value != null) {
83
- const format = determineTimestampFormat(ns, this.settings);
84
- switch (format) {
85
- case 5:
86
- return parseRfc3339DateTimeWithOffset(value);
87
- case 6:
88
- return parseRfc7231DateTime(value);
89
- case 7:
90
- return parseEpochTimestamp(value);
91
- default:
92
- console.warn("Missing timestamp format, parsing value with Date constructor:", value);
93
- return new Date(value);
94
- }
95
- }
96
- if (ns.isBigIntegerSchema() && (typeof value === "number" || typeof value === "string")) {
97
- return BigInt(value);
98
- }
99
- if (ns.isBigDecimalSchema() && value != undefined) {
100
- if (value instanceof NumericValue) {
101
- return value;
102
- }
103
- const untyped = value;
104
- if (untyped.type === "bigDecimal" && "string" in untyped) {
105
- return new NumericValue(untyped.string, untyped.type);
106
- }
107
- return new NumericValue(String(value), "bigDecimal");
108
- }
109
- if (ns.isNumericSchema() && typeof value === "string") {
110
- switch (value) {
111
- case "Infinity":
112
- return Infinity;
113
- case "-Infinity":
114
- return -Infinity;
115
- case "NaN":
116
- return NaN;
117
- }
118
- return value;
119
- }
120
- if (ns.isDocumentSchema()) {
121
- if (isObject) {
122
- if (Array.isArray(value)) {
123
- for (let i = 0; i < value.length; ++i) {
124
- const v = value[i];
125
- if (!(v instanceof NumericValue)) {
126
- value[i] = this._read(ns, v);
127
- }
128
- }
129
- }
130
- else {
131
- const doc = value;
132
- for (const k in doc) {
133
- if (k === "__proto__") {
134
- writeKey(doc);
135
- }
136
- const v = doc[k];
137
- if (!(v instanceof NumericValue)) {
138
- doc[k] = this._read(ns, v);
139
- }
140
- }
141
- }
142
- }
143
- }
144
- return value;
145
- }
146
- _readStruct(ns, record) {
147
- const union = ns.isUnionSchema();
148
- const out = {};
149
- let nameMap;
150
- const hasType = typeof record.__type === "string";
151
- const { jsonName } = this.settings;
152
- if (jsonName && hasType) {
153
- nameMap = {};
154
- }
155
- let unionSerde;
156
- if (union) {
157
- unionSerde = new UnionSerde(record, out);
158
- }
159
- for (const [memberName, memberSchema] of ns.structIterator()) {
160
- let fromKey = memberName;
161
- if (jsonName) {
162
- fromKey = memberSchema.getMergedTraits().jsonName ?? fromKey;
163
- if (hasType) {
164
- nameMap[fromKey] = memberName;
165
- }
166
- }
167
- if (union) {
168
- unionSerde.mark(fromKey);
169
- }
170
- if (record[fromKey] != null) {
171
- out[memberName] = this._read(memberSchema, record[fromKey]);
172
- }
173
- }
174
- if (union) {
175
- unionSerde.writeUnknown();
176
- }
177
- else if (hasType) {
178
- for (const k in record) {
179
- const v = record[k];
180
- const t = jsonName ? (nameMap[k] ?? k) : k;
181
- if (!(t in out)) {
182
- out[t] = v;
183
- }
184
- }
185
- }
186
- return out;
187
- }
188
- needsTransform(ns) {
189
- if (ns.isBlobSchema() || ns.isTimestampSchema() || ns.isBigIntegerSchema() || ns.isBigDecimalSchema()) {
190
- return true;
191
- }
192
- if (ns.isDocumentSchema() || ns.isStructSchema() || ns.isListSchema() || ns.isMapSchema()) {
193
- return true;
194
- }
195
- if (ns.isStringSchema() && ns.getMergedTraits().mediaType) {
196
- return true;
197
- }
198
- return false;
199
- }
200
- }