@t1mmen/srtd
Version:
Supabase Repeatable Template Definitions (srtd): 🪄 Live-reloading SQL templates for Supabase DX. Make your database changes reviewable and migrations maintainable! 🚀
12 lines • 471 B
JavaScript
export async function getNextTimestamp(buildLog) {
const now = new Date();
const timestamp = now.toISOString().replace(/\D/g, '').slice(0, 14);
if (timestamp <= buildLog.lastTimestamp) {
const nextTimestamp = (BigInt(buildLog.lastTimestamp) + 1n).toString();
buildLog.lastTimestamp = nextTimestamp;
return nextTimestamp;
}
buildLog.lastTimestamp = timestamp;
return timestamp;
}
//# sourceMappingURL=getNextTimestamp.js.map