@aws-sdk/s3-request-presigner 3.1045.0 → 3.1046.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/dist-cjs/index.js CHANGED
@@ -1,8 +1,8 @@
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 signatureV4MultiRegion = require('@aws-sdk/signature-v4-multi-region');
7
7
 
8
8
  const UNSIGNED_PAYLOAD = "UNSIGNED-PAYLOAD";
@@ -69,7 +69,7 @@ const getSignedUrl = async (client, command, options = {}) => {
69
69
  let s3Presigner;
70
70
  let region;
71
71
  if (typeof client.config.endpointProvider === "function") {
72
- const endpointV2 = await middlewareEndpoint.getEndpointFromInstructions(command.input, command.constructor, client.config);
72
+ const endpointV2 = await endpoints.getEndpointFromInstructions(command.input, command.constructor, client.config);
73
73
  const authScheme = endpointV2.properties?.authSchemes?.[0];
74
74
  if (authScheme?.name === "sigv4a") {
75
75
  region = authScheme?.signingRegionSet?.join(",");
@@ -88,7 +88,7 @@ const getSignedUrl = async (client, command, options = {}) => {
88
88
  }
89
89
  const presignInterceptMiddleware = (next, context) => async (args) => {
90
90
  const { request } = args;
91
- if (!protocolHttp.HttpRequest.isInstance(request)) {
91
+ if (!protocols.HttpRequest.isInstance(request)) {
92
92
  throw new Error("Request to be presigned is not an valid HTTP request.");
93
93
  }
94
94
  delete request.headers["amz-sdk-invocation-id"];
@@ -125,7 +125,7 @@ const getSignedUrl = async (client, command, options = {}) => {
125
125
  const handler = command.resolveMiddleware(clientStack, client.config, {});
126
126
  const { output } = await handler({ input: command.input });
127
127
  const { presigned } = output;
128
- return utilFormatUrl.formatUrl(presigned);
128
+ return util.formatUrl(presigned);
129
129
  };
130
130
 
131
131
  exports.S3RequestPresigner = S3RequestPresigner;
@@ -1,6 +1,6 @@
1
- import { formatUrl } from "@aws-sdk/util-format-url";
2
- import { getEndpointFromInstructions } from "@smithy/middleware-endpoint";
3
- import { HttpRequest } from "@smithy/protocol-http";
1
+ import { formatUrl } from "@aws-sdk/core/util";
2
+ import { getEndpointFromInstructions } from "@smithy/core/endpoints";
3
+ import { HttpRequest } from "@smithy/core/protocols";
4
4
  import { S3RequestPresigner } from "./presigner";
5
5
  export const getSignedUrl = async (client, command, options = {}) => {
6
6
  let s3Presigner;
@@ -1,4 +1,4 @@
1
- import type { Client, Command } from "@smithy/smithy-client";
1
+ import type { Client, Command } from "@smithy/core/client";
2
2
  import type { MetadataBearer, RequestPresigningArguments } from "@smithy/types";
3
3
  /**
4
4
  * @public
@@ -1,4 +1,4 @@
1
- import { Client, Command } from "@smithy/smithy-client";
1
+ import { Client, Command } from "@smithy/core/client";
2
2
  import { MetadataBearer, RequestPresigningArguments } from "@smithy/types";
3
3
  export declare const getSignedUrl: <
4
4
  InputTypesUnion extends object,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/s3-request-presigner",
3
- "version": "3.1045.0",
3
+ "version": "3.1046.0",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
6
6
  "build:cjs": "node ../../scripts/compilation/inline s3-request-presigner",
@@ -23,18 +23,16 @@
23
23
  },
24
24
  "license": "Apache-2.0",
25
25
  "dependencies": {
26
- "@aws-sdk/signature-v4-multi-region": "^3.996.25",
26
+ "@aws-sdk/core": "^3.974.9",
27
+ "@aws-sdk/signature-v4-multi-region": "^3.996.26",
27
28
  "@aws-sdk/types": "^3.973.8",
28
- "@aws-sdk/util-format-url": "^3.972.10",
29
- "@smithy/middleware-endpoint": "^4.4.32",
30
- "@smithy/protocol-http": "^5.3.14",
31
- "@smithy/smithy-client": "^4.12.13",
29
+ "@smithy/core": "^3.24.1",
32
30
  "@smithy/types": "^4.14.1",
33
31
  "tslib": "^2.6.2"
34
32
  },
35
33
  "devDependencies": {
36
- "@aws-sdk/client-s3": "3.1045.0",
37
- "@smithy/hash-node": "^4.2.14",
34
+ "@aws-sdk/client-s3": "3.1046.0",
35
+ "@smithy/hash-node": "^4.3.1",
38
36
  "@tsconfig/recommended": "1.0.1",
39
37
  "@types/node": "^20.14.8",
40
38
  "concurrently": "7.0.0",