This commit is contained in:
2025-11-03 16:02:12 +00:00
parent 4823eb9082
commit 1f2937b387
11 changed files with 15601 additions and 4350 deletions

View File

@@ -0,0 +1,30 @@
/**
* Constants used throughout the smartupdate library
*/
// Time constants
export const MILLISECONDS_PER_MINUTE = 60_000;
export const MINUTES_PER_HOUR = 60;
export const DEFAULT_CACHE_DURATION_HOURS = 1;
// Console output constants
export const DEFAULT_MESSAGE_COLOR = 'pink';
// Log level constants
export const LOG_LEVELS = {
SILENT: 0,
ERROR: 1,
WARN: 2,
INFO: 3,
DEBUG: 4,
} as const;
export type TLogLevel = keyof typeof LOG_LEVELS;
// Message prefixes
export const MESSAGE_PREFIXES = {
ERROR: 'error:',
WARN: 'warn:',
INFO: 'info:',
SMARTUPDATE: 'smartupdate:',
} as const;