@aws-sdk/middleware-location-constraint 3.489.0 → 3.496.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.
@@ -1,7 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.resolveLocationConstraintConfig = void 0;
4
- function resolveLocationConstraintConfig(input) {
5
- return { ...input };
6
- }
7
- exports.resolveLocationConstraintConfig = resolveLocationConstraintConfig;
1
+ module.exports = require("./index.js");
package/dist-cjs/index.js CHANGED
@@ -1,32 +1,63 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getLocationConstraintPlugin = exports.locationConstraintMiddlewareOptions = exports.locationConstraintMiddleware = void 0;
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/index.ts
21
+ var src_exports = {};
22
+ __export(src_exports, {
23
+ getLocationConstraintPlugin: () => getLocationConstraintPlugin,
24
+ locationConstraintMiddleware: () => locationConstraintMiddleware,
25
+ locationConstraintMiddlewareOptions: () => locationConstraintMiddlewareOptions
26
+ });
27
+ module.exports = __toCommonJS(src_exports);
4
28
  function locationConstraintMiddleware(options) {
5
- return (next) => async (args) => {
6
- const { CreateBucketConfiguration } = args.input;
7
- const region = await options.region();
8
- if (!(CreateBucketConfiguration === null || CreateBucketConfiguration === void 0 ? void 0 : CreateBucketConfiguration.LocationConstraint) && !(CreateBucketConfiguration === null || CreateBucketConfiguration === void 0 ? void 0 : CreateBucketConfiguration.Location)) {
9
- args = {
10
- ...args,
11
- input: {
12
- ...args.input,
13
- CreateBucketConfiguration: region === "us-east-1" ? undefined : { LocationConstraint: region },
14
- },
15
- };
29
+ return (next) => async (args) => {
30
+ const { CreateBucketConfiguration } = args.input;
31
+ const region = await options.region();
32
+ if (!(CreateBucketConfiguration == null ? void 0 : CreateBucketConfiguration.LocationConstraint) && !(CreateBucketConfiguration == null ? void 0 : CreateBucketConfiguration.Location)) {
33
+ args = {
34
+ ...args,
35
+ input: {
36
+ ...args.input,
37
+ CreateBucketConfiguration: region === "us-east-1" ? void 0 : { LocationConstraint: region }
16
38
  }
17
- return next(args);
18
- };
39
+ };
40
+ }
41
+ return next(args);
42
+ };
19
43
  }
20
- exports.locationConstraintMiddleware = locationConstraintMiddleware;
21
- exports.locationConstraintMiddlewareOptions = {
22
- step: "initialize",
23
- tags: ["LOCATION_CONSTRAINT", "CREATE_BUCKET_CONFIGURATION"],
24
- name: "locationConstraintMiddleware",
25
- override: true,
44
+ __name(locationConstraintMiddleware, "locationConstraintMiddleware");
45
+ var locationConstraintMiddlewareOptions = {
46
+ step: "initialize",
47
+ tags: ["LOCATION_CONSTRAINT", "CREATE_BUCKET_CONFIGURATION"],
48
+ name: "locationConstraintMiddleware",
49
+ override: true
26
50
  };
27
- const getLocationConstraintPlugin = (config) => ({
28
- applyToStack: (clientStack) => {
29
- clientStack.add(locationConstraintMiddleware(config), exports.locationConstraintMiddlewareOptions);
30
- },
51
+ var getLocationConstraintPlugin = /* @__PURE__ */ __name((config) => ({
52
+ applyToStack: (clientStack) => {
53
+ clientStack.add(locationConstraintMiddleware(config), locationConstraintMiddlewareOptions);
54
+ }
55
+ }), "getLocationConstraintPlugin");
56
+ // Annotate the CommonJS export names for ESM import in node:
57
+
58
+ 0 && (module.exports = {
59
+ getLocationConstraintPlugin,
60
+ locationConstraintMiddleware,
61
+ locationConstraintMiddlewareOptions
31
62
  });
32
- exports.getLocationConstraintPlugin = getLocationConstraintPlugin;
63
+
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@aws-sdk/middleware-location-constraint",
3
- "version": "3.489.0",
3
+ "version": "3.496.0",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
6
- "build:cjs": "tsc -p tsconfig.cjs.json",
6
+ "build:cjs": "node ../../scripts/compilation/inline middleware-location-constraint",
7
7
  "build:es": "tsc -p tsconfig.es.json",
8
8
  "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build",
9
9
  "build:types": "tsc -p tsconfig.types.json",
@@ -21,8 +21,8 @@
21
21
  },
22
22
  "license": "Apache-2.0",
23
23
  "dependencies": {
24
- "@aws-sdk/types": "3.489.0",
25
- "@smithy/types": "^2.8.0",
24
+ "@aws-sdk/types": "3.496.0",
25
+ "@smithy/types": "^2.9.1",
26
26
  "tslib": "^2.5.0"
27
27
  },
28
28
  "engines": {