31 lines
608 B
TypeScript
31 lines
608 B
TypeScript
/**
|
|
* 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;
|