@aws-sdk/middleware-sdk-ec2 3.972.21 → 3.972.23

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,10 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var utilFormatUrl = require('@aws-sdk/util-format-url');
4
- var middlewareEndpoint = require('@smithy/middleware-endpoint');
5
- var protocolHttp = require('@smithy/protocol-http');
3
+ var util = require('@aws-sdk/core/util');
4
+ var endpoints = require('@smithy/core/endpoints');
5
+ var protocols = require('@smithy/core/protocols');
6
6
  var signatureV4 = require('@smithy/signature-v4');
7
- var smithyClient = require('@smithy/smithy-client');
8
7
 
9
8
  const version = "2016-11-15";
10
9
  function copySnapshotPresignedUrlMiddleware(options) {
@@ -12,7 +11,7 @@ function copySnapshotPresignedUrlMiddleware(options) {
12
11
  const { input } = args;
13
12
  if (!input.PresignedUrl) {
14
13
  const destinationRegion = await options.region();
15
- const endpoint = await middlewareEndpoint.getEndpointFromInstructions(input, {
14
+ const endpoint = await endpoints.getEndpointFromInstructions(input, {
16
15
  getEndpointParameterInstructions() {
17
16
  return {
18
17
  UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
@@ -25,8 +24,8 @@ function copySnapshotPresignedUrlMiddleware(options) {
25
24
  ...options,
26
25
  region: input.SourceRegion,
27
26
  });
28
- const resolvedEndpoint = typeof options.endpoint === "function" ? await options.endpoint() : middlewareEndpoint.toEndpointV1(endpoint);
29
- const requestToSign = new protocolHttp.HttpRequest({
27
+ const resolvedEndpoint = typeof options.endpoint === "function" ? await options.endpoint() : endpoints.toEndpointV1(endpoint);
28
+ const requestToSign = new protocols.HttpRequest({
30
29
  ...resolvedEndpoint,
31
30
  protocol: "https",
32
31
  headers: {
@@ -57,16 +56,16 @@ function copySnapshotPresignedUrlMiddleware(options) {
57
56
  input: {
58
57
  ...args.input,
59
58
  DestinationRegion: destinationRegion,
60
- PresignedUrl: utilFormatUrl.formatUrl(presignedRequest),
59
+ PresignedUrl: util.formatUrl(presignedRequest),
61
60
  },
62
61
  };
63
- if (protocolHttp.HttpRequest.isInstance(args.request)) {
62
+ if (protocols.HttpRequest.isInstance(args.request)) {
64
63
  const { request } = args;
65
64
  if (!(request.body ?? "").includes("DestinationRegion=")) {
66
65
  request.body += `&DestinationRegion=${destinationRegion}`;
67
66
  }
68
67
  if (!(request.body ?? "").includes("PresignedUrl=")) {
69
- request.body += `&PresignedUrl=${smithyClient.extendedEncodeURIComponent(args.input.PresignedUrl)}`;
68
+ request.body += `&PresignedUrl=${protocols.extendedEncodeURIComponent(args.input.PresignedUrl)}`;
70
69
  }
71
70
  }
72
71
  }
package/dist-es/index.js CHANGED
@@ -1,8 +1,8 @@
1
- import { formatUrl } from "@aws-sdk/util-format-url";
2
- import { getEndpointFromInstructions, toEndpointV1 } from "@smithy/middleware-endpoint";
3
- import { HttpRequest } from "@smithy/protocol-http";
1
+ import { formatUrl } from "@aws-sdk/core/util";
2
+ import { getEndpointFromInstructions, toEndpointV1 } from "@smithy/core/endpoints";
3
+ import { extendedEncodeURIComponent } from "@smithy/core/protocols";
4
+ import { HttpRequest } from "@smithy/core/protocols";
4
5
  import { SignatureV4 } from "@smithy/signature-v4";
5
- import { extendedEncodeURIComponent } from "@smithy/smithy-client";
6
6
  const version = "2016-11-15";
7
7
  export function copySnapshotPresignedUrlMiddleware(options) {
8
8
  return (next, context) => async (args) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/middleware-sdk-ec2",
3
- "version": "3.972.21",
3
+ "version": "3.972.23",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
6
6
  "build:cjs": "node ../../scripts/compilation/inline middleware-sdk-ec2",
@@ -26,12 +26,10 @@
26
26
  },
27
27
  "license": "Apache-2.0",
28
28
  "dependencies": {
29
+ "@aws-sdk/core": "^3.974.9",
29
30
  "@aws-sdk/types": "^3.973.8",
30
- "@aws-sdk/util-format-url": "^3.972.10",
31
- "@smithy/middleware-endpoint": "^4.4.31",
32
- "@smithy/protocol-http": "^5.3.14",
33
- "@smithy/signature-v4": "^5.3.14",
34
- "@smithy/smithy-client": "^4.12.12",
31
+ "@smithy/core": "^3.24.1",
32
+ "@smithy/signature-v4": "^5.4.1",
35
33
  "@smithy/types": "^4.14.1",
36
34
  "tslib": "^2.6.2"
37
35
  },