Rocky_Mountain_Vending/.pnpm-store/v10/files/97/f06f56ae24044f99da92f5712fb9467be2920d204c7e770155b2848c7a7f4896c25a40a8f8127307f6892a68320b21e1810ebed1e0172b9221bfb3e6fc9551
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

52 lines
2.9 KiB
Text

/* IMPORT */
import fs from 'node:fs';
import { promisify } from 'node:util';
import { attemptifyAsync, attemptifySync } from 'stubborn-utils';
import { retryifyAsync, retryifySync } from 'stubborn-utils';
import { ATTEMPTIFY_CHANGE_ERROR_OPTIONS, ATTEMPTIFY_NOOP_OPTIONS, RETRYIFY_OPTIONS } from './constants.js';
/* MAIN */
const FS = {
attempt: {
/* ASYNC */
chmod: attemptifyAsync(promisify(fs.chmod), ATTEMPTIFY_CHANGE_ERROR_OPTIONS),
chown: attemptifyAsync(promisify(fs.chown), ATTEMPTIFY_CHANGE_ERROR_OPTIONS),
close: attemptifyAsync(promisify(fs.close), ATTEMPTIFY_NOOP_OPTIONS),
fsync: attemptifyAsync(promisify(fs.fsync), ATTEMPTIFY_NOOP_OPTIONS),
mkdir: attemptifyAsync(promisify(fs.mkdir), ATTEMPTIFY_NOOP_OPTIONS),
realpath: attemptifyAsync(promisify(fs.realpath), ATTEMPTIFY_NOOP_OPTIONS),
stat: attemptifyAsync(promisify(fs.stat), ATTEMPTIFY_NOOP_OPTIONS),
unlink: attemptifyAsync(promisify(fs.unlink), ATTEMPTIFY_NOOP_OPTIONS),
/* SYNC */
chmodSync: attemptifySync(fs.chmodSync, ATTEMPTIFY_CHANGE_ERROR_OPTIONS),
chownSync: attemptifySync(fs.chownSync, ATTEMPTIFY_CHANGE_ERROR_OPTIONS),
closeSync: attemptifySync(fs.closeSync, ATTEMPTIFY_NOOP_OPTIONS),
existsSync: attemptifySync(fs.existsSync, ATTEMPTIFY_NOOP_OPTIONS),
fsyncSync: attemptifySync(fs.fsync, ATTEMPTIFY_NOOP_OPTIONS),
mkdirSync: attemptifySync(fs.mkdirSync, ATTEMPTIFY_NOOP_OPTIONS),
realpathSync: attemptifySync(fs.realpathSync, ATTEMPTIFY_NOOP_OPTIONS),
statSync: attemptifySync(fs.statSync, ATTEMPTIFY_NOOP_OPTIONS),
unlinkSync: attemptifySync(fs.unlinkSync, ATTEMPTIFY_NOOP_OPTIONS)
},
retry: {
/* ASYNC */
close: retryifyAsync(promisify(fs.close), RETRYIFY_OPTIONS),
fsync: retryifyAsync(promisify(fs.fsync), RETRYIFY_OPTIONS),
open: retryifyAsync(promisify(fs.open), RETRYIFY_OPTIONS),
readFile: retryifyAsync(promisify(fs.readFile), RETRYIFY_OPTIONS),
rename: retryifyAsync(promisify(fs.rename), RETRYIFY_OPTIONS),
stat: retryifyAsync(promisify(fs.stat), RETRYIFY_OPTIONS),
write: retryifyAsync(promisify(fs.write), RETRYIFY_OPTIONS),
writeFile: retryifyAsync(promisify(fs.writeFile), RETRYIFY_OPTIONS),
/* SYNC */
closeSync: retryifySync(fs.closeSync, RETRYIFY_OPTIONS),
fsyncSync: retryifySync(fs.fsyncSync, RETRYIFY_OPTIONS),
openSync: retryifySync(fs.openSync, RETRYIFY_OPTIONS),
readFileSync: retryifySync(fs.readFileSync, RETRYIFY_OPTIONS),
renameSync: retryifySync(fs.renameSync, RETRYIFY_OPTIONS),
statSync: retryifySync(fs.statSync, RETRYIFY_OPTIONS),
writeSync: retryifySync(fs.writeSync, RETRYIFY_OPTIONS),
writeFileSync: retryifySync(fs.writeFileSync, RETRYIFY_OPTIONS)
}
};
/* EXPORT */
export default FS;