refactor: improve storage handling, UI feedback, and defaults
- Update default admin email to admin@datastack.dev - Improve storage flush logic with partial success handling - Enhance CSV download reliability using fetch and Blob - Adjust simulator protocol resolution and timing - Fix date range filtering in data API query
This commit is contained in:
1 parent
40a6855724
commit
3ad9b1d4d2
17 files changed
+281
-78
No files matched your search
@@ -119,10 +119,15 @@ export class CSVStorageManager {
|
||||
}
|
||||
|
||||
/**
|
||||
* Normalizes and validates any timestamp or date string into a strict YYYY-MM-DD partition key
|
||||
* Normalizes and validates any timestamp or date string into a strict YYYY-MM-DD partition key.
|
||||
* Returns fallback (default: today's date) if unparseable, or null when fallback is null.
|
||||
*/
|
||||
public static extractSafePartitionDate(rawTimestamp?: string): string {
|
||||
const fallback = new Date().toISOString().slice(0, 10);
|
||||
public static extractSafePartitionDate(rawTimestamp?: string, fallback?: string): string;
|
||||
public static extractSafePartitionDate(rawTimestamp: string | undefined, fallback: null): string | null;
|
||||
public static extractSafePartitionDate(
|
||||
rawTimestamp?: string,
|
||||
fallback: string | null = new Date().toISOString().slice(0, 10),
|
||||
): string | null {
|
||||
if (!rawTimestamp || typeof rawTimestamp !== 'string') {
|
||||
return fallback;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user