Files
AdventureLog/frontend/start.js
Sean Morley fe30ad90e6 Implement timezone-aware date handling and normalization for visits
- 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.
2026-07-08 17:11:56 -04:00

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');