logAuditFill function exported

Last updated: 2026-03-01T23:25:47.125Z

Metrics

LOC: 16 Complexity: 2 Params: 1

Signature

logAuditFill(opts: { selector: string; fieldType: string | null | undefined; source: string; value: string; }): : void

Summary

Records an audit entry for a form field fill operation. Always persisted regardless of debugLog setting.

Tags

#@param selector - CSS selector of the filled field#@param fieldType - detected type (e.g. "cpf", "email")#@param source - generation source (e.g. "generator", "ai", "rule")#@param value - generated value (partially masked for privacy)

Source Code

export function logAuditFill(opts: {
  selector: string;
  fieldType: string | null | undefined;
  source: string;
  value: string;
}): void {
  const masked = maskValue(opts.value);
  const msg = `fill | ${opts.fieldType ?? "unknown"} | ${opts.source} | ${masked} | ${opts.selector}`;
  const entry: LogEntry = {
    ts: new Date().toISOString(),
    level: "audit",
    ns: "[FillAll/Audit]",
    msg,
  };
  addLogEntry(entry);
}

Dependencies (Outgoing)

graph LR logAuditFill["logAuditFill"] maskValue["maskValue"] addLogEntry["addLogEntry"] logAuditFill -->|calls| maskValue logAuditFill -->|calls| addLogEntry style logAuditFill fill:#dbeafe,stroke:#2563eb,stroke-width:2px click logAuditFill "221e9f6c8e5f6850.html" click maskValue "cddf00b5b286b0a8.html" click addLogEntry "b5eb9ecc61a3eb82.html"
TargetType
maskValue calls
addLogEntry calls

Impact (Incoming)

graph LR logAuditFill["logAuditFill"] setNativeValue["setNativeValue"] setNativeValue -->|uses| logAuditFill style logAuditFill fill:#dbeafe,stroke:#2563eb,stroke-width:2px click logAuditFill "221e9f6c8e5f6850.html" click setNativeValue "334bd99609d7c37c.html"
SourceType
setNativeValue uses