@aws-sdk/core 3.879.0 → 3.883.0

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.
@@ -97,7 +97,8 @@ var ProtocolLib = class {
97
97
  } else if (!inputSchema.isUnitSchema()) {
98
98
  const hasBody = Object.values(members).find((m) => {
99
99
  const { httpQuery, httpQueryParams, httpHeader, httpLabel, httpPrefixHeaders } = m.getMergedTraits();
100
- return !httpQuery && !httpQueryParams && !httpHeader && !httpLabel && httpPrefixHeaders === void 0;
100
+ const noPrefixHeaders = httpPrefixHeaders === void 0;
101
+ return !httpQuery && !httpQueryParams && !httpHeader && !httpLabel && noPrefixHeaders;
101
102
  });
102
103
  if (hasBody) {
103
104
  return defaultContentType;
@@ -1288,7 +1289,8 @@ var AwsQueryProtocol = class extends import_protocols5.RpcProtocol {
1288
1289
  if ((0, import_schema9.deref)(operationSchema.input) === "unit" || !request.body) {
1289
1290
  request.body = "";
1290
1291
  }
1291
- request.body = `Action=${operationSchema.name.split("#")[1]}&Version=${this.options.version}` + request.body;
1292
+ const action = operationSchema.name.split("#")[1] ?? operationSchema.name;
1293
+ request.body = `Action=${action}&Version=${this.options.version}` + request.body;
1292
1294
  if (request.body.endsWith("&")) {
1293
1295
  request.body = request.body.slice(-1);
1294
1296
  }
@@ -1314,7 +1316,8 @@ var AwsQueryProtocol = class extends import_protocols5.RpcProtocol {
1314
1316
  delete response.headers[header];
1315
1317
  response.headers[header.toLowerCase()] = value;
1316
1318
  }
1317
- const awsQueryResultKey = ns.isStructSchema() && this.useNestedResult() ? operationSchema.name.split("#")[1] + "Result" : void 0;
1319
+ const shortName = operationSchema.name.split("#")[1] ?? operationSchema.name;
1320
+ const awsQueryResultKey = ns.isStructSchema() && this.useNestedResult() ? shortName + "Result" : void 0;
1318
1321
  const bytes = await (0, import_protocols5.collectBody)(response.body, context);
1319
1322
  if (bytes.byteLength > 0) {
1320
1323
  Object.assign(dataObject, await deserializer.read(ns, bytes, awsQueryResultKey));
@@ -28,7 +28,8 @@ export class ProtocolLib {
28
28
  else if (!inputSchema.isUnitSchema()) {
29
29
  const hasBody = Object.values(members).find((m) => {
30
30
  const { httpQuery, httpQueryParams, httpHeader, httpLabel, httpPrefixHeaders } = m.getMergedTraits();
31
- return !httpQuery && !httpQueryParams && !httpHeader && !httpLabel && httpPrefixHeaders === void 0;
31
+ const noPrefixHeaders = httpPrefixHeaders === void 0;
32
+ return !httpQuery && !httpQueryParams && !httpHeader && !httpLabel && noPrefixHeaders;
32
33
  });
33
34
  if (hasBody) {
34
35
  return defaultContentType;
@@ -47,7 +47,8 @@ export class AwsQueryProtocol extends RpcProtocol {
47
47
  if (deref(operationSchema.input) === "unit" || !request.body) {
48
48
  request.body = "";
49
49
  }
50
- request.body = `Action=${operationSchema.name.split("#")[1]}&Version=${this.options.version}` + request.body;
50
+ const action = operationSchema.name.split("#")[1] ?? operationSchema.name;
51
+ request.body = `Action=${action}&Version=${this.options.version}` + request.body;
51
52
  if (request.body.endsWith("&")) {
52
53
  request.body = request.body.slice(-1);
53
54
  }
@@ -73,7 +74,8 @@ export class AwsQueryProtocol extends RpcProtocol {
73
74
  delete response.headers[header];
74
75
  response.headers[header.toLowerCase()] = value;
75
76
  }
76
- const awsQueryResultKey = ns.isStructSchema() && this.useNestedResult() ? operationSchema.name.split("#")[1] + "Result" : undefined;
77
+ const shortName = operationSchema.name.split("#")[1] ?? operationSchema.name;
78
+ const awsQueryResultKey = ns.isStructSchema() && this.useNestedResult() ? shortName + "Result" : undefined;
77
79
  const bytes = await collectBody(response.body, context);
78
80
  if (bytes.byteLength > 0) {
79
81
  Object.assign(dataObject, await deserializer.read(ns, bytes, awsQueryResultKey));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/core",
3
- "version": "3.879.0",
3
+ "version": "3.883.0",
4
4
  "description": "Core functions & classes shared by multiple AWS SDK clients.",
5
5
  "scripts": {
6
6
  "build": "yarn lint && concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
@@ -83,12 +83,12 @@
83
83
  "dependencies": {
84
84
  "@aws-sdk/types": "3.862.0",
85
85
  "@aws-sdk/xml-builder": "3.873.0",
86
- "@smithy/core": "^3.9.0",
86
+ "@smithy/core": "^3.9.2",
87
87
  "@smithy/node-config-provider": "^4.1.4",
88
88
  "@smithy/property-provider": "^4.0.5",
89
89
  "@smithy/protocol-http": "^5.1.3",
90
90
  "@smithy/signature-v4": "^5.1.3",
91
- "@smithy/smithy-client": "^4.5.0",
91
+ "@smithy/smithy-client": "^4.5.2",
92
92
  "@smithy/types": "^4.3.2",
93
93
  "@smithy/util-base64": "^4.0.0",
94
94
  "@smithy/util-body-length-browser": "^4.0.0",