feat: certificates, landing pages, ai tutor, website update, compliance

This commit is contained in:
Rotimi Best
2026-05-18 03:47:22 +01:00
parent c31ad63955
commit ac3a2c14a7
644 changed files with 56050 additions and 5439 deletions
+28
View File
@@ -0,0 +1,28 @@
/**
* Tiny structured logger for the worker. Keeps log output greppable across
* processors without pulling in a full logger dependency.
*/
type LogLevel = 'debug' | 'info' | 'warn' | 'error';
interface LogFields {
[key: string]: unknown;
}
function emit(level: LogLevel, message: string, fields: LogFields = {}): void {
const payload = {
ts: new Date().toISOString(),
level,
msg: message,
...fields
};
const stream = level === 'error' || level === 'warn' ? console.error : console.log;
stream(JSON.stringify(payload));
}
export const log = {
debug: (msg: string, fields?: LogFields) => emit('debug', msg, fields),
info: (msg: string, fields?: LogFields) => emit('info', msg, fields),
warn: (msg: string, fields?: LogFields) => emit('warn', msg, fields),
error: (msg: string, fields?: LogFields) => emit('error', msg, fields)
};