Rocky_Mountain_Vending/.pnpm-store/v10/files/cf/6885ea1aff37655cb178b3b3b4a5de3df698bff95fe4bb64ce1556d92a2897557f3985d8f875810bca772eee6fc47f0a3cb42b6e5eb2cd58a5ad32d35fd59e
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

26 lines
1.1 KiB
Text

import { checkExceptions, createWaiter, WaiterState } from "@smithy/util-waiter";
import { HeadBucketCommand } from "../commands/HeadBucketCommand";
const checkState = async (client, input) => {
let reason;
try {
const result = await client.send(new HeadBucketCommand(input));
reason = result;
return { state: WaiterState.SUCCESS, reason };
}
catch (exception) {
reason = exception;
if (exception.name && exception.name == "NotFound") {
return { state: WaiterState.RETRY, reason };
}
}
return { state: WaiterState.RETRY, reason };
};
export const waitForBucketExists = async (params, input) => {
const serviceDefaults = { minDelay: 5, maxDelay: 120 };
return createWaiter({ ...serviceDefaults, ...params }, input, checkState);
};
export const waitUntilBucketExists = async (params, input) => {
const serviceDefaults = { minDelay: 5, maxDelay: 120 };
const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState);
return checkExceptions(result);
};