update
This commit is contained in:
30
ts/smartupdate.constants.ts
Normal file
30
ts/smartupdate.constants.ts
Normal 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;
|
||||
Reference in New Issue
Block a user