@aws-sdk/util-create-request 3.186.0 → 3.190.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,22 @@
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.190.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.189.0...v3.190.0) (2022-10-17)
7
+
8
+ **Note:** Version bump only for package @aws-sdk/util-create-request
9
+
10
+
11
+
12
+
13
+
14
+ # [3.188.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.187.0...v3.188.0) (2022-10-13)
15
+
16
+ **Note:** Version bump only for package @aws-sdk/util-create-request
17
+
18
+
19
+
20
+
21
+
6
22
  # [3.186.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.185.0...v3.186.0) (2022-10-06)
7
23
 
8
24
  **Note:** Version bump only for package @aws-sdk/util-create-request
@@ -1,24 +1,22 @@
1
1
  import { constructStack } from "@aws-sdk/middleware-stack";
2
2
  import { HttpRequest } from "@aws-sdk/protocol-http";
3
- var output = { Data: "data", $metadata: {} };
4
- var input = { String: "input" };
5
- export var fooClient = {
3
+ const output = { Data: "data", $metadata: {} };
4
+ const input = { String: "input" };
5
+ export const fooClient = {
6
6
  config: {},
7
7
  middlewareStack: constructStack(),
8
- send: function (command) {
9
- return command.resolveMiddleware(fooClient.middlewareStack, fooClient.config, undefined)({ input: input });
10
- },
11
- destroy: function () { },
8
+ send: (command) => command.resolveMiddleware(fooClient.middlewareStack, fooClient.config, undefined)({ input }),
9
+ destroy: () => { },
12
10
  };
13
- export var operationCommand = {
11
+ export const operationCommand = {
14
12
  middlewareStack: constructStack(),
15
13
  input: {},
16
- resolveMiddleware: function (stack) {
17
- var concatStack = stack.concat(operationCommand.middlewareStack);
18
- return concatStack.resolve(function () { return Promise.resolve({ output: output, response: {} }); }, {});
14
+ resolveMiddleware: (stack) => {
15
+ const concatStack = stack.concat(operationCommand.middlewareStack);
16
+ return concatStack.resolve(() => Promise.resolve({ output, response: {} }), {});
19
17
  },
20
18
  };
21
- export var httpRequest = new HttpRequest({
19
+ export const httpRequest = new HttpRequest({
22
20
  protocol: "https:",
23
21
  path: "/foo",
24
22
  hostname: "foo-service.us-east-1.amazonaws.com",
package/dist-es/index.js CHANGED
@@ -1,25 +1,12 @@
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
- });
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",
24
9
  });
10
+ const handler = command.resolveMiddleware(clientStack, client.config, undefined);
11
+ return await handler(command).then((output) => output.output.request);
25
12
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/util-create-request",
3
- "version": "3.186.0",
3
+ "version": "3.190.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.186.0",
24
- "@aws-sdk/smithy-client": "3.186.0",
25
- "@aws-sdk/types": "3.186.0",
23
+ "@aws-sdk/middleware-stack": "3.190.0",
24
+ "@aws-sdk/smithy-client": "3.190.0",
25
+ "@aws-sdk/types": "3.190.0",
26
26
  "tslib": "^2.3.1"
27
27
  },
28
28
  "devDependencies": {
29
- "@aws-sdk/protocol-http": "3.186.0",
29
+ "@aws-sdk/protocol-http": "3.190.0",
30
30
  "@tsconfig/recommended": "1.0.1",
31
31
  "@types/node": "^10.0.3",
32
32
  "concurrently": "7.0.0",