Rocky_Mountain_Vending/.pnpm-store/v10/files/75/d32f59eaf6737a4cc0f12067fa70c136e7e28b6d47e8ea56886d7bd36e2a36e25e0ead3b21d61f220ff0a5251866d8f41b8c6bed2399e18df15287646c0de3
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

18 lines
No EOL
499 B
Text

import { unlinkSync, writeFileSync } from 'fs';
import { renameSync } from './rename';
export function writeFileAtomic(filePath, content) {
const tempPath = filePath + '.tmp.' + Math.random().toString(36).slice(2);
try {
writeFileSync(tempPath, content, 'utf-8');
renameSync(tempPath, filePath);
} catch (e) {
try {
unlinkSync(tempPath);
} catch {
// ignore
}
throw e;
}
}
//# sourceMappingURL=write-atomic.js.map