@aws-sdk/util-create-request 3.183.0 → 3.186.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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [3.186.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.185.0...v3.186.0) (2022-10-06)
7
+
8
+ **Note:** Version bump only for package @aws-sdk/util-create-request
9
+
10
+
11
+
12
+
13
+
6
14
  # [3.183.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.182.0...v3.183.0) (2022-10-03)
7
15
 
8
16
  **Note:** Version bump only for package @aws-sdk/util-create-request
@@ -1,22 +1,24 @@
1
1
  import { constructStack } from "@aws-sdk/middleware-stack";
2
2
  import { HttpRequest } from "@aws-sdk/protocol-http";
3
- const output = { Data: "data", $metadata: {} };
4
- const input = { String: "input" };
5
- export const fooClient = {
3
+ var output = { Data: "data", $metadata: {} };
4
+ var input = { String: "input" };
5
+ export var fooClient = {
6
6
  config: {},
7
7
  middlewareStack: constructStack(),
8
- send: (command) => command.resolveMiddleware(fooClient.middlewareStack, fooClient.config, undefined)({ input }),
9
- destroy: () => { },
8
+ send: function (command) {
9
+ return command.resolveMiddleware(fooClient.middlewareStack, fooClient.config, undefined)({ input: input });
10
+ },
11
+ destroy: function () { },
10
12
  };
11
- export const operationCommand = {
13
+ export var operationCommand = {
12
14
  middlewareStack: constructStack(),
13
15
  input: {},
14
- resolveMiddleware: (stack) => {
15
- const concatStack = stack.concat(operationCommand.middlewareStack);
16
- return concatStack.resolve(() => Promise.resolve({ output, response: {} }), {});
16
+ resolveMiddleware: function (stack) {
17
+ var concatStack = stack.concat(operationCommand.middlewareStack);
18
+ return concatStack.resolve(function () { return Promise.resolve({ output: output, response: {} }); }, {});
17
19
  },
18
20
  };
19
- export const httpRequest = new HttpRequest({
21
+ export var httpRequest = new HttpRequest({
20
22
  protocol: "https:",
21
23
  path: "/foo",
22
24
  hostname: "foo-service.us-east-1.amazonaws.com",
package/dist-es/index.js CHANGED
@@ -1,12 +1,25 @@
1
- export async function createRequest(client, command) {
2
- const interceptMiddleware = (next) => async (args) => {
3
- return { output: { request: args.request }, response: undefined };
4
- };
5
- const clientStack = client.middlewareStack.clone();
6
- clientStack.add(interceptMiddleware, {
7
- step: "build",
8
- priority: "low",
1
+ import { __awaiter, __generator } from "tslib";
2
+ export function createRequest(client, command) {
3
+ return __awaiter(this, void 0, void 0, function () {
4
+ var interceptMiddleware, clientStack, handler;
5
+ var _this = this;
6
+ return __generator(this, function (_a) {
7
+ switch (_a.label) {
8
+ case 0:
9
+ interceptMiddleware = function (next) { return function (args) { return __awaiter(_this, void 0, void 0, function () {
10
+ return __generator(this, function (_a) {
11
+ return [2, { output: { request: args.request }, response: undefined }];
12
+ });
13
+ }); }; };
14
+ clientStack = client.middlewareStack.clone();
15
+ clientStack.add(interceptMiddleware, {
16
+ step: "build",
17
+ priority: "low",
18
+ });
19
+ handler = command.resolveMiddleware(clientStack, client.config, undefined);
20
+ return [4, handler(command).then(function (output) { return output.output.request; })];
21
+ case 1: return [2, _a.sent()];
22
+ }
23
+ });
9
24
  });
10
- const handler = command.resolveMiddleware(clientStack, client.config, undefined);
11
- return await handler(command).then((output) => output.output.request);
12
25
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/util-create-request",
3
- "version": "3.183.0",
3
+ "version": "3.186.0",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
6
6
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -20,13 +20,13 @@
20
20
  },
21
21
  "license": "Apache-2.0",
22
22
  "dependencies": {
23
- "@aws-sdk/middleware-stack": "3.183.0",
24
- "@aws-sdk/smithy-client": "3.183.0",
25
- "@aws-sdk/types": "3.183.0",
23
+ "@aws-sdk/middleware-stack": "3.186.0",
24
+ "@aws-sdk/smithy-client": "3.186.0",
25
+ "@aws-sdk/types": "3.186.0",
26
26
  "tslib": "^2.3.1"
27
27
  },
28
28
  "devDependencies": {
29
- "@aws-sdk/protocol-http": "3.183.0",
29
+ "@aws-sdk/protocol-http": "3.186.0",
30
30
  "@tsconfig/recommended": "1.0.1",
31
31
  "@types/node": "^10.0.3",
32
32
  "concurrently": "7.0.0",