monorise 1.1.0-dev.2 → 1.1.0-dev.4

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 (78) hide show
  1. package/dist/base/index.d.ts +53 -1
  2. package/dist/base/index.js +49 -1
  3. package/dist/base/index.js.map +1 -1
  4. package/dist/cli/cli.js +2 -2
  5. package/dist/core/index.d.ts +3 -53
  6. package/dist/core/index.js +1 -1
  7. package/dist/core/index.js.map +1 -1
  8. package/dist/react/{chunk-DTRWUIDH.js → chunk-BIXAYYE4.js} +35 -5
  9. package/dist/react/{chunk-DTRWUIDH.js.map → chunk-BIXAYYE4.js.map} +1 -1
  10. package/dist/react/index.d.ts +1 -1
  11. package/dist/react/index.js +143 -10403
  12. package/dist/react/index.js.map +1 -1
  13. package/dist/react/websocket-7MZ3ENOC.js +9 -0
  14. package/package.json +2 -2
  15. package/dist/react/chunk-2QOYO3GF.js +0 -182
  16. package/dist/react/chunk-2QOYO3GF.js.map +0 -1
  17. package/dist/react/chunk-4WSYM746.js +0 -383
  18. package/dist/react/chunk-4WSYM746.js.map +0 -1
  19. package/dist/react/chunk-5XIRNUBL.js +0 -43
  20. package/dist/react/chunk-5XIRNUBL.js.map +0 -1
  21. package/dist/react/chunk-7JDOKZGQ.js +0 -172
  22. package/dist/react/chunk-7JDOKZGQ.js.map +0 -1
  23. package/dist/react/chunk-A5TI2FW3.js +0 -13
  24. package/dist/react/chunk-A5TI2FW3.js.map +0 -1
  25. package/dist/react/chunk-BJXCFDMF.js +0 -15
  26. package/dist/react/chunk-BJXCFDMF.js.map +0 -1
  27. package/dist/react/chunk-BUTF5RJU.js +0 -29
  28. package/dist/react/chunk-BUTF5RJU.js.map +0 -1
  29. package/dist/react/chunk-GFVCNWVT.js +0 -54
  30. package/dist/react/chunk-GFVCNWVT.js.map +0 -1
  31. package/dist/react/chunk-JT5EZZSL.js +0 -489
  32. package/dist/react/chunk-JT5EZZSL.js.map +0 -1
  33. package/dist/react/chunk-KJX5LOMN.js +0 -43
  34. package/dist/react/chunk-KJX5LOMN.js.map +0 -1
  35. package/dist/react/chunk-KLXK4V6G.js +0 -65
  36. package/dist/react/chunk-KLXK4V6G.js.map +0 -1
  37. package/dist/react/chunk-LJLMKEKI.js +0 -245
  38. package/dist/react/chunk-LJLMKEKI.js.map +0 -1
  39. package/dist/react/chunk-MIXAYX55.js +0 -147
  40. package/dist/react/chunk-RPNCWADG.js +0 -248
  41. package/dist/react/chunk-RPNCWADG.js.map +0 -1
  42. package/dist/react/chunk-S6RDMHHH.js +0 -47
  43. package/dist/react/chunk-S6RDMHHH.js.map +0 -1
  44. package/dist/react/chunk-U6RIOMF4.js +0 -893
  45. package/dist/react/chunk-U6RIOMF4.js.map +0 -1
  46. package/dist/react/chunk-WCRLJFBW.js +0 -5568
  47. package/dist/react/chunk-WCRLJFBW.js.map +0 -1
  48. package/dist/react/chunk-YF6S7S36.js +0 -588
  49. package/dist/react/chunk-YF6S7S36.js.map +0 -1
  50. package/dist/react/dist-es-5WYA7CWK.js +0 -379
  51. package/dist/react/dist-es-5WYA7CWK.js.map +0 -1
  52. package/dist/react/dist-es-CR5AOOCO.js +0 -333
  53. package/dist/react/dist-es-CR5AOOCO.js.map +0 -1
  54. package/dist/react/dist-es-KZ3GLAJI.js +0 -494
  55. package/dist/react/dist-es-KZ3GLAJI.js.map +0 -1
  56. package/dist/react/dist-es-R4TRTT45.js +0 -22
  57. package/dist/react/dist-es-R4TRTT45.js.map +0 -1
  58. package/dist/react/dist-es-SKDPAJEW.js +0 -169
  59. package/dist/react/dist-es-SKDPAJEW.js.map +0 -1
  60. package/dist/react/dist-es-TOHBZNTZ.js +0 -71
  61. package/dist/react/dist-es-TOHBZNTZ.js.map +0 -1
  62. package/dist/react/dist-es-XNAC47MK.js +0 -90
  63. package/dist/react/dist-es-XNAC47MK.js.map +0 -1
  64. package/dist/react/event-streams-WAZW4P3K.js +0 -277
  65. package/dist/react/event-streams-WAZW4P3K.js.map +0 -1
  66. package/dist/react/loadSso-KXVD6CBM.js +0 -556
  67. package/dist/react/loadSso-KXVD6CBM.js.map +0 -1
  68. package/dist/react/service.config-I7RKP6FE.js +0 -14
  69. package/dist/react/service.config-I7RKP6FE.js.map +0 -1
  70. package/dist/react/signin-SEY3FDQ5.js +0 -653
  71. package/dist/react/signin-SEY3FDQ5.js.map +0 -1
  72. package/dist/react/sso-oidc-REODVHH5.js +0 -786
  73. package/dist/react/sso-oidc-REODVHH5.js.map +0 -1
  74. package/dist/react/sts-I3M4QP37.js +0 -3948
  75. package/dist/react/sts-I3M4QP37.js.map +0 -1
  76. package/dist/react/websocket-OSLLJSNO.js +0 -10
  77. package/dist/react/websocket-OSLLJSNO.js.map +0 -1
  78. /package/dist/react/{chunk-MIXAYX55.js.map → websocket-7MZ3ENOC.js.map} +0 -0
@@ -1,489 +0,0 @@
1
- import {
2
- LazyJsonString,
3
- NormalizedSchema,
4
- NumericValue,
5
- SerdeContextConfig,
6
- UnionSerde,
7
- collectBody,
8
- determineTimestampFormat,
9
- v4
10
- } from "./chunk-WCRLJFBW.js";
11
- import {
12
- dateToUtcString,
13
- fromBase64,
14
- parseEpochTimestamp,
15
- parseRfc3339DateTimeWithOffset,
16
- parseRfc7231DateTime,
17
- toBase64
18
- } from "./chunk-U6RIOMF4.js";
19
- import {
20
- toUtf8
21
- } from "./chunk-KJX5LOMN.js";
22
- import {
23
- __publicField
24
- } from "./chunk-MIXAYX55.js";
25
-
26
- // ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/common.js
27
- var collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => {
28
- var _a;
29
- return ((_a = context == null ? void 0 : context.utf8Encoder) != null ? _a : toUtf8)(body);
30
- });
31
-
32
- // ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/parseJsonBody.js
33
- var parseJsonBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
34
- if (encoded.length) {
35
- try {
36
- return JSON.parse(encoded);
37
- } catch (e) {
38
- if ((e == null ? void 0 : e.name) === "SyntaxError") {
39
- Object.defineProperty(e, "$responseBodyText", {
40
- value: encoded
41
- });
42
- }
43
- throw e;
44
- }
45
- }
46
- return {};
47
- });
48
- var findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
49
- var sanitizeErrorCode = (rawValue) => {
50
- let cleanValue = rawValue;
51
- if (typeof cleanValue === "number") {
52
- cleanValue = cleanValue.toString();
53
- }
54
- if (cleanValue.indexOf(",") >= 0) {
55
- cleanValue = cleanValue.split(",")[0];
56
- }
57
- if (cleanValue.indexOf(":") >= 0) {
58
- cleanValue = cleanValue.split(":")[0];
59
- }
60
- if (cleanValue.indexOf("#") >= 0) {
61
- cleanValue = cleanValue.split("#")[1];
62
- }
63
- return cleanValue;
64
- };
65
- var loadRestJsonErrorCode = (output, data) => {
66
- const headerKey = findKey(output.headers, "x-amzn-errortype");
67
- if (headerKey !== void 0) {
68
- return sanitizeErrorCode(output.headers[headerKey]);
69
- }
70
- if (data && typeof data === "object") {
71
- const codeKey = findKey(data, "code");
72
- if (codeKey && data[codeKey] !== void 0) {
73
- return sanitizeErrorCode(data[codeKey]);
74
- }
75
- if (data["__type"] !== void 0) {
76
- return sanitizeErrorCode(data["__type"]);
77
- }
78
- }
79
- };
80
-
81
- // ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/jsonReviver.js
82
- function jsonReviver(key, value, context) {
83
- if (context == null ? void 0 : context.source) {
84
- const numericString = context.source;
85
- if (typeof value === "number") {
86
- if (value > Number.MAX_SAFE_INTEGER || value < Number.MIN_SAFE_INTEGER || numericString !== String(value)) {
87
- const isFractional = numericString.includes(".");
88
- if (isFractional) {
89
- return new NumericValue(numericString, "bigDecimal");
90
- } else {
91
- return BigInt(numericString);
92
- }
93
- }
94
- }
95
- }
96
- return value;
97
- }
98
-
99
- // ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeDeserializer.js
100
- var JsonShapeDeserializer = class extends SerdeContextConfig {
101
- constructor(settings) {
102
- super();
103
- __publicField(this, "settings");
104
- this.settings = settings;
105
- }
106
- async read(schema, data) {
107
- return this._read(schema, typeof data === "string" ? JSON.parse(data, jsonReviver) : await parseJsonBody(data, this.serdeContext));
108
- }
109
- readObject(schema, data) {
110
- return this._read(schema, data);
111
- }
112
- _read(schema, value) {
113
- var _a, _b;
114
- const isObject = value !== null && typeof value === "object";
115
- const ns = NormalizedSchema.of(schema);
116
- if (isObject) {
117
- if (ns.isStructSchema()) {
118
- const record = value;
119
- const union = ns.isUnionSchema();
120
- const out = {};
121
- let nameMap = void 0;
122
- const { jsonName } = this.settings;
123
- if (jsonName) {
124
- nameMap = {};
125
- }
126
- let unionSerde;
127
- if (union) {
128
- unionSerde = new UnionSerde(record, out);
129
- }
130
- for (const [memberName, memberSchema] of ns.structIterator()) {
131
- let fromKey = memberName;
132
- if (jsonName) {
133
- fromKey = (_a = memberSchema.getMergedTraits().jsonName) != null ? _a : fromKey;
134
- nameMap[fromKey] = memberName;
135
- }
136
- if (union) {
137
- unionSerde.mark(fromKey);
138
- }
139
- if (record[fromKey] != null) {
140
- out[memberName] = this._read(memberSchema, record[fromKey]);
141
- }
142
- }
143
- if (union) {
144
- unionSerde.writeUnknown();
145
- } else if (typeof record.__type === "string") {
146
- for (const k in record) {
147
- const v = record[k];
148
- const t = jsonName ? (_b = nameMap[k]) != null ? _b : k : k;
149
- if (!(t in out)) {
150
- out[t] = v;
151
- }
152
- }
153
- }
154
- return out;
155
- }
156
- if (Array.isArray(value) && ns.isListSchema()) {
157
- const listMember = ns.getValueSchema();
158
- const out = [];
159
- for (const item of value) {
160
- out.push(this._read(listMember, item));
161
- }
162
- return out;
163
- }
164
- if (ns.isMapSchema()) {
165
- const mapMember = ns.getValueSchema();
166
- const out = {};
167
- for (const _k in value) {
168
- out[_k] = this._read(mapMember, value[_k]);
169
- }
170
- return out;
171
- }
172
- }
173
- if (ns.isBlobSchema() && typeof value === "string") {
174
- return fromBase64(value);
175
- }
176
- const mediaType = ns.getMergedTraits().mediaType;
177
- if (ns.isStringSchema() && typeof value === "string" && mediaType) {
178
- const isJson = mediaType === "application/json" || mediaType.endsWith("+json");
179
- if (isJson) {
180
- return LazyJsonString.from(value);
181
- }
182
- return value;
183
- }
184
- if (ns.isTimestampSchema() && value != null) {
185
- const format = determineTimestampFormat(ns, this.settings);
186
- switch (format) {
187
- case 5:
188
- return parseRfc3339DateTimeWithOffset(value);
189
- case 6:
190
- return parseRfc7231DateTime(value);
191
- case 7:
192
- return parseEpochTimestamp(value);
193
- default:
194
- console.warn("Missing timestamp format, parsing value with Date constructor:", value);
195
- return new Date(value);
196
- }
197
- }
198
- if (ns.isBigIntegerSchema() && (typeof value === "number" || typeof value === "string")) {
199
- return BigInt(value);
200
- }
201
- if (ns.isBigDecimalSchema() && value != void 0) {
202
- if (value instanceof NumericValue) {
203
- return value;
204
- }
205
- const untyped = value;
206
- if (untyped.type === "bigDecimal" && "string" in untyped) {
207
- return new NumericValue(untyped.string, untyped.type);
208
- }
209
- return new NumericValue(String(value), "bigDecimal");
210
- }
211
- if (ns.isNumericSchema() && typeof value === "string") {
212
- switch (value) {
213
- case "Infinity":
214
- return Infinity;
215
- case "-Infinity":
216
- return -Infinity;
217
- case "NaN":
218
- return NaN;
219
- }
220
- return value;
221
- }
222
- if (ns.isDocumentSchema()) {
223
- if (isObject) {
224
- const out = Array.isArray(value) ? [] : {};
225
- for (const k in value) {
226
- const v = value[k];
227
- if (v instanceof NumericValue) {
228
- out[k] = v;
229
- } else {
230
- out[k] = this._read(ns, v);
231
- }
232
- }
233
- return out;
234
- } else {
235
- return structuredClone(value);
236
- }
237
- }
238
- return value;
239
- }
240
- };
241
-
242
- // ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/jsonReplacer.js
243
- var NUMERIC_CONTROL_CHAR = String.fromCharCode(925);
244
- var JsonReplacer = class {
245
- constructor() {
246
- __publicField(this, "values", /* @__PURE__ */ new Map());
247
- __publicField(this, "counter", 0);
248
- __publicField(this, "stage", 0);
249
- }
250
- createReplacer() {
251
- if (this.stage === 1) {
252
- throw new Error("@aws-sdk/core/protocols - JsonReplacer already created.");
253
- }
254
- if (this.stage === 2) {
255
- throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted.");
256
- }
257
- this.stage = 1;
258
- return (key, value) => {
259
- if (value instanceof NumericValue) {
260
- const v = `${NUMERIC_CONTROL_CHAR + "nv" + this.counter++}_` + value.string;
261
- this.values.set(`"${v}"`, value.string);
262
- return v;
263
- }
264
- if (typeof value === "bigint") {
265
- const s = value.toString();
266
- const v = `${NUMERIC_CONTROL_CHAR + "b" + this.counter++}_` + s;
267
- this.values.set(`"${v}"`, s);
268
- return v;
269
- }
270
- return value;
271
- };
272
- }
273
- replaceInJson(json) {
274
- if (this.stage === 0) {
275
- throw new Error("@aws-sdk/core/protocols - JsonReplacer not created yet.");
276
- }
277
- if (this.stage === 2) {
278
- throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted.");
279
- }
280
- this.stage = 2;
281
- if (this.counter === 0) {
282
- return json;
283
- }
284
- for (const [key, value] of this.values) {
285
- json = json.replace(key, value);
286
- }
287
- return json;
288
- }
289
- };
290
-
291
- // ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeSerializer.js
292
- var JsonShapeSerializer = class extends SerdeContextConfig {
293
- constructor(settings) {
294
- super();
295
- __publicField(this, "settings");
296
- __publicField(this, "buffer");
297
- __publicField(this, "useReplacer", false);
298
- __publicField(this, "rootSchema");
299
- this.settings = settings;
300
- }
301
- write(schema, value) {
302
- this.rootSchema = NormalizedSchema.of(schema);
303
- this.buffer = this._write(this.rootSchema, value);
304
- }
305
- flush() {
306
- const { rootSchema, useReplacer } = this;
307
- this.rootSchema = void 0;
308
- this.useReplacer = false;
309
- if ((rootSchema == null ? void 0 : rootSchema.isStructSchema()) || (rootSchema == null ? void 0 : rootSchema.isDocumentSchema())) {
310
- if (!useReplacer) {
311
- return JSON.stringify(this.buffer);
312
- }
313
- const replacer = new JsonReplacer();
314
- return replacer.replaceInJson(JSON.stringify(this.buffer, replacer.createReplacer(), 0));
315
- }
316
- return this.buffer;
317
- }
318
- writeDiscriminatedDocument(schema, value) {
319
- this.write(schema, value);
320
- if (typeof this.buffer === "object") {
321
- this.buffer.__type = NormalizedSchema.of(schema).getName(true);
322
- }
323
- }
324
- _write(schema, value, container) {
325
- var _a, _b, _c, _d, _e, _f;
326
- const isObject = value !== null && typeof value === "object";
327
- const ns = NormalizedSchema.of(schema);
328
- if (isObject) {
329
- if (ns.isStructSchema()) {
330
- const record = value;
331
- const out = {};
332
- const { jsonName } = this.settings;
333
- let nameMap = void 0;
334
- if (jsonName) {
335
- nameMap = {};
336
- }
337
- let outCount = 0;
338
- for (const [memberName, memberSchema] of ns.structIterator()) {
339
- const serializableValue = this._write(memberSchema, record[memberName], ns);
340
- if (serializableValue !== void 0) {
341
- let targetKey = memberName;
342
- if (jsonName) {
343
- targetKey = (_a = memberSchema.getMergedTraits().jsonName) != null ? _a : memberName;
344
- nameMap[memberName] = targetKey;
345
- }
346
- out[targetKey] = serializableValue;
347
- outCount++;
348
- }
349
- }
350
- if (ns.isUnionSchema() && outCount === 0) {
351
- const { $unknown } = record;
352
- if (Array.isArray($unknown)) {
353
- const [k, v] = $unknown;
354
- out[k] = this._write(15, v);
355
- }
356
- } else if (typeof record.__type === "string") {
357
- for (const k in record) {
358
- const v = record[k];
359
- const targetKey = jsonName ? (_b = nameMap[k]) != null ? _b : k : k;
360
- if (!(targetKey in out)) {
361
- out[targetKey] = this._write(15, v);
362
- }
363
- }
364
- }
365
- return out;
366
- }
367
- if (Array.isArray(value) && ns.isListSchema()) {
368
- const listMember = ns.getValueSchema();
369
- const out = [];
370
- const sparse = !!ns.getMergedTraits().sparse;
371
- for (const item of value) {
372
- if (sparse || item != null) {
373
- out.push(this._write(listMember, item));
374
- }
375
- }
376
- return out;
377
- }
378
- if (ns.isMapSchema()) {
379
- const mapMember = ns.getValueSchema();
380
- const out = {};
381
- const sparse = !!ns.getMergedTraits().sparse;
382
- for (const _k in value) {
383
- const _v = value[_k];
384
- if (sparse || _v != null) {
385
- out[_k] = this._write(mapMember, _v);
386
- }
387
- }
388
- return out;
389
- }
390
- if (value instanceof Uint8Array && (ns.isBlobSchema() || ns.isDocumentSchema())) {
391
- if (ns === this.rootSchema) {
392
- return value;
393
- }
394
- return ((_d = (_c = this.serdeContext) == null ? void 0 : _c.base64Encoder) != null ? _d : toBase64)(value);
395
- }
396
- if (value instanceof Date && (ns.isTimestampSchema() || ns.isDocumentSchema())) {
397
- const format = determineTimestampFormat(ns, this.settings);
398
- switch (format) {
399
- case 5:
400
- return value.toISOString().replace(".000Z", "Z");
401
- case 6:
402
- return dateToUtcString(value);
403
- case 7:
404
- return value.getTime() / 1e3;
405
- default:
406
- console.warn("Missing timestamp format, using epoch seconds", value);
407
- return value.getTime() / 1e3;
408
- }
409
- }
410
- if (value instanceof NumericValue) {
411
- this.useReplacer = true;
412
- }
413
- }
414
- if (value === null && (container == null ? void 0 : container.isStructSchema())) {
415
- return void 0;
416
- }
417
- if (ns.isStringSchema()) {
418
- if (typeof value === "undefined" && ns.isIdempotencyToken()) {
419
- return v4();
420
- }
421
- const mediaType = ns.getMergedTraits().mediaType;
422
- if (value != null && mediaType) {
423
- const isJson = mediaType === "application/json" || mediaType.endsWith("+json");
424
- if (isJson) {
425
- return LazyJsonString.from(value);
426
- }
427
- }
428
- return value;
429
- }
430
- if (typeof value === "number" && ns.isNumericSchema()) {
431
- if (Math.abs(value) === Infinity || isNaN(value)) {
432
- return String(value);
433
- }
434
- return value;
435
- }
436
- if (typeof value === "string" && ns.isBlobSchema()) {
437
- if (ns === this.rootSchema) {
438
- return value;
439
- }
440
- return ((_f = (_e = this.serdeContext) == null ? void 0 : _e.base64Encoder) != null ? _f : toBase64)(value);
441
- }
442
- if (typeof value === "bigint") {
443
- this.useReplacer = true;
444
- }
445
- if (ns.isDocumentSchema()) {
446
- if (isObject) {
447
- const out = Array.isArray(value) ? [] : {};
448
- for (const k in value) {
449
- const v = value[k];
450
- if (v instanceof NumericValue) {
451
- this.useReplacer = true;
452
- out[k] = v;
453
- } else {
454
- out[k] = this._write(ns, v);
455
- }
456
- }
457
- return out;
458
- } else {
459
- return structuredClone(value);
460
- }
461
- }
462
- return value;
463
- }
464
- };
465
-
466
- // ../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonCodec.js
467
- var JsonCodec = class extends SerdeContextConfig {
468
- constructor(settings) {
469
- super();
470
- __publicField(this, "settings");
471
- this.settings = settings;
472
- }
473
- createSerializer() {
474
- const serializer = new JsonShapeSerializer(this.settings);
475
- serializer.setSerdeContext(this.serdeContext);
476
- return serializer;
477
- }
478
- createDeserializer() {
479
- const deserializer = new JsonShapeDeserializer(this.settings);
480
- deserializer.setSerdeContext(this.serdeContext);
481
- return deserializer;
482
- }
483
- };
484
-
485
- export {
486
- loadRestJsonErrorCode,
487
- JsonCodec
488
- };
489
- //# sourceMappingURL=chunk-JT5EZZSL.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/common.js","../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/parseJsonBody.js","../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/jsonReviver.js","../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeDeserializer.js","../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/jsonReplacer.js","../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeSerializer.js","../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonCodec.js"],"sourcesContent":["import { collectBody } from \"@smithy/smithy-client\";\nimport { toUtf8 } from \"@smithy/util-utf8\";\nexport const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => (context?.utf8Encoder ?? toUtf8)(body));\n","import { collectBodyString } from \"../common\";\nexport const parseJsonBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {\n if (encoded.length) {\n try {\n return JSON.parse(encoded);\n }\n catch (e) {\n if (e?.name === \"SyntaxError\") {\n Object.defineProperty(e, \"$responseBodyText\", {\n value: encoded,\n });\n }\n throw e;\n }\n }\n return {};\n});\nexport const parseJsonErrorBody = async (errorBody, context) => {\n const value = await parseJsonBody(errorBody, context);\n value.message = value.message ?? value.Message;\n return value;\n};\nconst findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());\nconst sanitizeErrorCode = (rawValue) => {\n let cleanValue = rawValue;\n if (typeof cleanValue === \"number\") {\n cleanValue = cleanValue.toString();\n }\n if (cleanValue.indexOf(\",\") >= 0) {\n cleanValue = cleanValue.split(\",\")[0];\n }\n if (cleanValue.indexOf(\":\") >= 0) {\n cleanValue = cleanValue.split(\":\")[0];\n }\n if (cleanValue.indexOf(\"#\") >= 0) {\n cleanValue = cleanValue.split(\"#\")[1];\n }\n return cleanValue;\n};\nexport const loadRestJsonErrorCode = (output, data) => {\n const headerKey = findKey(output.headers, \"x-amzn-errortype\");\n if (headerKey !== undefined) {\n return sanitizeErrorCode(output.headers[headerKey]);\n }\n if (data && typeof data === \"object\") {\n const codeKey = findKey(data, \"code\");\n if (codeKey && data[codeKey] !== undefined) {\n return sanitizeErrorCode(data[codeKey]);\n }\n if (data[\"__type\"] !== undefined) {\n return sanitizeErrorCode(data[\"__type\"]);\n }\n }\n};\n","import { NumericValue } from \"@smithy/core/serde\";\nexport function jsonReviver(key, value, context) {\n if (context?.source) {\n const numericString = context.source;\n if (typeof value === \"number\") {\n if (value > Number.MAX_SAFE_INTEGER || value < Number.MIN_SAFE_INTEGER || numericString !== String(value)) {\n const isFractional = numericString.includes(\".\");\n if (isFractional) {\n return new NumericValue(numericString, \"bigDecimal\");\n }\n else {\n return BigInt(numericString);\n }\n }\n }\n }\n return value;\n}\n","import { determineTimestampFormat } from \"@smithy/core/protocols\";\nimport { NormalizedSchema } from \"@smithy/core/schema\";\nimport { LazyJsonString, NumericValue, parseEpochTimestamp, parseRfc3339DateTimeWithOffset, parseRfc7231DateTime, } from \"@smithy/core/serde\";\nimport { fromBase64 } from \"@smithy/util-base64\";\nimport { SerdeContextConfig } from \"../ConfigurableSerdeContext\";\nimport { UnionSerde } from \"../UnionSerde\";\nimport { jsonReviver } from \"./jsonReviver\";\nimport { parseJsonBody } from \"./parseJsonBody\";\nexport class JsonShapeDeserializer extends SerdeContextConfig {\n settings;\n constructor(settings) {\n super();\n this.settings = settings;\n }\n async read(schema, data) {\n return this._read(schema, typeof data === \"string\" ? JSON.parse(data, jsonReviver) : await parseJsonBody(data, this.serdeContext));\n }\n readObject(schema, data) {\n return this._read(schema, data);\n }\n _read(schema, value) {\n const isObject = value !== null && typeof value === \"object\";\n const ns = NormalizedSchema.of(schema);\n if (isObject) {\n if (ns.isStructSchema()) {\n const record = value;\n const union = ns.isUnionSchema();\n const out = {};\n let nameMap = void 0;\n const { jsonName } = this.settings;\n if (jsonName) {\n nameMap = {};\n }\n let unionSerde;\n if (union) {\n unionSerde = new UnionSerde(record, out);\n }\n for (const [memberName, memberSchema] of ns.structIterator()) {\n let fromKey = memberName;\n if (jsonName) {\n fromKey = memberSchema.getMergedTraits().jsonName ?? fromKey;\n nameMap[fromKey] = memberName;\n }\n if (union) {\n unionSerde.mark(fromKey);\n }\n if (record[fromKey] != null) {\n out[memberName] = this._read(memberSchema, record[fromKey]);\n }\n }\n if (union) {\n unionSerde.writeUnknown();\n }\n else if (typeof record.__type === \"string\") {\n for (const k in record) {\n const v = record[k];\n const t = jsonName ? nameMap[k] ?? k : k;\n if (!(t in out)) {\n out[t] = v;\n }\n }\n }\n return out;\n }\n if (Array.isArray(value) && ns.isListSchema()) {\n const listMember = ns.getValueSchema();\n const out = [];\n for (const item of value) {\n out.push(this._read(listMember, item));\n }\n return out;\n }\n if (ns.isMapSchema()) {\n const mapMember = ns.getValueSchema();\n const out = {};\n for (const _k in value) {\n out[_k] = this._read(mapMember, value[_k]);\n }\n return out;\n }\n }\n if (ns.isBlobSchema() && typeof value === \"string\") {\n return fromBase64(value);\n }\n const mediaType = ns.getMergedTraits().mediaType;\n if (ns.isStringSchema() && typeof value === \"string\" && mediaType) {\n const isJson = mediaType === \"application/json\" || mediaType.endsWith(\"+json\");\n if (isJson) {\n return LazyJsonString.from(value);\n }\n return value;\n }\n if (ns.isTimestampSchema() && value != null) {\n const format = determineTimestampFormat(ns, this.settings);\n switch (format) {\n case 5:\n return parseRfc3339DateTimeWithOffset(value);\n case 6:\n return parseRfc7231DateTime(value);\n case 7:\n return parseEpochTimestamp(value);\n default:\n console.warn(\"Missing timestamp format, parsing value with Date constructor:\", value);\n return new Date(value);\n }\n }\n if (ns.isBigIntegerSchema() && (typeof value === \"number\" || typeof value === \"string\")) {\n return BigInt(value);\n }\n if (ns.isBigDecimalSchema() && value != undefined) {\n if (value instanceof NumericValue) {\n return value;\n }\n const untyped = value;\n if (untyped.type === \"bigDecimal\" && \"string\" in untyped) {\n return new NumericValue(untyped.string, untyped.type);\n }\n return new NumericValue(String(value), \"bigDecimal\");\n }\n if (ns.isNumericSchema() && typeof value === \"string\") {\n switch (value) {\n case \"Infinity\":\n return Infinity;\n case \"-Infinity\":\n return -Infinity;\n case \"NaN\":\n return NaN;\n }\n return value;\n }\n if (ns.isDocumentSchema()) {\n if (isObject) {\n const out = Array.isArray(value) ? [] : {};\n for (const k in value) {\n const v = value[k];\n if (v instanceof NumericValue) {\n out[k] = v;\n }\n else {\n out[k] = this._read(ns, v);\n }\n }\n return out;\n }\n else {\n return structuredClone(value);\n }\n }\n return value;\n }\n}\n","import { NumericValue } from \"@smithy/core/serde\";\nconst NUMERIC_CONTROL_CHAR = String.fromCharCode(925);\nexport class JsonReplacer {\n values = new Map();\n counter = 0;\n stage = 0;\n createReplacer() {\n if (this.stage === 1) {\n throw new Error(\"@aws-sdk/core/protocols - JsonReplacer already created.\");\n }\n if (this.stage === 2) {\n throw new Error(\"@aws-sdk/core/protocols - JsonReplacer exhausted.\");\n }\n this.stage = 1;\n return (key, value) => {\n if (value instanceof NumericValue) {\n const v = `${NUMERIC_CONTROL_CHAR + \"nv\" + this.counter++}_` + value.string;\n this.values.set(`\"${v}\"`, value.string);\n return v;\n }\n if (typeof value === \"bigint\") {\n const s = value.toString();\n const v = `${NUMERIC_CONTROL_CHAR + \"b\" + this.counter++}_` + s;\n this.values.set(`\"${v}\"`, s);\n return v;\n }\n return value;\n };\n }\n replaceInJson(json) {\n if (this.stage === 0) {\n throw new Error(\"@aws-sdk/core/protocols - JsonReplacer not created yet.\");\n }\n if (this.stage === 2) {\n throw new Error(\"@aws-sdk/core/protocols - JsonReplacer exhausted.\");\n }\n this.stage = 2;\n if (this.counter === 0) {\n return json;\n }\n for (const [key, value] of this.values) {\n json = json.replace(key, value);\n }\n return json;\n }\n}\n","import { determineTimestampFormat } from \"@smithy/core/protocols\";\nimport { NormalizedSchema } from \"@smithy/core/schema\";\nimport { dateToUtcString, generateIdempotencyToken, LazyJsonString, NumericValue } from \"@smithy/core/serde\";\nimport { toBase64 } from \"@smithy/util-base64\";\nimport { SerdeContextConfig } from \"../ConfigurableSerdeContext\";\nimport { JsonReplacer } from \"./jsonReplacer\";\nexport class JsonShapeSerializer extends SerdeContextConfig {\n settings;\n buffer;\n useReplacer = false;\n rootSchema;\n constructor(settings) {\n super();\n this.settings = settings;\n }\n write(schema, value) {\n this.rootSchema = NormalizedSchema.of(schema);\n this.buffer = this._write(this.rootSchema, value);\n }\n flush() {\n const { rootSchema, useReplacer } = this;\n this.rootSchema = undefined;\n this.useReplacer = false;\n if (rootSchema?.isStructSchema() || rootSchema?.isDocumentSchema()) {\n if (!useReplacer) {\n return JSON.stringify(this.buffer);\n }\n const replacer = new JsonReplacer();\n return replacer.replaceInJson(JSON.stringify(this.buffer, replacer.createReplacer(), 0));\n }\n return this.buffer;\n }\n writeDiscriminatedDocument(schema, value) {\n this.write(schema, value);\n if (typeof this.buffer === \"object\") {\n this.buffer.__type = NormalizedSchema.of(schema).getName(true);\n }\n }\n _write(schema, value, container) {\n const isObject = value !== null && typeof value === \"object\";\n const ns = NormalizedSchema.of(schema);\n if (isObject) {\n if (ns.isStructSchema()) {\n const record = value;\n const out = {};\n const { jsonName } = this.settings;\n let nameMap = void 0;\n if (jsonName) {\n nameMap = {};\n }\n let outCount = 0;\n for (const [memberName, memberSchema] of ns.structIterator()) {\n const serializableValue = this._write(memberSchema, record[memberName], ns);\n if (serializableValue !== undefined) {\n let targetKey = memberName;\n if (jsonName) {\n targetKey = memberSchema.getMergedTraits().jsonName ?? memberName;\n nameMap[memberName] = targetKey;\n }\n out[targetKey] = serializableValue;\n outCount++;\n }\n }\n if (ns.isUnionSchema() && outCount === 0) {\n const { $unknown } = record;\n if (Array.isArray($unknown)) {\n const [k, v] = $unknown;\n out[k] = this._write(15, v);\n }\n }\n else if (typeof record.__type === \"string\") {\n for (const k in record) {\n const v = record[k];\n const targetKey = jsonName ? nameMap[k] ?? k : k;\n if (!(targetKey in out)) {\n out[targetKey] = this._write(15, v);\n }\n }\n }\n return out;\n }\n if (Array.isArray(value) && ns.isListSchema()) {\n const listMember = ns.getValueSchema();\n const out = [];\n const sparse = !!ns.getMergedTraits().sparse;\n for (const item of value) {\n if (sparse || item != null) {\n out.push(this._write(listMember, item));\n }\n }\n return out;\n }\n if (ns.isMapSchema()) {\n const mapMember = ns.getValueSchema();\n const out = {};\n const sparse = !!ns.getMergedTraits().sparse;\n for (const _k in value) {\n const _v = value[_k];\n if (sparse || _v != null) {\n out[_k] = this._write(mapMember, _v);\n }\n }\n return out;\n }\n if (value instanceof Uint8Array && (ns.isBlobSchema() || ns.isDocumentSchema())) {\n if (ns === this.rootSchema) {\n return value;\n }\n return (this.serdeContext?.base64Encoder ?? toBase64)(value);\n }\n if (value instanceof Date && (ns.isTimestampSchema() || ns.isDocumentSchema())) {\n const format = determineTimestampFormat(ns, this.settings);\n switch (format) {\n case 5:\n return value.toISOString().replace(\".000Z\", \"Z\");\n case 6:\n return dateToUtcString(value);\n case 7:\n return value.getTime() / 1000;\n default:\n console.warn(\"Missing timestamp format, using epoch seconds\", value);\n return value.getTime() / 1000;\n }\n }\n if (value instanceof NumericValue) {\n this.useReplacer = true;\n }\n }\n if (value === null && container?.isStructSchema()) {\n return void 0;\n }\n if (ns.isStringSchema()) {\n if (typeof value === \"undefined\" && ns.isIdempotencyToken()) {\n return generateIdempotencyToken();\n }\n const mediaType = ns.getMergedTraits().mediaType;\n if (value != null && mediaType) {\n const isJson = mediaType === \"application/json\" || mediaType.endsWith(\"+json\");\n if (isJson) {\n return LazyJsonString.from(value);\n }\n }\n return value;\n }\n if (typeof value === \"number\" && ns.isNumericSchema()) {\n if (Math.abs(value) === Infinity || isNaN(value)) {\n return String(value);\n }\n return value;\n }\n if (typeof value === \"string\" && ns.isBlobSchema()) {\n if (ns === this.rootSchema) {\n return value;\n }\n return (this.serdeContext?.base64Encoder ?? toBase64)(value);\n }\n if (typeof value === \"bigint\") {\n this.useReplacer = true;\n }\n if (ns.isDocumentSchema()) {\n if (isObject) {\n const out = Array.isArray(value) ? [] : {};\n for (const k in value) {\n const v = value[k];\n if (v instanceof NumericValue) {\n this.useReplacer = true;\n out[k] = v;\n }\n else {\n out[k] = this._write(ns, v);\n }\n }\n return out;\n }\n else {\n return structuredClone(value);\n }\n }\n return value;\n }\n}\n","import { SerdeContextConfig } from \"../ConfigurableSerdeContext\";\nimport { JsonShapeDeserializer } from \"./JsonShapeDeserializer\";\nimport { JsonShapeSerializer } from \"./JsonShapeSerializer\";\nexport class JsonCodec extends SerdeContextConfig {\n settings;\n constructor(settings) {\n super();\n this.settings = settings;\n }\n createSerializer() {\n const serializer = new JsonShapeSerializer(this.settings);\n serializer.setSerdeContext(this.serdeContext);\n return serializer;\n }\n createDeserializer() {\n const deserializer = new JsonShapeDeserializer(this.settings);\n deserializer.setSerdeContext(this.serdeContext);\n return deserializer;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAEO,IAAM,oBAAoB,CA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mB;AACf,UAAM,aAAa,IAAI,oBAAoB,KAAK,QAAQ;AACxD,eAAW,gBAAgB,KAAK,YAAY;AAC5C,WAAO;AAAA,EACX;AAAA,EACA,qBAAqB;AACjB,UAAM,eAAe,IAAI,sBAAsB,KAAK,QAAQ;AAC5D,iBAAa,gBAAgB,KAAK,YAAY;AAC9C,WAAO;AAAA,EACX;AACJ;","names":[]}
@@ -1,43 +0,0 @@
1
- // ../../node_modules/@smithy/is-array-buffer/dist-es/index.js
2
- var isArrayBuffer = (arg) => typeof ArrayBuffer === "function" && arg instanceof ArrayBuffer || Object.prototype.toString.call(arg) === "[object ArrayBuffer]";
3
-
4
- // ../../node_modules/@smithy/util-buffer-from/dist-es/index.js
5
- import { Buffer } from "buffer";
6
- var fromArrayBuffer = (input, offset = 0, length = input.byteLength - offset) => {
7
- if (!isArrayBuffer(input)) {
8
- throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof input} (${input})`);
9
- }
10
- return Buffer.from(input, offset, length);
11
- };
12
- var fromString = (input, encoding) => {
13
- if (typeof input !== "string") {
14
- throw new TypeError(`The "input" argument must be of type string. Received type ${typeof input} (${input})`);
15
- }
16
- return encoding ? Buffer.from(input, encoding) : Buffer.from(input);
17
- };
18
-
19
- // ../../node_modules/@smithy/util-utf8/dist-es/fromUtf8.js
20
- var fromUtf8 = (input) => {
21
- const buf = fromString(input, "utf8");
22
- return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength / Uint8Array.BYTES_PER_ELEMENT);
23
- };
24
-
25
- // ../../node_modules/@smithy/util-utf8/dist-es/toUtf8.js
26
- var toUtf8 = (input) => {
27
- if (typeof input === "string") {
28
- return input;
29
- }
30
- if (typeof input !== "object" || typeof input.byteOffset !== "number" || typeof input.byteLength !== "number") {
31
- throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");
32
- }
33
- return fromArrayBuffer(input.buffer, input.byteOffset, input.byteLength).toString("utf8");
34
- };
35
-
36
- export {
37
- isArrayBuffer,
38
- fromArrayBuffer,
39
- fromString,
40
- fromUtf8,
41
- toUtf8
42
- };
43
- //# sourceMappingURL=chunk-KJX5LOMN.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../node_modules/@smithy/is-array-buffer/dist-es/index.js","../../../node_modules/@smithy/util-buffer-from/dist-es/index.js","../../../node_modules/@smithy/util-utf8/dist-es/fromUtf8.js","../../../node_modules/@smithy/util-utf8/dist-es/toUtf8.js"],"sourcesContent":["export const isArrayBuffer = (arg) => (typeof ArrayBuffer === \"function\" && arg instanceof ArrayBuffer) ||\n Object.prototype.toString.call(arg) === \"[object ArrayBuffer]\";\n","import { isArrayBuffer } from \"@smithy/is-array-buffer\";\nimport { Buffer } from \"buffer\";\nexport const fromArrayBuffer = (input, offset = 0, length = input.byteLength - offset) => {\n if (!isArrayBuffer(input)) {\n throw new TypeError(`The \"input\" argument must be ArrayBuffer. Received type ${typeof input} (${input})`);\n }\n return Buffer.from(input, offset, length);\n};\nexport const fromString = (input, encoding) => {\n if (typeof input !== \"string\") {\n throw new TypeError(`The \"input\" argument must be of type string. Received type ${typeof input} (${input})`);\n }\n return encoding ? Buffer.from(input, encoding) : Buffer.from(input);\n};\n","import { fromString } from \"@smithy/util-buffer-from\";\nexport const fromUtf8 = (input) => {\n const buf = fromString(input, \"utf8\");\n return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength / Uint8Array.BYTES_PER_ELEMENT);\n};\n","import { fromArrayBuffer } from \"@smithy/util-buffer-from\";\nexport const toUtf8 = (input) => {\n if (typeof input === \"string\") {\n return input;\n }\n if (typeof input !== \"object\" || typeof input.byteOffset !== \"number\" || typeof input.byteLength !== \"number\") {\n throw new Error(\"@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.\");\n }\n return fromArrayBuffer(input.buffer, input.byteOffset, input.byteLength).toString(\"utf8\");\n};\n"],"mappings":";AAAO,IAAM,gBAAgB,CAAC,QAAS,OAAO,gBAAgB,cAAc,eAAe,eACvF,OAAO,UAAU,SAAS,KAAK,GAAG,MAAM;;;ACA5C,SAAS,cAAc;AAChB,IAAM,kBAAkB,CAAC,OAAO,SAAS,GAAG,SAAS,MAAM,aAAa,WAAW;AACtF,MAAI,CAAC,cAAc,KAAK,GAAG;AACvB,UAAM,IAAI,UAAU,2DAA2D,OAAO,KAAK,KAAK,KAAK,GAAG;AAAA,EAC5G;AACA,SAAO,OAAO,KAAK,OAAO,QAAQ,MAAM;AAC5C;AACO,IAAM,aAAa,CAAC,OAAO,aAAa;AAC3C,MAAI,OAAO,UAAU,UAAU;AAC3B,UAAM,IAAI,UAAU,8DAA8D,OAAO,KAAK,KAAK,KAAK,GAAG;AAAA,EAC/G;AACA,SAAO,WAAW,OAAO,KAAK,OAAO,QAAQ,IAAI,OAAO,KAAK,KAAK;AACtE;;;ACZO,IAAM,WAAW,CAAC,UAAU;AAC/B,QAAM,MAAM,WAAW,OAAO,MAAM;AACpC,SAAO,IAAI,WAAW,IAAI,QAAQ,IAAI,YAAY,IAAI,aAAa,WAAW,iBAAiB;AACnG;;;ACHO,IAAM,SAAS,CAAC,UAAU;AAC7B,MAAI,OAAO,UAAU,UAAU;AAC3B,WAAO;AAAA,EACX;AACA,MAAI,OAAO,UAAU,YAAY,OAAO,MAAM,eAAe,YAAY,OAAO,MAAM,eAAe,UAAU;AAC3G,UAAM,IAAI,MAAM,8EAA8E;AAAA,EAClG;AACA,SAAO,gBAAgB,MAAM,QAAQ,MAAM,YAAY,MAAM,UAAU,EAAE,SAAS,MAAM;AAC5F;","names":[]}
@@ -1,65 +0,0 @@
1
- import {
2
- __publicField,
3
- __spreadProps,
4
- __spreadValues
5
- } from "./chunk-MIXAYX55.js";
6
-
7
- // ../../node_modules/@smithy/protocol-http/dist-es/httpRequest.js
8
- var HttpRequest = class _HttpRequest {
9
- constructor(options) {
10
- __publicField(this, "method");
11
- __publicField(this, "protocol");
12
- __publicField(this, "hostname");
13
- __publicField(this, "port");
14
- __publicField(this, "path");
15
- __publicField(this, "query");
16
- __publicField(this, "headers");
17
- __publicField(this, "username");
18
- __publicField(this, "password");
19
- __publicField(this, "fragment");
20
- __publicField(this, "body");
21
- this.method = options.method || "GET";
22
- this.hostname = options.hostname || "localhost";
23
- this.port = options.port;
24
- this.query = options.query || {};
25
- this.headers = options.headers || {};
26
- this.body = options.body;
27
- this.protocol = options.protocol ? options.protocol.slice(-1) !== ":" ? `${options.protocol}:` : options.protocol : "https:";
28
- this.path = options.path ? options.path.charAt(0) !== "/" ? `/${options.path}` : options.path : "/";
29
- this.username = options.username;
30
- this.password = options.password;
31
- this.fragment = options.fragment;
32
- }
33
- static clone(request) {
34
- const cloned = new _HttpRequest(__spreadProps(__spreadValues({}, request), {
35
- headers: __spreadValues({}, request.headers)
36
- }));
37
- if (cloned.query) {
38
- cloned.query = cloneQuery(cloned.query);
39
- }
40
- return cloned;
41
- }
42
- static isInstance(request) {
43
- if (!request) {
44
- return false;
45
- }
46
- const req = request;
47
- return "method" in req && "protocol" in req && "hostname" in req && "path" in req && typeof req["query"] === "object" && typeof req["headers"] === "object";
48
- }
49
- clone() {
50
- return _HttpRequest.clone(this);
51
- }
52
- };
53
- function cloneQuery(query) {
54
- return Object.keys(query).reduce((carry, paramName) => {
55
- const param = query[paramName];
56
- return __spreadProps(__spreadValues({}, carry), {
57
- [paramName]: Array.isArray(param) ? [...param] : param
58
- });
59
- }, {});
60
- }
61
-
62
- export {
63
- HttpRequest
64
- };
65
- //# sourceMappingURL=chunk-KLXK4V6G.js.map