@aws-sdk/middleware-sdk-s3 3.86.0 → 3.105.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.105.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.104.0...v3.105.0) (2022-06-06)
7
+
8
+ **Note:** Version bump only for package @aws-sdk/middleware-sdk-s3
9
+
10
+
11
+
12
+
13
+
6
14
  # [3.86.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.85.0...v3.86.0) (2022-05-06)
7
15
 
8
16
 
package/dist-cjs/index.js CHANGED
@@ -3,5 +3,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  tslib_1.__exportStar(require("./check-content-length-header"), exports);
5
5
  tslib_1.__exportStar(require("./throw-200-exceptions"), exports);
6
- tslib_1.__exportStar(require("./use-regional-endpoint"), exports);
7
6
  tslib_1.__exportStar(require("./validate-bucket-name"), exports);
package/dist-es/index.js CHANGED
@@ -1,4 +1,3 @@
1
1
  export * from "./check-content-length-header";
2
2
  export * from "./throw-200-exceptions";
3
- export * from "./use-regional-endpoint";
4
3
  export * from "./validate-bucket-name";
@@ -1,4 +1,3 @@
1
1
  export * from "./check-content-length-header";
2
2
  export * from "./throw-200-exceptions";
3
- export * from "./use-regional-endpoint";
4
3
  export * from "./validate-bucket-name";
@@ -1,4 +1,3 @@
1
1
  export * from "./check-content-length-header";
2
2
  export * from "./throw-200-exceptions";
3
- export * from "./use-regional-endpoint";
4
3
  export * from "./validate-bucket-name";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/middleware-sdk-s3",
3
- "version": "3.86.0",
3
+ "version": "3.105.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",
@@ -1,29 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getUseRegionalEndpointPlugin = exports.useRegionalEndpointMiddlewareOptions = exports.useRegionalEndpointMiddleware = void 0;
4
- const protocol_http_1 = require("@aws-sdk/protocol-http");
5
- const useRegionalEndpointMiddleware = (config) => (next) => async (args) => {
6
- const { request } = args;
7
- if (!protocol_http_1.HttpRequest.isInstance(request) || config.isCustomEndpoint)
8
- return next({ ...args });
9
- if (request.hostname === "s3.amazonaws.com") {
10
- request.hostname = "s3.us-east-1.amazonaws.com";
11
- }
12
- else if ("aws-global" === (await config.region())) {
13
- request.hostname = "s3.amazonaws.com";
14
- }
15
- return next({ ...args });
16
- };
17
- exports.useRegionalEndpointMiddleware = useRegionalEndpointMiddleware;
18
- exports.useRegionalEndpointMiddlewareOptions = {
19
- step: "build",
20
- tags: ["USE_REGIONAL_ENDPOINT", "S3"],
21
- name: "useRegionalEndpointMiddleware",
22
- override: true,
23
- };
24
- const getUseRegionalEndpointPlugin = (config) => ({
25
- applyToStack: (clientStack) => {
26
- clientStack.add((0, exports.useRegionalEndpointMiddleware)(config), exports.useRegionalEndpointMiddlewareOptions);
27
- },
28
- });
29
- exports.getUseRegionalEndpointPlugin = getUseRegionalEndpointPlugin;
@@ -1,40 +0,0 @@
1
- import { __assign, __awaiter, __generator } from "tslib";
2
- import { HttpRequest } from "@aws-sdk/protocol-http";
3
- export var useRegionalEndpointMiddleware = function (config) {
4
- return function (next) {
5
- return function (args) { return __awaiter(void 0, void 0, void 0, function () {
6
- var request, _a;
7
- return __generator(this, function (_b) {
8
- switch (_b.label) {
9
- case 0:
10
- request = args.request;
11
- if (!HttpRequest.isInstance(request) || config.isCustomEndpoint)
12
- return [2, next(__assign({}, args))];
13
- if (!(request.hostname === "s3.amazonaws.com")) return [3, 1];
14
- request.hostname = "s3.us-east-1.amazonaws.com";
15
- return [3, 3];
16
- case 1:
17
- _a = "aws-global";
18
- return [4, config.region()];
19
- case 2:
20
- if (_a === (_b.sent())) {
21
- request.hostname = "s3.amazonaws.com";
22
- }
23
- _b.label = 3;
24
- case 3: return [2, next(__assign({}, args))];
25
- }
26
- });
27
- }); };
28
- };
29
- };
30
- export var useRegionalEndpointMiddlewareOptions = {
31
- step: "build",
32
- tags: ["USE_REGIONAL_ENDPOINT", "S3"],
33
- name: "useRegionalEndpointMiddleware",
34
- override: true,
35
- };
36
- export var getUseRegionalEndpointPlugin = function (config) { return ({
37
- applyToStack: function (clientStack) {
38
- clientStack.add(useRegionalEndpointMiddleware(config), useRegionalEndpointMiddlewareOptions);
39
- },
40
- }); };
@@ -1,12 +0,0 @@
1
- import { BuildHandlerOptions, BuildMiddleware, Pluggable, Provider } from "@aws-sdk/types";
2
- declare type PreviouslyResolved = {
3
- region: Provider<string>;
4
- isCustomEndpoint: boolean;
5
- };
6
-
7
- export declare const useRegionalEndpointMiddleware: (config: PreviouslyResolved) => BuildMiddleware<any, any>;
8
-
9
- export declare const useRegionalEndpointMiddlewareOptions: BuildHandlerOptions;
10
-
11
- export declare const getUseRegionalEndpointPlugin: (config: PreviouslyResolved) => Pluggable<any, any>;
12
- export {};
@@ -1,18 +0,0 @@
1
- import { BuildHandlerOptions, BuildMiddleware, Pluggable, Provider } from "@aws-sdk/types";
2
- declare type PreviouslyResolved = {
3
- region: Provider<string>;
4
- isCustomEndpoint: boolean;
5
- };
6
- /**
7
- * @internal
8
- */
9
- export declare const useRegionalEndpointMiddleware: (config: PreviouslyResolved) => BuildMiddleware<any, any>;
10
- /**
11
- * @internal
12
- */
13
- export declare const useRegionalEndpointMiddlewareOptions: BuildHandlerOptions;
14
- /**
15
- * @internal
16
- */
17
- export declare const getUseRegionalEndpointPlugin: (config: PreviouslyResolved) => Pluggable<any, any>;
18
- export {};