Rocky_Mountain_Vending/.pnpm-store/v10/files/c1/04f5298d4f457667378752439f61d6aa088031e928a3817e1783c592f707d056a5da7e474a85b91da522437881db9ba5a9bec694db8c06616a1bfefcbf558b
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
No EOL
1,011 B
Text

import { DetachedPromise } from '../../lib/detached-promise';
import { CloseController } from '../web/web-on-close';
import { AwaiterOnce } from './awaiter';
export class AfterRunner {
async executeAfter() {
this.closeController.dispatchClose();
await this.awaiter.awaiting();
// if we got an error while running the callbacks,
// thenthis is a noop, because the promise is already rejected
this.finishedWithoutErrors.resolve();
return this.finishedWithoutErrors.promise;
}
constructor(){
this.awaiter = new AwaiterOnce();
this.closeController = new CloseController();
this.finishedWithoutErrors = new DetachedPromise();
this.context = {
waitUntil: this.awaiter.waitUntil.bind(this.awaiter),
onClose: this.closeController.onClose.bind(this.closeController),
onTaskError: (error)=>this.finishedWithoutErrors.reject(error)
};
}
}
//# sourceMappingURL=run-with-after.js.map