@lucidcms/core
Version:
The core of the Lucid CMS. It's responsible for spinning up the API and serving the CMS.
1 lines • 1.05 kB
Source Map (JSON)
{"version":3,"file":"alert-map.mjs","names":[],"sources":["../../../src/libs/alerts/alert-map.ts"],"sourcesContent":["import storageCheckAlert from \"../../services/media/alerts/storage-check.js\";\nimport type { AlertConfig, InternalAlertKey } from \"./types.js\";\n\n/**\n * Registers internal alert producers so cron and jobs can execute them by key.\n */\nexport const alertMap = {\n\t\"storage-check\": {\n\t\tkey: \"storage-check\",\n\t\tnightly: true,\n\t\tservice: storageCheckAlert,\n\t},\n} as const satisfies Record<InternalAlertKey, AlertConfig>;\n\n/**\n * Returns every registered alert config for scheduler-style workflows.\n */\nexport const getAlertConfigs = () => {\n\treturn Object.values(alertMap);\n};\n\n/**\n * Looks up one alert config for targeted programmatic or queued execution.\n */\nexport const getAlertConfig = (key: string) => {\n\treturn alertMap[key as InternalAlertKey];\n};\n"],"mappings":"6DAMA,MAAa,EAAW,CACvB,gBAAiB,CAChB,IAAK,gBACL,QAAS,GACT,QAAS,CACV,CACD,EAKa,MACL,OAAO,OAAO,CAAQ,EAMjB,EAAkB,GACvB,EAAS"}