@aws-sdk/core 3.974.1 → 3.974.3

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/dist-cjs/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  'use strict';
2
2
 
3
+ var utilRetry = require('@smithy/util-retry');
3
4
  var protocolHttp = require('@smithy/protocol-http');
4
5
  var core = require('@smithy/core');
5
6
  var propertyProvider = require('@smithy/property-provider');
@@ -54,6 +55,7 @@ function setCredentialFeature(credentials, feature, value) {
54
55
  return credentials;
55
56
  }
56
57
 
58
+ utilRetry.Retry.v2026 ||= typeof process === "object" && process.env?.AWS_NEW_RETRIES_2026 === "true";
57
59
  function setFeature(context, feature, value) {
58
60
  if (!context.__aws_sdk_context) {
59
61
  context.__aws_sdk_context = {
@@ -755,7 +757,8 @@ class JsonShapeDeserializer extends SerdeContextConfig {
755
757
  unionSerde.writeUnknown();
756
758
  }
757
759
  else if (typeof record.__type === "string") {
758
- for (const [k, v] of Object.entries(record)) {
760
+ for (const k in record) {
761
+ const v = record[k];
759
762
  const t = jsonName ? nameMap[k] ?? k : k;
760
763
  if (!(t in out)) {
761
764
  out[t] = v;
@@ -775,8 +778,8 @@ class JsonShapeDeserializer extends SerdeContextConfig {
775
778
  if (ns.isMapSchema()) {
776
779
  const mapMember = ns.getValueSchema();
777
780
  const out = {};
778
- for (const [_k, _v] of Object.entries(value)) {
779
- out[_k] = this._read(mapMember, _v);
781
+ for (const _k in value) {
782
+ out[_k] = this._read(mapMember, value[_k]);
780
783
  }
781
784
  return out;
782
785
  }
@@ -833,7 +836,8 @@ class JsonShapeDeserializer extends SerdeContextConfig {
833
836
  if (ns.isDocumentSchema()) {
834
837
  if (isObject) {
835
838
  const out = Array.isArray(value) ? [] : {};
836
- for (const [k, v] of Object.entries(value)) {
839
+ for (const k in value) {
840
+ const v = value[k];
837
841
  if (v instanceof serde.NumericValue) {
838
842
  out[k] = v;
839
843
  }
@@ -962,7 +966,8 @@ class JsonShapeSerializer extends SerdeContextConfig {
962
966
  }
963
967
  }
964
968
  else if (typeof record.__type === "string") {
965
- for (const [k, v] of Object.entries(record)) {
969
+ for (const k in record) {
970
+ const v = record[k];
966
971
  const targetKey = jsonName ? nameMap[k] ?? k : k;
967
972
  if (!(targetKey in out)) {
968
973
  out[targetKey] = this._write(15, v);
@@ -986,7 +991,8 @@ class JsonShapeSerializer extends SerdeContextConfig {
986
991
  const mapMember = ns.getValueSchema();
987
992
  const out = {};
988
993
  const sparse = !!ns.getMergedTraits().sparse;
989
- for (const [_k, _v] of Object.entries(value)) {
994
+ for (const _k in value) {
995
+ const _v = value[_k];
990
996
  if (sparse || _v != null) {
991
997
  out[_k] = this._write(mapMember, _v);
992
998
  }
@@ -1051,7 +1057,8 @@ class JsonShapeSerializer extends SerdeContextConfig {
1051
1057
  if (ns.isDocumentSchema()) {
1052
1058
  if (isObject) {
1053
1059
  const out = Array.isArray(value) ? [] : {};
1054
- for (const [k, v] of Object.entries(value)) {
1060
+ for (const k in value) {
1061
+ const v = value[k];
1055
1062
  if (v instanceof serde.NumericValue) {
1056
1063
  this.useReplacer = true;
1057
1064
  out[k] = v;
@@ -1550,7 +1557,8 @@ class QueryShapeSerializer extends SerdeContextConfig {
1550
1557
  const memberSchema = ns.getValueSchema();
1551
1558
  const flat = ns.getMergedTraits().xmlFlattened;
1552
1559
  let i = 1;
1553
- for (const [k, v] of Object.entries(value)) {
1560
+ for (const k in value) {
1561
+ const v = value[k];
1554
1562
  if (v == null) {
1555
1563
  continue;
1556
1564
  }
@@ -2004,7 +2012,8 @@ class XmlShapeSerializer extends SerdeContextConfig {
2004
2012
  entry.addChildNode(valueNode);
2005
2013
  };
2006
2014
  if (flat) {
2007
- for (const [key, val] of Object.entries(map)) {
2015
+ for (const key in map) {
2016
+ const val = map[key];
2008
2017
  if (sparse || val != null) {
2009
2018
  const entry = xmlBuilder.XmlNode.of(mapTraits.xmlName ?? mapMember.getMemberName());
2010
2019
  addKeyValue(entry, key, val);
@@ -2021,7 +2030,8 @@ class XmlShapeSerializer extends SerdeContextConfig {
2021
2030
  }
2022
2031
  container.addChildNode(mapNode);
2023
2032
  }
2024
- for (const [key, val] of Object.entries(map)) {
2033
+ for (const key in map) {
2034
+ const val = map[key];
2025
2035
  if (sparse || val != null) {
2026
2036
  const entry = xmlBuilder.XmlNode.of("entry");
2027
2037
  addKeyValue(entry, key, val);
@@ -1,5 +1,7 @@
1
1
  'use strict';
2
2
 
3
+ var utilRetry = require('@smithy/util-retry');
4
+
3
5
  const state = {
4
6
  warningEmitted: false,
5
7
  };
@@ -40,6 +42,7 @@ function setCredentialFeature(credentials, feature, value) {
40
42
  return credentials;
41
43
  }
42
44
 
45
+ utilRetry.Retry.v2026 ||= typeof process === "object" && process.env?.AWS_NEW_RETRIES_2026 === "true";
43
46
  function setFeature(context, feature, value) {
44
47
  if (!context.__aws_sdk_context) {
45
48
  context.__aws_sdk_context = {
@@ -401,7 +401,8 @@ class JsonShapeDeserializer extends SerdeContextConfig {
401
401
  unionSerde.writeUnknown();
402
402
  }
403
403
  else if (typeof record.__type === "string") {
404
- for (const [k, v] of Object.entries(record)) {
404
+ for (const k in record) {
405
+ const v = record[k];
405
406
  const t = jsonName ? nameMap[k] ?? k : k;
406
407
  if (!(t in out)) {
407
408
  out[t] = v;
@@ -421,8 +422,8 @@ class JsonShapeDeserializer extends SerdeContextConfig {
421
422
  if (ns.isMapSchema()) {
422
423
  const mapMember = ns.getValueSchema();
423
424
  const out = {};
424
- for (const [_k, _v] of Object.entries(value)) {
425
- out[_k] = this._read(mapMember, _v);
425
+ for (const _k in value) {
426
+ out[_k] = this._read(mapMember, value[_k]);
426
427
  }
427
428
  return out;
428
429
  }
@@ -479,7 +480,8 @@ class JsonShapeDeserializer extends SerdeContextConfig {
479
480
  if (ns.isDocumentSchema()) {
480
481
  if (isObject) {
481
482
  const out = Array.isArray(value) ? [] : {};
482
- for (const [k, v] of Object.entries(value)) {
483
+ for (const k in value) {
484
+ const v = value[k];
483
485
  if (v instanceof serde.NumericValue) {
484
486
  out[k] = v;
485
487
  }
@@ -608,7 +610,8 @@ class JsonShapeSerializer extends SerdeContextConfig {
608
610
  }
609
611
  }
610
612
  else if (typeof record.__type === "string") {
611
- for (const [k, v] of Object.entries(record)) {
613
+ for (const k in record) {
614
+ const v = record[k];
612
615
  const targetKey = jsonName ? nameMap[k] ?? k : k;
613
616
  if (!(targetKey in out)) {
614
617
  out[targetKey] = this._write(15, v);
@@ -632,7 +635,8 @@ class JsonShapeSerializer extends SerdeContextConfig {
632
635
  const mapMember = ns.getValueSchema();
633
636
  const out = {};
634
637
  const sparse = !!ns.getMergedTraits().sparse;
635
- for (const [_k, _v] of Object.entries(value)) {
638
+ for (const _k in value) {
639
+ const _v = value[_k];
636
640
  if (sparse || _v != null) {
637
641
  out[_k] = this._write(mapMember, _v);
638
642
  }
@@ -697,7 +701,8 @@ class JsonShapeSerializer extends SerdeContextConfig {
697
701
  if (ns.isDocumentSchema()) {
698
702
  if (isObject) {
699
703
  const out = Array.isArray(value) ? [] : {};
700
- for (const [k, v] of Object.entries(value)) {
704
+ for (const k in value) {
705
+ const v = value[k];
701
706
  if (v instanceof serde.NumericValue) {
702
707
  this.useReplacer = true;
703
708
  out[k] = v;
@@ -1196,7 +1201,8 @@ class QueryShapeSerializer extends SerdeContextConfig {
1196
1201
  const memberSchema = ns.getValueSchema();
1197
1202
  const flat = ns.getMergedTraits().xmlFlattened;
1198
1203
  let i = 1;
1199
- for (const [k, v] of Object.entries(value)) {
1204
+ for (const k in value) {
1205
+ const v = value[k];
1200
1206
  if (v == null) {
1201
1207
  continue;
1202
1208
  }
@@ -1650,7 +1656,8 @@ class XmlShapeSerializer extends SerdeContextConfig {
1650
1656
  entry.addChildNode(valueNode);
1651
1657
  };
1652
1658
  if (flat) {
1653
- for (const [key, val] of Object.entries(map)) {
1659
+ for (const key in map) {
1660
+ const val = map[key];
1654
1661
  if (sparse || val != null) {
1655
1662
  const entry = xmlBuilder.XmlNode.of(mapTraits.xmlName ?? mapMember.getMemberName());
1656
1663
  addKeyValue(entry, key, val);
@@ -1667,7 +1674,8 @@ class XmlShapeSerializer extends SerdeContextConfig {
1667
1674
  }
1668
1675
  container.addChildNode(mapNode);
1669
1676
  }
1670
- for (const [key, val] of Object.entries(map)) {
1677
+ for (const key in map) {
1678
+ const val = map[key];
1671
1679
  if (sparse || val != null) {
1672
1680
  const entry = xmlBuilder.XmlNode.of("entry");
1673
1681
  addKeyValue(entry, key, val);
@@ -1,3 +1,5 @@
1
+ import { Retry } from "@smithy/util-retry";
2
+ Retry.v2026 ||= typeof process === "object" && process.env?.AWS_NEW_RETRIES_2026 === "true";
1
3
  export function setFeature(context, feature, value) {
2
4
  if (!context.__aws_sdk_context) {
3
5
  context.__aws_sdk_context = {
@@ -52,7 +52,8 @@ export class JsonShapeDeserializer extends SerdeContextConfig {
52
52
  unionSerde.writeUnknown();
53
53
  }
54
54
  else if (typeof record.__type === "string") {
55
- for (const [k, v] of Object.entries(record)) {
55
+ for (const k in record) {
56
+ const v = record[k];
56
57
  const t = jsonName ? nameMap[k] ?? k : k;
57
58
  if (!(t in out)) {
58
59
  out[t] = v;
@@ -72,8 +73,8 @@ export class JsonShapeDeserializer extends SerdeContextConfig {
72
73
  if (ns.isMapSchema()) {
73
74
  const mapMember = ns.getValueSchema();
74
75
  const out = {};
75
- for (const [_k, _v] of Object.entries(value)) {
76
- out[_k] = this._read(mapMember, _v);
76
+ for (const _k in value) {
77
+ out[_k] = this._read(mapMember, value[_k]);
77
78
  }
78
79
  return out;
79
80
  }
@@ -130,7 +131,8 @@ export class JsonShapeDeserializer extends SerdeContextConfig {
130
131
  if (ns.isDocumentSchema()) {
131
132
  if (isObject) {
132
133
  const out = Array.isArray(value) ? [] : {};
133
- for (const [k, v] of Object.entries(value)) {
134
+ for (const k in value) {
135
+ const v = value[k];
134
136
  if (v instanceof NumericValue) {
135
137
  out[k] = v;
136
138
  }
@@ -69,7 +69,8 @@ export class JsonShapeSerializer extends SerdeContextConfig {
69
69
  }
70
70
  }
71
71
  else if (typeof record.__type === "string") {
72
- for (const [k, v] of Object.entries(record)) {
72
+ for (const k in record) {
73
+ const v = record[k];
73
74
  const targetKey = jsonName ? nameMap[k] ?? k : k;
74
75
  if (!(targetKey in out)) {
75
76
  out[targetKey] = this._write(15, v);
@@ -93,7 +94,8 @@ export class JsonShapeSerializer extends SerdeContextConfig {
93
94
  const mapMember = ns.getValueSchema();
94
95
  const out = {};
95
96
  const sparse = !!ns.getMergedTraits().sparse;
96
- for (const [_k, _v] of Object.entries(value)) {
97
+ for (const _k in value) {
98
+ const _v = value[_k];
97
99
  if (sparse || _v != null) {
98
100
  out[_k] = this._write(mapMember, _v);
99
101
  }
@@ -158,7 +160,8 @@ export class JsonShapeSerializer extends SerdeContextConfig {
158
160
  if (ns.isDocumentSchema()) {
159
161
  if (isObject) {
160
162
  const out = Array.isArray(value) ? [] : {};
161
- for (const [k, v] of Object.entries(value)) {
163
+ for (const k in value) {
164
+ const v = value[k];
162
165
  if (v instanceof NumericValue) {
163
166
  this.useReplacer = true;
164
167
  out[k] = v;
@@ -65,7 +65,8 @@ export class SinglePassJsonShapeSerializer extends SerdeContextConfig {
65
65
  }
66
66
  else if (ns.isMapSchema() || ns.isDocumentSchema()) {
67
67
  b += "{";
68
- for (const [k, v] of Object.entries(value)) {
68
+ for (const k in value) {
69
+ const v = value[k];
69
70
  if (v != null || sparse) {
70
71
  b += `"${k}":${this.writeValue(ns, v)}`;
71
72
  b += ",";
@@ -113,7 +113,8 @@ export class QueryShapeSerializer extends SerdeContextConfig {
113
113
  const memberSchema = ns.getValueSchema();
114
114
  const flat = ns.getMergedTraits().xmlFlattened;
115
115
  let i = 1;
116
- for (const [k, v] of Object.entries(value)) {
116
+ for (const k in value) {
117
+ const v = value[k];
117
118
  if (v == null) {
118
119
  continue;
119
120
  }
@@ -191,7 +191,8 @@ export class XmlShapeSerializer extends SerdeContextConfig {
191
191
  entry.addChildNode(valueNode);
192
192
  };
193
193
  if (flat) {
194
- for (const [key, val] of Object.entries(map)) {
194
+ for (const key in map) {
195
+ const val = map[key];
195
196
  if (sparse || val != null) {
196
197
  const entry = XmlNode.of(mapTraits.xmlName ?? mapMember.getMemberName());
197
198
  addKeyValue(entry, key, val);
@@ -208,7 +209,8 @@ export class XmlShapeSerializer extends SerdeContextConfig {
208
209
  }
209
210
  container.addChildNode(mapNode);
210
211
  }
211
- for (const [key, val] of Object.entries(map)) {
212
+ for (const key in map) {
213
+ const val = map[key];
212
214
  if (sparse || val != null) {
213
215
  const entry = XmlNode.of("entry");
214
216
  addKeyValue(entry, key, val);
@@ -1,7 +1,7 @@
1
1
  import type { AwsHandlerExecutionContext, AwsSdkFeatures } from "@aws-sdk/types";
2
2
  /**
3
- * @internal
4
3
  * Indicates to the request context that a given feature is active.
4
+ * @internal
5
5
  *
6
6
  * @param context - handler execution context.
7
7
  * @param feature - readable name of feature.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/core",
3
- "version": "3.974.1",
3
+ "version": "3.974.3",
4
4
  "description": "Core functions & classes shared by multiple AWS SDK clients.",
5
5
  "scripts": {
6
6
  "build": "yarn lint && concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
@@ -12,9 +12,10 @@
12
12
  "lint": "node ../../scripts/validation/submodules-linter.js --pkg core",
13
13
  "clean": "premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo",
14
14
  "extract:docs": "api-extractor run --local",
15
+ "test:temp:retry": "SMITHY_NEW_RETRIES_2026=true node ./integ/retry.integ.spec && AWS_NEW_RETRIES_2026=true node ./integ/retry.integ.spec && node ./integ/retry.integ.spec",
15
16
  "test": "yarn g:vitest run",
16
17
  "test:watch": "yarn g:vitest watch",
17
- "test:integration": "yarn g:vitest run -c vitest.config.integ.mts",
18
+ "test:integration": "yarn g:vitest run -c vitest.config.integ.mts && yarn test:temp:retry",
18
19
  "test:integration:watch": "yarn g:vitest watch -c vitest.config.integ.mts"
19
20
  },
20
21
  "main": "./dist-cjs/index.js",
@@ -83,15 +84,16 @@
83
84
  "dependencies": {
84
85
  "@aws-sdk/types": "^3.973.8",
85
86
  "@aws-sdk/xml-builder": "^3.972.18",
86
- "@smithy/core": "^3.23.15",
87
+ "@smithy/core": "^3.23.16",
87
88
  "@smithy/node-config-provider": "^4.3.14",
88
89
  "@smithy/property-provider": "^4.2.14",
89
90
  "@smithy/protocol-http": "^5.3.14",
90
91
  "@smithy/signature-v4": "^5.3.14",
91
- "@smithy/smithy-client": "^4.12.11",
92
+ "@smithy/smithy-client": "^4.12.12",
92
93
  "@smithy/types": "^4.14.1",
93
94
  "@smithy/util-base64": "^4.3.2",
94
95
  "@smithy/util-middleware": "^4.2.14",
96
+ "@smithy/util-retry": "^4.3.3",
95
97
  "@smithy/util-utf8": "^4.2.2",
96
98
  "tslib": "^2.6.2"
97
99
  },