Rocky_Mountain_Vending/.pnpm-store/v10/files/67/3724bd320e3ab23e14f4f3a1888d2ecf3ef2c827a55c90efbdc0b07872107bc620b955f1303d4037d3c2840df477b2980cbb3ab570a8b605c534cad1f3dab7
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

25 lines
1 KiB
Text

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