Socket
Socket
Sign inDemoInstall

@aws-sdk/middleware-location-constraint

Package Overview
Dependencies
Maintainers
5
Versions
153
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-sdk/middleware-location-constraint - npm Package Compare versions

Comparing version 3.186.0 to 3.188.0

8

CHANGELOG.md

@@ -6,2 +6,10 @@ # Change Log

# [3.188.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.187.0...v3.188.0) (2022-10-13)
**Note:** Version bump only for package @aws-sdk/middleware-location-constraint
# [3.186.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.185.0...v3.186.0) (2022-10-06)

@@ -8,0 +16,0 @@

3

dist-es/configuration.js

@@ -1,4 +0,3 @@

import { __assign } from "tslib";
export function resolveLocationConstraintConfig(input) {
return __assign({}, input);
return { ...input };
}

@@ -1,24 +0,18 @@

import { __assign, __awaiter, __generator } from "tslib";
export function locationConstraintMiddleware(options) {
var _this = this;
return function (next) {
return function (args) { return __awaiter(_this, void 0, void 0, function () {
var CreateBucketConfiguration, region;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
CreateBucketConfiguration = args.input.CreateBucketConfiguration;
return [4, options.region()];
case 1:
region = _a.sent();
if (!CreateBucketConfiguration || !CreateBucketConfiguration.LocationConstraint) {
args = __assign(__assign({}, args), { input: __assign(__assign({}, args.input), { CreateBucketConfiguration: region === "us-east-1" ? undefined : { LocationConstraint: region } }) });
}
return [2, next(args)];
}
});
}); };
return (next) => async (args) => {
const { CreateBucketConfiguration } = args.input;
const region = await options.region();
if (!CreateBucketConfiguration || !CreateBucketConfiguration.LocationConstraint) {
args = {
...args,
input: {
...args.input,
CreateBucketConfiguration: region === "us-east-1" ? undefined : { LocationConstraint: region },
},
};
}
return next(args);
};
}
export var locationConstraintMiddlewareOptions = {
export const locationConstraintMiddlewareOptions = {
step: "initialize",

@@ -29,6 +23,6 @@ tags: ["LOCATION_CONSTRAINT", "CREATE_BUCKET_CONFIGURATION"],

};
export var getLocationConstraintPlugin = function (config) { return ({
applyToStack: function (clientStack) {
export const getLocationConstraintPlugin = (config) => ({
applyToStack: (clientStack) => {
clientStack.add(locationConstraintMiddleware(config), locationConstraintMiddlewareOptions);
},
}); };
});
{
"name": "@aws-sdk/middleware-location-constraint",
"version": "3.186.0",
"version": "3.188.0",
"scripts": {

@@ -23,3 +23,3 @@ "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",

"dependencies": {
"@aws-sdk/types": "3.186.0",
"@aws-sdk/types": "3.188.0",
"tslib": "^2.3.1"

@@ -26,0 +26,0 @@ },

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc