mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2026-07-30 15:28:30 -04:00
- Added utility functions to ensure datetime values are UTC-aware, improving consistency in date handling across the application. - Introduced migrations to update existing visit records, making start and end dates timezone-aware. - Normalized all-day visit end dates to UTC midnight, ensuring accurate representation of all-day events. - Updated serializers and services to utilize new datetime utilities, enhancing the handling of visit dates in various contexts. - Added comprehensive tests for new datetime utilities to ensure correct functionality and edge case handling.
27 lines
676 B
JavaScript
27 lines
676 B
JavaScript
if (!process.env.ORIGIN && process.env.SITE_URL) {
|
|
process.env.ORIGIN = process.env.SITE_URL;
|
|
}
|
|
|
|
// Node 26+ can hit an undici bug when a client disconnects while a response body
|
|
// is still buffered. Suppress that specific crash so the SSR server stays up.
|
|
process.on('uncaughtException', (error) => {
|
|
if (
|
|
error &&
|
|
typeof error === 'object' &&
|
|
'code' in error &&
|
|
error.code === 'ERR_ASSERTION' &&
|
|
'message' in error &&
|
|
String(error.message).includes('this.paused')
|
|
) {
|
|
console.warn(
|
|
'[adventurelog] Suppressed undici parser crash; use Node 22 LTS for production:',
|
|
error.message
|
|
);
|
|
return;
|
|
}
|
|
|
|
throw error;
|
|
});
|
|
|
|
await import('./build/index.js');
|