Rocky_Mountain_Vending/.pnpm-store/v10/files/0d/4535183c4338407a0d2d1238306c5a66f3e632f57b07ea31d5e00a500271e4b70a3284f51f867b7c2a3f8a803af17798c7685f33622479fadf79188091e0b1
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

30 lines
1.2 KiB
Text

'use strict';
function locationConstraintMiddleware(options) {
return (next) => async (args) => {
const { CreateBucketConfiguration } = args.input;
const region = await options.region();
if (!CreateBucketConfiguration?.LocationConstraint && !CreateBucketConfiguration?.Location) {
if (region !== "us-east-1") {
args.input.CreateBucketConfiguration = args.input.CreateBucketConfiguration ?? {};
args.input.CreateBucketConfiguration.LocationConstraint = region;
}
}
return next(args);
};
}
const locationConstraintMiddlewareOptions = {
step: "initialize",
tags: ["LOCATION_CONSTRAINT", "CREATE_BUCKET_CONFIGURATION"],
name: "locationConstraintMiddleware",
override: true,
};
const getLocationConstraintPlugin = (config) => ({
applyToStack: (clientStack) => {
clientStack.add(locationConstraintMiddleware(config), locationConstraintMiddlewareOptions);
},
});
exports.getLocationConstraintPlugin = getLocationConstraintPlugin;
exports.locationConstraintMiddleware = locationConstraintMiddleware;
exports.locationConstraintMiddlewareOptions = locationConstraintMiddlewareOptions;